From cf79477de329924918226e8a4bf6cf56003eed76 Mon Sep 17 00:00:00 2001 From: Nox Date: Wed, 13 Aug 2025 10:13:14 -0700 Subject: [PATCH] Weapon Resizing (#36473) --- .../Entities/Clothing/Back/smuggler.yml | 4 +- .../Prototypes/Entities/Objects/Fun/toys.yml | 4 ++ .../Entities/Objects/Tools/appraisal.yml | 4 ++ .../Objects/Weapons/Guns/Basic/watergun.yml | 13 ++++- .../Weapons/Guns/Battery/battery_guns.yml | 52 ++++++++++++++++--- .../Entities/Objects/Weapons/Guns/Bow/bow.yml | 1 + .../Weapons/Guns/Launchers/launchers.yml | 22 ++++++-- .../Objects/Weapons/Guns/Pistols/pistols.yml | 3 ++ .../Weapons/Guns/Revolvers/revolvers.yml | 9 ++++ .../Objects/Weapons/Guns/Rifles/rifles.yml | 7 +++ .../Objects/Weapons/Guns/SMGs/smgs.yml | 2 + .../Weapons/Guns/Shotguns/shotguns.yml | 23 +++----- .../Objects/Weapons/Guns/Snipers/snipers.yml | 8 ++- .../Objects/Weapons/Guns/flare_gun.yml | 3 ++ .../Objects/Weapons/Guns/pneumatic_cannon.yml | 8 +-- 15 files changed, 130 insertions(+), 33 deletions(-) diff --git a/Resources/Prototypes/Entities/Clothing/Back/smuggler.yml b/Resources/Prototypes/Entities/Clothing/Back/smuggler.yml index f5ec4fcd3a..3a4495f895 100644 --- a/Resources/Prototypes/Entities/Clothing/Back/smuggler.yml +++ b/Resources/Prototypes/Entities/Clothing/Back/smuggler.yml @@ -85,11 +85,11 @@ children: - id: RevolverCapGun amount: !type:RangeNumberSelector - range: 4, 8 + range: 4, 6 weight: 95 - id: RevolverCapGunFake amount: !type:RangeNumberSelector - range: 1, 8 + range: 1, 6 weight: 5 - type: entity diff --git a/Resources/Prototypes/Entities/Objects/Fun/toys.yml b/Resources/Prototypes/Entities/Objects/Fun/toys.yml index 230669874b..3c142425a0 100644 --- a/Resources/Prototypes/Entities/Objects/Fun/toys.yml +++ b/Resources/Prototypes/Entities/Objects/Fun/toys.yml @@ -317,6 +317,10 @@ - state: base map: ["enum.GunVisualLayers.Base"] - type: Item + shape: + - 0,0,1,0 + - 0,1,0,1 + storedOffset: -2,-7 sprite: Objects/Fun/capgun.rsi - type: Tag tags: diff --git a/Resources/Prototypes/Entities/Objects/Tools/appraisal.yml b/Resources/Prototypes/Entities/Objects/Tools/appraisal.yml index 3edf26ea78..8b6ca5e02c 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/appraisal.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/appraisal.yml @@ -9,6 +9,10 @@ state: icon - type: Item sprite: Objects/Tools/appraisal-tool.rsi + shape: + - 0,0,1,0 + - 0,1,0,1 + storedOffset: -3,-3 - type: PriceGun - type: UseDelay delay: 3 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Basic/watergun.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Basic/watergun.yml index 55adfb7ba6..65535223d9 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Basic/watergun.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Basic/watergun.yml @@ -56,6 +56,11 @@ name: water pistol description: The dinkiest of water-based weaponry. You swear the trigger doesn't do anything. components: + - type: Item + shape: + - 0,0,1,0 + - 0,1,0,1 + storedOffset: -4,-4 - type: Sprite sprite: Objects/Weapons/Guns/Pistols/water_pistol.rsi layers: @@ -95,7 +100,9 @@ map: [ "enum.DamageStateVisualLayers.Base" ] - type: Item sprite: Objects/Weapons/Guns/Pistols/soaker.rsi - size: Normal + size: Large + shape: + - 0,0,2,1 - type: RandomSprite getAllGroups: true available: @@ -132,7 +139,9 @@ map: [ "enum.DamageStateVisualLayers.Base" ] - type: Item sprite: Objects/Weapons/Guns/Pistols/soaker.rsi - size: Normal + size: Large + shape: # SMG size. + - 0,0,2,1 - type: RandomSprite getAllGroups: true available: diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml index cdd3edd93f..4b215ec90a 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml @@ -116,6 +116,10 @@ map: ["enum.GunVisualLayers.MagUnshaded"] shader: unshaded - type: Item + shape: + - 0,0,1,0 + - 0,1,0,1 + storedOffset: 0,-7 sprite: Objects/Weapons/Guns/Battery/svalinn.rsi - type: MagazineVisuals magState: mag @@ -136,6 +140,8 @@ - state: mag-unshaded-4 map: ["enum.GunVisualLayers.MagUnshaded"] shader: unshaded + - type: Item + storedOffset: 0,-5 - type: HitscanBatteryAmmoProvider proto: RedMediumLaser fireCost: 62.5 @@ -159,6 +165,8 @@ - state: mag-unshaded-4 map: ["enum.GunVisualLayers.MagUnshaded"] shader: unshaded + - type: Item + storedOffset: 0,-4 - type: MagazineVisuals magState: mag steps: 5 @@ -179,6 +187,10 @@ id: WeaponTeslaGun description: The power of the primordial element of lightning in your hands. components: + - type: Item + size: Large + shape: + - 0,0,2,1 - type: Sprite sprite: Objects/Weapons/Guns/Battery/tesla_gun.rsi layers: @@ -203,11 +215,13 @@ - type: Appearance - type: entity - name: practice laser rifle + name: practice laser carbine parent: [BaseWeaponBattery, BaseGunWieldable] id: WeaponLaserCarbinePractice - description: This modified laser rifle fires nearly harmless beams in the 40-watt range, for target practice. + description: This modified laser carbine fires nearly harmless beams in the 40-watt range, for target practice. components: + - type: Item + size: Large - type: Sprite sprite: Objects/Weapons/Guns/Battery/laser_gun.rsi layers: @@ -234,7 +248,7 @@ price: 300 - type: entity - name: laser rifle + name: laser carbine parent: [WeaponLaserCarbinePractice, BaseGunWieldable, BaseSecurityContraband] id: WeaponLaserCarbine description: Favoured by Nanotrasen Security for being cheap and easy to use. @@ -259,6 +273,8 @@ - state: mag-unshaded-4 map: ["enum.GunVisualLayers.MagUnshaded"] shader: unshaded + - type: Item + storedOffset: -2,-5 - type: MagazineVisuals magState: mag steps: 5 @@ -285,6 +301,8 @@ id: WeaponPulseCarbine description: A high tech energy carbine favoured by the NT-ERT operatives. components: + - type: Item + size: Large - type: Sprite sprite: Objects/Weapons/Guns/Battery/pulse_carbine.rsi layers: @@ -321,6 +339,10 @@ id: WeaponPulseRifle description: A weapon that is almost as infamous as its users. components: + - type: Item + size: Huge + shape: + - 0,0,4,1 - type: Sprite sprite: Objects/Weapons/Guns/Battery/pulse_rifle.rsi layers: @@ -353,6 +375,10 @@ id: WeaponLaserCannon description: A heavy duty, high powered laser weapon. components: + - type: Item + size: Huge + shape: + - 0,0,4,1 - type: Sprite sprite: Objects/Weapons/Guns/Battery/laser_cannon.rsi layers: @@ -416,6 +442,10 @@ id: WeaponXrayCannon description: An experimental weapon that uses concentrated x-ray energy against its target. components: + - type: Item + size: Huge + shape: + - 0,0,4,1 - type: Sprite sprite: Objects/Weapons/Guns/Battery/xray.rsi layers: @@ -452,6 +482,8 @@ - state: mag-unshaded-0 map: ["enum.GunVisualLayers.MagUnshaded"] shader: unshaded + - type: Item + storedOffset: -1,-5 - type: Clothing sprite: Objects/Weapons/Guns/Battery/practice_disabler.rsi quickEquip: false @@ -513,6 +545,8 @@ components: - type: Item size: Large + shape: + - 0,0,2,1 - type: Tag tags: - Taser @@ -602,6 +636,10 @@ id: WeaponAntiqueLaser description: This is an antique laser pistol. All craftsmanship is of the highest quality. It is decorated with a mahogany grip and chrome filigree. The object menaces with spikes of energy. On the item is an image of a captain and a clown. The clown is dead. The captain is striking a heroic pose. components: + - type: Item + size: Normal + shape: + - 0,0,1,1 - type: Sprite sprite: Objects/Weapons/Guns/Battery/antiquelasergun.rsi layers: @@ -647,7 +685,9 @@ description: An experimental high-energy laser pistol with a self-charging nuclear battery. components: - type: Item - size: Normal # Intentionally larger than other pistols + size: Normal + shape: + - 0,0,1,1 - type: Sprite sprite: Objects/Weapons/Guns/Battery/advancedlasergun.rsi layers: @@ -690,6 +730,8 @@ visible: false map: ["enum.GunVisualLayers.MagUnshaded"] shader: unshaded + - type: Item + storedOffset: 0,-6 - type: Appearance - type: MagazineVisuals magState: mag @@ -802,8 +844,6 @@ fireCost: 120 - type: Item size: Large - shape: - - 0,0,3,1 sprite: Objects/Weapons/Guns/Battery/inhands_64x.rsi heldPrefix: energy - type: Tag diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Bow/bow.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Bow/bow.yml index 13a52a6c14..edb3d40803 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Bow/bow.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Bow/bow.yml @@ -49,6 +49,7 @@ - type: entity id: BowImprovised parent: BaseBow + name: improvised shortbow components: - type: Sprite layers: diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Launchers/launchers.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Launchers/launchers.yml index 261cd87fd9..fcbffc6be6 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Launchers/launchers.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Launchers/launchers.yml @@ -12,7 +12,7 @@ slots: - Back - type: Item - size: Huge + size: Ginormous - type: StaticPrice price: 500 - type: ContainerContainer @@ -36,6 +36,10 @@ slots: - Back - suitStorage + - type: Item + size: Huge + shape: + - 0,0,4,2 - type: AmmoCounter - type: Gun fireRate: 1 @@ -72,6 +76,8 @@ slots: - Back - suitStorage + - type: Item + size: Huge - type: AmmoCounter - type: Gun fireRate: 1 @@ -206,7 +212,7 @@ description: Manipulates gravity around objects to fling them at high velocities. components: - type: Item - storedRotation: -90 + size: Normal - type: TetherGun frequency: 5 dampingRatio: 4 @@ -248,7 +254,7 @@ description: Manipulates gravity around objects to fling them at high velocities. components: - type: Item - storedRotation: -90 + size: Normal - type: ForceGun frequency: 15 dampingRatio: 4 @@ -292,6 +298,12 @@ parent: BaseItem id: WeaponGrapplingGun components: + - type: Item + size: Small + shape: + - 0,0,1,0 + - 0,1,0,1 + storedOffset: 0,-6 - type: AmmoCounter - type: GrapplingGun - type: Gun @@ -327,6 +339,8 @@ suffix: Admeme description: Manipulates gravity around objects to fling them at high velocities. components: + - type: Item + size: Normal - type: TetherGun canTetherAlive: true canUnanchor: true @@ -366,6 +380,8 @@ suffix: Admeme description: Manipulates gravity around objects to fling them at high velocities. components: + - type: Item + size: Normal - type: ForceGun canTetherAlive: true canUnanchor: true diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Pistols/pistols.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Pistols/pistols.yml index ed87a4edcb..eaa58562f1 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Pistols/pistols.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Pistols/pistols.yml @@ -16,6 +16,7 @@ shape: - 0,0,1,0 - 0,1,0,1 + storedOffset: 0,-4 - type: Tag tags: - Sidearm @@ -204,6 +205,8 @@ map: ["enum.GunVisualLayers.Mag"] - type: Clothing sprite: Objects/Weapons/Guns/Pistols/mk58.rsi + - type: Item + storedOffset: 0,-2 - type: Gun fireRate: 5 availableModes: diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Revolvers/revolvers.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Revolvers/revolvers.yml index 1cc54cc548..03032870ca 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Revolvers/revolvers.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Revolvers/revolvers.yml @@ -12,6 +12,7 @@ shape: - 0,0,1,0 - 0,1,0,1 + storedOffset: 0,-6 - type: Tag tags: - Sidearm @@ -88,6 +89,8 @@ sprite: Objects/Weapons/Guns/Revolvers/inspector.rsi - type: Clothing sprite: Objects/Weapons/Guns/Revolvers/inspector.rsi + - type: Item + storedOffset: 0,-2 - type: RevolverAmmoProvider capacity: 6 chambers: [ True, True, True, True, True, True ] @@ -103,6 +106,8 @@ sprite: Objects/Weapons/Guns/Revolvers/mateba.rsi - type: Clothing sprite: Objects/Weapons/Guns/Revolvers/mateba.rsi + - type: Item + storedOffset: 0,-3 - type: Gun fireRate: 3 soundGunshot: @@ -126,6 +131,8 @@ sprite: Objects/Weapons/Guns/Revolvers/python.rsi - type: Clothing sprite: Objects/Weapons/Guns/Revolvers/python.rsi + - type: Item + storedOffset: 0,-2 - type: Gun selectedMode: SemiAuto fireRate: 2 @@ -161,6 +168,8 @@ sprite: Objects/Weapons/Guns/Revolvers/pirate_revolver.rsi - type: Clothing sprite: Objects/Weapons/Guns/Revolvers/pirate_revolver.rsi + - type: Item + storedOffset: 1,-5 - type: Gun fireRate: 1 - type: ContainerContainer diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml index 82955fdc9c..99fb4edce7 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Rifles/rifles.yml @@ -8,6 +8,8 @@ - type: Sprite - type: Item size: Huge + shape: + - 0,0,3,2 - type: Clothing sprite: Objects/Weapons/Guns/Rifles/ak.rsi quickEquip: false @@ -204,6 +206,9 @@ map: ["enum.GunVisualLayers.Base"] - state: mag-0 map: ["enum.GunVisualLayers.Mag"] + - type: Item + shape: + - 0,0,4,2 - type: Clothing sprite: Objects/Weapons/Guns/Rifles/estoc.rsi - type: Gun @@ -268,6 +273,8 @@ sprite: Objects/Fun/Foam/foam_rifle.rsi - type: Item sprite: Objects/Fun/Foam/foam_rifle_inhand_64x.rsi + shape: + - 0,0,3,0 - type: BallisticAmmoProvider whitelist: tags: diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml index 7c9332891b..f069b4a918 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml @@ -8,6 +8,8 @@ - type: Sprite - type: Item size: Large + shape: + - 0,0,2,1 - type: Clothing sprite: Objects/Weapons/Guns/SMGs/atreides.rsi quickEquip: false diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Shotguns/shotguns.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Shotguns/shotguns.yml index 8a770506fb..0a23a51a4f 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Shotguns/shotguns.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Shotguns/shotguns.yml @@ -10,8 +10,9 @@ - state: icon map: [ "enum.GunVisualLayers.Base" ] - type: Item - # If you update this also update the bulldog's size. size: Large + shape: + - 0,0,4,0 - type: Clothing sprite: Objects/Weapons/Guns/Shotguns/db_shotgun.rsi quickEquip: false @@ -110,9 +111,6 @@ - type: Sprite sprite: Objects/Weapons/Guns/Shotguns/db_shotgun.rsi - type: Item - size: Normal - shape: - - 0,0,4,0 sprite: Objects/Weapons/Guns/Shotguns/db_shotgun_inhands_64x.rsi - type: GunRequiresWield #remove when inaccuracy on spreads is fixed - type: Gun @@ -166,9 +164,6 @@ description: An old yet faithful design, and a favorite among irregular forces of many worlds. Uses .50 shotgun shells. components: # intend for Kammerer to have tighter choke for slower fire rate and/or manual cycling - type: Item - size: Normal - shape: - - 0,0,4,0 sprite: Objects/Weapons/Guns/Shotguns/pump_inhands_64x.rsi - type: Sprite sprite: Objects/Weapons/Guns/Shotguns/pump.rsi @@ -195,6 +190,8 @@ sprite: Objects/Weapons/Guns/Shotguns/sawn.rsi - type: Item size: Small + shape: + - 0,0,2,0 sprite: Objects/Weapons/Guns/Shotguns/sawn_inhands_64x.rsi - type: Gun fireRate: 3 @@ -229,7 +226,10 @@ components: - type: Item size: Small - storedRotation: 90 + shape: + - 0,0,1,0 + - 0,1,0,1 + storedOffset: 0,-5 - type: Sprite sprite: Objects/Weapons/Guns/Shotguns/hm_pistol.rsi - type: Clothing @@ -252,10 +252,6 @@ suffix: Pirate description: Deadly at close range. components: - - type: Item - size: Normal - shape: - - 0,0,4,0 - type: Sprite sprite: Objects/Weapons/Guns/Shotguns/blunderbuss.rsi - type: GunRequiresWield #remove when inaccuracy on spreads is fixed @@ -277,9 +273,6 @@ - type: Clothing sprite: Objects/Weapons/Guns/Shotguns/improvised_shotgun.rsi - type: Item - size: Normal - shape: - - 0,0,4,0 sprite: Objects/Weapons/Guns/Shotguns/improvised_shotgun_inhands_64x.rsi - type: GunRequiresWield #remove when inaccuracy on spreads is fixed - type: Gun diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Snipers/snipers.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Snipers/snipers.yml index 655f866f77..13bac56bcd 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Snipers/snipers.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Snipers/snipers.yml @@ -10,7 +10,7 @@ - state: base map: ["enum.GunVisualLayers.Base"] - type: Item - size: Huge + size: Large - type: Clothing sprite: Objects/Weapons/Guns/Snipers/bolt_gun_wood.rsi quickEquip: false @@ -95,6 +95,10 @@ id: WeaponSniperHristov description: For when you absolutely, positively need to make someone regret their life choices from a safe distance. Uses .60 anti-materiel ammo. components: + - type: Item + size: Huge + shape: + - 0,0,5,1 - type: Sprite sprite: Objects/Weapons/Guns/Snipers/heavy_sniper.rsi - type: Clothing @@ -176,7 +180,7 @@ shape: - 0,0,1,0 - 0,1,0,1 - storedRotation: 0 + storedOffset: 0,-5 - type: Sprite sprite: Objects/Weapons/Guns/Snipers/flintlock.rsi - type: Clothing diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/flare_gun.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/flare_gun.yml index 224697bc93..6c0df2cd76 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/flare_gun.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/flare_gun.yml @@ -11,6 +11,9 @@ map: ["enum.GunVisualLayers.Base"] - type: Item size: Small + shape: + - 0,0,1,0 + - 0,1,0,1 sprite: Objects/Weapons/Guns/Shotguns/flaregun.rsi - type: ItemSlots slots: diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/pneumatic_cannon.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/pneumatic_cannon.yml index cadc0f478a..ec7e4b3e7f 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/pneumatic_cannon.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/pneumatic_cannon.yml @@ -93,7 +93,7 @@ - type: ContainerAmmoProvider container: storagebase - type: Item - size: Normal + size: Large - type: Clothing sprite: Objects/Weapons/Guns/Cannons/pie_cannon.rsi quickEquip: false @@ -137,7 +137,7 @@ - type: AmmoCounter - type: Item size: Normal - + - type: entity name: syringe gun parent: BaseStorageItem @@ -169,7 +169,9 @@ - type: ContainerAmmoProvider container: storagebase - type: Item - size: Normal + size: Large + shape: + - 0,0,2,1 - type: ContainerContainer containers: storagebase: !type:Container -- 2.51.2