MedTek Cartridge (#32450)
* initial commit * adds cartridge to cmo's locker * tidies up yml, adds default scanner sound, makes it so the silent property silences the scanner sound too * fixes ert medic pda not having it preinstalled * adds attribution * removes redundant dependencies * fix agent pda --------- Co-authored-by: archrbx <punk.gear5260@fastmail.com>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
namespace Content.Server.CartridgeLoader.Cartridges;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed partial class MedTekCartridgeComponent : Component
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using Content.Server.Medical.Components;
|
||||
using Content.Shared.CartridgeLoader;
|
||||
|
||||
namespace Content.Server.CartridgeLoader.Cartridges;
|
||||
|
||||
public sealed class MedTekCartridgeSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly CartridgeLoaderSystem _cartridgeLoaderSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<MedTekCartridgeComponent, CartridgeAddedEvent>(OnCartridgeAdded);
|
||||
SubscribeLocalEvent<MedTekCartridgeComponent, CartridgeRemovedEvent>(OnCartridgeRemoved);
|
||||
}
|
||||
|
||||
private void OnCartridgeAdded(Entity<MedTekCartridgeComponent> ent, ref CartridgeAddedEvent args)
|
||||
{
|
||||
var healthAnalyzer = EnsureComp<HealthAnalyzerComponent>(args.Loader);
|
||||
}
|
||||
|
||||
private void OnCartridgeRemoved(Entity<MedTekCartridgeComponent> ent, ref CartridgeRemovedEvent args)
|
||||
{
|
||||
// only remove when the program itself is removed
|
||||
if (!_cartridgeLoaderSystem.HasProgram<MedTekCartridgeComponent>(args.Loader))
|
||||
{
|
||||
RemComp<HealthAnalyzerComponent>(args.Loader);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -54,7 +54,7 @@ public sealed partial class HealthAnalyzerComponent : Component
|
||||
/// Sound played on scanning end
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public SoundSpecifier? ScanningEndSound;
|
||||
public SoundSpecifier ScanningEndSound = new SoundPathSpecifier("/Audio/Items/Medical/healthscanner.ogg");
|
||||
|
||||
/// <summary>
|
||||
/// Whether to show up the popup
|
||||
|
||||
@@ -13,11 +13,9 @@ using Content.Shared.Item.ItemToggle.Components;
|
||||
using Content.Shared.MedicalScanner;
|
||||
using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.PowerCell;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.Server.Medical;
|
||||
@@ -104,7 +102,8 @@ public sealed class HealthAnalyzerSystem : EntitySystem
|
||||
if (args.Handled || args.Cancelled || args.Target == null || !_cell.HasDrawCharge(uid, user: args.User))
|
||||
return;
|
||||
|
||||
_audio.PlayPvs(uid.Comp.ScanningEndSound, uid);
|
||||
if (!uid.Comp.Silent)
|
||||
_audio.PlayPvs(uid.Comp.ScanningEndSound, uid);
|
||||
|
||||
OpenUserInterface(args.User, uid);
|
||||
BeginAnalyzingEntity(uid, args.Target.Value);
|
||||
|
||||
@@ -22,6 +22,8 @@ log-probe-label-number = #
|
||||
|
||||
astro-nav-program-name = AstroNav
|
||||
|
||||
med-tek-program-name = MedTek
|
||||
|
||||
# Wanted list cartridge
|
||||
wanted-list-program-name = Wanted list
|
||||
wanted-list-label-no-records = It's all right, cowboy
|
||||
|
||||
@@ -219,6 +219,7 @@
|
||||
- id: MedicalTechFabCircuitboard
|
||||
- id: MedkitFilled
|
||||
- id: RubberStampCMO
|
||||
- id: MedTekCartridge
|
||||
|
||||
# Hardsuit table, used for suit storage as well
|
||||
- type: entityTable
|
||||
|
||||
@@ -117,6 +117,25 @@
|
||||
- type: StealTarget
|
||||
stealGroup: WantedListCartridge
|
||||
|
||||
- type: entity
|
||||
parent: BaseItem
|
||||
id: MedTekCartridge
|
||||
name: MedTek cartridge
|
||||
description: A program that provides medical diagnostic tools.
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Devices/cartridge.rsi
|
||||
state: cart-med
|
||||
- type: Icon
|
||||
sprite: Objects/Devices/cartridge.rsi
|
||||
state: cart-med
|
||||
- type: Cartridge
|
||||
programName: med-tek-program-name
|
||||
icon:
|
||||
sprite: Objects/Specific/Medical/healthanalyzer.rsi
|
||||
state: icon
|
||||
- type: MedTekCartridge
|
||||
|
||||
- type: entity
|
||||
parent: BaseItem
|
||||
id: AstroNavCartridge
|
||||
|
||||
@@ -131,12 +131,13 @@
|
||||
id: BaseMedicalPDA
|
||||
abstract: true
|
||||
components:
|
||||
- type: ItemToggle
|
||||
onUse: false
|
||||
- type: HealthAnalyzer
|
||||
scanDelay: 1
|
||||
scanningEndSound:
|
||||
path: "/Audio/Items/Medical/healthscanner.ogg"
|
||||
- type: CartridgeLoader
|
||||
uiKey: enum.PdaUiKey.Key
|
||||
preinstalled:
|
||||
- CrewManifestCartridge
|
||||
- NotekeeperCartridge
|
||||
- NewsReaderCartridge
|
||||
- MedTekCartridge
|
||||
|
||||
- type: entity
|
||||
parent: BasePDA
|
||||
@@ -169,7 +170,7 @@
|
||||
parent: BaseMedicalPDA
|
||||
id: MedicalInternPDA
|
||||
name: medical intern PDA
|
||||
description: Why isn't it white? Has a built-in health analyzer.
|
||||
description: Why isn't it white?
|
||||
components:
|
||||
- type: Pda
|
||||
id: MedicalInternIDCard
|
||||
@@ -569,7 +570,7 @@
|
||||
parent: BaseMedicalPDA
|
||||
id: CMOPDA
|
||||
name: chief medical officer PDA
|
||||
description: Extraordinarily shiny and sterile. Has a built-in health analyzer.
|
||||
description: Extraordinarily shiny and sterile.
|
||||
components:
|
||||
- type: Pda
|
||||
id: CMOIDCard
|
||||
@@ -585,7 +586,7 @@
|
||||
parent: BaseMedicalPDA
|
||||
id: MedicalPDA
|
||||
name: medical PDA
|
||||
description: Shiny and sterile. Has a built-in health analyzer.
|
||||
description: Shiny and sterile.
|
||||
components:
|
||||
- type: Pda
|
||||
id: MedicalIDCard
|
||||
@@ -612,7 +613,7 @@
|
||||
parent: BaseMedicalPDA
|
||||
id: ParamedicPDA
|
||||
name: paramedic PDA
|
||||
description: Shiny and sterile. Has a built-in rapid health analyzer.
|
||||
description: Shiny and sterile.
|
||||
components:
|
||||
- type: Pda
|
||||
id: ParamedicIDCard
|
||||
@@ -905,14 +906,18 @@
|
||||
id: ERTMedicPDA
|
||||
name: ERT Medic PDA
|
||||
suffix: Medic
|
||||
description: Red for firepower, it's shiny and sterile. Has a built-in rapid health analyzer.
|
||||
description: Red for firepower, it's shiny and sterile.
|
||||
components:
|
||||
- type: Pda
|
||||
id: ERTMedicIDCard
|
||||
- type: HealthAnalyzer
|
||||
scanDelay: 1
|
||||
scanningEndSound:
|
||||
path: "/Audio/Items/Medical/healthscanner.ogg"
|
||||
- type: CartridgeLoader
|
||||
uiKey: enum.PdaUiKey.Key
|
||||
preinstalled:
|
||||
- CrewManifestCartridge
|
||||
- NotekeeperCartridge
|
||||
- NewsReaderCartridge
|
||||
- MedTekCartridge
|
||||
- WantedListCartridge
|
||||
|
||||
- type: entity
|
||||
parent: ERTLeaderPDA
|
||||
@@ -1019,7 +1024,7 @@
|
||||
parent: BaseMedicalPDA
|
||||
id: BrigmedicPDA
|
||||
name: brigmedic PDA
|
||||
description: I wonder whose pulse is on the screen? I hope he doesnt stop... PDA has a built-in health analyzer.
|
||||
description: I wonder whose pulse is on the screen? I hope it doesn't stop...
|
||||
components:
|
||||
- type: Pda
|
||||
id: BrigmedicIDCard
|
||||
@@ -1089,7 +1094,7 @@
|
||||
parent: BaseMedicalPDA
|
||||
id: SeniorPhysicianPDA
|
||||
name: senior physician PDA
|
||||
description: Smells faintly like iron and chemicals. Has a built-in health analyzer.
|
||||
description: Smells faintly like iron and chemicals.
|
||||
components:
|
||||
- type: Pda
|
||||
id: SeniorPhysicianIDCard
|
||||
@@ -1145,6 +1150,7 @@
|
||||
uiKey: enum.PdaUiKey.Key
|
||||
preinstalled:
|
||||
- NotekeeperCartridge
|
||||
- MedTekCartridge
|
||||
cartridgeSlot:
|
||||
priority: -1
|
||||
name: Cartridge
|
||||
|
||||
BIN
Resources/Textures/Objects/Devices/cartridge.rsi/cart-med.png
Normal file
BIN
Resources/Textures/Objects/Devices/cartridge.rsi/cart-med.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 289 B |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 1,
|
||||
"license": "CC-BY-SA-3.0",
|
||||
"copyright": "Taken from vgstation at https://github.com/vgstation-coders/vgstation13/commit/1cdfb0230cc96d0ba751fa002d04f8aa2f25ad7d and tgstation at tgstation at https://github.com/tgstation/tgstation/commit/0c15d9dbcf0f2beb230eba5d9d889ef2d1945bb8, cart-log made by Skarletto (github), cart-sec made by dieselmohawk (discord), cart-nav made by ArchRBX (github)",
|
||||
"copyright": "Taken from vgstation at https://github.com/vgstation-coders/vgstation13/commit/1cdfb0230cc96d0ba751fa002d04f8aa2f25ad7d and tgstation at tgstation at https://github.com/tgstation/tgstation/commit/0c15d9dbcf0f2beb230eba5d9d889ef2d1945bb8, cart-log made by Skarletto (github), cart-sec made by dieselmohawk (discord), cart-nav, cart-med made by ArchRBX (github)",
|
||||
"size": {
|
||||
"x": 32,
|
||||
"y": 32
|
||||
@@ -55,6 +55,9 @@
|
||||
{
|
||||
"name": "cart-m"
|
||||
},
|
||||
{
|
||||
"name": "cart-med"
|
||||
},
|
||||
{
|
||||
"name": "cart-mi"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user