Merge pull request #13679 from DeltaFire15/system-corruption
[TESTMERGE ONLY] System Corruption for robotic species
This commit is contained in:
@@ -171,6 +171,7 @@
|
||||
#define ORGAN_SLOT_HEART_AID "heartdrive"
|
||||
#define ORGAN_SLOT_BRAIN_ANTIDROP "brain_antidrop"
|
||||
#define ORGAN_SLOT_BRAIN_ANTISTUN "brain_antistun"
|
||||
#define ORGAN_SLOT_BRAIN_ROBOT_RADSHIELDING "brain_robot_radshielding"
|
||||
#define ORGAN_SLOT_TAIL "tail"
|
||||
#define ORGAN_SLOT_PENIS "penis"
|
||||
#define ORGAN_SLOT_WOMB "womb"
|
||||
|
||||
@@ -11,6 +11,12 @@
|
||||
#define STAMINA "stamina"
|
||||
#define BRAIN "brain"
|
||||
|
||||
//Toxins damage 'typeflag' - is this normal toxins damage or does it have to do with systems corruption (ROBOTIC_ORGANISM species trait)
|
||||
|
||||
#define TOX_DEFAULT 1 //For normal toxins damage / healing (toxins, etc), adjustToxLoss() defaults to this
|
||||
#define TOX_SYSCORRUPT 2 //For toxins damage causing adverse effects to robotic organisms, up to and including fatal corruption, or healing that damage
|
||||
#define TOX_OMNI 3 //For tox damage / healing that affects both organics and robotic organisms. Used by very few things, e.g. aheals / by default setToxLoss()
|
||||
|
||||
//bitflag damage defines used for suicide_act
|
||||
#define BRUTELOSS (1<<0)
|
||||
#define FIRELOSS (1<<1)
|
||||
|
||||
@@ -18,6 +18,8 @@ Ask ninjanomnom if they're around
|
||||
#define RAD_BURN_THRESHOLD 1000 // Applied radiation must be over this to burn
|
||||
|
||||
#define RAD_MOB_SAFE 500 // How much stored radiation in a mob with no ill effects
|
||||
#define RAD_DEFAULT_ROBOT_SAFE 250 // Like above, except for robotic carbons. Far more susceptible to corruption from radiation.
|
||||
#define RAD_UPGRADED_ROBOT_SAFE 750 // If the robot has been upgraded via an implant, their radiation threshold is raised to be somewhat above that of organics.
|
||||
|
||||
#define RAD_MOB_HAIRLOSS 800 // How much stored radiation to check for hair loss
|
||||
|
||||
|
||||
@@ -118,6 +118,8 @@
|
||||
#define TRAIT_NOLIMBDISABLE "no_limb_disable"
|
||||
#define TRAIT_EASYLIMBDISABLE "easy_limb_disable"
|
||||
#define TRAIT_TOXINLOVER "toxinlover"
|
||||
#define TRAIT_ROBOTIC_ORGANISM "robotic_organism"
|
||||
#define TRAIT_ROBOT_RADSHIELDING "robot_radshielding"
|
||||
#define TRAIT_NOBREATH "no_breath"
|
||||
#define TRAIT_ANTIMAGIC "anti_magic"
|
||||
#define TRAIT_HOLY "holy"
|
||||
@@ -307,6 +309,7 @@
|
||||
#define LOCKED_HELMET_TRAIT "locked-helmet"
|
||||
#define NINJA_SUIT_TRAIT "ninja-suit"
|
||||
#define ANTI_DROP_IMPLANT_TRAIT "anti-drop-implant"
|
||||
#define ROBOT_RADSHIELDING_IMPLANT_TRAIT "robot-radshielding-implant"
|
||||
#define MARTIAL_ARTIST_TRAIT "martial_artist"
|
||||
#define SLEEPING_CARP_TRAIT "sleeping_carp"
|
||||
#define RISING_BASS_TRAIT "rising_bass"
|
||||
@@ -318,6 +321,7 @@
|
||||
#define MEGAFAUNA_TRAIT "megafauna"
|
||||
#define DEATHSQUAD_TRAIT "deathsquad"
|
||||
#define SLIMEPUDDLE_TRAIT "slimepuddle"
|
||||
#define CORRUPTED_SYSTEM "corrupted-system"
|
||||
/// This trait is added by the active directional block system.
|
||||
#define ACTIVE_BLOCK_TRAIT "active_block"
|
||||
/// This trait is added by the parry system.
|
||||
|
||||
@@ -52,6 +52,8 @@ GLOBAL_LIST_INIT(traits_by_type, list(
|
||||
"TRAIT_NOLIMBDISABLE" = TRAIT_NOLIMBDISABLE,
|
||||
"TRAIT_EASYLIMBDISABLE" = TRAIT_EASYLIMBDISABLE,
|
||||
"TRAIT_TOXINLOVER" = TRAIT_TOXINLOVER,
|
||||
"TRAIT_ROBOTIC_ORGANISM" = TRAIT_ROBOTIC_ORGANISM,
|
||||
"TRAIT_ROBOT_RADSHIELDING" = TRAIT_ROBOT_RADSHIELDING,
|
||||
"TRAIT_NOBREATH" = TRAIT_NOBREATH,
|
||||
"TRAIT_ANTIMAGIC" = TRAIT_ANTIMAGIC,
|
||||
"TRAIT_HOLY" = TRAIT_HOLY,
|
||||
|
||||
@@ -209,6 +209,7 @@
|
||||
data["occupant"]["fireLoss"] = mob_occupant.getFireLoss()
|
||||
data["occupant"]["cloneLoss"] = mob_occupant.getCloneLoss()
|
||||
data["occupant"]["brainLoss"] = mob_occupant.getOrganLoss(ORGAN_SLOT_BRAIN)
|
||||
data["occupant"]["is_robotic_organism"] = HAS_TRAIT(mob_occupant, TRAIT_ROBOTIC_ORGANISM)
|
||||
data["occupant"]["reagents"] = list()
|
||||
if(mob_occupant.reagents && mob_occupant.reagents.reagent_list.len)
|
||||
for(var/datum/reagent/R in mob_occupant.reagents.reagent_list)
|
||||
|
||||
@@ -88,6 +88,7 @@
|
||||
data["patient"]["fireLoss"] = patient.getFireLoss()
|
||||
data["patient"]["toxLoss"] = patient.getToxLoss()
|
||||
data["patient"]["oxyLoss"] = patient.getOxyLoss()
|
||||
data["patient"]["is_robotic_organism"] = HAS_TRAIT(patient, TRAIT_ROBOTIC_ORGANISM)
|
||||
if(patient.surgeries.len)
|
||||
data["procedures"] = list()
|
||||
for(var/datum/surgery/procedure in patient.surgeries)
|
||||
|
||||
@@ -155,7 +155,7 @@ GENETICS SCANNER
|
||||
if(oxy_loss > 10)
|
||||
msg += "\n\t<span class='info'><span class='alert'>[oxy_loss > 50 ? "Severe" : "Minor"] oxygen deprivation detected.</span>"
|
||||
if(tox_loss > 10)
|
||||
msg += "\n\t<span class='alert'>[tox_loss > 50 ? "Severe" : "Minor"] amount of toxin damage detected.</span>"
|
||||
msg += "\n\t<span class='alert'>[tox_loss > 50 ? "Severe" : "Minor"] amount of [HAS_TRAIT(M, TRAIT_ROBOTIC_ORGANISM) ? "system corruption" : "toxin damage"] detected.</span>"
|
||||
if(M.getStaminaLoss())
|
||||
msg += "\n\t<span class='alert'>Subject appears to be suffering from fatigue.</span>"
|
||||
if(advanced)
|
||||
@@ -182,7 +182,7 @@ GENETICS SCANNER
|
||||
<td style='width: 90px;'><font color='#0000CC'>Damage:</font></td>\
|
||||
<td style='width: 55px;'><font color='red'><b>Brute</b></font></td>\
|
||||
<td style='width: 45px;'><font color='orange'><b>Burn</b></font></td>\
|
||||
<td style='width: 45px;'><font color='green'><b>Toxin</b></font></td>\
|
||||
<td style='width: 45px;'><font color='green'><b>[HAS_TRAIT(C, TRAIT_ROBOTIC_ORGANISM) ? "Corruption" :"Toxin"]</b></font></td>\
|
||||
<td style='width: 90px;'><font color='purple'><b>Suffocation</b></font></td></tr>\
|
||||
<tr><td><font color='#0000CC'>Overall:</font></td>\
|
||||
<td><font color='red'>[brute_loss]</font></td>\
|
||||
@@ -628,9 +628,9 @@ GENETICS SCANNER
|
||||
var/turf/location = get_turf(user)
|
||||
if(!istype(location))
|
||||
return
|
||||
|
||||
|
||||
scan_turf(user, location)
|
||||
|
||||
|
||||
/obj/item/analyzer/AltClick(mob/user) //Barometer output for measuring when the next storm happens
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
L.adjustFireLoss(amount)
|
||||
newamt = L.getFireLoss()
|
||||
if("toxin")
|
||||
L.adjustToxLoss(amount)
|
||||
L.adjustToxLoss(amount, toxins_type = TOX_OMNI)
|
||||
newamt = L.getToxLoss()
|
||||
if("oxygen")
|
||||
L.adjustOxyLoss(amount)
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
/mob/living/carbon/true_devil/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null)
|
||||
return 666
|
||||
|
||||
/mob/living/carbon/true_devil/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0)
|
||||
/mob/living/carbon/true_devil/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash, override_protection = 0)
|
||||
if(mind && has_bane(BANE_LIGHT))
|
||||
mind.disrupt_spells(-500)
|
||||
return ..() //flashes don't stop devils UNLESS it's their bane.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
/mob/living/carbon/alien/getToxLoss()
|
||||
/mob/living/carbon/alien/getToxLoss(toxins_type = TOX_OMNI)
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/alien/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE) //alien immune to tox damage
|
||||
/mob/living/carbon/alien/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE, toxins_type = TOX_DEFAULT) //alien immune to tox damage
|
||||
return FALSE
|
||||
|
||||
//aliens are immune to stamina damage.
|
||||
|
||||
@@ -212,6 +212,11 @@
|
||||
. = ..()
|
||||
if(. & EMP_PROTECT_CONTENTS)
|
||||
return
|
||||
if(HAS_TRAIT(src, TRAIT_ROBOTIC_ORGANISM))
|
||||
//EMPs fuck robots over. Up to ~11.5 corruption per EMP if hit by the full power. They also get up to 15 burn damage per EMP (up to 2.5 per limb), plus short hardstun
|
||||
//Though, note that the burn damage is linear, while corruption is logarythmical, which means at lower severities you still get corruption, but far less burn / stun
|
||||
//Note than as compensation, they only take half the limb burn damage someone fully augmented would take, which would be up to 30 burn.
|
||||
adjustToxLoss(round(log(severity)*2.5, 0.1), toxins_type = TOX_SYSCORRUPT)
|
||||
for(var/X in internal_organs)
|
||||
var/obj/item/organ/O = X
|
||||
O.emp_act(severity)
|
||||
@@ -350,10 +355,10 @@
|
||||
|
||||
return embeds
|
||||
|
||||
/mob/living/carbon/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0)
|
||||
/mob/living/carbon/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash, override_protection = 0)
|
||||
. = ..()
|
||||
|
||||
var/damage = intensity - get_eye_protection()
|
||||
var/damage = override_protection ? intensity : intensity - get_eye_protection()
|
||||
if(.) // we've been flashed
|
||||
var/obj/item/organ/eyes/eyes = getorganslot(ORGAN_SLOT_EYES)
|
||||
if (!eyes)
|
||||
|
||||
@@ -65,6 +65,8 @@
|
||||
var/drunkenness = 0 //Overall drunkenness - check handle_alcohol() in life.dm for effects
|
||||
var/tackling = FALSE //Whether or not we are tackling, this will prevent the knock into effects for carbons
|
||||
|
||||
var/corruption_timer = 0 //Only relevant for robotpeople. A timer that ticks in handle_corruption() so stuff doesn't happen every tick.
|
||||
|
||||
/// All of the wounds a carbon has afflicted throughout their limbs
|
||||
var/list/all_wounds
|
||||
/// All of the scars a carbon has afflicted throughout their limbs
|
||||
|
||||
@@ -85,8 +85,10 @@
|
||||
heal_overall_damage(0, abs(amount), 0, FALSE, TRUE, updating_health)
|
||||
return amount
|
||||
|
||||
/mob/living/carbon/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && HAS_TRAIT(src, TRAIT_TOXINLOVER)) //damage becomes healing and healing becomes damage
|
||||
|
||||
//God save me from spaghettifying this - Syscorrupt damage is not affected by toxlovers.
|
||||
/mob/living/carbon/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE, toxins_type = TOX_DEFAULT)
|
||||
if(!forced && HAS_TRAIT(src, TRAIT_TOXINLOVER) && toxins_type != TOX_SYSCORRUPT) //damage becomes healing and healing becomes damage
|
||||
amount = -amount
|
||||
if(amount > 0)
|
||||
blood_volume -= 3 * amount //5x was too much, this is punishing enough.
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
//////////////////////////////////////
|
||||
//SYSTEM CORRUPTION FOR ROBOT-PEOPLE//
|
||||
//////////////////////////////////////
|
||||
|
||||
//Moved into its own file for easier accessability & less cluttering of carbon/life.dm. Used in BiologicalLife()
|
||||
|
||||
|
||||
#define CORRUPTION_CHECK_INTERVAL 10 //Life() is called once every second, so ten seconds interval.
|
||||
#define CORRUPTION_THRESHHOLD_MINOR 10 //Above: Annoyances, to remind you you should get your corruption fixed.
|
||||
#define CORRUPTION_THRESHHOLD_MAJOR 35 //Above: Very annoying stuff, go get fixed.
|
||||
#define CORRUPTION_THRESHHOLD_CRITICAL 65 //Above: Extremely annoying stuff, possibly life-threatening
|
||||
|
||||
/mob/living/carbon/proc/handle_corruption()
|
||||
if(!HAS_TRAIT(src, TRAIT_ROBOTIC_ORGANISM)) //Only robot-people need to care about this
|
||||
return
|
||||
corruption_timer++
|
||||
var/corruption = getToxLoss(toxins_type = TOX_SYSCORRUPT)
|
||||
var/corruption_state
|
||||
var/timer_req = CORRUPTION_CHECK_INTERVAL
|
||||
switch(corruption)
|
||||
if(0 to CORRUPTION_THRESHHOLD_MINOR)
|
||||
timer_req = INFINITY //Below minor corruption you are fiiine
|
||||
corruption_state = "<font color='green'>None</font>" //This should never happen, but have it anyways.
|
||||
if(CORRUPTION_THRESHHOLD_MINOR to CORRUPTION_THRESHHOLD_MAJOR)
|
||||
corruption_state = "<font color='blue'>Minor</font>"
|
||||
if(CORRUPTION_THRESHHOLD_MAJOR to CORRUPTION_THRESHHOLD_CRITICAL)
|
||||
timer_req -= 1
|
||||
corruption_state = "<font color='orange'>Major</font>"
|
||||
if(CORRUPTION_THRESHHOLD_CRITICAL to INFINITY)
|
||||
timer_req -= 2
|
||||
corruption_state = "<font color='red'>Critical</font>"
|
||||
if(corruption_timer < timer_req)
|
||||
return
|
||||
corruption_timer = 0
|
||||
if(!prob(corruption)) //Lucky you beat the rng roll!
|
||||
return
|
||||
var/list/whatmighthappen = list()
|
||||
whatmighthappen += list("avoided" = 3, "dropthing" = 1, "movetile" = 1, "shortdeaf" = 1, "flopover" = 1, "nutriloss" = 1, "selfflash" = 1, "harmies" = 1)
|
||||
if(corruption >= CORRUPTION_THRESHHOLD_MAJOR)
|
||||
whatmighthappen += list("longdeaf" = 1, "longknockdown" = 1, "shortlimbdisable" = 1, "shortblind" = 1, "shortstun" = 1, "shortmute" = 1, "vomit" = 1, "halluscinate" = 1)
|
||||
if(corruption >= CORRUPTION_THRESHHOLD_CRITICAL)
|
||||
whatmighthappen += list("receporgandamage" = 1, "longlimbdisable" = 1, "blindmutedeaf" = 1, "longstun" = 1, "sleep" = 1, "inducetrauma" = 1, "amplifycorrupt" = 1, "changetemp" = 1)
|
||||
var/event = pickweight(whatmighthappen)
|
||||
log_message("has been affected by [event] due to system corruption of [corruption], with a corruption state of [corruption_state]", LOG_ATTACK)
|
||||
switch(event)
|
||||
if("avoided")
|
||||
to_chat(src, "<span class='notice'>System malfunction avoided by hardware safeguards - intervention recommended.</span>")
|
||||
adjustToxLoss(-0.2, toxins_type = TOX_SYSCORRUPT) //If you roll this, your system safeguards caught onto the system corruption and neutralised a bit of it.
|
||||
if("dropthing")
|
||||
drop_all_held_items()
|
||||
to_chat(src, "<span class='warning'>Error - Malfunction in arm circuitry.</span>")
|
||||
if("movetile")
|
||||
if(CHECK_MOBILITY(src, MOBILITY_MOVE) && !ismovable(loc))
|
||||
step(src, pick(GLOB.cardinals))
|
||||
to_chat(src, "<span class='warning'>Error - Malfunction in movement control subsystem.</span>")
|
||||
if("shortdeaf")
|
||||
ADD_TRAIT(src, TRAIT_DEAF, CORRUPTED_SYSTEM)
|
||||
addtimer(CALLBACK(src, .proc/reenable_hearing), 5 SECONDS)
|
||||
to_chat(src, "<span class='hear'><b>ZZZZT</b></span>")
|
||||
if("flopover")
|
||||
DefaultCombatKnockdown(1)
|
||||
to_chat(src, "<span class='warning'>Error - Malfunction in actuator circuitry.</span>")
|
||||
if("nutriloss")
|
||||
nutrition = max(0, nutrition - 50)
|
||||
to_chat(src, "<span class='warning'>Power surge detected in internal battery cell.</span>")
|
||||
if("selfflash")
|
||||
if(flash_act(override_protection = 1))
|
||||
confused += 4
|
||||
to_chat(src, "<span class='warning'>Error - Sensory system overload detected!</span>")
|
||||
if("harmies")
|
||||
a_intent_change(INTENT_HARM)
|
||||
to_chat(src, "<span class='notice'>Intent subsystem successfully recalibrated.</span>")
|
||||
if("longdeaf")
|
||||
ADD_TRAIT(src, TRAIT_DEAF, CORRUPTED_SYSTEM)
|
||||
addtimer(CALLBACK(src, .proc/reenable_hearing), 20 SECONDS)
|
||||
to_chat(src, "<span class='notice'>Hearing subsystem successfully shutdown.</span>")
|
||||
if("longknockdown")
|
||||
DefaultCombatKnockdown(50)
|
||||
to_chat(src, "<span class='warning'>Significant error in actuator subsystem - Rebooting.</span>")
|
||||
if("shortlimbdisable")
|
||||
var/disabled_type = pick(list(TRAIT_PARALYSIS_L_ARM, TRAIT_PARALYSIS_R_ARM, TRAIT_PARALYSIS_L_LEG, TRAIT_PARALYSIS_R_LEG))
|
||||
ADD_TRAIT(src, disabled_type, CORRUPTED_SYSTEM)
|
||||
addtimer(CALLBACK(src, .proc/reenable_limb, disabled_type), 5 SECONDS)
|
||||
to_chat(src, "<span class='warning'>Error - Limb control subsystem partially shutdown, rebooting.</span>")
|
||||
if("shortblind")
|
||||
ADD_TRAIT(src, TRAIT_BLIND, CORRUPTED_SYSTEM)
|
||||
addtimer(CALLBACK(src, .proc/reenable_vision), 5 SECONDS)
|
||||
to_chat(src, "<span class='warning'>Visual receptor shutdown detected - Initiating reboot.</span>")
|
||||
if("shortstun")
|
||||
Stun(30)
|
||||
to_chat(src, "<span class='warning'>Deadlock detected in primary systems, error code [rand(101, 999)].</span>")
|
||||
if("shortmute")
|
||||
ADD_TRAIT(src, TRAIT_MUTE, CORRUPTED_SYSTEM)
|
||||
addtimer(CALLBACK(src, .proc/reenable_speech), 5 SECONDS)
|
||||
to_chat(src, "<span class='notice'>Communications matrix successfully shutdown for maintenance.</span>")
|
||||
if("vomit")
|
||||
to_chat(src, "<span class='notice'>Ejecting contaminant.</span>")
|
||||
vomit()
|
||||
if("halluscinate")
|
||||
hallucination += 20 //Doesn't give a cue
|
||||
if("receporgandamage")
|
||||
adjustOrganLoss(ORGAN_SLOT_EARS, rand(10, 20))
|
||||
adjustOrganLoss(ORGAN_SLOT_EYES, rand(10, 20))
|
||||
to_chat(src, "<span class='warning'>Power spike detected in auditory and visual systems!</span>")
|
||||
if("longlimbdisable")
|
||||
var/disabled_type = pick(list(TRAIT_PARALYSIS_L_ARM, TRAIT_PARALYSIS_R_ARM, TRAIT_PARALYSIS_L_LEG, TRAIT_PARALYSIS_R_LEG))
|
||||
ADD_TRAIT(src, disabled_type, CORRUPTED_SYSTEM)
|
||||
addtimer(CALLBACK(src, .proc/reenable_limb, disabled_type), 25 SECONDS)
|
||||
to_chat(src, "<span class='warning'>Fatal error in limb control subsystem - rebooting.</span>")
|
||||
if("blindmutedeaf")
|
||||
ADD_TRAIT(src, TRAIT_BLIND, CORRUPTED_SYSTEM)
|
||||
addtimer(CALLBACK(src, .proc/reenable_vision), (rand(10, 25)) SECONDS)
|
||||
ADD_TRAIT(src, TRAIT_DEAF, CORRUPTED_SYSTEM)
|
||||
addtimer(CALLBACK(src, .proc/reenable_hearing), (rand(15, 35)) SECONDS)
|
||||
ADD_TRAIT(src, TRAIT_MUTE, CORRUPTED_SYSTEM)
|
||||
addtimer(CALLBACK(src, .proc/reenable_speech), (rand(20, 45)) SECONDS)
|
||||
to_chat(src, "<span class='warning'>Fatal error in multiple systems - Performing recovery.</span>")
|
||||
if("longstun")
|
||||
Stun(80)
|
||||
to_chat(src, "<span class='warning'Critical divide-by-zero error detected - Failsafe initiated.</span>")
|
||||
if("sleep")
|
||||
addtimer(CALLBACK(src, .proc/forcesleep), (rand(6, 10)) SECONDS)
|
||||
to_chat(src, "<span class='warning'>Priority 1 shutdown order received in operating system - Preparing powerdown.</span>")
|
||||
if("inducetrauma")
|
||||
to_chat(src, "<span class='warning'>Major interference detected in main operating matrix - Complications possible.</span>")
|
||||
var/resistance = pick(
|
||||
65;TRAUMA_RESILIENCE_BASIC,
|
||||
35;TRAUMA_RESILIENCE_SURGERY)
|
||||
|
||||
var/trauma_type = pickweight(list(
|
||||
BRAIN_TRAUMA_MILD = 80,
|
||||
BRAIN_TRAUMA_SEVERE = 10))
|
||||
gain_trauma_type(trauma_type, resistance) //Gaining the trauma will inform them, but we'll tell them too so they know what the reason was.
|
||||
if("amplifycorrupt")
|
||||
adjustToxLoss(5, toxins_type = TOX_SYSCORRUPT)
|
||||
to_chat(src, "<span class='warning'>System safeguards failing - Action urgently required.</span>")
|
||||
if("changetemp")
|
||||
adjust_bodytemperature(rand(150, 250))
|
||||
to_chat(src, "<span class='warning'>Warning - Fatal coolant flow error at node [rand(6, 99)]!</span>") //This is totally not a reference to anything.
|
||||
|
||||
/mob/living/carbon/proc/reenable_limb(disabled_limb)
|
||||
REMOVE_TRAIT(src, disabled_limb, CORRUPTED_SYSTEM)
|
||||
to_chat(src, "<span class='notice'>Limb control subsystem successfully rebooted.</span>")
|
||||
|
||||
/mob/living/carbon/proc/reenable_hearing()
|
||||
REMOVE_TRAIT(src, TRAIT_DEAF, CORRUPTED_SYSTEM)
|
||||
to_chat(src, "<span class='notice'>Hearing restored.</span>")
|
||||
|
||||
/mob/living/carbon/proc/reenable_vision()
|
||||
REMOVE_TRAIT(src, TRAIT_BLIND, CORRUPTED_SYSTEM)
|
||||
to_chat(src, "<span class='notice'>Visual receptors back online.</span>")
|
||||
|
||||
/mob/living/carbon/proc/reenable_speech()
|
||||
REMOVE_TRAIT(src, TRAIT_MUTE, CORRUPTED_SYSTEM)
|
||||
to_chat(src, "<span class='notice'>Communications subsystem operational.</span>")
|
||||
|
||||
/mob/living/carbon/proc/forcesleep(time = 100)
|
||||
to_chat(src, "<span class='notice'>Preparations complete, powering down.</span>")
|
||||
Sleeping(time, 0)
|
||||
|
||||
|
||||
#undef CORRUPTION_CHECK_INTERVAL
|
||||
#undef CORRUPTION_THRESHHOLD_MINOR
|
||||
#undef CORRUPTION_THRESHHOLD_MAJOR
|
||||
#undef CORRUPTION_THRESHHOLD_CRITICAL
|
||||
@@ -411,6 +411,8 @@
|
||||
if(isrobotic(src))
|
||||
apply_status_effect(/datum/status_effect/no_combat_mode/robotic_emp, severity / 20)
|
||||
severity *= 0.5
|
||||
if(HAS_TRAIT(src, TRAIT_ROBOTIC_ORGANISM))
|
||||
severity *= 0.5 //Robotpeople take less limb damage, but instead suffer system corruption (see carbon emp_act)
|
||||
for(var/obj/item/bodypart/L in src.bodyparts)
|
||||
if(L.is_robotic_limb())
|
||||
if(!informed)
|
||||
|
||||
@@ -268,9 +268,9 @@
|
||||
return round(thermal_protection/max_protection, 0.001)
|
||||
|
||||
/mob/living/carbon/human/handle_random_events()
|
||||
//Puke if toxloss is too high
|
||||
//Puke if toxloss is too high and we aren't a robot, because those have advanced toxins (corruption) handling
|
||||
if(!stat)
|
||||
if(getToxLoss() >= 45 && nutrition > 20)
|
||||
if(getToxLoss() >= 45 && nutrition > 20 && !HAS_TRAIT(src, TRAIT_ROBOTIC_ORGANISM))
|
||||
lastpuke += prob(50)
|
||||
if(lastpuke >= 50) // about 25 second delay I guess
|
||||
vomit(20, toxic = TRUE)
|
||||
|
||||
@@ -1284,6 +1284,9 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
radiation = 0
|
||||
return TRUE
|
||||
|
||||
if(HAS_TRAIT(H, TRAIT_ROBOTIC_ORGANISM))
|
||||
return //Robots are hardened against radiation, but suffer system corruption at very high levels.
|
||||
|
||||
if(radiation > RAD_MOB_KNOCKDOWN && prob(RAD_MOB_KNOCKDOWN_PROB))
|
||||
if(CHECK_MOBILITY(H, MOBILITY_STAND))
|
||||
H.emote("collapse")
|
||||
@@ -1689,7 +1692,10 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
if(BODY_ZONE_HEAD)
|
||||
if(!I.get_sharpness() && armor_block < 50)
|
||||
if(prob(I.force))
|
||||
H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 20)
|
||||
if(HAS_TRAIT(src, TRAIT_ROBOTIC_ORGANISM))
|
||||
H.adjustToxLoss(5, toxins_type = TOX_SYSCORRUPT) //Bonk! - Effectively 5 bonus damage
|
||||
else
|
||||
H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 20)
|
||||
if(H.stat == CONSCIOUS)
|
||||
H.visible_message("<span class='danger'>[H] has been knocked senseless!</span>", \
|
||||
"<span class='userdanger'>You have been knocked senseless!</span>")
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
id = SPECIES_ANDROID
|
||||
say_mod = "states"
|
||||
species_traits = list(NOBLOOD,NOGENITALS,NOAROUSAL,ROBOTIC_LIMBS)
|
||||
inherent_traits = list(TRAIT_RESISTHEAT,TRAIT_NOBREATH,TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_RADIMMUNE,TRAIT_NOFIRE,TRAIT_PIERCEIMMUNE,TRAIT_NOHUNGER,TRAIT_LIMBATTACHMENT)
|
||||
inherent_traits = list(TRAIT_RESISTHEAT,TRAIT_NOBREATH,TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_RADIMMUNE,TRAIT_NOFIRE,TRAIT_PIERCEIMMUNE,TRAIT_NOHUNGER,TRAIT_LIMBATTACHMENT, TRAIT_ROBOTIC_ORGANISM)
|
||||
inherent_biotypes = MOB_ROBOTIC|MOB_HUMANOID
|
||||
meat = null
|
||||
gib_types = /obj/effect/gibspawner/robot
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
default_color = "00FF00"
|
||||
blacklisted = 0
|
||||
sexes = 0
|
||||
inherent_traits = list(TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_NO_PROCESS_FOOD)
|
||||
inherent_traits = list(TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_NO_PROCESS_FOOD, TRAIT_ROBOTIC_ORGANISM)
|
||||
species_traits = list(MUTCOLORS,NOEYES,NOTRANSSTING,HAS_FLESH,HAS_BONE,HAIR,ROBOTIC_LIMBS)
|
||||
hair_alpha = 210
|
||||
inherent_biotypes = MOB_ROBOTIC|MOB_HUMANOID
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
say_mod = "beeps"
|
||||
default_color = "00FF00"
|
||||
species_traits = list(MUTCOLORS,NOTRANSSTING,EYECOLOR,LIPS,HAIR,ROBOTIC_LIMBS,HAS_FLESH,HAS_BONE)
|
||||
inherent_traits = list(TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_NO_PROCESS_FOOD)
|
||||
inherent_traits = list(TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_NO_PROCESS_FOOD, TRAIT_ROBOTIC_ORGANISM)
|
||||
inherent_biotypes = MOB_ROBOTIC|MOB_HUMANOID
|
||||
mutant_bodyparts = list("ipc_antenna" = "Synthetic Lizard - Antennae","mam_tail" = "Synthetic Lizard", "mam_snouts" = "Synthetic Lizard - Snout", "legs" = "Digitigrade", "mam_body_markings" = "Synthetic Lizard - Plates", "taur" = "None")
|
||||
meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/ipc
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
if(stat != DEAD)
|
||||
handle_liver()
|
||||
|
||||
if(stat != DEAD)
|
||||
handle_corruption()
|
||||
|
||||
|
||||
/mob/living/carbon/PhysicalLife(seconds, times_fired)
|
||||
if(!(. = ..()))
|
||||
@@ -406,7 +409,7 @@
|
||||
for(var/thing in all_wounds)
|
||||
var/datum/wound/W = thing
|
||||
if(W.processes) // meh
|
||||
W.handle_process()
|
||||
W.handle_process()
|
||||
|
||||
/mob/living/carbon/handle_mutations_and_radiation()
|
||||
if(dna && dna.temporary_mutations.len)
|
||||
@@ -438,7 +441,12 @@
|
||||
|
||||
radiation -= min(radiation, RAD_LOSS_PER_TICK)
|
||||
if(radiation > RAD_MOB_SAFE)
|
||||
adjustToxLoss(log(radiation-RAD_MOB_SAFE)*RAD_TOX_COEFFICIENT)
|
||||
if(!HAS_TRAIT(src, TRAIT_ROBOTIC_ORGANISM))
|
||||
adjustToxLoss(log(radiation-RAD_MOB_SAFE)*RAD_TOX_COEFFICIENT)
|
||||
else
|
||||
var/rad_threshold = HAS_TRAIT(src, TRAIT_ROBOT_RADSHIELDING) ? RAD_UPGRADED_ROBOT_SAFE : RAD_DEFAULT_ROBOT_SAFE
|
||||
if(radiation > rad_threshold)
|
||||
adjustToxLoss(log(radiation-rad_threshold)*RAD_TOX_COEFFICIENT, toxins_type = TOX_SYSCORRUPT) //Robots are less resistant to rads, unless upgraded in which case they are fine at higher levels than organics.
|
||||
|
||||
/mob/living/carbon/handle_stomach()
|
||||
set waitfor = 0
|
||||
|
||||
@@ -168,20 +168,45 @@
|
||||
updatehealth()
|
||||
return amount
|
||||
|
||||
/mob/living/proc/getToxLoss()
|
||||
return toxloss
|
||||
//By default, returns toxins damage no matter what kind of tox damage the target is using.
|
||||
/mob/living/proc/getToxLoss(toxins_type = TOX_OMNI)
|
||||
if(toxins_type == TOX_OMNI)
|
||||
return toxloss
|
||||
|
||||
/mob/living/proc/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
var/affected_by = TOX_DEFAULT
|
||||
if(HAS_TRAIT(src, TRAIT_ROBOTIC_ORGANISM))
|
||||
affected_by = TOX_SYSCORRUPT
|
||||
|
||||
if(toxins_type != affected_by)
|
||||
return 0
|
||||
else
|
||||
return toxloss
|
||||
|
||||
/mob/living/proc/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE, toxins_type = TOX_DEFAULT)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
var/affected_by = TOX_DEFAULT
|
||||
if(HAS_TRAIT(src, TRAIT_ROBOTIC_ORGANISM))
|
||||
affected_by = TOX_SYSCORRUPT
|
||||
if(toxins_type != TOX_OMNI && toxins_type != affected_by)
|
||||
return FALSE
|
||||
|
||||
toxloss = clamp((toxloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
|
||||
/mob/living/proc/setToxLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
//Defaults to omni here because setToxLoss is used by very few things that usually want to set all types
|
||||
/mob/living/proc/setToxLoss(amount, updating_health = TRUE, forced = FALSE, toxins_type = TOX_OMNI)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
|
||||
var/affected_by = TOX_DEFAULT
|
||||
if(HAS_TRAIT(src, TRAIT_ROBOTIC_ORGANISM))
|
||||
affected_by = TOX_SYSCORRUPT
|
||||
if(toxins_type != TOX_OMNI && toxins_type != affected_by)
|
||||
return FALSE
|
||||
|
||||
toxloss = amount
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
|
||||
@@ -522,8 +522,8 @@
|
||||
|
||||
|
||||
//called when the mob receives a bright flash
|
||||
/mob/living/proc/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash)
|
||||
if(get_eye_protection() < intensity && (override_blindness_check || !(HAS_TRAIT(src, TRAIT_BLIND))))
|
||||
/mob/living/proc/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash, override_protection = 0)
|
||||
if((override_protection || get_eye_protection() < intensity) && (override_blindness_check || !(HAS_TRAIT(src, TRAIT_BLIND))))
|
||||
overlay_fullscreen("flash", type)
|
||||
addtimer(CALLBACK(src, .proc/clear_fullscreen, "flash", 25), 25)
|
||||
return TRUE
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
/mob/living/silicon/apply_effect(effect = 0,effecttype = EFFECT_STUN, blocked = FALSE)
|
||||
return FALSE //The only effect that can hit them atm is flashes and they still directly edit so this works for now
|
||||
|
||||
/mob/living/silicon/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE) //immune to tox damage
|
||||
/mob/living/silicon/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE, toxins_type = TOX_DEFAULT) //immune to tox damage
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/setToxLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
/mob/living/silicon/setToxLoss(amount, updating_health = TRUE, forced = FALSE, toxins_type = TOX_OMNI)
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/adjustCloneLoss(amount, updating_health = TRUE, forced = FALSE) //immune to clone damage
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
/mob/living/silicon/pai/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
return take_holo_damage(amount)
|
||||
|
||||
/mob/living/silicon/pai/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
/mob/living/silicon/pai/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE, toxins_type = TOX_DEFAULT)
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/pai/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
@@ -111,7 +111,7 @@
|
||||
/mob/living/silicon/pai/getFireLoss()
|
||||
return emittermaxhealth - emitterhealth
|
||||
|
||||
/mob/living/silicon/pai/getToxLoss()
|
||||
/mob/living/silicon/pai/getToxLoss(toxins_type = TOX_OMNI)
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/pai/getOxyLoss()
|
||||
@@ -129,7 +129,7 @@
|
||||
/mob/living/silicon/pai/setStaminaLoss()
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/pai/setToxLoss()
|
||||
/mob/living/silicon/pai/setToxLoss(toxins_type = TOX_OMNI)
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/pai/setOxyLoss()
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
else if(damage_coeff[OXY])
|
||||
. = adjustHealth(amount * damage_coeff[OXY] * CONFIG_GET(number/damage_multiplier), updating_health, forced)
|
||||
|
||||
/mob/living/simple_animal/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
/mob/living/simple_animal/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE, toxins_type = TOX_DEFAULT)
|
||||
if(forced)
|
||||
. = adjustHealth(amount * CONFIG_GET(number/damage_multiplier), updating_health, forced)
|
||||
else if(damage_coeff[TOX])
|
||||
|
||||
@@ -1693,3 +1693,26 @@
|
||||
name = "Synthi-Sanguirite"
|
||||
description = "A synthetic coagulant used to help bleeding wounds clot faster. Not quite as effective as name brand Sanguirite, especially on patients with lots of cuts."
|
||||
clot_coeff_per_wound = 0.8
|
||||
|
||||
//Sloowly heals system corruption in robotic organisms. Causes mild toxins damage in nonrobots.
|
||||
/datum/reagent/medicine/system_cleaner
|
||||
name = "System Cleaner"
|
||||
description = "A reagent with special properties causing it to slowly reduce corruption in robots. Mildly toxic for organics."
|
||||
reagent_state = LIQUID
|
||||
color = "#D7C9C6"
|
||||
metabolization_rate = 0.2 * REAGENTS_METABOLISM
|
||||
overdose_threshold = 30
|
||||
|
||||
/datum/reagent/medicine/system_cleaner/on_mob_life(mob/living/carbon/M)
|
||||
. = ..()
|
||||
if(HAS_TRAIT(M, TRAIT_ROBOTIC_ORGANISM))
|
||||
M.adjustToxLoss(-0.2, toxins_type = TOX_SYSCORRUPT)
|
||||
else
|
||||
M.adjustToxLoss(0.5)
|
||||
|
||||
/datum/reagent/medicine/system_cleaner/overdose_process(mob/living/carbon/M)
|
||||
. = ..()
|
||||
if(HAS_TRAIT(M, TRAIT_ROBOTIC_ORGANISM))
|
||||
M.adjustToxLoss(0.4, toxins_type = TOX_SYSCORRUPT) //inverts its positive effect on overdose, for organics it's just more toxic
|
||||
else
|
||||
M.adjustToxLoss(0.5)
|
||||
|
||||
@@ -368,3 +368,9 @@
|
||||
var/location = get_turf(holder.my_atom)
|
||||
for(var/i = 1, i <= created_volume, i++)
|
||||
new /obj/item/stack/medical/mesh/(location)
|
||||
|
||||
/datum/chemical_reaction/system_cleaner
|
||||
name = "System Cleaner"
|
||||
id = /datum/reagent/medicine/system_cleaner
|
||||
results = list(/datum/reagent/medicine/system_cleaner = 4)
|
||||
required_reagents = list(/datum/reagent/iron = 2, /datum/reagent/oil = 2, /datum/reagent/medicine/calomel = 2, /datum/reagent/acetone = 2)
|
||||
|
||||
@@ -522,6 +522,17 @@
|
||||
category = list("Misc", "Medical Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
|
||||
|
||||
/datum/design/cyberimp_robot_radshielding
|
||||
name = "ECC System Guard Implant"
|
||||
desc = "This implant can counteract the effects of harmful radiation in robots, effectively increasing their radiation tolerance significantly."
|
||||
id = "ci-robot-radshielding"
|
||||
build_type = PROTOLATHE | MECHFAB
|
||||
construction_time = 40
|
||||
materials = list(/datum/material/iron = 500, /datum/material/glass = 400, /datum/material/silver = 350, /datum/material/gold = 1000, /datum/material/diamond = 100)
|
||||
build_path = /obj/item/organ/cyberimp/brain/robot_radshielding
|
||||
category = list("Misc", "Medical Designs")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
|
||||
|
||||
/datum/design/cyberimp_nutriment
|
||||
name = "Nutriment Pump Implant"
|
||||
desc = "This implant with synthesize and pump into your bloodstream a small amount of nutriment when you are starving."
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
display_name = "Advanced Cybernetic Implants"
|
||||
description = "Upgraded and more powerful cybernetic implants."
|
||||
prereq_ids = list("neural_programming", "cyber_implants","integrated_HUDs")
|
||||
design_ids = list("ci-toolset", "ci-surgery", "ci-reviver", "ci-nutrimentplus")
|
||||
design_ids = list("ci-toolset", "ci-surgery", "ci-reviver", "ci-nutrimentplus", "ci-robot-radshielding")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
|
||||
|
||||
/datum/techweb_node/combat_cyber_implants
|
||||
|
||||
@@ -118,6 +118,35 @@
|
||||
crit_fail = FALSE
|
||||
organ_flags &= ~ORGAN_FAILING
|
||||
|
||||
/obj/item/organ/cyberimp/brain/robot_radshielding
|
||||
name = "ECC System Guard implant"
|
||||
desc = "This implant can counteract the effects of harmful radiation in robots, effectively increasing their radiation tolerance significantly."
|
||||
implant_color = "#0066ff"
|
||||
slot = ORGAN_SLOT_BRAIN_ROBOT_RADSHIELDING
|
||||
|
||||
/obj/item/organ/cyberimp/brain/robot_radshielding/emp_act(severity)
|
||||
. = ..()
|
||||
if(!owner || . & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(!HAS_TRAIT(owner, TRAIT_ROBOTIC_ORGANISM))
|
||||
return //Why did you even get yourself implanted this if you aren't a robot?
|
||||
owner.adjustToxLoss(severity / 10, toxins_type = TOX_SYSCORRUPT)
|
||||
to_chat(owner, "<span class='warning'>Your ECC implant suddenly behaves very erratically, scrambling your system.</span>")
|
||||
|
||||
/obj/item/organ/cyberimp/brain/robot_radshielding/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
ADD_TRAIT(owner, TRAIT_ROBOT_RADSHIELDING, ROBOT_RADSHIELDING_IMPLANT_TRAIT) //Organics can get this, but it does literally nothing for them except cause more pain if EMPd, so uh, good on you?
|
||||
|
||||
/obj/item/organ/cyberimp/brain/robot_radshielding/Remove(special = FALSE)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
var/mob/living/carbon/C = .
|
||||
REMOVE_TRAIT(C, TRAIT_ROBOT_RADSHIELDING, ROBOT_RADSHIELDING_IMPLANT_TRAIT)
|
||||
|
||||
|
||||
|
||||
//[[[[MOUTH]]]]
|
||||
/obj/item/organ/cyberimp/mouth
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
Timeconsuming but highly effective surgery that purges any system corruption currently present, only works on robotic organisms.
|
||||
Has a version for organic people and robotic/synthetic ones, considering robotic limbs and robotic organism isn't neccessarily linked and, say, someone could surgery a synthetic's brain into a nonsynthetic head.
|
||||
*/
|
||||
/datum/surgery/purge_corruption
|
||||
name = "Purge corruption"
|
||||
desc = "A highly complex and time-consuming surgery used to purge any corruption currently present in a robot. Will knock out the patient for an amount of time proportional to corruption purged."
|
||||
steps = list(
|
||||
/datum/surgery_step/incise,
|
||||
/datum/surgery_step/retract_skin,
|
||||
/datum/surgery_step/clamp_bleeders,
|
||||
/datum/surgery_step/saw,
|
||||
/datum/surgery_step/clamp_bleeders,
|
||||
/datum/surgery_step/incise,
|
||||
/datum/surgery_step/clamp_bleeders,
|
||||
/datum/surgery_step/override_safeties,
|
||||
/datum/surgery_step/remove_corruption,
|
||||
/datum/surgery_step/close)
|
||||
possible_locs = list(BODY_ZONE_HEAD)
|
||||
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey) //If admins made a monkey into a robotic supersoldier or something.
|
||||
|
||||
/datum/surgery/purge_corruption/robotic
|
||||
requires_bodypart_type = BODYPART_ROBOTIC
|
||||
steps = list(
|
||||
/datum/surgery_step/mechanic_open,
|
||||
/datum/surgery_step/open_hatch,
|
||||
/datum/surgery_step/mechanic_unwrench,
|
||||
/datum/surgery_step/cut_wires,
|
||||
/datum/surgery_step/prepare_electronics,
|
||||
/datum/surgery_step/override_safeties,
|
||||
/datum/surgery_step/remove_corruption,
|
||||
/datum/surgery_step/mechanic_wrench,
|
||||
/datum/surgery_step/mechanic_close)
|
||||
|
||||
/datum/surgery/purge_corruption/can_start(mob/user, mob/living/carbon/target, obj/item/tool)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
var/obj/item/organ/brain/B = target.getorganslot(ORGAN_SLOT_BRAIN)
|
||||
if(!B || !HAS_TRAIT(target, TRAIT_ROBOTIC_ORGANISM))
|
||||
return FALSE
|
||||
|
||||
/datum/surgery_step/override_safeties
|
||||
name = "Override inbuilt safeguards (multitool)"
|
||||
implements = list(TOOL_MULTITOOL = 100, TOOL_WIRECUTTER = 20)
|
||||
time = 50
|
||||
|
||||
/datum/surgery_step/override_safeties/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
display_results(user, target, "<span class='notice'>You begin to override the safeties of [target]...</span>",
|
||||
"[user] begins to override the hardware safeties of [target].",
|
||||
"[user] begins to perform surgery on [target]'s brain.")
|
||||
|
||||
/datum/surgery_step/override_safeties/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
display_results(user, target, "<span class='notice'>You succeed in overriding the safeties of [target].</span>",
|
||||
"[user] successfully overrides the safeties of [target]!",
|
||||
"[user] completes the surgery on [target]'s brain.")
|
||||
return TRUE
|
||||
|
||||
/datum/surgery_step/override_safeties/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
display_results(user, target, "<span class='notice'>You fail overriding the safeties of [target].</span>",
|
||||
"[user] fails overriding the safeties of [target]",
|
||||
"[user] completes the surgery on [target]'s brain.")
|
||||
return FALSE
|
||||
|
||||
/datum/surgery_step/remove_corruption
|
||||
name = "Initiate system purge (multitool)"
|
||||
implements = list(TOOL_MULTITOOL = 95, TOOL_WIRECUTTER = 10) //You are relatively safe just using a multitool, but you should use sterilizer or simillar success chance increasing chems regardless.
|
||||
time = 80 //Takes a l o n g time, but completely purges system corruption
|
||||
|
||||
/datum/surgery_step/remove_corruption/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
display_results(user, target, "<span class='notice'>You begin to initiate a system purge in [target]...</span>",
|
||||
"[user] begins to initiate a system purge in [target].",
|
||||
"[user] begins to perform surgery on [target].")
|
||||
|
||||
/datum/surgery_step/remove_corruption/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
if(!target.getorganslot(ORGAN_SLOT_BRAIN) || !HAS_TRAIT(target, TRAIT_ROBOTIC_ORGANISM))
|
||||
user.visible_message("<span class='warning'>[user] suddenly realises that [user.p_they()] can't actually initiate a system purge in [target]...", "<span class='warning'>You suddenly realise that you cannot initiate a system purge in [target].</span>")
|
||||
return FALSE
|
||||
display_results(user, target, "<span class='notice'>You successfully initate a system purge in [target]...</span>",
|
||||
"[user] successfully initiates a system purge in [target].",
|
||||
"[user] completes the surgery on [target].")
|
||||
var/purged = target.getToxLoss(TOX_SYSCORRUPT)
|
||||
target.setToxLoss(0, toxins_type = TOX_SYSCORRUPT)
|
||||
target.Unconscious(round(purged * 0.2, 1))
|
||||
return TRUE
|
||||
|
||||
/datum/surgery_step/remove_corruption/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
if(!target.getorganslot(ORGAN_SLOT_BRAIN) || !HAS_TRAIT(target, TRAIT_ROBOTIC_ORGANISM))
|
||||
user.visible_message("<span class='warning'>[user] suddenly realises that [user.p_they()] can't actually initiate a system purge in [target]...", "<span class='warning'>You suddenly realise that you cannot initiate a system purge in [target].</span>")
|
||||
return FALSE
|
||||
display_results(user, target, "<span class='notice'>You fail purging [target]'s system of corruption, damaging [target.p_them()] instead...</span>",
|
||||
"[user] fails purging [target]'s system of corruption, damaging [target.p_them()] instead.",
|
||||
"[user] completes the surgery on [target].")
|
||||
target.adjustOrganLoss(ORGAN_SLOT_BRAIN, 40)
|
||||
target.gain_trauma_type(BRAIN_TRAUMA_SEVERE, TRAUMA_RESILIENCE_LOBOTOMY)
|
||||
return FALSE
|
||||
@@ -210,6 +210,8 @@
|
||||
var/datum/component/nanites/N = C.GetComponent(/datum/component/nanites)
|
||||
if(isnull(N))
|
||||
return ..()
|
||||
if(HAS_TRAIT(C, TRAIT_ROBOTIC_ORGANISM))
|
||||
C.adjustToxLoss(1, toxins_type = TOX_SYSCORRUPT) //Interferes with robots. Rare chem, so, pretty good at that too.
|
||||
N.nanite_volume += -cached_purity*5//0.5 seems to be the default to me, so it'll neuter them.
|
||||
..()
|
||||
|
||||
|
||||
@@ -2495,6 +2495,7 @@
|
||||
#include "code\modules\mob\living\carbon\death.dm"
|
||||
#include "code\modules\mob\living\carbon\emote.dm"
|
||||
#include "code\modules\mob\living\carbon\examine.dm"
|
||||
#include "code\modules\mob\living\carbon\handle_corruption.dm"
|
||||
#include "code\modules\mob\living\carbon\inventory.dm"
|
||||
#include "code\modules\mob\living\carbon\life.dm"
|
||||
#include "code\modules\mob\living\carbon\say.dm"
|
||||
@@ -3418,6 +3419,7 @@
|
||||
#include "code\modules\surgery\organic_steps.dm"
|
||||
#include "code\modules\surgery\plastic_surgery.dm"
|
||||
#include "code\modules\surgery\prosthetic_replacement.dm"
|
||||
#include "code\modules\surgery\purge_corruption.dm"
|
||||
#include "code\modules\surgery\remove_embedded_object.dm"
|
||||
#include "code\modules\surgery\repair_puncture.dm"
|
||||
#include "code\modules\surgery\robot_brain_surgery.dm"
|
||||
|
||||
@@ -90,7 +90,7 @@ const PatientStateView = (props, context) => {
|
||||
</ProgressBar>
|
||||
</LabeledList.Item>
|
||||
{damageTypes.map(type => (
|
||||
<LabeledList.Item key={type.type} label={type.label}>
|
||||
<LabeledList.Item key={type.type} label={(patient.is_robotic_organism && type.label === 'Toxin') ? 'Corruption' : type.label}>
|
||||
<ProgressBar
|
||||
value={patient[type.type] / patient.maxHealth}
|
||||
color="bad">
|
||||
|
||||
@@ -73,7 +73,7 @@ export const Sleeper = (props, context) => {
|
||||
{damageTypes.map(type => (
|
||||
<LabeledList.Item
|
||||
key={type.type}
|
||||
label={type.label}>
|
||||
label={occupant.is_robotic_organism && type.label === 'Toxin' ? 'Corruption' : type.label}>
|
||||
<ProgressBar
|
||||
value={occupant[type.type]}
|
||||
minValue={0}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user