From 6bf699429818c15a72ea5bb073a98ca0559b59a7 Mon Sep 17 00:00:00 2001 From: Arendian <137322659+Arendian@users.noreply.github.com> Date: Mon, 8 Jan 2024 06:41:42 +0100 Subject: [PATCH] Incendiary projectiles and lava firestack reduction (#23479) * Firestack reduction and FireStackOnHit added * Slight lava tweak * Remove component and tweaked incendiary pellets * Incendiary grenade tweak * Now ignites on projectile fixture or ignition fixture + incendiary grenade tweak * flare shells now ignite entities again * Comment * undo flare gun ignite --- .../Atmos/Components/IgniteOnCollideComponent.cs | 4 ++++ .../Atmos/EntitySystems/FlammableSystem.cs | 7 +++++++ Content.Server/Tiles/LavaComponent.cs | 2 +- .../Guns/Ammunition/Projectiles/grenade.yml | 5 +++-- .../Weapons/Guns/Projectiles/projectiles.yml | 2 +- .../Objects/Weapons/Throwable/clusterbang.yml | 2 +- Resources/Prototypes/Magic/Fixtures/runes.yml | 15 +++++++++++++-- 7 files changed, 30 insertions(+), 7 deletions(-) diff --git a/Content.Server/Atmos/Components/IgniteOnCollideComponent.cs b/Content.Server/Atmos/Components/IgniteOnCollideComponent.cs index a4f0f34842..a58d3a3c12 100644 --- a/Content.Server/Atmos/Components/IgniteOnCollideComponent.cs +++ b/Content.Server/Atmos/Components/IgniteOnCollideComponent.cs @@ -13,4 +13,8 @@ public sealed partial class IgniteOnCollideComponent : Component [ViewVariables(VVAccess.ReadWrite), DataField("fireStacks")] public float FireStacks; + + [ViewVariables(VVAccess.ReadWrite), DataField("fixtureId")] + public string FixtureId = "ignition"; + } diff --git a/Content.Server/Atmos/EntitySystems/FlammableSystem.cs b/Content.Server/Atmos/EntitySystems/FlammableSystem.cs index 95273f6e7f..c9ecc9c523 100644 --- a/Content.Server/Atmos/EntitySystems/FlammableSystem.cs +++ b/Content.Server/Atmos/EntitySystems/FlammableSystem.cs @@ -13,6 +13,7 @@ using Content.Shared.Database; using Content.Shared.Interaction; using Content.Shared.Physics; using Content.Shared.Popups; +using Content.Shared.Projectiles; using Content.Shared.Rejuvenate; using Content.Shared.Temperature; using Content.Shared.Throwing; @@ -102,6 +103,12 @@ namespace Content.Server.Atmos.EntitySystems if (!EntityManager.TryGetComponent(otherEnt, out FlammableComponent? flammable)) return; + //Only ignite when the colliding fixture is projectile or ignition. + if (args.OurFixtureId != component.FixtureId && args.OurFixtureId != SharedProjectileSystem.ProjectileFixture) + { + return; + } + flammable.FireStacks += component.FireStacks; Ignite(otherEnt, uid, flammable); component.Count--; diff --git a/Content.Server/Tiles/LavaComponent.cs b/Content.Server/Tiles/LavaComponent.cs index d536a2e4ce..1f36e8ffb0 100644 --- a/Content.Server/Tiles/LavaComponent.cs +++ b/Content.Server/Tiles/LavaComponent.cs @@ -19,5 +19,5 @@ public sealed partial class LavaComponent : Component /// How many fire stacks are applied per second. /// [ViewVariables(VVAccess.ReadWrite), DataField("fireStacks")] - public float FireStacks = 2f; + public float FireStacks = 1.25f; } diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/grenade.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/grenade.yml index 511cf76df9..60f3e47c32 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/grenade.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/grenade.yml @@ -49,8 +49,9 @@ deleteOnCollide: false canPenetrate: true damage: - groups: - Burn: 4 + types: + Blunt: 1 + Heat: 2 - type: IgniteOnCollide fireStacks: 3 count: 10 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml index 8b36433acf..998ec72183 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml @@ -139,7 +139,7 @@ radius: 2.0 energy: 7.0 - type: IgniteOnCollide - fireStacks: 1 + fireStacks: 0.25 - type: entity id: BaseBulletAP diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Throwable/clusterbang.yml b/Resources/Prototypes/Entities/Objects/Weapons/Throwable/clusterbang.yml index 43ed06a3ea..36d4c947fc 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Throwable/clusterbang.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Throwable/clusterbang.yml @@ -156,7 +156,7 @@ map: ["enum.TriggerVisualLayers.Base"] - type: ClusterGrenade fillPrototype: PelletClusterIncendiary - maxGrenadesCount: 15 + maxGrenadesCount: 30 grenadeType: enum.GrenadeType.Shoot - type: OnUseTimerTrigger beepSound: diff --git a/Resources/Prototypes/Magic/Fixtures/runes.yml b/Resources/Prototypes/Magic/Fixtures/runes.yml index 18efd2e299..a8b95c9686 100644 --- a/Resources/Prototypes/Magic/Fixtures/runes.yml +++ b/Resources/Prototypes/Magic/Fixtures/runes.yml @@ -90,10 +90,21 @@ name: "ignite rune" components: - type: TriggerOnCollide - fixtureID: rune + fixtureID: ignition + - type: Fixtures + fixtures: + ignition: + shape: + !type:PhysShapeAabb + bounds: "-0.4,-0.4,0.4,0.4" + hard: false + mask: + - ItemMask + layer: + - SlipLayer - type: DeleteOnTrigger - type: IgniteOnCollide - fireStacks: 10 + fireStacks: 5 - type: Sprite sprite: Structures/Magic/Cult/trap.rsi layers: