From 004c678853f33c5aca0dd21c00eb1674e7b1a218 Mon Sep 17 00:00:00 2001 From: ScalyChimp <72841710+scaly-chimp@users.noreply.github.com> Date: Sun, 30 Jan 2022 13:44:45 +0000 Subject: [PATCH] Incediary Shells (#6208) Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> --- Content.Client/Entry/IgnoredComponents.cs | 1 + .../Components/IgniteOnCollideComponent.cs | 19 +++++++++ .../Atmos/EntitySystems/FlammableSystem.cs | 9 +++++ .../Guns/Ammunition/Cartridges/shotgun.yml | 16 +++++++- .../Guns/Ammunition/Projectiles/shotgun.yml | 36 ++++++++++++++++-- .../Casings/shotgun_shell_flare.rsi/base.png | Bin 0 -> 363 bytes .../Casings/shotgun_shell_flare.rsi/meta.json | 17 +++++++++ .../Casings/shotgun_shell_flare.rsi/spent.png | Bin 0 -> 356 bytes .../Projectiles/flare_buckshot.rsi/base.png | Bin 0 -> 506 bytes .../Projectiles/flare_buckshot.rsi/meta.json | 14 +++++++ 10 files changed, 107 insertions(+), 5 deletions(-) create mode 100644 Content.Server/Atmos/Components/IgniteOnCollideComponent.cs create mode 100644 Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/shotgun_shell_flare.rsi/base.png create mode 100644 Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/shotgun_shell_flare.rsi/meta.json create mode 100644 Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/shotgun_shell_flare.rsi/spent.png create mode 100644 Resources/Textures/Objects/Weapons/Guns/Projectiles/flare_buckshot.rsi/base.png create mode 100644 Resources/Textures/Objects/Weapons/Guns/Projectiles/flare_buckshot.rsi/meta.json diff --git a/Content.Client/Entry/IgnoredComponents.cs b/Content.Client/Entry/IgnoredComponents.cs index 75d941f57b..b6b5a3380c 100644 --- a/Content.Client/Entry/IgnoredComponents.cs +++ b/Content.Client/Entry/IgnoredComponents.cs @@ -292,6 +292,7 @@ namespace Content.Client.Entry "MonkeyAccent", "ReplacementAccent", "ResistLocker", + "IgniteOnCollide", "SpawnArtifact", "TelepathicArtifact", "ArtifactGasTrigger", diff --git a/Content.Server/Atmos/Components/IgniteOnCollideComponent.cs b/Content.Server/Atmos/Components/IgniteOnCollideComponent.cs new file mode 100644 index 0000000000..f5c043e65c --- /dev/null +++ b/Content.Server/Atmos/Components/IgniteOnCollideComponent.cs @@ -0,0 +1,19 @@ +using Robust.Shared.GameObjects; +using Robust.Shared.Serialization.Manager.Attributes; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Content.Server.Atmos.Components +{ + [RegisterComponent] + public class IgniteOnCollideComponent : Component + { + public override string Name => "IgniteOnCollide"; + + [DataField("fireStacks")] + public float FireStacks { get; set; } + } +} diff --git a/Content.Server/Atmos/EntitySystems/FlammableSystem.cs b/Content.Server/Atmos/EntitySystems/FlammableSystem.cs index 6d546d3eb5..8262946b8a 100644 --- a/Content.Server/Atmos/EntitySystems/FlammableSystem.cs +++ b/Content.Server/Atmos/EntitySystems/FlammableSystem.cs @@ -49,6 +49,15 @@ namespace Content.Server.Atmos.EntitySystems SubscribeLocalEvent(OnCollideEvent); SubscribeLocalEvent(OnIsHotEvent); SubscribeLocalEvent(OnTileFireEvent); + SubscribeLocalEvent(IgniteOnCollide); + } + + private void IgniteOnCollide(EntityUid uid, IgniteOnCollideComponent component, StartCollideEvent args) + { + var otherfixture = args.OtherFixture.Body.Owner; + if (EntityManager.TryGetComponent(otherfixture, out FlammableComponent flammable)) + flammable.FireStacks += component.FireStacks; + Ignite(otherfixture, flammable); } private void OnInteractUsingEvent(EntityUid uid, FlammableComponent flammable, InteractUsingEvent args) diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/shotgun.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/shotgun.yml index 66f0f6d115..1289ce4842 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/shotgun.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/shotgun.yml @@ -49,6 +49,18 @@ projectilesFired: 4 ammoSpread: 10 +- type: entity + id: ShellShotgunFlare + name: shell (.50 flare) + parent: ShellShotgunBase + components: + - type: Sprite + sprite: Objects/Weapons/Guns/Ammunition/Casings/shotgun_shell_flare.rsi + - type: Ammo + projectile: PelletShotgunFlare + projectilesFired: 1 + ammoSpread: 0 + - type: entity id: ShellShotgun name: shell (.50) @@ -77,7 +89,9 @@ - type: Sprite sprite: Objects/Weapons/Guns/Ammunition/Casings/shotgun_shell_incendiary.rsi - type: Ammo - projectile: PelletShotgun + projectile: PelletShotgunIncendiary + projectilesFired: 6 + ammoSpread: 125 - type: entity id: ShellShotgunPractice diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/shotgun.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/shotgun.yml index 6ef3fdedee..7fffd2e68f 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/shotgun.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/shotgun.yml @@ -64,13 +64,20 @@ parent: BulletBase components: - type: Sprite - sprite: Objects/Weapons/Guns/Projectiles/buckshot.rsi + sprite: Objects/Weapons/Guns/Projectiles/flare_buckshot.rsi state: base - type: Projectile damage: - types: - Blunt: 13 - + groups: + Burn: 10 + - type: PointLight + enabled: true + color: "#ff4300" + radius: 2.0 + energy: 7.0 + - type: IgniteOnCollide + fireStacks: 1 + - type: entity id: PelletShotgunPractice name: pellet (.50 practice) @@ -110,3 +117,24 @@ transferAmount: 15 - type: InjectableSolution solution: ammo + +- type: entity + id: PelletShotgunFlare + name: pellet (.50 flare) + abstract: true + parent: BulletBase + components: + - type: Sprite + sprite: Objects/Weapons/Guns/Projectiles/flare_buckshot.rsi + state: base + - type: Projectile + damage: + groups: + Burn: 20 + - type: PointLight + enabled: true + color: "#FF8080" + radius: 15.0 + energy: 9.0 + - type: IgniteOnCollide + fireStacks: 4 \ No newline at end of file diff --git a/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/shotgun_shell_flare.rsi/base.png b/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/shotgun_shell_flare.rsi/base.png new file mode 100644 index 0000000000000000000000000000000000000000..e3cd98eaa4de4d38c6a0659c7ff932de7221a1f0 GIT binary patch literal 363 zcmV-x0hIoUP)Px$B}qg_If;=YxTTedzKKw zD4=V!>nE}q@j*{FxwUmb{C1@oPvG&AcsRF?Xch1&-xV;Pz}w-!3^l`&w@!Hx8&q3_`d$Uv5MWmj8h=Vl!{ literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/shotgun_shell_flare.rsi/meta.json b/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/shotgun_shell_flare.rsi/meta.json new file mode 100644 index 0000000000..8fe2966bee --- /dev/null +++ b/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/shotgun_shell_flare.rsi/meta.json @@ -0,0 +1,17 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "https://github.com/discordia-space/CEV-Eris/raw/e1d495c3faf4642b6ec1c4be8acc7cd5bc51d785/icons/obj/ammo.dmi", + "states": [ + { + "name": "base" + }, + { + "name": "spent" + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/shotgun_shell_flare.rsi/spent.png b/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/shotgun_shell_flare.rsi/spent.png new file mode 100644 index 0000000000000000000000000000000000000000..56e19aff71ce0ac108a0f09a704e585de4083015 GIT binary patch literal 356 zcmV-q0h|7bP)Px$9!W$&R9J=Wk}*oeKomgViins#!jub%u&qQ8i^NLU-Ye`4v>kJfl%BzD%@j5p zwhe3}Rs*J2?8YK0N#o8WB7*a(Wb!lb6(2kvkLSNLu^B4M^4ss}bY;}zN$;*K%d7%+ ztfsb6FG)`i%#dG42c&N|hS?nMuSusX=ZH}OU-H8YW^=gB+q2&YXf~PQqH5*OCDcne zPGDU*MeGihUoL|7W$zs7qX9J; literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Weapons/Guns/Projectiles/flare_buckshot.rsi/base.png b/Resources/Textures/Objects/Weapons/Guns/Projectiles/flare_buckshot.rsi/base.png new file mode 100644 index 0000000000000000000000000000000000000000..a6d7bf10713f7858cdb3c45251e8bbd20e9971d1 GIT binary patch literal 506 zcmVEX>4Tx04R}tkv&MmKpe$iQ;Sk64t9{@kfAzR5EXTlDi*;)X)CnqU~=gfG-*gu zTpR`0f`cE6RR%KKJM7R|+Nrd?N82(+!JwgLrz= z(mC%Fhgn%th|h_~47wokBiCh@-#C{X7ItBhU+wkk-!p?NI`^*Ix48bLX1|86ccIMk9+tdjz2{%nOqex zax9<*6_Voz|AXJ%n#IWpHz^bc0x!1xF#`1N0jdyW16NwdUuy!hpQJZB zTJ#7Q*aj}HJDR))TSJ=(D*N4T0000nNkl1|TKMN4iSO5S307*qoM6N<$f+$$kC;$Ke literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Weapons/Guns/Projectiles/flare_buckshot.rsi/meta.json b/Resources/Textures/Objects/Weapons/Guns/Projectiles/flare_buckshot.rsi/meta.json new file mode 100644 index 0000000000..706868841e --- /dev/null +++ b/Resources/Textures/Objects/Weapons/Guns/Projectiles/flare_buckshot.rsi/meta.json @@ -0,0 +1,14 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from cev-eris at https://github.com/discordia-space/CEV-Eris/raw/2acc4d34a894dbcc9dbf3779b696ddf296aa2c56/icons/obj/projectiles.dmi", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "base" + } + ] +}