IgnitionSourceComponent added (#13555)

Co-authored-by: Jezithyr <6192499+Jezithyr@users.noreply.github.com>
Co-authored-by: Kara <lunarautomaton6@gmail.com>
This commit is contained in:
gus
2023-01-18 00:45:54 -08:00
committed by GitHub
parent df81da7041
commit 76498fcc54
7 changed files with 86 additions and 7 deletions

View File

@@ -5,6 +5,7 @@ using Content.Shared.Interaction.Events;
using Content.Shared.Item;
using Content.Shared.Light.Component;
using Content.Shared.Tag;
using Content.Shared.Temperature;
using Content.Shared.Verbs;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
@@ -120,6 +121,8 @@ namespace Content.Server.Light.EntitySystems
case ExpendableLightState.Dead:
appearance.SetData(ExpendableLightVisuals.Behavior, string.Empty);
var isHotEvent = new IsHotEvent() {IsHot = true};
RaiseLocalEvent(component.Owner, isHotEvent);
break;
}
}
@@ -160,7 +163,8 @@ namespace Content.Server.Light.EntitySystems
private void OnExpLightUse(EntityUid uid, ExpendableLightComponent component, UseInHandEvent args)
{
if (args.Handled) return;
var isHotEvent = new IsHotEvent() {IsHot = true};
RaiseLocalEvent(uid, isHotEvent);
if (TryActivate(component))
args.Handled = true;
}