Skip to content

Commit

Permalink
Merge pull request #3146 from CombatExtended-Continued/Stunnable-Comp
Browse files Browse the repository at this point in the history
Implement vanilla stunnable comp for auto turrets
  • Loading branch information
N7Huntsman authored May 22, 2024
2 parents d3f9df6 + c460cde commit 82e414c
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Defs/ThingDefs_Buildings/Buildings_Turrets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
<comps>
<li Class="CompProperties_Flickable" />
<li Class="CompProperties_Breakdownable" />
<li Class="CompProperties_Stunnable">
<affectedDamageDefs>
<li>EMP</li>
</affectedDamageDefs>
</li>
</comps>
</ThingDef>

Expand Down
20 changes: 20 additions & 0 deletions Patches/Core/ThingDefs_Buildings/Buildings_Security.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
</value>
</Operation>

<Operation Class="PatchOperationRemove">
<xpath>Defs/ThingDef[defName="Turret_MiniTurret"]/comps/li[@Class="CompProperties_Stunnable"]/affectedDamageDefs/li[.="Stun"]</xpath>
</Operation>

<Operation Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName="Turret_MiniTurret"]/thingClass</xpath>
<value>
Expand Down Expand Up @@ -181,6 +185,10 @@
</value>
</Operation>

<Operation Class="PatchOperationRemove">
<xpath>Defs/ThingDef[@Name="AutocannonTurret"]/comps/li[@Class="CompProperties_Stunnable"]/affectedDamageDefs/li[.="Stun"]</xpath>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="Turret_Autocannon"]</xpath>
<value>
Expand Down Expand Up @@ -267,6 +275,10 @@
</value>
</Operation>

<Operation Class="PatchOperationRemove">
<xpath>Defs/ThingDef[defName="Turret_FoamTurret"]/comps/li[@Class="CompProperties_Stunnable"]/affectedDamageDefs/li[.="Stun"]</xpath>
</Operation>

<Operation Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName="Turret_FoamTurret"]/comps/li[@Class="CompProperties_Refuelable"]/fuelFilter/thingDefs/li</xpath>
<value>
Expand Down Expand Up @@ -306,6 +318,10 @@
<xpath>Defs/ThingDef[defName="Turret_RocketswarmLauncher"]/placeWorkers/li[.="PlaceWorker_ShowTurretRadius"]</xpath>
</Operation>

<Operation Class="PatchOperationRemove">
<xpath>Defs/ThingDef[defName="Turret_RocketswarmLauncher"]/comps/li[@Class="CompProperties_Stunnable"]/affectedDamageDefs/li[.="Stun"]</xpath>
</Operation>

<Operation Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName="Turret_RocketswarmLauncher"]/statBases/MaxHitPoints</xpath>
<value>
Expand Down Expand Up @@ -532,6 +548,10 @@
</value>
</Operation>

<Operation Class="PatchOperationRemove">
<xpath>Defs/ThingDef[defName="Turret_Mortar"]/comps/li[@Class="CompProperties_Stunnable"]</xpath>
</Operation>

<Operation Class="PatchOperationRemove">
<xpath>Defs/ThingDef[defName="Turret_Mortar"]/comps</xpath>
</Operation>
Expand Down
16 changes: 16 additions & 0 deletions Royalty/Patches/ThingDefs_Buildings/Buildings_Mechanoid.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@
</value>
</Operation>

<Operation Class="PatchOperationRemove">
<xpath>Defs/ThingDef[defName="Turret_AutoMiniTurret"]/comps/li[@Class="CompProperties_Stunnable"]/affectedDamageDefs/li[.="Stun"]</xpath>
</Operation>

<Operation Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName="Turret_AutoMiniTurret"]/thingClass</xpath>
<value>
Expand Down Expand Up @@ -121,6 +125,10 @@
</value>
</Operation>

<Operation Class="PatchOperationRemove">
<xpath>Defs/ThingDef[defName="Turret_AutoChargeBlaster"]/comps/li[@Class="CompProperties_Stunnable"]/affectedDamageDefs/li[.="Stun"]</xpath>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="Turret_AutoChargeBlaster"]/statBases</xpath>
<value>
Expand Down Expand Up @@ -177,6 +185,10 @@
</value>
</Operation>

<Operation Class="PatchOperationRemove">
<xpath>Defs/ThingDef[defName="Turret_AutoInferno"]/comps/li[@Class="CompProperties_Stunnable"]/affectedDamageDefs/li[.="Stun"]</xpath>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="Turret_AutoInferno"]/statBases</xpath>
<value>
Expand Down Expand Up @@ -235,6 +247,10 @@
</value>
</Operation>

<Operation Class="PatchOperationRemove">
<xpath>Defs/ThingDef[defName="Turret_AutoMortar"]/comps/li[@Class="CompProperties_Stunnable"]/affectedDamageDefs/li[.="Stun"]</xpath>
</Operation>

<Operation Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName="Turret_AutoMortar"]/statBases/MaxHitPoints</xpath>
<value>
Expand Down

0 comments on commit 82e414c

Please sign in to comment.