Fix popup messages appearing when someone tries to open a door without a tool. (#21099)
* The fixTM * typo fix * addressing review
This commit is contained in:
@@ -178,11 +178,16 @@ public sealed class AirlockSystem : SharedAirlockSystem
|
||||
|
||||
private void OnBeforePry(EntityUid uid, AirlockComponent component, ref BeforePryEvent args)
|
||||
{
|
||||
if (this.IsPowered(uid, EntityManager) && !args.PryPowered)
|
||||
{
|
||||
Popup.PopupEntity(Loc.GetString("airlock-component-cannot-pry-is-powered-message"), uid, args.User);
|
||||
args.Cancelled = true;
|
||||
}
|
||||
if (args.Cancelled)
|
||||
return;
|
||||
|
||||
if (!this.IsPowered(uid, EntityManager) || args.PryPowered)
|
||||
return;
|
||||
|
||||
args.Message = "airlock-component-cannot-pry-is-powered-message";
|
||||
|
||||
args.Cancelled = true;
|
||||
|
||||
}
|
||||
|
||||
public bool CanChangeState(EntityUid uid, AirlockComponent component)
|
||||
|
||||
Reference in New Issue
Block a user