mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge branch 'bleeding-edge-freeze' of https://github.com/Baystation12/Baystation12 into organ
Conflicts: html/changelog.html
This commit is contained in:
@@ -218,4 +218,22 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
for(var/datum/reagent/blood/D in container.reagent_list)
|
||||
if(D.data["donor"] == src)
|
||||
return D
|
||||
return res
|
||||
return res
|
||||
|
||||
proc/blood_incompatible(donor,receiver)
|
||||
if(!donor || !receiver) return 0
|
||||
var
|
||||
donor_antigen = copytext(donor,1,lentext(donor))
|
||||
receiver_antigen = copytext(receiver,1,lentext(receiver))
|
||||
donor_rh = (findtext(donor,"+")>0)
|
||||
receiver_rh = (findtext(receiver,"+")>0)
|
||||
if(donor_rh && !receiver_rh) return 1
|
||||
switch(receiver_antigen)
|
||||
if("A")
|
||||
if(donor_antigen != "A" && donor_antigen != "O") return 1
|
||||
if("B")
|
||||
if(donor_antigen != "B" && donor_antigen != "O") return 1
|
||||
if("O")
|
||||
if(donor_antigen != "O") return 1
|
||||
//AB is a universal receiver.
|
||||
return 0
|
||||
Reference in New Issue
Block a user