Skip to content

Commit

Permalink
Merge pull request #3458 from SamaelGray/SamaelGray-VanillaDrawSize
Browse files Browse the repository at this point in the history
Vanilla gun drawSize and drawOffset housekeeping
  • Loading branch information
N7Huntsman authored Nov 16, 2024
2 parents 547bf00 + b9396ae commit 1dc73b2
Show file tree
Hide file tree
Showing 11 changed files with 101 additions and 24 deletions.
7 changes: 7 additions & 0 deletions Anomaly/Patches/ThingDefs_Misc/Weapons_Ranged.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,13 @@
</value>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="Gun_HellcatRifle"]/graphicData</xpath>
<value>
<drawSize>(1.25,1.25)</drawSize>
</value>
</Operation>

<!-- ========== Incinerator ========== -->

<Operation Class="PatchOperationReplace">
Expand Down
118 changes: 94 additions & 24 deletions Patches/Core/ThingDefs_Misc/Weapons_Guns.xml
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@
<xpath>Defs/ThingDef[defName="Gun_Revolver"]</xpath>
<value>
<li Class="CombatExtended.GunDrawExtension">
<DrawSize>1.00,1.00</DrawSize>
<DrawOffset>0.0,0.0</DrawOffset>
<DrawSize>1.00,1.00</DrawSize><!-- Keeping for documentation purposes -->
<DrawOffset>0.0,-0.04</DrawOffset>
<DropCasingWhenReload>true</DropCasingWhenReload>
<AdvancedCasingVariables>true</AdvancedCasingVariables>
<CasingRotationRandomRange>20</CasingRotationRandomRange>
Expand Down Expand Up @@ -227,12 +227,18 @@
<researchPrerequisite>BlowbackOperation</researchPrerequisite>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="Gun_Autopistol"]/graphicData</xpath>
<value>
<drawSize>(0.95,0.95)</drawSize>
</value>
</Operation>

<Operation Class="PatchOperationAddModExtension">
<xpath>Defs/ThingDef[defName="Gun_Autopistol"]</xpath>
<value>
<li Class="CombatExtended.GunDrawExtension">
<DrawSize>0.93,0.93</DrawSize>
<DrawOffset>0.0,0.0</DrawOffset>
<DrawOffset>-0.03,-0.04</DrawOffset>
</li>
</value>
</Operation>
Expand Down Expand Up @@ -282,12 +288,18 @@
<researchPrerequisite>Gunsmithing</researchPrerequisite>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="Gun_PumpShotgun"]/graphicData</xpath>
<value>
<drawSize>(1.1,1.1)</drawSize>
</value>
</Operation>

<Operation Class="PatchOperationAddModExtension">
<xpath>Defs/ThingDef[defName="Gun_PumpShotgun"]</xpath>
<value>
<li Class="CombatExtended.GunDrawExtension">
<DrawSize>1.03,1.25</DrawSize>
<DrawOffset>0.05,0.0</DrawOffset>
<DrawOffset>0.06,0.0</DrawOffset>
</li>
</value>
</Operation>
Expand Down Expand Up @@ -343,12 +355,18 @@
<researchPrerequisite>GasOperation</researchPrerequisite>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="Gun_ChainShotgun"]/graphicData</xpath>
<value>
<drawSize>(1.1,1.1)</drawSize>
</value>
</Operation>

<Operation Class="PatchOperationAddModExtension">
<xpath>Defs/ThingDef[defName="Gun_ChainShotgun"]</xpath>
<value>
<li Class="CombatExtended.GunDrawExtension">
<DrawSize>1.04,1.23</DrawSize>
<DrawOffset>0.05,-0.05</DrawOffset>
<DrawOffset>0.06,0.0</DrawOffset>
<CasingOffset>0,0.2</CasingOffset>
<CasingAngleOffset>-30</CasingAngleOffset>
</li>
Expand Down Expand Up @@ -400,12 +418,18 @@
<AllowWithRunAndGun>false</AllowWithRunAndGun>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="Gun_BoltActionRifle"]/graphicData</xpath>
<value>
<drawSize>(1.3,1.3)</drawSize>
</value>
</Operation>

<Operation Class="PatchOperationAddModExtension">
<xpath>Defs/ThingDef[defName="Gun_BoltActionRifle"]</xpath>
<value>
<li Class="CombatExtended.GunDrawExtension">
<DrawSize>1.3,1.3</DrawSize>
<DrawOffset>0.12,0.04</DrawOffset>
<DrawOffset>0.18,0.01</DrawOffset>
<CasingOffset>-0.1,0.1</CasingOffset>
</li>
</value>
Expand Down Expand Up @@ -458,11 +482,17 @@
<researchPrerequisite>PrecisionRifling</researchPrerequisite>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="Gun_AssaultRifle"]/graphicData</xpath>
<value>
<drawSize>(1.2,1.2)</drawSize>
</value>
</Operation>

<Operation Class="PatchOperationAddModExtension">
<xpath>Defs/ThingDef[defName="Gun_AssaultRifle"]</xpath>
<value>
<li Class="CombatExtended.GunDrawExtension">
<DrawSize>1.16,1.16</DrawSize>
<DrawOffset>0.08,0.0</DrawOffset>
<CasingOffset>-0.05,0</CasingOffset>
</li>
Expand Down Expand Up @@ -514,12 +544,18 @@
<AllowWithRunAndGun>false</AllowWithRunAndGun>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="Gun_SniperRifle"]/graphicData</xpath>
<value>
<drawSize>(1.35,1.35)</drawSize>
</value>
</Operation>

<Operation Class="PatchOperationAddModExtension">
<xpath>Defs/ThingDef[defName="Gun_SniperRifle"]</xpath>
<value>
<li Class="CombatExtended.GunDrawExtension">
<DrawSize>1.25,1.45</DrawSize>
<DrawOffset>0.15,-0.05</DrawOffset>
<DrawOffset>0.16,-0.025</DrawOffset>
<CasingOffset>-0.3,0.1</CasingOffset>
</li>
</value>
Expand Down Expand Up @@ -573,12 +609,18 @@
<researchPrerequisite>BlowbackOperation</researchPrerequisite>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="Gun_MachinePistol"]/graphicData</xpath>
<value>
<drawSize>(0.84,0.84)</drawSize>
</value>
</Operation>

<Operation Class="PatchOperationAddModExtension">
<xpath>Defs/ThingDef[defName="Gun_MachinePistol"]</xpath>
<value>
<li Class="CombatExtended.GunDrawExtension">
<DrawSize>0.84,0.84</DrawSize>
<DrawOffset>-0.10,-0.07</DrawOffset>
<DrawOffset>-0.1,-0.1</DrawOffset>
<CasingOffset>0.1,0.1</CasingOffset>
<CasingAngleOffset>-30</CasingAngleOffset>
</li>
Expand Down Expand Up @@ -637,8 +679,7 @@
<xpath>Defs/ThingDef[defName="Gun_HeavySMG"]</xpath>
<value>
<li Class="CombatExtended.GunDrawExtension">
<DrawSize>0.85,0.85</DrawSize>
<DrawOffset>0.00,-0.03</DrawOffset>
<DrawOffset>-0.03,0.05</DrawOffset>
<CasingOffset>0.1,0</CasingOffset>
</li>
</value>
Expand Down Expand Up @@ -703,11 +744,17 @@
</value>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="Gun_IncendiaryLauncher"]/graphicData</xpath>
<value>
<drawSize>(1.16,1.16)</drawSize>
</value>
</Operation>

<Operation Class="PatchOperationAddModExtension">
<xpath>Defs/ThingDef[defName="Gun_IncendiaryLauncher"]</xpath>
<value>
<li Class="CombatExtended.GunDrawExtension">
<DrawSize>1.16,1.16</DrawSize>
<DrawOffset>0.1,-0.05</DrawOffset>
</li>
</value>
Expand Down Expand Up @@ -767,11 +814,17 @@
<AllowWithRunAndGun>false</AllowWithRunAndGun>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="Gun_LMG"]/graphicData</xpath>
<value>
<drawSize>(1.35,1.35)</drawSize>
</value>
</Operation>

<Operation Class="PatchOperationAddModExtension">
<xpath>Defs/ThingDef[defName="Gun_LMG"]</xpath>
<value>
<li Class="CombatExtended.GunDrawExtension">
<DrawSize>1.35,1.18</DrawSize>
<DrawOffset>0.13,-0.03</DrawOffset>
</li>
</value>
Expand Down Expand Up @@ -827,12 +880,18 @@
<researchPrerequisite>ChargedShot</researchPrerequisite>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="Gun_ChargeRifle"]/graphicData</xpath>
<value>
<drawSize>(1.03,1.03)</drawSize>
</value>
</Operation>

<Operation Class="PatchOperationAddModExtension">
<xpath>Defs/ThingDef[defName="Gun_ChargeRifle"]</xpath>
<value>
<li Class="CombatExtended.GunDrawExtension">
<DrawSize>1.03,1.03</DrawSize>
<DrawOffset>0.05,0.0</DrawOffset>
<DrawOffset>0.06,0.01</DrawOffset>
</li>
</value>
</Operation>
Expand Down Expand Up @@ -948,7 +1007,6 @@
<xpath>Defs/ThingDef[defName="Gun_Minigun"]</xpath>
<value>
<li Class="CombatExtended.GunDrawExtension">
<DrawSize>1.00,1.00</DrawSize>
<DrawOffset>0.1,-0.15</DrawOffset>
<CasingOffset>-0.2,-0.1</CasingOffset>
<CasingAngleOffset>-30</CasingAngleOffset>
Expand Down Expand Up @@ -1062,11 +1120,17 @@
<AllowWithRunAndGun>false</AllowWithRunAndGun>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="Gun_DoomsdayRocket"]/graphicData</xpath>
<value>
<drawSize>(1.45,1.45)</drawSize>
</value>
</Operation>

<Operation Class="PatchOperationAddModExtension">
<xpath>Defs/ThingDef[defName="Gun_DoomsdayRocket"]</xpath>
<value>
<li Class="CombatExtended.GunDrawExtension">
<DrawSize>1.45,1.45</DrawSize>
<DrawOffset>-0.15,0</DrawOffset>
</li>
</value>
Expand Down Expand Up @@ -1166,11 +1230,17 @@
<AllowWithRunAndGun>false</AllowWithRunAndGun>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="Gun_TripleRocket"]/graphicData</xpath>
<value>
<drawSize>(1.16,1.16)</drawSize>
</value>
</Operation>

<Operation Class="PatchOperationAddModExtension">
<xpath>Defs/ThingDef[defName="Gun_TripleRocket"]</xpath>
<value>
<li Class="CombatExtended.GunDrawExtension">
<DrawSize>1.16,1.16</DrawSize>
<DrawOffset>-0.25,0</DrawOffset>
</li>
</value>
Expand Down
Binary file modified Textures/Things/Item/Equipment/WeaponRanged/ChainShotgun.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Textures/Things/Item/Equipment/WeaponRanged/ChargeRifle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Textures/Things/Item/Equipment/WeaponRanged/HeavySMG.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Textures/Things/Item/Equipment/WeaponRanged/MachinePistol.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Textures/Things/Item/Equipment/WeaponRanged/Minigun.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Textures/Things/Item/Equipment/WeaponRanged/Shotgun.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Textures/Things/Item/Equipment/WeaponRanged/SniperRifle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Textures/Things/Weapons/MechanoidMinigun.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1dc73b2

Please sign in to comment.