This commit is contained in:
Ghommie
2020-03-08 19:26:01 +01:00
parent d78926b269
commit ad4d290ea7
89 changed files with 443 additions and 498 deletions
+8 -11
View File
@@ -441,17 +441,14 @@ BLIND // can't see anything
return TRUE
/obj/item/clothing/update_icon() // Polychrome stuff
..()
/obj/item/clothing/update_overlays() // Polychrome stuff
. = ..()
if(hasprimary) //Checks if the overlay is enabled
var/mutable_appearance/primary_overlay = mutable_appearance(icon, "[item_color]-primary") //Automagically picks overlays
primary_overlay.color = primary_color //Colors the greyscaled overlay
add_overlay(primary_overlay) //Applies the coloured overlay onto the item sprite. but NOT the mob sprite.
var/mutable_appearance/primary_overlay = mutable_appearance(icon, "[item_color]-primary", color = primary_color) //Automagically picks overlays
. += primary_overlay //Applies the coloured overlay onto the item sprite. but NOT the mob sprite.
if(hassecondary)
var/mutable_appearance/secondary_overlay = mutable_appearance(icon, "[item_color]-secondary")
secondary_overlay.color = secondary_color
add_overlay(secondary_overlay)
var/mutable_appearance/secondary_overlay = mutable_appearance(icon, "[item_color]-secondary", color = secondary_color)
. += secondary_overlay
if(hastertiary)
var/mutable_appearance/tertiary_overlay = mutable_appearance(icon, "[item_color]-tertiary")
tertiary_overlay.color = tertiary_color
add_overlay(tertiary_overlay)
var/mutable_appearance/tertiary_overlay = mutable_appearance(icon, "[item_color]-tertiary", color = tertiary_color)
. += tertiary_overlay
+5 -6
View File
@@ -35,16 +35,15 @@
. = ..()
update_icon()
/obj/item/clothing/ears/headphones/update_icon()
/obj/item/clothing/ears/headphones/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/clothing/ears/headphones/update_icon_state()
icon_state = "[initial(icon_state)]_[headphones_on? "on" : "off"]"
item_state = "[initial(item_state)]_[headphones_on? "on" : "off"]"
/obj/item/clothing/ears/headphones/proc/toggle(owner)
headphones_on = !headphones_on
update_icon()
var/mob/living/carbon/human/H = owner
if(istype(H))
H.update_inv_ears()
H.update_inv_neck()
H.update_inv_head()
to_chat(owner, "<span class='notice'>You turn the music [headphones_on? "on. Untz Untz Untz!" : "off."]</span>")
@@ -31,6 +31,10 @@
START_PROCESSING(SSobj, src)
update_icon()
/obj/item/clothing/glasses/meson/engine/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/clothing/glasses/meson/engine/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
@@ -120,18 +124,8 @@
pic = new('icons/turf/overlays.dmi', place, "redOverlay", AREA_LAYER)
flick_overlay(pic, list(user.client), 8)
/obj/item/clothing/glasses/meson/engine/update_icon()
/obj/item/clothing/glasses/meson/engine/update_icon_state()
icon_state = "trayson-[mode]"
update_mob()
/obj/item/clothing/glasses/meson/engine/proc/update_mob()
item_state = icon_state
if(isliving(loc))
var/mob/living/user = loc
if(user.get_item_by_slot(SLOT_GLASSES) == src)
user.update_inv_glasses()
else
user.update_inv_hands()
/obj/item/clothing/glasses/meson/engine/tray //atmos techs have lived far too long without tray goggles while those damned engineers get their dual-purpose gogles all to themselves
name = "optical t-ray scanner"
+9 -11
View File
@@ -16,6 +16,11 @@
dog_fashion = /datum/dog_fashion/head
/obj/item/clothing/head/hardhat/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/clothing/head/hardhat/attack_self(mob/living/user)
toggle_helmet_light(user)
@@ -27,15 +32,9 @@
turn_off(user)
update_icon()
/obj/item/clothing/head/hardhat/update_icon()
/obj/item/clothing/head/hardhat/update_icon_state()
icon_state = "hardhat[on]_[item_color]"
item_state = "hardhat[on]_[item_color]"
if(ishuman(loc))
var/mob/living/carbon/human/H = loc
H.update_inv_head()
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon(force = TRUE)
/obj/item/clothing/head/hardhat/proc/turn_on(mob/user)
set_light(brightness_on, power_on)
@@ -132,11 +131,10 @@
if(!up)
. += mutable_appearance('icons/mob/head.dmi', "weldvisor")
/obj/item/clothing/head/hardhat/weldhat/update_icon()
cut_overlays()
/obj/item/clothing/head/hardhat/weldhat/update_overlays()
. = ..()
if(!up)
add_overlay("weldvisor")
..()
. += "weldvisor"
/obj/item/clothing/head/hardhat/weldhat/orange
icon_state = "hardhat0_orange"
+5 -5
View File
@@ -258,7 +258,11 @@
//LightToggle
/obj/item/clothing/head/helmet/update_icon()
/obj/item/clothing/head/helment/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/clothing/head/helmet/update_icon_state()
var/state = "[initial(icon_state)]"
if(F)
if(F.on)
@@ -268,10 +272,6 @@
icon_state = state
if(ishuman(loc))
var/mob/living/carbon/human/H = loc
H.update_inv_head()
/obj/item/clothing/head/helmet/ui_action_click(mob/user, action)
if(istype(action, /datum/action/item_action/toggle_helmet_flashlight))
toggle_helmlight()
+9 -6
View File
@@ -197,16 +197,19 @@
. = ..()
update_icon()
/obj/item/clothing/head/wig/update_icon()
cut_overlays()
/obj/item/clothing/head/wig/update_icon_state()
var/datum/sprite_accessory/S = GLOB.hair_styles_list[hair_style]
if(!S)
icon = 'icons/obj/clothing/hats.dmi'
icon_state = "pwig"
else
var/mutable_appearance/M = mutable_appearance(S.icon,S.icon_state)
/obj/item/clothing/head/wig/update_overlays()
. = ..()
var/datum/sprite_accessory/S = GLOB.hair_styles_list[hair_style]
if(S)
var/mutable_appearance/M = mutable_appearance(S.icon, S.icon_state, color = hair_color)
M.appearance_flags |= RESET_COLOR
M.color = hair_color
add_overlay(M)
. += M
/obj/item/clothing/head/wig/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
. = list()
+8 -11
View File
@@ -10,11 +10,15 @@
/obj/item/clothing/shoes/clown_shoes/banana_shoes/Initialize()
. = ..()
AddComponent(/datum/component/material_container, list(/datum/material/bananium), 200000, TRUE, /obj/item/stack)
AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 75)
if(always_noslip)
clothing_flags |= NOSLIP
/obj/item/clothing/shoes/clown_shoes/banana_shoes/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
AddComponent(/datum/component/material_container, list(/datum/material/bananium), 200000, TRUE, /obj/item/stack)
AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 75)
/obj/item/clothing/shoes/clown_shoes/banana_shoes/step_action()
. = ..()
var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container)
@@ -55,12 +59,5 @@
else
to_chat(user, "<span class='warning'>You need bananium to turn the prototype shoes on!</span>")
/obj/item/clothing/shoes/clown_shoes/banana_shoes/update_icon()
if(on)
icon_state = "clown_prototype_on"
else
icon_state = "clown_prototype_off"
usr.update_inv_shoes()
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/clothing/shoes/clown_shoes/banana_shoes/update_icon_state()
icon_state = "clown_prototype_[on? "on" : "off"]"
+7 -19
View File
@@ -275,7 +275,7 @@
visor_flags_inv = HIDEMASK|HIDEEYES|HIDEFACE|HIDEFACIALHAIR
visor_flags = STOPSPRESSUREDAMAGE
/obj/item/clothing/head/helmet/space/hardsuit/syndi/update_icon()
/obj/item/clothing/head/helmet/space/hardsuit/syndi/update_icon_state()
icon_state = "hardsuit[on]-[item_color]"
/obj/item/clothing/head/helmet/space/hardsuit/syndi/Initialize()
@@ -946,15 +946,9 @@
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/clothing/head/helmet/space/hardsuit/lavaknight/update_icon()
var/mutable_appearance/helm_overlay = mutable_appearance(icon, "knight_cydonia_overlay")
if(energy_color)
helm_overlay.color = energy_color
cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other
add_overlay(helm_overlay)
/obj/item/clothing/head/helmet/space/hardsuit/lavaknight/update_overlays()
. = ..()
. += mutable_appearance(icon, "knight_cydonia_overlay", color = energy_color)
/obj/item/clothing/head/helmet/space/hardsuit/lavaknight/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
. = ..()
@@ -983,15 +977,9 @@
set_light(1)
update_icon()
/obj/item/clothing/suit/space/hardsuit/lavaknight/update_icon()
var/mutable_appearance/suit_overlay = mutable_appearance(icon, "knight_cydonia_overlay")
if(energy_color)
suit_overlay.color = energy_color
cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other
add_overlay(suit_overlay)
/obj/item/clothing/suit/space/hardsuit/lavaknight/update_overlays()
. = ..()
. += mutable_appearance(icon, "knight_cydonia_overlay", color = energy_color)
/obj/item/clothing/suit/space/hardsuit/lavaknight/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
. = ..()