diff --git a/Content.Client/Power/APC/ApcVisualizer.cs b/Content.Client/Power/APC/ApcVisualizer.cs index 69986ff05e..a596239ab6 100644 --- a/Content.Client/Power/APC/ApcVisualizer.cs +++ b/Content.Client/Power/APC/ApcVisualizer.cs @@ -12,6 +12,7 @@ namespace Content.Client.Power.APC public static readonly Color LackColor = Color.FromHex("#d1332e"); public static readonly Color ChargingColor = Color.FromHex("#2e8ad1"); public static readonly Color FullColor = Color.FromHex("#3db83b"); + public static readonly Color EmagColor = Color.FromHex("#1f48d6"); [UsedImplicitly] public override void InitializeEntity(EntityUid entity) @@ -55,6 +56,9 @@ namespace Content.Client.Power.APC case ApcChargeState.Full: sprite.LayerSetState(Layers.ChargeState, "apco3-2"); break; + case ApcChargeState.Emag: + sprite.LayerSetState(Layers.ChargeState, "emag-unlit"); + break; } if (ent.TryGetComponent(component.Owner, out SharedPointLightComponent? light)) @@ -64,6 +68,7 @@ namespace Content.Client.Power.APC ApcChargeState.Lack => LackColor, ApcChargeState.Charging => ChargingColor, ApcChargeState.Full => FullColor, + ApcChargeState.Emag => EmagColor, _ => LackColor }; } diff --git a/Content.Server/Atmos/Monitor/Systems/FireAlarmSystem.cs b/Content.Server/Atmos/Monitor/Systems/FireAlarmSystem.cs index 9077971694..e3b68a559f 100644 --- a/Content.Server/Atmos/Monitor/Systems/FireAlarmSystem.cs +++ b/Content.Server/Atmos/Monitor/Systems/FireAlarmSystem.cs @@ -2,6 +2,7 @@ using Content.Server.Atmos.Monitor.Components; using Content.Server.Power.Components; using Content.Shared.Atmos.Monitor; using Content.Shared.Interaction; +using Content.Shared.Emag.Systems; using Robust.Server.GameObjects; using Robust.Shared.GameObjects; using Robust.Shared.IoC; @@ -16,6 +17,7 @@ namespace Content.Server.Atmos.Monitor.Systems public override void Initialize() { SubscribeLocalEvent(OnInteractHand); + SubscribeLocalEvent(OnEmagged); } private void OnInteractHand(EntityUid uid, FireAlarmComponent component, InteractHandEvent args) @@ -38,5 +40,18 @@ namespace Content.Server.Atmos.Monitor.Systems } } } + + private void OnEmagged(EntityUid uid, FireAlarmComponent component, GotEmaggedEvent args) + { + if (TryComp(uid, out var atmosMonitor)) + { + if (atmosMonitor?.MonitorFire == true) + { + atmosMonitor.MonitorFire = false; + _monitorSystem.Alert(uid, AtmosMonitorAlarmType.Emagged); + args.Handled = true; + } + } + } } } diff --git a/Content.Server/Chemistry/Components/ReagentDispenserComponent.cs b/Content.Server/Chemistry/Components/ReagentDispenserComponent.cs index 022019a1ca..a39a8e1e51 100644 --- a/Content.Server/Chemistry/Components/ReagentDispenserComponent.cs +++ b/Content.Server/Chemistry/Components/ReagentDispenserComponent.cs @@ -25,6 +25,7 @@ using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.ViewVariables; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Server.Chemistry.Components { @@ -45,7 +46,11 @@ namespace Content.Server.Chemistry.Components [Dependency] private readonly IPrototypeManager _prototypeManager = default!; [Dependency] private readonly IEntityManager _entities = default!; - [ViewVariables] [DataField("pack")] private string _packPrototypeId = ""; + [ViewVariables] [DataField("pack", customTypeSerializer:typeof(PrototypeIdSerializer))] private string _packPrototypeId = ""; + + [ViewVariables] [DataField("emagPack", customTypeSerializer:typeof(PrototypeIdSerializer))] public string EmagPackPrototypeId = ""; + + public bool AlreadyEmagged = false; [DataField("clickSound")] private SoundSpecifier _clickSound = new SoundPathSpecifier("/Audio/Machines/machine_switch.ogg"); @@ -119,6 +124,24 @@ namespace Content.Server.Chemistry.Components Inventory.Sort(_comparer); } + public void AddFromPrototype(string pack) + { + if (string.IsNullOrEmpty(pack)) return; + + if (!_prototypeManager.TryIndex(pack, out ReagentDispenserInventoryPrototype? packPrototype)) + { + return; + } + + foreach (var entry in packPrototype.Inventory) + { + Inventory.Add(new ReagentDispenserInventoryEntry(entry)); + } + + Inventory.Sort(_comparer); + } + + private void OnPowerChanged(PowerChangedMessage e) { UpdateUserInterface(); diff --git a/Content.Server/Chemistry/EntitySystems/ReagentDispenserSystem.cs b/Content.Server/Chemistry/EntitySystems/ReagentDispenserSystem.cs index f2fba97541..8b1b2e0f3b 100644 --- a/Content.Server/Chemistry/EntitySystems/ReagentDispenserSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/ReagentDispenserSystem.cs @@ -1,14 +1,17 @@ using Content.Server.Chemistry.Components; using Content.Shared.Chemistry.EntitySystems; +using Content.Shared.Emag.Systems; +using Content.Shared.Chemistry.Dispenser; using JetBrains.Annotations; using Robust.Shared.Containers; -using Robust.Shared.GameObjects; +using Robust.Shared.Prototypes; namespace Content.Server.Chemistry.EntitySystems { [UsedImplicitly] public sealed class ReagentDispenserSystem : SharedReagentDispenserSystem { + [Dependency] private readonly IPrototypeManager _prototypeManager = default!; public override void Initialize() { base.Initialize(); @@ -16,6 +19,17 @@ namespace Content.Server.Chemistry.EntitySystems SubscribeLocalEvent((_, comp, _) => comp.UpdateUserInterface()); SubscribeLocalEvent((_, comp, _) => comp.UpdateUserInterface()); SubscribeLocalEvent((_, comp, _) => comp.UpdateUserInterface()); + SubscribeLocalEvent(OnEmagged); + } + + private void OnEmagged(EntityUid uid, ReagentDispenserComponent comp, GotEmaggedEvent args) + { + if (!comp.AlreadyEmagged) + { + comp.AddFromPrototype(comp.EmagPackPrototypeId); + comp.AlreadyEmagged = true; + args.Handled = true; + } } } } diff --git a/Content.Server/Doors/Systems/DoorSystem.cs b/Content.Server/Doors/Systems/DoorSystem.cs index 379e3dfe22..5e03a7ccce 100644 --- a/Content.Server/Doors/Systems/DoorSystem.cs +++ b/Content.Server/Doors/Systems/DoorSystem.cs @@ -5,11 +5,13 @@ using Content.Server.Construction; using Content.Server.Construction.Components; using Content.Server.Tools; using Content.Server.Tools.Components; +using Content.Server.Doors.Components; using Content.Shared.Access.Components; using Content.Shared.Access.Systems; using Content.Shared.Doors; using Content.Shared.Doors.Components; using Content.Shared.Doors.Systems; +using Content.Shared.Emag.Systems; using Content.Shared.Interaction; using Content.Shared.Tag; using Robust.Shared.Audio; @@ -39,6 +41,7 @@ public sealed class DoorSystem : SharedDoorSystem SubscribeLocalEvent(OnPryCancelled); SubscribeLocalEvent(OnWeldFinished); SubscribeLocalEvent(OnWeldCancelled); + SubscribeLocalEvent(OnEmagged); } protected override void OnInit(EntityUid uid, DoorComponent door, ComponentInit args) @@ -303,6 +306,18 @@ public sealed class DoorSystem : SharedDoorSystem if(!container.Insert(board)) Logger.Warning($"Couldn't insert board {ToPrettyString(board)} into door {ToPrettyString(uid)}!"); } + private void OnEmagged(EntityUid uid, DoorComponent door, GotEmaggedEvent args) + { + if(TryComp(uid, out var airlockComponent)) + { + if (door.State == DoorState.Closed) + { + StartOpening(uid); + airlockComponent?.SetBoltsWithAudio(!airlockComponent.IsBolted()); + args.Handled = true; + } + } + } } public sealed class PryFinishedEvent : EntityEventArgs { } diff --git a/Content.Server/Emag/EmagSystem.cs b/Content.Server/Emag/EmagSystem.cs new file mode 100644 index 0000000000..0d6652e72e --- /dev/null +++ b/Content.Server/Emag/EmagSystem.cs @@ -0,0 +1,32 @@ +using Content.Shared.Emag.Components; +using Content.Shared.Emag.Systems; + +namespace Content.Server.Emag +{ + public sealed class EmagSystem : EntitySystem + { + public override void Update(float frameTime) + { + base.Update(frameTime); + + foreach (var emag in EntityManager.EntityQuery()) + { + if (emag.Charges == emag.MaxCharges) + { + emag.Accumulator = 0; + continue; + } + + emag.Accumulator += frameTime; + + if (emag.Accumulator < emag.RechargeTime) + { + continue; + } + + emag.Accumulator -= emag.RechargeTime; + emag.Charges++; + } + } + } +} diff --git a/Content.Server/Lock/LockSystem.cs b/Content.Server/Lock/LockSystem.cs index c0be85e314..ab4f0f684b 100644 --- a/Content.Server/Lock/LockSystem.cs +++ b/Content.Server/Lock/LockSystem.cs @@ -1,6 +1,8 @@ using Content.Server.Access.Components; using Content.Server.Access.Systems; using Content.Server.Storage.Components; +using Content.Shared.Emag.Systems; +using Content.Shared.Emag.Components; using Content.Shared.Access.Components; using Content.Shared.Access.Systems; using Content.Shared.Examine; @@ -33,6 +35,7 @@ namespace Content.Server.Lock SubscribeLocalEvent(OnActivated); SubscribeLocalEvent(OnExamined); SubscribeLocalEvent>(AddToggleLockVerb); + SubscribeLocalEvent(OnEmagged); } private void OnStartup(EntityUid uid, LockComponent lockComp, ComponentStartup args) @@ -182,5 +185,23 @@ namespace Content.Server.Lock // TODO VERB ICONS need padlock open/close icons. args.Verbs.Add(verb); } + + private void OnEmagged(EntityUid uid, LockComponent component, GotEmaggedEvent args) + { + if (component.Locked == true) + { + if (component.UnlockSound != null) + { + SoundSystem.Play(Filter.Pvs(component.Owner), component.UnlockSound.GetSound(), component.Owner, AudioParams.Default.WithVolume(-5)); + } + + if (EntityManager.TryGetComponent(component.Owner, out AppearanceComponent? appearanceComp)) + { + appearanceComp.SetData(StorageVisuals.Locked, false); + } + EntityManager.RemoveComponent(uid); //Literally destroys the lock as a tell it was emagged + args.Handled = true; + } + } } } diff --git a/Content.Server/Power/Components/ApcComponent.cs b/Content.Server/Power/Components/ApcComponent.cs index eba69f9e6a..818707bc14 100644 --- a/Content.Server/Power/Components/ApcComponent.cs +++ b/Content.Server/Power/Components/ApcComponent.cs @@ -29,6 +29,8 @@ public sealed class ApcComponent : BaseApcNetComponent [ViewVariables] public bool MainBreakerEnabled = true; + public bool Emagged = false; + public const float HighPowerThreshold = 0.9f; public static TimeSpan VisualsChangeDelay = TimeSpan.FromSeconds(1); diff --git a/Content.Server/Power/EntitySystems/ApcSystem.cs b/Content.Server/Power/EntitySystems/ApcSystem.cs index 5b77405433..3a529648a9 100644 --- a/Content.Server/Power/EntitySystems/ApcSystem.cs +++ b/Content.Server/Power/EntitySystems/ApcSystem.cs @@ -5,6 +5,7 @@ using Content.Server.Power.Pow3r; using Content.Shared.Access.Components; using Content.Shared.Access.Systems; using Content.Shared.APC; +using Content.Shared.Emag.Systems; using JetBrains.Annotations; using Robust.Server.GameObjects; using Robust.Shared.Audio; @@ -34,6 +35,7 @@ namespace Content.Server.Power.EntitySystems SubscribeLocalEvent(OnApcInit); SubscribeLocalEvent(OnBatteryChargeChanged); SubscribeLocalEvent(OnToggleMainBreaker); + SubscribeLocalEvent(OnEmagged); } // Change the APC's state only when the battery state changes, or when it's first created. @@ -68,6 +70,15 @@ namespace Content.Server.Power.EntitySystems } } + private void OnEmagged(EntityUid uid, ApcComponent comp, GotEmaggedEvent args) + { + if(!comp.Emagged) + { + comp.Emagged = true; + args.Handled = true; + } + } + public void UpdateApcState(EntityUid uid, ApcComponent? apc=null, BatteryComponent? battery=null) @@ -115,6 +126,9 @@ namespace Content.Server.Power.EntitySystems ApcComponent? apc=null, BatteryComponent? battery=null) { + if (apc != null && apc.Emagged) + return ApcChargeState.Emag; + if (!Resolve(uid, ref apc, ref battery)) return ApcChargeState.Lack; diff --git a/Content.Server/Recycling/RecyclerSystem.cs b/Content.Server/Recycling/RecyclerSystem.cs index 58424d91ba..d3c4ed9bf3 100644 --- a/Content.Server/Recycling/RecyclerSystem.cs +++ b/Content.Server/Recycling/RecyclerSystem.cs @@ -2,9 +2,11 @@ using Content.Server.Power.Components; using Content.Server.Recycling.Components; using Content.Shared.Body.Components; using Content.Shared.Recycling; +using Content.Shared.Emag.Systems; using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Physics.Dynamics; +using Robust.Shared.Player; namespace Content.Server.Recycling { @@ -14,6 +16,7 @@ namespace Content.Server.Recycling { base.Initialize(); SubscribeLocalEvent(HandleCollide); + SubscribeLocalEvent(OnEmagged); } private void HandleCollide(EntityUid uid, RecyclerComponent component, StartCollideEvent args) @@ -53,5 +56,14 @@ namespace Content.Server.Recycling appearance.SetData(RecyclerVisuals.Bloody, true); } } + + private void OnEmagged(EntityUid uid, RecyclerComponent component, GotEmaggedEvent args) + { + if (component.Safe == true) + { + component.Safe = false; + args.Handled = true; + } + } } } diff --git a/Content.Shared.Database/LogType.cs b/Content.Shared.Database/LogType.cs index e60a9381d4..e98818d52a 100644 --- a/Content.Shared.Database/LogType.cs +++ b/Content.Shared.Database/LogType.cs @@ -63,4 +63,5 @@ public enum LogType Emitter = 59, GhostRoleTaken = 60, Chat = 61, + Emag = 69, } diff --git a/Content.Shared/APC/SharedApc.cs b/Content.Shared/APC/SharedApc.cs index 4a7644f8fd..d11f1d27bc 100644 --- a/Content.Shared/APC/SharedApc.cs +++ b/Content.Shared/APC/SharedApc.cs @@ -27,6 +27,11 @@ namespace Content.Shared.APC /// APC battery is full and has enough power. /// Full, + + /// + /// APC is emagged (and not displaying other useful power colors at a glance) + /// + Emag, } [Serializable, NetSerializable] diff --git a/Content.Shared/Access/Systems/AccessReaderSystem.cs b/Content.Shared/Access/Systems/AccessReaderSystem.cs index 1c9d064476..4cfab5ae2b 100644 --- a/Content.Shared/Access/Systems/AccessReaderSystem.cs +++ b/Content.Shared/Access/Systems/AccessReaderSystem.cs @@ -4,6 +4,7 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; using Content.Shared.Hands.Components; using Content.Shared.Inventory; +using Content.Shared.Emag.Systems; using Content.Shared.PDA; using Content.Shared.Access.Components; using Robust.Shared.GameObjects; @@ -22,6 +23,7 @@ namespace Content.Shared.Access.Systems { base.Initialize(); SubscribeLocalEvent(OnInit); + SubscribeLocalEvent(OnEmagged); } private void OnInit(EntityUid uid, AccessReaderComponent reader, ComponentInit args) @@ -36,6 +38,15 @@ namespace Content.Shared.Access.Systems } } + private void OnEmagged(EntityUid uid, AccessReaderComponent reader, GotEmaggedEvent args) + { + if (reader.Enabled == true) + { + reader.Enabled = false; + args.Handled = true; + } + } + /// /// Searches an in the entity itself, in its active hand or in its ID slot. /// Then compares the found access with the configured access lists to see if it is allowed. diff --git a/Content.Shared/Atmos/Monitor/AtmosMonitorAlarmType.cs b/Content.Shared/Atmos/Monitor/AtmosMonitorAlarmType.cs index 8da1a04e67..065311bff3 100644 --- a/Content.Shared/Atmos/Monitor/AtmosMonitorAlarmType.cs +++ b/Content.Shared/Atmos/Monitor/AtmosMonitorAlarmType.cs @@ -8,6 +8,7 @@ namespace Content.Shared.Atmos.Monitor { Normal = 0, Warning = 1, - Danger = 2 // 1 << 1 is the exact same thing and we're not really doing **bitmasking** are we? + Danger = 2, // 1 << 1 is the exact same thing and we're not really doing **bitmasking** are we? + Emagged = 3, } } diff --git a/Content.Shared/Chemistry/Dispenser/SharedReagentDispenserComponent.cs b/Content.Shared/Chemistry/Dispenser/SharedReagentDispenserComponent.cs index b0c5a37db4..27955e1fea 100644 --- a/Content.Shared/Chemistry/Dispenser/SharedReagentDispenserComponent.cs +++ b/Content.Shared/Chemistry/Dispenser/SharedReagentDispenserComponent.cs @@ -24,7 +24,7 @@ namespace Content.Shared.Chemistry.Dispenser /// /// A list of reagents which this may dispense. Defined in yaml prototype, see . /// - protected readonly List Inventory = new(); + public readonly List Inventory = new(); [Serializable, NetSerializable] public sealed class ReagentDispenserBoundUserInterfaceState : BoundUserInterfaceState diff --git a/Content.Shared/Emag/Components/EmagComponent.cs b/Content.Shared/Emag/Components/EmagComponent.cs new file mode 100644 index 0000000000..98983603ef --- /dev/null +++ b/Content.Shared/Emag/Components/EmagComponent.cs @@ -0,0 +1,16 @@ +namespace Content.Shared.Emag.Components +{ + [RegisterComponent] + public sealed class EmagComponent : Component + { + [DataField("maxCharges")] + public int MaxCharges = 3; + + [DataField("charges")] + public int Charges = 3; + + [DataField("rechargeTime")] + public float RechargeTime = 90f; + public float Accumulator = 0f; + } +} diff --git a/Content.Shared/Emag/Systems/SharedEmagSystem.cs b/Content.Shared/Emag/Systems/SharedEmagSystem.cs new file mode 100644 index 0000000000..2714210fa2 --- /dev/null +++ b/Content.Shared/Emag/Systems/SharedEmagSystem.cs @@ -0,0 +1,65 @@ +using Content.Shared.Emag.Components; +using Content.Shared.Interaction; +using Content.Shared.Examine; +using Content.Shared.Popups; +using Content.Shared.Administration.Logs; +using Content.Shared.Database; +using Robust.Shared.Player; + +namespace Content.Shared.Emag.Systems +{ + /// How to add an emag interaction: + /// 1. Go to the system for the component you want the interaction with + /// 2. Subscribe to the GotEmaggedEvent + /// 3. Have some check for if this actually needs to be emagged or is already emagged (to stop charge waste) + /// 4. Past the check, add all the effects you desire and HANDLE THE EVENT ARGUMENT so a charge is spent + public sealed class SharedEmagSystem : EntitySystem + { + [Dependency] private readonly SharedPopupSystem _popupSystem = default!; + [Dependency] private readonly SharedAdminLogSystem _adminLog = default!; + + public override void Initialize() + { + base.Initialize(); + SubscribeLocalEvent(OnAfterInteract); + SubscribeLocalEvent(OnExamine); + } + + private void OnExamine(EntityUid uid, EmagComponent component, ExaminedEvent args) + { + args.PushMarkup(Loc.GetString("emag-charges-remaining", ("charges", component.Charges))); + } + + private void OnAfterInteract(EntityUid uid, EmagComponent component, AfterInteractEvent args) + { + if (!args.CanReach || args.Target == null) + return; + + if (component.Charges <= 0) + { + _popupSystem.PopupEntity(Loc.GetString("emag-no-charges"), args.User, Filter.Entities(args.User)); + return; + } + + var emaggedEvent = new GotEmaggedEvent(args.User); + RaiseLocalEvent(args.Target.Value, emaggedEvent, false); + if (emaggedEvent.Handled) + { + _popupSystem.PopupEntity(Loc.GetString("emag-success",("target", args.Target)), args.User, Filter.Entities(args.User)); + _adminLog.Add(LogType.Emag, LogImpact.High, $"{ToPrettyString(args.User):player} emagged {ToPrettyString(args.Target.Value):target}"); + component.Charges--; + return; + } + } + } + + public sealed class GotEmaggedEvent : HandledEntityEventArgs + { + public readonly EntityUid UserUid; + + public GotEmaggedEvent(EntityUid userUid) + { + userUid = UserUid; + } + } +} diff --git a/Resources/Locale/en-US/emag/emag.ftl b/Resources/Locale/en-US/emag/emag.ftl new file mode 100644 index 0000000000..dbefd57c88 --- /dev/null +++ b/Resources/Locale/en-US/emag/emag.ftl @@ -0,0 +1,3 @@ +emag-success = The card zaps something in {THE($target)}. +emag-no-charges = No charges left! +emag-charges-remaining = It has {$charges} charges remaining. diff --git a/Resources/Prototypes/Catalog/ReagentDispensers/beverage.yml b/Resources/Prototypes/Catalog/ReagentDispensers/beverage.yml index c923b187d5..9ae1f2e2e1 100644 --- a/Resources/Prototypes/Catalog/ReagentDispensers/beverage.yml +++ b/Resources/Prototypes/Catalog/ReagentDispensers/beverage.yml @@ -50,3 +50,18 @@ #- Patron #- JuiceWatermelon #- JuiceBerry + + +- type: reagentDispenserInventory + id: SodaDispenserEmagInventory + inventory: + - FourteenLoko + - Ephedrine + - Histamine + +- type: reagentDispenserInventory + id: BoozeDispenserEmagInventory + inventory: + - AtomicBomb + - Ethanol + - Iron diff --git a/Resources/Prototypes/Catalog/ReagentDispensers/chemical.yml b/Resources/Prototypes/Catalog/ReagentDispensers/chemical.yml index c61d56ac46..aa22e0d8c8 100644 --- a/Resources/Prototypes/Catalog/ReagentDispensers/chemical.yml +++ b/Resources/Prototypes/Catalog/ReagentDispensers/chemical.yml @@ -24,3 +24,11 @@ - Sulfur - SulfuricAcid - Uranium + +- type: reagentDispenserInventory + id: ChemDispenserEmaggedInventory + inventory: ##Feel free to change this to something more interesting when more chems are added + - Napalm + - Toxin + - Epinephrine + - Ultravasculine diff --git a/Resources/Prototypes/Catalog/uplink_catalog.yml b/Resources/Prototypes/Catalog/uplink_catalog.yml index 7235b8f997..928a3219b3 100644 --- a/Resources/Prototypes/Catalog/uplink_catalog.yml +++ b/Resources/Prototypes/Catalog/uplink_catalog.yml @@ -121,6 +121,14 @@ icon: /Textures/Objects/Misc/guardian_info.rsi/icon.png price: 14 +- type: uplinkListing + id: UplinkEmag + category: Utility + itemId: Emag + description: This sequencer, or "emag", can be used to open or hack a huge variety of items around the station. + icon: /Textures/Objects/Tools/emag.rsi/icon.png + price: 8 + # Bundles - type: uplinkListing diff --git a/Resources/Prototypes/Entities/Objects/Tools/emag.yml b/Resources/Prototypes/Entities/Objects/Tools/emag.yml new file mode 100644 index 0000000000..5d861eed36 --- /dev/null +++ b/Resources/Prototypes/Entities/Objects/Tools/emag.yml @@ -0,0 +1,11 @@ +- type: entity + parent: BaseItem + id: Emag + name: cryptographic sequencer + description: The iconic card of ill omen. + components: + - type: Emag + - type: Sprite + netsync: false + sprite: Objects/Tools/emag.rsi + state: icon diff --git a/Resources/Prototypes/Entities/Structures/Dispensers/booze.yml b/Resources/Prototypes/Entities/Structures/Dispensers/booze.yml index 274980d726..de5c68fa90 100644 --- a/Resources/Prototypes/Entities/Structures/Dispensers/booze.yml +++ b/Resources/Prototypes/Entities/Structures/Dispensers/booze.yml @@ -25,3 +25,4 @@ - SmallImpassable - type: ReagentDispenser pack: BoozeDispenserInventory + emagPack: BoozeDispenserEmagInventory diff --git a/Resources/Prototypes/Entities/Structures/Dispensers/chem.yml b/Resources/Prototypes/Entities/Structures/Dispensers/chem.yml index 124d8fba28..7074cbbfd3 100644 --- a/Resources/Prototypes/Entities/Structures/Dispensers/chem.yml +++ b/Resources/Prototypes/Entities/Structures/Dispensers/chem.yml @@ -9,6 +9,7 @@ state: industrial-working - type: ReagentDispenser pack: ChemDispenserStandardInventory + emagPack: ChemDispenserEmaggedInventory - type: ApcPowerReceiver - type: ExtensionCableReceiver - type: Construction diff --git a/Resources/Prototypes/Entities/Structures/Dispensers/soda.yml b/Resources/Prototypes/Entities/Structures/Dispensers/soda.yml index 09dcdc407d..ebe6c7d5a7 100644 --- a/Resources/Prototypes/Entities/Structures/Dispensers/soda.yml +++ b/Resources/Prototypes/Entities/Structures/Dispensers/soda.yml @@ -25,3 +25,4 @@ - SmallImpassable - type: ReagentDispenser pack: SodaDispenserInventory + emagPack: SodaDispenserEmagInventory diff --git a/Resources/Prototypes/Entities/Structures/Storage/Crates/crates.yml b/Resources/Prototypes/Entities/Structures/Storage/Crates/crates.yml index 93e608b566..1585c2418b 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/Crates/crates.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/Crates/crates.yml @@ -23,7 +23,7 @@ - type: Construction graph: CrateGenericSteel node: crategenericsteel - + - type: entity id: CratePlastic @@ -431,7 +431,7 @@ - type: StorageVisualizer state_open: scicratesecure_open state_closed: scicratesecure_door - + - type: entity id: CratePlasma name: plasma crate @@ -517,7 +517,7 @@ - type: StorageVisualizer state_open: hydrocratesecure_open state_closed: hydrocratesecure_door - + - type: entity id: CrateWeaponSecure name: secure weapon crate @@ -543,7 +543,7 @@ - type: StorageVisualizer state_open: weaponcrate_open state_closed: weaponcrate_door - + - type: entity id: CrateCommandSecure name: command crate diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/fire_alarm.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/fire_alarm.yml index 20922ec2fb..942f3c31be 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/fire_alarm.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/fire_alarm.yml @@ -27,6 +27,7 @@ Normal: fire_off Warning: fire_off # shouldn't be alarming at a warning Danger: fire_on + Emagged: fire_emagged hideOnDepowered: ["fireAlarmState"] - type: WiresVisualizer - type: UserInterface diff --git a/Resources/Textures/Objects/Tools/emag.rsi/icon.png b/Resources/Textures/Objects/Tools/emag.rsi/icon.png new file mode 100644 index 0000000000..de4465dc36 Binary files /dev/null and b/Resources/Textures/Objects/Tools/emag.rsi/icon.png differ diff --git a/Resources/Textures/Objects/Tools/emag.rsi/meta.json b/Resources/Textures/Objects/Tools/emag.rsi/meta.json new file mode 100644 index 0000000000..d14e20b7a5 --- /dev/null +++ b/Resources/Textures/Objects/Tools/emag.rsi/meta.json @@ -0,0 +1,14 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation wiki at https://tgstation13.org/wiki/File:Emag.png", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon" + } + ] +}