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
|
/// Sound played on scanning end
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public SoundSpecifier? ScanningEndSound;
|
public SoundSpecifier ScanningEndSound = new SoundPathSpecifier("/Audio/Items/Medical/healthscanner.ogg");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether to show up the popup
|
/// Whether to show up the popup
|
||||||
|
|||||||
@@ -13,11 +13,9 @@ using Content.Shared.Item.ItemToggle.Components;
|
|||||||
using Content.Shared.MedicalScanner;
|
using Content.Shared.MedicalScanner;
|
||||||
using Content.Shared.Mobs.Components;
|
using Content.Shared.Mobs.Components;
|
||||||
using Content.Shared.Popups;
|
using Content.Shared.Popups;
|
||||||
using Content.Shared.PowerCell;
|
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Shared.Audio.Systems;
|
using Robust.Shared.Audio.Systems;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.Player;
|
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
namespace Content.Server.Medical;
|
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))
|
if (args.Handled || args.Cancelled || args.Target == null || !_cell.HasDrawCharge(uid, user: args.User))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_audio.PlayPvs(uid.Comp.ScanningEndSound, uid);
|
if (!uid.Comp.Silent)
|
||||||
|
_audio.PlayPvs(uid.Comp.ScanningEndSound, uid);
|
||||||
|
|
||||||
OpenUserInterface(args.User, uid);
|
OpenUserInterface(args.User, uid);
|
||||||
BeginAnalyzingEntity(uid, args.Target.Value);
|
BeginAnalyzingEntity(uid, args.Target.Value);
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ log-probe-label-number = #
|
|||||||
|
|
||||||
astro-nav-program-name = AstroNav
|
astro-nav-program-name = AstroNav
|
||||||
|
|
||||||
|
med-tek-program-name = MedTek
|
||||||
|
|
||||||
# Wanted list cartridge
|
# Wanted list cartridge
|
||||||
wanted-list-program-name = Wanted list
|
wanted-list-program-name = Wanted list
|
||||||
wanted-list-label-no-records = It's all right, cowboy
|
wanted-list-label-no-records = It's all right, cowboy
|
||||||
|
|||||||
@@ -219,6 +219,7 @@
|
|||||||
- id: MedicalTechFabCircuitboard
|
- id: MedicalTechFabCircuitboard
|
||||||
- id: MedkitFilled
|
- id: MedkitFilled
|
||||||
- id: RubberStampCMO
|
- id: RubberStampCMO
|
||||||
|
- id: MedTekCartridge
|
||||||
|
|
||||||
# Hardsuit table, used for suit storage as well
|
# Hardsuit table, used for suit storage as well
|
||||||
- type: entityTable
|
- type: entityTable
|
||||||
|
|||||||
@@ -117,6 +117,25 @@
|
|||||||
- type: StealTarget
|
- type: StealTarget
|
||||||
stealGroup: WantedListCartridge
|
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
|
- type: entity
|
||||||
parent: BaseItem
|
parent: BaseItem
|
||||||
id: AstroNavCartridge
|
id: AstroNavCartridge
|
||||||
|
|||||||
@@ -131,12 +131,13 @@
|
|||||||
id: BaseMedicalPDA
|
id: BaseMedicalPDA
|
||||||
abstract: true
|
abstract: true
|
||||||
components:
|
components:
|
||||||
- type: ItemToggle
|
- type: CartridgeLoader
|
||||||
onUse: false
|
uiKey: enum.PdaUiKey.Key
|
||||||
- type: HealthAnalyzer
|
preinstalled:
|
||||||
scanDelay: 1
|
- CrewManifestCartridge
|
||||||
scanningEndSound:
|
- NotekeeperCartridge
|
||||||
path: "/Audio/Items/Medical/healthscanner.ogg"
|
- NewsReaderCartridge
|
||||||
|
- MedTekCartridge
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: BasePDA
|
parent: BasePDA
|
||||||
@@ -169,7 +170,7 @@
|
|||||||
parent: BaseMedicalPDA
|
parent: BaseMedicalPDA
|
||||||
id: MedicalInternPDA
|
id: MedicalInternPDA
|
||||||
name: medical intern PDA
|
name: medical intern PDA
|
||||||
description: Why isn't it white? Has a built-in health analyzer.
|
description: Why isn't it white?
|
||||||
components:
|
components:
|
||||||
- type: Pda
|
- type: Pda
|
||||||
id: MedicalInternIDCard
|
id: MedicalInternIDCard
|
||||||
@@ -569,7 +570,7 @@
|
|||||||
parent: BaseMedicalPDA
|
parent: BaseMedicalPDA
|
||||||
id: CMOPDA
|
id: CMOPDA
|
||||||
name: chief medical officer PDA
|
name: chief medical officer PDA
|
||||||
description: Extraordinarily shiny and sterile. Has a built-in health analyzer.
|
description: Extraordinarily shiny and sterile.
|
||||||
components:
|
components:
|
||||||
- type: Pda
|
- type: Pda
|
||||||
id: CMOIDCard
|
id: CMOIDCard
|
||||||
@@ -585,7 +586,7 @@
|
|||||||
parent: BaseMedicalPDA
|
parent: BaseMedicalPDA
|
||||||
id: MedicalPDA
|
id: MedicalPDA
|
||||||
name: medical PDA
|
name: medical PDA
|
||||||
description: Shiny and sterile. Has a built-in health analyzer.
|
description: Shiny and sterile.
|
||||||
components:
|
components:
|
||||||
- type: Pda
|
- type: Pda
|
||||||
id: MedicalIDCard
|
id: MedicalIDCard
|
||||||
@@ -612,7 +613,7 @@
|
|||||||
parent: BaseMedicalPDA
|
parent: BaseMedicalPDA
|
||||||
id: ParamedicPDA
|
id: ParamedicPDA
|
||||||
name: paramedic PDA
|
name: paramedic PDA
|
||||||
description: Shiny and sterile. Has a built-in rapid health analyzer.
|
description: Shiny and sterile.
|
||||||
components:
|
components:
|
||||||
- type: Pda
|
- type: Pda
|
||||||
id: ParamedicIDCard
|
id: ParamedicIDCard
|
||||||
@@ -905,14 +906,18 @@
|
|||||||
id: ERTMedicPDA
|
id: ERTMedicPDA
|
||||||
name: ERT Medic PDA
|
name: ERT Medic PDA
|
||||||
suffix: Medic
|
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:
|
components:
|
||||||
- type: Pda
|
- type: Pda
|
||||||
id: ERTMedicIDCard
|
id: ERTMedicIDCard
|
||||||
- type: HealthAnalyzer
|
- type: CartridgeLoader
|
||||||
scanDelay: 1
|
uiKey: enum.PdaUiKey.Key
|
||||||
scanningEndSound:
|
preinstalled:
|
||||||
path: "/Audio/Items/Medical/healthscanner.ogg"
|
- CrewManifestCartridge
|
||||||
|
- NotekeeperCartridge
|
||||||
|
- NewsReaderCartridge
|
||||||
|
- MedTekCartridge
|
||||||
|
- WantedListCartridge
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: ERTLeaderPDA
|
parent: ERTLeaderPDA
|
||||||
@@ -1019,7 +1024,7 @@
|
|||||||
parent: BaseMedicalPDA
|
parent: BaseMedicalPDA
|
||||||
id: BrigmedicPDA
|
id: BrigmedicPDA
|
||||||
name: brigmedic PDA
|
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:
|
components:
|
||||||
- type: Pda
|
- type: Pda
|
||||||
id: BrigmedicIDCard
|
id: BrigmedicIDCard
|
||||||
@@ -1089,7 +1094,7 @@
|
|||||||
parent: BaseMedicalPDA
|
parent: BaseMedicalPDA
|
||||||
id: SeniorPhysicianPDA
|
id: SeniorPhysicianPDA
|
||||||
name: senior physician PDA
|
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:
|
components:
|
||||||
- type: Pda
|
- type: Pda
|
||||||
id: SeniorPhysicianIDCard
|
id: SeniorPhysicianIDCard
|
||||||
@@ -1145,6 +1150,7 @@
|
|||||||
uiKey: enum.PdaUiKey.Key
|
uiKey: enum.PdaUiKey.Key
|
||||||
preinstalled:
|
preinstalled:
|
||||||
- NotekeeperCartridge
|
- NotekeeperCartridge
|
||||||
|
- MedTekCartridge
|
||||||
cartridgeSlot:
|
cartridgeSlot:
|
||||||
priority: -1
|
priority: -1
|
||||||
name: Cartridge
|
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,
|
"version": 1,
|
||||||
"license": "CC-BY-SA-3.0",
|
"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": {
|
"size": {
|
||||||
"x": 32,
|
"x": 32,
|
||||||
"y": 32
|
"y": 32
|
||||||
@@ -55,6 +55,9 @@
|
|||||||
{
|
{
|
||||||
"name": "cart-m"
|
"name": "cart-m"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "cart-med"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "cart-mi"
|
"name": "cart-mi"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user