synthtissue and sr
This commit is contained in:
@@ -199,6 +199,7 @@
|
||||
var/transfer_amount = T.volume * part
|
||||
if(preserve_data)
|
||||
trans_data = copy_data(T)
|
||||
post_copy_data(T)
|
||||
transferred += "[T] - [transfer_amount]"
|
||||
|
||||
R.add_reagent(T.type, transfer_amount * multiplier, trans_data, chem_temp, T.purity, pH, no_react = TRUE, ignore_pH = TRUE) //we only handle reaction after every reagent has been transfered.
|
||||
@@ -239,7 +240,8 @@
|
||||
var/datum/reagent/T = reagent
|
||||
var/copy_amount = T.volume * part
|
||||
if(preserve_data)
|
||||
trans_data = T.data
|
||||
trans_data = copy_data(T)
|
||||
post_copy_data(T)
|
||||
R.add_reagent(T.type, copy_amount * multiplier, trans_data)
|
||||
|
||||
src.update_total()
|
||||
@@ -266,7 +268,8 @@
|
||||
var/datum/reagent/current_reagent = CR
|
||||
if(current_reagent.type == reagent)
|
||||
if(preserve_data)
|
||||
trans_data = current_reagent.data
|
||||
trans_data = copy_data(current_reagent)
|
||||
post_copy_data(current_reagent)
|
||||
R.add_reagent(current_reagent.type, amount, trans_data, chem_temp, current_reagent.purity, pH, no_react = TRUE)
|
||||
remove_reagent(current_reagent.type, amount, 1)
|
||||
if(log && amount > 0)
|
||||
@@ -1116,6 +1119,11 @@
|
||||
|
||||
return trans_data
|
||||
|
||||
///
|
||||
// Should be ran after using copy_data. Calls the reagent's post_copy_data, which usually does nothing.
|
||||
/datum/reagents/proc/post_copy_data(datum/reagent/current_reagent)
|
||||
return current_reagent.post_copy_data()
|
||||
|
||||
/datum/reagents/proc/get_reagent(type)
|
||||
var/list/cached_reagents = reagent_list
|
||||
. = locate(type) in cached_reagents
|
||||
|
||||
@@ -178,6 +178,10 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
|
||||
M.reagents.add_reagent(impure_chem, impureVol, FALSE, other_purity = 1-cached_purity)
|
||||
log_reagent("MOB ADD: on_merge() (mixed purity): merged [volume - impureVol] of [type] and [volume] of [impure_chem]")
|
||||
|
||||
//Ran by a reagent holder on a specific reagent after copying its data.
|
||||
/datum/reagent/proc/post_copy_data()
|
||||
return
|
||||
|
||||
/datum/reagent/proc/on_update(atom/A)
|
||||
return
|
||||
|
||||
|
||||
@@ -980,11 +980,11 @@
|
||||
if(M.stat == DEAD)
|
||||
if(M.suiciding || M.hellbound) //they are never coming back
|
||||
M.visible_message("<span class='warning'>[M]'s body does not react...</span>")
|
||||
return
|
||||
return ..()
|
||||
if(M.getBruteLoss() >= 100 || M.getFireLoss() >= 100 || HAS_TRAIT(M, TRAIT_HUSK)) //body is too damaged to be revived
|
||||
M.visible_message("<span class='warning'>[M]'s body convulses a bit, and then falls still once more.</span>")
|
||||
M.do_jitter_animation(10)
|
||||
return
|
||||
return ..()
|
||||
else
|
||||
M.visible_message("<span class='warning'>[M]'s body starts convulsing!</span>")
|
||||
M.notify_ghost_cloning(source = M)
|
||||
@@ -996,27 +996,27 @@
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
if(!(C.dna && C.dna.species && (NOBLOOD in C.dna.species.species_traits)))
|
||||
C.blood_volume = max(C.blood_volume, BLOOD_VOLUME_NORMAL*C.blood_ratio) //so you don't instantly re-die from a lack of blood
|
||||
for(var/organ in C.internal_organs)
|
||||
var/obj/item/organ/O = organ
|
||||
if(O.damage > O.maxHealth/2)
|
||||
O.setOrganDamage(O.maxHealth/2) //so you don't instantly die from organ damage when being revived
|
||||
|
||||
C.blood_volume = max(C.blood_volume, BLOOD_VOLUME_BAD*C.blood_ratio) //so you don't instantly re-die from a lack of blood. You'll still need help if you had none though.
|
||||
var/obj/item/organ/heart/H = C.getorganslot(ORGAN_SLOT_HEART)
|
||||
if(H && H.organ_flags & ORGAN_FAILING)
|
||||
H.applyOrganDamage(-15)
|
||||
M.adjustOxyLoss(-20, 0)
|
||||
M.adjustToxLoss(-20, 0)
|
||||
M.updatehealth()
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
if(!C.can_revive(ignore_timelimit = TRUE, maximum_brute_dam = 100, maximum_fire_dam = 100, ignore_heart = TRUE))
|
||||
return
|
||||
var/tplus = world.time - M.timeofdeath
|
||||
if(M.revive())
|
||||
M.grab_ghost()
|
||||
M.emote("gasp")
|
||||
log_combat(M, M, "revived", src)
|
||||
var/list/policies = CONFIG_GET(keyed_list/policy)
|
||||
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]
|
||||
var/policy = policies[POLICYCONFIG_ON_DEFIB_LATE] //Always causes memory loss due to the nature of strange reagent.
|
||||
if(policy)
|
||||
to_chat(M, policy)
|
||||
M.log_message("revived using strange reagent, [tplus] deciseconds from time of death, considered [late? "late" : "memory-intact"] revival under configured policy limits.", LOG_GAME)
|
||||
M.log_message("revived using strange reagent, [tplus] deciseconds from time of death, considered late revival due to usage of strange reagent.", LOG_GAME)
|
||||
..()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user