diff --git a/Content.Server/Explosion/EntitySystems/TriggerSystem.cs b/Content.Server/Explosion/EntitySystems/TriggerSystem.cs index 569417f1414..0bca0d80f67 100644 --- a/Content.Server/Explosion/EntitySystems/TriggerSystem.cs +++ b/Content.Server/Explosion/EntitySystems/TriggerSystem.cs @@ -23,6 +23,7 @@ using Content.Shared.Mobs; using Content.Shared.Mobs.Components; using Content.Shared.Weapons.Ranged.Events; +using Content.Server.Station.Systems; namespace Content.Server.Explosion.EntitySystems { @@ -61,6 +62,7 @@ public sealed partial class TriggerSystem : EntitySystem [Dependency] private readonly SharedTransformSystem _transformSystem = default!; [Dependency] private readonly RadioSystem _radioSystem = default!; [Dependency] private readonly IPrototypeManager _prototypeManager = default!; + [Dependency] private readonly StationSystem _station = default!; public override void Initialize() { @@ -167,8 +169,21 @@ private void HandleRattleTrigger(EntityUid uid, RattleComponent component, Trigg var y = (int) pos.Y; var posText = $"({x}, {y})"; - var critMessage = Loc.GetString(component.CritMessage, ("user", implanted.ImplantedEntity.Value), ("position", posText)); - var deathMessage = Loc.GetString(component.DeathMessage, ("user", implanted.ImplantedEntity.Value), ("position", posText)); + // Gets station location of the implant + var station = _station.GetOwningStation(uid); + var stationName = station is null ? null : Name(station.Value); + + if (!(stationName == null)) + { + stationName += " "; + } + else + { + stationName = ""; + } + + var critMessage = Loc.GetString(component.CritMessage, ("user", implanted.ImplantedEntity.Value), ("grid", stationName!), ("position", posText)); + var deathMessage = Loc.GetString(component.DeathMessage, ("user", implanted.ImplantedEntity.Value), ("grid", stationName!), ("position", posText)); if (!TryComp(implanted.ImplantedEntity, out var mobstate)) return; diff --git a/Resources/Locale/en-US/_NF/paper/book-medical-insurance.ftl b/Resources/Locale/en-US/_NF/paper/book-medical-insurance.ftl new file mode 100644 index 00000000000..ccf3e65f526 --- /dev/null +++ b/Resources/Locale/en-US/_NF/paper/book-medical-insurance.ftl @@ -0,0 +1,20 @@ +book-medical-insurance = This form is a contract made with the medical frovider: + -------------------------------------------------------------------------------------- + SECTION 1: Info + -------------------------------------------------------------------------------------- + Full Name : + Race : + Blood Type : + Ship : + + -------------------------------------------------------------------------------------- + SECTION 2: Services + -------------------------------------------------------------------------------------- + As part of our service we will attemp to come and aid you in the case of your medical implant going off. + + (X) Revive = Up to 8k + (X) Clone = Up to 10k + + In the case were unable to clone you, with your brain still intact, you also agree to be borged: + + ( ) Borg = Up to 20k diff --git a/Resources/Locale/en-US/_NF/prototypes/catalog/cargo/cargo-medical.ftl b/Resources/Locale/en-US/_NF/prototypes/catalog/cargo/cargo-medical.ftl new file mode 100644 index 00000000000..ab86d7b6932 --- /dev/null +++ b/Resources/Locale/en-US/_NF/prototypes/catalog/cargo/cargo-medical.ftl @@ -0,0 +1,2 @@ +ent-MedicalTrackingImplants = { ent-CrateMedicalTrackingImplants } + .desc = { ent-CrateMedicalTrackingImplants.desc } diff --git a/Resources/Locale/en-US/_NF/prototypes/catalog/fills/crates/medical-crates.ftl b/Resources/Locale/en-US/_NF/prototypes/catalog/fills/crates/medical-crates.ftl new file mode 100644 index 00000000000..aa17c042e29 --- /dev/null +++ b/Resources/Locale/en-US/_NF/prototypes/catalog/fills/crates/medical-crates.ftl @@ -0,0 +1,2 @@ +ent-CrateMedicalTrackingImplants = Medical insurance tracking implants + .desc = Contains a handful of medical insurance tracking implanters. make sure to sign with a provider, or hope for an independent medical help. diff --git a/Resources/Locale/en-US/implant/implant.ftl b/Resources/Locale/en-US/implant/implant.ftl index bdc82c291d8..e3fc4bc69e1 100644 --- a/Resources/Locale/en-US/implant/implant.ftl +++ b/Resources/Locale/en-US/implant/implant.ftl @@ -20,5 +20,5 @@ scramble-implant-activated-popup = Your appearance shifts and changes! ## Implant Messages -deathrattle-implant-dead-message = {$user} has died at {$position}. -deathrattle-implant-critical-message = {$user} life signs critical, immediate assistance required at {$position}. +deathrattle-implant-dead-message = {$user} has died at {$grid}{$position}. +deathrattle-implant-critical-message = {$user} life signs critical, immediate assistance required at {$grid}{$position}. diff --git a/Resources/Prototypes/Catalog/VendingMachines/Inventories/medical.yml b/Resources/Prototypes/Catalog/VendingMachines/Inventories/medical.yml index c9f7f4b0b57..ef1c5654742 100644 --- a/Resources/Prototypes/Catalog/VendingMachines/Inventories/medical.yml +++ b/Resources/Prototypes/Catalog/VendingMachines/Inventories/medical.yml @@ -7,3 +7,4 @@ Bloodpack: 15 EpinephrineChemistryBottle: 9 Syringe: 15 + BoxMedicalTrackingImplants: 15 diff --git a/Resources/Prototypes/Entities/Objects/Misc/subdermal_implants.yml b/Resources/Prototypes/Entities/Objects/Misc/subdermal_implants.yml index 772dd45029d..d1ac9003d47 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/subdermal_implants.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/subdermal_implants.yml @@ -91,7 +91,7 @@ transmitFrequencyId: SuitSensor - type: StationLimitedNetwork - type: WirelessNetworkConnection - range: 500 + range: 10000 - type: TriggerOnMobstateChange mobState: - Critical diff --git a/Resources/Prototypes/_NF/Catalog/Cargo/cargo_medical.yml b/Resources/Prototypes/_NF/Catalog/Cargo/cargo_medical.yml new file mode 100644 index 00000000000..83c226c0b77 --- /dev/null +++ b/Resources/Prototypes/_NF/Catalog/Cargo/cargo_medical.yml @@ -0,0 +1,9 @@ +- type: cargoProduct + id: MedicalTrackingImplant + icon: + sprite: Objects/Specific/Chemistry/syringe.rsi + state: syringe_base0 + product: CrateMedicalTrackingImplants + cost: 1000 + category: Medical + group: market diff --git a/Resources/Prototypes/_NF/Catalog/Fills/Boxes/general.yml b/Resources/Prototypes/_NF/Catalog/Fills/Boxes/general.yml new file mode 100644 index 00000000000..3de71493fa0 --- /dev/null +++ b/Resources/Prototypes/_NF/Catalog/Fills/Boxes/general.yml @@ -0,0 +1,24 @@ +- type: entity + name: medical insurance tracking implant box + parent: BoxCardboard + id: BoxMedicalTrackingImplants + description: Medical insurance implant kit. + components: + - type: Item + size: 60 + - type: StorageFill + contents: + - id: MedicalTrackingImplanter + amount: 1 + - id: HandheldGPSBasic + amount: 1 + - id: PaperMedicalInsurance + amount: 1 + - type: Storage + capacity: 60 + - type: Sprite + layers: + - state: box + - state: syringe + - type: VendPrice + price: 200 # Single Implant Box (5 are 1000) diff --git a/Resources/Prototypes/_NF/Catalog/Fills/Crates/medical.yml b/Resources/Prototypes/_NF/Catalog/Fills/Crates/medical.yml new file mode 100644 index 00000000000..654233e2ae3 --- /dev/null +++ b/Resources/Prototypes/_NF/Catalog/Fills/Crates/medical.yml @@ -0,0 +1,8 @@ +- type: entity + id: CrateMedicalTrackingImplants + parent: CrateMedical + components: + - type: StorageFill + contents: + - id: BoxMedicalTrackingImplants + amount: 5 diff --git a/Resources/Prototypes/_NF/Entities/Objects/Misc/implanters.yml b/Resources/Prototypes/_NF/Entities/Objects/Misc/implanters.yml new file mode 100644 index 00000000000..9872e713e1d --- /dev/null +++ b/Resources/Prototypes/_NF/Entities/Objects/Misc/implanters.yml @@ -0,0 +1,9 @@ +#Medical implanters + +- type: entity + id: MedicalTrackingImplanter + name: medical insurance tracking implanter + parent: BaseImplantOnlyImplanter + components: + - type: Implanter + implant: MedicalTrackingImplant diff --git a/Resources/Prototypes/_NF/Entities/Objects/Misc/paper.yml b/Resources/Prototypes/_NF/Entities/Objects/Misc/paper.yml new file mode 100644 index 00000000000..4c6f8ab1c52 --- /dev/null +++ b/Resources/Prototypes/_NF/Entities/Objects/Misc/paper.yml @@ -0,0 +1,29 @@ +- type: entity + name: Medical insurance form + parent: Paper + id: PaperMedicalInsurance + description: 'Provide this papar for an insurance provider.' + components: + - type: Paper + contentSize: 10000 + escapeFormatting: false + content: book-medical-insurance + - type: Sprite + sprite: Objects/Misc/bureaucracy.rsi + layers: + - state: paper + color: "#cccccc" + - state: paper_words + map: ["enum.PaperVisualLayers.Writing"] + color: "#cccccc" #aaaaaaaaaaaaaaaaaaaaaaa + visible: false + - state: paper_stamp-generic + map: ["enum.PaperVisualLayers.Stamp"] + visible: false + - type: PaperVisuals + backgroundImagePath: "/Textures/Interface/Paper/paper_background_default.svg.96dpi.png" + contentImagePath: "/Textures/Interface/Paper/paper_content_lined.svg.96dpi.png" + backgroundModulate: "#cccccc" + contentImageModulate: "#cccccc" + backgroundPatchMargin: 16.0, 16.0, 16.0, 16.0 + contentMargin: 16.0, 16.0, 16.0, 16.0 diff --git a/Resources/Prototypes/_NF/Entities/Objects/Misc/subdermal_implants.yml b/Resources/Prototypes/_NF/Entities/Objects/Misc/subdermal_implants.yml new file mode 100644 index 00000000000..ed024b64248 --- /dev/null +++ b/Resources/Prototypes/_NF/Entities/Objects/Misc/subdermal_implants.yml @@ -0,0 +1,27 @@ +#Medical implants + +- type: entity + parent: BaseSubdermalImplant + id: MedicalTrackingImplant + name: medical insurance tracking implant + description: This implant has a tracking device attached to the suit sensor network, as well as a condition monitor for the Medical radio channel. + noSpawn: true + components: + - type: SubdermalImplant + - type: SuitSensor + randomMode: false + controlsLocked: true + mode: SensorCords + activationContainer: "implant" + - type: DeviceNetwork + deviceNetId: Wireless + transmitFrequencyId: SuitSensor + - type: StationLimitedNetwork + - type: WirelessNetworkConnection + range: 10000 + - type: TriggerOnMobstateChange + mobState: + - Critical + - Dead + - type: Rattle + radioChannel: "Medical"