-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2436 from CombatExtended-Continued/AmmoContainer(…
…Upstream) External Ammo Autoloader/Container
- Loading branch information
Showing
24 changed files
with
1,581 additions
and
428 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Defs> | ||
|
||
<SoundDef> | ||
<defName>CE_AutoLoaderAmbient</defName> | ||
<sustain>True</sustain> | ||
<context>MapOnly</context> | ||
<priorityMode>PrioritizeNearest</priorityMode> | ||
<subSounds> | ||
<li> | ||
<grains> | ||
<li Class="AudioGrain_Clip"> | ||
<clipPath>AmmoContainer/AmmoContainerAmbient</clipPath> | ||
</li> | ||
</grains> | ||
<volumeRange>10</volumeRange> | ||
<distRange>10~38</distRange> | ||
</li> | ||
</subSounds> | ||
</SoundDef> | ||
|
||
</Defs> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Defs> | ||
<!-- | ||
===Auto loader example def | ||
<ThingDef ParentName="BuildingBase"> | ||
<defName>BDsAutoLoaderTest</defName> | ||
<label>auto loader test</label> | ||
<description>An ammo crate with magical autoloaders.</description> | ||
===Thing class, ticker type and drawer type are mandatory=== | ||
<thingClass>CombatExtended.Building_AutoLoaderCE</thingClass> | ||
<tickerType>Normal</tickerType> | ||
<drawerType>MapMeshAndRealTime</drawerType> | ||
===This Ammo user is the autoloader's ammo capacity and reload time=== | ||
<comps> | ||
<li Class="CombatExtended.CompProperties_AmmoUser"> | ||
<magazineSize>400</magazineSize> | ||
<reloadTime>7.8</reloadTime> | ||
<ammoSet>AmmoSet_145x114mm</ammoSet> | ||
</li> | ||
===If CompMannable and CompPowerTrader are present, they'll be taken into account too, same goes for CompInitiatable and CompCanBeDormant=== | ||
<li Class="CompProperties_Mannable"> | ||
<manWorkType>Hauling</manWorkType> | ||
</li> | ||
<li Class="CompProperties_Power"> | ||
<compClass>CompPowerTrader</compClass> | ||
<basePowerConsumption>300</basePowerConsumption> | ||
</li> | ||
</comps> | ||
===Different graphics can be applied at empty, half full (above 0) and full (above 75%) if this mod extension exists=== | ||
<modExtensions> | ||
<li Class="CombatExtended.ModExtension_AutoLoaderGraphics"> | ||
<fullGraphic> | ||
<texPath>Things/Building/Misc/ToolCabinet</texPath> | ||
<graphicClass>Graphic_Multi</graphicClass> | ||
<drawSize>(2,1)</drawSize> | ||
<color>(0,0,0)</color> | ||
<damageData> | ||
<cornerTL>Damage/Corner</cornerTL> | ||
<cornerTR>Damage/Corner</cornerTR> | ||
<cornerBL>Damage/Corner</cornerBL> | ||
<cornerBR>Damage/Corner</cornerBR> | ||
</damageData> | ||
</fullGraphic> | ||
<halfFullGraphic> | ||
===This is left deliberately empty, The code should fall back to default graphic if the current situation's graphics is left blank=== | ||
</halfFullGraphic> | ||
<emptyGraphic> | ||
<texPath>Things/Building/Misc/ToolCabinet</texPath> | ||
<graphicClass>Graphic_Multi</graphicClass> | ||
<drawSize>(2,1)</drawSize> | ||
<color>(0,0,114)</color> | ||
<damageData> | ||
<cornerTL>Damage/Corner</cornerTL> | ||
<cornerTR>Damage/Corner</cornerTR> | ||
<cornerBL>Damage/Corner</cornerBL> | ||
<cornerBR>Damage/Corner</cornerBR> | ||
</damageData> | ||
</emptyGraphic> | ||
===Only turrets in this list will be reloaded, if it's not empty=== | ||
<allowedTurrets> | ||
<li>Turret_Heavy</li> | ||
</allowedTurrets> | ||
==The tag here is buildingTags under building node, Not weapon tag. See the def of KPV for example | ||
<allowedTurretTags> | ||
<li>CE_TurretHeavy</li> | ||
</allowedTurretTags> | ||
===if left empty, a default machine cranking sound will play=== | ||
<reloadingSustainer>Ingest_Drink</reloadingSustainer> | ||
===if left empty, the intereact sound of the turret gun will play=== | ||
<reloadCompleteSound>Pawn_Chicken_Call</reloadCompleteSound> | ||
</li> | ||
</modExtensions> | ||
===Generic stuffs here=== | ||
<graphicData> | ||
<texPath>Things/Building/Misc/ToolCabinet</texPath> | ||
<graphicClass>Graphic_Multi</graphicClass> | ||
<drawSize>(2,1)</drawSize> | ||
<color>(96,114,95)</color> | ||
<damageData> | ||
<cornerTL>Damage/Corner</cornerTL> | ||
<cornerTR>Damage/Corner</cornerTR> | ||
<cornerBL>Damage/Corner</cornerBL> | ||
<cornerBR>Damage/Corner</cornerBR> | ||
</damageData> | ||
</graphicData> | ||
<altitudeLayer>Building</altitudeLayer> | ||
<passability>PassThroughOnly</passability> | ||
<castEdgeShadows>true</castEdgeShadows> | ||
<staticSunShadowHeight>0.35</staticSunShadowHeight> | ||
<hasInteractionCell>True</hasInteractionCell> | ||
<interactionCellOffset>(0,0,-1)</interactionCellOffset> | ||
<fillPercent>0.5</fillPercent> | ||
<canOverlapZones>false</canOverlapZones> | ||
<pathCost>42</pathCost> | ||
<size>(2,1)</size> | ||
<costList> | ||
<Steel>200</Steel> | ||
</costList> | ||
<building> | ||
<destroySound>BuildingDestroyed_Metal_Small</destroySound> | ||
</building> | ||
<statBases> | ||
<MaxHitPoints>100</MaxHitPoints> | ||
<WorkToBuild>1800</WorkToBuild> | ||
<Mass>20</Mass> | ||
<Flammability>0.5</Flammability> | ||
===Look at this reload speed. this controls how fast/slow autoloader loads=== | ||
<ReloadSpeed>0.5</ReloadSpeed> | ||
</statBases> | ||
<designationCategory>Misc</designationCategory> | ||
<minifiedDef>MinifiedThing</minifiedDef> | ||
<thingCategories> | ||
<li>BuildingsMisc</li> | ||
</thingCategories> | ||
</ThingDef> | ||
--> | ||
|
||
</Defs> |
Oops, something went wrong.