From 1763a64e37adf1e081b5420389d80367cb848dae Mon Sep 17 00:00:00 2001 From: Dvir Date: Wed, 20 Sep 2023 23:45:32 +0300 Subject: [PATCH 01/11] Medical insurance tracking implant --- .../Explosion/EntitySystems/TriggerSystem.cs | 19 ++++++++++-- .../_NF/paper/book-medical-insurance.ftl | 21 ++++++++++++++ .../catalog/cargo/cargo-medical.ftl | 2 ++ .../catalog/fills/crates/medical-crates.ftl | 2 ++ Resources/Locale/en-US/implant/implant.ftl | 4 +-- .../Objects/Misc/subdermal_implants.yml | 2 +- .../_NF/Catalog/Cargo/cargo_medical.yml | 9 ++++++ .../_NF/Catalog/Fills/Boxes/general.yml | 24 +++++++++++++++ .../_NF/Catalog/Fills/Crates/medical.yml | 8 +++++ .../_NF/Entities/Objects/Misc/implanters.yml | 9 ++++++ .../_NF/Entities/Objects/Misc/paper.yml | 29 +++++++++++++++++++ .../Objects/Misc/subdermal_implants.yml | 27 +++++++++++++++++ 12 files changed, 151 insertions(+), 5 deletions(-) create mode 100644 Resources/Locale/en-US/_NF/paper/book-medical-insurance.ftl create mode 100644 Resources/Locale/en-US/_NF/prototypes/catalog/cargo/cargo-medical.ftl create mode 100644 Resources/Locale/en-US/_NF/prototypes/catalog/fills/crates/medical-crates.ftl create mode 100644 Resources/Prototypes/_NF/Catalog/Cargo/cargo_medical.yml create mode 100644 Resources/Prototypes/_NF/Catalog/Fills/Boxes/general.yml create mode 100644 Resources/Prototypes/_NF/Catalog/Fills/Crates/medical.yml create mode 100644 Resources/Prototypes/_NF/Entities/Objects/Misc/implanters.yml create mode 100644 Resources/Prototypes/_NF/Entities/Objects/Misc/paper.yml create mode 100644 Resources/Prototypes/_NF/Entities/Objects/Misc/subdermal_implants.yml 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..70d560fde7f --- /dev/null +++ b/Resources/Locale/en-US/_NF/paper/book-medical-insurance.ftl @@ -0,0 +1,21 @@ +book-medical-insurance = This form is a contract made with the medical frovider: + -------------------------------------------------------------------------------------- + SECTION 1: Info + -------------------------------------------------------------------------------------- + + Full Name : + Race : + Blood Type : + + -------------------------------------------------------------------------------------- + SECTION 3: 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 5k + (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 \ No newline at end of file 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/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..71aa1a543da --- /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 + - id: RubberStampCaptain + amount: 1 + - type: Storage + capacity: 60 + - type: Sprite + layers: + - state: box + - state: syringe 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..59b4ecabd8e --- /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: MedicalTrackingImplanter + amount: 5 \ No newline at end of file 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..35241524681 --- /dev/null +++ b/Resources/Prototypes/_NF/Entities/Objects/Misc/paper.yml @@ -0,0 +1,29 @@ +- type: entity + name: Medical record form for insurance. + 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" From 357b075020b39b66bc56c39ddd4fe91eb548a98c Mon Sep 17 00:00:00 2001 From: Dvir <39403717+dvir001@users.noreply.github.com> Date: Wed, 20 Sep 2023 23:54:13 +0300 Subject: [PATCH 02/11] Update book-medical-insurance.ftl --- Resources/Locale/en-US/_NF/paper/book-medical-insurance.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Resources/Locale/en-US/_NF/paper/book-medical-insurance.ftl b/Resources/Locale/en-US/_NF/paper/book-medical-insurance.ftl index 70d560fde7f..1d2e62d9f98 100644 --- a/Resources/Locale/en-US/_NF/paper/book-medical-insurance.ftl +++ b/Resources/Locale/en-US/_NF/paper/book-medical-insurance.ftl @@ -13,9 +13,9 @@ book-medical-insurance = This form is a contract made with the medical frovider: 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 5k + (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 \ No newline at end of file + ( ) Borg = Up to 20k From 74e839ac0f721a7051c8f51606a9ab9f0248c1bb Mon Sep 17 00:00:00 2001 From: Dvir <39403717+dvir001@users.noreply.github.com> Date: Wed, 20 Sep 2023 23:55:19 +0300 Subject: [PATCH 03/11] Update medical.yml --- Resources/Prototypes/_NF/Catalog/Fills/Crates/medical.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Resources/Prototypes/_NF/Catalog/Fills/Crates/medical.yml b/Resources/Prototypes/_NF/Catalog/Fills/Crates/medical.yml index 59b4ecabd8e..654233e2ae3 100644 --- a/Resources/Prototypes/_NF/Catalog/Fills/Crates/medical.yml +++ b/Resources/Prototypes/_NF/Catalog/Fills/Crates/medical.yml @@ -4,5 +4,5 @@ components: - type: StorageFill contents: - - id: MedicalTrackingImplanter - amount: 5 \ No newline at end of file + - id: BoxMedicalTrackingImplants + amount: 5 From f06df4e1b7c267e5dcfd2dd03d560aff6650d803 Mon Sep 17 00:00:00 2001 From: Dvir <39403717+dvir001@users.noreply.github.com> Date: Wed, 20 Sep 2023 23:57:43 +0300 Subject: [PATCH 04/11] Update book-medical-insurance.ftl --- Resources/Locale/en-US/_NF/paper/book-medical-insurance.ftl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Resources/Locale/en-US/_NF/paper/book-medical-insurance.ftl b/Resources/Locale/en-US/_NF/paper/book-medical-insurance.ftl index 1d2e62d9f98..bcfacba9c98 100644 --- a/Resources/Locale/en-US/_NF/paper/book-medical-insurance.ftl +++ b/Resources/Locale/en-US/_NF/paper/book-medical-insurance.ftl @@ -2,15 +2,13 @@ book-medical-insurance = This form is a contract made with the medical frovider: -------------------------------------------------------------------------------------- SECTION 1: Info -------------------------------------------------------------------------------------- - Full Name : Race : Blood Type : -------------------------------------------------------------------------------------- - SECTION 3: Services + 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 From 87f9232e83832649f90572f6d4941855f54bb8bb Mon Sep 17 00:00:00 2001 From: Dvir <39403717+dvir001@users.noreply.github.com> Date: Wed, 20 Sep 2023 23:59:18 +0300 Subject: [PATCH 05/11] Update paper.yml --- Resources/Prototypes/_NF/Entities/Objects/Misc/paper.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Prototypes/_NF/Entities/Objects/Misc/paper.yml b/Resources/Prototypes/_NF/Entities/Objects/Misc/paper.yml index 35241524681..c9c7ef623a5 100644 --- a/Resources/Prototypes/_NF/Entities/Objects/Misc/paper.yml +++ b/Resources/Prototypes/_NF/Entities/Objects/Misc/paper.yml @@ -1,5 +1,5 @@ - type: entity - name: Medical record form for insurance. + name: Medical record form for insurance parent: Paper id: PaperMedicalInsurance description: 'Provide this papar for an insurance provider.' From ce6689108a5c277fa647b3e1117d3247916aa2b6 Mon Sep 17 00:00:00 2001 From: Dvir <39403717+dvir001@users.noreply.github.com> Date: Wed, 20 Sep 2023 23:59:46 +0300 Subject: [PATCH 06/11] Update paper.yml --- Resources/Prototypes/_NF/Entities/Objects/Misc/paper.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Prototypes/_NF/Entities/Objects/Misc/paper.yml b/Resources/Prototypes/_NF/Entities/Objects/Misc/paper.yml index c9c7ef623a5..4c6f8ab1c52 100644 --- a/Resources/Prototypes/_NF/Entities/Objects/Misc/paper.yml +++ b/Resources/Prototypes/_NF/Entities/Objects/Misc/paper.yml @@ -1,5 +1,5 @@ - type: entity - name: Medical record form for insurance + name: Medical insurance form parent: Paper id: PaperMedicalInsurance description: 'Provide this papar for an insurance provider.' From 2eabc4f56dc8baea23b1960bd0aebb15d0d0a8b4 Mon Sep 17 00:00:00 2001 From: Dvir <39403717+dvir001@users.noreply.github.com> Date: Thu, 21 Sep 2023 00:36:25 +0300 Subject: [PATCH 07/11] Update book-medical-insurance.ftl --- Resources/Locale/en-US/_NF/paper/book-medical-insurance.ftl | 1 + 1 file changed, 1 insertion(+) diff --git a/Resources/Locale/en-US/_NF/paper/book-medical-insurance.ftl b/Resources/Locale/en-US/_NF/paper/book-medical-insurance.ftl index bcfacba9c98..ccf3e65f526 100644 --- a/Resources/Locale/en-US/_NF/paper/book-medical-insurance.ftl +++ b/Resources/Locale/en-US/_NF/paper/book-medical-insurance.ftl @@ -5,6 +5,7 @@ book-medical-insurance = This form is a contract made with the medical frovider: Full Name : Race : Blood Type : + Ship : -------------------------------------------------------------------------------------- SECTION 2: Services From 71ec5c9640d57e693d1fb4fce0ac15b4795b42ea Mon Sep 17 00:00:00 2001 From: Dvir <39403717+dvir001@users.noreply.github.com> Date: Thu, 21 Sep 2023 00:37:24 +0300 Subject: [PATCH 08/11] Update general.yml --- Resources/Prototypes/_NF/Catalog/Fills/Boxes/general.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/Resources/Prototypes/_NF/Catalog/Fills/Boxes/general.yml b/Resources/Prototypes/_NF/Catalog/Fills/Boxes/general.yml index 71aa1a543da..be47a4c4b48 100644 --- a/Resources/Prototypes/_NF/Catalog/Fills/Boxes/general.yml +++ b/Resources/Prototypes/_NF/Catalog/Fills/Boxes/general.yml @@ -10,8 +10,6 @@ contents: - id: MedicalTrackingImplanter amount: 1 - - id: HandheldGPSBasic - amount: 1 - id: PaperMedicalInsurance amount: 1 - id: RubberStampCaptain From e65583152d2a985f91e91b594f7ead341a2c1f53 Mon Sep 17 00:00:00 2001 From: Dvir <39403717+dvir001@users.noreply.github.com> Date: Thu, 21 Sep 2023 00:46:10 +0300 Subject: [PATCH 09/11] Update general.yml --- Resources/Prototypes/_NF/Catalog/Fills/Boxes/general.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Resources/Prototypes/_NF/Catalog/Fills/Boxes/general.yml b/Resources/Prototypes/_NF/Catalog/Fills/Boxes/general.yml index be47a4c4b48..71aa1a543da 100644 --- a/Resources/Prototypes/_NF/Catalog/Fills/Boxes/general.yml +++ b/Resources/Prototypes/_NF/Catalog/Fills/Boxes/general.yml @@ -10,6 +10,8 @@ contents: - id: MedicalTrackingImplanter amount: 1 + - id: HandheldGPSBasic + amount: 1 - id: PaperMedicalInsurance amount: 1 - id: RubberStampCaptain From 0d473487a82df9955f36df70d89d38bba7f29e93 Mon Sep 17 00:00:00 2001 From: Dvir Date: Thu, 21 Sep 2023 01:07:03 +0300 Subject: [PATCH 10/11] Update general.yml --- .../Prototypes/Catalog/VendingMachines/Inventories/medical.yml | 1 + Resources/Prototypes/_NF/Catalog/Fills/Boxes/general.yml | 2 ++ 2 files changed, 3 insertions(+) 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/_NF/Catalog/Fills/Boxes/general.yml b/Resources/Prototypes/_NF/Catalog/Fills/Boxes/general.yml index 71aa1a543da..2ad59a2c7b3 100644 --- a/Resources/Prototypes/_NF/Catalog/Fills/Boxes/general.yml +++ b/Resources/Prototypes/_NF/Catalog/Fills/Boxes/general.yml @@ -22,3 +22,5 @@ layers: - state: box - state: syringe + - type: VendPrice + price: 200 # Single Implant Box (5 are 1000) From 687d285663c0c0db6a0b4fbd539715b244024a40 Mon Sep 17 00:00:00 2001 From: Dvir <39403717+dvir001@users.noreply.github.com> Date: Thu, 21 Sep 2023 22:26:57 +0300 Subject: [PATCH 11/11] Update general.yml --- Resources/Prototypes/_NF/Catalog/Fills/Boxes/general.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/Resources/Prototypes/_NF/Catalog/Fills/Boxes/general.yml b/Resources/Prototypes/_NF/Catalog/Fills/Boxes/general.yml index 2ad59a2c7b3..3de71493fa0 100644 --- a/Resources/Prototypes/_NF/Catalog/Fills/Boxes/general.yml +++ b/Resources/Prototypes/_NF/Catalog/Fills/Boxes/general.yml @@ -14,8 +14,6 @@ amount: 1 - id: PaperMedicalInsurance amount: 1 - - id: RubberStampCaptain - amount: 1 - type: Storage capacity: 60 - type: Sprite