This commit is contained in:
Lohikar
2017-08-20 14:00:34 +03:00
committed by Erki
parent d5f7bc76a7
commit 4338095bdf
4 changed files with 18 additions and 9 deletions
@@ -53,5 +53,8 @@
var/list/human_undershirt_cache = list()
var/list/human_socks_cache = list()
// This is for the kitty ears item.
var/list/kitty_ear_cache = list()
/datum/controller/subsystem/icon_cache/New()
NEW_SS_GLOBAL(SSicon_cache)
+14 -6
View File
@@ -148,13 +148,21 @@
siemens_coefficient = 1.5
item_icons = list()
update_icon(var/mob/living/carbon/human/user)
if(!istype(user)) return
var/icon/ears = new/icon("icon" = 'icons/mob/head.dmi', "icon_state" = "kitty")
ears.Blend(rgb(user.r_hair, user.g_hair, user.b_hair), ICON_ADD)
/obj/item/clothing/head/kitty/equipped(mob/living/carbon/human/user, slot)
. = ..()
if (slot == slot_head && istype(user))
var/hairgb = rgb(user.r_hair, user.g_hair, user.b_hair)
var/icon/blended = SSicon_cache.kitty_ear_cache[hairgb]
if (!blended)
blended = icon('icons/mob/head.dmi', "kitty")
blended.Blend(hairgb, ICON_ADD)
blended.Blend(icon('icons/mob/head.dmi', "kittyinner"), ICON_OVERLAY)
var/icon/earbit = new/icon("icon" = 'icons/mob/head.dmi', "icon_state" = "kittyinner")
ears.Blend(earbit, ICON_OVERLAY)
SSicon_cache.kitty_ear_cache[hairgb] = blended
icon_override = blended
else if (icon_override)
icon_override = null
/obj/item/clothing/head/richard
name = "chicken mask"
@@ -258,8 +258,6 @@ This saves us from having to call add_fingerprint() any time something is put in
update_hair(redraw_mob) //rebuild hair
update_inv_ears(0)
update_inv_wear_mask(0)
if(istype(W,/obj/item/clothing/head/kitty))
W.update_icon(src)
W.equipped(src, slot)
update_inv_head(redraw_mob)
if(slot_shoes)
+1 -1
View File
@@ -145,7 +145,7 @@
return
if (user.a_intent == I_HELP && old_name && icon_state == "paper_plane")
user.visible_message(span("notice", "the [src] unfolds \the [src]."), span("notice", "You unfold \the [src]."), "You hear paper rustling.")
user.visible_message(span("notice", "\The [user] unfolds \the [src]."), span("notice", "You unfold \the [src]."), "You hear paper rustling.")
icon_state = initial(icon_state)
throw_range = initial(throw_range)
name = old_name