FlammableSystem only calls TemperatureSystem.ChangeHeat if the entity has the appropriate component.
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using Content.Server.Administration.Logs;
|
using Content.Server.Administration.Logs;
|
||||||
using Content.Server.Atmos.Components;
|
using Content.Server.Atmos.Components;
|
||||||
using Content.Server.Stunnable;
|
using Content.Server.Stunnable;
|
||||||
|
using Content.Server.Temperature.Components;
|
||||||
using Content.Server.Temperature.Systems;
|
using Content.Server.Temperature.Systems;
|
||||||
using Content.Shared.ActionBlocker;
|
using Content.Shared.ActionBlocker;
|
||||||
using Content.Shared.Alert;
|
using Content.Shared.Alert;
|
||||||
@@ -62,7 +63,7 @@ namespace Content.Server.Atmos.EntitySystems
|
|||||||
flammable.FireStacks += component.FireStacks;
|
flammable.FireStacks += component.FireStacks;
|
||||||
Ignite(otherFixture, flammable);
|
Ignite(otherFixture, flammable);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnInteractUsingEvent(EntityUid uid, FlammableComponent flammable, InteractUsingEvent args)
|
private void OnInteractUsingEvent(EntityUid uid, FlammableComponent flammable, InteractUsingEvent args)
|
||||||
{
|
{
|
||||||
if (args.Handled)
|
if (args.Handled)
|
||||||
@@ -211,9 +212,9 @@ namespace Content.Server.Atmos.EntitySystems
|
|||||||
var fireStackDelta = fireStackMod - flammable.FireStacks;
|
var fireStackDelta = fireStackMod - flammable.FireStacks;
|
||||||
if (fireStackDelta > 0)
|
if (fireStackDelta > 0)
|
||||||
{
|
{
|
||||||
AdjustFireStacks((flammable).Owner, fireStackDelta, flammable);
|
AdjustFireStacks(flammable.Owner, fireStackDelta, flammable);
|
||||||
}
|
}
|
||||||
Ignite((flammable).Owner, flammable);
|
Ignite(flammable.Owner, flammable);
|
||||||
}
|
}
|
||||||
_fireEvents.Clear();
|
_fireEvents.Clear();
|
||||||
|
|
||||||
@@ -247,7 +248,10 @@ namespace Content.Server.Atmos.EntitySystems
|
|||||||
{
|
{
|
||||||
// TODO FLAMMABLE: further balancing
|
// TODO FLAMMABLE: further balancing
|
||||||
var damageScale = Math.Min((int)flammable.FireStacks, 5);
|
var damageScale = Math.Min((int)flammable.FireStacks, 5);
|
||||||
_temperatureSystem.ChangeHeat(uid, 12500 * damageScale);
|
|
||||||
|
if(TryComp(uid, out TemperatureComponent? temp))
|
||||||
|
_temperatureSystem.ChangeHeat(uid, 12500 * damageScale, false, temp);
|
||||||
|
|
||||||
_damageableSystem.TryChangeDamage(uid, flammable.Damage * damageScale);
|
_damageableSystem.TryChangeDamage(uid, flammable.Damage * damageScale);
|
||||||
|
|
||||||
AdjustFireStacks(uid, -0.1f * (flammable.Resisting ? 10f : 1f), flammable);
|
AdjustFireStacks(uid, -0.1f * (flammable.Resisting ? 10f : 1f), flammable);
|
||||||
|
|||||||
Reference in New Issue
Block a user