From fef46680fb15b1a7fc074a88d2d7403bb72a54bd Mon Sep 17 00:00:00 2001 From: Aviu00 <93730715+Aviu00@users.noreply.github.com> Date: Wed, 6 Mar 2024 03:42:07 +0900 Subject: [PATCH] - add: Add advanced implanter. (#171) * - add: Add advanced implanter. * - tweak: All implants are single use now. --- .../Implants/Components/ImplanterComponent.cs | 5 +++++ Content.Shared/Implants/SharedImplanterSystem.cs | 6 +++++- .../prototypes/entities/objects/misc/implanters.ftl | 2 ++ .../Prototypes/Entities/Objects/Misc/implanters.yml | 4 ++++ Resources/Prototypes/White/Catalog/uplink.yml | 10 ++++++++++ .../White/Entities/Objects/Misc/implanters.yml | 13 +++++++++++++ 6 files changed, 39 insertions(+), 1 deletion(-) diff --git a/Content.Shared/Implants/Components/ImplanterComponent.cs b/Content.Shared/Implants/Components/ImplanterComponent.cs index 32a3636163..23549bb21a 100644 --- a/Content.Shared/Implants/Components/ImplanterComponent.cs +++ b/Content.Shared/Implants/Components/ImplanterComponent.cs @@ -57,6 +57,11 @@ public sealed partial class ImplanterComponent : Component [DataField, AutoNetworkedField] public bool ImplantOnly; + // WD START + [DataField] + public bool SingleUse = true; + // WD END + /// /// The current mode of the implanter /// Mode is changed automatically depending if it implants or draws diff --git a/Content.Shared/Implants/SharedImplanterSystem.cs b/Content.Shared/Implants/SharedImplanterSystem.cs index 2728709606..27ca89970f 100644 --- a/Content.Shared/Implants/SharedImplanterSystem.cs +++ b/Content.Shared/Implants/SharedImplanterSystem.cs @@ -117,6 +117,9 @@ public abstract class SharedImplanterSystem : EntitySystem _container.Insert(implant.Value, implantContainer); RaiseLocalEvent(implant.Value, new SubdermalImplantInserted(user, target, implantComp)); //WD EDIT + if (component.CurrentMode == ImplanterToggleMode.Inject && component.SingleUse) // WD EDIT + component.ImplantOnly = true; + if (component.CurrentMode == ImplanterToggleMode.Inject && !component.ImplantOnly) DrawMode(implanter, component); else @@ -205,7 +208,8 @@ public abstract class SharedImplanterSystem : EntitySystem break; } - if (component.CurrentMode == ImplanterToggleMode.Draw && !component.ImplantOnly && !permanentFound) + if (component.CurrentMode == ImplanterToggleMode.Draw && !component.ImplantOnly && !permanentFound && + implanterContainer.Count > 0) // WD EDIT ImplantMode(implanter, component); Dirty(implanter, component); diff --git a/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/misc/implanters.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/misc/implanters.ftl index 07672cfe3b..eb02b08eac 100644 --- a/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/misc/implanters.ftl +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/misc/implanters.ftl @@ -52,3 +52,5 @@ ent-DeathAcidifierImplanter = { ent-BaseImplanter } ent-ImplanterAdmeme = { ent-BaseImplanter } .desc = {""} .suffix = адмемы +ent-ImplanterSyndi = { ent-BaseImplanter } + .desc = { ent-BaseImplanter.desc } diff --git a/Resources/Prototypes/Entities/Objects/Misc/implanters.yml b/Resources/Prototypes/Entities/Objects/Misc/implanters.yml index 4d0e877290..852fa5a3ac 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/implanters.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/implanters.yml @@ -72,6 +72,7 @@ # go wild with sentient chairs with macrobombs whitelist: null blacklist: null + singleUse: false - type: entity id: BaseImplantOnlyImplanter @@ -119,6 +120,9 @@ implantOnly: True: {state: broken} False: {state: implanter1} + - type: Implanter + implantTime: 2 + drawTime: 2 #Fun implanters diff --git a/Resources/Prototypes/White/Catalog/uplink.yml b/Resources/Prototypes/White/Catalog/uplink.yml index 9bb495ac41..56b9b07841 100644 --- a/Resources/Prototypes/White/Catalog/uplink.yml +++ b/Resources/Prototypes/White/Catalog/uplink.yml @@ -214,3 +214,13 @@ Telecrystal: 6 categories: - UplinkImplants + +- type: listing + id: UplinkImplanterSyndi + name: Имплантер + description: Продвинутый имплантер, позволяющий быстро вкалывать и вытаскивать импланты. + productEntity: ImplanterSyndi + cost: + Telecrystal: 1 + categories: + - UplinkImplants diff --git a/Resources/Prototypes/White/Entities/Objects/Misc/implanters.yml b/Resources/Prototypes/White/Entities/Objects/Misc/implanters.yml index 8bbbcf60e7..a6e577d4d8 100644 --- a/Resources/Prototypes/White/Entities/Objects/Misc/implanters.yml +++ b/Resources/Prototypes/White/Entities/Objects/Misc/implanters.yml @@ -21,3 +21,16 @@ components: - type: Implanter implant: MindslaveImplant + +- type: entity + id: ImplanterSyndi + parent: Implanter + description: A compact disposable syringe exclusively designed for the injection and extraction of subdermal implants. + components: + - type: Item + sprite: Objects/Specific/Medical/syndi_implanter.rsi + - type: Sprite + sprite: Objects/Specific/Medical/syndi_implanter.rsi + - type: Implanter + drawTime: 2 + implantTime: 2