* The all-in-one hacking solution The thinking man's lockpick The iconic EMAG * emagged medbay's stasis bed * left med, emagged sec' apc * went back to chem, emagged the dispenser * emagged the fax while i was there * had a donut while waiting for emag to charge * i broke into the bridge then announced 'mandatory johnson inspection in medical' * get system instead of dependency * feedback * net suggestion Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * use EnsureComp and import NetworkedComponent --------- Co-authored-by: deltanedas <user@zenith> Co-authored-by: deltanedas <deltanedas@laptop> Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
@@ -13,6 +13,7 @@ using Content.Server.UserInterface;
|
||||
using Content.Shared.Administration.Logs;
|
||||
using Content.Shared.Containers.ItemSlots;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.Emag.Components;
|
||||
using Content.Shared.Emag.Systems;
|
||||
using Content.Shared.Fax;
|
||||
using Content.Shared.Interaction;
|
||||
@@ -210,7 +211,7 @@ public sealed class FaxSystem : EntitySystem
|
||||
return;
|
||||
}
|
||||
|
||||
if (component.KnownFaxes.ContainsValue(newName) && !component.Emagged) // Allow exist names if emagged for fun
|
||||
if (component.KnownFaxes.ContainsValue(newName) && !HasComp<EmaggedComponent>(uid)) // Allow existing names if emagged for fun
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("fax-machine-popup-name-exist"), uid);
|
||||
return;
|
||||
@@ -228,11 +229,7 @@ public sealed class FaxSystem : EntitySystem
|
||||
|
||||
private void OnEmagged(EntityUid uid, FaxMachineComponent component, ref GotEmaggedEvent args)
|
||||
{
|
||||
if (component.Emagged)
|
||||
return;
|
||||
|
||||
_audioSystem.PlayPvs(component.EmagSound, uid);
|
||||
component.Emagged = true;
|
||||
args.Handled = true;
|
||||
}
|
||||
|
||||
@@ -246,7 +243,7 @@ public sealed class FaxSystem : EntitySystem
|
||||
switch (command)
|
||||
{
|
||||
case FaxConstants.FaxPingCommand:
|
||||
var isForSyndie = component.Emagged &&
|
||||
var isForSyndie = HasComp<EmaggedComponent>(uid) &&
|
||||
args.Data.ContainsKey(FaxConstants.FaxSyndicateData);
|
||||
if (!isForSyndie && !component.ResponsePings)
|
||||
return;
|
||||
@@ -362,7 +359,7 @@ public sealed class FaxSystem : EntitySystem
|
||||
{ DeviceNetworkConstants.Command, FaxConstants.FaxPingCommand }
|
||||
};
|
||||
|
||||
if (component.Emagged)
|
||||
if (HasComp<EmaggedComponent>(uid))
|
||||
payload.Add(FaxConstants.FaxSyndicateData, true);
|
||||
|
||||
_deviceNetworkSystem.QueuePacket(uid, null, payload);
|
||||
|
||||
Reference in New Issue
Block a user