Merge pull request #14025 from DeltaFire15/synth-robotics-revival
More Synth tweaks
This commit is contained in:
@@ -411,15 +411,18 @@
|
||||
if(isrobotic(src))
|
||||
apply_status_effect(/datum/status_effect/no_combat_mode/robotic_emp, severity / 20)
|
||||
severity *= 0.5
|
||||
var/do_not_stun = FALSE
|
||||
if(HAS_TRAIT(src, TRAIT_ROBOTIC_ORGANISM))
|
||||
severity *= 0.5 //Robotpeople take less limb damage, but instead suffer system corruption (see carbon emp_act)
|
||||
do_not_stun = TRUE
|
||||
for(var/obj/item/bodypart/L in src.bodyparts)
|
||||
if(L.is_robotic_limb())
|
||||
if(!informed)
|
||||
to_chat(src, "<span class='userdanger'>You feel a sharp pain as your robotic limbs overload.</span>")
|
||||
informed = TRUE
|
||||
L.receive_damage(0,severity/10)
|
||||
Stun(severity*2)
|
||||
if(!do_not_stun) //Tiny bit better than checking for the trait another six times in succession
|
||||
Stun(severity*2)
|
||||
|
||||
/mob/living/carbon/human/acid_act(acidpwr, acid_volume, bodyzone_hit)
|
||||
var/list/damaged = list()
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
//Emergency Reboot: A surgery that allows for revival of Synthetics without the need for a defib. Doesn't all all the organs like the Revival surgery though.
|
||||
|
||||
/datum/surgery/emergency_reboot
|
||||
name = "Emergency Reboot"
|
||||
desc = "A surgery forcing the posibrain of a robot to begin it's reboot procedure, if their body can sustain its operation."
|
||||
possible_locs = list(BODY_ZONE_HEAD)
|
||||
requires_bodypart_type = BODYPART_ROBOTIC //If you are a Synth with a organic head (somehow), this won't work.
|
||||
steps = list(/datum/surgery_step/mechanic_open, /datum/surgery_step/open_hatch, /datum/surgery_step/mechanic_unwrench, /datum/surgery_step/force_reboot, /datum/surgery_step/mechanic_wrench, /datum/surgery_step/mechanic_close)
|
||||
|
||||
/datum/surgery/emergency_reboot/can_start(mob/user, mob/living/carbon/target, obj/item/tool)
|
||||
if(!..())
|
||||
return FALSE
|
||||
if(target.stat != DEAD)
|
||||
return FALSE
|
||||
if(target.suiciding || HAS_TRAIT(target, TRAIT_NOCLONE) || target.hellbound)
|
||||
return FALSE
|
||||
if(!HAS_TRAIT(target, TRAIT_ROBOTIC_ORGANISM))
|
||||
return FALSE
|
||||
var/obj/item/organ/brain/B = target.getorganslot(ORGAN_SLOT_BRAIN)
|
||||
if(!B || !istype(B, /obj/item/organ/brain/ipc))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/surgery_step/force_reboot
|
||||
name = "initiate system reboot"
|
||||
implements = list(TOOL_MULTITOOL = 100, /obj/item/borg/upgrade/restart = 100)
|
||||
time = 100
|
||||
|
||||
/datum/surgery_step/force_reboot/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
display_results(user, target, "<span class='notice'>You prepare to begin rebooting [target]'s posibrain.</span>",
|
||||
"[user] prepares to reboot [target]'s posibrain with [tool].",
|
||||
"[user] prepares to reboot [target]'s posibrain with [tool].")
|
||||
target.notify_ghost_cloning("Someone is trying to reboot you! Re-enter your corpse if you want to be revived!", source = target)
|
||||
|
||||
/datum/surgery_step/force_reboot/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
display_results(user, target, "<span class='notice'>You successfully initiate a reboot in [target]'s posibrain...</span>",
|
||||
"[user] initiates a reboot in [target]'s posibrain...",
|
||||
"[user] initiates a reboot in [target]'s posibrain...")
|
||||
target.adjustOxyLoss(-50, 0)
|
||||
target.updatehealth()
|
||||
var/tplus = world.time - target.timeofdeath
|
||||
if(target.revive())
|
||||
target.visible_message("...[target]'s posibrain flickers to life once again!")
|
||||
target.emote("ping")
|
||||
var/list/policies = CONFIG_GET(keyed_list/policyconfig)
|
||||
var/timelimit = CONFIG_GET(number/defib_cmd_time_limit) * 10 //the config is in seconds, not deciseconds
|
||||
var/late = timelimit && (tplus > timelimit)
|
||||
var/policy = late? policies[POLICYCONFIG_ON_DEFIB_LATE] : policies[POLICYCONFIG_ON_DEFIB_INTACT]
|
||||
if(policy)
|
||||
to_chat(target, policy)
|
||||
target.log_message("revived using surgical revival, [tplus] deciseconds from time of death, considered [late? "late" : "memory-intact"] revival under configured policy limits.", LOG_GAME)
|
||||
return TRUE
|
||||
else
|
||||
target.visible_message("...[target]'s posibrain flickers a few times, before the lights fade yet again...")
|
||||
return FALSE
|
||||
|
||||
/datum/surgery_step/force_reboot/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
display_results(user, target, "<span class='notice'>You attempt to reboot [target]'s posibrain, but [target.p_they()] doesn't react.</span>",
|
||||
"[user] attempts to reboot [target]'s posibrain, but [target.p_they()] doesn't react.",
|
||||
"[user] attempts to reboot [target]'s posibrain, but [target.p_they()] doesn't react")
|
||||
target.adjustOrganLoss(ORGAN_SLOT_BRAIN, 15, 199)
|
||||
return FALSE
|
||||
@@ -2,11 +2,17 @@
|
||||
name = "removal of embedded objects"
|
||||
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/remove_object)
|
||||
possible_locs = list(BODY_ZONE_R_ARM,BODY_ZONE_L_ARM,BODY_ZONE_R_LEG,BODY_ZONE_L_LEG,BODY_ZONE_CHEST,BODY_ZONE_HEAD)
|
||||
|
||||
/datum/surgery/embedded_removal/robot
|
||||
requires_bodypart_type = BODYPART_ROBOTIC
|
||||
steps = list(/datum/surgery_step/mechanic_open, /datum/surgery_step/open_hatch, /datum/surgery_step/remove_object)
|
||||
|
||||
/datum/surgery_step/remove_object
|
||||
name = "remove embedded objects"
|
||||
time = 32
|
||||
accept_hand = 1
|
||||
var/obj/item/bodypart/L = null
|
||||
|
||||
/datum/surgery_step/remove_object/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
L = surgery.operated_bodypart
|
||||
if(L)
|
||||
|
||||
Reference in New Issue
Block a user