Kill SharedEntityExtensions and all popup extensions (#20909)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
@@ -37,6 +37,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
[Dependency] private readonly EntityLookupSystem _lookup = default!;
|
||||
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||
[Dependency] private readonly SharedPopupSystem _popup = default!;
|
||||
|
||||
public const float MinimumFireStacks = -10f;
|
||||
public const float MaximumFireStacks = 20f;
|
||||
@@ -45,7 +46,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
public const float MinIgnitionTemperature = 373.15f;
|
||||
public const string FlammableFixtureID = "flammable";
|
||||
|
||||
private float _timer = 0f;
|
||||
private float _timer;
|
||||
|
||||
private Dictionary<FlammableComponent, float> _fireEvents = new();
|
||||
|
||||
@@ -191,8 +192,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
{
|
||||
var tempDelta = args.Temperature - MinIgnitionTemperature;
|
||||
|
||||
var maxTemp = 0f;
|
||||
_fireEvents.TryGetValue(flammable, out maxTemp);
|
||||
_fireEvents.TryGetValue(flammable, out var maxTemp);
|
||||
|
||||
if (tempDelta > maxTemp)
|
||||
_fireEvents[flammable] = tempDelta;
|
||||
@@ -233,7 +233,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
if (!flammable.OnFire || !flammable.CanExtinguish)
|
||||
return;
|
||||
|
||||
_adminLogger.Add(LogType.Flammable, $"{ToPrettyString(flammable.Owner):entity} stopped being on fire damage");
|
||||
_adminLogger.Add(LogType.Flammable, $"{ToPrettyString(uid):entity} stopped being on fire damage");
|
||||
flammable.OnFire = false;
|
||||
flammable.FireStacks = 0;
|
||||
|
||||
@@ -271,16 +271,16 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
if (!Resolve(uid, ref flammable))
|
||||
return;
|
||||
|
||||
if (!flammable.OnFire || !_actionBlockerSystem.CanInteract(flammable.Owner, null) || flammable.Resisting)
|
||||
if (!flammable.OnFire || !_actionBlockerSystem.CanInteract(uid, null) || flammable.Resisting)
|
||||
return;
|
||||
|
||||
flammable.Resisting = true;
|
||||
|
||||
flammable.Owner.PopupMessage(Loc.GetString("flammable-component-resist-message"));
|
||||
_popup.PopupEntity(Loc.GetString("flammable-component-resist-message"), uid, uid);
|
||||
_stunSystem.TryParalyze(uid, TimeSpan.FromSeconds(2f), true);
|
||||
|
||||
// TODO FLAMMABLE: Make this not use TimerComponent...
|
||||
flammable.Owner.SpawnTimer(2000, () =>
|
||||
uid.SpawnTimer(2000, () =>
|
||||
{
|
||||
flammable.Resisting = false;
|
||||
flammable.FireStacks -= 1f;
|
||||
@@ -329,7 +329,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
continue;
|
||||
}
|
||||
|
||||
_alertsSystem.ShowAlert(uid, AlertType.Fire, null, null);
|
||||
_alertsSystem.ShowAlert(uid, AlertType.Fire);
|
||||
|
||||
if (flammable.FireStacks > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user