Allow Flares to light cigarettes (#29476)
* Allow Flares to light cigarettes * !IsHot check * nicer looking(and I think the right way to do that...) * heh, whoops * Adds IgnitionEvent, IgnitionSource now functions as IsHot when Ignited * Fixes + remove redundancy * Hows this? * press enter Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> * Flare is not forever hot anymore * Formatting fixes * Make IgnitionEvent readonly --------- Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using Content.Server.IgnitionSource;
|
||||
using Content.Server.Light.Components;
|
||||
using Content.Shared.Clothing.Components;
|
||||
using Content.Shared.Clothing.EntitySystems;
|
||||
@@ -99,8 +100,8 @@ namespace Content.Server.Light.EntitySystems
|
||||
_item.SetHeldPrefix(ent, "lit", component: item);
|
||||
}
|
||||
|
||||
var isHotEvent = new IsHotEvent() {IsHot = true};
|
||||
RaiseLocalEvent(ent, isHotEvent);
|
||||
var ignite = new IgnitionEvent(true);
|
||||
RaiseLocalEvent(ent, ref ignite);
|
||||
|
||||
component.CurrentState = ExpendableLightState.Lit;
|
||||
component.StateExpiryTime = component.GlowDuration;
|
||||
@@ -134,8 +135,8 @@ namespace Content.Server.Light.EntitySystems
|
||||
|
||||
case ExpendableLightState.Dead:
|
||||
_appearance.SetData(ent, ExpendableLightVisuals.Behavior, string.Empty, appearance);
|
||||
var isHotEvent = new IsHotEvent() {IsHot = true};
|
||||
RaiseLocalEvent(ent, isHotEvent);
|
||||
var ignite = new IgnitionEvent(false);
|
||||
RaiseLocalEvent(ent, ref ignite);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user