mirror of
https://github.com/Aurorastation/Aurora-Old.git
synced 2026-08-24 13:16:18 +01:00
Life Support Enabled Operating Table - Initial Commit
Adds an advanced surgery table which enables you to keep a patient alive, even if they're lacking a heart. Also includes changes to the operating computer, making it run off of NanoUI, and makes both the advanced and normal surgery tables constructable with materials from RnD and the medical bay. The advanced surgery table will require cryogenic freezing fluids to keep in operation, so either cryoxadone or clonexadone will work (though clonexadone will last you longer). You also have the capacity to add an air tank to the machinery and a bloodbag. The operation of both can be automated. The internals will be toggled as soon as you enable life support, and the blood bag will be connected if a patient is below 90% bloodlevel, if the respective systems are made to be automatic. Both can also be manually enabled and disabled. ---- To construct a surgery table, you will require: * Circuit Board (Operating Table) - Biotech 2, Data theory 1 * Cable Coil * Capacitor * Health Analyzer To construct an advanced surgery table, you will require: * Circuit Board (Life Support Enabled Operating Table) - Biotech 4, Data theory 3 * Cable Coil * Capacitor * Health Analyzer * Beaker (internal chemical store size dependant on beaker used) * Advanced Sensor Module Simple add them to a machine frame, as you would with any other machinery item. ---- A short list of to-dos remains: * Sprites * Investigate brain transplants/removal * Emagged features
This commit is contained in:
@@ -67,14 +67,21 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
if(species && species.has_organ["heart"])
|
||||
var/datum/organ/internal/heart/heart = internal_organs_by_name["heart"]
|
||||
|
||||
if(!heart)
|
||||
blood_volume = 0
|
||||
else if(heart.damage > 1 && heart.damage < heart.min_bruised_damage)
|
||||
blood_volume *= 0.8
|
||||
else if(heart.damage >= heart.min_bruised_damage && heart.damage < heart.min_broken_damage)
|
||||
blood_volume *= 0.6
|
||||
else if(heart.damage >= heart.min_broken_damage && heart.damage < INFINITY)
|
||||
blood_volume *= 0.3
|
||||
// Before we do that, we check for lifesupport.
|
||||
var/onlifesupport = 0
|
||||
if (buckled && istype(buckled, /obj/machinery/optable/lifesupport))
|
||||
var/obj/machinery/optable/lifesupport/A = buckled
|
||||
onlifesupport = A.onlifesupport()
|
||||
|
||||
if (!onlifesupport)
|
||||
if(!heart)
|
||||
blood_volume = 0
|
||||
else if(heart.damage > 1 && heart.damage < heart.min_bruised_damage)
|
||||
blood_volume *= 0.8
|
||||
else if(heart.damage >= heart.min_bruised_damage && heart.damage < heart.min_broken_damage)
|
||||
blood_volume *= 0.6
|
||||
else if(heart.damage >= heart.min_broken_damage && heart.damage < INFINITY)
|
||||
blood_volume *= 0.3
|
||||
|
||||
//Effects of bloodloss
|
||||
switch(blood_volume)
|
||||
|
||||
@@ -41,11 +41,16 @@
|
||||
E.internal_organs |= src
|
||||
|
||||
/datum/organ/internal/process()
|
||||
//Check if we're on lifesupport, and whether or not organs should be processing.
|
||||
if (owner.buckled && istype(owner.buckled, /obj/machinery/optable/lifesupport))
|
||||
var/obj/machinery/optable/lifesupport/A = owner.buckled
|
||||
if (A.onlifesupport())
|
||||
return 1
|
||||
|
||||
//Process infections
|
||||
if (robotic >= 2 || (owner.species && owner.species.flags & IS_PLANT)) //TODO make robotic internal and external organs separate types of organ instead of a flag
|
||||
germ_level = 0
|
||||
return
|
||||
return 0
|
||||
|
||||
if(owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs
|
||||
//** Handle antibiotics and curing infections
|
||||
@@ -92,6 +97,8 @@
|
||||
take_damage(4)
|
||||
owner.reagents.add_reagent("toxin", rand(3,5))
|
||||
|
||||
return 0
|
||||
|
||||
/datum/organ/internal/proc/take_damage(amount, var/silent=0)
|
||||
if(src.robotic == 2)
|
||||
src.damage += (amount * 0.8)
|
||||
@@ -152,7 +159,10 @@
|
||||
removed_type = /obj/item/organ/lungs
|
||||
|
||||
process()
|
||||
..()
|
||||
. = ..()
|
||||
if (.)
|
||||
return
|
||||
|
||||
if (germ_level > INFECTION_LEVEL_ONE)
|
||||
if(prob(5))
|
||||
owner.emote("cough") //respitory tract infection
|
||||
@@ -174,7 +184,9 @@
|
||||
|
||||
process()
|
||||
|
||||
..()
|
||||
. = ..()
|
||||
if (.)
|
||||
return
|
||||
|
||||
if (germ_level > INFECTION_LEVEL_ONE)
|
||||
if(prob(1))
|
||||
@@ -232,7 +244,9 @@
|
||||
|
||||
process()
|
||||
|
||||
..()
|
||||
. = ..()
|
||||
if (.)
|
||||
return
|
||||
|
||||
// Coffee is really bad for you with busted kidneys.
|
||||
// This should probably be expanded in some way, but fucked if I know
|
||||
|
||||
Reference in New Issue
Block a user