Allows set_blood_type to take strings (#92242)

This commit is contained in:
MrMelbert
2025-07-27 22:15:07 -05:00
committed by GitHub
parent 269675871d
commit dba39d33c7
4 changed files with 8 additions and 3 deletions

View File

@@ -10,5 +10,5 @@
return
var/mob/living/carbon/carbon_target = target
carbon_target.set_blood_type(get_blood_type(BLOOD_TYPE_CLOWN))
carbon_target.set_blood_type(BLOOD_TYPE_CLOWN)
SEND_SOUND(carbon_target, 'sound/items/bikehorn.ogg')

View File

@@ -43,7 +43,7 @@
spawned.apply_pref_name(/datum/preference/name/clown, player_client)
if(check_holidays(APRIL_FOOLS)) // Clown blood is real
var/mob/living/carbon/human/human_clown = spawned
human_clown.set_blood_type(get_blood_type(BLOOD_TYPE_CLOWN))
human_clown.set_blood_type(BLOOD_TYPE_CLOWN)
return ..()

View File

@@ -1323,6 +1323,11 @@
if(isnull(dna))
return
if(istext(new_blood_type))
new_blood_type = get_blood_type(new_blood_type)
if(!istype(new_blood_type))
return
if(get_bloodtype() == new_blood_type) // already has this blood type, we don't need to do anything.
return

View File

@@ -388,7 +388,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
if(!human_who_gained_species.get_bloodtype()?.is_species_universal) // Clown blood is forever.
//Assigns exotic blood type if the species has one
if(exotic_bloodtype && human_who_gained_species.get_bloodtype()?.id != exotic_bloodtype)
human_who_gained_species.set_blood_type(get_blood_type(exotic_bloodtype))
human_who_gained_species.set_blood_type(exotic_bloodtype)
//Otherwise, check if the previous species had an exotic bloodtype and we do not have one and assign a random blood type
else if(old_species.exotic_bloodtype && isnull(exotic_bloodtype))
human_who_gained_species.set_blood_type(random_human_blood_type())