Cleans up revive related procs (#47025)

* Cleans up revive related procs

* h

* fuck

* Fixes proc arguments

* Further fixes

* Unfucks line endings
This commit is contained in:
81Denton
2019-10-23 00:16:13 +02:00
committed by Rob Bailey
parent 588346133a
commit 6b1161ecd9
44 changed files with 64 additions and 63 deletions

View File

@@ -152,7 +152,7 @@
var/mob/living/L = l var/mob/living/L = l
if(L.stat != DEAD && L.mind) if(L.stat != DEAD && L.mind)
L.mind.transfer_to(soulowner) L.mind.transfer_to(soulowner)
soulowner.revive(TRUE, TRUE) soulowner.revive(full_heal = TRUE, admin_revive = TRUE)
L.death(FALSE) L.death(FALSE)
//Lose your claim to the throne! //Lose your claim to the throne!

View File

@@ -81,7 +81,7 @@
occupier.adjustBruteLoss(-1, 0) occupier.adjustBruteLoss(-1, 0)
occupier.updatehealth() occupier.updatehealth()
if(occupier.health >= 0 && occupier.stat == DEAD) if(occupier.health >= 0 && occupier.stat == DEAD)
occupier.revive() occupier.revive(full_heal = FALSE, admin_revive = FALSE)
return occupier.health < 100 return occupier.health < 100
/obj/machinery/computer/aifixer/process() /obj/machinery/computer/aifixer/process()

View File

@@ -160,7 +160,7 @@
if(!victim.client || !istype(victim)) if(!victim.client || !istype(victim))
return return
to_chat(victim, "<span class='notice'>You feel great!</span>") to_chat(victim, "<span class='notice'>You feel great!</span>")
victim.revive(full_heal = 1, admin_revive = 1) victim.revive(full_heal = TRUE, admin_revive = TRUE)
/obj/effect/mine/pickup/speed /obj/effect/mine/pickup/speed
name = "Yellow Orb" name = "Yellow Orb"

View File

@@ -627,7 +627,7 @@
user.visible_message("<span class='notice'>[req_defib ? "[defib]" : "[src]"] pings: Resuscitation successful.</span>") user.visible_message("<span class='notice'>[req_defib ? "[defib]" : "[src]"] pings: Resuscitation successful.</span>")
playsound(src, 'sound/machines/defib_success.ogg', 50, FALSE) playsound(src, 'sound/machines/defib_success.ogg', 50, FALSE)
H.set_heartattack(FALSE) H.set_heartattack(FALSE)
H.revive() H.revive(full_heal = FALSE, admin_revive = FALSE)
H.emote("gasp") H.emote("gasp")
H.Jitter(100) H.Jitter(100)
SEND_SIGNAL(H, COMSIG_LIVING_MINOR_SHOCK) SEND_SIGNAL(H, COMSIG_LIVING_MINOR_SHOCK)

View File

@@ -63,7 +63,7 @@
R.mind.grab_ghost() R.mind.grab_ghost()
playsound(loc, 'sound/voice/liveagain.ogg', 75, TRUE) playsound(loc, 'sound/voice/liveagain.ogg', 75, TRUE)
R.revive() R.revive(full_heal = FALSE, admin_revive = FALSE)
/obj/item/borg/upgrade/disablercooler /obj/item/borg/upgrade/disablercooler
name = "cyborg rapid disabler cooling module" name = "cyborg rapid disabler cooling module"

View File

@@ -131,7 +131,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
/obj/item/claymore/highlander/attack(mob/living/target, mob/living/user) /obj/item/claymore/highlander/attack(mob/living/target, mob/living/user)
. = ..() . = ..()
if(!QDELETED(target) && iscarbon(target) && target.stat == DEAD && target.mind && target.mind.special_role == "highlander") if(!QDELETED(target) && iscarbon(target) && target.stat == DEAD && target.mind && target.mind.special_role == "highlander")
user.fully_heal() //STEAL THE LIFE OF OUR FALLEN FOES user.fully_heal(admin_revive = FALSE) //STEAL THE LIFE OF OUR FALLEN FOES
add_notch(user) add_notch(user)
target.visible_message("<span class='warning'>[target] crumbles to dust beneath [user]'s blows!</span>", "<span class='userdanger'>As you fall, your body crumbles to dust!</span>") target.visible_message("<span class='warning'>[target] crumbles to dust beneath [user]'s blows!</span>", "<span class='userdanger'>As you fall, your body crumbles to dust!</span>")
target.dust() target.dust()

View File

@@ -85,7 +85,7 @@
mind.transfer_to(body) mind.transfer_to(body)
else else
body.forceMove(T) body.forceMove(T)
body.revive(1,1) body.revive(full_heal = TRUE, admin_revive = TRUE)
mind.grab_ghost(TRUE) mind.grab_ghost(TRUE)
body.flash_act() body.flash_act()

View File

@@ -1130,7 +1130,7 @@
to_chat(usr, "This can only be used on instances of type /mob/living.") to_chat(usr, "This can only be used on instances of type /mob/living.")
return return
L.revive(full_heal = 1, admin_revive = 1) L.revive(full_heal = TRUE, admin_revive = TRUE)
message_admins("<span class='danger'>Admin [key_name_admin(usr)] healed / revived [key_name_admin(L)]!</span>") message_admins("<span class='danger'>Admin [key_name_admin(usr)] healed / revived [key_name_admin(L)]!</span>")
log_admin("[key_name(usr)] healed / Revived [key_name(L)].") log_admin("[key_name(usr)] healed / Revived [key_name(L)].")

View File

@@ -537,7 +537,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!istype(M)) if(!istype(M))
alert("Cannot revive a ghost") alert("Cannot revive a ghost")
return return
M.revive(full_heal = 1, admin_revive = 1) M.revive(full_heal = TRUE, admin_revive = TRUE)
log_admin("[key_name(usr)] healed / revived [key_name(M)]") log_admin("[key_name(usr)] healed / revived [key_name(M)]")
var/msg = "<span class='danger'>Admin [key_name_admin(usr)] healed / revived [ADMIN_LOOKUPFLW(M)]!</span>" var/msg = "<span class='danger'>Admin [key_name_admin(usr)] healed / revived [ADMIN_LOOKUPFLW(M)]!</span>"

View File

@@ -140,7 +140,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
L.death() L.death()
new/mob/living/simple_animal/hostile/blob/blobspore(T) new/mob/living/simple_animal/hostile/blob/blobspore(T)
else else
L.fully_heal() L.fully_heal(admin_revive = FALSE)
for(var/area/A in GLOB.sortedAreas) for(var/area/A in GLOB.sortedAreas)
if(!(A.type in GLOB.the_station_areas)) if(!(A.type in GLOB.the_station_areas))

View File

@@ -33,7 +33,7 @@
if(!user || !istype(user)) if(!user || !istype(user))
return return
user.cure_fakedeath("changeling") user.cure_fakedeath("changeling")
user.revive(full_heal = TRUE) user.revive(full_heal = TRUE, admin_revive = FALSE)
var/list/missing = user.get_missing_limbs() var/list/missing = user.get_missing_limbs()
missing -= BODY_ZONE_HEAD // headless changelings are funny missing -= BODY_ZONE_HEAD // headless changelings are funny
if(missing.len) if(missing.len)

View File

@@ -562,7 +562,7 @@ structure_check() searches for nearby cultist structures required for the invoca
fail_invoke() fail_invoke()
return return
revives_used += SOULS_TO_REVIVE revives_used += SOULS_TO_REVIVE
mob_to_revive.revive(1, 1) //This does remove traits and such, but the rune might actually see some use because of it! mob_to_revive.revive(full_heal = TRUE, admin_revive = TRUE) //This does remove traits and such, but the rune might actually see some use because of it!
mob_to_revive.grab_ghost() mob_to_revive.grab_ghost()
if(!mob_to_revive.client || mob_to_revive.client.is_afk()) if(!mob_to_revive.client || mob_to_revive.client.is_afk())
set waitfor = FALSE set waitfor = FALSE

View File

@@ -427,13 +427,13 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master",
reviveNumber += LOSS_PER_DEATH reviveNumber += LOSS_PER_DEATH
update_hud() update_hud()
if(body) if(body)
body.revive(TRUE, TRUE) //Adminrevive also recovers organs, preventing someone from resurrecting without a heart. body.revive(full_heal = TRUE, admin_revive = TRUE) //Adminrevive also recovers organs, preventing someone from resurrecting without a heart.
if(istype(body.loc, /obj/effect/dummy/phased_mob/slaughter/)) if(istype(body.loc, /obj/effect/dummy/phased_mob/slaughter/))
body.forceMove(get_turf(body))//Fixes dying while jaunted leaving you permajaunted. body.forceMove(get_turf(body))//Fixes dying while jaunted leaving you permajaunted.
if(istype(body, /mob/living/carbon/true_devil)) if(istype(body, /mob/living/carbon/true_devil))
var/mob/living/carbon/true_devil/D = body var/mob/living/carbon/true_devil/D = body
if(D.oldform) if(D.oldform)
D.oldform.revive(1,0) // Heal the old body too, so the devil doesn't resurrect, then immediately regress into a dead body. D.oldform.revive(full_heal = TRUE, admin_revive = FALSE) // Heal the old body too, so the devil doesn't resurrect, then immediately regress into a dead body.
if(body.stat == DEAD) if(body.stat == DEAD)
create_new_body() create_new_body()
else else

View File

@@ -233,7 +233,7 @@
return return
M.set_species(/datum/species/skeleton, icon_update=0) M.set_species(/datum/species/skeleton, icon_update=0)
M.revive(full_heal = 1, admin_revive = 1) M.revive(full_heal = TRUE, admin_revive = TRUE)
spooky_scaries |= M spooky_scaries |= M
to_chat(M, "<span class='userdanger'>You have been revived by </span><B>[user.real_name]!</B>") to_chat(M, "<span class='userdanger'>You have been revived by </span><B>[user.real_name]!</B>")
to_chat(M, "<span class='userdanger'>[user.p_theyre(TRUE)] your master now, assist [user.p_them()] even if it costs you your new life!</span>") to_chat(M, "<span class='userdanger'>[user.p_theyre(TRUE)] your master now, assist [user.p_them()] even if it costs you your new life!</span>")

View File

@@ -273,7 +273,7 @@
if(12) if(12)
//Healing //Healing
T.visible_message("<span class='userdanger'>[user] looks very healthy!</span>") T.visible_message("<span class='userdanger'>[user] looks very healthy!</span>")
user.revive(full_heal = 1, admin_revive = 1) user.revive(full_heal = TRUE, admin_revive = TRUE)
if(13) if(13)
//Mad Dosh //Mad Dosh
T.visible_message("<span class='userdanger'>Mad dosh shoots out of [src]!</span>") T.visible_message("<span class='userdanger'>Mad dosh shoots out of [src]!</span>")

View File

@@ -27,7 +27,7 @@
return return
if(M.stat == DEAD) if(M.stat == DEAD)
M.faction = list("neutral") M.faction = list("neutral")
M.revive(full_heal = 1, admin_revive = 1) M.revive(full_heal = TRUE, admin_revive = TRUE)
if(ishostile(target)) if(ishostile(target))
var/mob/living/simple_animal/hostile/H = M var/mob/living/simple_animal/hostile/H = M
if(malfunctioning) if(malfunctioning)

View File

@@ -60,7 +60,7 @@
if(inert) if(inert)
to_chat(owner, "<span class='notice'>[src] breaks down as it tries to activate.</span>") to_chat(owner, "<span class='notice'>[src] breaks down as it tries to activate.</span>")
else else
owner.revive(full_heal = 1) owner.revive(full_heal = TRUE, admin_revive = FALSE)
qdel(src) qdel(src)
/obj/item/organ/regenerative_core/on_life() /obj/item/organ/regenerative_core/on_life()

View File

@@ -126,7 +126,7 @@
return TRUE return TRUE
to_chat(src, "<span class='danger'>You devour [victim]. Your health is fully restored.</span>") to_chat(src, "<span class='danger'>You devour [victim]. Your health is fully restored.</span>")
revive(full_heal = TRUE) revive(full_heal = TRUE, admin_revive = FALSE)
// No defib possible after laughter // No defib possible after laughter
victim.adjustBruteLoss(1000) victim.adjustBruteLoss(1000)

View File

@@ -717,7 +717,7 @@
new /obj/effect/decal/cleanable/ash(get_turf(src)) new /obj/effect/decal/cleanable/ash(get_turf(src))
..() ..()
/obj/structure/cloth_pile/proc/revive() /obj/structure/cloth_pile/proc/revive(full_heal = FALSE, admin_revive = FALSE)
if(QDELETED(src) || QDELETED(cloth_golem)) //QDELETED also checks for null, so if no cloth golem is set this won't runtime if(QDELETED(src) || QDELETED(cloth_golem)) //QDELETED also checks for null, so if no cloth golem is set this won't runtime
return return
if(cloth_golem.suiciding || cloth_golem.hellbound) if(cloth_golem.suiciding || cloth_golem.hellbound)
@@ -1074,7 +1074,7 @@
. = ..() . = ..()
C.equip_to_slot_or_del(new /obj/item/clothing/head/that (), SLOT_HEAD) C.equip_to_slot_or_del(new /obj/item/clothing/head/that (), SLOT_HEAD)
C.equip_to_slot_or_del(new /obj/item/clothing/glasses/monocle (), SLOT_GLASSES) C.equip_to_slot_or_del(new /obj/item/clothing/glasses/monocle (), SLOT_GLASSES)
C.revive(full_heal = TRUE) C.revive(full_heal = TRUE, admin_revive = FALSE)
SEND_SOUND(C, sound('sound/misc/capitialism.ogg')) SEND_SOUND(C, sound('sound/misc/capitialism.ogg'))
C.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/knock ()) C.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/knock ())
@@ -1116,7 +1116,7 @@
/datum/species/golem/soviet/on_species_gain(mob/living/carbon/C, datum/species/old_species) /datum/species/golem/soviet/on_species_gain(mob/living/carbon/C, datum/species/old_species)
. = ..() . = ..()
C.equip_to_slot_or_del(new /obj/item/clothing/head/ushanka (), SLOT_HEAD) C.equip_to_slot_or_del(new /obj/item/clothing/head/ushanka (), SLOT_HEAD)
C.revive(full_heal = TRUE) C.revive(full_heal = TRUE, admin_revive = FALSE)
SEND_SOUND(C, sound('sound/misc/Russian_Anthem_chorus.ogg')) SEND_SOUND(C, sound('sound/misc/Russian_Anthem_chorus.ogg'))
C.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/knock ()) C.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/knock ())

View File

@@ -140,7 +140,7 @@
respawn_progress++ respawn_progress++
playsound(owner,'sound/effects/singlebeat.ogg',40,TRUE) playsound(owner,'sound/effects/singlebeat.ogg',40,TRUE)
if(respawn_progress >= HEART_RESPAWN_THRESHHOLD) if(respawn_progress >= HEART_RESPAWN_THRESHHOLD)
owner.revive(full_heal = TRUE) owner.revive(full_heal = TRUE, admin_revive = FALSE)
if(!(owner.dna.species.id == "shadow" || owner.dna.species.id == "nightmare")) if(!(owner.dna.species.id == "shadow" || owner.dna.species.id == "nightmare"))
var/mob/living/carbon/old_owner = owner var/mob/living/carbon/old_owner = owner
Remove(owner, HEART_SPECIAL_SHADOWIFY) Remove(owner, HEART_SPECIAL_SHADOWIFY)

View File

@@ -502,11 +502,11 @@
med_hud_set_health() med_hud_set_health()
med_hud_set_status() med_hud_set_status()
//proc used to ressuscitate a mob //Proc used to resuscitate a mob, for full_heal see fully_heal()
/mob/living/proc/revive(full_heal = FALSE, admin_revive = FALSE) /mob/living/proc/revive(full_heal = FALSE, admin_revive = FALSE)
SEND_SIGNAL(src, COMSIG_LIVING_REVIVE, full_heal, admin_revive) SEND_SIGNAL(src, COMSIG_LIVING_REVIVE, full_heal, admin_revive)
if(full_heal) if(full_heal)
fully_heal(admin_revive) fully_heal(admin_revive = TRUE)
if(stat == DEAD && can_be_revived()) //in some cases you can't revive (e.g. no brain) if(stat == DEAD && can_be_revived()) //in some cases you can't revive (e.g. no brain)
GLOB.dead_mob_list -= src GLOB.dead_mob_list -= src
GLOB.alive_mob_list += src GLOB.alive_mob_list += src
@@ -517,7 +517,7 @@
update_sight() update_sight()
clear_alert("not_enough_oxy") clear_alert("not_enough_oxy")
reload_fullscreen() reload_fullscreen()
. = 1 . = TRUE
if(mind) if(mind)
for(var/S in mind.spell_list) for(var/S in mind.spell_list)
var/obj/effect/proc_holder/spell/spell = S var/obj/effect/proc_holder/spell/spell = S
@@ -543,7 +543,8 @@
//proc used to completely heal a mob. //proc used to completely heal a mob.
/mob/living/proc/fully_heal(admin_revive = 0) //admin_revive = TRUE is used in other procs, for example mob/living/carbon/fully_heal()
/mob/living/proc/fully_heal(admin_revive = FALSE)
restore_blood() restore_blood()
setToxLoss(0, 0) //zero as second argument not automatically call updatehealth(). setToxLoss(0, 0) //zero as second argument not automatically call updatehealth().
setOxyLoss(0, 0) setOxyLoss(0, 0)
@@ -574,9 +575,9 @@
//proc called by revive(), to check if we can actually ressuscitate the mob (we don't want to revive him and have him instantly die again) //proc called by revive(), to check if we can actually ressuscitate the mob (we don't want to revive him and have him instantly die again)
/mob/living/proc/can_be_revived() /mob/living/proc/can_be_revived()
. = 1 . = TRUE
if(health <= HEALTH_THRESHOLD_DEAD) if(health <= HEALTH_THRESHOLD_DEAD)
return 0 return FALSE
/mob/living/proc/update_damage_overlays() /mob/living/proc/update_damage_overlays()
return return
@@ -593,7 +594,7 @@
if (!buckled.anchored) if (!buckled.anchored)
return buckled.Move(newloc, direct) return buckled.Move(newloc, direct)
else else
return 0 return FALSE
var/old_direction = dir var/old_direction = dir
var/turf/T = loc var/turf/T = loc

View File

@@ -922,7 +922,7 @@
else else
clear_fullscreen("remote_view", 0) clear_fullscreen("remote_view", 0)
/mob/living/silicon/ai/revive(full_heal = 0, admin_revive = 0) /mob/living/silicon/ai/revive(full_heal = FALSE, admin_revive = FALSE)
. = ..() . = ..()
if(.) //successfully ressuscitated from death if(.) //successfully ressuscitated from death
set_core_display_icon(display_icon_override) set_core_display_icon(display_icon_override)

View File

@@ -960,7 +960,7 @@
diag_hud_set_aishell() diag_hud_set_aishell()
update_health_hud() update_health_hud()
/mob/living/silicon/robot/revive(full_heal = 0, admin_revive = 0) /mob/living/silicon/robot/revive(full_heal = FALSE, admin_revive = FALSE)
if(..()) //successfully ressuscitated from death if(..()) //successfully ressuscitated from death
if(!QDELETED(builtInCamera) && !wires.is_cut(WIRE_CAMERA)) if(!QDELETED(builtInCamera) && !wires.is_cut(WIRE_CAMERA))
builtInCamera.toggle_cam(src,0) builtInCamera.toggle_cam(src,0)
@@ -968,7 +968,7 @@
if(admin_revive) if(admin_revive)
locked = TRUE locked = TRUE
notify_ai(NEW_BORG) notify_ai(NEW_BORG)
. = 1 . = TRUE
/mob/living/silicon/robot/fully_replace_character_name(oldname, newname) /mob/living/silicon/robot/fully_replace_character_name(oldname, newname)
..() ..()

View File

@@ -945,10 +945,10 @@ Pass a positive integer as an argument to override a bot's default speed.
. = ..() . = ..()
bot_reset() bot_reset()
/mob/living/simple_animal/bot/revive(full_heal = 0, admin_revive = 0) /mob/living/simple_animal/bot/revive(full_heal = FALSE, admin_revive = FALSE)
if(..()) if(..())
update_icon() update_icon()
. = 1 . = TRUE
/mob/living/simple_animal/bot/ghost() /mob/living/simple_animal/bot/ghost()
if(stat != DEAD) // Only ghost if we're doing this while alive, the pAI probably isn't dead yet. if(stat != DEAD) // Only ghost if we're doing this while alive, the pAI probably isn't dead yet.

View File

@@ -68,7 +68,7 @@
return return
user.visible_message("<span class='notice'>[user] begins to reactivate [src].</span>", "<span class='notice'>You begin to reactivate [src]...</span>") user.visible_message("<span class='notice'>[user] begins to reactivate [src].</span>", "<span class='notice'>You begin to reactivate [src]...</span>")
if(do_after(user, 30, 1, target = src)) if(do_after(user, 30, 1, target = src))
revive(full_heal = 1) revive(full_heal = TRUE, admin_revive = FALSE)
user.visible_message("<span class='notice'>[user] reactivates [src]!</span>", "<span class='notice'>You reactivate [src].</span>") user.visible_message("<span class='notice'>[user] reactivates [src]!</span>", "<span class='notice'>You reactivate [src].</span>")
alert_drones(DRONE_NET_CONNECT) alert_drones(DRONE_NET_CONNECT)
if(G) if(G)

View File

@@ -48,7 +48,7 @@
QDEL_NULL(pcollar) QDEL_NULL(pcollar)
return ..() return ..()
/mob/living/simple_animal/pet/revive(full_heal = 0, admin_revive = 0) /mob/living/simple_animal/pet/revive(full_heal = FALSE, admin_revive = FALSE)
. = ..() . = ..()
if(.) if(.)
if(collar_type) if(collar_type)

View File

@@ -103,7 +103,7 @@
return return
add_dead_carp_overlay() add_dead_carp_overlay()
/mob/living/simple_animal/hostile/carp/revive(full_heal = 0, admin_revive = 0) /mob/living/simple_animal/hostile/carp/revive(full_heal = FALSE, admin_revive = FALSE)
. = ..() . = ..()
if(.) if(.)
regenerate_icons() regenerate_icons()

View File

@@ -588,7 +588,7 @@ Difficulty: Very Hard
H.set_species(/datum/species/shadow, 1) H.set_species(/datum/species/shadow, 1)
H.regenerate_limbs() H.regenerate_limbs()
H.regenerate_organs() H.regenerate_organs()
H.revive(1,0) H.revive(full_heal = TRUE, admin_revive = FALSE)
ADD_TRAIT(H, TRAIT_BADDNA, MAGIC_TRAIT) //Free revives, but significantly limits your options for reviving except via the crystal ADD_TRAIT(H, TRAIT_BADDNA, MAGIC_TRAIT) //Free revives, but significantly limits your options for reviving except via the crystal
H.grab_ghost(force = TRUE) H.grab_ghost(force = TRUE)

View File

@@ -49,7 +49,7 @@
return return
icon_state = pre_attack_icon icon_state = pre_attack_icon
/mob/living/simple_animal/hostile/asteroid/goliath/revive(full_heal = 0, admin_revive = 0) /mob/living/simple_animal/hostile/asteroid/goliath/revive(full_heal = FALSE, admin_revive = FALSE)
if(..()) if(..())
anchored = TRUE anchored = TRUE
. = 1 . = 1

View File

@@ -112,7 +112,7 @@
return TRUE return TRUE
return ..() return ..()
/mob/living/simple_animal/hostile/mushroom/revive(full_heal = 0, admin_revive = 0) /mob/living/simple_animal/hostile/mushroom/revive(full_heal = FALSE, admin_revive = FALSE)
if(..()) if(..())
icon_state = "mushroom_color" icon_state = "mushroom_color"
UpdateMushroomCap() UpdateMushroomCap()
@@ -134,7 +134,7 @@
/mob/living/simple_animal/hostile/mushroom/proc/Recover() /mob/living/simple_animal/hostile/mushroom/proc/Recover()
visible_message("<span class='notice'>[src] slowly begins to recover.</span>") visible_message("<span class='notice'>[src] slowly begins to recover.</span>")
faint_ticker = 0 faint_ticker = 0
revive(full_heal = 1) revive(full_heal = TRUE, admin_revive = FALSE)
UpdateMushroomCap() UpdateMushroomCap()
recovery_cooldown = 1 recovery_cooldown = 1
addtimer(CALLBACK(src, .proc/recovery_recharge), 300) addtimer(CALLBACK(src, .proc/recovery_recharge), 300)

View File

@@ -402,21 +402,21 @@
/mob/living/simple_animal/ExtinguishMob() /mob/living/simple_animal/ExtinguishMob()
return return
/mob/living/simple_animal/revive(full_heal = 0, admin_revive = 0) /mob/living/simple_animal/revive(full_heal = FALSE, admin_revive = FALSE)
if(..()) //successfully ressuscitated from death if(..()) //successfully ressuscitated from death
icon = initial(icon) icon = initial(icon)
icon_state = icon_living icon_state = icon_living
density = initial(density) density = initial(density)
mobility_flags = MOBILITY_FLAGS_DEFAULT mobility_flags = MOBILITY_FLAGS_DEFAULT
update_mobility() update_mobility()
. = 1 . = TRUE
setMovetype(initial(movement_type)) setMovetype(initial(movement_type))
/mob/living/simple_animal/proc/make_babies() // <3 <3 <3 /mob/living/simple_animal/proc/make_babies() // <3 <3 <3
if(gender != FEMALE || stat || next_scan_time > world.time || !childtype || !animal_species || !SSticker.IsRoundInProgress()) if(gender != FEMALE || stat || next_scan_time > world.time || !childtype || !animal_species || !SSticker.IsRoundInProgress())
return return
next_scan_time = world.time + 400 next_scan_time = world.time + 400
var/alone = 1 var/alone = TRUE
var/mob/living/simple_animal/partner var/mob/living/simple_animal/partner
var/children = 0 var/children = 0
for(var/mob/M in view(7, src)) for(var/mob/M in view(7, src))

View File

@@ -13,7 +13,7 @@
R.Remove(src) R.Remove(src)
var/datum/action/innate/slime/evolve/E = new var/datum/action/innate/slime/evolve/E = new
E.Grant(src) E.Grant(src)
revive(full_heal = 1) revive(full_heal = TRUE, admin_revive = FALSE)
regenerate_icons() regenerate_icons()
update_name() update_name()
return return

View File

@@ -80,7 +80,7 @@
A.adjustBruteLoss(-1, 0) A.adjustBruteLoss(-1, 0)
A.updatehealth() A.updatehealth()
if(A.health >= 0 && A.stat == DEAD) if(A.health >= 0 && A.stat == DEAD)
A.revive() A.revive(full_heal = FALSE, admin_revive = FALSE)
// Finished restoring // Finished restoring
if(A.health >= 100) if(A.health >= 100)
ai_slot.locked = FALSE ai_slot.locked = FALSE

View File

@@ -234,7 +234,7 @@
else else
response = tgalert(target.current, "A devil is offering you another chance at life, at the price of your soul, do you accept?", "Infernal Resurrection", "Yes", "No", "Never for this round", 0, 200) response = tgalert(target.current, "A devil is offering you another chance at life, at the price of your soul, do you accept?", "Infernal Resurrection", "Yes", "No", "Never for this round", 0, 200)
if(response == "Yes") if(response == "Yes")
H.revive(1,0) H.revive(full_heal = TRUE, admin_revive = FALSE)
log_combat(user, H, "infernally revived via contract") log_combat(user, H, "infernally revived via contract")
user.visible_message("<span class='notice'>With a sudden blaze, [H] stands back up.</span>") user.visible_message("<span class='notice'>With a sudden blaze, [H] stands back up.</span>")
H.fakefire() H.fakefire()

View File

@@ -74,13 +74,13 @@
if(isliving(user)) if(isliving(user))
var/mob/living/L = user var/mob/living/L = user
if(L.mob_biotypes & MOB_UNDEAD) //negative energy heals the undead if(L.mob_biotypes & MOB_UNDEAD) //negative energy heals the undead
user.revive(full_heal = TRUE) user.revive(full_heal = TRUE, admin_revive = FALSE)
to_chat(user, "<span class='notice'>You feel great!</span>") to_chat(user, "<span class='notice'>You feel great!</span>")
return return
to_chat(user, "<span class='warning'>You irradiate yourself with pure negative energy! \ to_chat(user, "<span class='warning'>You irradiate yourself with pure negative energy! \
[pick("Do not pass go. Do not collect 200 zorkmids.","You feel more confident in your spell casting skills.","You Die...","Do you want your possessions identified?")]\ [pick("Do not pass go. Do not collect 200 zorkmids.","You feel more confident in your spell casting skills.","You Die...","Do you want your possessions identified?")]\
</span>") </span>")
user.death(0) user.death(FALSE)
/obj/item/gun/magic/wand/death/debug /obj/item/gun/magic/wand/death/debug
desc = "In some obscure circles, this is known as the 'cloning tester's friend'." desc = "In some obscure circles, this is known as the 'cloning tester's friend'."
@@ -116,7 +116,7 @@
</span>") </span>")
user.death(0) user.death(0)
return return
user.revive(full_heal = TRUE) user.revive(full_heal = TRUE, admin_revive = FALSE)
to_chat(user, "<span class='notice'>You feel great!</span>") to_chat(user, "<span class='notice'>You feel great!</span>")
/obj/item/gun/magic/wand/resurrection/debug //for testing /obj/item/gun/magic/wand/resurrection/debug //for testing

View File

@@ -23,7 +23,7 @@
if(L.mob_biotypes & MOB_UNDEAD) //negative energy heals the undead if(L.mob_biotypes & MOB_UNDEAD) //negative energy heals the undead
if(L.hellbound && L.stat == DEAD) if(L.hellbound && L.stat == DEAD)
return BULLET_ACT_BLOCK return BULLET_ACT_BLOCK
if(L.revive(full_heal = TRUE)) if(L.revive(full_heal = TRUE, admin_revive = FALSE))
L.grab_ghost(force = TRUE) // even suicides L.grab_ghost(force = TRUE) // even suicides
to_chat(L, "<span class='notice'>You rise with a start, you're undead!!!</span>") to_chat(L, "<span class='notice'>You rise with a start, you're undead!!!</span>")
else if(L.stat != DEAD) else if(L.stat != DEAD)
@@ -51,7 +51,7 @@
else else
if(target.hellbound && target.stat == DEAD) if(target.hellbound && target.stat == DEAD)
return BULLET_ACT_BLOCK return BULLET_ACT_BLOCK
if(target.revive(full_heal = TRUE)) if(target.revive(full_heal = TRUE, admin_revive = FALSE))
target.grab_ghost(force = TRUE) // even suicides target.grab_ghost(force = TRUE) // even suicides
to_chat(target, "<span class='notice'>You rise with a start, you're alive!!!</span>") to_chat(target, "<span class='notice'>You rise with a start, you're alive!!!</span>")
else if(target.stat != DEAD) else if(target.stat != DEAD)

View File

@@ -57,7 +57,7 @@
else //VICTORY ROYALE else //VICTORY ROYALE
to_chat(M, "<span class='hierophant'>You win, and the malevolent spirits fade away as well as your wounds.</span>") to_chat(M, "<span class='hierophant'>You win, and the malevolent spirits fade away as well as your wounds.</span>")
SSmedals.UnlockMedal(MEDAL_HELBITALJANKEN,M.client) SSmedals.UnlockMedal(MEDAL_HELBITALJANKEN,M.client)
M.revive(TRUE) M.revive(full_heal = TRUE, admin_revive = FALSE)
M.reagents.del_reagent(type) M.reagents.del_reagent(type)
return return

View File

@@ -731,7 +731,7 @@
M.adjustOxyLoss(-20, 0) M.adjustOxyLoss(-20, 0)
M.adjustToxLoss(-20, 0) M.adjustToxLoss(-20, 0)
M.updatehealth() M.updatehealth()
if(M.revive()) if(M.revive(full_heal = FALSE, admin_revive = FALSE))
M.emote("gasp") M.emote("gasp")
log_combat(M, M, "revived", src) log_combat(M, M, "revived", src)
..() ..()

View File

@@ -248,7 +248,7 @@
if(check_revivable()) if(check_revivable())
playsound(C, 'sound/machines/defib_success.ogg', 50, FALSE) playsound(C, 'sound/machines/defib_success.ogg', 50, FALSE)
C.set_heartattack(FALSE) C.set_heartattack(FALSE)
C.revive() C.revive(full_heal = FALSE, admin_revive = FALSE)
C.emote("gasp") C.emote("gasp")
C.Jitter(100) C.Jitter(100)
SEND_SIGNAL(C, COMSIG_LIVING_MINOR_SHOCK) SEND_SIGNAL(C, COMSIG_LIVING_MINOR_SHOCK)

View File

@@ -186,7 +186,7 @@ Slimecrossing Potions
return return
if(M.maxHealth <= 0) if(M.maxHealth <= 0)
to_chat(user, "<span class='warning'>The slime is too unstable to return!</span>") to_chat(user, "<span class='warning'>The slime is too unstable to return!</span>")
M.revive(full_heal = 1) M.revive(full_heal = TRUE, admin_revive = FALSE)
M.stat = CONSCIOUS M.stat = CONSCIOUS
M.visible_message("<span class='notice'>[M] is filled with renewed vigor and blinks awake!</span>") M.visible_message("<span class='notice'>[M] is filled with renewed vigor and blinks awake!</span>")
M.maxHealth -= 10 //Revival isn't healthy. M.maxHealth -= 10 //Revival isn't healthy.

View File

@@ -29,7 +29,7 @@ Regenerative extracts:
user.visible_message("<span class='notice'>[user] crushes the [src] over [user.p_them()]self, the milky goo quickly regenerating all of [user.p_their()] injuries!</span>", user.visible_message("<span class='notice'>[user] crushes the [src] over [user.p_them()]self, the milky goo quickly regenerating all of [user.p_their()] injuries!</span>",
"<span class='notice'>You squeeze the [src], and it bursts in your hand, splashing you with milky goo which quickly regenerates your injuries!</span>") "<span class='notice'>You squeeze the [src], and it bursts in your hand, splashing you with milky goo which quickly regenerates your injuries!</span>")
core_effect_before(H, user) core_effect_before(H, user)
H.revive(full_heal = 1) H.revive(full_heal = TRUE, admin_revive = FALSE)
core_effect(H, user) core_effect(H, user)
playsound(target, 'sound/effects/splat.ogg', 40, TRUE) playsound(target, 'sound/effects/splat.ogg', 40, TRUE)
qdel(src) qdel(src)
@@ -258,7 +258,7 @@ Regenerative extracts:
if(target == user) if(target == user)
return return
var/mob/living/U = user var/mob/living/U = user
U.revive(full_heal = 1) U.revive(full_heal = TRUE, admin_revive = FALSE)
to_chat(U, "<span class='notice'>Some of the milky goo sprays onto you, as well!</span>") to_chat(U, "<span class='notice'>Some of the milky goo sprays onto you, as well!</span>")
/obj/item/slimecross/regenerative/adamantine /obj/item/slimecross/regenerative/adamantine

View File

@@ -157,7 +157,7 @@
if(death) if(death)
stored.death() stored.death()
else if(source.convert_damage) else if(source.convert_damage)
stored.revive(full_heal = TRUE) stored.revive(full_heal = TRUE, admin_revive = FALSE)
var/damage_percent = (shape.maxHealth - shape.health)/shape.maxHealth; var/damage_percent = (shape.maxHealth - shape.health)/shape.maxHealth;
var/damapply = stored.maxHealth * damage_percent var/damapply = stored.maxHealth * damage_percent

View File

@@ -64,7 +64,7 @@
playsound(get_turf(target), 'sound/magic/lightningbolt.ogg', 50, TRUE) playsound(get_turf(target), 'sound/magic/lightningbolt.ogg', 50, TRUE)
target.adjustOxyLoss(-50, 0) target.adjustOxyLoss(-50, 0)
target.updatehealth() target.updatehealth()
if(target.revive()) if(target.revive(full_heal = FALSE, admin_revive = FALSE))
target.visible_message("<span class='notice'>...[target] wakes up, alive and aware!</span>") target.visible_message("<span class='notice'>...[target] wakes up, alive and aware!</span>")
target.emote("gasp") target.emote("gasp")
target.adjustOrganLoss(ORGAN_SLOT_BRAIN, 50, 199) //MAD SCIENCE target.adjustOrganLoss(ORGAN_SLOT_BRAIN, 50, 199) //MAD SCIENCE

View File

@@ -84,7 +84,7 @@
owner.setOxyLoss(0, 0) owner.setOxyLoss(0, 0)
owner.heal_overall_damage(INFINITY, INFINITY, INFINITY, null, TRUE) owner.heal_overall_damage(INFINITY, INFINITY, INFINITY, null, TRUE)
if(!owner.revive()) if(!owner.revive(full_heal = FALSE, admin_revive = FALSE))
return return
owner.grab_ghost() owner.grab_ghost()