diff --git a/Content.Shared/SubFloor/SharedTrayScannerSystem.cs b/Content.Shared/SubFloor/SharedTrayScannerSystem.cs index 9a7c829f14..c1ac5cb7aa 100644 --- a/Content.Shared/SubFloor/SharedTrayScannerSystem.cs +++ b/Content.Shared/SubFloor/SharedTrayScannerSystem.cs @@ -5,6 +5,7 @@ using Content.Shared.Inventory.Events; using Robust.Shared.GameStates; using Robust.Shared.Network; using Robust.Shared.Serialization; +using Content.Shared._DV.Clothing.Events; //DeltaV - ToggleTrayScanner event namespace Content.Shared.SubFloor; @@ -30,6 +31,7 @@ public abstract class SharedTrayScannerSystem : EntitySystem SubscribeLocalEvent(OnTrayUnequipped); SubscribeLocalEvent(OnUserGetVis); + SubscribeLocalEvent(OnToggleAction); //DeltaV - Listening to Tray toggle event } private void OnUserGetVis(Entity ent, ref GetVisMaskEvent args) @@ -127,6 +129,19 @@ public abstract class SharedTrayScannerSystem : EntitySystem scanner.Range = state.Range; SetScannerEnabled(uid, state.Enabled, scanner); } + + /// DeltaV additions begin + private void OnToggleAction(Entity scanner, ref ToggleTrayScannerEvent args) + { + if (args.Handled) + return; + + // Toggle Logic + SetScannerEnabled(scanner, !scanner.Comp.Enabled, scanner); + + args.Handled = true; + } + /// DeltaV additions end } [Serializable, NetSerializable] diff --git a/Content.Shared/_DV/Clothing/Events/ToggleTrayEvent.cs b/Content.Shared/_DV/Clothing/Events/ToggleTrayEvent.cs new file mode 100644 index 0000000000..c2e446e45b --- /dev/null +++ b/Content.Shared/_DV/Clothing/Events/ToggleTrayEvent.cs @@ -0,0 +1,6 @@ +using Content.Shared.Actions; + +namespace Content.Shared._DV.Clothing.Events; + +[ByRefEvent] +public sealed partial class ToggleTrayScannerEvent : InstantActionEvent { } diff --git a/Resources/Prototypes/Catalog/Fills/Lockers/heads.yml b/Resources/Prototypes/Catalog/Fills/Lockers/heads.yml index 9fbfc63b9d..d8b53c6361 100644 --- a/Resources/Prototypes/Catalog/Fills/Lockers/heads.yml +++ b/Resources/Prototypes/Catalog/Fills/Lockers/heads.yml @@ -160,7 +160,7 @@ - id: CigarCase prob: 0.15 - id: ClothingBeltChiefEngineerFilled - - id: ClothingEyesGlassesMeson + - id: ClothingEyesGlassesMesonTray # DeltaV- replace normal meson goggles #- id: ClothingHandsGlovesColorYellow # DeltaV - Moved to dresser - id: ClothingHeadsetAltEngineering - id: DoorRemoteEngineering diff --git a/Resources/Prototypes/Recipes/Lathes/Packs/engineering.yml b/Resources/Prototypes/Recipes/Lathes/Packs/engineering.yml index ce4fa30202..e9eb17ad16 100644 --- a/Resources/Prototypes/Recipes/Lathes/Packs/engineering.yml +++ b/Resources/Prototypes/Recipes/Lathes/Packs/engineering.yml @@ -62,6 +62,7 @@ - PowerDrill - WelderExperimental - JawsOfLife + - TrayGoggles # DeltaV #- Fulton # DeltaV - moved to MiningDeltaV #- FultonBeacon # DeltaV - moved to MiningDeltaV diff --git a/Resources/Prototypes/Research/industrial.yml b/Resources/Prototypes/Research/industrial.yml index ec9f6c614e..fd42e8f07a 100644 --- a/Resources/Prototypes/Research/industrial.yml +++ b/Resources/Prototypes/Research/industrial.yml @@ -182,6 +182,7 @@ - PowerDrill - JawsOfLife - BorgModuleAdvancedTool + - TrayGoggles # DeltaV #- Fulton # DeltaV - seperate tech Aerial Extraction #- FultonBeacon # DeltaV - seperate tech Aerial Extraction diff --git a/Resources/Prototypes/_DV/Actions/clothing.yml b/Resources/Prototypes/_DV/Actions/clothing.yml index 45f61a5621..abc4201b9f 100644 --- a/Resources/Prototypes/_DV/Actions/clothing.yml +++ b/Resources/Prototypes/_DV/Actions/clothing.yml @@ -6,3 +6,12 @@ components: - type: InstantAction event: !type:ToggleActionEvent + +- type: entity + parent: BaseAction + id: ActionToggleTray + name: Toggle T-ray + description: Toggles T-ray hud on and off. + components: + - type: InstantAction + event: !type:ToggleTrayScannerEvent diff --git a/Resources/Prototypes/_DV/Entities/Clothing/Eyes/glasses.yml b/Resources/Prototypes/_DV/Entities/Clothing/Eyes/glasses.yml index d4751e0b85..191ad67b23 100644 --- a/Resources/Prototypes/_DV/Entities/Clothing/Eyes/glasses.yml +++ b/Resources/Prototypes/_DV/Entities/Clothing/Eyes/glasses.yml @@ -103,6 +103,27 @@ components: - type: EyeProtection +- type: entity + parent: [ClothingEyesGlassesMeson, BaseToggleClothing] + id: ClothingEyesGlassesMesonTray + name: advanced engineering goggles + description: Protective meson goggles that have an integrated T-ray scanner and diagnostic HUD. The multilayer laminate protects from any intense flash. + components: + - type: ToggleClothing + action: ActionToggleTray + - type: TrayScanner + enabled: false + - type: FlashImmunity + - type: ShowHealthBars + damageContainers: + - Inorganic + - Silicon + - HumanoidSilicon # DeltaV - IPCs + - type: Sprite + sprite: _DV/Clothing/Eyes/Glasses/traymeson.rsi + - type: Clothing + sprite: _DV/Clothing/Eyes/Glasses/traymeson.rsi + # Wrestling gear--Domino mask, which we're treating like glasses that don't actually cover your eyes - type: entity parent: ClothingEyesBase diff --git a/Resources/Prototypes/_DV/Recipes/Lathes/tools.yml b/Resources/Prototypes/_DV/Recipes/Lathes/tools.yml index 705f8b79d3..33b2e438e4 100644 --- a/Resources/Prototypes/_DV/Recipes/Lathes/tools.yml +++ b/Resources/Prototypes/_DV/Recipes/Lathes/tools.yml @@ -36,3 +36,14 @@ materials: Plastic: 250 Glass: 150 + +- type: latheRecipe + parent: BaseToolRecipe + id: TrayGoggles + result: ClothingEyesGlassesMesonTray + completetime: 4 + materials: + Steel: 500 + Plastic: 200 + Glass: 200 + Plasma: 50 diff --git a/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/equipped-EYES-arachnid.png b/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/equipped-EYES-arachnid.png new file mode 100644 index 0000000000..c9d8dc89f8 Binary files /dev/null and b/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/equipped-EYES-arachnid.png differ diff --git a/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/equipped-EYES-dog.png b/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/equipped-EYES-dog.png new file mode 100644 index 0000000000..72b9604f12 Binary files /dev/null and b/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/equipped-EYES-dog.png differ diff --git a/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/equipped-EYES-moth.png b/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/equipped-EYES-moth.png new file mode 100644 index 0000000000..9ec2464a27 Binary files /dev/null and b/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/equipped-EYES-moth.png differ diff --git a/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/equipped-EYES-secdog.png b/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/equipped-EYES-secdog.png new file mode 100644 index 0000000000..93c7281f11 Binary files /dev/null and b/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/equipped-EYES-secdog.png differ diff --git a/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/equipped-EYES.png b/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/equipped-EYES.png new file mode 100644 index 0000000000..ed5667bf62 Binary files /dev/null and b/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/equipped-EYES.png differ diff --git a/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/icon.png b/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/icon.png new file mode 100644 index 0000000000..c4b3dd5ca1 Binary files /dev/null and b/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/icon.png differ diff --git a/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/inhand-left.png b/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/inhand-left.png new file mode 100644 index 0000000000..f06f4871fb Binary files /dev/null and b/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/inhand-left.png differ diff --git a/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/inhand-right.png b/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/inhand-right.png new file mode 100644 index 0000000000..a94003eacd Binary files /dev/null and b/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/inhand-right.png differ diff --git a/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/meta.json b/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/meta.json new file mode 100644 index 0000000000..6b59bbdbf3 --- /dev/null +++ b/Resources/Textures/_DV/Clothing/Eyes/Glasses/traymeson.rsi/meta.json @@ -0,0 +1,42 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/5a73e8f825ff279e82949b9329783a9e3070e2da. equipped-EYES-secdog modified from equipped-EYES by TJohnson. Equipped-EYES-arachnid and equipped-EYES-moth modified from equipped-EYES by HTMLSystem. equipped-EYES-dog modified from equipped-EYES by Sparlight (GitHub). All versions modified from respective versions by rebe83", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon" + }, + { + "name": "equipped-EYES", + "directions": 4 + }, + { + "name": "equipped-EYES-arachnid", + "directions": 4 + }, + { + "name": "equipped-EYES-dog", + "directions": 4 + }, + { + "name": "equipped-EYES-moth", + "directions": 4 + }, + { + "name": "equipped-EYES-secdog", + "directions": 4 + }, + { + "name": "inhand-left", + "directions": 4 + }, + { + "name": "inhand-right", + "directions": 4 + } + ] +}