Energy swords hot (#10982)
Co-authored-by: CommieFlowers <rasmus.cedergren@hotmail.com>
This commit is contained in:
@@ -6,6 +6,7 @@ using Content.Shared.Interaction.Events;
|
|||||||
using Content.Shared.Item;
|
using Content.Shared.Item;
|
||||||
using Content.Shared.Light;
|
using Content.Shared.Light;
|
||||||
using Content.Shared.Light.Component;
|
using Content.Shared.Light.Component;
|
||||||
|
using Content.Shared.Temperature;
|
||||||
using Content.Shared.Toggleable;
|
using Content.Shared.Toggleable;
|
||||||
using Content.Shared.Tools.Components;
|
using Content.Shared.Tools.Components;
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
@@ -28,6 +29,7 @@ namespace Content.Server.Weapon.Melee.EnergySword
|
|||||||
SubscribeLocalEvent<EnergySwordComponent, MeleeHitEvent>(OnMeleeHit);
|
SubscribeLocalEvent<EnergySwordComponent, MeleeHitEvent>(OnMeleeHit);
|
||||||
SubscribeLocalEvent<EnergySwordComponent, UseInHandEvent>(OnUseInHand);
|
SubscribeLocalEvent<EnergySwordComponent, UseInHandEvent>(OnUseInHand);
|
||||||
SubscribeLocalEvent<EnergySwordComponent, InteractUsingEvent>(OnInteractUsing);
|
SubscribeLocalEvent<EnergySwordComponent, InteractUsingEvent>(OnInteractUsing);
|
||||||
|
SubscribeLocalEvent<EnergySwordComponent, IsHotEvent>(OnIsHotEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnMapInit(EntityUid uid, EnergySwordComponent comp, MapInitEvent args)
|
private void OnMapInit(EntityUid uid, EnergySwordComponent comp, MapInitEvent args)
|
||||||
@@ -140,5 +142,9 @@ namespace Content.Server.Weapon.Melee.EnergySword
|
|||||||
else
|
else
|
||||||
RemComp<RgbLightControllerComponent>(uid);
|
RemComp<RgbLightControllerComponent>(uid);
|
||||||
}
|
}
|
||||||
|
private void OnIsHotEvent(EntityUid uid, EnergySwordComponent energySword, IsHotEvent args)
|
||||||
|
{
|
||||||
|
args.IsHot = energySword.Activated;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user