mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-19 19:15:11 +01:00
Added get_bodytype() species proc as groundwork for subspecies.
Conflicts: code/modules/mob/living/carbon/human/update_icons.dm code/modules/organs/organ_icon.dm
This commit is contained in:
@@ -617,7 +617,7 @@ var/list/admin_verbs_mentor = list(
|
||||
if(istype(T,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = T
|
||||
if (H.species)
|
||||
D.affected_species = list(H.species.name)
|
||||
D.affected_species = list(H.species.get_bodytype())
|
||||
if(H.species.primitive_form)
|
||||
D.affected_species |= H.species.primitive_form
|
||||
if(H.species.greater_form)
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
|
||||
if(H.species)
|
||||
if(exclusive)
|
||||
if(!(H.species.name in species_restricted))
|
||||
if(!(H.species.get_bodytype() in species_restricted))
|
||||
wearable = 1
|
||||
else
|
||||
if(H.species.name in species_restricted)
|
||||
if(H.species.get_bodytype() in species_restricted)
|
||||
wearable = 1
|
||||
|
||||
if(!wearable && !(slot in list(slot_l_store, slot_r_store, slot_s_store)))
|
||||
@@ -405,8 +405,8 @@ BLIND // can't see anything
|
||||
var/icon/under_icon
|
||||
if(icon_override)
|
||||
under_icon = icon_override
|
||||
else if(H && sprite_sheets && sprite_sheets[H.species.name])
|
||||
under_icon = sprite_sheets[H.species.name]
|
||||
else if(H && sprite_sheets && sprite_sheets[H.species.get_bodytype()])
|
||||
under_icon = sprite_sheets[H.species.get_bodytype()]
|
||||
else if(item_icons && item_icons[slot_w_uniform_str])
|
||||
under_icon = item_icons[slot_w_uniform_str]
|
||||
else
|
||||
|
||||
@@ -467,8 +467,8 @@
|
||||
var/species_icon = 'icons/mob/rig_back.dmi'
|
||||
// Since setting mob_icon will override the species checks in
|
||||
// update_inv_wear_suit(), handle species checks here.
|
||||
if(wearer && sprite_sheets && sprite_sheets[wearer.species.name])
|
||||
species_icon = sprite_sheets[wearer.species.name]
|
||||
if(wearer && sprite_sheets && sprite_sheets[wearer.species.get_bodytype()])
|
||||
species_icon = sprite_sheets[wearer.species.get_bodytype()]
|
||||
mob_icon = image("icon" = species_icon, "icon_state" = "[icon_state]")
|
||||
|
||||
if(installed_modules.len)
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
continue
|
||||
if(check_gender && gender == FEMALE && S.gender == MALE)
|
||||
continue
|
||||
if(!(species.name in S.species_allowed))
|
||||
if(!(species.get_bodytype() in S.species_allowed))
|
||||
continue
|
||||
valid_hairstyles += hairstyle
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
continue
|
||||
if(gender == FEMALE && S.gender == MALE)
|
||||
continue
|
||||
if(!(species.name in S.species_allowed))
|
||||
if(!(species.get_bodytype() in S.species_allowed))
|
||||
continue
|
||||
|
||||
valid_facial_hairstyles += facialhairstyle
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
/datum/species/vox/pariah/handle_environment_special(var/mob/living/carbon/human/H)
|
||||
if(prob(5))
|
||||
var/stink_range = rand(3,5)
|
||||
for(var/mob/living/M in range(src,stink_range))
|
||||
for(var/mob/living/M in range(H,stink_range))
|
||||
if(M.stat || M == H)
|
||||
continue
|
||||
var/mob/living/carbon/human/target = M
|
||||
@@ -116,4 +116,7 @@
|
||||
continue
|
||||
if(target.wear_mask && (target.wear_mask.flags & MASKCOVERSMOUTH) && (target.wear_mask.flags & BLOCK_GAS_SMOKE_EFFECT))
|
||||
continue
|
||||
M << "<span class='danger'>A terrible stench emanates from \the [H].</span>"
|
||||
M << "<span class='danger'>A terrible stench emanates from \the [H].</span>"
|
||||
|
||||
/datum/species/vox/pariah/get_bodytype()
|
||||
return "Vox"
|
||||
|
||||
@@ -149,6 +149,9 @@
|
||||
/datum/species/proc/get_station_variant()
|
||||
return name
|
||||
|
||||
/datum/species/proc/get_bodytype()
|
||||
return name
|
||||
|
||||
/datum/species/proc/get_environment_discomfort(var/mob/living/carbon/human/H, var/msg_type)
|
||||
|
||||
if(!prob(5))
|
||||
|
||||
@@ -350,7 +350,7 @@ var/global/list/damage_icon_parts = list()
|
||||
|
||||
if(f_style)
|
||||
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style]
|
||||
if(facial_hair_style && facial_hair_style.species_allowed && (src.species.name in facial_hair_style.species_allowed))
|
||||
if(facial_hair_style && facial_hair_style.species_allowed && (src.species.get_bodytype() in facial_hair_style.species_allowed))
|
||||
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
|
||||
if(facial_hair_style.do_colouration)
|
||||
facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
|
||||
@@ -359,7 +359,7 @@ var/global/list/damage_icon_parts = list()
|
||||
|
||||
if(h_style && !(head && (head.flags & BLOCKHEADHAIR)))
|
||||
var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
|
||||
if(hair_style && src.species.name in hair_style.species_allowed)
|
||||
if(hair_style && (src.species.get_bodytype() in hair_style.species_allowed))
|
||||
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
|
||||
if(hair_style.do_colouration)
|
||||
hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
|
||||
@@ -468,8 +468,8 @@ var/global/list/damage_icon_parts = list()
|
||||
var/icon/under_icon
|
||||
if(w_uniform.icon_override)
|
||||
under_icon = w_uniform.icon_override
|
||||
else if(w_uniform.sprite_sheets && w_uniform.sprite_sheets[species.name])
|
||||
under_icon = w_uniform.sprite_sheets[species.name]
|
||||
else if(w_uniform.sprite_sheets && w_uniform.sprite_sheets[species.get_bodytype()])
|
||||
under_icon = w_uniform.sprite_sheets[species.get_bodytype()]
|
||||
else if(w_uniform.item_icons && w_uniform.item_icons[slot_w_uniform_str])
|
||||
under_icon = w_uniform.item_icons[slot_w_uniform_str]
|
||||
else
|
||||
@@ -529,8 +529,8 @@ var/global/list/damage_icon_parts = list()
|
||||
var/image/standing
|
||||
if(gloves.icon_override)
|
||||
standing = image("icon" = gloves.icon_override, "icon_state" = "[t_state]")
|
||||
else if(gloves.sprite_sheets && gloves.sprite_sheets[species.name])
|
||||
standing = image("icon" = gloves.sprite_sheets[species.name], "icon_state" = "[t_state]")
|
||||
else if(gloves.sprite_sheets && gloves.sprite_sheets[species.get_bodytype()])
|
||||
standing = image("icon" = gloves.sprite_sheets[species.get_bodytype()], "icon_state" = "[t_state]")
|
||||
else
|
||||
standing = image("icon" = 'icons/mob/hands.dmi', "icon_state" = "[t_state]")
|
||||
|
||||
@@ -555,8 +555,8 @@ var/global/list/damage_icon_parts = list()
|
||||
|
||||
if(glasses.icon_override)
|
||||
overlays_standing[GLASSES_LAYER] = image("icon" = glasses.icon_override, "icon_state" = "[glasses.icon_state]")
|
||||
else if(glasses.sprite_sheets && glasses.sprite_sheets[species.name])
|
||||
overlays_standing[GLASSES_LAYER]= image("icon" = glasses.sprite_sheets[species.name], "icon_state" = "[glasses.icon_state]")
|
||||
else if(glasses.sprite_sheets && glasses.sprite_sheets[species.get_bodytype()])
|
||||
overlays_standing[GLASSES_LAYER]= image("icon" = glasses.sprite_sheets[species.get_bodytype()], "icon_state" = "[glasses.icon_state]")
|
||||
else
|
||||
overlays_standing[GLASSES_LAYER]= image("icon" = 'icons/mob/eyes.dmi', "icon_state" = "[glasses.icon_state]")
|
||||
|
||||
@@ -577,9 +577,9 @@ var/global/list/damage_icon_parts = list()
|
||||
if(l_ear.icon_override)
|
||||
t_type = "[t_type]_l"
|
||||
overlays_standing[EARS_LAYER] = image("icon" = l_ear.icon_override, "icon_state" = "[t_type]")
|
||||
else if(l_ear.sprite_sheets && l_ear.sprite_sheets[species.name])
|
||||
else if(l_ear.sprite_sheets && l_ear.sprite_sheets[species.get_bodytype()])
|
||||
t_type = "[t_type]_l"
|
||||
overlays_standing[EARS_LAYER] = image("icon" = l_ear.sprite_sheets[species.name], "icon_state" = "[t_type]")
|
||||
overlays_standing[EARS_LAYER] = image("icon" = l_ear.sprite_sheets[species.get_bodytype()], "icon_state" = "[t_type]")
|
||||
else
|
||||
overlays_standing[EARS_LAYER] = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[t_type]")
|
||||
|
||||
@@ -589,9 +589,9 @@ var/global/list/damage_icon_parts = list()
|
||||
if(r_ear.icon_override)
|
||||
t_type = "[t_type]_r"
|
||||
overlays_standing[EARS_LAYER] = image("icon" = r_ear.icon_override, "icon_state" = "[t_type]")
|
||||
else if(r_ear.sprite_sheets && r_ear.sprite_sheets[species.name])
|
||||
else if(r_ear.sprite_sheets && r_ear.sprite_sheets[species.get_bodytype()])
|
||||
t_type = "[t_type]_r"
|
||||
overlays_standing[EARS_LAYER] = image("icon" = r_ear.sprite_sheets[species.name], "icon_state" = "[t_type]")
|
||||
overlays_standing[EARS_LAYER] = image("icon" = r_ear.sprite_sheets[species.get_bodytype()], "icon_state" = "[t_type]")
|
||||
else
|
||||
overlays_standing[EARS_LAYER] = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[t_type]")
|
||||
|
||||
@@ -605,8 +605,8 @@ var/global/list/damage_icon_parts = list()
|
||||
var/image/standing
|
||||
if(shoes.icon_override)
|
||||
standing = image("icon" = shoes.icon_override, "icon_state" = "[shoes.icon_state]")
|
||||
else if(shoes.sprite_sheets && shoes.sprite_sheets[species.name])
|
||||
standing = image("icon" = shoes.sprite_sheets[species.name], "icon_state" = "[shoes.icon_state]")
|
||||
else if(shoes.sprite_sheets && shoes.sprite_sheets[species.get_bodytype()])
|
||||
standing = image("icon" = shoes.sprite_sheets[species.get_bodytype()], "icon_state" = "[shoes.icon_state]")
|
||||
else
|
||||
standing = image("icon" = 'icons/mob/feet.dmi', "icon_state" = "[shoes.icon_state]")
|
||||
|
||||
@@ -643,8 +643,8 @@ var/global/list/damage_icon_parts = list()
|
||||
var/t_icon = INV_HEAD_DEF_ICON
|
||||
if(head.icon_override)
|
||||
t_icon = head.icon_override
|
||||
else if(head.sprite_sheets && head.sprite_sheets[species.name])
|
||||
t_icon = head.sprite_sheets[species.name]
|
||||
else if(head.sprite_sheets && head.sprite_sheets[species.get_bodytype()])
|
||||
t_icon = head.sprite_sheets[species.get_bodytype()]
|
||||
else if(head.item_icons && (icon_head in head.item_icons))
|
||||
t_icon = head.item_icons[icon_head]
|
||||
|
||||
@@ -683,8 +683,8 @@ var/global/list/damage_icon_parts = list()
|
||||
|
||||
if(belt.icon_override)
|
||||
standing.icon = belt.icon_override
|
||||
else if(belt.sprite_sheets && belt.sprite_sheets[species.name])
|
||||
standing.icon = belt.sprite_sheets[species.name]
|
||||
else if(belt.sprite_sheets && belt.sprite_sheets[species.get_bodytype()])
|
||||
standing.icon = belt.sprite_sheets[species.get_bodytype()]
|
||||
else
|
||||
standing.icon = 'icons/mob/belt.dmi'
|
||||
|
||||
@@ -709,7 +709,7 @@ var/global/list/damage_icon_parts = list()
|
||||
|
||||
if(wear_suit.icon_override)
|
||||
standing = image("icon" = wear_suit.icon_override, "icon_state" = "[wear_suit.icon_state]")
|
||||
else if(wear_suit.sprite_sheets && wear_suit.sprite_sheets[species.name])
|
||||
else if(wear_suit.sprite_sheets && wear_suit.sprite_sheets[species.get_bodytype()])
|
||||
standing = image("icon" = wear_suit.sprite_sheets[species.name], "icon_state" = "[wear_suit.icon_state]")
|
||||
else
|
||||
standing = image("icon" = 'icons/mob/suit.dmi', "icon_state" = "[wear_suit.icon_state]")
|
||||
@@ -750,8 +750,8 @@ var/global/list/damage_icon_parts = list()
|
||||
var/image/standing
|
||||
if(wear_mask.icon_override)
|
||||
standing = image("icon" = wear_mask.icon_override, "icon_state" = "[wear_mask.icon_state]")
|
||||
else if(wear_mask.sprite_sheets && wear_mask.sprite_sheets[species.name])
|
||||
standing = image("icon" = wear_mask.sprite_sheets[species.name], "icon_state" = "[wear_mask.icon_state]")
|
||||
else if(wear_mask.sprite_sheets && wear_mask.sprite_sheets[species.get_bodytype()])
|
||||
standing = image("icon" = wear_mask.sprite_sheets[species.get_bodytype()], "icon_state" = "[wear_mask.icon_state]")
|
||||
else
|
||||
standing = image("icon" = 'icons/mob/mask.dmi', "icon_state" = "[wear_mask.icon_state]")
|
||||
|
||||
@@ -777,8 +777,8 @@ var/global/list/damage_icon_parts = list()
|
||||
//If this is a rig and a mob_icon is set, it will take species into account in the rig update_icon() proc.
|
||||
var/obj/item/weapon/rig/rig = back
|
||||
overlay_icon = rig.mob_icon
|
||||
else if(back.sprite_sheets && back.sprite_sheets[species.name])
|
||||
overlay_icon = back.sprite_sheets[species.name]
|
||||
else if(back.sprite_sheets && back.sprite_sheets[species.get_bodytype()])
|
||||
overlay_icon = back.sprite_sheets[species.get_bodytype()]
|
||||
else if(back.item_icons && (slot_back_str in back.item_icons))
|
||||
overlay_icon = back.item_icons[slot_back_str]
|
||||
else
|
||||
|
||||
@@ -55,7 +55,7 @@ var/global/list/limb_icon_cache = list()
|
||||
|
||||
if(owner.f_style)
|
||||
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[owner.f_style]
|
||||
if(facial_hair_style && facial_hair_style.species_allowed && (owner.species.name in facial_hair_style.species_allowed))
|
||||
if(facial_hair_style && facial_hair_style.species_allowed && (owner.species.get_bodytype() in facial_hair_style.species_allowed))
|
||||
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
|
||||
if(facial_hair_style.do_colouration)
|
||||
facial_s.Blend(rgb(owner.r_facial, owner.g_facial, owner.b_facial), ICON_ADD)
|
||||
@@ -63,7 +63,7 @@ var/global/list/limb_icon_cache = list()
|
||||
|
||||
if(owner.h_style && !(owner.head && (owner.head.flags & BLOCKHEADHAIR)))
|
||||
var/datum/sprite_accessory/hair_style = hair_styles_list[owner.h_style]
|
||||
if(hair_style && (owner.species.name in hair_style.species_allowed))
|
||||
if(hair_style && (owner.species.get_bodytype() in hair_style.species_allowed))
|
||||
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
|
||||
if(hair_style.do_colouration)
|
||||
hair_s.Blend(rgb(owner.r_hair, owner.g_hair, owner.b_hair), ICON_ADD)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
/obj/item/weapon/gun/launcher/spikethrower/special_check(user)
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.species && H.species.name != "Vox")
|
||||
if(H.species && H.species.get_bodytype() != "Vox")
|
||||
user << "<span class='warning'>\The [src] does not respond to you!</span>"
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
@@ -32,12 +32,12 @@
|
||||
|
||||
if(allowed_species)
|
||||
for(var/species in allowed_species)
|
||||
if(target.species.name == species)
|
||||
if(target.species.get_bodytype() == species)
|
||||
return 1
|
||||
|
||||
if(disallowed_species)
|
||||
for(var/species in disallowed_species)
|
||||
if(target.species.name == species)
|
||||
if(target.species.get_bodytype() == species)
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
else if(href_list["reset"])
|
||||
species = list()
|
||||
if(infectee)
|
||||
if(!infectee.species || !(infectee.species.name in species))
|
||||
if(!infectee.species || !(infectee.species.get_bodytype() in species))
|
||||
infectee = null
|
||||
if("ichance")
|
||||
var/I = input("Input infection chance", "Infection Chance", infectionchance) as null|num
|
||||
@@ -159,16 +159,16 @@
|
||||
var/list/candidates = list()
|
||||
for(var/mob/living/carbon/G in living_mob_list)
|
||||
if(G.stat != DEAD && G.species)
|
||||
if(G.species.name in species)
|
||||
if(G.species.get_bodytype() in species)
|
||||
candidates["[G.name][G.client ? "" : " (no client)"]"] = G
|
||||
else
|
||||
candidates["[G.name] ([G.species.name])[G.client ? "" : " (no client)"]"] = G
|
||||
candidates["[G.name] ([G.species.get_bodytype()])[G.client ? "" : " (no client)"]"] = G
|
||||
if(!candidates.len) usr << "No possible candidates found!"
|
||||
|
||||
var/I = input("Choose initial infectee", "Infectee", infectee) as null|anything in candidates
|
||||
if(!I || !candidates[I]) return
|
||||
infectee = candidates[I]
|
||||
species |= infectee.species.name
|
||||
species |= infectee.species.get_bodytype()
|
||||
if("go")
|
||||
if(!antigens.len)
|
||||
var/a = alert("This disease has no antigens; it will be impossible to permanently immunise anyone without them.\
|
||||
|
||||
@@ -86,9 +86,9 @@ proc/airborne_can_reach(turf/source, turf/target)
|
||||
if(!disease.affected_species.len)
|
||||
return
|
||||
|
||||
if (!(M.species.name in disease.affected_species))
|
||||
if (!(M.species.get_bodytype() in disease.affected_species))
|
||||
if (forced)
|
||||
disease.affected_species[1] = M.species.name
|
||||
disease.affected_species[1] = M.species.get_bodytype()
|
||||
else
|
||||
return //not compatible with this species
|
||||
|
||||
|
||||
Reference in New Issue
Block a user