Makes the decal component handle updating inventory icons
This commit is contained in:
committed by
CitadelStationBot
parent
943388d8f4
commit
f581b2d94d
@@ -25,16 +25,12 @@
|
||||
if(cleaned_human.lying)
|
||||
if(cleaned_human.head)
|
||||
cleaned_human.head.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
cleaned_human.update_inv_head()
|
||||
if(cleaned_human.wear_suit)
|
||||
cleaned_human.wear_suit.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
cleaned_human.update_inv_wear_suit()
|
||||
else if(cleaned_human.w_uniform)
|
||||
cleaned_human.w_uniform.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
cleaned_human.update_inv_w_uniform()
|
||||
if(cleaned_human.shoes)
|
||||
cleaned_human.shoes.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
cleaned_human.update_inv_shoes()
|
||||
cleaned_human.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
cleaned_human.wash_cream()
|
||||
to_chat(cleaned_human, "<span class='danger'>[AM] cleans your face!</span>")
|
||||
|
||||
@@ -41,10 +41,14 @@
|
||||
/datum/component/decal/proc/apply(atom/thing)
|
||||
var/atom/master = thing || parent
|
||||
master.add_overlay(pic, TRUE)
|
||||
if(isitem(master))
|
||||
addtimer(CALLBACK(master, /obj/item/.proc/update_slot_icon), 0, TIMER_UNIQUE)
|
||||
|
||||
/datum/component/decal/proc/remove(atom/thing)
|
||||
var/atom/master = thing || parent
|
||||
master.cut_overlay(pic, TRUE)
|
||||
if(isitem(master))
|
||||
addtimer(CALLBACK(master, /obj/item/.proc/update_slot_icon), 0, TIMER_UNIQUE)
|
||||
|
||||
/datum/component/decal/proc/rotate_react(old_dir, new_dir)
|
||||
if(old_dir == new_dir)
|
||||
|
||||
@@ -594,6 +594,36 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
/obj/item/proc/get_belt_overlay() //Returns the icon used for overlaying the object on a belt
|
||||
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', icon_state)
|
||||
|
||||
/obj/item/proc/update_slot_icon()
|
||||
if(!ismob(loc))
|
||||
return
|
||||
var/mob/owner = loc
|
||||
var/flags = slot_flags
|
||||
if(flags & SLOT_OCLOTHING)
|
||||
owner.update_inv_wear_suit()
|
||||
if(flags & SLOT_ICLOTHING)
|
||||
owner.update_inv_w_uniform()
|
||||
if(flags & SLOT_GLOVES)
|
||||
owner.update_inv_gloves()
|
||||
if(flags & SLOT_EYES)
|
||||
owner.update_inv_glasses()
|
||||
if(flags & SLOT_EARS)
|
||||
owner.update_inv_ears()
|
||||
if(flags & SLOT_MASK)
|
||||
owner.update_inv_wear_mask()
|
||||
if(flags & SLOT_HEAD)
|
||||
owner.update_inv_head()
|
||||
if(flags & SLOT_FEET)
|
||||
owner.update_inv_shoes()
|
||||
if(flags & SLOT_ID)
|
||||
owner.update_inv_wear_id()
|
||||
if(flags & SLOT_BELT)
|
||||
owner.update_inv_belt()
|
||||
if(flags & SLOT_BACK)
|
||||
owner.update_inv_back()
|
||||
if(flags & SLOT_NECK)
|
||||
owner.update_inv_neck()
|
||||
|
||||
/obj/item/proc/is_hot()
|
||||
return heat
|
||||
|
||||
|
||||
@@ -128,7 +128,8 @@
|
||||
return
|
||||
|
||||
update_item(picked_item)
|
||||
update_item_icon()
|
||||
var/obj/item/thing = target
|
||||
thing.update_slot_icon()
|
||||
UpdateButtonIcon()
|
||||
|
||||
/datum/action/item_action/chameleon/change/proc/update_item(obj/item/picked_item)
|
||||
@@ -166,6 +167,7 @@
|
||||
return
|
||||
random_look(owner)
|
||||
|
||||
<<<<<<< HEAD
|
||||
/datum/action/item_action/chameleon/change/proc/update_item_icon()
|
||||
var/obj/item/I = target
|
||||
var/mob/living/M = owner
|
||||
@@ -196,6 +198,8 @@
|
||||
if(flags_1 & SLOT_NECK)
|
||||
M.update_inv_neck()
|
||||
|
||||
=======
|
||||
>>>>>>> 8309296... makes the decal component handle updating inventory icons (#33967)
|
||||
/obj/item/clothing/under/chameleon
|
||||
//starts off as black
|
||||
name = "black jumpsuit"
|
||||
|
||||
Reference in New Issue
Block a user