mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 11:07:12 +01:00
Reworks exotic blood conversion handling so dead species can regain blood via transfusion (#17851)
* Reworks exotic blood conversion handling * proc coefficient * remove comment * Update code/modules/reagents/chemistry/holder.dm Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com> Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com>
This commit is contained in:
@@ -571,12 +571,26 @@
|
||||
var/check = reaction_check(A, R)
|
||||
if(!check)
|
||||
continue
|
||||
if(handle_exotic_blood(A, R, method, volume_modifier))
|
||||
continue
|
||||
R.reaction_mob(A, method, R.volume * volume_modifier, show_message)
|
||||
if("TURF")
|
||||
R.reaction_turf(A, R.volume * volume_modifier, R.color)
|
||||
if("OBJ")
|
||||
R.reaction_obj(A, R.volume * volume_modifier)
|
||||
|
||||
/datum/reagents/proc/handle_exotic_blood(atom/A, datum/reagent/R, method, volume_modifier)
|
||||
if(!R || !method || method != REAGENT_INGEST)
|
||||
return FALSE
|
||||
if(ishuman(A))
|
||||
var/mob/living/carbon/human/H = A
|
||||
if(R.id == H.dna.species.exotic_blood)
|
||||
H.blood_volume = min(H.blood_volume + round(R.volume * volume_modifier, 0.1), BLOOD_VOLUME_NORMAL)
|
||||
del_reagent(R.id)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
/datum/reagents/proc/add_reagent_list(list/list_reagents, list/data = null) // Like add_reagent but you can enter a list. Format it like this: list("toxin" = 10, "beer" = 15)
|
||||
for(var/r_id in list_reagents)
|
||||
var/amt = list_reagents[r_id]
|
||||
|
||||
Reference in New Issue
Block a user