Add hints towards flash protection to all items which provide it (#37267)
* Update welding.yml * Update FlashSystem.cs Add subscriber event for flash immunity examine text * Create flash-immunity-component.ftl * Removed changed description text * change to use entity version * fixed mistake
This commit is contained in:
@@ -45,7 +45,7 @@ namespace Content.Server.Flash
|
|||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
|
SubscribeLocalEvent<FlashImmunityComponent, ExaminedEvent>(OnExamine);
|
||||||
SubscribeLocalEvent<FlashComponent, MeleeHitEvent>(OnFlashMeleeHit);
|
SubscribeLocalEvent<FlashComponent, MeleeHitEvent>(OnFlashMeleeHit);
|
||||||
// ran before toggling light for extra-bright lantern
|
// ran before toggling light for extra-bright lantern
|
||||||
SubscribeLocalEvent<FlashComponent, UseInHandEvent>(OnFlashUseInHand, before: new[] { typeof(HandheldLightSystem) });
|
SubscribeLocalEvent<FlashComponent, UseInHandEvent>(OnFlashUseInHand, before: new[] { typeof(HandheldLightSystem) });
|
||||||
@@ -55,6 +55,12 @@ namespace Content.Server.Flash
|
|||||||
SubscribeLocalEvent<TemporaryBlindnessComponent, FlashAttemptEvent>(OnTemporaryBlindnessFlashAttempt);
|
SubscribeLocalEvent<TemporaryBlindnessComponent, FlashAttemptEvent>(OnTemporaryBlindnessFlashAttempt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnExamine(Entity<FlashImmunityComponent> ent, ref ExaminedEvent args)
|
||||||
|
|
||||||
|
{
|
||||||
|
args.PushMarkup(Loc.GetString("flash-protection"));
|
||||||
|
}
|
||||||
|
|
||||||
private void OnFlashMeleeHit(EntityUid uid, FlashComponent comp, MeleeHitEvent args)
|
private void OnFlashMeleeHit(EntityUid uid, FlashComponent comp, MeleeHitEvent args)
|
||||||
{
|
{
|
||||||
if (!args.IsHit ||
|
if (!args.IsHit ||
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
flash-protection = It provides protection from [color=lightblue]bright flashes[/color].
|
||||||
Reference in New Issue
Block a user