mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 03:57:48 +01:00
Added by-species hat light overlays.
This commit is contained in:
@@ -95,6 +95,7 @@
|
||||
w_class = 1.0
|
||||
throwforce = 2
|
||||
slot_flags = SLOT_EARS
|
||||
sprite_sheets = list("Resomi" = 'icons/mob/species/resomi/ears.dmi')
|
||||
|
||||
/obj/item/clothing/ears/attack_hand(mob/user as mob)
|
||||
if (!user) return
|
||||
@@ -176,7 +177,10 @@ BLIND // can't see anything
|
||||
var/vision_flags = 0
|
||||
var/darkness_view = 0//Base human is 2
|
||||
var/see_invisible = -1
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/eyes.dmi')
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/eyes.dmi',
|
||||
"Resomi" = 'icons/mob/species/resomi/eyes.dmi',
|
||||
)
|
||||
|
||||
/obj/item/clothing/glasses/update_clothing_icon()
|
||||
if (ismob(src.loc))
|
||||
@@ -197,8 +201,11 @@ BLIND // can't see anything
|
||||
body_parts_covered = HANDS
|
||||
slot_flags = SLOT_GLOVES
|
||||
attack_verb = list("challenged")
|
||||
species_restricted = list("exclude","Unathi","Tajara")
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/gloves.dmi')
|
||||
species_restricted = list("exclude","Unathi","Tajara", "Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/gloves.dmi',
|
||||
"Resomi" = 'icons/mob/species/resomi/gloves.dmi',
|
||||
)
|
||||
|
||||
/obj/item/clothing/gloves/update_clothing_icon()
|
||||
if (ismob(src.loc))
|
||||
@@ -253,6 +260,11 @@ BLIND // can't see anything
|
||||
var/brightness_on
|
||||
var/on = 0
|
||||
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/head.dmi',
|
||||
"Resomi" = 'icons/mob/species/resomi/head.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/head/attack_self(mob/user)
|
||||
if(brightness_on)
|
||||
if(!isturf(user.loc))
|
||||
@@ -312,14 +324,26 @@ BLIND // can't see anything
|
||||
/obj/item/clothing/head/update_icon(var/mob/user)
|
||||
|
||||
overlays.Cut()
|
||||
var/mob/living/carbon/human/H
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
H = user
|
||||
|
||||
if(on)
|
||||
|
||||
// Generate object 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]")
|
||||
if(!light_overlay_cache["[light_overlay]"])
|
||||
light_overlay_cache["[light_overlay]"] = image("icon" = 'icons/mob/light_overlays.dmi', "icon_state" = "[light_overlay]")
|
||||
overlays |= light_overlay_cache["[light_overlay]_icon"]
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
// Generate and cache the on-mob icon, which is used in update_inv_head().
|
||||
var/cache_key = "[light_overlay][H ? "_[H.species.get_bodytype()]" : ""]"
|
||||
if(!light_overlay_cache[cache_key])
|
||||
var/use_icon = 'icons/mob/light_overlays.dmi'
|
||||
if(H && sprite_sheets[H.species.get_bodytype()])
|
||||
use_icon = sprite_sheets[H.species.get_bodytype()]
|
||||
light_overlay_cache[cache_key] = image("icon" = use_icon, "icon_state" = "[light_overlay]")
|
||||
|
||||
if(H)
|
||||
H.update_inv_head()
|
||||
|
||||
/obj/item/clothing/head/update_clothing_icon()
|
||||
@@ -335,7 +359,10 @@ BLIND // can't see anything
|
||||
body_parts_covered = HEAD
|
||||
slot_flags = SLOT_MASK
|
||||
body_parts_covered = FACE|EYES
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/masks.dmi')
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/masks.dmi',
|
||||
"Resomi" = 'icons/mob/species/resomi/masks.dmi',
|
||||
)
|
||||
|
||||
var/voicechange = 0
|
||||
var/list/say_messages
|
||||
@@ -364,8 +391,11 @@ BLIND // can't see anything
|
||||
slowdown = SHOES_SLOWDOWN
|
||||
force = 2
|
||||
var/overshoes = 0
|
||||
species_restricted = list("exclude","Unathi","Tajara")
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/shoes.dmi')
|
||||
species_restricted = list("exclude","Unathi","Tajara","Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/shoes.dmi',
|
||||
"Resomi" = 'icons/mob/species/resomi/shoes.dmi',
|
||||
)
|
||||
|
||||
/obj/item/clothing/shoes/proc/handle_movement(var/turf/walking, var/running)
|
||||
return
|
||||
@@ -389,6 +419,11 @@ BLIND // can't see anything
|
||||
siemens_coefficient = 0.9
|
||||
w_class = 3
|
||||
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/suit.dmi',
|
||||
"Resomi" = 'icons/mob/species/resomi/suit.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/suit/update_clothing_icon()
|
||||
if (ismob(src.loc))
|
||||
var/mob/M = src.loc
|
||||
@@ -418,7 +453,10 @@ BLIND // can't see anything
|
||||
var/list/accessories = list()
|
||||
var/displays_id = 1
|
||||
var/rolled_down = -1 //0 = unrolled, 1 = rolled, -1 = cannot be toggled
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/uniform.dmi')
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/uniform.dmi',
|
||||
"Resomi" = 'icons/mob/species/resomi/uniform.dmi'
|
||||
)
|
||||
|
||||
//convenience var for defining the icon state for the overlay used when the clothing is worn.
|
||||
//Also used by rolling/unrolling.
|
||||
|
||||
@@ -522,7 +522,14 @@ var/global/list/damage_icon_parts = list()
|
||||
if(wear_id)
|
||||
wear_id.screen_loc = ui_id //TODO
|
||||
if(w_uniform && w_uniform:displays_id)
|
||||
overlays_standing[ID_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "id")
|
||||
var/image/standing
|
||||
if(wear_id.icon_override)
|
||||
standing = image("icon" = wear_id.icon_override, "icon_state" = "[icon_state]")
|
||||
else if(wear_id.sprite_sheets && wear_id.sprite_sheets[species.get_bodytype()])
|
||||
standing = image("icon" = wear_id.sprite_sheets[species.get_bodytype()], "icon_state" = "[icon_state]")
|
||||
else
|
||||
standing = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "id")
|
||||
overlays_standing[ID_LAYER] = standing
|
||||
else
|
||||
overlays_standing[ID_LAYER] = null
|
||||
else
|
||||
@@ -687,8 +694,9 @@ var/global/list/damage_icon_parts = list()
|
||||
|
||||
if(istype(head,/obj/item/clothing/head))
|
||||
var/obj/item/clothing/head/hat = head
|
||||
if(hat.on && light_overlay_cache["[hat.light_overlay]"])
|
||||
standing.overlays |= light_overlay_cache["[hat.light_overlay]"]
|
||||
var/cache_key = "[hat.light_overlay]_[species.get_bodytype()]"
|
||||
if(hat.on && light_overlay_cache[cache_key])
|
||||
standing.overlays |= light_overlay_cache[cache_key]
|
||||
|
||||
overlays_standing[HEAD_LAYER] = standing
|
||||
|
||||
@@ -839,14 +847,32 @@ var/global/list/damage_icon_parts = list()
|
||||
drop_r_hand()
|
||||
drop_l_hand()
|
||||
stop_pulling() //TODO: should be handled elsewhere
|
||||
overlays_standing[HANDCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "handcuff1")
|
||||
|
||||
var/image/standing
|
||||
if(handcuffed.icon_override)
|
||||
standing = image("icon" = handcuffed.icon_override, "icon_state" = "handcuff1")
|
||||
else if(handcuffed.sprite_sheets && handcuffed.sprite_sheets[species.get_bodytype()])
|
||||
standing = image("icon" = handcuffed.sprite_sheets[species.get_bodytype()], "icon_state" = "handcuff1")
|
||||
else
|
||||
standing = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "handcuff1")
|
||||
overlays_standing[HANDCUFF_LAYER] = standing
|
||||
|
||||
else
|
||||
overlays_standing[HANDCUFF_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_legcuffed(var/update_icons=1)
|
||||
if(legcuffed)
|
||||
overlays_standing[LEGCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "legcuff1")
|
||||
|
||||
var/image/standing
|
||||
if(legcuffed.icon_override)
|
||||
standing = image("icon" = legcuffed.icon_override, "icon_state" = "legcuff1")
|
||||
else if(legcuffed.sprite_sheets && legcuffed.sprite_sheets[species.get_bodytype()])
|
||||
standing = image("icon" = legcuffed.sprite_sheets[species.get_bodytype()], "icon_state" = "legcuff1")
|
||||
else
|
||||
standing = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "legcuff1")
|
||||
overlays_standing[LEGCUFF_LAYER] = standing
|
||||
|
||||
if(src.m_intent != "walk")
|
||||
src.m_intent = "walk"
|
||||
if(src.hud_used && src.hud_used.move_intent)
|
||||
|
||||
Reference in New Issue
Block a user