make emagged marker component (fixed version of #13867) (#14096)

* 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:
deltanedas
2023-02-19 01:03:06 +00:00
committed by GitHub
parent 04a0faf478
commit 98b02b3d97
19 changed files with 65 additions and 84 deletions

View File

@@ -1,3 +1,4 @@
using Content.Shared.Emag.Components;
using Robust.Shared.Prototypes;
using System.Linq;
@@ -36,7 +37,7 @@ public abstract class SharedVendingMachineSystem : EntitySystem
/// <summary>
/// Returns all of the vending machine's inventory. Only includes emagged and contraband inventories if
/// <see cref="VendingMachineComponent.Emagged"/> and <see cref="VendingMachineComponent.Contraband"/>
/// <see cref="EmaggedComponent"/> exists and <see cref="VendingMachineComponent.Contraband"/> is true
/// are <c>true</c> respectively.
/// </summary>
/// <param name="uid"></param>
@@ -49,7 +50,7 @@ public abstract class SharedVendingMachineSystem : EntitySystem
var inventory = new List<VendingMachineInventoryEntry>(component.Inventory.Values);
if (component.Emagged)
if (HasComp<EmaggedComponent>(uid))
inventory.AddRange(component.EmaggedInventory.Values);
if (component.Contraband)