diff --git a/Content.Server/Palmtree/Surgery/SurgerySystem.cs b/Content.Server/Palmtree/Surgery/SurgerySystem.cs index 57bab4257ae..ad79f07d5f3 100644 --- a/Content.Server/Palmtree/Surgery/SurgerySystem.cs +++ b/Content.Server/Palmtree/Surgery/SurgerySystem.cs @@ -4,6 +4,8 @@ using Content.Server.Body.Systems; using Content.Server.Popups; using Content.Server.Mind; +using Content.Shared.Eye.Blinding.Components; +using Content.Shared.Eye.Blinding.Systems; using Content.Shared.Inventory; using Content.Shared.Atmos.Rotting; using Content.Shared.Palmtree.Surgery; @@ -69,6 +71,7 @@ public class PSurgerySystem : SharedSurgerySystem [Dependency] private readonly BloodstreamSystem _blood = default!; [Dependency] private readonly IGameTiming _timing = default!; [Dependency] private readonly MobStateSystem _mobState = default!; + [Dependency] private readonly BlindableSystem _blindableSystem = default!; public override void Initialize() { base.Initialize(); @@ -204,6 +207,12 @@ private void OnProcedureFinished(EntityUid uid, PSurgeryToolComponent tool, Surg case "BioHeart": _rot.ReduceAccumulator((EntityUid) args.Target, TimeSpan.FromSeconds(2147483648)); break; + case "BioEyes": + if (TryComp(args.Target, out BlindableComponent? blindcomp)) + { + _blindableSystem.AdjustEyeDamage(((EntityUid) args.Target, blindcomp), -blindcomp!.EyeDamage); + } + break; default: // Some simply don't have any behavior other than healing break; } @@ -238,6 +247,18 @@ private void OnProcedureFinished(EntityUid uid, PSurgeryToolComponent tool, Surg { EntityManager.DeleteEntity(uid); } + if (!_inventory.TryGetSlotEntity((EntityUid) args.User, "gloves", out var gloves) || !_inventory.TryGetSlotEntity((EntityUid) args.User, "mask", out var mask)) // INFECTION CODE GOES HERE!!!! + { + // Stolen straight from Solidus' CPR PR. + var infecting = new DamageSpecifier() + { + DamageDict = new() + { + { "Poison", 10} + } + }; + _damageableSystem.TryChangeDamage(args.Target, infecting, true, origin: uid); + } } } private void OnAfterInteract(EntityUid uid, PSurgeryToolComponent tool, AfterInteractEvent args) // Turn this into FTL strings later diff --git a/Resources/Prototypes/Catalog/Fills/Lockers/heads.yml b/Resources/Prototypes/Catalog/Fills/Lockers/heads.yml index 752591da371..45dfee3afc0 100644 --- a/Resources/Prototypes/Catalog/Fills/Lockers/heads.yml +++ b/Resources/Prototypes/Catalog/Fills/Lockers/heads.yml @@ -214,6 +214,7 @@ - id: RubberStampPsychologist # DeltaV - id: MedicalTechFabCircuitboard - id: BoxEncryptionKeyMedical + - id: MedicalBiofabMachineBoard # Syndicate station - CMO gets spare boards for his machiners - id: BoxPDAMedical # Delta-V - id: ClothingBeltMilitaryWebbingCMO # DeltaV - add webbing for CMO. ON THIS STATION, IT'S DRIP OR [die], CAPTAIN! - id: CMOIDCard # Delta-V diff --git a/Resources/Prototypes/Palmtree/Entities/Objects/Devices/Circuitboards/Machine/production.yml b/Resources/Prototypes/Palmtree/Entities/Objects/Devices/Circuitboards/Machine/production.yml new file mode 100644 index 00000000000..b9de166130d --- /dev/null +++ b/Resources/Prototypes/Palmtree/Entities/Objects/Devices/Circuitboards/Machine/production.yml @@ -0,0 +1,13 @@ +- type: entity + id: MedicalBiofabMachineBoard + parent: BaseMachineCircuitboard + name: medical biofab machine board + description: A machine printed circuit board for a medical biofab. + components: + - type: Sprite + state: medical + - type: MachineBoard + prototype: MedicalBiofabricator + requirements: + MatterBin: 2 + Manipulator: 2 diff --git a/Resources/Prototypes/Palmtree/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Palmtree/Entities/Structures/Machines/lathe.yml new file mode 100644 index 00000000000..a149424e63d --- /dev/null +++ b/Resources/Prototypes/Palmtree/Entities/Structures/Machines/lathe.yml @@ -0,0 +1,34 @@ +- type: entity + id: MedicalBiofabricator + parent: BaseLathe + name: medical biofabricator + description: Produces organs and other organic matter that can be surgically grafted onto patients with biomass. + components: + - type: Sprite + sprite: Palmtree/Structures/Machines/limbgrower.rsi + snapCardinals: true + layers: + - state: limbgrower_idleoff + map: ["enum.LatheVisualLayers.IsRunning"] +# - state: limbgrower_idleoff +# shader: unshaded +# map: ["enum.PowerDeviceVisualLayers.Powered"] +# - state: inserting +# map: ["enum.MaterialStorageVisualLayers.Inserting"] +# - state: panel +# map: ["enum.WiresVisualLayers.MaintenancePanel"] + - type: Machine + board: MedicalBiofabMachineBoard + - type: MaterialStorage + whitelist: + tags: + - Sheet + - RawMaterial + - type: Lathe + idleState: limbgrower_idleoff + runningState: limbgrower_idleon + staticRecipes: + - SynthHeart + - SynthLungs + - SynthLiver + - SynthEyes diff --git a/Resources/Prototypes/Palmtree/Recipes/Lathes/rehydrateable.yml b/Resources/Prototypes/Palmtree/Recipes/Lathes/rehydrateable.yml new file mode 100644 index 00000000000..e00834fcd30 --- /dev/null +++ b/Resources/Prototypes/Palmtree/Recipes/Lathes/rehydrateable.yml @@ -0,0 +1,27 @@ +- type: latheRecipe + id: SynthHeart + result: BioSynthHeart + completetime: 30 + materials: + Biomass: 10 + +- type: latheRecipe + id: SynthLungs + result: BioSynthLungs + completetime: 30 + materials: + Biomass: 10 + +- type: latheRecipe + id: SynthLiver + result: BioSynthLiver + completetime: 30 + materials: + Biomass: 10 + +- type: latheRecipe + id: SynthEyes + result: BioSynthEyes + completetime: 30 + materials: + Biomass: 10 diff --git a/Resources/ServerInfo/Palmtree/Medical/Surgery.xml b/Resources/ServerInfo/Palmtree/Medical/Surgery.xml index cd51e5a5045..1e6e92dddbf 100644 --- a/Resources/ServerInfo/Palmtree/Medical/Surgery.xml +++ b/Resources/ServerInfo/Palmtree/Medical/Surgery.xml @@ -1,8 +1,8 @@ # Surgery -Let's say that whatever patient arrives from the station straight into medbay is in a really bad shape. You have several options, clone them if they're dead, apply a mix of chemicals, topical medicine or even use the cryo tube with cryoxadone. There is a downside to those options however, all of them require specific external resources that aren't exactly abundant and a constantly running power supply. +Let's say that whatever patient arrives from the station straight into medbay is in a really bad shape. You have several options, clone them if they're dead, apply a mix of chemicals, topical medicine or even use the cryo tube with cryoxadone. There is a downside to those options however, all of them require specific external resources that aren't exactly abundant and/or a constantly running power supply. -That's where surgery comes in, it will allow you to treat the basic damages of your patients easily (albeit not as effective as every other method above) and it will even allow you to bring people who have rotted for long periods of time back to life. +That's where surgery comes in, it will allow you to treat the basic damages of your patients easily (albeit not as effective as every other method above) and it will even allow you to bring people who have rotted for long periods of time back to life without having to clone them completely, which can save on biomass and chemicals. @@ -13,11 +13,16 @@ That's where surgery comes in, it will allow you to treat the basic damages of y +## Sanitizing +Your patient may get infected from improper usage of surgical tools, to stop that from happening you must wear gloves and a mask anything will be better than your bare hands and uncovered face. + ## The Basics Performing surgery is done by steps, some steps are static while others are interchangeable, meaning they can be done alongside a more advanced procedure. Every procedure starts with an incision and ends with cauterization, if you screw up at any point you can cauterize the patient and try again. The most basic procedure is tend wounds, it is done by using a hemostat at any point during the surgery, doing so also clamps the bleeders to stop your patient from bleeding out. +If someone is severely hurt, take them to the operating room, undress them and give it a shot. + @@ -25,8 +30,6 @@ Every procedure starts with an incision and ends with cauterization, if you scre ## Procedure conditions Poor condition modifiers stacks and makes each step get progressively slower, the worst case scenario is if you were to do surgery on yourself while standing up and awake, and the best case scenario would be if you were doing surgery on someone else while they are laying down and sedated. -You also need to undress people before performing surgery. - ## Transplants If someone dies and doesn't get revived in time, their heart rot and soon does the rest of their organs, which get manifested in different types of damages (asphyxiation for lungs and poison for liver), lucky you, you should be prepared by now to deal exactly with that, these sorts of procedures should be done in this exact order, and the only tool you may optionally use during it is the hemostat to stop the patient from bleeding if they start to. @@ -43,6 +46,6 @@ Additionally, you can also use the phantomlink card instead of an organ during t ## Getting organs -Currently the only transplantable organs are Interdyne's bio-synthetic organs, you can get them by buying a crate of them at cargo. +Currently the only transplantable organs are Interdyne's bio-synthetic organs, you can get them by buying a crate of them at cargo or using the medical biofabricator. diff --git a/Resources/Textures/Palmtree/Structures/Machines/limbgrower.rsi/limbgrower_fill.png b/Resources/Textures/Palmtree/Structures/Machines/limbgrower.rsi/limbgrower_fill.png new file mode 100644 index 00000000000..1e45b366221 Binary files /dev/null and b/Resources/Textures/Palmtree/Structures/Machines/limbgrower.rsi/limbgrower_fill.png differ diff --git a/Resources/Textures/Palmtree/Structures/Machines/limbgrower.rsi/limbgrower_idleoff.png b/Resources/Textures/Palmtree/Structures/Machines/limbgrower.rsi/limbgrower_idleoff.png new file mode 100644 index 00000000000..73bab51916c Binary files /dev/null and b/Resources/Textures/Palmtree/Structures/Machines/limbgrower.rsi/limbgrower_idleoff.png differ diff --git a/Resources/Textures/Palmtree/Structures/Machines/limbgrower.rsi/limbgrower_idleon.png b/Resources/Textures/Palmtree/Structures/Machines/limbgrower.rsi/limbgrower_idleon.png new file mode 100644 index 00000000000..f47f93eb86a Binary files /dev/null and b/Resources/Textures/Palmtree/Structures/Machines/limbgrower.rsi/limbgrower_idleon.png differ diff --git a/Resources/Textures/Palmtree/Structures/Machines/limbgrower.rsi/limbgrower_openpanel.png b/Resources/Textures/Palmtree/Structures/Machines/limbgrower.rsi/limbgrower_openpanel.png new file mode 100644 index 00000000000..cc174c7d8b9 Binary files /dev/null and b/Resources/Textures/Palmtree/Structures/Machines/limbgrower.rsi/limbgrower_openpanel.png differ diff --git a/Resources/Textures/Palmtree/Structures/Machines/limbgrower.rsi/limbgrower_panelopen.png b/Resources/Textures/Palmtree/Structures/Machines/limbgrower.rsi/limbgrower_panelopen.png new file mode 100644 index 00000000000..d4c4de1f8c4 Binary files /dev/null and b/Resources/Textures/Palmtree/Structures/Machines/limbgrower.rsi/limbgrower_panelopen.png differ diff --git a/Resources/Textures/Palmtree/Structures/Machines/limbgrower.rsi/limbgrower_unfill.png b/Resources/Textures/Palmtree/Structures/Machines/limbgrower.rsi/limbgrower_unfill.png new file mode 100644 index 00000000000..6aa57f247e2 Binary files /dev/null and b/Resources/Textures/Palmtree/Structures/Machines/limbgrower.rsi/limbgrower_unfill.png differ diff --git a/Resources/Textures/Palmtree/Structures/Machines/limbgrower.rsi/meta.json b/Resources/Textures/Palmtree/Structures/Machines/limbgrower.rsi/meta.json new file mode 100644 index 00000000000..efffcfad057 --- /dev/null +++ b/Resources/Textures/Palmtree/Structures/Machines/limbgrower.rsi/meta.json @@ -0,0 +1,85 @@ +{ + "version": 1, + "license": "GNU AGPL v3", + "copyright": "Originally pulled from TGstation", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "limbgrower_fill", + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + }, + { + "name": "limbgrower_unfill", + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + }, + { + "name": "limbgrower_openpanel", + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + }, + { + "name": "limbgrower_idleoff", + "delays": [ + [ + 0.3, + 0.3, + 0.3, + 0.3 + ] + ] + }, + { + "name": "limbgrower_idleon", + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + }, + { + "name": "limbgrower_panelopen" + } + ] +}