Fix flammables air ignition (#23063)
* Fix welder ignition * fix mobs on fire hotspot expose frequency * fix shotgun pellets ignition * ensure ignitionComp on flammable init * \n * Revert "ensure ignitionComp on flammable init" This reverts commit 6915dcdc
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
using Content.Server.Administration.Logs;
|
using Content.Server.Administration.Logs;
|
||||||
using Content.Server.Atmos.Components;
|
using Content.Server.Atmos.Components;
|
||||||
using Content.Server.Explosion.EntitySystems;
|
using Content.Server.Explosion.EntitySystems;
|
||||||
|
using Content.Server.IgnitionSource;
|
||||||
using Content.Server.Stunnable;
|
using Content.Server.Stunnable;
|
||||||
using Content.Server.Temperature.Components;
|
using Content.Server.Temperature.Components;
|
||||||
using Content.Server.Temperature.Systems;
|
using Content.Server.Temperature.Systems;
|
||||||
@@ -35,6 +36,7 @@ namespace Content.Server.Atmos.EntitySystems
|
|||||||
[Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!;
|
[Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!;
|
||||||
[Dependency] private readonly StunSystem _stunSystem = default!;
|
[Dependency] private readonly StunSystem _stunSystem = default!;
|
||||||
[Dependency] private readonly TemperatureSystem _temperatureSystem = default!;
|
[Dependency] private readonly TemperatureSystem _temperatureSystem = default!;
|
||||||
|
[Dependency] private readonly IgnitionSourceSystem _ignitionSourceSystem = default!;
|
||||||
[Dependency] private readonly DamageableSystem _damageableSystem = default!;
|
[Dependency] private readonly DamageableSystem _damageableSystem = default!;
|
||||||
[Dependency] private readonly AlertsSystem _alertsSystem = default!;
|
[Dependency] private readonly AlertsSystem _alertsSystem = default!;
|
||||||
[Dependency] private readonly TransformSystem _transformSystem = default!;
|
[Dependency] private readonly TransformSystem _transformSystem = default!;
|
||||||
@@ -285,6 +287,8 @@ namespace Content.Server.Atmos.EntitySystems
|
|||||||
flammable.OnFire = false;
|
flammable.OnFire = false;
|
||||||
flammable.FireStacks = 0;
|
flammable.FireStacks = 0;
|
||||||
|
|
||||||
|
_ignitionSourceSystem.SetIgnited(uid, false);
|
||||||
|
|
||||||
UpdateAppearance(uid, flammable);
|
UpdateAppearance(uid, flammable);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -403,13 +407,8 @@ namespace Content.Server.Atmos.EntitySystems
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(transform.GridUid != null)
|
EnsureComp<IgnitionSourceComponent>(uid);
|
||||||
{
|
_ignitionSourceSystem.SetIgnited(uid);
|
||||||
_atmosphereSystem.HotspotExpose(transform.GridUid.Value,
|
|
||||||
_transformSystem.GetGridOrMapTilePosition(uid, transform),
|
|
||||||
700f, 50f, uid, true);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,6 @@ public sealed partial class IgnitionSourceComponent : Component
|
|||||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||||
public bool Ignited;
|
public bool Ignited;
|
||||||
|
|
||||||
[DataField(required: true), ViewVariables(VVAccess.ReadWrite)]
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||||
public int Temperature;
|
public int Temperature = 700;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Server.Chemistry.Components;
|
using Content.Server.Chemistry.Components;
|
||||||
|
using Content.Server.IgnitionSource;
|
||||||
using Content.Server.Tools.Components;
|
using Content.Server.Tools.Components;
|
||||||
using Content.Shared.Chemistry.Components.SolutionManager;
|
using Content.Shared.Chemistry.Components.SolutionManager;
|
||||||
using Content.Shared.Database;
|
using Content.Shared.Database;
|
||||||
@@ -17,6 +18,7 @@ namespace Content.Server.Tools
|
|||||||
public sealed partial class ToolSystem
|
public sealed partial class ToolSystem
|
||||||
{
|
{
|
||||||
[Dependency] private readonly SharedItemToggleSystem _itemToggle = default!;
|
[Dependency] private readonly SharedItemToggleSystem _itemToggle = default!;
|
||||||
|
[Dependency] private readonly IgnitionSourceSystem _ignitionSource = default!;
|
||||||
private readonly HashSet<EntityUid> _activeWelders = new();
|
private readonly HashSet<EntityUid> _activeWelders = new();
|
||||||
|
|
||||||
private const float WelderUpdateTimer = 1f;
|
private const float WelderUpdateTimer = 1f;
|
||||||
@@ -68,6 +70,8 @@ namespace Content.Server.Tools
|
|||||||
// Logging
|
// Logging
|
||||||
_adminLogger.Add(LogType.InteractActivate, LogImpact.Low, $"{ToPrettyString(args.User):user} toggled {ToPrettyString(uid):welder} on");
|
_adminLogger.Add(LogType.InteractActivate, LogImpact.Low, $"{ToPrettyString(args.User):user} toggled {ToPrettyString(uid):welder} on");
|
||||||
|
|
||||||
|
_ignitionSource.SetIgnited(uid);
|
||||||
|
|
||||||
if (transform.GridUid is { } gridUid)
|
if (transform.GridUid is { } gridUid)
|
||||||
{
|
{
|
||||||
var position = _transformSystem.GetGridOrMapTilePosition(uid, transform);
|
var position = _transformSystem.GetGridOrMapTilePosition(uid, transform);
|
||||||
@@ -84,6 +88,8 @@ namespace Content.Server.Tools
|
|||||||
// Logging
|
// Logging
|
||||||
_adminLogger.Add(LogType.InteractActivate, LogImpact.Low, $"{ToPrettyString(args.User):user} toggled {ToPrettyString(uid):welder} off");
|
_adminLogger.Add(LogType.InteractActivate, LogImpact.Low, $"{ToPrettyString(args.User):user} toggled {ToPrettyString(uid):welder} off");
|
||||||
|
|
||||||
|
_ignitionSource.SetIgnited(uid, false);
|
||||||
|
|
||||||
Dirty(uid, welder);
|
Dirty(uid, welder);
|
||||||
|
|
||||||
_activeWelders.Remove(uid);
|
_activeWelders.Remove(uid);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
- type: entity
|
- type: entity
|
||||||
name: torch # todo: we need some sort of IgnitionSourceComponent we can add to this, so when it's lit it will cause fires when touching fuel
|
name: torch
|
||||||
parent: BaseItem
|
parent: BaseItem
|
||||||
id: Torch
|
id: Torch
|
||||||
description: A torch fashioned from some wood.
|
description: A torch fashioned from some wood.
|
||||||
|
|||||||
@@ -56,6 +56,8 @@
|
|||||||
types:
|
types:
|
||||||
Blunt: 1
|
Blunt: 1
|
||||||
Heat: 7
|
Heat: 7
|
||||||
|
- type: IgnitionSource
|
||||||
|
ignited: true
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: PelletShotgunPractice
|
id: PelletShotgunPractice
|
||||||
@@ -142,6 +144,7 @@
|
|||||||
sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
|
sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
|
||||||
state: buckshot-flare
|
state: buckshot-flare
|
||||||
- type: IgnitionSource
|
- type: IgnitionSource
|
||||||
|
ignited: true
|
||||||
temperature: 1000
|
temperature: 1000
|
||||||
- type: TimedDespawn
|
- type: TimedDespawn
|
||||||
lifetime: 240
|
lifetime: 240
|
||||||
|
|||||||
Reference in New Issue
Block a user