Doctor PDA functions as a health analyzer (#7031)

This commit is contained in:
Rane
2022-03-19 14:20:20 -04:00
committed by GitHub
parent 3058103b68
commit 9fa78fb6a4
4 changed files with 12 additions and 23 deletions

View File

@@ -8,14 +8,9 @@ using Content.Server.Traitor.Uplink.Components;
using Content.Server.PDA.Ringer; using Content.Server.PDA.Ringer;
using Content.Server.UserInterface; using Content.Server.UserInterface;
using Content.Shared.Containers.ItemSlots; using Content.Shared.Containers.ItemSlots;
using Content.Shared.Instruments;
using Content.Shared.Interaction;
using Content.Shared.PDA; using Content.Shared.PDA;
using Robust.Server.GameObjects; using Robust.Server.GameObjects;
using Robust.Shared.Containers; using Robust.Shared.Containers;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Content.Shared.Interaction.Events;
namespace Content.Server.PDA namespace Content.Server.PDA
{ {
@@ -31,7 +26,6 @@ namespace Content.Server.PDA
{ {
base.Initialize(); base.Initialize();
SubscribeLocalEvent<PDAComponent, ActivateInWorldEvent>(OnActivateInWorld);
SubscribeLocalEvent<PDAComponent, LightToggleEvent>(OnLightToggle); SubscribeLocalEvent<PDAComponent, LightToggleEvent>(OnLightToggle);
} }
@@ -44,20 +38,6 @@ namespace Content.Server.PDA
ui.OnReceiveMessage += (msg) => OnUIMessage(pda, msg); ui.OnReceiveMessage += (msg) => OnUIMessage(pda, msg);
} }
private void OnUse(EntityUid uid, PDAComponent pda, UseInHandEvent args)
{
if (args.Handled)
return;
args.Handled = OpenUI(pda, args.User);
}
private void OnActivateInWorld(EntityUid uid, PDAComponent pda, ActivateInWorldEvent args)
{
if (args.Handled)
return;
args.Handled = OpenUI(pda, args.User);
}
protected override void OnItemInserted(EntityUid uid, PDAComponent pda, EntInsertedIntoContainerMessage args) protected override void OnItemInserted(EntityUid uid, PDAComponent pda, EntInsertedIntoContainerMessage args)
{ {
base.OnItemInserted(uid, pda, args); base.OnItemInserted(uid, pda, args);

View File

@@ -24,6 +24,7 @@
- type: StorageFill - type: StorageFill
contents: contents:
- id: HandheldHealthAnalyzer - id: HandheldHealthAnalyzer
prob: 0.6
- id: ClothingHandsGlovesLatex - id: ClothingHandsGlovesLatex
- id: ClothingHeadsetMedical - id: ClothingHeadsetMedical
# - id: ClothingEyesHudMedical #Removed until working properly # - id: ClothingEyesHudMedical #Removed until working properly

View File

@@ -4,7 +4,7 @@
animationDuration: 1.8 animationDuration: 1.8
spriteName: medical spriteName: medical
startingInventory: startingInventory:
HandheldHealthAnalyzer: 4 HandheldHealthAnalyzer: 3
Brutepack: 5 Brutepack: 5
Ointment: 5 Ointment: 5
EpinephrineChemistryBottle: 3 EpinephrineChemistryBottle: 3

View File

@@ -35,6 +35,8 @@
mask: /Textures/Effects/LightMasks/cone.png mask: /Textures/Effects/LightMasks/cone.png
autoRot: true autoRot: true
- type: Ringer - type: Ringer
- type: ActivatableUI
key: enum.PDAUiKey.Key
- type: UserInterface - type: UserInterface
interfaces: interfaces:
- key: enum.PDAUiKey.Key - key: enum.PDAUiKey.Key
@@ -45,6 +47,8 @@
type: RingerBoundUserInterface type: RingerBoundUserInterface
- key: enum.InstrumentUiKey.Key - key: enum.InstrumentUiKey.Key
type: InstrumentBoundUserInterface type: InstrumentBoundUserInterface
- key: enum.HealthAnalyzerUiKey.Key
type: HealthAnalyzerBoundUserInterface
- type: PDA - type: PDA
penSlot: penSlot:
startingItem: Pen startingItem: Pen
@@ -355,7 +359,7 @@
parent: BasePDA parent: BasePDA
id: CMOPDA id: CMOPDA
name: chief medical officer PDA name: chief medical officer PDA
description: Extraordinarily shiny and sterile. description: Extraordinarily shiny and sterile. Has a built-in health analyzer.
components: components:
- type: PDA - type: PDA
id: CMOIDCard id: CMOIDCard
@@ -365,12 +369,14 @@
state: pda-cmo state: pda-cmo
- type: Icon - type: Icon
state: pda-cmo state: pda-cmo
- type: HealthAnalyzer
scanDelay: 1
- type: entity - type: entity
parent: BasePDA parent: BasePDA
id: MedicalPDA id: MedicalPDA
name: medical PDA name: medical PDA
description: Shiny and sterile. description: Shiny and sterile. Has a built-in health analyzer.
components: components:
- type: PDA - type: PDA
id: MedicalIDCard id: MedicalIDCard
@@ -380,6 +386,8 @@
state: pda-medical state: pda-medical
- type: Icon - type: Icon
state: pda-medical state: pda-medical
- type: HealthAnalyzer
scanDelay: 1.2
- type: entity - type: entity
parent: BasePDA parent: BasePDA