From 66f465c96bebcd9b1def0809409c7af3c9ed522f Mon Sep 17 00:00:00 2001 From: Tryded <139474617+Tryded@users.noreply.github.com> Date: Sun, 26 May 2024 10:10:11 -0500 Subject: [PATCH 1/4] Craftable muskets + Flintlocks (#1008) * Musket + parts * Graphs for Musket and Parts * Recipes for Musket + Sprites * Fix 1 * Fix two * Flintlock * Fixes * Fix 3.0 * null is nulled * forgor graph * fireRate isn't all lowercase.. * actually make ammo craftable * Craftable Flintlock Fix * Update improvised.yml * Update musket.yml * I gib up * Make firerate 1 shot every 8 seconds and it doesn't reset when you switch hands. * why. * Forgor * forgor * Update Resources/Textures/DeltaV/Objects/Misc/bayonet.rsi/meta.json Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com> Signed-off-by: Tryded <139474617+Tryded@users.noreply.github.com> --------- Signed-off-by: Tryded <139474617+Tryded@users.noreply.github.com> Co-authored-by: Colin-Tel <113523727+Colin-Tel@users.noreply.github.com> --- .../Objects/Misc/improvised_gun_parts.yml | 56 +++++++++++++ .../Guns/Ammunition/Cartridges/musket.yml | 19 +++++ .../Guns/Ammunition/Projectiles/musket.yml | 10 +++ .../Objects/Weapons/Guns/Pistols/pistols.yml | 24 ++++++ .../Objects/Weapons/Guns/Rifles/rifles.yml | 28 +++++++ .../Crafting/Graphs/improvised/bayonet.yml | 14 ++++ .../Graphs/improvised/modular_breech.yml | 14 ++++ .../Graphs/improvised/modular_trigger.yml | 14 ++++ .../Crafting/Graphs/improvised/musket.yml | 77 ++++++++++++++++++ .../Graphs/improvised/musket_cartridge.yml | 20 +++++ .../DeltaV/Recipes/Crafting/improvised.yml | 77 ++++++++++++++++++ Resources/Prototypes/DeltaV/tags.yml | 12 +++ .../DeltaV/Objects/Misc/bayonet.rsi/base.png | Bin 0 -> 216 bytes .../Objects/Misc/bayonet.rsi/inhand-left.png | Bin 0 -> 269 bytes .../Objects/Misc/bayonet.rsi/inhand-right.png | Bin 0 -> 273 bytes .../DeltaV/Objects/Misc/bayonet.rsi/meta.json | 22 +++++ .../Objects/Misc/modular_breech.rsi/base.png | Bin 0 -> 262 bytes .../Misc/modular_breech.rsi/inhand-left.png | Bin 0 -> 313 bytes .../Misc/modular_breech.rsi/inhand-right.png | Bin 0 -> 278 bytes .../Objects/Misc/modular_breech.rsi/meta.json | 22 +++++ .../Objects/Misc/modular_trigger.rsi/base.png | Bin 0 -> 164 bytes .../Misc/modular_trigger.rsi/meta.json | 14 ++++ .../Casings/musket_casing.rsi/base.png | Bin 0 -> 185 bytes .../Casings/musket_casing.rsi/meta.json | 14 ++++ 24 files changed, 437 insertions(+) create mode 100644 Resources/Prototypes/DeltaV/Entities/Objects/Misc/improvised_gun_parts.yml create mode 100644 Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/musket.yml create mode 100644 Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/musket.yml create mode 100644 Resources/Prototypes/DeltaV/Recipes/Crafting/Graphs/improvised/bayonet.yml create mode 100644 Resources/Prototypes/DeltaV/Recipes/Crafting/Graphs/improvised/modular_breech.yml create mode 100644 Resources/Prototypes/DeltaV/Recipes/Crafting/Graphs/improvised/modular_trigger.yml create mode 100644 Resources/Prototypes/DeltaV/Recipes/Crafting/Graphs/improvised/musket.yml create mode 100644 Resources/Prototypes/DeltaV/Recipes/Crafting/Graphs/improvised/musket_cartridge.yml create mode 100644 Resources/Prototypes/DeltaV/Recipes/Crafting/improvised.yml create mode 100644 Resources/Textures/DeltaV/Objects/Misc/bayonet.rsi/base.png create mode 100644 Resources/Textures/DeltaV/Objects/Misc/bayonet.rsi/inhand-left.png create mode 100644 Resources/Textures/DeltaV/Objects/Misc/bayonet.rsi/inhand-right.png create mode 100644 Resources/Textures/DeltaV/Objects/Misc/bayonet.rsi/meta.json create mode 100644 Resources/Textures/DeltaV/Objects/Misc/modular_breech.rsi/base.png create mode 100644 Resources/Textures/DeltaV/Objects/Misc/modular_breech.rsi/inhand-left.png create mode 100644 Resources/Textures/DeltaV/Objects/Misc/modular_breech.rsi/inhand-right.png create mode 100644 Resources/Textures/DeltaV/Objects/Misc/modular_breech.rsi/meta.json create mode 100644 Resources/Textures/DeltaV/Objects/Misc/modular_trigger.rsi/base.png create mode 100644 Resources/Textures/DeltaV/Objects/Misc/modular_trigger.rsi/meta.json create mode 100644 Resources/Textures/DeltaV/Objects/Weapons/Guns/Ammunition/Casings/musket_casing.rsi/base.png create mode 100644 Resources/Textures/DeltaV/Objects/Weapons/Guns/Ammunition/Casings/musket_casing.rsi/meta.json diff --git a/Resources/Prototypes/DeltaV/Entities/Objects/Misc/improvised_gun_parts.yml b/Resources/Prototypes/DeltaV/Entities/Objects/Misc/improvised_gun_parts.yml new file mode 100644 index 00000000000..a092f5839d7 --- /dev/null +++ b/Resources/Prototypes/DeltaV/Entities/Objects/Misc/improvised_gun_parts.yml @@ -0,0 +1,56 @@ +- type: entity + parent: BaseItem + id: ModularBreech + name: modular breech + description: Loads the projectile and propellent into the chamber of the gun. Used in the creation of flintlock muskets. + components: + - type: Item + size: Small + - type: Sprite + sprite: DeltaV/Objects/Misc/modular_breech.rsi + state: base + - type: Construction + graph: ModularBreechGraph + node: modularbreech + - type: Tag + tags: + - Metal + - ModularBreech + +- type: entity + parent: BaseItem + id: ModularTrigger + name: modular trigger + description: Makes gun go pew when activated. Used in the creation of guns. + components: + - type: Item + size: Small + - type: Sprite + sprite: DeltaV/Objects/Misc/modular_trigger.rsi + state: base + - type: Construction + graph: ModularTriggerGraph + node: modulartrigger + - type: Tag + tags: + - Metal + - ModularTrigger + +- type: entity + parent: BaseItem + id: Bayonet + name: bayonet + description: Often placed on guns to go stabby stabby. + components: + - type: Item + size: Small + - type: Sprite + sprite: DeltaV/Objects/Misc/bayonet.rsi + state: base + - type: Construction + graph: BayonetGraph + node: bayonet + - type: Tag + tags: + - Metal + - Bayonet \ No newline at end of file diff --git a/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/musket.yml b/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/musket.yml new file mode 100644 index 00000000000..c5b913515ab --- /dev/null +++ b/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/musket.yml @@ -0,0 +1,19 @@ +- type: entity + parent: BaseCartridge + id: CartridgeMusket + name: cartridge (musket) + description: A paper musket cartridge used to load a musket. + components: + - type: Tag + tags: + - Cartridge + - CartridgeMusket + - type: CartridgeAmmo + proto: BulletMusket + deleteOnSpawn: true + - type: Sprite + sprite: DeltaV/Objects/Weapons/Guns/Ammunition/Casings/musket_casing.rsi + state: base + - type: Construction + graph: CartridgeMusketGraph + node: musketcartridge \ No newline at end of file diff --git a/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/musket.yml b/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/musket.yml new file mode 100644 index 00000000000..4c44414b8ff --- /dev/null +++ b/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/musket.yml @@ -0,0 +1,10 @@ +- type: entity + id: BulletMusket + name: bullet (musket) + parent: BaseBullet + noSpawn: true + components: + - type: Projectile + damage: + types: + Piercing: 30 #4 shot kill for a musket \ No newline at end of file diff --git a/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/Pistols/pistols.yml b/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/Pistols/pistols.yml index 405c321316c..5ab7aa8b6ec 100644 --- a/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/Pistols/pistols.yml +++ b/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/Pistols/pistols.yml @@ -147,3 +147,27 @@ containers: gun_magazine: !type:ContainerSlot gun_chamber: !type:ContainerSlot + +- type: entity + name: flintlock + suffix: "craftable" + parent: WeaponPistolFlintlock + id: WeaponPistolFlintlockCrafted + description: An old flintlock, feels like 1800s gang warfare. Uses musket cartridges. + components: + - type: BallisticAmmoProvider + whitelist: + tags: + - CartridgeMusket + capacity: 1 + proto: CartridgeMusket + - type: Gun #Smoothbore + minAngle: 0 + maxAngle: 30 + fireRate: .125 #slow firerate + resetOnHandSelected: false #Dual Wielding Muskets + - type: Construction + graph: WeaponPistolFlintlockCraftedGraph + node: flintlock + - type: UseDelay + delay: 0 #Straight up doesn't work for guns \ No newline at end of file diff --git a/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/Rifles/rifles.yml b/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/Rifles/rifles.yml index 5dba7d27f1e..5c461cf65c9 100644 --- a/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/Rifles/rifles.yml +++ b/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/Rifles/rifles.yml @@ -173,3 +173,31 @@ sprite: DeltaV/Objects/Weapons/Guns/Rifles/carbinenogl.rsi - type: Clothing sprite: DeltaV/Objects/Weapons/Guns/Rifles/carbinenogl.rsi + +- type: entity + name: musket + id: WeaponRifleMusket + parent: Musket + suffix: "craftable" + description: An old flintlock musket. Uses musket cartridges. + components: + - type: BallisticAmmoProvider + whitelist: + tags: + - CartridgeMusket + capacity: 1 + proto: CartridgeMusket + - type: Gun #Smoothbore + fireRate: .125 + resetOnHandSelected: false + minAngle: 20 + maxAngle: 43 + - type: Wieldable + - type: GunWieldBonus + minAngle: -20 + maxAngle: -40 + - type: Construction + graph: WeaponRifleMusketGraph + node: musket + - type: UseDelay + delay: 0 #Straight up doesn't work for guns \ No newline at end of file diff --git a/Resources/Prototypes/DeltaV/Recipes/Crafting/Graphs/improvised/bayonet.yml b/Resources/Prototypes/DeltaV/Recipes/Crafting/Graphs/improvised/bayonet.yml new file mode 100644 index 00000000000..f40872844f0 --- /dev/null +++ b/Resources/Prototypes/DeltaV/Recipes/Crafting/Graphs/improvised/bayonet.yml @@ -0,0 +1,14 @@ +#In its own file and not musket.yml in case anyone ever wants to add more guns that use it. +- type: constructionGraph + id: BayonetGraph + start: start + graph: + - node: start + edges: + - to: bayonet + steps: + - material: Steel + amount: 1 + doAfter: 4 + - node: bayonet + entity: Bayonet \ No newline at end of file diff --git a/Resources/Prototypes/DeltaV/Recipes/Crafting/Graphs/improvised/modular_breech.yml b/Resources/Prototypes/DeltaV/Recipes/Crafting/Graphs/improvised/modular_breech.yml new file mode 100644 index 00000000000..8131a08783d --- /dev/null +++ b/Resources/Prototypes/DeltaV/Recipes/Crafting/Graphs/improvised/modular_breech.yml @@ -0,0 +1,14 @@ +#In its own file and not musket.yml in case anyone ever wants to add more guns that use it. +- type: constructionGraph + id: ModularBreechGraph + start: start + graph: + - node: start + edges: + - to: modularbreech + steps: + - material: Steel + amount: 3 + doAfter: 8 + - node: modularbreech + entity: ModularBreech \ No newline at end of file diff --git a/Resources/Prototypes/DeltaV/Recipes/Crafting/Graphs/improvised/modular_trigger.yml b/Resources/Prototypes/DeltaV/Recipes/Crafting/Graphs/improvised/modular_trigger.yml new file mode 100644 index 00000000000..e87fd9a7d98 --- /dev/null +++ b/Resources/Prototypes/DeltaV/Recipes/Crafting/Graphs/improvised/modular_trigger.yml @@ -0,0 +1,14 @@ +#In its own file and not musket.yml in case anyone ever wants to add more guns that use it. +- type: constructionGraph + id: ModularTriggerGraph + start: start + graph: + - node: start + edges: + - to: modulartrigger + steps: + - material: Steel + amount: 2 + doAfter: 4 + - node: modulartrigger + entity: ModularTrigger \ No newline at end of file diff --git a/Resources/Prototypes/DeltaV/Recipes/Crafting/Graphs/improvised/musket.yml b/Resources/Prototypes/DeltaV/Recipes/Crafting/Graphs/improvised/musket.yml new file mode 100644 index 00000000000..09f47eb2363 --- /dev/null +++ b/Resources/Prototypes/DeltaV/Recipes/Crafting/Graphs/improvised/musket.yml @@ -0,0 +1,77 @@ +- type: constructionGraph + id: WeaponRifleMusketGraph + start: start + graph: + - node: start + edges: + - to: musket + steps: + - tag: Pipe + icon: + sprite: Structures/Piping/Atmospherics/pipe.rsi + state: pipeStraight + name: pipe + - tag: ModularBreech + icon: + sprite: DeltaV/Objects/Misc/modular_breech.rsi + state: base + name: modular breech + - tag: ModularTrigger + icon: + sprite: DeltaV/Objects/Misc/modular_trigger.rsi + state: base + name: modular trigger + - tag: RifleStock + icon: + sprite: Objects/Misc/rifle_stock.rsi + state: icon + name: rifle stock + - tag: Bayonet + icon: + sprite: DeltaV/Objects/Misc/bayonet.rsi + state: base + name: bayonet + - material: WoodPlank + amount: 3 + doAfter: 10 + - node: musket + entity: WeaponRifleMusket + +- type: constructionGraph + id: WeaponPistolFlintlockCraftedGraph + start: start + graph: + - node: start + edges: + - to: flintlock + steps: + - tag: GasPipeHalf + icon: + sprite: Structures/Piping/Atmospherics/pipe.rsi + state: pipeHalf + name: half pipe + - tag: ModularBreech + icon: + sprite: DeltaV/Objects/Misc/modular_breech.rsi + state: base + name: modular breech + - tag: ModularTrigger + icon: + sprite: DeltaV/Objects/Misc/modular_trigger.rsi + state: base + name: modular trigger + - tag: RifleStock + icon: + sprite: Objects/Misc/rifle_stock.rsi + state: icon + name: rifle stock + - tag: Bayonet + icon: + sprite: DeltaV/Objects/Misc/bayonet.rsi + state: base + name: bayonet + - material: WoodPlank + amount: 2 + doAfter: 10 + - node: flintlock + entity: WeaponPistolFlintlockCrafted \ No newline at end of file diff --git a/Resources/Prototypes/DeltaV/Recipes/Crafting/Graphs/improvised/musket_cartridge.yml b/Resources/Prototypes/DeltaV/Recipes/Crafting/Graphs/improvised/musket_cartridge.yml new file mode 100644 index 00000000000..1043b244d5e --- /dev/null +++ b/Resources/Prototypes/DeltaV/Recipes/Crafting/Graphs/improvised/musket_cartridge.yml @@ -0,0 +1,20 @@ +- type: constructionGraph + id: CartridgeMusketGraph + start: start + graph: + - node: start + edges: + - to: musketcartridge + steps: + - tag: Paper + icon: + sprite: Objects/Misc/bureaucracy.rsi + state: paper + name: paper + - material: Gunpowder + amount: 1 + - material: Steel + amount: 1 + doAfter: 1 + - node: musketcartridge + entity: CartridgeMusket \ No newline at end of file diff --git a/Resources/Prototypes/DeltaV/Recipes/Crafting/improvised.yml b/Resources/Prototypes/DeltaV/Recipes/Crafting/improvised.yml new file mode 100644 index 00000000000..759c1a382ad --- /dev/null +++ b/Resources/Prototypes/DeltaV/Recipes/Crafting/improvised.yml @@ -0,0 +1,77 @@ +- type: construction + name: musket + id: WeaponRifleMusket + graph: WeaponRifleMusketGraph + startNode: start + targetNode: musket + category: construction-category-weapons + objectType: Item + description: An old flintlock musket. Uses musket cartidges. + icon: + sprite: Objects/Weapons/Guns/Snipers/musket.rsi + state: base + +- type: construction + name: modular breech + id: ModularBreech + graph: ModularBreechGraph + startNode: start + targetNode: modularbreech + category: construction-category-weapons + objectType: Item + description: Loads the projectile and propellent into the chamber of the gun. Used in the creation of flintlock muskets. + icon: + sprite: DeltaV/Objects/Misc/modular_breech.rsi + state: base + +- type: construction + name: modular trigger + id: ModularTrigger + graph: ModularTriggerGraph + startNode: start + targetNode: modulartrigger + category: construction-category-weapons + objectType: Item + description: Makes gun go pew when activated. Used in the creation of guns. + icon: + sprite: DeltaV/Objects/Misc/modular_trigger.rsi + state: base + +- type: construction + name: bayonet + id: Bayonet + graph: BayonetGraph + startNode: start + targetNode: bayonet + category: construction-category-weapons + objectType: Item + description: Often placed on guns to go stabby stabby. + icon: + sprite: DeltaV/Objects/Misc/bayonet.rsi + state: base + +- type: construction + name: cartridge (musket) + id: CartridgeMusket + graph: CartridgeMusketGraph + startNode: start + targetNode: musketcartridge + category: construction-category-weapons + objectType: Item + description: A paper musket cartridge used to load a musket. + icon: + sprite: DeltaV/Objects/Weapons/Guns/Ammunition/Casings/musket_casing.rsi + state: base + +- type: construction + name: flintlock + id: WeaponPistolFlintlockCrafted + graph: WeaponPistolFlintlockCraftedGraph + startNode: start + targetNode: flintlock + category: construction-category-weapons + objectType: Item + description: An old flintlock, feels like 1800s gang warfare. Uses musket cartidges. + icon: + sprite: Objects/Weapons/Guns/Snipers/musket.rsi + state: base diff --git a/Resources/Prototypes/DeltaV/tags.yml b/Resources/Prototypes/DeltaV/tags.yml index 36ea3e56a4e..b24f253660b 100644 --- a/Resources/Prototypes/DeltaV/tags.yml +++ b/Resources/Prototypes/DeltaV/tags.yml @@ -1,5 +1,8 @@ ## This is for Nyano and Delta V tags +- type: Tag + id: Bayonet #Craftable Musket + - type: Tag id: BeltSlotNotBelt #not a 'belt' @@ -8,6 +11,9 @@ - type: Tag id: CartridgeSpecial # For the .38 special ammo and revolver + +- type: Tag + id: CartridgeMusket #For the Craftable Musket - type: Tag id: Directional @@ -29,6 +35,12 @@ - type: Tag id: MagazinePistolSpecial # For the .38 special ammo and pistol + +- type: Tag + id: ModularBreech #Craftable Musket + +- type: Tag + id: ModularTrigger #Craftable Musket - type: Tag id: SecDogWearable # allows Laika to wear meson goggles (and more later?) diff --git a/Resources/Textures/DeltaV/Objects/Misc/bayonet.rsi/base.png b/Resources/Textures/DeltaV/Objects/Misc/bayonet.rsi/base.png new file mode 100644 index 0000000000000000000000000000000000000000..5c946db59ee70b3cdca1eb3bfc0a5f91ad6194a0 GIT binary patch literal 216 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=DjSL74G){)!Z!V6LZ&V@QPi+Y64o2NZZ(A8z+_VBnk3z!tNB zNp)+meZ-AREQ}Z4ZQ1ia$nUSGql?RaC8hIKdAqOkNGHo2KdUaEv3BR9XHl2WK3XdB zWX{EE`+MTM9M+nOn7`wWuvyw-sUC85uX;&i#+;6h4u%J;Wp>h{AO1Q<0WD_mboFyt I=akR{0QcTX@c;k- literal 0 HcmV?d00001 diff --git a/Resources/Textures/DeltaV/Objects/Misc/bayonet.rsi/inhand-left.png b/Resources/Textures/DeltaV/Objects/Misc/bayonet.rsi/inhand-left.png new file mode 100644 index 0000000000000000000000000000000000000000..2ad59899510a902d433182673cca49142745fa67 GIT binary patch literal 269 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1quc!9|`fjv*CsZ*OhnY;h1^y|7dJpq-AR&cU`E zzcSaLOOpia8x;MuQX}73DV^0>gTe~ HDWM4fq?KWV literal 0 HcmV?d00001 diff --git a/Resources/Textures/DeltaV/Objects/Misc/bayonet.rsi/inhand-right.png b/Resources/Textures/DeltaV/Objects/Misc/bayonet.rsi/inhand-right.png new file mode 100644 index 0000000000000000000000000000000000000000..f53b1a561f20d3f55ea1e4b9ae97d9aff3187369 GIT binary patch literal 273 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1quc!DXHsik#|NW@Ro%ggR zTjqGKMB8n>daY^aE%Q^?`0c4*vc0E0?{{eOPmlMTbTVfx+jeQUxMrWp6hWXVK#&n) zTJQTm^ooV9M@;LYV^_PS?r$?(_d-2fVUeU@?!Jx%y^IVFx!lvI6;>1s;*b3=DjSL74G){)!Z!;A~G9$B+p3WC_;A2_ijBfd*V{tQRg{{mq{` ziD$+FlbZ}FI~y4In>TGTitJl(g3;i#s>%|HB}H2jv*CsZ*T4AYcdcx{&97G!k@_&4cgqw z`VSPE_pR9VODJd4hAt^L**SBv&Rsd`t0{Qs`{pg0zNcdI{%`^fU|{&0eCJi@B$YBb zwjv$>NvV;_`9F*bR+|^f+4e`AOd{clE@*UiEs5E+5^WDSSr^Y$}BKZj{CbU?H==h$`|NORDYOeTJ&k9zY|Eer>mdKI;Vst07$oZtpET3 literal 0 HcmV?d00001 diff --git a/Resources/Textures/DeltaV/Objects/Misc/modular_breech.rsi/inhand-right.png b/Resources/Textures/DeltaV/Objects/Misc/modular_breech.rsi/inhand-right.png new file mode 100644 index 0000000000000000000000000000000000000000..c297980f0a61f21b2835c0a727c992910a37f732 GIT binary patch literal 278 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1quc!PTBFjv*CsZ*M8`9dZz0y};VPfJunu#jI0t z42i{16m5Ew_BmoXYU(wc(K(T}hkz zKLoBid;FxW+_&6$&-35gzkc=Pi2v!lvI6;>1s;*b3=DjSL74G){)!Z!prxmaV@QPi+jARv85DS!9s3_GZ1`)==&IBs z!18PLoxMPf^USJdSD*TJQ`Ja9{nTU4L)RZMFw{6j{WRyg!81E;H_#9UPgg&ebxsLQ E08O1SYybcN literal 0 HcmV?d00001 diff --git a/Resources/Textures/DeltaV/Objects/Misc/modular_trigger.rsi/meta.json b/Resources/Textures/DeltaV/Objects/Misc/modular_trigger.rsi/meta.json new file mode 100644 index 00000000000..f186bc80a53 --- /dev/null +++ b/Resources/Textures/DeltaV/Objects/Misc/modular_trigger.rsi/meta.json @@ -0,0 +1,14 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Made by Pato Grone for SS14, edited by Tryded", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "base" + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/DeltaV/Objects/Weapons/Guns/Ammunition/Casings/musket_casing.rsi/base.png b/Resources/Textures/DeltaV/Objects/Weapons/Guns/Ammunition/Casings/musket_casing.rsi/base.png new file mode 100644 index 0000000000000000000000000000000000000000..0cb544ac8b87ab2d2766b5f80965c687f977fe08 GIT binary patch literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=DjSL74G){)!Z!pr5CUV@QO1vIOhm1d*PmKm#tfgAUAY8onkL zJNN&ypTfz`FTXcs!gS$ugYq1en>K1dnIB(%^0WQ>^HY6>9Fi^p79JjkKd+=Ur*j6E Q08M7_boFyt=akR{0L_>*`2YX_ literal 0 HcmV?d00001 diff --git a/Resources/Textures/DeltaV/Objects/Weapons/Guns/Ammunition/Casings/musket_casing.rsi/meta.json b/Resources/Textures/DeltaV/Objects/Weapons/Guns/Ammunition/Casings/musket_casing.rsi/meta.json new file mode 100644 index 00000000000..fee7e3a5ffb --- /dev/null +++ b/Resources/Textures/DeltaV/Objects/Weapons/Guns/Ammunition/Casings/musket_casing.rsi/meta.json @@ -0,0 +1,14 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Original work by Tryded", + "states": [ + { + "name": "base" + } + ] +} From b61653d21da2b61f286d3785c33cf94a8c1c75e3 Mon Sep 17 00:00:00 2001 From: Tryded <139474617+Tryded@users.noreply.github.com> Date: Sun, 26 May 2024 21:21:24 -0500 Subject: [PATCH 2/4] Fixes for craftable muskets (#1261) * Add wielded in hand sprite for musket * actually adding the sprites in YML * Add a missing tag --- .../Objects/Weapons/Guns/Rifles/rifles.yml | 5 ++- .../DeltaV/Recipes/Crafting/improvised.yml | 2 +- Resources/Prototypes/DeltaV/tags.yml | 3 ++ .../Weapons/Guns/Rifles/musket.rsi/base.png | Bin 0 -> 714 bytes .../Guns/Rifles/musket.rsi/inhand-left.png | Bin 0 -> 736 bytes .../Guns/Rifles/musket.rsi/inhand-right.png | Bin 0 -> 735 bytes .../Weapons/Guns/Rifles/musket.rsi/meta.json | 30 ++++++++++++++++++ .../Rifles/musket.rsi/wielded-inhand-left.png | Bin 0 -> 717 bytes .../musket.rsi/wielded-inhand-right.png | Bin 0 -> 747 bytes 9 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 Resources/Textures/DeltaV/Objects/Weapons/Guns/Rifles/musket.rsi/base.png create mode 100644 Resources/Textures/DeltaV/Objects/Weapons/Guns/Rifles/musket.rsi/inhand-left.png create mode 100644 Resources/Textures/DeltaV/Objects/Weapons/Guns/Rifles/musket.rsi/inhand-right.png create mode 100644 Resources/Textures/DeltaV/Objects/Weapons/Guns/Rifles/musket.rsi/meta.json create mode 100644 Resources/Textures/DeltaV/Objects/Weapons/Guns/Rifles/musket.rsi/wielded-inhand-left.png create mode 100644 Resources/Textures/DeltaV/Objects/Weapons/Guns/Rifles/musket.rsi/wielded-inhand-right.png diff --git a/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/Rifles/rifles.yml b/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/Rifles/rifles.yml index 5c461cf65c9..0549b27b97d 100644 --- a/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/Rifles/rifles.yml +++ b/Resources/Prototypes/DeltaV/Entities/Objects/Weapons/Guns/Rifles/rifles.yml @@ -187,10 +187,13 @@ - CartridgeMusket capacity: 1 proto: CartridgeMusket + - type: Sprite + sprite: DeltaV/Objects/Weapons/Guns/Rifles/musket.rsi + state: base - type: Gun #Smoothbore fireRate: .125 resetOnHandSelected: false - minAngle: 20 + minAngle: 22 maxAngle: 43 - type: Wieldable - type: GunWieldBonus diff --git a/Resources/Prototypes/DeltaV/Recipes/Crafting/improvised.yml b/Resources/Prototypes/DeltaV/Recipes/Crafting/improvised.yml index 759c1a382ad..405db15ca0e 100644 --- a/Resources/Prototypes/DeltaV/Recipes/Crafting/improvised.yml +++ b/Resources/Prototypes/DeltaV/Recipes/Crafting/improvised.yml @@ -73,5 +73,5 @@ objectType: Item description: An old flintlock, feels like 1800s gang warfare. Uses musket cartidges. icon: - sprite: Objects/Weapons/Guns/Snipers/musket.rsi + sprite: Objects/Weapons/Guns/Snipers/flintlock.rsi state: base diff --git a/Resources/Prototypes/DeltaV/tags.yml b/Resources/Prototypes/DeltaV/tags.yml index b24f253660b..25e6a5b254f 100644 --- a/Resources/Prototypes/DeltaV/tags.yml +++ b/Resources/Prototypes/DeltaV/tags.yml @@ -27,6 +27,9 @@ - type: Tag id: GasPipeHalf #Craftable Musket +- type: Tag + id: GasPipeHalf #Craftable Musket + - type: Tag id: HandLabeler diff --git a/Resources/Textures/DeltaV/Objects/Weapons/Guns/Rifles/musket.rsi/base.png b/Resources/Textures/DeltaV/Objects/Weapons/Guns/Rifles/musket.rsi/base.png new file mode 100644 index 0000000000000000000000000000000000000000..94d8949dc77bc9d2c65df2d76e6ff5e0c5083847 GIT binary patch literal 714 zcmV;*0yX`KP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0!2wgK~z{r#g)%a z8c`I7k0K_vNGb7Or5S5LDAKVznwVO)E}F7w`v^P*Pr@_w9h#Jd3mZ*HV=IXPi2_*W!+sRzT))e%Q8XC@y91I=6n!I*HetLPOJRP2)qJ}&W@X>Mg zgr56;Yw|C}Q`@~{xd&AF!onhrk1;BpcgWNI0-GVn8>)KmOFUQLT6$p9Sj^)5K z0LbMRGOa{n?Bj>`Twbf48|0Pl1LfDwxHE%yZ#UWZA0=wFn-q(N4f1k%@G)zJJEx#o z+@Y6`JLI1Z(0=hiSlRVh8pGF57{wkjF2|NA%R(5K&FXT9tC6D&o#Lz2tv7a0iyq% w2Q87pYuKp(000hUSV?A0O#mtY000O800000007cclK=n!07*qoM6N<$g0Ay6X#fBK literal 0 HcmV?d00001 diff --git a/Resources/Textures/DeltaV/Objects/Weapons/Guns/Rifles/musket.rsi/inhand-left.png b/Resources/Textures/DeltaV/Objects/Weapons/Guns/Rifles/musket.rsi/inhand-left.png new file mode 100644 index 0000000000000000000000000000000000000000..1353d23daa35913ee21d70fd259947a450d71df9 GIT binary patch literal 736 zcmV<60w4W}P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0(D75K~#8N?V8PQ z(?Ar3uZw6^5JgxJ6e#@>5mHFW3W8XKJVG`+P9BLZFF+PZflZ@^NGMf*fY64@pt3-O zh0(D*D2+^FH*=>H&L>6A%-9~EJ9oyGeS{D~2qAg`6f4he2^ELeGeICbL0&w0RRXBL>vx+Ow*xKsf1>KWDMC{#vgR)d5~)Gq3@28l@|IY;8AQ=_&B;@dt(9v3>z8;}MZ`(UFKiN_SfRI`D4 zT2Au@q+#4YVADCGejCKXnARnd#JG6d&Jici0h0_8lSmS8+dQE@1;8|eL=r|k0@nXD zkbFL`^4Z*J0J47jci|jyG6m8YB$7Bw=ZG3f28l@+^8~UeuKItVbA%9OM1BDW6`1$* S2Y|`|0000Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0(414K~#8N?V4Xt z(@+@3-(kQIBhdx{C-NukW)8-U&Umrx19-6;Kh8dqpTb=jr&o(}i5cOK$Y7GH7&VTI zn&;RfWhKahKW4rO*`Mta|W$*YgOk=I2H#OJ5aWn=M|gR2bWS68xPe*K{;5BX-Z z8B1{|x)V^O=i6E9%gtpm?%tODgCl9T+phB;8g#ZjDvyhkAU{a4SX4zk>6xN^8jZ$~ z$E5)+kG5Z*vl3JJtH2^W%$&;ZSw=P=KXYA#|9iloJT|-}%LB|G9`Jz|{NQPSTcHHq zx~9@PQZn;OXoHC7R3S)JdUGz(GvY zlzP3Mnnfs=%a&mn>g!gkrH-9W=U)ft6TBdvX5gn??V*cJuv)EJl}aUb)d%o_7yRI9 z4_|=6TCL{$K01lO({&LDA%qY@2qAPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0%A!-K~#8N?b_dK z(@+!#@Dr2`8Dq3nNiwHCbX64H%VbY|7ZeLpb@&g6`1cI)KM*ZG$OJ`1rRvKbWD|dN zWmLzSvaM|XLN<`NbI2KK+NMc6`k>#>L+?#;bI-je=~E5?000000002Mj;mMluGjr1 zWV6|}`!V=OH(aY#xgp1?lW856elnSqHp~&*q_y?B^zYp-$eeqPH&HAWW6zz-<=hYN zKapjn;!P)mX;Q!zp_$my5G2U^M))ibLOm^D7{;d z_Q}&{R4$i8174W0lJhKuh_wsaJ`oTTU z+`eP%PRfZ`UjE`85j~uJ96O+G9hD8}VtGUUr`hQ#2FJ67%1000000000000000&}aRw7wBiawjT+35nL~z zwE{I~l}?>L>0NE~>cvZ%zJ5(=1bV3t2*yl|43V*K(7Q_H{@Ie_y^6;|Zyp^ryc!D(so#HoLY*jDt;BJAOje5(8 z{GYV7KEVGKIBHP?$BhzG=jNE5>JfNM>;x!(y+E8=f${VSSD#Ycst!#)$Bi13<7pE7 zZ=SvdT_>Oyx{z+mT6&>>0Tv|z00000|0$xslS4M!O$^IB00000NkvXXu0mjfDECQ^ literal 0 HcmV?d00001 diff --git a/Resources/Textures/DeltaV/Objects/Weapons/Guns/Rifles/musket.rsi/wielded-inhand-right.png b/Resources/Textures/DeltaV/Objects/Weapons/Guns/Rifles/musket.rsi/wielded-inhand-right.png new file mode 100644 index 0000000000000000000000000000000000000000..c123bcd237b3b0143dee24758a69d16cac896752 GIT binary patch literal 747 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0)ReS7yv+0~xoOLR02pfWLJ_r-V2dUzJAhN$l#D73GEkZ@X_kti+#`MWn zhPo{Y({}SW7BO;8b88Zk_D1PI`F>vRy-9P=y(j6@Jp=#%00000003QZ<#OI}yISJ@ z{%<7QR*PC#YA8u7rY+ansn_e$+SVEwMpF9ebVk}ccMGl9YF^tmWo%hBN*lveDwSfb zk0o~xIJFNO+RyoZn4iu%-x>|t*4r!N!qeBj`#ibZr8Bt!X&2Y~D7WL2^t~!ycFOgS zyAILPQdO?4uG$?JHZqcy7*kWHs8}quvi4sJE}EuYf1zHaLNfix*~Ei5(q1ARBjwEu4tuCI8 zvEwjaC$BM=8geGG{qEJK$16YEub&gZ4@P}P|0>=O?@PTz000000000000000fG*n1 zGk>NV?~e{3y*Lop3(Vb~r#-2?baeb6CARjtcbm9QK-CCveSo(%ATDpbv*%{$>*o#H z-rqc`SDuv@q`p8WX2*r7gHlyD5LGh}RWHD2^2d&kQ@Q*^#yT|uUVJ3a^QqW6@p#;m zoz{w}l>k)>z@lmf+SLoF8Ub$&K-dv^81Gp>&#e-|s%C>K@7{;b6Bd&N<91wxN`SX+ zKz#+gm|(?46s{5A+5o1zdBzDiy>E;3`EBdQW2!D8swRPToXq Date: Thu, 14 Mar 2024 05:27:08 +0100 Subject: [PATCH 3/4] Pipebombs and IED rework (#25705) * inital * 2-9 * add crafting function, rename ied to fire bomb * add firebomb ignition * fikss * change damage values * add note * fix tests i think * ok * good * Review * warning --------- Co-authored-by: metalgearsloth (cherry picked from commit 3cb1c585c53f694f5ceb9720057bb765673970ec) --- .../ExplosionSystem.Processing.cs | 54 ++++++++++----- .../EntitySystems/ExplosionSystem.cs | 4 +- .../Explosion/ExplosionPrototype.cs | 6 ++ .../Locale/en-US/materials/materials.ftl | 1 + Resources/Migrations/migration.yml | 10 +++ .../Entities/Objects/Materials/materials.yml | 19 ++++++ .../Weapons/Bombs/{ied.yml => firebomb.yml} | 30 ++++----- .../Objects/Weapons/Bombs/pipebomb.yml | 62 ++++++++++++++++++ .../Reagents/Materials/materials.yml | 8 +++ .../improvised/{ied.yml => firebomb.yml} | 12 ++-- .../Crafting/Graphs/improvised/pipebomb.yml | 43 ++++++++++++ .../Recipes/Crafting/improvised.yml | 21 ++++-- .../Prototypes/Recipes/Reactions/fun.yml | 16 +++++ .../Prototypes/Stacks/Materials/materials.yml | 8 +++ Resources/Prototypes/explosion.yml | 16 +++++ .../Weapons/Bombs/pipebomb.rsi/base.png | Bin 0 -> 338 bytes .../Weapons/Bombs/pipebomb.rsi/icon.png | Bin 0 -> 350 bytes .../Weapons/Bombs/pipebomb.rsi/meta.json | 31 +++++++++ .../Weapons/Bombs/pipebomb.rsi/primed.png | Bin 0 -> 494 bytes .../Weapons/Bombs/pipebomb.rsi/wires.png | Bin 0 -> 163 bytes 20 files changed, 297 insertions(+), 44 deletions(-) rename Resources/Prototypes/Entities/Objects/Weapons/Bombs/{ied.yml => firebomb.yml} (83%) create mode 100644 Resources/Prototypes/Entities/Objects/Weapons/Bombs/pipebomb.yml rename Resources/Prototypes/Recipes/Crafting/Graphs/improvised/{ied.yml => firebomb.yml} (90%) create mode 100644 Resources/Prototypes/Recipes/Crafting/Graphs/improvised/pipebomb.yml create mode 100644 Resources/Textures/Objects/Weapons/Bombs/pipebomb.rsi/base.png create mode 100644 Resources/Textures/Objects/Weapons/Bombs/pipebomb.rsi/icon.png create mode 100644 Resources/Textures/Objects/Weapons/Bombs/pipebomb.rsi/meta.json create mode 100644 Resources/Textures/Objects/Weapons/Bombs/pipebomb.rsi/primed.png create mode 100644 Resources/Textures/Objects/Weapons/Bombs/pipebomb.rsi/wires.png diff --git a/Content.Server/Explosion/EntitySystems/ExplosionSystem.Processing.cs b/Content.Server/Explosion/EntitySystems/ExplosionSystem.Processing.cs index 19f33e3fdde..6fc6c57ba8c 100644 --- a/Content.Server/Explosion/EntitySystems/ExplosionSystem.Processing.cs +++ b/Content.Server/Explosion/EntitySystems/ExplosionSystem.Processing.cs @@ -17,11 +17,15 @@ using Robust.Shared.Timing; using Robust.Shared.Utility; using TimedDespawnComponent = Robust.Shared.Spawners.TimedDespawnComponent; +using Content.Server.Atmos.Components; +using Content.Server.Atmos.EntitySystems; namespace Content.Server.Explosion.EntitySystems; public sealed partial class ExplosionSystem { + [Dependency] private readonly FlammableSystem _flammableSystem = default!; + /// /// Used to limit explosion processing time. See . /// @@ -95,7 +99,7 @@ public override void Update(float frameTime) { // EXPLOSION TODO allow explosion spawning to be interrupted by time limit. In the meantime, ensure that // there is at-least 1ms of time left before creating a new explosion - if (MathF.Max(MaxProcessingTime - 1, 0.1f) < Stopwatch.Elapsed.TotalMilliseconds) + if (MathF.Max(MaxProcessingTime - 1, 0.1f) < Stopwatch.Elapsed.TotalMilliseconds) break; if (!_explosionQueue.TryDequeue(out var queued)) @@ -129,11 +133,11 @@ public override void Update(float frameTime) try { #endif - var processed = _activeExplosion.Process(tilesRemaining); - tilesRemaining -= processed; + var processed = _activeExplosion.Process(tilesRemaining); + tilesRemaining -= processed; - // has the explosion finished processing? - if (_activeExplosion.FinishedProcessing) + // has the explosion finished processing? + if (_activeExplosion.FinishedProcessing) { var comp = EnsureComp(_activeExplosion.VisualEnt); comp.Lifetime = _cfg.GetCVar(CCVars.ExplosionPersistence); @@ -202,7 +206,8 @@ internal bool ExplodeTile(BroadphaseComponent lookup, DamageSpecifier damage, MapCoordinates epicenter, HashSet processed, - string id) + string id, + float? fireStacks) { var size = grid.Comp.TileSize; var gridBox = new Box2(tile * size, (tile + 1) * size); @@ -221,7 +226,7 @@ internal bool ExplodeTile(BroadphaseComponent lookup, // process those entities foreach (var (uid, xform) in list) { - ProcessEntity(uid, epicenter, damage, throwForce, id, xform); + ProcessEntity(uid, epicenter, damage, throwForce, id, xform, fireStacks); } // process anchored entities @@ -231,7 +236,7 @@ internal bool ExplodeTile(BroadphaseComponent lookup, foreach (var entity in _anchored) { processed.Add(entity); - ProcessEntity(entity, epicenter, damage, throwForce, id, null); + ProcessEntity(entity, epicenter, damage, throwForce, id, null, fireStacks); } // Walls and reinforced walls will break into girders. These girders will also be considered turf-blocking for @@ -267,7 +272,7 @@ internal bool ExplodeTile(BroadphaseComponent lookup, { // Here we only throw, no dealing damage. Containers n such might drop their entities after being destroyed, but // they should handle their own damage pass-through, with their own damage reduction calculation. - ProcessEntity(uid, epicenter, null, throwForce, id, xform); + ProcessEntity(uid, epicenter, null, throwForce, id, xform, null); } return !tileBlocked; @@ -302,7 +307,8 @@ internal void ExplodeSpace(BroadphaseComponent lookup, DamageSpecifier damage, MapCoordinates epicenter, HashSet processed, - string id) + string id, + float? fireStacks) { var gridBox = Box2.FromDimensions(tile * DefaultTileSize, new Vector2(DefaultTileSize, DefaultTileSize)); var worldBox = spaceMatrix.TransformBox(gridBox); @@ -318,7 +324,7 @@ internal void ExplodeSpace(BroadphaseComponent lookup, foreach (var (uid, xform) in state.Item1) { processed.Add(uid); - ProcessEntity(uid, epicenter, damage, throwForce, id, xform); + ProcessEntity(uid, epicenter, damage, throwForce, id, xform, fireStacks); } if (throwForce <= 0) @@ -332,7 +338,7 @@ internal void ExplodeSpace(BroadphaseComponent lookup, foreach (var (uid, xform) in list) { - ProcessEntity(uid, epicenter, null, throwForce, id, xform); + ProcessEntity(uid, epicenter, null, throwForce, id, xform, fireStacks); } } @@ -429,7 +435,8 @@ private void ProcessEntity( DamageSpecifier? originalDamage, float throwForce, string id, - TransformComponent? xform) + TransformComponent? xform, + float? fireStacksOnIgnite) { if (originalDamage != null) { @@ -438,6 +445,17 @@ private void ProcessEntity( { // TODO EXPLOSIONS turn explosions into entities, and pass the the entity in as the damage origin. _damageableSystem.TryChangeDamage(entity, damage, ignoreResistances: true); + + } + } + + // ignite + if (fireStacksOnIgnite != null) + { + if (_flammableQuery.TryGetComponent(uid, out var flammable)) + { + flammable.FireStacks += fireStacksOnIgnite.Value; + _flammableSystem.Ignite(uid, uid, flammable); } } @@ -706,14 +724,14 @@ private bool TryGetNextTileEnumerator() { _currentIntensity = _tileSetIntensity[CurrentIteration]; - #if DEBUG +#if DEBUG if (_expectedDamage != null) { // Check that explosion processing hasn't somehow accidentally mutated the damage set. DebugTools.Assert(_expectedDamage.Equals(_currentDamage)); _expectedDamage = ExplosionType.DamagePerIntensity * _currentIntensity; } - #endif +#endif _currentDamage = ExplosionType.DamagePerIntensity * _currentIntensity; @@ -812,7 +830,8 @@ public int Process(int processingTarget) _currentDamage, Epicenter, ProcessedEntities, - ExplosionType.ID); + ExplosionType.ID, + ExplosionType.FireStacks); // If the floor is not blocked by some dense object, damage the floor tiles. if (canDamageFloor) @@ -829,7 +848,8 @@ public int Process(int processingTarget) _currentDamage, Epicenter, ProcessedEntities, - ExplosionType.ID); + ExplosionType.ID, + ExplosionType.FireStacks); } if (!MoveNext()) diff --git a/Content.Server/Explosion/EntitySystems/ExplosionSystem.cs b/Content.Server/Explosion/EntitySystems/ExplosionSystem.cs index 71f3025748a..8734c054d64 100644 --- a/Content.Server/Explosion/EntitySystems/ExplosionSystem.cs +++ b/Content.Server/Explosion/EntitySystems/ExplosionSystem.cs @@ -52,7 +52,7 @@ public sealed partial class ExplosionSystem : EntitySystem [Dependency] private readonly SharedMapSystem _map = default!; private EntityQuery _transformQuery; - private EntityQuery _damageQuery; + private EntityQuery _flammableQuery; private EntityQuery _physicsQuery; private EntityQuery _projectileQuery; @@ -104,7 +104,7 @@ public override void Initialize() InitVisuals(); _transformQuery = GetEntityQuery(); - _damageQuery = GetEntityQuery(); + _flammableQuery = GetEntityQuery(); _physicsQuery = GetEntityQuery(); _projectileQuery = GetEntityQuery(); } diff --git a/Content.Shared/Explosion/ExplosionPrototype.cs b/Content.Shared/Explosion/ExplosionPrototype.cs index b2aa83c40dd..df2fb18360e 100644 --- a/Content.Shared/Explosion/ExplosionPrototype.cs +++ b/Content.Shared/Explosion/ExplosionPrototype.cs @@ -25,6 +25,12 @@ public sealed partial class ExplosionPrototype : IPrototype [DataField("damagePerIntensity", required: true)] public DamageSpecifier DamagePerIntensity = default!; + /// + /// Amount of firestacks to apply in addition to igniting. + /// + [DataField] + public float? FireStacks; + /// /// This set of points, together with define a function that maps the /// explosion intensity to a tile break chance via linear interpolation. diff --git a/Resources/Locale/en-US/materials/materials.ftl b/Resources/Locale/en-US/materials/materials.ftl index b213e7d1e9a..1a63293d671 100644 --- a/Resources/Locale/en-US/materials/materials.ftl +++ b/Resources/Locale/en-US/materials/materials.ftl @@ -27,6 +27,7 @@ materials-bones = bone materials-coal = coal materials-bluespace = bluespace materials-normality = normality +materials-gunpowder = gunpowder # Ores materials-raw-iron = raw iron diff --git a/Resources/Migrations/migration.yml b/Resources/Migrations/migration.yml index 3ac6b353a9b..1a3b6c48ccb 100644 --- a/Resources/Migrations/migration.yml +++ b/Resources/Migrations/migration.yml @@ -244,3 +244,13 @@ ReinforcementRadioSyndicateMonkeyNukeops: ReinforcementRadioSyndicateAncestorNuk # 2024-05-01 DrinkBottleGoldschlager: DrinkBottleGildlager + +#2024-03-10 +#ClothingBackpackFilledDetective: ClothingBackpackSecurityFilledDetective +#ClothingBackpackDuffelFilledDetective: ClothingBackpackDuffelSecurityFilledDetective +#ClothingBackpackSatchelFilledDetective: ClothingBackpackSatchelSecurityFilledDetective + +# 2024-03-11 +ImprovisedExplosive: FireBomb +ImprovisedExplosiveEmpty: FireBombEmpty +ImprovisedExplosiveFuel: FireBombFuel diff --git a/Resources/Prototypes/Entities/Objects/Materials/materials.yml b/Resources/Prototypes/Entities/Objects/Materials/materials.yml index c72e503b498..b03008662d9 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/materials.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/materials.yml @@ -623,3 +623,22 @@ components: - type: Stack count: 1 + +- type: entity + parent: MaterialBase + id: MaterialGunpowder + name: gunpowder + description: An explosive compound. + components: + - type: Stack + stackType: Gunpowder + count: 1 + - type: Sprite + sprite: Objects/Misc/reagent_fillings.rsi + state: powderpile + color: darkgray + - type: PhysicalComposition + materialComposition: + Gunpowder: 100 + - type: Item + size: Tiny \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Bombs/ied.yml b/Resources/Prototypes/Entities/Objects/Weapons/Bombs/firebomb.yml similarity index 83% rename from Resources/Prototypes/Entities/Objects/Weapons/Bombs/ied.yml rename to Resources/Prototypes/Entities/Objects/Weapons/Bombs/firebomb.yml index c4420a43a36..a0e6fe77287 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Bombs/ied.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Bombs/firebomb.yml @@ -3,8 +3,8 @@ # with that you could make napalm ied instead of welding fuel with no additional complexity - type: entity parent: BaseItem - id: ImprovisedExplosive - name: improvised explosive device + id: FireBomb + name: fire bomb description: A weak, improvised incendiary device. components: - type: Sprite @@ -26,10 +26,10 @@ volume: 1 - type: RandomTimerTrigger min: 0 - max: 60 - - type: Explosive # Weak explosion in a very small radius. Doesn't break underplating. - explosionType: Default - totalIntensity: 20 + max: 15 + - type: Explosive # Weak explosion in a very small radius. Ignites surrounding entities. + explosionType: FireBomb + totalIntensity: 25 intensitySlope: 5 maxIntensity: 3 canCreateVacuum: false @@ -50,14 +50,14 @@ acts: ["Destruction"] - !type:ExplodeBehavior - type: Construction - graph: ImprovisedExplosive - node: ied + graph: FireBomb + node: firebomb # has igniter but no fuel or wires - type: entity parent: DrinkColaCanEmpty - id: ImprovisedExplosiveEmpty - name: improvised explosive device + id: FireBombEmpty + name: fire bomb suffix: empty description: A weak, improvised incendiary device. This one has no fuel. components: @@ -74,17 +74,17 @@ True: {state: "base"} False: {state: "base"} - type: Construction - graph: ImprovisedExplosive + graph: FireBomb node: empty - defaultTarget: ied + defaultTarget: firebomb - type: Tag tags: - Trash # no DrinkCan, prevent using it to make another ied - type: entity - parent: ImprovisedExplosiveEmpty - id: ImprovisedExplosiveFuel + parent: FireBombEmpty + id: FireBombFuel suffix: fuel description: A weak, improvised incendiary device. This one is missing wires. components: @@ -102,6 +102,6 @@ Quantity: 30 - type: Construction node: fuel - defaultTarget: ied + defaultTarget: firebomb - type: Tag tags: [] diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Bombs/pipebomb.yml b/Resources/Prototypes/Entities/Objects/Weapons/Bombs/pipebomb.yml new file mode 100644 index 00000000000..5fb6829ac2b --- /dev/null +++ b/Resources/Prototypes/Entities/Objects/Weapons/Bombs/pipebomb.yml @@ -0,0 +1,62 @@ +- type: entity + parent: GrenadeBase + id: PipeBomb + name: pipe bomb + description: An improvised explosive made from pipes and wire. + components: + - type: Sprite + sprite: Objects/Weapons/Bombs/pipebomb.rsi + layers: + - state: base + map: ["enum.TriggerVisualLayers.Base"] + - state: wires + - type: OnUseTimerTrigger # todo: make it activate through welder/lighter/fire instead + delay: 5 + examinable: false + initialBeepDelay: 0 + beepSound: /Audio/Effects/lightburn.ogg + - type: RandomTimerTrigger + min: 1 + max: 10 + - type: ExplodeOnTrigger + - type: Explosive # Weak explosion in a very small radius. Doesn't break underplating. + explosionType: Default + totalIntensity: 50 + intensitySlope: 5 + maxIntensity: 6 + canCreateVacuum: false + - type: Appearance + - type: TimerTriggerVisuals + - type: Construction + graph: PipeBomb + node: pipebomb + +- type: entity + parent: BaseItem + id: PipeBombGunpowder + name: pipe bomb + description: An improvised explosive made from a pipe. This one has no gunpowder. + suffix: Gunpowder + components: + - type: Sprite + sprite: Objects/Weapons/Bombs/pipebomb.rsi + state: base + - type: Construction + graph: PipeBomb + node: gunpowder + defaultTarget: pipebomb + +- type: entity + parent: BaseItem + id: PipeBombCable + name: pipe bomb + description: An improvised explosive made from a pipe. This one has no cable. + suffix: Cable + components: + - type: Sprite + sprite: Objects/Weapons/Bombs/pipebomb.rsi + state: base + - type: Construction + graph: PipeBomb + node: cable + defaultTarget: pipebomb \ No newline at end of file diff --git a/Resources/Prototypes/Reagents/Materials/materials.yml b/Resources/Prototypes/Reagents/Materials/materials.yml index f56a712cd8e..9e536614b1e 100644 --- a/Resources/Prototypes/Reagents/Materials/materials.yml +++ b/Resources/Prototypes/Reagents/Materials/materials.yml @@ -134,3 +134,11 @@ icon: { sprite: Objects/Materials/materials.rsi, state: normality } color: "#53a9ff" price: 7.5 + +- type: material + id: Gunpowder + name: materials-gunpowder + unit: materials-unit-piece + icon: { sprite: Objects/Misc/reagent_fillings.rsi, state: powderpile } + color: "#A9A9A9" + price: 0 \ No newline at end of file diff --git a/Resources/Prototypes/Recipes/Crafting/Graphs/improvised/ied.yml b/Resources/Prototypes/Recipes/Crafting/Graphs/improvised/firebomb.yml similarity index 90% rename from Resources/Prototypes/Recipes/Crafting/Graphs/improvised/ied.yml rename to Resources/Prototypes/Recipes/Crafting/Graphs/improvised/firebomb.yml index bdf06e558f1..529585583ca 100644 --- a/Resources/Prototypes/Recipes/Crafting/Graphs/improvised/ied.yml +++ b/Resources/Prototypes/Recipes/Crafting/Graphs/improvised/firebomb.yml @@ -1,5 +1,5 @@ - type: constructionGraph - id: ImprovisedExplosive + id: FireBomb start: start graph: - node: start @@ -19,7 +19,7 @@ state: icon doAfter: 1 - node: empty - entity: ImprovisedExplosiveEmpty + entity: FireBombEmpty edges: - to: start completed: @@ -42,7 +42,7 @@ - tool: Screwing doAfter: 1 - node: fuel - entity: ImprovisedExplosiveFuel + entity: FireBombFuel edges: - to: empty conditions: @@ -51,7 +51,7 @@ steps: - tool: Screwing doAfter: 1 - - to: ied + - to: firebomb conditions: # no dumping out 29u of the fuel then adding wires :) - !type:MinSolution solution: drink @@ -62,8 +62,8 @@ - material: Cable amount: 5 doAfter: 2 - - node: ied - entity: ImprovisedExplosive + - node: firebomb + entity: FireBomb edges: - to: fuel completed: diff --git a/Resources/Prototypes/Recipes/Crafting/Graphs/improvised/pipebomb.yml b/Resources/Prototypes/Recipes/Crafting/Graphs/improvised/pipebomb.yml new file mode 100644 index 00000000000..bc661b47d93 --- /dev/null +++ b/Resources/Prototypes/Recipes/Crafting/Graphs/improvised/pipebomb.yml @@ -0,0 +1,43 @@ +- type: constructionGraph + id: PipeBomb + start: start + graph: + - node: start + edges: + - to: gunpowder + steps: + - tag: Pipe + icon: + sprite: Structures/Piping/Atmospherics/pipe.rsi + state: pipeStraight + name: pipe + - material: Steel + amount: 1 + doAfter: 3 + - node: gunpowder + entity: PipeBombGunpowder + edges: + - to: cable + steps: + - material: Gunpowder + amount: 5 + doAfter: 3 + - node: cable + entity: PipeBombCable + edges: + - to: pipebomb + steps: + - material: Cable + amount: 5 + doAfter: 2 + - node: pipebomb + entity: PipeBomb + edges: + - to: cable + completed: + - !type:SpawnPrototype + prototype: CableApcStack1 + amount: 5 + steps: + - tool: Cutting + doAfter: 2 diff --git a/Resources/Prototypes/Recipes/Crafting/improvised.yml b/Resources/Prototypes/Recipes/Crafting/improvised.yml index 3f8458f58d1..cfb90e7d457 100644 --- a/Resources/Prototypes/Recipes/Crafting/improvised.yml +++ b/Resources/Prototypes/Recipes/Crafting/improvised.yml @@ -164,11 +164,11 @@ state: icon - type: construction - name: improvised explosive device - id: improvisedexplosive - graph: ImprovisedExplosive + name: fire bomb + id: firebomb + graph: FireBomb startNode: start - targetNode: ied + targetNode: firebomb category: construction-category-weapons objectType: Item description: A weak, improvised incendiary device. @@ -201,3 +201,16 @@ sprite: Clothing/Head/Hats/straw_hat.rsi state: icon objectType: Item + +- type: construction + name: pipe bomb + id: pipebomb + graph: PipeBomb + startNode: start + targetNode: pipebomb + category: construction-category-weapons + objectType: Item + description: An improvised explosive made from pipes and wire. + icon: + sprite: Objects/Weapons/Bombs/pipebomb.rsi + state: icon \ No newline at end of file diff --git a/Resources/Prototypes/Recipes/Reactions/fun.yml b/Resources/Prototypes/Recipes/Reactions/fun.yml index 4e838816f20..5a5dfa986f4 100644 --- a/Resources/Prototypes/Recipes/Reactions/fun.yml +++ b/Resources/Prototypes/Recipes/Reactions/fun.yml @@ -185,3 +185,19 @@ effects: - !type:CreateEntityReactionEffect entity: ShardCrystalRandom + +- type: reaction + id: Gunpowder + impact: Low + quantized: true + minTemp: 374 + reactants: + Potassium: + amount: 6 + Sulfur: + amount: 2 + Charcoal: + amount: 2 + effects: + - !type:CreateEntityReactionEffect + entity: MaterialGunpowder \ No newline at end of file diff --git a/Resources/Prototypes/Stacks/Materials/materials.yml b/Resources/Prototypes/Stacks/Materials/materials.yml index 0a05a899648..d51269c51cf 100644 --- a/Resources/Prototypes/Stacks/Materials/materials.yml +++ b/Resources/Prototypes/Stacks/Materials/materials.yml @@ -93,3 +93,11 @@ spawn: MaterialBones1 maxCount: 30 itemSize: 1 + +- type: stack + id: Gunpowder + name: gunpowder + icon: { sprite: /Textures/Objects/Misc/reagent_fillings.rsi, state: powderpile } + spawn: MaterialGunpowder + maxCount: 60 + itemSize: 1 \ No newline at end of file diff --git a/Resources/Prototypes/explosion.yml b/Resources/Prototypes/explosion.yml index 7ef2e774a71..492b7525914 100644 --- a/Resources/Prototypes/explosion.yml +++ b/Resources/Prototypes/explosion.yml @@ -133,3 +133,19 @@ fireColor: Green texturePath: /Textures/Effects/fire_greyscale.rsi fireStates: 3 + +- type: explosion + id: FireBomb + damagePerIntensity: + types: + Heat: 1 + Blunt: 2 + Piercing: 3 + lightColor: Orange + texturePath: /Textures/Effects/fire.rsi + fireStates: 6 + fireStacks: 2 + +# STOP +# BEFORE YOU ADD MORE EXPLOSION TYPES CONSIDER IF AN EXISTING ONE IS SUITABLE +# ADDING NEW ONES IS PROHIBITIVELY EXPENSIVE diff --git a/Resources/Textures/Objects/Weapons/Bombs/pipebomb.rsi/base.png b/Resources/Textures/Objects/Weapons/Bombs/pipebomb.rsi/base.png new file mode 100644 index 0000000000000000000000000000000000000000..14d0ec58705ad336eb9384c7e64e3752c7be1f15 GIT binary patch literal 338 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCik_0(?ST`T6FJcPPRNc++x?zdotYT4#vnJ6%Dq>E&zxaJA8fqAY&FO3)-xq9hVQPS*3uvT>F$t!wlTh8ieB7H-zyth!Nps>Z^xxe_bSBhQ?-<|jV7N2m)()~d2eg?z1Z_ QfKFlXboFyt=akR{014oQwg3PC literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Weapons/Bombs/pipebomb.rsi/meta.json b/Resources/Textures/Objects/Weapons/Bombs/pipebomb.rsi/meta.json new file mode 100644 index 00000000000..b7585556c63 --- /dev/null +++ b/Resources/Textures/Objects/Weapons/Bombs/pipebomb.rsi/meta.json @@ -0,0 +1,31 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Pipebomb sprites made by girthquake", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon" + }, + { + "name": "base" + }, + { + "name": "wires" + }, + { + "name": "primed", + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + } + ] +} diff --git a/Resources/Textures/Objects/Weapons/Bombs/pipebomb.rsi/primed.png b/Resources/Textures/Objects/Weapons/Bombs/pipebomb.rsi/primed.png new file mode 100644 index 0000000000000000000000000000000000000000..27a70981fe77d1117ea1bf2c293436c2d89799e7 GIT binary patch literal 494 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I3?%1nZ+ru!7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O_~K2Ka=yzF(w%b)xd4S*lWw;{5#la&mIMzP@d3ZLY4a92^`{Qc{tTk?Yp2 z>+I~5mzS58mX3>y+p%LuPfySG?b{_KC3o)J+0f9?+}xa$lytIF5oqex)sy}JDe00R zzu^Bk0fV{;w<%B=XMsm#F#`kNVGw3Kp1&dmDEQyg#W5tp{q3}ed`$`>ZlMCEr?==_ z{$78-cn@@F)=hfFKEI;I& zD4El^U^%~fI+JGWgb?L`JT9-LEkUZiF$sBGDJwtLGo6{aVAbngTpR)CSZ7UOc#XITArYuKqdp}$w?Mki3${r}uS&ZbOHeKxeIcrcy4&gxfRb0}$>RgB{igYzK* zW!1anm;65X?Xu-v{trL%C%t3W|HJ*_kGZ3z@ES$Ve-0aT%5C(TC;T!lvI6;>1s;*b3=Dh+L6~vJ#O${~K?_e8$B+p3x91OXGAQscA9y6xbbH7DfUXBj zi!@H$RsXBXdm}U}@AIDbE|s%(zIpll@MlH_h6CzKR!1JQ9>1JDvkPbjgQu&X%Q~lo FCIAEaHZcGI literal 0 HcmV?d00001 From 20f8168e5d13dbd4905b6903f3219a7c4d149b84 Mon Sep 17 00:00:00 2001 From: Tmanzxd <164098915+Tmanzxd@users.noreply.github.com> Date: Wed, 13 Nov 2024 17:24:34 -0600 Subject: [PATCH 4/4] Fix duplicate ID Signed-off-by: Tmanzxd <164098915+Tmanzxd@users.noreply.github.com> --- Resources/Prototypes/DeltaV/tags.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/Resources/Prototypes/DeltaV/tags.yml b/Resources/Prototypes/DeltaV/tags.yml index 25e6a5b254f..b24f253660b 100644 --- a/Resources/Prototypes/DeltaV/tags.yml +++ b/Resources/Prototypes/DeltaV/tags.yml @@ -27,9 +27,6 @@ - type: Tag id: GasPipeHalf #Craftable Musket -- type: Tag - id: GasPipeHalf #Craftable Musket - - type: Tag id: HandLabeler