support for items that switch states through update_icon.
This commit is contained in:
@@ -255,7 +255,7 @@
|
||||
#define COMSIG_ITEM_IMBUE_SOUL "item_imbue_soul" //return a truthy value to prevent ensouling, checked in /obj/effect/proc_holder/spell/targeted/lichdom/cast(): (mob/user)
|
||||
#define COMSIG_ITEM_HIT_REACT "item_hit_react" //from base of obj/item/hit_reaction(): (list/args)
|
||||
#define COMSIG_ITEM_WEARERCROSSED "wearer_crossed" //called on item when crossed by something (): (/atom/movable)
|
||||
#define COMSIG_ITEM_WORN_OVERLAYS "item_worn_overlays" //from base of obj/item/worn_overlays(): (isinhands, icon_file, style_flags, list/overlays)
|
||||
#define COMSIG_ITEM_WORN_OVERLAYS "item_worn_overlays" //from base of obj/item/worn_overlays(): (isinhands, icon_file, used_state, style_flags, list/overlays)
|
||||
|
||||
// /obj/item/clothing signals
|
||||
#define COMSIG_SHOES_STEP_ACTION "shoes_step_action" //from base of obj/item/clothing/shoes/proc/step_action(): ()
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
/datum/element/polychromic
|
||||
element_flags = ELEMENT_BESPOKE|ELEMENT_DETACH
|
||||
id_arg_index = 3
|
||||
var/list/overlays_by_atom = list()
|
||||
var/list/overlays_states //also used for worn/held overlsays
|
||||
var/overlays_states //A list or a number of states. In the latter case, the atom icon_state/item_state will be used followed by a number for the overlays.
|
||||
var/list/colors_by_atom = list() //list of color strings or mutable appearance depending on the above variable.
|
||||
var/icon_file
|
||||
var/list/overlays_names //wrap numbers into text strings please.
|
||||
var/list/actions_by_atom = list()
|
||||
@@ -15,7 +15,7 @@
|
||||
//item variables
|
||||
var/worn_file //used for boths held and worn overlays if present.
|
||||
|
||||
/datum/element/polychromic/Attach(datum/target, list/colors, list/states, _icon, _flags = POLYCHROMIC_ALTCLICK|POLYCHROMIC_NO_HELD, _worn, list/names = list("Primary", "Secondary", "Tertiary", "Quaternary", "Quinary", "Senary"))
|
||||
/datum/element/polychromic/Attach(datum/target, list/colors, states, _icon, _flags = POLYCHROMIC_ALTCLICK|POLYCHROMIC_NO_HELD, _worn, list/names = list("Primary", "Secondary", "Tertiary", "Quaternary", "Quinary", "Senary"))
|
||||
. = ..()
|
||||
var/states_len = length(overlays_states)
|
||||
var/names_len = length(names)
|
||||
@@ -30,11 +30,17 @@
|
||||
|
||||
var/mut_icon = icon_file || A.icon
|
||||
var/list/L = list()
|
||||
for(var/I in overlays_states)
|
||||
var/col = popleft(colors) || "#FFFFFF"
|
||||
L += mutable_appearance(mut_icon, I, color = col)
|
||||
A.add_overlay(L)
|
||||
overlays_by_atom[A] = L
|
||||
if(islist(overlays_states))
|
||||
for(var/I in overlays_states)
|
||||
var/col = popleft(colors) || "#FFFFFF"
|
||||
L += mutable_appearance(mut_icon, I, color = col)
|
||||
else
|
||||
for(var/I in 1 to overlays_states)
|
||||
var/col = LAZYACCESS(colors, I) || "#FFFFFF"
|
||||
L += col
|
||||
colors_by_atom[A] = L
|
||||
|
||||
RegisterSignal(A, COMSIG_ATOM_UPDATE_OVERLAYS, .proc/apply_overlays)
|
||||
|
||||
if(_flags & POLYCHROMIC_ALTCLICK)
|
||||
RegisterSignal(A, COMSIG_PARENT_EXAMINE, .proc/on_examine)
|
||||
@@ -61,40 +67,57 @@
|
||||
actions_by_atom[A] = P
|
||||
P.Grant(A)
|
||||
|
||||
A.update_icon()
|
||||
|
||||
/datum/element/polychromic/Detach(atom/A)
|
||||
. = ..()
|
||||
A.cut_overlay(overlays_by_atom[A])
|
||||
overlays_by_atom -= A
|
||||
A.cut_overlay(colors_by_atom[A])
|
||||
colors_by_atom -= A
|
||||
var/datum/action/polychromic/P = actions_by_atom[A]
|
||||
if(P)
|
||||
qdel(P)
|
||||
actions_by_atom -= A
|
||||
if(poly_flags & POLYCHROMIC_ALTCLICK)
|
||||
UnregisterSignal(A, list(COMSIG_PARENT_EXAMINE, COMSIG_CLICK_ALT))
|
||||
UnregisterSignal(A, list(COMSIG_PARENT_EXAMINE, COMSIG_CLICK_ALT, COMSIG_ATOM_UPDATE_OVERLAYS, COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED))
|
||||
|
||||
/datum/element/polychromic/proc/apply_worn_overlays(obj/item/source, isinhands, icon_file, style_flags, list/overlays)
|
||||
/datum/element/polychromic/proc/apply_overlays(atom/source, list/overlays)
|
||||
var/list/L = colors_by_atom[source]
|
||||
if(isnum(overlays_states))
|
||||
for(var/i in 1 to overlays_states)
|
||||
overlays += mutable_appearance(source.icon, "[source.icon_state]-[i]", color = L[i])
|
||||
else
|
||||
overlays += colors_by_atom[source]
|
||||
|
||||
/datum/element/polychromic/proc/apply_worn_overlays(obj/item/source, isinhands, icon_file, used_state, style_flags, list/overlays)
|
||||
if(poly_flags & (isinhands ? POLYCHROMIC_NO_HELD : POLYCHROMIC_NO_WORN))
|
||||
return
|
||||
var/f_icon = worn_file || icon_file
|
||||
var/list/L = overlays_by_atom[source]
|
||||
var/list/L = colors_by_atom[source]
|
||||
|
||||
for(var/I in 1 to length(overlays_states))
|
||||
var/mutable_appearance/M = L[I]
|
||||
overlays += mutable_appearance(f_icon, overlays_states[I], color = M.color)
|
||||
if(isnum(overlays_states))
|
||||
for(var/i in 1 to overlays_states)
|
||||
overlays += mutable_appearance(f_icon, "[used_state]-[i]", color = L[i])
|
||||
else
|
||||
for(var/I in 1 to length(overlays_states))
|
||||
var/mutable_appearance/M = L[I]
|
||||
overlays += mutable_appearance(f_icon, overlays_states[I], color = M.color)
|
||||
|
||||
/datum/element/polychromic/proc/set_color(atom/source, mob/user)
|
||||
var/choice = input(user,"Polychromic options", "Recolor [source]") as null|anything in overlays_names
|
||||
if(!choice || QDELETED(source) || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERY))
|
||||
return
|
||||
choice = overlays_names.Find(choice)
|
||||
var/ncolor = input(user, "Polychromic options", "Choose [choice] Color") as color|null
|
||||
if(!ncolor || QDELETED(source) || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERY))
|
||||
return
|
||||
var/list/L = overlays_by_atom[source]
|
||||
var/list/L = colors_by_atom[source]
|
||||
if(!L) // Ummmmmh.
|
||||
return
|
||||
var/mutable_appearance/M = L[choice]
|
||||
M.color = sanitize_hexcolor(ncolor, 6, TRUE, M.color)
|
||||
var/K = L[overlays_names.Find(choice)]
|
||||
if(istext(K))
|
||||
K = sanitize_hexcolor(ncolor, 6, TRUE, K)
|
||||
else
|
||||
var/mutable_appearance/M = K
|
||||
M.color = sanitize_hexcolor(ncolor, 6, TRUE, M.color)
|
||||
source.update_icon()
|
||||
return TRUE
|
||||
|
||||
@@ -105,7 +128,7 @@
|
||||
if(!P)
|
||||
P = new (source)
|
||||
actions_by_atom[source] = P
|
||||
P.check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUN|AB_CHECK_LYING|AB_CHECK_CONSCIOUS
|
||||
P.check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUN|AB_CHECK_CONSCIOUS
|
||||
RegisterSignal(P, COMSIG_ACTION_TRIGGER, .proc/activate_action)
|
||||
P.Grant(user)
|
||||
|
||||
|
||||
@@ -428,9 +428,9 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
//Overlays for the worn overlay so you can overlay while you overlay
|
||||
//eg: ammo counters, primed grenade flashing, etc.
|
||||
//"icon_file" is used automatically for inhands etc. to make sure it gets the right inhand file
|
||||
/obj/item/proc/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
/obj/item/proc/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = list()
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_WORN_OVERLAYS, isinhands, icon_file, style_flags, .)
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_WORN_OVERLAYS, isinhands, icon_file, used_state, style_flags, .)
|
||||
|
||||
//sometimes we only want to grant the item's action if it's equipped in a specific slot.
|
||||
/obj/item/proc/item_action_slot_check(slot, mob/user, datum/action/A)
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
cable_overlay.color = GLOB.cable_colors[colors[current_color_index]]
|
||||
. += cable_overlay
|
||||
|
||||
/obj/item/twohanded/rcl/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
/obj/item/twohanded/rcl/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands || !(loaded?.amount))
|
||||
return
|
||||
|
||||
@@ -309,7 +309,7 @@
|
||||
block_chance = 50
|
||||
var/shield_icon = "shield-red"
|
||||
|
||||
/obj/item/nullrod/staff/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
/obj/item/nullrod/staff/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = list()
|
||||
if(isinhands)
|
||||
. += mutable_appearance('icons/effects/effects.dmi', shield_icon, MOB_LAYER + 0.01)
|
||||
|
||||
@@ -337,7 +337,7 @@
|
||||
. = ..()
|
||||
. += "<span class='notice'>Alt-click to recolor it.</span>"
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cx/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
/obj/item/melee/transforming/energy/sword/cx/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(active)
|
||||
if(isinhands)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
for(var/obj/item/I in contents)
|
||||
. += I.get_belt_overlay()
|
||||
|
||||
/obj/item/storage/belt/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
/obj/item/storage/belt/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands && onmob_overlays)
|
||||
for(var/obj/item/I in contents)
|
||||
|
||||
@@ -376,7 +376,7 @@
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
|
||||
/obj/item/reagent_containers/chemtank/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE) //apply chemcolor and level
|
||||
/obj/item/reagent_containers/chemtank/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE) //apply chemcolor and level
|
||||
. = list()
|
||||
//inhands + reagent_filling
|
||||
if(!isinhands && reagents.total_volume)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
base_overlay.appearance_flags = RESET_COLOR
|
||||
. += base_overlay
|
||||
|
||||
/obj/item/screwdriver/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
/obj/item/screwdriver/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = list()
|
||||
if(isinhands && random_color)
|
||||
var/mutable_appearance/M = mutable_appearance(icon_file, "screwdriver_head")
|
||||
|
||||
@@ -352,7 +352,7 @@
|
||||
update_light()
|
||||
return TRUE
|
||||
|
||||
/obj/item/toy/sword/cx/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
/obj/item/toy/sword/cx/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(active)
|
||||
if(isinhands)
|
||||
|
||||
@@ -530,7 +530,7 @@
|
||||
update_light()
|
||||
return TRUE
|
||||
|
||||
/obj/item/twohanded/dualsaber/hypereutactic/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
/obj/item/twohanded/dualsaber/hypereutactic/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(isinhands)
|
||||
var/mutable_appearance/gem_inhand = mutable_appearance(icon_file, "hypereutactic_gem")
|
||||
|
||||
@@ -252,7 +252,7 @@ LINEN BINS
|
||||
add_overlay(g_mouth)
|
||||
add_overlay(g_eyes)
|
||||
|
||||
/obj/item/bedsheet/gondola/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
/obj/item/bedsheet/gondola/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
. += mutable_appearance(icon_file, g_mouth)
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
. = ..()
|
||||
addtimer(CALLBACK(src, .proc/check_on_mob, user), 1) //dropped is called before the item is out of the slot, so we need to check slightly later
|
||||
|
||||
/obj/item/clockwork/slab/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
/obj/item/clockwork/slab/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = list()
|
||||
if(isinhands && item_state && inhand_overlay)
|
||||
var/mutable_appearance/M = mutable_appearance(icon_file, "slab_[inhand_overlay]")
|
||||
|
||||
@@ -425,7 +425,7 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/clothing/suit/hooded/cultrobes/cult_shield/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
/obj/item/clothing/suit/hooded/cultrobes/cult_shield/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = list()
|
||||
if(!isinhands && current_charges)
|
||||
. += mutable_appearance('icons/effects/cult_effects.dmi', "shield-cult", MOB_LAYER + 0.01)
|
||||
|
||||
@@ -333,7 +333,7 @@
|
||||
add_atom_colour("#[user.eye_color]", FIXED_COLOUR_PRIORITY)
|
||||
colored_before = TRUE
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold/white/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold/white/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = list()
|
||||
if(!isinhands && ishuman(loc) && !colored_before)
|
||||
var/mob/living/carbon/human/H = loc
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
user.visible_message("<span class='suicide'>\the [src] are forcing [user]'s hands around [user.p_their()] neck! It looks like the gloves are possessed!</span>")
|
||||
return OXYLOSS
|
||||
|
||||
/obj/item/clothing/gloves/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
/obj/item/clothing/gloves/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = list()
|
||||
if(!isinhands)
|
||||
if(damaged_clothes)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
|
||||
|
||||
/obj/item/clothing/head/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
/obj/item/clothing/head/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = list()
|
||||
if(!isinhands)
|
||||
if(damaged_clothes)
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
playsound(src, 'sound/mecha/mechmove03.ogg', 50, TRUE) //Visors don't just come from nothing
|
||||
update_icon()
|
||||
|
||||
/obj/item/clothing/head/hardhat/weldhat/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
/obj/item/clothing/head/hardhat/weldhat/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
. += mutable_appearance('icons/mob/head.dmi', "weldhelmet")
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
M.color = hair_color
|
||||
add_overlay(M)
|
||||
|
||||
/obj/item/clothing/head/wig/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
/obj/item/clothing/head/wig/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = list()
|
||||
if(!isinhands)
|
||||
var/datum/sprite_accessory/S = GLOB.hair_styles_list[hair_style]
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
/obj/item/clothing/mask/proc/handle_speech()
|
||||
|
||||
/obj/item/clothing/mask/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
/obj/item/clothing/mask/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = list()
|
||||
if(!isinhands)
|
||||
if(body_parts_covered & HEAD)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
strip_delay = 40
|
||||
equip_delay_other = 40
|
||||
|
||||
/obj/item/clothing/neck/worn_overlays(isinhands = FALSE, icon_flag, style_flags = NONE)
|
||||
/obj/item/clothing/neck/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = list()
|
||||
if(!isinhands)
|
||||
if(body_parts_covered & HEAD)
|
||||
@@ -192,7 +192,7 @@
|
||||
tagname = stripped_input(user, "Would you like to change the name on the tag?", "Name your new pet", "Spot", MAX_NAME_LEN)
|
||||
name = "[initial(name)] - [tagname]"
|
||||
|
||||
/obj/item/clothing/neck/petcollar/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
/obj/item/clothing/neck/petcollar/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(hasprimary | hassecondary | hastertiary)
|
||||
if(!isinhands) //prevents the worn sprites from showing up if you're just holding them
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
last_bloodtype = blood_dna[blood_dna[blood_dna.len]]//trust me this works
|
||||
last_blood_DNA = blood_dna[blood_dna.len]
|
||||
|
||||
/obj/item/clothing/shoes/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
/obj/item/clothing/shoes/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = list()
|
||||
if(!isinhands)
|
||||
var/bloody = FALSE
|
||||
|
||||
@@ -793,7 +793,7 @@
|
||||
var/mob/living/carbon/human/C = loc
|
||||
C.update_inv_wear_suit()
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/shielded/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
/obj/item/clothing/suit/space/hardsuit/shielded/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
var/file2use = style_flags & STYLE_ALL_TAURIC ? 'modular_citadel/icons/mob/64x32_effects.dmi' : 'icons/effects/effects.dmi'
|
||||
@@ -956,7 +956,7 @@
|
||||
|
||||
add_overlay(helm_overlay)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/lavaknight/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/lavaknight/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
var/mutable_appearance/energy_overlay = mutable_appearance(icon_file, "knight_cydonia_overlay", ABOVE_LIGHTING_LAYER)
|
||||
@@ -993,7 +993,7 @@
|
||||
|
||||
add_overlay(suit_overlay)
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/lavaknight/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
/obj/item/clothing/suit/space/hardsuit/lavaknight/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
var/mutable_appearance/energy_overlay = mutable_appearance(icon_file, "knight_cydonia_overlay", ABOVE_LIGHTING_LAYER)
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
var/datum/action/A=X
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
/obj/item/clothing/head/helmet/space/plasmaman/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
/obj/item/clothing/head/helmet/space/plasmaman/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands && on)
|
||||
. += mutable_appearance(icon_file, light_overlay)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var/suittoggled = FALSE
|
||||
mutantrace_variation = STYLE_DIGITIGRADE
|
||||
|
||||
/obj/item/clothing/suit/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
/obj/item/clothing/suit/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
if(damaged_clothes)
|
||||
|
||||
@@ -987,7 +987,7 @@
|
||||
item_color = "winterhood_poly"
|
||||
item_state = "winterhood_poly"
|
||||
|
||||
/obj/item/clothing/head/hooded/winterhood/polychromic/worn_overlays(isinhands, icon_file, style_flags = NONE) //this is where the main magic happens.
|
||||
/obj/item/clothing/head/hooded/winterhood/polychromic/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE) //this is where the main magic happens.
|
||||
. = ..()
|
||||
if(suit.hasprimary | suit.hassecondary)
|
||||
if(!isinhands) //prevents the worn sprites from showing up if you're just holding them
|
||||
@@ -1000,7 +1000,7 @@
|
||||
secondary_worn.color = suit.secondary_color
|
||||
. += secondary_worn
|
||||
|
||||
/obj/item/clothing/suit/hooded/wintercoat/polychromic/worn_overlays(isinhands, icon_file, style_flags = NONE) //this is where the main magic happens.
|
||||
/obj/item/clothing/suit/hooded/wintercoat/polychromic/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE) //this is where the main magic happens.
|
||||
. = ..()
|
||||
if(hasprimary | hassecondary | hastertiary)
|
||||
if(!isinhands) //prevents the worn sprites from showing up if you're just holding them
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
var/mutable_appearance/accessory_overlay
|
||||
mutantrace_variation = STYLE_DIGITIGRADE
|
||||
|
||||
/obj/item/clothing/under/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
/obj/item/clothing/under/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = list()
|
||||
if(!isinhands)
|
||||
if(damaged_clothes)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
can_adjust = FALSE
|
||||
mutantrace_variation = NONE //Not all clothes are currently digi-compatible (only the shorts are as of time of writing)
|
||||
|
||||
/obj/item/clothing/under/polychromic/worn_overlays(isinhands, icon_file, style_flags = NONE) //this is where the main magic happens.
|
||||
/obj/item/clothing/under/polychromic/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE) //this is where the main magic happens.
|
||||
. = ..()
|
||||
if(hasprimary | hassecondary | hastertiary)
|
||||
if(!isinhands) //prevents the worn sprites from showing up if you're just holding them
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
tag_overlay.pixel_y = boxes.len * 3
|
||||
add_overlay(tag_overlay)
|
||||
|
||||
/obj/item/pizzabox/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
/obj/item/pizzabox/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = list()
|
||||
var/current_offset = 2
|
||||
if(isinhands)
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
glass_overlay.appearance_flags = RESET_COLOR
|
||||
add_overlay(glass_overlay)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hostile_environment/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
/obj/item/clothing/head/helmet/space/hostile_environment/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
var/mutable_appearance/M = mutable_appearance('icons/mob/head.dmi', "hostile_env_glass")
|
||||
|
||||
@@ -593,7 +593,7 @@ generate/load female uniform sprites matching all previously decided variables
|
||||
|
||||
//Get the overlays for this item when it's being worn
|
||||
//eg: ammo counters, primed grenade flashes, etc.
|
||||
var/list/worn_overlays = worn_overlays(isinhands, file2use, style_flags)
|
||||
var/list/worn_overlays = worn_overlays(isinhands, file2use, state, style_flags)
|
||||
if(worn_overlays && worn_overlays.len)
|
||||
standing.overlays.Add(worn_overlays)
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
secondary_color = "#FFFFFF"
|
||||
tertiary_color = "#808080"
|
||||
|
||||
/obj/item/clothing/neck/cloak/polychromic/worn_overlays(isinhands, icon_file, style_flags = NONE) //this is where the main magic happens. Also mandates that ALL polychromic stuff MUST USE alternate_worn_icon
|
||||
/obj/item/clothing/neck/cloak/polychromic/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE) //this is where the main magic happens. Also mandates that ALL polychromic stuff MUST USE alternate_worn_icon
|
||||
. = ..()
|
||||
if(hasprimary | hassecondary | hastertiary)
|
||||
if(!isinhands) //prevents the worn sprites from showing up if you're just holding them
|
||||
|
||||
@@ -39,7 +39,7 @@ obj/item/gun/energy/e_gun/cx/AltClick(mob/living/user)
|
||||
body_color = sanitize_hexcolor(body_color_input, desired_format=6, include_crunch=1)
|
||||
update_icon()
|
||||
|
||||
obj/item/gun/energy/e_gun/cx/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
obj/item/gun/energy/e_gun/cx/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(isinhands)
|
||||
var/mutable_appearance/body_inhand = mutable_appearance(icon_file, "cxe_body")
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
. = ..()
|
||||
. += "<span class='notice'>Alt-click to change firing modes.</span>"
|
||||
|
||||
/obj/item/gun/energy/pumpaction/worn_overlays(isinhands, icon_file, style_flags = NONE) //ammo counter for inhands
|
||||
/obj/item/gun/energy/pumpaction/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE) //ammo counter for inhands
|
||||
. = ..()
|
||||
var/ratio = CEILING((cell.charge / cell.maxcharge) * charge_sections, 1)
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[current_firemode_index]
|
||||
|
||||
Reference in New Issue
Block a user