Skip to content

Commit

Permalink
Merge pull request #2760 from HeraldOfTzeentch/MetalGearRimworldGekko
Browse files Browse the repository at this point in the history
Metal Gear Rimworld-Gekko patch
  • Loading branch information
N7Huntsman authored Sep 22, 2023
2 parents 1891969 + ae465c1 commit 6ae4eef
Show file tree
Hide file tree
Showing 4 changed files with 424 additions and 0 deletions.
175 changes: 175 additions & 0 deletions Patches/Metal Gear Rimworld-Gekko/BodyDefs/GekkoBody.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
<?xml version="1.0" encoding="utf-8"?>
<Patch>

<Operation Class="PatchOperationFindMod">
<mods>
<li>Metal Gear Rimworld-Gekko</li>
</mods>

<match Class="PatchOperationSequence">
<operations>

<!-- ========== Add groups entry if it doesn't exist already ========== -->
<li Class="PatchOperationConditional">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/groups</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart</xpath>
<value>
<groups />
</value>
</nomatch>
</li>

<li Class="PatchOperationConditional">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/parts/li[def="MechanicalNeck"]/groups</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/parts/li[def="MechanicalNeck"]</xpath>
<value>
<groups />
</value>
</nomatch>
</li>

<li Class="PatchOperationConditional">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/parts/li[def="MechanicalNeck"]/parts/li[def="MechanicalHead"]/groups</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/parts/li[def="MechanicalNeck"]/parts/li[def="MechanicalHead"]</xpath>
<value>
<groups />
</value>
</nomatch>
</li>

<li Class="PatchOperationConditional">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/parts/li[def="MechanicalNeck"]/parts/li[def="MechanicalHead"]/parts/li[def="SightSensor"]/groups</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/parts/li[def="MechanicalNeck"]/parts/li[def="MechanicalHead"]/parts/li[def="SightSensor"]</xpath>
<value>
<groups />
</value>
</nomatch>
</li>

<li Class="PatchOperationConditional">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/parts/li[def="MechanicalNeck"]/parts/li[def="MechanicalHead"]/parts/li[def="HearingSensor"]/groups</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/parts/li[def="MechanicalNeck"]/parts/li[def="MechanicalHead"]/parts/li[def="HearingSensor"]</xpath>
<value>
<groups />
</value>
</nomatch>
</li>

<li Class="PatchOperationConditional">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/parts/li[def="MechanicalNeck"]/parts/li[def="MechanicalHead"]/parts/li[def="SmellSensor"]/groups</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/parts/li[def="MechanicalNeck"]/parts/li[def="MechanicalHead"]/parts/li[def="SmellSensor"]</xpath>
<value>
<groups />
</value>
</nomatch>
</li>

<li Class="PatchOperationConditional">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/parts/li[def="MechanicalShoulder"]/groups</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/parts/li[def="MechanicalShoulder"]</xpath>
<value>
<groups />
</value>
</nomatch>
</li>

<li Class="PatchOperationConditional">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/parts/li[def="MechanicalShoulder"]/parts/li[def="MechanicalArm"]/groups</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/parts/li[def="MechanicalShoulder"]/parts/li[def="MechanicalArm"]</xpath>
<value>
<groups />
</value>
</nomatch>
</li>

<!-- ========== Add armor coverage ========== -->
<li Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/groups</xpath>
<value>
<li>CoveredByNaturalArmor</li>
</value>
</li>

<li Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/parts/li[def="MechanicalNeck"]/groups</xpath>
<value>
<li>CoveredByNaturalArmor</li>
</value>
</li>

<li Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/parts/li[def="MechanicalNeck"]/parts/li[def="MechanicalHead"]/groups</xpath>
<value>
<li>CoveredByNaturalArmor</li>
</value>
</li>

<li Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/parts/li[def="MechanicalShoulder"]/groups</xpath>
<value>
<li>CoveredByNaturalArmor</li>
</value>
</li>

<li Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/parts/li[def="MechanicalShoulder"]/parts/li[def="MechanicalArm"]/groups</xpath>
<value>
<li>CoveredByNaturalArmor</li>
</value>
</li>

<li Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/parts/li[def="MGR_SyntheticalLeg"]/groups</xpath>
<value>
<li>CoveredByNaturalArmor</li>
</value>
</li>

<li Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/parts/li[def="MGR_SyntheticalLeg"]/parts/li[def="MechanicalFoot"]/groups</xpath>
<value>
<li>CoveredByNaturalArmor</li>
</value>
</li>

<li Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/parts/li[def="MGR_SyntheticalLeg"]/parts/li[def="PowerClaw"]/groups</xpath>
<value>
<li>CoveredByNaturalArmor</li>
</value>
</li>

<li Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/parts/li[def="MechanicalNeck"]/parts/li[def="MechanicalHead"]/parts/li[def="SightSensor"]/groups</xpath>
<value>
<li>CoveredByNaturalArmor</li>
</value>
</li>

<li Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/parts/li[def="MechanicalNeck"]/parts/li[def="MechanicalHead"]/parts/li[def="HearingSensor"]/groups</xpath>
<value>
<li>CoveredByNaturalArmor</li>
</value>
</li>

<li Class="PatchOperationAdd">
<xpath>Defs/BodyDef[defName="Mech_Gekko"]/corePart/parts/li[def="MechanicalNeck"]/parts/li[def="MechanicalHead"]/parts/li[def="SmellSensor"]/groups</xpath>
<value>
<li>CoveredByNaturalArmor</li>
</value>
</li>

</operations>
</match>
</Operation>

</Patch>
50 changes: 50 additions & 0 deletions Patches/Metal Gear Rimworld-Gekko/ThingDefs_Misc/Gekko50call.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<Patch>

<Operation Class="PatchOperationFindMod">
<mods>
<li>Metal Gear Rimworld-Gekko</li>
</mods>

<match Class="CombatExtended.PatchOperationMakeGunCECompatible">
<defName>MGR_Gun_Autocannon</defName>
<statBases>
<Mass>38.00</Mass>
<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
<SightsEfficiency>1</SightsEfficiency>
<ShotSpread>0.05</ShotSpread>
<SwayFactor>1.4</SwayFactor>
<Bulk>20.00</Bulk>
</statBases>
<Properties>
<recoilAmount>1.58</recoilAmount>
<verbClass>CombatExtended.Verb_ShootCE</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<defaultProjectile>Bullet_50BMG_FMJ</defaultProjectile>
<warmupTime>1.3</warmupTime>
<range>75</range>
<ticksBetweenBurstShots>8</ticksBetweenBurstShots>
<burstShotCount>10</burstShotCount>
<soundCast>50Cal_Browning</soundCast>
<soundCastTail>GunTail_Heavy</soundCastTail>
<muzzleFlashScale>16</muzzleFlashScale>
<recoilPattern>Mounted</recoilPattern>
</Properties>
<AmmoUser>
<magazineSize>100</magazineSize>
<reloadTime>7.8</reloadTime>
<ammoSet>AmmoSet_50BMG</ammoSet>
</AmmoUser>
<FireModes>
<aimedBurstShotCount>5</aimedBurstShotCount>
<aiAimMode>SuppressFire</aiAimMode>
</FireModes>
<weaponTags>
<li>CE_AI_Suppressive</li>
<li>NoSwitch</li>
</weaponTags>
</match>

</Operation>

</Patch>
Loading

0 comments on commit 6ae4eef

Please sign in to comment.