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 0000000000..e3cd98eaa4 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/shotgun_shell_flare.rsi/base.png differ 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 0000000000..56e19aff71 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/shotgun_shell_flare.rsi/spent.png differ 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 0000000000..a6d7bf1071 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Projectiles/flare_buckshot.rsi/base.png differ 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" + } + ] +}