mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
U_I Phase 2.6: Blood, Helmets, Unneeded calls
This commit is contained in:
@@ -107,6 +107,7 @@
|
|||||||
#define slot_handcuffed 20
|
#define slot_handcuffed 20
|
||||||
#define slot_legcuffed 21
|
#define slot_legcuffed 21
|
||||||
#define slot_in_backpack 22
|
#define slot_in_backpack 22
|
||||||
|
#define SLOT_TOTAL 22
|
||||||
|
|
||||||
// Inventory slot strings.
|
// Inventory slot strings.
|
||||||
// since numbers cannot be used as associative list keys.
|
// since numbers cannot be used as associative list keys.
|
||||||
|
|||||||
@@ -96,18 +96,18 @@ var/global/list/image/splatter_cache=list()
|
|||||||
S.overlays.Cut()
|
S.overlays.Cut()
|
||||||
S.overlays += S.blood_overlay
|
S.overlays += S.blood_overlay
|
||||||
S.blood_DNA |= blood_DNA.Copy()
|
S.blood_DNA |= blood_DNA.Copy()
|
||||||
|
perp.update_inv_shoes()
|
||||||
|
|
||||||
else if (hasfeet)//Or feet
|
else if (hasfeet)//Or feet
|
||||||
perp.feet_blood_color = basecolor
|
perp.feet_blood_color = basecolor
|
||||||
perp.track_blood = max(amount,perp.track_blood)
|
perp.track_blood = max(amount,perp.track_blood)
|
||||||
if(!perp.feet_blood_DNA)
|
LAZYINITLIST(perp.feet_blood_DNA)
|
||||||
perp.feet_blood_DNA = list()
|
|
||||||
perp.feet_blood_DNA |= blood_DNA.Copy()
|
perp.feet_blood_DNA |= blood_DNA.Copy()
|
||||||
|
perp.update_bloodied()
|
||||||
else if (perp.buckled && istype(perp.buckled, /obj/structure/bed/chair/wheelchair))
|
else if (perp.buckled && istype(perp.buckled, /obj/structure/bed/chair/wheelchair))
|
||||||
var/obj/structure/bed/chair/wheelchair/W = perp.buckled
|
var/obj/structure/bed/chair/wheelchair/W = perp.buckled
|
||||||
W.bloodiness = 4
|
W.bloodiness = 4
|
||||||
|
|
||||||
perp.update_inv_shoes(1)
|
|
||||||
amount--
|
amount--
|
||||||
|
|
||||||
/obj/effect/decal/cleanable/blood/proc/dry()
|
/obj/effect/decal/cleanable/blood/proc/dry()
|
||||||
|
|||||||
@@ -322,6 +322,7 @@
|
|||||||
var/light_applied
|
var/light_applied
|
||||||
var/brightness_on
|
var/brightness_on
|
||||||
var/on = 0
|
var/on = 0
|
||||||
|
var/image/helmet_light
|
||||||
|
|
||||||
sprite_sheets = list(
|
sprite_sheets = list(
|
||||||
"Teshari" = 'icons/mob/species/seromi/head.dmi',
|
"Teshari" = 'icons/mob/species/seromi/head.dmi',
|
||||||
@@ -385,18 +386,16 @@
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/item/clothing/head/update_icon(var/mob/user)
|
/obj/item/clothing/head/update_icon(var/mob/user)
|
||||||
|
|
||||||
overlays.Cut()
|
|
||||||
var/mob/living/carbon/human/H
|
var/mob/living/carbon/human/H
|
||||||
if(istype(user,/mob/living/carbon/human))
|
if(ishuman(user))
|
||||||
H = user
|
H = user
|
||||||
|
|
||||||
if(on)
|
if(on)
|
||||||
|
|
||||||
// Generate object icon.
|
// Generate object icon.
|
||||||
if(!light_overlay_cache["[light_overlay]_icon"])
|
if(!light_overlay_cache["[light_overlay]_icon"])
|
||||||
light_overlay_cache["[light_overlay]_icon"] = image("icon" = 'icons/obj/light_overlays.dmi', "icon_state" = "[light_overlay]")
|
light_overlay_cache["[light_overlay]_icon"] = image("icon" = 'icons/obj/light_overlays.dmi', "icon_state" = "[light_overlay]")
|
||||||
overlays |= light_overlay_cache["[light_overlay]_icon"]
|
helmet_light = light_overlay_cache["[light_overlay]_icon"]
|
||||||
|
add_overlay(helmet_light)
|
||||||
|
|
||||||
// Generate and cache the on-mob icon, which is used in update_inv_head().
|
// Generate and cache the on-mob icon, which is used in update_inv_head().
|
||||||
var/cache_key = "[light_overlay][H ? "_[H.species.get_bodytype(H)]" : ""]"
|
var/cache_key = "[light_overlay][H ? "_[H.species.get_bodytype(H)]" : ""]"
|
||||||
@@ -405,9 +404,11 @@
|
|||||||
if(H && sprite_sheets[H.species.get_bodytype(H)])
|
if(H && sprite_sheets[H.species.get_bodytype(H)])
|
||||||
use_icon = sprite_sheets[H.species.get_bodytype(H)]
|
use_icon = sprite_sheets[H.species.get_bodytype(H)]
|
||||||
light_overlay_cache[cache_key] = image("icon" = use_icon, "icon_state" = "[light_overlay]")
|
light_overlay_cache[cache_key] = image("icon" = use_icon, "icon_state" = "[light_overlay]")
|
||||||
|
else if(helmet_light)
|
||||||
|
cut_overlay(helmet_light)
|
||||||
|
helmet_light = null
|
||||||
|
|
||||||
if(H)
|
user.update_inv_head() //Will redraw the helmet with the light on the mob
|
||||||
H.update_inv_head()
|
|
||||||
|
|
||||||
/obj/item/clothing/head/update_clothing_icon()
|
/obj/item/clothing/head/update_clothing_icon()
|
||||||
if (ismob(src.loc))
|
if (ismob(src.loc))
|
||||||
|
|||||||
@@ -181,7 +181,10 @@
|
|||||||
|
|
||||||
/obj/item/weapon/rig/get_worn_icon_file(var/body_type,var/slot_name,var/default_icon,var/inhands)
|
/obj/item/weapon/rig/get_worn_icon_file(var/body_type,var/slot_name,var/default_icon,var/inhands)
|
||||||
if(!inhands && slot_name == slot_back_str)
|
if(!inhands && slot_name == slot_back_str)
|
||||||
return icon_override || mob_icon //That's just all this does.
|
if(icon_override)
|
||||||
|
return icon_override
|
||||||
|
else if(mob_icon)
|
||||||
|
return mob_icon
|
||||||
|
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
@@ -604,7 +607,7 @@
|
|||||||
// update_inv_wear_suit(), handle species checks here.
|
// update_inv_wear_suit(), handle species checks here.
|
||||||
if(wearer && sprite_sheets && sprite_sheets[wearer.species.get_bodytype(wearer)])
|
if(wearer && sprite_sheets && sprite_sheets[wearer.species.get_bodytype(wearer)])
|
||||||
species_icon = sprite_sheets[wearer.species.get_bodytype(wearer)]
|
species_icon = sprite_sheets[wearer.species.get_bodytype(wearer)]
|
||||||
mob_icon = image("icon" = species_icon, "icon_state" = "[icon_state]")
|
mob_icon = icon(icon = species_icon, icon_state = "[icon_state]")
|
||||||
|
|
||||||
if(installed_modules.len)
|
if(installed_modules.len)
|
||||||
for(var/obj/item/rig_module/module in installed_modules)
|
for(var/obj/item/rig_module/module in installed_modules)
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
if (ishuman(body))
|
if (ishuman(body))
|
||||||
var/mob/living/carbon/human/H = body
|
var/mob/living/carbon/human/H = body
|
||||||
icon = H.icon
|
icon = H.icon
|
||||||
H.update_icons()
|
underlays = H.underlays
|
||||||
overlays = H.overlays
|
overlays = H.overlays
|
||||||
else
|
else
|
||||||
icon = body.icon
|
icon = body.icon
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ var/list/slot_equipment_priority = list( \
|
|||||||
|
|
||||||
/mob/proc/get_inventory_slot(obj/item/I)
|
/mob/proc/get_inventory_slot(obj/item/I)
|
||||||
var/slot = 0
|
var/slot = 0
|
||||||
for(var/s in slot_back to slot_tie) //kind of worries me
|
for(var/s in 1 to SLOT_TOTAL)
|
||||||
if(get_equipped_item(s) == I)
|
if(get_equipped_item(s) == I)
|
||||||
slot = s
|
slot = s
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -277,21 +277,6 @@
|
|||||||
|
|
||||||
// ++++ROCKDTBEN++++ MOB PROCS //END
|
// ++++ROCKDTBEN++++ MOB PROCS //END
|
||||||
|
|
||||||
/mob/living/carbon/clean_blood()
|
|
||||||
. = ..()
|
|
||||||
if(ishuman(src))
|
|
||||||
var/mob/living/carbon/human/H = src
|
|
||||||
if(H.gloves)
|
|
||||||
if(H.gloves.clean_blood())
|
|
||||||
H.update_inv_gloves(0)
|
|
||||||
H.gloves.germ_level = 0
|
|
||||||
else
|
|
||||||
if(H.bloody_hands)
|
|
||||||
H.bloody_hands = 0
|
|
||||||
H.update_inv_gloves(0)
|
|
||||||
H.germ_level = 0
|
|
||||||
update_icons_body()
|
|
||||||
|
|
||||||
/mob/living/carbon/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
/mob/living/carbon/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||||
..()
|
..()
|
||||||
var/temp_inc = max(min(BODYTEMP_HEATING_MAX*(1-get_heat_protection()), exposed_temperature - bodytemperature), 0)
|
var/temp_inc = max(min(BODYTEMP_HEATING_MAX*(1-get_heat_protection()), exposed_temperature - bodytemperature), 0)
|
||||||
|
|||||||
@@ -1007,7 +1007,7 @@
|
|||||||
if(!blood_DNA[M.dna.unique_enzymes])
|
if(!blood_DNA[M.dna.unique_enzymes])
|
||||||
blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||||
hand_blood_color = blood_color
|
hand_blood_color = blood_color
|
||||||
src.update_inv_gloves() //handles bloody hands overlays and updating
|
update_bloodied()
|
||||||
verbs += /mob/living/carbon/human/proc/bloody_doodle
|
verbs += /mob/living/carbon/human/proc/bloody_doodle
|
||||||
return 1 //we applied blood to the item
|
return 1 //we applied blood to the item
|
||||||
|
|
||||||
@@ -1017,14 +1017,33 @@
|
|||||||
return md5(dna.uni_identity)
|
return md5(dna.uni_identity)
|
||||||
|
|
||||||
/mob/living/carbon/human/clean_blood(var/washshoes)
|
/mob/living/carbon/human/clean_blood(var/washshoes)
|
||||||
.=..()
|
. = ..()
|
||||||
gunshot_residue = null
|
gunshot_residue = null
|
||||||
if(washshoes && !shoes && istype(feet_blood_DNA, /list) && feet_blood_DNA.len)
|
//Always do hands (or whatever's on our hands)
|
||||||
|
if(gloves)
|
||||||
|
if(gloves.clean_blood())
|
||||||
|
update_inv_gloves()
|
||||||
|
. = 1
|
||||||
|
gloves.germ_level = 0
|
||||||
|
else
|
||||||
|
if(bloody_hands)
|
||||||
|
. = 1
|
||||||
|
bloody_hands = 0
|
||||||
|
germ_level = 0
|
||||||
|
|
||||||
|
//Sometimes do shoes if asked
|
||||||
|
if(washshoes && shoes)
|
||||||
|
if(shoes.clean_blood())
|
||||||
|
update_inv_shoes()
|
||||||
|
. = 1
|
||||||
|
shoes.germ_level = 0
|
||||||
|
else if(washshoes && (feet_blood_color || LAZYLEN(feet_blood_DNA)))
|
||||||
feet_blood_color = null
|
feet_blood_color = null
|
||||||
feet_blood_DNA.Cut()
|
LAZYCLEARLIST(feet_blood_DNA)
|
||||||
feet_blood_DNA = null
|
feet_blood_DNA = null
|
||||||
update_inv_shoes(1)
|
. = 1
|
||||||
return 1
|
|
||||||
|
update_bloodied()
|
||||||
|
|
||||||
/mob/living/carbon/human/get_visible_implants(var/class = 0)
|
/mob/living/carbon/human/get_visible_implants(var/class = 0)
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ var/global/list/tail_icon_cache = list() //key is [species.race_key][r_skin][g_s
|
|||||||
var/global/list/light_overlay_cache = list() //see make_worn_icon() on helmets
|
var/global/list/light_overlay_cache = list() //see make_worn_icon() on helmets
|
||||||
var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
||||||
|
|
||||||
//Add an entry to overlays, assuming it exists
|
//Add an entry to overlays, assuming it existsup
|
||||||
/mob/living/carbon/human/proc/apply_layer(cache_index)
|
/mob/living/carbon/human/proc/apply_layer(cache_index)
|
||||||
if((. = overlays_standing[cache_index]))
|
if((. = overlays_standing[cache_index]))
|
||||||
add_overlay(.)
|
add_overlay(.)
|
||||||
|
|||||||
@@ -111,15 +111,11 @@
|
|||||||
/mob/living/proc/handle_stunned()
|
/mob/living/proc/handle_stunned()
|
||||||
if(stunned)
|
if(stunned)
|
||||||
AdjustStunned(-1)
|
AdjustStunned(-1)
|
||||||
if(!stunned)
|
|
||||||
update_icons()
|
|
||||||
return stunned
|
return stunned
|
||||||
|
|
||||||
/mob/living/proc/handle_weakened()
|
/mob/living/proc/handle_weakened()
|
||||||
if(weakened)
|
if(weakened)
|
||||||
weakened = max(weakened-1,0)
|
weakened = max(weakened-1,0)
|
||||||
if(!weakened)
|
|
||||||
update_icons()
|
|
||||||
return weakened
|
return weakened
|
||||||
|
|
||||||
/mob/living/proc/handle_stuttering()
|
/mob/living/proc/handle_stuttering()
|
||||||
@@ -145,8 +141,6 @@
|
|||||||
/mob/living/proc/handle_paralysed()
|
/mob/living/proc/handle_paralysed()
|
||||||
if(paralysis)
|
if(paralysis)
|
||||||
AdjustParalysis(-1)
|
AdjustParalysis(-1)
|
||||||
if(!paralysis)
|
|
||||||
update_icons()
|
|
||||||
return paralysis
|
return paralysis
|
||||||
|
|
||||||
/mob/living/proc/handle_disabilities()
|
/mob/living/proc/handle_disabilities()
|
||||||
|
|||||||
Reference in New Issue
Block a user