Merge pull request #11259 from Ghommie/Ghommie-cit590

Porting update_icon improvements.
This commit is contained in:
kevinz000
2020-02-28 04:30:12 -07:00
committed by GitHub
122 changed files with 738 additions and 727 deletions
+1
View File
@@ -62,6 +62,7 @@
#define COMSIG_ATOM_NO_UPDATE_ICON_STATE 1 #define COMSIG_ATOM_NO_UPDATE_ICON_STATE 1
#define COMSIG_ATOM_NO_UPDATE_OVERLAYS 2 #define COMSIG_ATOM_NO_UPDATE_OVERLAYS 2
#define COMSIG_ATOM_UPDATE_OVERLAYS "atom_update_overlays" //from base of atom/update_overlays(): (list/new_overlays) #define COMSIG_ATOM_UPDATE_OVERLAYS "atom_update_overlays" //from base of atom/update_overlays(): (list/new_overlays)
#define COMSIG_ATOM_UPDATED_ICON "atom_updated_icon" //from base of atom/update_icon(): (signalOut, did_anything)
#define COMSIG_ATOM_ENTERED "atom_entered" //from base of atom/Entered(): (atom/movable/entering, /atom) #define COMSIG_ATOM_ENTERED "atom_entered" //from base of atom/Entered(): (atom/movable/entering, /atom)
#define COMSIG_ATOM_EXIT "atom_exit" //from base of atom/Exit(): (/atom/movable/exiting, /atom/newloc) #define COMSIG_ATOM_EXIT "atom_exit" //from base of atom/Exit(): (/atom/movable/exiting, /atom/newloc)
#define COMPONENT_ATOM_BLOCK_EXIT 1 #define COMPONENT_ATOM_BLOCK_EXIT 1
+22 -3
View File
@@ -72,6 +72,22 @@
var/hide_icon = 'icons/mob/actions.dmi' var/hide_icon = 'icons/mob/actions.dmi'
var/hide_state = "hide" var/hide_state = "hide"
var/show_state = "show" var/show_state = "show"
var/mutable_appearance/hide_appearance
var/mutable_appearance/show_appearance
/obj/screen/movable/action_button/hide_toggle/Initialize()
. = ..()
var/static/list/icon_cache = list()
var/cache_key = "[hide_icon][hide_state]"
hide_appearance = icon_cache[cache_key]
if(!hide_appearance)
hide_appearance = icon_cache[cache_key] = mutable_appearance(hide_icon, hide_state)
cache_key = "[hide_icon][show_state]"
show_appearance = icon_cache[cache_key]
if(!show_appearance)
show_appearance = icon_cache[cache_key] = mutable_appearance(hide_icon, show_state)
/obj/screen/movable/action_button/hide_toggle/Click(location,control,params) /obj/screen/movable/action_button/hide_toggle/Click(location,control,params)
if (!can_use(usr)) if (!can_use(usr))
@@ -137,9 +153,12 @@
show_state = settings["toggle_show"] show_state = settings["toggle_show"]
update_icon() update_icon()
/obj/screen/movable/action_button/hide_toggle/update_icon() /obj/screen/movable/action_button/hide_toggle/update_overlays()
cut_overlays() . = ..()
add_overlay(mutable_appearance(hide_icon, hidden ? show_state : hide_state)) if(hidden)
. += show_appearance
else
. += hide_appearance
/obj/screen/movable/action_button/MouseEntered(location,control,params) /obj/screen/movable/action_button/MouseEntered(location,control,params)
+4 -6
View File
@@ -166,29 +166,27 @@
var/static/mutable_appearance/blocked_overlay = mutable_appearance('icons/mob/screen_gen.dmi', "blocked") var/static/mutable_appearance/blocked_overlay = mutable_appearance('icons/mob/screen_gen.dmi', "blocked")
var/held_index = 0 var/held_index = 0
/obj/screen/inventory/hand/update_icon() /obj/screen/inventory/hand/update_overlays()
. = ..() . = ..()
if(!handcuff_overlay) if(!handcuff_overlay)
var/state = (!(held_index % 2)) ? "markus" : "gabrielle" var/state = (!(held_index % 2)) ? "markus" : "gabrielle"
handcuff_overlay = mutable_appearance('icons/mob/screen_gen.dmi', state) handcuff_overlay = mutable_appearance('icons/mob/screen_gen.dmi', state)
cut_overlay(list(handcuff_overlay, blocked_overlay, "hand_active"))
if(!hud?.mymob) if(!hud?.mymob)
return return
if(iscarbon(hud.mymob)) if(iscarbon(hud.mymob))
var/mob/living/carbon/C = hud.mymob var/mob/living/carbon/C = hud.mymob
if(C.handcuffed) if(C.handcuffed)
add_overlay(handcuff_overlay) . += handcuff_overlay
if(held_index) if(held_index)
if(!C.has_hand_for_held_index(held_index)) if(!C.has_hand_for_held_index(held_index))
add_overlay(blocked_overlay) . += blocked_overlay
if(held_index == hud.mymob.active_hand_index) if(held_index == hud.mymob.active_hand_index)
add_overlay("hand_active") . += "hand_active"
/obj/screen/inventory/hand/Click(location, control, params) /obj/screen/inventory/hand/Click(location, control, params)
+12 -12
View File
@@ -76,8 +76,8 @@
layer = ABOVE_HUD_LAYER layer = ABOVE_HUD_LAYER
plane = ABOVE_HUD_PLANE plane = ABOVE_HUD_PLANE
var/atom/movable/focus = null var/atom/movable/focus
var/mob/living/carbon/tk_user = null var/mob/living/carbon/tk_user
/obj/item/tk_grab/Initialize() /obj/item/tk_grab/Initialize()
. = ..() . = ..()
@@ -85,6 +85,8 @@
/obj/item/tk_grab/Destroy() /obj/item/tk_grab/Destroy()
STOP_PROCESSING(SSfastprocess, src) STOP_PROCESSING(SSfastprocess, src)
focus = null
tk_user = null
return ..() return ..()
/obj/item/tk_grab/process() /obj/item/tk_grab/process()
@@ -179,16 +181,14 @@
return return
new /obj/effect/temp_visual/telekinesis(get_turf(focus)) new /obj/effect/temp_visual/telekinesis(get_turf(focus))
/obj/item/tk_grab/update_icon() /obj/item/tk_grab/update_overlays()
cut_overlays() . = ..()
if(focus) if(!focus)
var/old_layer = focus.layer return
var/old_plane = focus.plane var/mutable_appearance/focus_overlay = new(focus)
focus.layer = layer+0.01 focus_overlay.layer = layer + 0.01
focus.plane = ABOVE_HUD_PLANE focus_overlay.plane = ABOVE_HUD_PLANE
add_overlay(focus) //this is kind of ick, but it's better than using icon() . += focus_overlay
focus.layer = old_layer
focus.plane = old_plane
/obj/item/tk_grab/suicide_act(mob/user) /obj/item/tk_grab/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is using [user.p_their()] telekinesis to choke [user.p_them()]self! It looks like [user.p_theyre()] trying to commit suicide!</span>") user.visible_message("<span class='suicide'>[user] is using [user.p_their()] telekinesis to choke [user.p_them()]self! It looks like [user.p_theyre()] trying to commit suicide!</span>")
+5 -1
View File
@@ -31,6 +31,7 @@
/datum/action/proc/link_to(Target) /datum/action/proc/link_to(Target)
target = Target target = Target
RegisterSignal(Target, COMSIG_ATOM_UPDATED_ICON, .proc/OnUpdatedIcon)
/datum/action/Destroy() /datum/action/Destroy()
if(owner) if(owner)
@@ -153,6 +154,9 @@
var/mob/M = target var/mob/M = target
M.ghostize(1) M.ghostize(1)
/datum/action/proc/OnUpdatedIcon()
UpdateButtonIcon()
//Presets for item actions //Presets for item actions
/datum/action/item_action /datum/action/item_action
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUN|AB_CHECK_LYING|AB_CHECK_CONSCIOUS check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUN|AB_CHECK_LYING|AB_CHECK_CONSCIOUS
@@ -824,4 +828,4 @@
for(var/datum/action/A in M.actions) for(var/datum/action/A in M.actions)
if(istype(A, action_type)) if(istype(A, action_type))
return A return A
return return
+12 -1
View File
@@ -12,6 +12,8 @@
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/examine) RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/examine)
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/applyplate) RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/applyplate)
RegisterSignal(parent, COMSIG_PARENT_PREQDELETED, .proc/dropplates) RegisterSignal(parent, COMSIG_PARENT_PREQDELETED, .proc/dropplates)
if(istype(parent, /obj/mecha/working/ripley))
RegisterSignal(parent, COMSIG_ATOM_UPDATE_OVERLAYS, .proc/apply_mech_overlays)
if(_maxamount) if(_maxamount)
maxamount = _maxamount maxamount = _maxamount
@@ -75,4 +77,13 @@
/datum/component/armor_plate/proc/dropplates(datum/source, force) /datum/component/armor_plate/proc/dropplates(datum/source, force)
if(ismecha(parent)) //items didn't drop the plates before and it causes erroneous behavior for the time being with collapsible helmets if(ismecha(parent)) //items didn't drop the plates before and it causes erroneous behavior for the time being with collapsible helmets
for(var/i in 1 to amount) for(var/i in 1 to amount)
new upgrade_item(get_turf(parent)) new upgrade_item(get_turf(parent))
/datum/component/armor_plate/proc/apply_mech_overlays(obj/mecha/mech, list/overlays)
if(amount)
var/overlay_string = "ripley-g"
if(amount >= 3)
overlay_string += "-full"
if(!mech.occupant)
overlay_string += "-open"
overlays += overlay_string
@@ -0,0 +1,10 @@
//Prevents calling anything in update_icon() like update_icon_state() or update_overlays()
/datum/element/update_icon_blocker/Attach(datum/target)
. = ..()
if(!istype(target, /atom))
return ELEMENT_INCOMPATIBLE
RegisterSignal(target, COMSIG_ATOM_UPDATE_ICON, .proc/block_update_icon)
/datum/element/update_icon_blocker/proc/block_update_icon()
return COMSIG_ATOM_NO_UPDATE_ICON_STATE | COMSIG_ATOM_NO_UPDATE_OVERLAYS
@@ -0,0 +1,16 @@
//update_icon() may change the onmob icons
//Very good name, I know
/datum/element/update_icon_updates_onmob/Attach(datum/target)
. = ..()
if(!istype(target, /obj/item))
return ELEMENT_INCOMPATIBLE
RegisterSignal(target, COMSIG_ATOM_UPDATED_ICON, .proc/update_onmob)
/datum/element/update_icon_updates_onmob/proc/update_onmob(obj/item/target)
if(ismob(target.loc))
var/mob/M = target.loc
if(M.is_holding(target))
M.update_inv_hands()
else
M.regenerate_icons() //yeah this is shit, but we don't know which update_foo() proc to call instead so we'll call them all
+5
View File
@@ -334,9 +334,11 @@
/atom/proc/update_icon() /atom/proc/update_icon()
// I expect we're going to need more return flags and options in this proc // I expect we're going to need more return flags and options in this proc
var/signalOut = SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_ICON) var/signalOut = SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_ICON)
. = FALSE
if(!(signalOut & COMSIG_ATOM_NO_UPDATE_ICON_STATE)) if(!(signalOut & COMSIG_ATOM_NO_UPDATE_ICON_STATE))
update_icon_state() update_icon_state()
. = TRUE
if(!(signalOut & COMSIG_ATOM_NO_UPDATE_OVERLAYS)) if(!(signalOut & COMSIG_ATOM_NO_UPDATE_OVERLAYS))
var/list/new_overlays = update_overlays() var/list/new_overlays = update_overlays()
@@ -346,6 +348,9 @@
if(length(new_overlays)) if(length(new_overlays))
managed_overlays = new_overlays managed_overlays = new_overlays
add_overlay(new_overlays) add_overlay(new_overlays)
. = TRUE
SEND_SIGNAL(src, COMSIG_ATOM_UPDATED_ICON, signalOut, .)
/// Updates the icon state of the atom /// Updates the icon state of the atom
/atom/proc/update_icon_state() /atom/proc/update_icon_state()
+10 -16
View File
@@ -4,23 +4,17 @@
icon = 'icons/obj/machines/nuke.dmi' icon = 'icons/obj/machines/nuke.dmi'
icon_state = "bananiumbomb_base" icon_state = "bananiumbomb_base"
/obj/machinery/nuclearbomb/syndicate/bananium/update_icon() /obj/machinery/nuclearbomb/syndicate/bananium/update_icon_state()
if(deconstruction_state == NUKESTATE_INTACT) if(deconstruction_state != NUKESTATE_INTACT)
switch(get_nuke_state())
if(NUKE_OFF_LOCKED, NUKE_OFF_UNLOCKED)
icon_state = "bananiumbomb_base"
update_icon_interior()
update_icon_lights()
if(NUKE_ON_TIMING)
cut_overlays()
icon_state = "bananiumbomb_timing"
if(NUKE_ON_EXPLODING)
cut_overlays()
icon_state = "bananiumbomb_exploding"
else
icon_state = "bananiumbomb_base" icon_state = "bananiumbomb_base"
update_icon_interior() return
update_icon_lights() switch(get_nuke_state())
if(NUKE_OFF_LOCKED, NUKE_OFF_UNLOCKED)
icon_state = "bananiumbomb_base"
if(NUKE_ON_TIMING)
icon_state = "bananiumbomb_timing"
if(NUKE_ON_EXPLODING)
icon_state = "bananiumbomb_exploding"
/obj/machinery/nuclearbomb/syndicate/bananium/get_cinematic_type(off_station) /obj/machinery/nuclearbomb/syndicate/bananium/get_cinematic_type(off_station)
switch(off_station) switch(off_station)
+1 -1
View File
@@ -28,7 +28,7 @@
update_icon() update_icon()
// update the icon_state // update the icon_state
/obj/machinery/bluespace_beacon/update_icon() /obj/machinery/bluespace_beacon/update_icon_state()
var/state="floor_beacon" var/state="floor_beacon"
if(invisibility) if(invisibility)
+10 -5
View File
@@ -9,16 +9,12 @@
var/list/colorlist = list() var/list/colorlist = list()
/obj/machinery/pdapainter/update_icon() /obj/machinery/pdapainter/update_icon_state()
cut_overlays()
if(stat & BROKEN) if(stat & BROKEN)
icon_state = "[initial(icon_state)]-broken" icon_state = "[initial(icon_state)]-broken"
return return
if(storedpda)
add_overlay("[initial(icon_state)]-closed")
if(powered()) if(powered())
icon_state = initial(icon_state) icon_state = initial(icon_state)
else else
@@ -26,6 +22,15 @@
return return
/obj/machinery/pdapainter/update_overlays()
. = ..()
if(stat & BROKEN)
return
if(storedpda)
. += "[initial(icon_state)]-closed"
/obj/machinery/pdapainter/Initialize() /obj/machinery/pdapainter/Initialize()
. = ..() . = ..()
var/list/blocked = list( var/list/blocked = list(
+1 -1
View File
@@ -71,7 +71,7 @@
reagents.maximum_volume = (500*E) reagents.maximum_volume = (500*E)
/obj/machinery/sleeper/update_icon() /obj/machinery/sleeper/update_icon_state()
icon_state = initial(icon_state) icon_state = initial(icon_state)
if(state_open) if(state_open)
icon_state += "-open" icon_state += "-open"
+1 -1
View File
@@ -113,7 +113,7 @@
id_tag = INCINERATOR_SYNDICATELAVA_AIRLOCK_SENSOR id_tag = INCINERATOR_SYNDICATELAVA_AIRLOCK_SENSOR
master_tag = INCINERATOR_SYNDICATELAVA_AIRLOCK_CONTROLLER master_tag = INCINERATOR_SYNDICATELAVA_AIRLOCK_CONTROLLER
/obj/machinery/airlock_sensor/update_icon() /obj/machinery/airlock_sensor/update_icon_state()
if(on) if(on)
if(alert) if(alert)
icon_state = "airlock_sensor_alert" icon_state = "airlock_sensor_alert"
+6 -6
View File
@@ -32,22 +32,22 @@ GLOBAL_LIST_EMPTY(announcement_systems)
radio = new /obj/item/radio/headset/silicon/ai(src) radio = new /obj/item/radio/headset/silicon/ai(src)
update_icon() update_icon()
/obj/machinery/announcement_system/update_icon() /obj/machinery/announcement_system/update_icon_state()
if(is_operational()) if(is_operational())
icon_state = (panel_open ? "AAS_On_Open" : "AAS_On") icon_state = (panel_open ? "AAS_On_Open" : "AAS_On")
else else
icon_state = (panel_open ? "AAS_Off_Open" : "AAS_Off") icon_state = (panel_open ? "AAS_Off_Open" : "AAS_Off")
/obj/machinery/announcement_system/update_overlays()
cut_overlays() . =..()
if(arrivalToggle) if(arrivalToggle)
add_overlay(greenlight) . += greenlight
if(newheadToggle) if(newheadToggle)
add_overlay(pinklight) . += pinklight
if(stat & BROKEN) if(stat & BROKEN)
add_overlay(errorlight) . += errorlight
/obj/machinery/announcement_system/Destroy() /obj/machinery/announcement_system/Destroy()
QDEL_NULL(radio) QDEL_NULL(radio)
+6 -6
View File
@@ -19,21 +19,21 @@
initial_icon_state = initial(icon_state) initial_icon_state = initial(icon_state)
return ..() return ..()
/obj/machinery/aug_manipulator/update_icon() /obj/machinery/aug_manipulator/update_icon_state()
cut_overlays()
if(stat & BROKEN) if(stat & BROKEN)
icon_state = "[initial_icon_state]-broken" icon_state = "[initial_icon_state]-broken"
return return
if(storedpart)
add_overlay("[initial_icon_state]-closed")
if(powered()) if(powered())
icon_state = initial_icon_state icon_state = initial_icon_state
else else
icon_state = "[initial_icon_state]-off" icon_state = "[initial_icon_state]-off"
/obj/machinery/aug_manipulator/update_overlays()
. = ..()
if(storedpart)
. += "[initial_icon_state]-closed"
/obj/machinery/aug_manipulator/Destroy() /obj/machinery/aug_manipulator/Destroy()
QDEL_NULL(storedpart) QDEL_NULL(storedpart)
return ..() return ..()
+11 -11
View File
@@ -54,16 +54,17 @@
efficiency = E efficiency = E
productivity = P productivity = P
/obj/machinery/bloodbankgen/update_icon() /obj/machinery/bloodbankgen/update_icon_state()
cut_overlays()
if(is_operational()) if(is_operational())
icon_state = "bloodbank-on" icon_state = "bloodbank-[is_operational() ? "on" : "off"]"
/obj/machinery/bloodbankgen/update_overlays()
. = ..()
if(panel_open) if(panel_open)
add_overlay("bloodbank-panel") . += "bloodbank-panel"
if(src.bag) if(bag)
add_overlay("bloodbag-input") . += "bloodbag-input"
if(bag.reagents.total_volume) if(bag.reagents.total_volume)
var/mutable_appearance/filling_overlay = mutable_appearance(icon, "input-reagent") var/mutable_appearance/filling_overlay = mutable_appearance(icon, "input-reagent")
@@ -85,10 +86,10 @@
filling_overlay.icon_state = "input-reagent100" filling_overlay.icon_state = "input-reagent100"
filling_overlay.color = list(mix_color_from_reagents(bag.reagents.reagent_list)) filling_overlay.color = list(mix_color_from_reagents(bag.reagents.reagent_list))
add_overlay(filling_overlay) . += filling_overlay
if(src.outbag) if(outbag)
add_overlay("bloodbag-output") . += "bloodbag-output"
if(outbag.reagents.total_volume) if(outbag.reagents.total_volume)
var/mutable_appearance/filling_overlay = mutable_appearance(icon, "output-reagent") var/mutable_appearance/filling_overlay = mutable_appearance(icon, "output-reagent")
@@ -110,8 +111,7 @@
filling_overlay.icon_state = "output-reagent100" filling_overlay.icon_state = "output-reagent100"
filling_overlay.color = list(mix_color_from_reagents(outbag.reagents.reagent_list)) filling_overlay.color = list(mix_color_from_reagents(outbag.reagents.reagent_list))
add_overlay(filling_overlay) . += filling_overlay
return
/obj/machinery/bloodbankgen/process() /obj/machinery/bloodbankgen/process()
if(!is_operational()) if(!is_operational())
+11 -12
View File
@@ -10,18 +10,19 @@
circuit = /obj/item/circuitboard/machine/cell_charger circuit = /obj/item/circuitboard/machine/cell_charger
pass_flags = PASSTABLE pass_flags = PASSTABLE
var/obj/item/stock_parts/cell/charging = null var/obj/item/stock_parts/cell/charging = null
var/chargelevel = -1
var/charge_rate = 500 var/charge_rate = 500
/obj/machinery/cell_charger/update_icon() /obj/machinery/cell_charger/update_overlays()
cut_overlays() . += ..()
if(charging)
add_overlay(image(charging.icon, charging.icon_state)) if(!charging)
add_overlay("ccharger-on") return
if(!(stat & (BROKEN|NOPOWER)))
var/newlevel = round(charging.percent() * 4 / 100) . += image(charging.icon, charging.icon_state)
chargelevel = newlevel . += "ccharger-on"
add_overlay("ccharger-o[newlevel]") if(!(stat & (BROKEN|NOPOWER)))
var/newlevel = round(charging.percent() * 4 / 100)
. += "ccharger-o[newlevel]"
/obj/machinery/cell_charger/examine(mob/user) /obj/machinery/cell_charger/examine(mob/user)
. = ..() . = ..()
@@ -54,7 +55,6 @@
charging = W charging = W
user.visible_message("[user] inserts a cell into [src].", "<span class='notice'>You insert a cell into [src].</span>") user.visible_message("[user] inserts a cell into [src].", "<span class='notice'>You insert a cell into [src].</span>")
chargelevel = -1
update_icon() update_icon()
else else
if(!charging && default_deconstruction_screwdriver(user, icon_state, icon_state, W)) if(!charging && default_deconstruction_screwdriver(user, icon_state, icon_state, W))
@@ -77,7 +77,6 @@
/obj/machinery/cell_charger/proc/removecell() /obj/machinery/cell_charger/proc/removecell()
charging.update_icon() charging.update_icon()
charging = null charging = null
chargelevel = -1
update_icon() update_icon()
/obj/machinery/cell_charger/attack_hand(mob/user) /obj/machinery/cell_charger/attack_hand(mob/user)
+18 -18
View File
@@ -477,24 +477,30 @@
flesh_number = unattached_flesh.len flesh_number = unattached_flesh.len
/obj/machinery/clonepod/update_icon() /obj/machinery/clonepod/update_icon_state()
cut_overlays()
if(mess) if(mess)
icon_state = "pod_g" icon_state = "pod_g"
else if(occupant)
icon_state = "pod_1"
else
icon_state = "pod_0"
if(panel_open)
icon_state = "pod_0_maintenance"
/obj/machinery/clonepod/update_overlays()
. = ..()
if(mess)
var/image/gib1 = image(CRYOMOBS, "gibup") var/image/gib1 = image(CRYOMOBS, "gibup")
var/image/gib2 = image(CRYOMOBS, "gibdown") var/image/gib2 = image(CRYOMOBS, "gibdown")
gib1.pixel_y = 27 + round(sin(world.time) * 3) gib1.pixel_y = 27 + round(sin(world.time) * 3)
gib1.pixel_x = round(sin(world.time * 3)) gib1.pixel_x = round(sin(world.time * 3))
gib2.pixel_y = 27 + round(cos(world.time) * 3) gib2.pixel_y = 27 + round(cos(world.time) * 3)
gib2.pixel_x = round(cos(world.time * 3)) gib2.pixel_x = round(cos(world.time * 3))
add_overlay(gib2) . += gib2
add_overlay(gib1) . += gib1
add_overlay("cover-on") . += "cover-on"
else if(occupant) else if(occupant)
icon_state = "pod_1"
var/image/occupant_overlay var/image/occupant_overlay
var/completion = (flesh_number - unattached_flesh.len) / flesh_number var/completion = (flesh_number - unattached_flesh.len) / flesh_number
@@ -513,15 +519,9 @@
occupant_overlay.pixel_y = 27 + round(sin(world.time) * 3) occupant_overlay.pixel_y = 27 + round(sin(world.time) * 3)
occupant_overlay.pixel_x = round(sin(world.time * 3)) occupant_overlay.pixel_x = round(sin(world.time * 3))
add_overlay(occupant_overlay) . += occupant_overlay
add_overlay("cover-on") . += "cover-on"
else . += "panel"
icon_state = "pod_0"
if(panel_open)
icon_state = "pod_0_maintenance"
add_overlay("panel")
/* /*
* Manual -- A big ol' manual. * Manual -- A big ol' manual.
+4 -4
View File
@@ -48,13 +48,13 @@
icon_state = initial(icon_state) icon_state = initial(icon_state)
update_icon() update_icon()
/obj/machinery/computer/update_icon() /obj/machinery/computer/update_overlays()
cut_overlays() . = ..()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
if(stat & NOPOWER) if(stat & NOPOWER)
add_overlay("[icon_keyboard]_off") . += "[icon_keyboard]_off"
return return
add_overlay(icon_keyboard) . += icon_keyboard
// This whole block lets screens ignore lighting and be visible even in the darkest room // This whole block lets screens ignore lighting and be visible even in the darkest room
// We can't do this for many things that emit light unfortunately because it layers over things that would be on top of it // We can't do this for many things that emit light unfortunately because it layers over things that would be on top of it
+11 -12
View File
@@ -103,21 +103,20 @@
add_fingerprint(usr) add_fingerprint(usr)
updateUsrDialog() updateUsrDialog()
/obj/machinery/computer/aifixer/update_icon() /obj/machinery/computer/aifixer/update_overlays()
..() . = ..()
if(stat & (NOPOWER|BROKEN)) if(stat & (NOPOWER|BROKEN))
return return
if(active)
. += "ai-fixer-on"
if (occupier)
switch (occupier.stat)
if (0)
. += "ai-fixer-full"
if (2)
. += "ai-fixer-404"
else else
if(active) . += "ai-fixer-empty"
add_overlay("ai-fixer-on")
if (occupier)
switch (occupier.stat)
if (0)
add_overlay("ai-fixer-full")
if (2)
add_overlay("ai-fixer-404")
else
add_overlay("ai-fixer-empty")
/obj/machinery/computer/aifixer/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card) /obj/machinery/computer/aifixer/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card)
if(!..()) if(!..())
+5 -8
View File
@@ -78,23 +78,20 @@
update_icon() update_icon()
return return
/obj/machinery/computer/atmos_alert/update_icon() /obj/machinery/computer/atmos_alert/update_overlays()
..() . = ..()
cut_overlays()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
var/overlay_state = icon_screen var/overlay_state = icon_screen
if(stat & (NOPOWER|BROKEN)) if(stat & (NOPOWER|BROKEN))
add_overlay("[icon_keyboard]_off") . |= "[icon_keyboard]_off"
return return
add_overlay(icon_keyboard) . |= icon_keyboard
if(priority_alarms.len) if(priority_alarms.len)
overlay_state = "alert:2" overlay_state = "alert:2"
add_overlay("alert:2")
else if(minor_alarms.len) else if(minor_alarms.len)
overlay_state = "alert:1" overlay_state = "alert:1"
add_overlay("alert:1")
else else
overlay_state = "alert:0" overlay_state = "alert:0"
add_overlay("alert:0") . |= overlay_state
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, layer, plane, dir) SSvis_overlays.add_vis_overlay(src, icon, overlay_state, layer, plane, dir)
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir, alpha=128) SSvis_overlays.add_vis_overlay(src, icon, overlay_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir, alpha=128)
@@ -41,7 +41,7 @@
name = "incinerator chamber gas sensor" name = "incinerator chamber gas sensor"
id_tag = ATMOS_GAS_MONITOR_SENSOR_INCINERATOR id_tag = ATMOS_GAS_MONITOR_SENSOR_INCINERATOR
/obj/machinery/air_sensor/update_icon() /obj/machinery/air_sensor/update_icon_state()
icon_state = "gsensor[on]" icon_state = "gsensor[on]"
/obj/machinery/air_sensor/process_atmos() /obj/machinery/air_sensor/process_atmos()
+1 -2
View File
@@ -175,11 +175,10 @@
clockwork = TRUE //it'd look very weird clockwork = TRUE //it'd look very weird
light_power = 0 light_power = 0
/obj/machinery/computer/security/telescreen/update_icon() /obj/machinery/computer/security/telescreen/update_icon_state()
icon_state = initial(icon_state) icon_state = initial(icon_state)
if(stat & BROKEN) if(stat & BROKEN)
icon_state += "b" icon_state += "b"
return
/obj/machinery/computer/security/telescreen/entertainment /obj/machinery/computer/security/telescreen/entertainment
name = "entertainment monitor" name = "entertainment monitor"
+8 -10
View File
@@ -75,25 +75,23 @@
L -= I L -= I
return !cleared return !cleared
/obj/machinery/computer/station_alert/update_icon() /obj/machinery/computer/station_alert/update_overlays()
..() . = ..()
cut_overlays()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
var/overlay_state = icon_screen var/overlay_state = icon_screen
if(stat & (NOPOWER|BROKEN)) if(stat & (NOPOWER|BROKEN))
add_overlay("[icon_keyboard]_off") . |= "[icon_keyboard]_off"
return return
add_overlay(icon_keyboard) . |= icon_keyboard
var/active_alarms = FALSE var/active_alarms = FALSE
for(var/cat in alarms) for(var/cat in alarms)
var/list/L = alarms[cat] if(length(alarms[cat]))
if(L.len)
active_alarms = TRUE active_alarms = TRUE
break
if(active_alarms) if(active_alarms)
overlay_state = "alert:2" overlay_state = "alert:2"
add_overlay("alert:2")
else else
overlay_state = "alert:0" overlay_state = "alert:0"
add_overlay("alert:0") . |= overlay_state
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, layer, plane, dir) SSvis_overlays.add_vis_overlay(src, icon, overlay_state, layer, plane, dir)
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir, alpha=128) SSvis_overlays.add_vis_overlay(src, icon, overlay_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir, alpha=128)
@@ -44,8 +44,8 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
else else
to_chat(user, "<span class='notice'>[I] doesn't appear to be an uplink...</span>") to_chat(user, "<span class='notice'>[I] doesn't appear to be an uplink...</span>")
/obj/machinery/computer/telecrystals/uplinker/update_icon() /obj/machinery/computer/telecrystals/uplinker/update_overlays()
..() . = ..()
if(uplinkholder) if(uplinkholder)
add_overlay("[initial(icon_state)]-closed") add_overlay("[initial(icon_state)]-closed")
+1 -1
View File
@@ -45,7 +45,7 @@
return return
return ..() return ..()
/obj/machinery/jukebox/update_icon() /obj/machinery/jukebox/update_icon_state()
if(active) if(active)
icon_state = "[initial(icon_state)]-active" icon_state = "[initial(icon_state)]-active"
else else
+1 -1
View File
@@ -34,7 +34,7 @@
if(scan_level >= 3) if(scan_level >= 3)
. += "<span class='notice'>Scanner has been upgraded to support autoprocessing.<span>" . += "<span class='notice'>Scanner has been upgraded to support autoprocessing.<span>"
/obj/machinery/dna_scannernew/update_icon() /obj/machinery/dna_scannernew/update_icon_state()
//no power or maintenance //no power or maintenance
if(stat & (NOPOWER|BROKEN)) if(stat & (NOPOWER|BROKEN))
+1 -1
View File
@@ -428,7 +428,7 @@
else else
return FALSE return FALSE
/obj/machinery/door/airlock/update_icon(state=0, override=0) /obj/machinery/door/airlock/update_icon_state(state=0, override=0)
if(operating && !override) if(operating && !override)
return return
switch(state) switch(state)
+1 -1
View File
@@ -230,7 +230,7 @@
/obj/machinery/door/proc/unelectrify() /obj/machinery/door/proc/unelectrify()
secondsElectrified = 0 secondsElectrified = 0
/obj/machinery/door/update_icon() /obj/machinery/door/update_icon_state()
if(density) if(density)
icon_state = "door1" icon_state = "door1"
else else
+11 -8
View File
@@ -171,16 +171,20 @@
if("closing") if("closing")
flick("door_closing", src) flick("door_closing", src)
/obj/machinery/door/firedoor/update_icon() /obj/machinery/door/firedoor/update_icon_state()
cut_overlays()
if(density) if(density)
icon_state = "door_closed" icon_state = "door_closed"
if(welded)
add_overlay("welded")
else else
icon_state = "door_open" icon_state = "door_open"
if(welded)
add_overlay("welded_open") /obj/machinery/door/firedoor/update_overlays()
. = ..()
if(!welded)
return
if(density)
. += "welded"
else
. += "welded_open"
/obj/machinery/door/firedoor/open() /obj/machinery/door/firedoor/open()
. = ..() . = ..()
@@ -283,8 +287,7 @@
if(CONSTRUCTION_NOCIRCUIT) if(CONSTRUCTION_NOCIRCUIT)
. += "<span class='notice'>There are no <i>firelock electronics</i> in the frame. The frame could be <b>cut</b> apart.</span>" . += "<span class='notice'>There are no <i>firelock electronics</i> in the frame. The frame could be <b>cut</b> apart.</span>"
/obj/structure/firelock_frame/update_icon() /obj/structure/firelock_frame/update_icon_state()
..()
icon_state = "frame[constructionStep]" icon_state = "frame[constructionStep]"
/obj/structure/firelock_frame/attackby(obj/item/C, mob/user) /obj/structure/firelock_frame/attackby(obj/item/C, mob/user)
+1 -1
View File
@@ -42,7 +42,7 @@
else else
do_animate("deny") do_animate("deny")
/obj/machinery/door/password/update_icon() /obj/machinery/door/password/update_icon_state()
if(density) if(density)
icon_state = "closed" icon_state = "closed"
else else
+1 -1
View File
@@ -77,7 +77,7 @@
flick("closing", src) flick("closing", src)
playsound(src, 'sound/machines/blastdoor.ogg', 30, 1) playsound(src, 'sound/machines/blastdoor.ogg', 30, 1)
/obj/machinery/door/poddoor/update_icon() /obj/machinery/door/poddoor/update_icon_state()
if(density) if(density)
icon_state = "closed" icon_state = "closed"
else else
+1 -1
View File
@@ -48,7 +48,7 @@
electronics = null electronics = null
return ..() return ..()
/obj/machinery/door/window/update_icon() /obj/machinery/door/window/update_icon_state()
if(density) if(density)
icon_state = base_state icon_state = base_state
else else
+1 -1
View File
@@ -199,7 +199,7 @@
if(istype(a, dispense_type)) if(istype(a, dispense_type))
.++ .++
/obj/machinery/droneDispenser/update_icon() /obj/machinery/droneDispenser/update_icon_state()
if(stat & (BROKEN|NOPOWER)) if(stat & (BROKEN|NOPOWER))
icon_state = icon_off icon_state = icon_off
else if(mode == DRONE_RECHARGING) else if(mode == DRONE_RECHARGING)
@@ -84,7 +84,7 @@
busy = FALSE busy = FALSE
update_icon() update_icon()
/obj/machinery/doorButtons/access_button/update_icon() /obj/machinery/doorButtons/access_button/update_icon_state()
if(stat & NOPOWER) if(stat & NOPOWER)
icon_state = "access_button_off" icon_state = "access_button_off"
else else
@@ -249,7 +249,7 @@
else if(A.id_tag == idExterior) else if(A.id_tag == idExterior)
exteriorAirlock = A exteriorAirlock = A
/obj/machinery/doorButtons/airlock_controller/update_icon() /obj/machinery/doorButtons/airlock_controller/update_icon_state()
if(stat & NOPOWER) if(stat & NOPOWER)
icon_state = "access_control_off" icon_state = "access_control_off"
return return
@@ -255,7 +255,7 @@
new_prog.master = src new_prog.master = src
program = new_prog program = new_prog
/obj/machinery/embedded_controller/radio/airlock_controller/update_icon() /obj/machinery/embedded_controller/radio/airlock_controller/update_icon_state()
if(on && program) if(on && program)
if(program.memory["processing"]) if(program.memory["processing"])
icon_state = "airlock_control_process" icon_state = "airlock_control_process"
@@ -33,8 +33,6 @@
popup.set_content(return_text()) popup.set_content(return_text())
popup.open() popup.open()
/obj/machinery/embedded_controller/update_icon()
/obj/machinery/embedded_controller/proc/return_text() /obj/machinery/embedded_controller/proc/return_text()
/obj/machinery/embedded_controller/proc/post_signal(datum/signal/signal, comm_line) /obj/machinery/embedded_controller/proc/post_signal(datum/signal/signal, comm_line)
@@ -54,7 +54,7 @@
new_prog.master = src new_prog.master = src
program = new_prog program = new_prog
/obj/machinery/embedded_controller/radio/simple_vent_controller/update_icon() /obj/machinery/embedded_controller/radio/simple_vent_controller/update_icon_state()
if(on && program) if(on && program)
icon_state = "airlock_control_standby" icon_state = "airlock_control_standby"
else else
+11 -10
View File
@@ -55,10 +55,7 @@
..() ..()
update_icon() update_icon()
/obj/machinery/firealarm/update_icon() /obj/machinery/firealarm/update_icon_state()
cut_overlays()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
if(panel_open) if(panel_open)
icon_state = "fire_b[buildstage]" icon_state = "fire_b[buildstage]"
return return
@@ -72,26 +69,30 @@
if(stat & NOPOWER) if(stat & NOPOWER)
return return
add_overlay("fire_overlay") /obj/machinery/firealarm/update_overlays()
. = ..()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
. += "fire_overlay"
if(is_station_level(z)) if(is_station_level(z))
add_overlay("fire_[GLOB.security_level]") . += "fire_[GLOB.security_level]"
SSvis_overlays.add_vis_overlay(src, icon, "fire_[GLOB.security_level]", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir) SSvis_overlays.add_vis_overlay(src, icon, "fire_[GLOB.security_level]", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
else else
add_overlay("fire_[SEC_LEVEL_GREEN]") . += "fire_[SEC_LEVEL_GREEN]"
SSvis_overlays.add_vis_overlay(src, icon, "fire_[SEC_LEVEL_GREEN]", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir) SSvis_overlays.add_vis_overlay(src, icon, "fire_[SEC_LEVEL_GREEN]", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
var/area/A = src.loc var/area/A = src.loc
A = A.loc A = A.loc
if(!detecting || !A.fire) if(!detecting || !A.fire)
add_overlay("fire_off") . += "fire_off"
SSvis_overlays.add_vis_overlay(src, icon, "fire_off", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir) SSvis_overlays.add_vis_overlay(src, icon, "fire_off", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
else if(obj_flags & EMAGGED) else if(obj_flags & EMAGGED)
add_overlay("fire_emagged") . += "fire_emagged"
SSvis_overlays.add_vis_overlay(src, icon, "fire_emagged", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir) SSvis_overlays.add_vis_overlay(src, icon, "fire_emagged", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
else else
add_overlay("fire_on") . += "fire_on"
SSvis_overlays.add_vis_overlay(src, icon, "fire_on", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir) SSvis_overlays.add_vis_overlay(src, icon, "fire_on", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
/obj/machinery/firealarm/emp_act(severity) /obj/machinery/firealarm/emp_act(severity)
+1 -1
View File
@@ -68,7 +68,7 @@ The console is located at computer/gulag_teleporter.dm
return ..() return ..()
/obj/machinery/gulag_teleporter/update_icon() /obj/machinery/gulag_teleporter/update_icon_state()
icon_state = initial(icon_state) + (state_open ? "_open" : "") icon_state = initial(icon_state) + (state_open ? "_open" : "")
//no power or maintenance //no power or maintenance
if(stat & (NOPOWER|BROKEN)) if(stat & (NOPOWER|BROKEN))
+9 -5
View File
@@ -11,6 +11,7 @@
light_color = LIGHT_COLOR_BLUE light_color = LIGHT_COLOR_BLUE
var/interval = 20 var/interval = 20
var/harvesting = FALSE var/harvesting = FALSE
var/warming_up = FALSE
var/list/operation_order = list() //Order of wich we harvest limbs. var/list/operation_order = list() //Order of wich we harvest limbs.
var/allow_clothing = FALSE var/allow_clothing = FALSE
var/allow_living = FALSE var/allow_living = FALSE
@@ -27,12 +28,11 @@
max_time -= L.rating max_time -= L.rating
interval = max(max_time,1) interval = max(max_time,1)
/obj/machinery/harvester/update_icon(warming_up) /obj/machinery/harvester/update_icon_state()
if(warming_up)
icon_state = initial(icon_state)+"-charging"
return
if(state_open) if(state_open)
icon_state = initial(icon_state)+"-open" icon_state = initial(icon_state)+"-open"
else if(warming_up)
icon_state = initial(icon_state)+"-charging"
else if(harvesting) else if(harvesting)
icon_state = initial(icon_state)+"-active" icon_state = initial(icon_state)+"-active"
else else
@@ -43,6 +43,7 @@
return return
. = ..() . = ..()
harvesting = FALSE harvesting = FALSE
warming_up = FALSE
/obj/machinery/harvester/attack_hand(mob/user) /obj/machinery/harvester/attack_hand(mob/user)
if(state_open) if(state_open)
@@ -86,13 +87,15 @@
return return
var/mob/living/carbon/C = occupant var/mob/living/carbon/C = occupant
operation_order = reverseList(C.bodyparts) //Chest and head are first in bodyparts, so we invert it to make them suffer more operation_order = reverseList(C.bodyparts) //Chest and head are first in bodyparts, so we invert it to make them suffer more
warming_up = TRUE
harvesting = TRUE harvesting = TRUE
visible_message("<span class='notice'>The [name] begins warming up!</span>") visible_message("<span class='notice'>The [name] begins warming up!</span>")
say("Initializing harvest protocol.") say("Initializing harvest protocol.")
update_icon(TRUE) update_icon()
addtimer(CALLBACK(src, .proc/harvest), interval) addtimer(CALLBACK(src, .proc/harvest), interval)
/obj/machinery/harvester/proc/harvest() /obj/machinery/harvester/proc/harvest()
warming_up = FALSE
update_icon() update_icon()
if(!harvesting || state_open || !powered(EQUIP) || !occupant || !iscarbon(occupant)) if(!harvesting || state_open || !powered(EQUIP) || !occupant || !iscarbon(occupant))
return return
@@ -127,6 +130,7 @@
addtimer(CALLBACK(src, .proc/harvest), interval) addtimer(CALLBACK(src, .proc/harvest), interval)
/obj/machinery/harvester/proc/end_harvesting() /obj/machinery/harvester/proc/end_harvesting()
warming_up = FALSE
harvesting = FALSE harvesting = FALSE
open_machine() open_machine()
say("Subject has been successfully harvested.") say("Subject has been successfully harvested.")
+1 -1
View File
@@ -441,7 +441,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
set_light(0) set_light(0)
update_icon() update_icon()
/obj/machinery/holopad/update_icon() /obj/machinery/holopad/update_icon_state()
var/total_users = LAZYLEN(masters) + LAZYLEN(holo_calls) var/total_users = LAZYLEN(masters) + LAZYLEN(holo_calls)
if(ringing) if(ringing)
icon_state = "holopad_ringing" icon_state = "holopad_ringing"
+8 -7
View File
@@ -24,7 +24,7 @@
QDEL_NULL(beaker) QDEL_NULL(beaker)
return ..() return ..()
/obj/machinery/iv_drip/update_icon() /obj/machinery/iv_drip/update_icon_state()
if(attached) if(attached)
if(mode) if(mode)
icon_state = "injecting" icon_state = "injecting"
@@ -36,13 +36,14 @@
else else
icon_state = "donateidle" icon_state = "donateidle"
cut_overlays() /obj/machinery/iv_drip/update_overlays()
. = ..()
if(beaker) if(beaker)
if(attached) if(attached)
add_overlay("beakeractive") . += "beakeractive"
else else
add_overlay("beakeridle") . += "beakeridle"
if(beaker.reagents.total_volume) if(beaker.reagents.total_volume)
var/mutable_appearance/filling_overlay = mutable_appearance('icons/obj/iv_drip.dmi', "reagent") var/mutable_appearance/filling_overlay = mutable_appearance('icons/obj/iv_drip.dmi', "reagent")
@@ -64,7 +65,7 @@
filling_overlay.icon_state = "reagent100" filling_overlay.icon_state = "reagent100"
filling_overlay.color = mix_color_from_reagents(beaker.reagents.reagent_list) filling_overlay.color = mix_color_from_reagents(beaker.reagents.reagent_list)
add_overlay(filling_overlay) . += filling_overlay
/obj/machinery/iv_drip/MouseDrop(mob/living/target) /obj/machinery/iv_drip/MouseDrop(mob/living/target)
. = ..() . = ..()
@@ -227,9 +228,9 @@
desc = "An IV drip with an advanced infusion pump that can both drain blood into and inject liquids from attached containers. Blood packs are processed at an accelerated rate. This one is telescopic, and can be picked up and put down." desc = "An IV drip with an advanced infusion pump that can both drain blood into and inject liquids from attached containers. Blood packs are processed at an accelerated rate. This one is telescopic, and can be picked up and put down."
icon_state = "iv_drip" icon_state = "iv_drip"
/obj/machinery/iv_drip/telescopic/update_icon() /obj/machinery/iv_drip/telescopic/update_icon_state()
..() ..()
icon_state = icon_state + "_tele" icon_state += "_tele"
/obj/machinery/iv_drip/telescopic/AltClick(mob/user) /obj/machinery/iv_drip/telescopic/AltClick(mob/user)
if (attached || beaker || !user.canUseTopic(src, BE_CLOSE)) if (attached || beaker || !user.canUseTopic(src, BE_CLOSE))
+1 -1
View File
@@ -23,7 +23,7 @@
on = area.lightswitch on = area.lightswitch
update_icon() update_icon()
/obj/machinery/light_switch/update_icon() /obj/machinery/light_switch/update_icon_state()
if(stat & NOPOWER) if(stat & NOPOWER)
icon_state = "light-p" icon_state = "light-p"
else else
+1 -1
View File
@@ -49,7 +49,7 @@
update_icon() update_icon()
// update the icon_state // update the icon_state
/obj/machinery/magnetic_module/update_icon() /obj/machinery/magnetic_module/update_icon_state()
var/state="floor_magnet" var/state="floor_magnet"
var/onstate="" var/onstate=""
if(!on) if(!on)
+1 -1
View File
@@ -75,7 +75,7 @@
update_icon() update_icon()
// update the icon_state // update the icon_state
/obj/machinery/navbeacon/update_icon() /obj/machinery/navbeacon/update_icon_state()
var/state="navbeacon[open]" var/state="navbeacon[open]"
if(invisibility) if(invisibility)
@@ -99,8 +99,7 @@
if(!has_cover) if(!has_cover)
INVOKE_ASYNC(src, .proc/popUp) INVOKE_ASYNC(src, .proc/popUp)
/obj/machinery/porta_turret/update_icon() /obj/machinery/porta_turret/update_icon_state()
cut_overlays()
if(!anchored) if(!anchored)
icon_state = "turretCover" icon_state = "turretCover"
return return
@@ -970,8 +969,7 @@
..() ..()
update_icon() update_icon()
/obj/machinery/turretid/update_icon() /obj/machinery/turretid/update_icon_state()
..()
if(stat & NOPOWER) if(stat & NOPOWER)
icon_state = "control_off" icon_state = "control_off"
else if (enabled) else if (enabled)
+14 -16
View File
@@ -10,6 +10,7 @@
pass_flags = PASSTABLE pass_flags = PASSTABLE
var/obj/item/charging = null var/obj/item/charging = null
var/recharge_coeff = 1 var/recharge_coeff = 1
var/using_power = FALSE //Did we put power into "charging" last process()?
var/static/list/allowed_devices = typecacheof(list( var/static/list/allowed_devices = typecacheof(list(
/obj/item/gun/energy, /obj/item/gun/energy,
@@ -45,9 +46,11 @@
if (new_charging) if (new_charging)
START_PROCESSING(SSmachines, src) START_PROCESSING(SSmachines, src)
use_power = ACTIVE_POWER_USE use_power = ACTIVE_POWER_USE
update_icon(scan = TRUE) using_power = TRUE
update_icon()
else else
use_power = IDLE_POWER_USE use_power = IDLE_POWER_USE
using_power = FALSE
update_icon() update_icon()
/obj/machinery/recharger/attackby(obj/item/G, mob/user, params) /obj/machinery/recharger/attackby(obj/item/G, mob/user, params)
@@ -120,23 +123,23 @@
if(stat & (NOPOWER|BROKEN) || !anchored) if(stat & (NOPOWER|BROKEN) || !anchored)
return PROCESS_KILL return PROCESS_KILL
var/using_power = 0 using_power = FALSE
if(charging) if(charging)
var/obj/item/stock_parts/cell/C = charging.get_cell() var/obj/item/stock_parts/cell/C = charging.get_cell()
if(C) if(C)
if(C.charge < C.maxcharge) if(C.charge < C.maxcharge)
C.give(C.chargerate * recharge_coeff) C.give(C.chargerate * recharge_coeff)
use_power(250 * recharge_coeff) use_power(250 * recharge_coeff)
using_power = 1 using_power = TRUE
update_icon(using_power) update_icon()
if(istype(charging, /obj/item/ammo_box/magazine/recharge)) if(istype(charging, /obj/item/ammo_box/magazine/recharge))
var/obj/item/ammo_box/magazine/recharge/R = charging var/obj/item/ammo_box/magazine/recharge/R = charging
if(R.stored_ammo.len < R.max_ammo) if(R.stored_ammo.len < R.max_ammo)
R.stored_ammo += new R.ammo_type(R) R.stored_ammo += new R.ammo_type(R)
use_power(200 * recharge_coeff) use_power(200 * recharge_coeff)
using_power = 1 using_power = TRUE
update_icon(using_power) update_icon()
return return
else else
return PROCESS_KILL return PROCESS_KILL
@@ -161,20 +164,15 @@
B.cell.charge = 0 B.cell.charge = 0
/obj/machinery/recharger/update_icon(using_power = 0, scan) //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier. /obj/machinery/recharger/update_icon_state()
if(stat & (NOPOWER|BROKEN) || !anchored) if(stat & (NOPOWER|BROKEN) || !anchored)
icon_state = "rechargeroff" icon_state = "rechargeroff"
return else if(panel_open)
if(scan)
icon_state = "rechargeroff"
return
if(panel_open)
icon_state = "rechargeropen" icon_state = "rechargeropen"
return else if(charging)
if(charging)
if(using_power) if(using_power)
icon_state = "recharger1" icon_state = "recharger1"
else else
icon_state = "recharger2" icon_state = "recharger2"
return else
icon_state = "recharger0" icon_state = "recharger0"
+1 -1
View File
@@ -112,7 +112,7 @@
use_power = ACTIVE_POWER_USE use_power = ACTIVE_POWER_USE
add_fingerprint(occupant) add_fingerprint(occupant)
/obj/machinery/recharge_station/update_icon() /obj/machinery/recharge_station/update_icon_state()
if(is_operational()) if(is_operational())
if(state_open) if(state_open)
icon_state = "borgcharger0" icon_state = "borgcharger0"
+1 -2
View File
@@ -77,8 +77,7 @@
to_chat(user, "<span class='notice'>You use the cryptographic sequencer on [src].</span>") to_chat(user, "<span class='notice'>You use the cryptographic sequencer on [src].</span>")
return TRUE return TRUE
/obj/machinery/recycler/update_icon() /obj/machinery/recycler/update_icon_state()
..()
var/is_powered = !(stat & (BROKEN|NOPOWER)) var/is_powered = !(stat & (BROKEN|NOPOWER))
if(safety_mode) if(safety_mode)
is_powered = FALSE is_powered = FALSE
+1 -1
View File
@@ -60,7 +60,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
..() ..()
update_icon() update_icon()
/obj/machinery/requests_console/update_icon() /obj/machinery/requests_console/update_icon_state()
if(stat & NOPOWER) if(stat & NOPOWER)
set_light(0) set_light(0)
else else
+1 -1
View File
@@ -208,7 +208,7 @@
to_chat(user, "<span class='warning'>You short out the access controller.</span>") to_chat(user, "<span class='warning'>You short out the access controller.</span>")
return TRUE return TRUE
/obj/machinery/shieldgen/update_icon() /obj/machinery/shieldgen/update_icon_state()
if(active) if(active)
icon_state = (stat & BROKEN) ? "shieldonbr":"shieldon" icon_state = (stat & BROKEN) ? "shieldonbr":"shieldon"
else else
+1 -1
View File
@@ -56,7 +56,7 @@
money++ //SPESSH MAJICKS money++ //SPESSH MAJICKS
/obj/machinery/computer/slot_machine/update_icon() /obj/machinery/computer/slot_machine/update_icon_state()
if(stat & NOPOWER) if(stat & NOPOWER)
icon_state = "slots0" icon_state = "slots0"
+5 -4
View File
@@ -53,17 +53,18 @@
else else
. += "There is no power cell installed." . += "There is no power cell installed."
if(in_range(user, src) || isobserver(user)) if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Temperature range at <b>[settableTemperatureRange]°C</b>.<br>Heating power at <b>[heatingPower*0.001]kJ</b>.<br>Power consumption at <b>[(efficiency*-0.0025)+150]%</b>.<span>" //100%, 75%, 50%, 25% . += "<span class='notice'>The status display reads: Temperature range at <b>[settableTemperatureRange]°C</b>.<br>Heating power at <b>[heatingPower*0.001]kJ</b>.<br>Power consumption at <b>[(efficiency*-0.0025)+150]%</b>.<span>" //100%, 75%, 50%, 25%
/obj/machinery/space_heater/update_icon() /obj/machinery/space_heater/update_icon_state()
if(on) if(on)
icon_state = "sheater-[mode]" icon_state = "sheater-[mode]"
else else
icon_state = "sheater-off" icon_state = "sheater-off"
cut_overlays() /obj/machinery/space_heater/update_overlays()
. = ..()
if(panel_open) if(panel_open)
add_overlay("sheater-open") . += "sheater-open"
/obj/machinery/space_heater/process() /obj/machinery/space_heater/process()
if(!on || !is_operational()) if(!on || !is_operational())
+11 -12
View File
@@ -134,29 +134,28 @@
QDEL_NULL(storage) QDEL_NULL(storage)
return ..() return ..()
/obj/machinery/suit_storage_unit/update_icon() /obj/machinery/suit_storage_unit/update_overlays()
cut_overlays() . = ..()
if(uv) if(uv)
if(uv_super) if(uv_super)
add_overlay("super") . += "super"
else if(occupant) else if(occupant)
add_overlay("uvhuman") . += "uvhuman"
else else
add_overlay("uv") . += "uv"
else if(state_open) else if(state_open)
if(stat & BROKEN) if(stat & BROKEN)
add_overlay("broken") . += "broken"
else else
add_overlay("open") . += "open"
if(suit) if(suit)
add_overlay("suit") . += "suit"
if(helmet) if(helmet)
add_overlay("helm") . += "helm"
if(storage) if(storage)
add_overlay("storage") . += "storage"
else if(occupant) else if(occupant)
add_overlay("human") . += "human"
/obj/machinery/suit_storage_unit/power_change() /obj/machinery/suit_storage_unit/power_change()
..() ..()
+1 -1
View File
@@ -102,7 +102,7 @@
. = ..() . = ..()
. += "A digital display on it reads \"[seconds_remaining()]\"." . += "A digital display on it reads \"[seconds_remaining()]\"."
/obj/machinery/syndicatebomb/update_icon() /obj/machinery/syndicatebomb/update_icon_state()
icon_state = "[initial(icon_state)][active ? "-active" : "-inactive"][open_panel ? "-wires" : ""]" icon_state = "[initial(icon_state)][active ? "-active" : "-inactive"][open_panel ? "-wires" : ""]"
/obj/machinery/syndicatebomb/proc/seconds_remaining() /obj/machinery/syndicatebomb/proc/seconds_remaining()
@@ -74,7 +74,7 @@
if(!relay_information(signal, /obj/machinery/telecomms/hub)) if(!relay_information(signal, /obj/machinery/telecomms/hub))
relay_information(signal, /obj/machinery/telecomms/broadcaster) relay_information(signal, /obj/machinery/telecomms/broadcaster)
/obj/machinery/telecomms/message_server/update_icon() /obj/machinery/telecomms/message_server/update_icon_state()
if((stat & (BROKEN|NOPOWER))) if((stat & (BROKEN|NOPOWER)))
icon_state = "server-nopower" icon_state = "server-nopower"
else if (!toggled) else if (!toggled)
@@ -109,7 +109,7 @@ GLOBAL_LIST_EMPTY(telecomms_list)
links |= T links |= T
T.links |= src T.links |= src
/obj/machinery/telecomms/update_icon() /obj/machinery/telecomms/update_icon_state()
if(on) if(on)
if(panel_open) if(panel_open)
icon_state = "[initial(icon_state)]_o" icon_state = "[initial(icon_state)]_o"
+2 -2
View File
@@ -85,7 +85,7 @@
calibrated = FALSE calibrated = FALSE
return return
/obj/machinery/teleport/hub/update_icon() /obj/machinery/teleport/hub/update_icon_state()
if(panel_open) if(panel_open)
icon_state = "tele-o" icon_state = "tele-o"
else if(is_ready()) else if(is_ready())
@@ -218,7 +218,7 @@
if(teleporter_hub) if(teleporter_hub)
teleporter_hub.update_icon() teleporter_hub.update_icon()
/obj/machinery/teleport/station/update_icon() /obj/machinery/teleport/station/update_icon_state()
if(panel_open) if(panel_open)
icon_state = "controller-o" icon_state = "controller-o"
else if(stat & (BROKEN|NOPOWER)) else if(stat & (BROKEN|NOPOWER))
+1 -2
View File
@@ -38,8 +38,7 @@
..() ..()
update_icon() update_icon()
/obj/machinery/transformer/update_icon() /obj/machinery/transformer/update_icon_state()
..()
if(stat & (BROKEN|NOPOWER) || cooldown == 1) if(stat & (BROKEN|NOPOWER) || cooldown == 1)
icon_state = "separator-AO0" icon_state = "separator-AO0"
else else
+5 -3
View File
@@ -199,8 +199,7 @@
/obj/machinery/washing_machine/update_icon() /obj/machinery/washing_machine/update_icon_state()
cut_overlays()
if(busy) if(busy)
icon_state = "wm_running_[bloody_mess]" icon_state = "wm_running_[bloody_mess]"
else if(bloody_mess) else if(bloody_mess)
@@ -208,8 +207,11 @@
else else
var/full = contents.len ? 1 : 0 var/full = contents.len ? 1 : 0
icon_state = "wm_[state_open]_[full]" icon_state = "wm_[state_open]_[full]"
/obj/machinery/washing_machine/update_overlays()
. = ..()
if(panel_open) if(panel_open)
add_overlay("wm_panel") . += "wm_panel"
/obj/machinery/washing_machine/attackby(obj/item/W, mob/user, params) /obj/machinery/washing_machine/attackby(obj/item/W, mob/user, params)
if(panel_open && !busy && default_unfasten_wrench(user, W)) if(panel_open && !busy && default_unfasten_wrench(user, W))
+3 -3
View File
@@ -128,11 +128,11 @@
else else
recharge_port = null recharge_port = null
/obj/machinery/computer/mech_bay_power_console/update_icon() /obj/machinery/computer/mech_bay_power_console/update_overlays()
..() . = ..()
if(!recharge_port || !recharge_port.recharging_mech || !recharge_port.recharging_mech.cell || !(recharge_port.recharging_mech.cell.charge < recharge_port.recharging_mech.cell.maxcharge) || stat & (NOPOWER|BROKEN)) if(!recharge_port || !recharge_port.recharging_mech || !recharge_port.recharging_mech.cell || !(recharge_port.recharging_mech.cell.charge < recharge_port.recharging_mech.cell.maxcharge) || stat & (NOPOWER|BROKEN))
return return
add_overlay("recharge_comp_on") . += "recharge_comp_on"
/obj/machinery/computer/mech_bay_power_console/Initialize() /obj/machinery/computer/mech_bay_power_console/Initialize()
. = ..() . = ..()
-10
View File
@@ -45,16 +45,6 @@
..() ..()
update_icon() update_icon()
/obj/mecha/working/ripley/update_icon()
..()
var/datum/component/armor_plate/C = GetComponent(/datum/component/armor_plate)
if (C.amount)
cut_overlays()
if(C.amount < 3)
add_overlay(occupant ? "ripley-g" : "ripley-g-open")
else
add_overlay(occupant ? "ripley-g-full" : "ripley-g-full-open")
/obj/mecha/working/ripley/Initialize() /obj/mecha/working/ripley/Initialize()
. = ..() . = ..()
AddComponent(/datum/component/armor_plate,3,/obj/item/stack/sheet/animalhide/goliath_hide,list("melee" = 10, "bullet" = 5, "laser" = 5)) AddComponent(/datum/component/armor_plate,3,/obj/item/stack/sheet/animalhide/goliath_hide,list("melee" = 10, "bullet" = 5, "laser" = 5))
@@ -139,13 +139,6 @@
/obj/effect/temp_visual/dir_setting/curse/hand /obj/effect/temp_visual/dir_setting/curse/hand
icon_state = "cursehand" icon_state = "cursehand"
/obj/effect/temp_visual/dir_setting/curse/hand/Initialize(mapload, set_dir, handedness)
. = ..()
update_icon()
/obj/item/projectile/curse_hand/update_icon()
icon_state = "[icon_state][handedness]"
/obj/effect/temp_visual/wizard /obj/effect/temp_visual/wizard
name = "water" name = "water"
icon = 'icons/mob/mob.dmi' icon = 'icons/mob/mob.dmi'
@@ -474,7 +467,7 @@
else else
update_icon() update_icon()
/obj/effect/constructing_effect/update_icon() /obj/effect/constructing_effect/update_icon_state()
icon_state = "rcd" icon_state = "rcd"
if (delay < 10) if (delay < 10)
icon_state += "_shortest" icon_state += "_shortest"
+5 -6
View File
@@ -552,8 +552,8 @@ RLD
explosion(src, 0, 0, 3, 1, flame_range = 1) explosion(src, 0, 0, 3, 1, flame_range = 1)
qdel(src) qdel(src)
/obj/item/construction/rcd/update_icon() /obj/item/construction/rcd/update_overlays()
..() . = ..()
if(has_ammobar) if(has_ammobar)
var/ratio = CEILING((matter / max_matter) * ammo_sections, 1) var/ratio = CEILING((matter / max_matter) * ammo_sections, 1)
cut_overlays() //To prevent infinite stacking of overlays cut_overlays() //To prevent infinite stacking of overlays
@@ -707,11 +707,10 @@ RLD
else else
..() ..()
/obj/item/construction/rld/update_icon() /obj/item/construction/rld/update_overlays()
..() . = ..()
var/ratio = CEILING((matter / max_matter) * ammo_sections, 1) var/ratio = CEILING((matter / max_matter) * ammo_sections, 1)
cut_overlays() //To prevent infinite stacking of overlays . += "rld_light[ratio]"
add_overlay("rld_light[ratio]")
/obj/item/construction/rld/attack_self(mob/user) /obj/item/construction/rld/attack_self(mob/user)
..() ..()
+18 -55
View File
@@ -23,6 +23,10 @@
var/datum/radial_menu/persistent/wiring_gui_menu var/datum/radial_menu/persistent/wiring_gui_menu
var/mob/listeningTo var/mob/listeningTo
/obj/item/twohanded/rcl/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/twohanded/rcl/attackby(obj/item/W, mob/user) /obj/item/twohanded/rcl/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/stack/cable_coil)) if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W var/obj/item/stack/cable_coil/C = W
@@ -90,34 +94,20 @@
QDEL_NULL(wiring_gui_menu) QDEL_NULL(wiring_gui_menu)
return ..() return ..()
/obj/item/twohanded/rcl/update_icon() /obj/item/twohanded/rcl/update_icon_state()
if(!loaded) icon_state = initial(icon_state)
icon_state = "rcl-empty" item_state = initial(item_state)
item_state = "rcl-empty" if(!loaded || !loaded.amount)
icon_state += "-empty"
item_state += "-0"
/obj/item/twohanded/rcl/update_overlays()
. = ..()
if(!loaded || !loaded.amount)
return return
cut_overlays() var/mutable_appearance/cable_overlay = mutable_appearance(icon, "rcl-[max(CEILING(loaded.amount/(max_amount/3), 1), 3)]")
var/cable_amount = 0
switch(loaded.amount)
if(61 to INFINITY)
cable_amount = 3
if(31 to 60)
cable_amount = 2
if(1 to 30)
cable_amount = 1
else
cable_amount = 0
var/mutable_appearance/cable_overlay = mutable_appearance(icon, "rcl-[cable_amount]")
cable_overlay.color = GLOB.cable_colors[colors[current_color_index]] cable_overlay.color = GLOB.cable_colors[colors[current_color_index]]
if(cable_amount >= 1) . += cable_overlay
icon_state = "rcl"
item_state = "rcl"
add_overlay(cable_overlay)
else
icon_state = "rcl-empty"
item_state = "rcl-0"
add_overlay(cable_overlay)
/obj/item/twohanded/rcl/proc/is_empty(mob/user, loud = 1) /obj/item/twohanded/rcl/proc/is_empty(mob/user, loud = 1)
update_icon() update_icon()
@@ -323,33 +313,6 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
actions_types = list() actions_types = list()
max_amount = 30 max_amount = 30
name = "makeshift rapid cable layer" name = "makeshift rapid cable layer"
icon_state = "rclg"
item_state = "rclg"
ghetto = TRUE ghetto = TRUE
/obj/item/twohanded/rcl/ghetto/update_icon()
if(!loaded)
icon_state = "rclg-empty"
item_state = "rclg-0"
return
cut_overlays()
var/cable_amount = 0
switch(loaded.amount)
if(20 to INFINITY)
cable_amount = 3
if(10 to 19)
cable_amount = 2
if(1 to 9)
cable_amount = 1
else
cable_amount = 0
var/mutable_appearance/cable_overlay = mutable_appearance(icon, "rcl-[cable_amount]")
cable_overlay.color = GLOB.cable_colors[colors[current_color_index]]
if(cable_amount >= 1)
icon_state = "rclg"
item_state = "rclg"
add_overlay(cable_overlay)
else
icon_state = "rclg-empty"
item_state = "rclg-0"
add_overlay(cable_overlay)
+5 -3
View File
@@ -37,7 +37,7 @@
SSjukeboxes.removejukebox(SSjukeboxes.findjukeboxindex(src)) SSjukeboxes.removejukebox(SSjukeboxes.findjukeboxindex(src))
. = ..() . = ..()
/obj/item/boombox/update_icon() /obj/item/boombox/update_icon_state()
icon_state = "[baseiconstate]_[boomingandboxing ? "on" : "off"]" icon_state = "[baseiconstate]_[boomingandboxing ? "on" : "off"]"
return return
@@ -48,8 +48,11 @@
baseiconstate = "raiqbawks" baseiconstate = "raiqbawks"
availabletrackids = list("hotline.ogg","chiptune.ogg","genesis.ogg") availabletrackids = list("hotline.ogg","chiptune.ogg","genesis.ogg")
/obj/item/boombox/raiq/update_icon() /obj/item/boombox/raiq/Initialize()
. = ..() . = ..()
RegisterSignal(src, COMSIG_ATOM_UPDATED_ICON, .proc/start_party)
/obj/item/boombox/raiq/proc/start_party()
if(boomingandboxing) if(boomingandboxing)
START_PROCESSING(SSobj, src) START_PROCESSING(SSobj, src)
else else
@@ -58,4 +61,3 @@
/obj/item/boombox/raiq/process() /obj/item/boombox/raiq/process()
set_light(5,0.95,pick("#d87aff","#7a7aff","#89ecff","#b88eff","#ff59ad")) set_light(5,0.95,pick("#d87aff","#7a7aff","#89ecff","#b88eff","#ff59ad"))
return
+1 -1
View File
@@ -19,7 +19,7 @@
if(start_lit) if(start_lit)
light() light()
/obj/item/candle/update_icon() /obj/item/candle/update_icon_state()
icon_state = "candle[(wax > 400) ? ((wax > 750) ? 1 : 2) : 3][lit ? "_lit" : ""]" icon_state = "candle[(wax > 400) ? ((wax > 750) ? 1 : 2) : 3][lit ? "_lit" : ""]"
/obj/item/candle/attackby(obj/item/W, mob/user, params) /obj/item/candle/attackby(obj/item/W, mob/user, params)
+14 -16
View File
@@ -40,13 +40,13 @@
.=..() .=..()
update_icon() update_icon()
/obj/item/card/data/update_icon() /obj/item/card/data/update_overlays()
cut_overlays() . = ..()
if(detail_color == COLOR_FLOORTILE_GRAY) if(detail_color == COLOR_FLOORTILE_GRAY)
return return
var/mutable_appearance/detail_overlay = mutable_appearance('icons/obj/card.dmi', "[icon_state]-color") var/mutable_appearance/detail_overlay = mutable_appearance('icons/obj/card.dmi', "[icon_state]-color")
detail_overlay.color = detail_color detail_overlay.color = detail_color
add_overlay(detail_overlay) . += detail_overlay
/obj/item/card/data/attackby(obj/item/I, mob/living/user) /obj/item/card/data/attackby(obj/item/I, mob/living/user)
if(istype(I, /obj/item/integrated_electronics/detailer)) if(istype(I, /obj/item/integrated_electronics/detailer))
@@ -517,10 +517,16 @@ update_label("John Doe", "Clowny")
//Polychromatic Knight Badge //Polychromatic Knight Badge
/obj/item/card/id/knight /obj/item/card/id/knight
var/id_color = "#00FF00" //defaults to green
name = "knight badge" name = "knight badge"
icon_state = "knight" icon_state = "knight"
desc = "A badge denoting the owner as a knight! It has a strip for swiping like an ID" desc = "A badge denoting the owner as a knight! It has a strip for swiping like an ID"
var/id_color = "#00FF00" //defaults to green
var/mutable_appearance/id_overlay
/obj/item/card/id/knight/Initialize()
. = ..()
id_overlay = mutable_appearance(icon, "knight_overlay")
update_icon()
/obj/item/card/id/knight/update_label(newname, newjob) /obj/item/card/id/knight/update_label(newname, newjob)
if(newname || newjob) if(newname || newjob)
@@ -529,14 +535,10 @@ update_label("John Doe", "Clowny")
name = "[(!registered_name) ? "knight badge" : "[registered_name]'s Knight Badge"][(!assignment) ? "" : " ([assignment])"]" name = "[(!registered_name) ? "knight badge" : "[registered_name]'s Knight Badge"][(!assignment) ? "" : " ([assignment])"]"
/obj/item/card/id/knight/update_icon() /obj/item/card/id/knight/update_overlays()
var/mutable_appearance/id_overlay = mutable_appearance(icon, "knight_overlay") . = ..()
id_overlay.color = id_color
if(id_color) . += id_overlay
id_overlay.color = id_color
cut_overlays()
add_overlay(id_overlay)
/obj/item/card/id/knight/AltClick(mob/living/user) /obj/item/card/id/knight/AltClick(mob/living/user)
. = ..() . = ..()
@@ -556,10 +558,6 @@ update_label("John Doe", "Clowny")
update_icon() update_icon()
return TRUE return TRUE
/obj/item/card/id/knight/Initialize()
. = ..()
update_icon()
/obj/item/card/id/knight/examine(mob/user) /obj/item/card/id/knight/examine(mob/user)
. = ..() . = ..()
. += "<span class='notice'>Alt-click to recolor it.</span>" . += "<span class='notice'>Alt-click to recolor it.</span>"
+3 -2
View File
@@ -65,8 +65,9 @@
TED = new(src.loc) TED = new(src.loc)
return INITIALIZE_HINT_QDEL return INITIALIZE_HINT_QDEL
/obj/item/gun/energy/chrono_gun/update_icon() /obj/item/gun/energy/chrono_gun/ComponentInitialize()
return . = ..()
AddElement(/datum/element/update_icon_blocker)
/obj/item/gun/energy/chrono_gun/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0) /obj/item/gun/energy/chrono_gun/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
if(field) if(field)
+12 -8
View File
@@ -522,11 +522,13 @@ CIGARETTE PACKETS ARE IN FANCY.DM
user.visible_message("<span class='suicide'>[user] begins whacking [user.p_them()]self with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>") user.visible_message("<span class='suicide'>[user] begins whacking [user.p_them()]self with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return BRUTELOSS return BRUTELOSS
/obj/item/lighter/update_icon() /obj/item/lighter/update_icon_state()
cut_overlays()
var/mutable_appearance/lighter_overlay = mutable_appearance(icon,"lighter_overlay_[overlay_state][lit ? "-on" : ""]")
icon_state = "[initial(icon_state)][lit ? "-on" : ""]" icon_state = "[initial(icon_state)][lit ? "-on" : ""]"
add_overlay(lighter_overlay)
/obj/item/lighter/update_overlays()
. = ..()
var/mutable_appearance/lighter_overlay = mutable_appearance(icon,"lighter_overlay_[overlay_state][lit ? "-on" : ""]")
. += lighter_overlay
/obj/item/lighter/ignition_effect(atom/A, mob/user) /obj/item/lighter/ignition_effect(atom/A, mob/user)
if(get_temperature()) if(get_temperature())
@@ -645,12 +647,14 @@ CIGARETTE PACKETS ARE IN FANCY.DM
lighter_color = pick(color_list) lighter_color = pick(color_list)
update_icon() update_icon()
/obj/item/lighter/greyscale/update_icon() /obj/item/lighter/greyscale/update_icon_state()
cut_overlays()
var/mutable_appearance/lighter_overlay = mutable_appearance(icon,"lighter_overlay_[overlay_state][lit ? "-on" : ""]")
icon_state = "[initial(icon_state)][lit ? "-on" : ""]" icon_state = "[initial(icon_state)][lit ? "-on" : ""]"
/obj/item/lighter/greyscale/update_overlays()
. = ..()
var/mutable_appearance/lighter_overlay = mutable_appearance(icon,"lighter_overlay_[overlay_state][lit ? "-on" : ""]")
lighter_overlay.color = lighter_color lighter_overlay.color = lighter_color
add_overlay(lighter_overlay) . += lighter_overlay
/obj/item/lighter/greyscale/ignition_effect(atom/A, mob/user) /obj/item/lighter/greyscale/ignition_effect(atom/A, mob/user)
if(get_temperature()) if(get_temperature())
+7 -5
View File
@@ -577,8 +577,8 @@
new /obj/item/toy/crayon/black(src) new /obj/item/toy/crayon/black(src)
update_icon() update_icon()
/obj/item/storage/crayons/update_icon() /obj/item/storage/crayons/update_overlays()
cut_overlays() . = ..()
for(var/obj/item/toy/crayon/crayon in contents) for(var/obj/item/toy/crayon/crayon in contents)
add_overlay(mutable_appearance('icons/obj/crayons.dmi', crayon.item_color)) add_overlay(mutable_appearance('icons/obj/crayons.dmi', crayon.item_color))
@@ -735,13 +735,15 @@
. = ..() . = ..()
/obj/item/toy/crayon/spraycan/update_icon() /obj/item/toy/crayon/spraycan/update_icon_state()
icon_state = is_capped ? icon_capped : icon_uncapped icon_state = is_capped ? icon_capped : icon_uncapped
/obj/item/toy/crayon/spraycan/update_overlays()
. = ..()
if(use_overlays) if(use_overlays)
cut_overlays()
var/mutable_appearance/spray_overlay = mutable_appearance('icons/obj/crayons.dmi', "[is_capped ? "spraycan_cap_colors" : "spraycan_colors"]") var/mutable_appearance/spray_overlay = mutable_appearance('icons/obj/crayons.dmi', "[is_capped ? "spraycan_cap_colors" : "spraycan_colors"]")
spray_overlay.color = paint_color spray_overlay.color = paint_color
add_overlay(spray_overlay) . += spray_overlay
/obj/item/toy/crayon/spraycan/borg /obj/item/toy/crayon/spraycan/borg
name = "cyborg spraycan" name = "cyborg spraycan"
+27 -35
View File
@@ -20,7 +20,7 @@
var/safety = TRUE //if you can zap people with the defibs on harm mode var/safety = TRUE //if you can zap people with the defibs on harm mode
var/powered = FALSE //if there's a cell in the defib with enough power for a revive, blocks paddles from reviving otherwise var/powered = FALSE //if there's a cell in the defib with enough power for a revive, blocks paddles from reviving otherwise
var/obj/item/twohanded/shockpaddles/paddles var/obj/item/twohanded/shockpaddles/paddles
var/obj/item/stock_parts/cell/high/cell var/obj/item/stock_parts/cell/cell
var/combat = FALSE //can we revive through space suits? var/combat = FALSE //can we revive through space suits?
var/grab_ghost = FALSE // Do we pull the ghost back into their body? var/grab_ghost = FALSE // Do we pull the ghost back into their body?
var/healdisk = FALSE // Will we shock people dragging the body? var/healdisk = FALSE // Will we shock people dragging the body?
@@ -35,19 +35,14 @@
/obj/item/defibrillator/Initialize() //starts without a cell for rnd /obj/item/defibrillator/Initialize() //starts without a cell for rnd
. = ..() . = ..()
if(cell)
cell = new cell(src)
paddles = make_paddles() paddles = make_paddles()
update_icon()
return
/obj/item/defibrillator/loaded/Initialize() //starts with hicap
. = ..()
cell = new(src)
update_icon()
return
/obj/item/defibrillator/update_icon()
update_power() update_power()
return ..() return
/obj/item/defibrillator/loaded
cell = /obj/item/stock_parts/cell/high
/obj/item/defibrillator/proc/update_power() /obj/item/defibrillator/proc/update_power()
if(!QDELETED(cell)) if(!QDELETED(cell))
@@ -57,6 +52,7 @@
powered = TRUE powered = TRUE
else else
powered = FALSE powered = FALSE
update_icon()
/obj/item/defibrillator/update_overlays() /obj/item/defibrillator/update_overlays()
. = ..() . = ..()
@@ -76,7 +72,7 @@
/obj/item/defibrillator/CheckParts(list/parts_list) /obj/item/defibrillator/CheckParts(list/parts_list)
..() ..()
cell = locate(/obj/item/stock_parts/cell) in contents cell = locate(/obj/item/stock_parts/cell) in contents
update_icon() update_power()
/obj/item/defibrillator/ui_action_click() /obj/item/defibrillator/ui_action_click()
toggle_paddles() toggle_paddles()
@@ -124,7 +120,7 @@
return return
cell = W cell = W
to_chat(user, "<span class='notice'>You install a cell in [src].</span>") to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
update_icon() update_power()
else if(istype(W, /obj/item/screwdriver)) else if(istype(W, /obj/item/screwdriver))
if(cell) if(cell)
@@ -132,7 +128,7 @@
cell.forceMove(get_turf(src)) cell.forceMove(get_turf(src))
cell = null cell = null
to_chat(user, "<span class='notice'>You remove the cell from [src].</span>") to_chat(user, "<span class='notice'>You remove the cell from [src].</span>")
update_icon() update_power()
else else
return ..() return ..()
@@ -157,7 +153,7 @@
safety = TRUE safety = TRUE
visible_message("<span class='notice'>[src] beeps: Safety protocols enabled!</span>") visible_message("<span class='notice'>[src] beeps: Safety protocols enabled!</span>")
playsound(src, 'sound/machines/defib_saftyOn.ogg', 50, 0) playsound(src, 'sound/machines/defib_saftyOn.ogg', 50, 0)
update_icon() update_power()
/obj/item/defibrillator/proc/toggle_paddles() /obj/item/defibrillator/proc/toggle_paddles()
set name = "Toggle Paddles" set name = "Toggle Paddles"
@@ -170,14 +166,14 @@
if(!usr.put_in_hands(paddles)) if(!usr.put_in_hands(paddles))
on = FALSE on = FALSE
to_chat(user, "<span class='warning'>You need a free hand to hold the paddles!</span>") to_chat(user, "<span class='warning'>You need a free hand to hold the paddles!</span>")
update_icon() update_power()
return return
else else
//Remove from their hands and back onto the defib unit //Remove from their hands and back onto the defib unit
paddles.unwield() paddles.unwield()
remove_paddles(user) remove_paddles(user)
update_icon() update_power()
for(var/X in actions) for(var/X in actions)
var/datum/action/A = X var/datum/action/A = X
A.UpdateButtonIcon() A.UpdateButtonIcon()
@@ -189,7 +185,7 @@
..() ..()
if((slot_flags == ITEM_SLOT_BACK && slot != SLOT_BACK) || (slot_flags == ITEM_SLOT_BELT && slot != SLOT_BELT)) if((slot_flags == ITEM_SLOT_BACK && slot != SLOT_BACK) || (slot_flags == ITEM_SLOT_BELT && slot != SLOT_BELT))
remove_paddles(user) remove_paddles(user)
update_icon() update_power()
/obj/item/defibrillator/item_action_slot_check(slot, mob/user, datum/action/A) /obj/item/defibrillator/item_action_slot_check(slot, mob/user, datum/action/A)
if(slot == user.getBackSlot()) if(slot == user.getBackSlot())
@@ -213,12 +209,12 @@
if(cell) if(cell)
if(cell.charge < (paddles.revivecost+chrgdeductamt)) if(cell.charge < (paddles.revivecost+chrgdeductamt))
powered = FALSE powered = FALSE
update_icon() update_power()
if(cell.use(chrgdeductamt)) if(cell.use(chrgdeductamt))
update_icon() update_power()
return TRUE return TRUE
else else
update_icon() update_power()
return FALSE return FALSE
/obj/item/defibrillator/proc/cooldowncheck(mob/user) /obj/item/defibrillator/proc/cooldowncheck(mob/user)
@@ -232,7 +228,7 @@
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0) playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
paddles.cooldown = FALSE paddles.cooldown = FALSE
paddles.update_icon() paddles.update_icon()
update_icon() update_power()
/obj/item/defibrillator/compact /obj/item/defibrillator/compact
name = "compact defibrillator" name = "compact defibrillator"
@@ -249,7 +245,7 @@
/obj/item/defibrillator/compact/loaded/Initialize() /obj/item/defibrillator/compact/loaded/Initialize()
. = ..() . = ..()
cell = new(src) cell = new(src)
update_icon() update_power()
/obj/item/defibrillator/compact/combat /obj/item/defibrillator/compact/combat
name = "combat defibrillator" name = "combat defibrillator"
@@ -258,17 +254,12 @@
safety = FALSE safety = FALSE
always_emagged = TRUE always_emagged = TRUE
disarm_shock_time = 0 disarm_shock_time = 0
cell = /obj/item/stock_parts/cell/infinite
/obj/item/defibrillator/compact/combat/loaded/Initialize()
. = ..()
cell = new /obj/item/stock_parts/cell/infinite(src)
update_icon()
/obj/item/defibrillator/compact/combat/loaded/attackby(obj/item/W, mob/user, params) /obj/item/defibrillator/compact/combat/loaded/attackby(obj/item/W, mob/user, params)
if(W == paddles) if(W == paddles)
paddles.unwield() paddles.unwield()
toggle_paddles() toggle_paddles()
update_icon()
return return
//paddles //paddles
@@ -298,6 +289,10 @@
var/mob/listeningTo var/mob/listeningTo
/obj/item/twohanded/shockpaddles/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/twohanded/shockpaddles/equipped(mob/user, slot) /obj/item/twohanded/shockpaddles/equipped(mob/user, slot)
. = ..() . = ..()
if(!req_defib) if(!req_defib)
@@ -339,14 +334,11 @@
busy = FALSE busy = FALSE
update_icon() update_icon()
/obj/item/twohanded/shockpaddles/update_icon() /obj/item/twohanded/shockpaddles/update_icon_state()
icon_state = "defibpaddles[wielded]" icon_state = "defibpaddles[wielded]"
item_state = "defibpaddles[wielded]" item_state = "defibpaddles[wielded]"
if(cooldown) if(cooldown)
icon_state = "defibpaddles[wielded]_cooldown" icon_state = "defibpaddles[wielded]_cooldown"
if(iscarbon(loc))
var/mob/living/carbon/C = loc
C.update_inv_hands()
/obj/item/twohanded/shockpaddles/suicide_act(mob/user) /obj/item/twohanded/shockpaddles/suicide_act(mob/user)
user.visible_message("<span class='danger'>[user] is putting the live paddles on [user.p_their()] chest! It looks like [user.p_theyre()] trying to commit suicide!</span>") user.visible_message("<span class='danger'>[user] is putting the live paddles on [user.p_their()] chest! It looks like [user.p_theyre()] trying to commit suicide!</span>")
@@ -373,7 +365,7 @@
return return
defib.on = FALSE defib.on = FALSE
forceMove(defib) forceMove(defib)
defib.update_icon() defib.update_power()
/obj/item/twohanded/shockpaddles/proc/check_defib_exists(mainunit, mob/living/carbon/M, obj/O) /obj/item/twohanded/shockpaddles/proc/check_defib_exists(mainunit, mob/living/carbon/M, obj/O)
if(!req_defib) if(!req_defib)
+21 -10
View File
@@ -41,6 +41,11 @@ GLOBAL_LIST_EMPTY(PDAs)
var/mode = 0 //Controls what menu the PDA will display. 0 is hub; the rest are either built in or based on cartridge. var/mode = 0 //Controls what menu the PDA will display. 0 is hub; the rest are either built in or based on cartridge.
var/list/overlays_icons = list('icons/obj/pda_alt.dmi' = list("pda-r", "screen_default", "id_overlay", "insert_overlay", "light_overlay", "pai_overlay")) var/list/overlays_icons = list('icons/obj/pda_alt.dmi' = list("pda-r", "screen_default", "id_overlay", "insert_overlay", "light_overlay", "pai_overlay"))
var/current_overlays = PDA_STANDARD_OVERLAYS var/current_overlays = PDA_STANDARD_OVERLAYS
//variables exclusively used on 'update_overlays' (which should never be called directly, and 'update_icon' doesn't use args anyway)
var/new_overlays = FALSE
var/new_alert = FALSE
var/font_index = 0 //This int tells DM which font is currently selected and lets DM know when the last font has been selected so that it can cycle back to the first font when "toggle font" is pressed again. var/font_index = 0 //This int tells DM which font is currently selected and lets DM know when the last font has been selected so that it can cycle back to the first font when "toggle font" is pressed again.
var/font_mode = "font-family:monospace;" //The currently selected font. var/font_mode = "font-family:monospace;" //The currently selected font.
var/background_color = "#808000" //The currently selected background color. var/background_color = "#808000" //The currently selected background color.
@@ -123,7 +128,8 @@ GLOBAL_LIST_EMPTY(PDAs)
inserted_item = new inserted_item(src) inserted_item = new inserted_item(src)
else else
inserted_item = new /obj/item/pen(src) inserted_item = new /obj/item/pen(src)
update_icon(FALSE, TRUE) new_overlays = TRUE
update_icon()
/obj/item/pda/CtrlShiftClick(mob/living/user) /obj/item/pda/CtrlShiftClick(mob/living/user)
. = ..() . = ..()
@@ -144,7 +150,8 @@ GLOBAL_LIST_EMPTY(PDAs)
if(QDELETED(src) || isnull(new_icon) || new_icon == icon || !M.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) if(QDELETED(src) || isnull(new_icon) || new_icon == icon || !M.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return return
icon = new_icon icon = new_icon
update_icon(FALSE, TRUE) new_overlays = TRUE
update_icon()
to_chat(M, "[src] is now skinned as '[choice]'.") to_chat(M, "[src] is now skinned as '[choice]'.")
/obj/item/pda/proc/set_new_overlays() /obj/item/pda/proc/set_new_overlays()
@@ -188,7 +195,8 @@ GLOBAL_LIST_EMPTY(PDAs)
var/pref_skin = GLOB.pda_reskins[C.prefs.pda_skin] var/pref_skin = GLOB.pda_reskins[C.prefs.pda_skin]
if(icon != pref_skin) if(icon != pref_skin)
icon = pref_skin icon = pref_skin
update_icon(FALSE, TRUE) new_overlays = TRUE
update_icon()
equipped = TRUE equipped = TRUE
/obj/item/pda/proc/update_label() /obj/item/pda/proc/update_label()
@@ -215,25 +223,27 @@ GLOBAL_LIST_EMPTY(PDAs)
return TRUE return TRUE
return FALSE return FALSE
/obj/item/pda/update_icon(alert = FALSE, new_overlays = FALSE) /obj/item/pda/update_overlays()
. = ..()
if(new_overlays) if(new_overlays)
set_new_overlays() set_new_overlays()
cut_overlays() . += new_alert ? current_overlays[PDA_OVERLAY_ALERT] : current_overlays[PDA_OVERLAY_SCREEN]
add_overlay(alert ? current_overlays[PDA_OVERLAY_ALERT] : current_overlays[PDA_OVERLAY_SCREEN])
var/mutable_appearance/overlay = new() var/mutable_appearance/overlay = new()
overlay.pixel_x = overlays_x_offset overlay.pixel_x = overlays_x_offset
if(id) if(id)
overlay.icon_state = current_overlays[PDA_OVERLAY_ID] overlay.icon_state = current_overlays[PDA_OVERLAY_ID]
add_overlay(new /mutable_appearance(overlay)) . += new /mutable_appearance(overlay)
if(inserted_item) if(inserted_item)
overlay.icon_state = current_overlays[PDA_OVERLAY_ITEM] overlay.icon_state = current_overlays[PDA_OVERLAY_ITEM]
add_overlay(new /mutable_appearance(overlay)) . += new /mutable_appearance(overlay)
if(fon) if(fon)
overlay.icon_state = current_overlays[PDA_OVERLAY_LIGHT] overlay.icon_state = current_overlays[PDA_OVERLAY_LIGHT]
add_overlay(new /mutable_appearance(overlay)) . += new /mutable_appearance(overlay)
if(pai) if(pai)
overlay.icon_state = "[current_overlays[PDA_OVERLAY_PAI]][pai.pai ? "" : "_off"]" overlay.icon_state = "[current_overlays[PDA_OVERLAY_PAI]][pai.pai ? "" : "_off"]"
add_overlay(new /mutable_appearance(overlay)) . += new /mutable_appearance(overlay)
new_overlays = FALSE
new_alert = FALSE
/obj/item/pda/MouseDrop(mob/over, src_location, over_location) /obj/item/pda/MouseDrop(mob/over, src_location, over_location)
var/mob/M = usr var/mob/M = usr
@@ -849,6 +859,7 @@ GLOBAL_LIST_EMPTY(PDAs)
to_chat(L, "[icon2html(src)] <b>Message from [hrefstart][signal.data["name"]] ([signal.data["job"]])[hrefend], </b>[inbound_message] (<a href='byond://?src=[REF(src)];choice=Message;skiprefresh=1;target=[REF(signal.source)]'>Reply</a>) (<a href='byond://?src=[REF(src)];choice=toggle_block;target=[signal.data["name"]]'>BLOCK/UNBLOCK</a>)") to_chat(L, "[icon2html(src)] <b>Message from [hrefstart][signal.data["name"]] ([signal.data["job"]])[hrefend], </b>[inbound_message] (<a href='byond://?src=[REF(src)];choice=Message;skiprefresh=1;target=[REF(signal.source)]'>Reply</a>) (<a href='byond://?src=[REF(src)];choice=toggle_block;target=[signal.data["name"]]'>BLOCK/UNBLOCK</a>)")
new_alert = TRUE
update_icon(TRUE) update_icon(TRUE)
/obj/item/pda/proc/send_to_all(mob/living/U) /obj/item/pda/proc/send_to_all(mob/living/U)
@@ -454,7 +454,7 @@
on = FALSE on = FALSE
update_icon() update_icon()
/obj/item/flashlight/glowstick/update_icon() /obj/item/flashlight/glowstick/update_icon_state()
item_state = "glowstick" item_state = "glowstick"
cut_overlays() cut_overlays()
if(!fuel) if(!fuel)
@@ -87,27 +87,25 @@
. += "<span class='notice'>The last radiation amount detected was [last_tick_amount]</span>" . += "<span class='notice'>The last radiation amount detected was [last_tick_amount]</span>"
/obj/item/geiger_counter/update_icon() /obj/item/geiger_counter/update_icon_state()
if(!scanning) if(!scanning)
icon_state = "geiger_off" icon_state = "geiger_off"
return 1 else if(obj_flags & EMAGGED)
if(obj_flags & EMAGGED)
icon_state = "geiger_on_emag" icon_state = "geiger_on_emag"
return 1 else
switch(radiation_count) switch(radiation_count)
if(-INFINITY to RAD_LEVEL_NORMAL) if(-INFINITY to RAD_LEVEL_NORMAL)
icon_state = "geiger_on_1" icon_state = "geiger_on_1"
if(RAD_LEVEL_NORMAL + 1 to RAD_LEVEL_MODERATE) if(RAD_LEVEL_NORMAL + 1 to RAD_LEVEL_MODERATE)
icon_state = "geiger_on_2" icon_state = "geiger_on_2"
if(RAD_LEVEL_MODERATE + 1 to RAD_LEVEL_HIGH) if(RAD_LEVEL_MODERATE + 1 to RAD_LEVEL_HIGH)
icon_state = "geiger_on_3" icon_state = "geiger_on_3"
if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH) if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH)
icon_state = "geiger_on_4" icon_state = "geiger_on_4"
if(RAD_LEVEL_VERY_HIGH + 1 to RAD_LEVEL_CRITICAL) if(RAD_LEVEL_VERY_HIGH + 1 to RAD_LEVEL_CRITICAL)
icon_state = "geiger_on_4" icon_state = "geiger_on_4"
if(RAD_LEVEL_CRITICAL + 1 to INFINITY) if(RAD_LEVEL_CRITICAL + 1 to INFINITY)
icon_state = "geiger_on_5" icon_state = "geiger_on_5"
..()
/obj/item/geiger_counter/proc/update_sound() /obj/item/geiger_counter/proc/update_sound()
var/datum/looping_sound/geiger/loop = soundloop var/datum/looping_sound/geiger/loop = soundloop
@@ -158,7 +158,7 @@
/obj/item/lightreplacer/attack_self(mob/user) /obj/item/lightreplacer/attack_self(mob/user)
to_chat(user, status_string()) to_chat(user, status_string())
/obj/item/lightreplacer/update_icon() /obj/item/lightreplacer/update_icon_state()
icon_state = "lightreplacer[(obj_flags & EMAGGED ? 1 : 0)]" icon_state = "lightreplacer[(obj_flags & EMAGGED ? 1 : 0)]"
/obj/item/lightreplacer/proc/status_string() /obj/item/lightreplacer/proc/status_string()
+2 -2
View File
@@ -67,7 +67,7 @@
to_chat(user, "<span class='notice'>You clear the wired connection from the multitool.</span>") to_chat(user, "<span class='notice'>You clear the wired connection from the multitool.</span>")
update_icon() update_icon()
/obj/item/multitool/update_icon() /obj/item/multitool/update_icon_state()
if(selected_io) if(selected_io)
icon_state = "multitool_red" icon_state = "multitool_red"
else else
@@ -149,7 +149,7 @@
/obj/item/multitool/ai_detect/ui_action_click() /obj/item/multitool/ai_detect/ui_action_click()
return return
/obj/item/multitool/ai_detect/update_icon() /obj/item/multitool/ai_detect/update_icon_state()
if(selected_io) if(selected_io)
icon_state = "multitool_red" icon_state = "multitool_red"
else else
+1 -1
View File
@@ -26,7 +26,7 @@
var/obj/structure/cable/attached // the attached cable var/obj/structure/cable/attached // the attached cable
/obj/item/powersink/update_icon() /obj/item/powersink/update_icon_state()
icon_state = "powersink[mode == OPERATING]" icon_state = "powersink[mode == OPERATING]"
/obj/item/powersink/proc/set_mode(value) /obj/item/powersink/proc/set_mode(value)
@@ -27,7 +27,7 @@
qpad = null qpad = null
return TRUE return TRUE
/obj/item/quantum_keycard/update_icon() /obj/item/quantum_keycard/update_icon_state()
if(qpad) if(qpad)
icon_state = "quantum_keycard_on" icon_state = "quantum_keycard_on"
else else
@@ -83,7 +83,7 @@
eject(usr) eject(usr)
/obj/item/taperecorder/update_icon() /obj/item/taperecorder/update_icon_state()
if(!mytape) if(!mytape)
icon_state = "taperecorder_empty" icon_state = "taperecorder_empty"
else if(recording) else if(recording)
+12 -9
View File
@@ -134,8 +134,9 @@
w_class = WEIGHT_CLASS_SMALL w_class = WEIGHT_CLASS_SMALL
sides = 100 sides = 100
/obj/item/dice/d100/update_icon() /obj/item/dice/d100/ComponentInitialize()
return . = ..()
AddElement(/datum/element/update_icon_blocker)
/obj/item/dice/eightbd20 /obj/item/dice/eightbd20
name = "strange d20" name = "strange d20"
@@ -144,8 +145,9 @@
sides = 20 sides = 20
special_faces = list("It is certain","It is decidedly so","Without a doubt","Yes, definitely","You may rely on it","As I see it, yes","Most likely","Outlook good","Yes","Signs point to yes","Reply hazy try again","Ask again later","Better not tell you now","Cannot predict now","Concentrate and ask again","Don't count on it","My reply is no","My sources say no","Outlook not so good","Very doubtful") special_faces = list("It is certain","It is decidedly so","Without a doubt","Yes, definitely","You may rely on it","As I see it, yes","Most likely","Outlook good","Yes","Signs point to yes","Reply hazy try again","Ask again later","Better not tell you now","Cannot predict now","Concentrate and ask again","Don't count on it","My reply is no","My sources say no","Outlook not so good","Very doubtful")
/obj/item/dice/eightbd20/update_icon() /obj/item/dice/eightbd20/ComponentInitialize()
return . = ..()
AddElement(/datum/element/update_icon_blocker)
/obj/item/dice/fourdd6 /obj/item/dice/fourdd6
name = "4d d6" name = "4d d6"
@@ -154,8 +156,9 @@
sides = 48 sides = 48
special_faces = list("Cube-Side: 1-1","Cube-Side: 1-2","Cube-Side: 1-3","Cube-Side: 1-4","Cube-Side: 1-5","Cube-Side: 1-6","Cube-Side: 2-1","Cube-Side: 2-2","Cube-Side: 2-3","Cube-Side: 2-4","Cube-Side: 2-5","Cube-Side: 2-6","Cube-Side: 3-1","Cube-Side: 3-2","Cube-Side: 3-3","Cube-Side: 3-4","Cube-Side: 3-5","Cube-Side: 3-6","Cube-Side: 4-1","Cube-Side: 4-2","Cube-Side: 4-3","Cube-Side: 4-4","Cube-Side: 4-5","Cube-Side: 4-6","Cube-Side: 5-1","Cube-Side: 5-2","Cube-Side: 5-3","Cube-Side: 5-4","Cube-Side: 5-5","Cube-Side: 5-6","Cube-Side: 6-1","Cube-Side: 6-2","Cube-Side: 6-3","Cube-Side: 6-4","Cube-Side: 6-5","Cube-Side: 6-6","Cube-Side: 7-1","Cube-Side: 7-2","Cube-Side: 7-3","Cube-Side: 7-4","Cube-Side: 7-5","Cube-Side: 7-6","Cube-Side: 8-1","Cube-Side: 8-2","Cube-Side: 8-3","Cube-Side: 8-4","Cube-Side: 8-5","Cube-Side: 8-6") special_faces = list("Cube-Side: 1-1","Cube-Side: 1-2","Cube-Side: 1-3","Cube-Side: 1-4","Cube-Side: 1-5","Cube-Side: 1-6","Cube-Side: 2-1","Cube-Side: 2-2","Cube-Side: 2-3","Cube-Side: 2-4","Cube-Side: 2-5","Cube-Side: 2-6","Cube-Side: 3-1","Cube-Side: 3-2","Cube-Side: 3-3","Cube-Side: 3-4","Cube-Side: 3-5","Cube-Side: 3-6","Cube-Side: 4-1","Cube-Side: 4-2","Cube-Side: 4-3","Cube-Side: 4-4","Cube-Side: 4-5","Cube-Side: 4-6","Cube-Side: 5-1","Cube-Side: 5-2","Cube-Side: 5-3","Cube-Side: 5-4","Cube-Side: 5-5","Cube-Side: 5-6","Cube-Side: 6-1","Cube-Side: 6-2","Cube-Side: 6-3","Cube-Side: 6-4","Cube-Side: 6-5","Cube-Side: 6-6","Cube-Side: 7-1","Cube-Side: 7-2","Cube-Side: 7-3","Cube-Side: 7-4","Cube-Side: 7-5","Cube-Side: 7-6","Cube-Side: 8-1","Cube-Side: 8-2","Cube-Side: 8-3","Cube-Side: 8-4","Cube-Side: 8-5","Cube-Side: 8-6")
/obj/item/dice/fourdd6/update_icon() /obj/item/dice/fourdd6/ComponentInitialize()
return . = ..()
AddElement(/datum/element/update_icon_blocker)
/obj/item/dice/attack_self(mob/user) /obj/item/dice/attack_self(mob/user)
diceroll(user) diceroll(user)
@@ -187,9 +190,9 @@
else if(!src.throwing) //Dice was thrown and is coming to rest else if(!src.throwing) //Dice was thrown and is coming to rest
visible_message("<span class='notice'>[src] rolls to a stop, landing on [result]. [comment]</span>") visible_message("<span class='notice'>[src] rolls to a stop, landing on [result]. [comment]</span>")
/obj/item/dice/update_icon() /obj/item/dice/update_overlays()
cut_overlays() . = ..()
add_overlay("[src.icon_state]-[src.result]") . += "[icon_state]-[result]"
/obj/item/dice/microwave_act(obj/machinery/microwave/M) /obj/item/dice/microwave_act(obj/machinery/microwave/M)
if(can_be_rigged) if(can_be_rigged)
+11 -12
View File
@@ -27,6 +27,10 @@
var/igniter_type = /obj/item/assembly/igniter var/igniter_type = /obj/item/assembly/igniter
trigger_guard = TRIGGER_GUARD_NORMAL trigger_guard = TRIGGER_GUARD_NORMAL
/obj/item/flamethrower/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/flamethrower/Destroy() /obj/item/flamethrower/Destroy()
if(weldtool) if(weldtool)
qdel(weldtool) qdel(weldtool)
@@ -48,22 +52,17 @@
if(isturf(location)) //start a fire if possible if(isturf(location)) //start a fire if possible
igniter.flamethrower_process(location) igniter.flamethrower_process(location)
/obj/item/flamethrower/update_icon_state()
item_state = "flamethrower_[lit]"
/obj/item/flamethrower/update_icon() /obj/item/flamethrower/update_overlays()
cut_overlays() . = ..()
if(igniter) if(igniter)
add_overlay("+igniter[status]") . += "+igniter[status]"
if(ptank) if(ptank)
add_overlay("+ptank") . += "+ptank"
if(lit) if(lit)
add_overlay("+lit") . += "+lit"
item_state = "flamethrower_1"
else
item_state = "flamethrower_0"
if(ismob(loc))
var/mob/M = loc
M.update_inv_hands()
return
/obj/item/flamethrower/afterattack(atom/target, mob/user, flag) /obj/item/flamethrower/afterattack(atom/target, mob/user, flag)
. = ..() . = ..()
+1 -1
View File
@@ -158,7 +158,7 @@
user.gib(1, 1) user.gib(1, 1)
qdel(src) qdel(src)
/obj/item/grenade/plastic/update_icon() /obj/item/grenade/plastic/update_icon_state()
if(nadeassembly) if(nadeassembly)
icon_state = "[item_state]1" icon_state = "[item_state]1"
else else
-3
View File
@@ -128,9 +128,6 @@
item_color = param_color || item_color || pick(cable_colors) item_color = param_color || item_color || pick(cable_colors)
if(cable_colors[item_color]) if(cable_colors[item_color])
item_color = cable_colors[item_color] item_color = cable_colors[item_color]
update_icon()
/obj/item/restraints/handcuffs/cable/update_icon()
color = null color = null
add_atom_colour(item_color, FIXED_COLOUR_PRIORITY) add_atom_colour(item_color, FIXED_COLOUR_PRIORITY)
+1 -1
View File
@@ -154,7 +154,7 @@
colorize(null) colorize(null)
active = FALSE active = FALSE
/obj/item/hot_potato/update_icon() /obj/item/hot_potato/update_icon_state()
icon_state = active? icon_on : icon_off icon_state = active? icon_on : icon_off
/obj/item/hot_potato/syndicate /obj/item/hot_potato/syndicate
@@ -10,18 +10,14 @@
throw_range = 5 throw_range = 5
w_class = WEIGHT_CLASS_TINY w_class = WEIGHT_CLASS_TINY
custom_materials = list(/datum/material/glass=500) custom_materials = list(/datum/material/glass=500)
var/obj/item/implant/imp = null var/obj/item/implant/imp
var/imp_type var/imp_type
/obj/item/implantcase/update_icon_state()
/obj/item/implantcase/update_icon()
if(imp) if(imp)
icon_state = "implantcase-[imp.item_color]" icon_state = "implantcase-[imp.item_color]"
reagents = imp.reagents
else else
icon_state = "implantcase-0" icon_state = "implantcase-0"
reagents = null
/obj/item/implantcase/attackby(obj/item/W, mob/user, params) /obj/item/implantcase/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/pen)) if(istype(W, /obj/item/pen))
@@ -46,6 +42,7 @@
imp = I.imp imp = I.imp
I.imp = null I.imp = null
update_icon() update_icon()
reagents = imp.reagents
I.update_icon() I.update_icon()
else else
if(imp) if(imp)
@@ -54,6 +51,7 @@
imp.forceMove(I) imp.forceMove(I)
I.imp = imp I.imp = imp
imp = null imp = null
reagents = null
update_icon() update_icon()
I.update_icon() I.update_icon()
@@ -96,16 +96,17 @@
visible_message("<span class='warning'>[M] has been implanted by [src].</span>") visible_message("<span class='warning'>[M] has been implanted by [src].</span>")
return TRUE return TRUE
/obj/machinery/implantchair/update_icon() /obj/machinery/implantchair/update_icon_state()
icon_state = initial(icon_state) icon_state = initial(icon_state)
if(state_open) if(state_open)
icon_state += "_open" icon_state += "_open"
if(occupant) if(occupant)
icon_state += "_occupied" icon_state += "_occupied"
/obj/machinery/implantchair/update_overlays()
. = ..()
if(ready) if(ready)
add_overlay("ready") . += "ready"
else
cut_overlays()
/obj/machinery/implantchair/proc/replenish() /obj/machinery/implantchair/proc/replenish()
if(ready_implants < max_implants) if(ready_implants < max_implants)
@@ -14,13 +14,12 @@
var/imp_type = null var/imp_type = null
/obj/item/implanter/update_icon() /obj/item/implanter/update_icon_state()
if(imp) if(imp)
icon_state = "implanter1" icon_state = "implanter1"
else else
icon_state = "implanter0" icon_state = "implanter0"
/obj/item/implanter/attack(mob/living/M, mob/user) /obj/item/implanter/attack(mob/living/M, mob/user)
if(!istype(M)) if(!istype(M))
return return
@@ -18,7 +18,7 @@
if(case) if(case)
. += "<span class='notice'>Alt-click [src] to remove the inserted implant case.</span>" . += "<span class='notice'>Alt-click [src] to remove the inserted implant case.</span>"
/obj/item/implantpad/update_icon() /obj/item/implantpad/update_icon_state()
icon_state = "implantpad-[case ? TRUE : FALSE]" icon_state = "implantpad-[case ? TRUE : FALSE]"
/obj/item/implantpad/AltClick(mob/user) /obj/item/implantpad/AltClick(mob/user)
+8 -7
View File
@@ -163,13 +163,14 @@
if(opened) if(opened)
. += "<span class='notice'>Its battery compartment is open.</span>" . += "<span class='notice'>Its battery compartment is open.</span>"
/obj/item/inducer/update_icon() /obj/item/inducer/update_overlays()
cut_overlays() . = ..()
if(opened) if(!opened)
if(!cell) return
add_overlay("inducer-nobat") if(!cell)
else . += "inducer-nobat"
add_overlay("inducer-bat") else
. += "inducer-bat"
/obj/item/inducer/sci /obj/item/inducer/sci
icon_state = "inducer-sci" icon_state = "inducer-sci"
+8 -8
View File
@@ -259,6 +259,10 @@
light_color = "#37FFF7" light_color = "#37FFF7"
actions_types = list() actions_types = list()
/obj/item/melee/transforming/energy/sword/cx/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/melee/transforming/energy/sword/cx/alt_pre_attack(atom/A, mob/living/user, params) //checks if it can do right click memes /obj/item/melee/transforming/energy/sword/cx/alt_pre_attack(atom/A, mob/living/user, params) //checks if it can do right click memes
altafterattack(A, user, TRUE, params) altafterattack(A, user, TRUE, params)
return TRUE return TRUE
@@ -301,7 +305,8 @@
if(!supress_message_text) if(!supress_message_text)
to_chat(user, "<span class='notice'>[src] [active ? "is now active":"can now be concealed"].</span>") to_chat(user, "<span class='notice'>[src] [active ? "is now active":"can now be concealed"].</span>")
/obj/item/melee/transforming/energy/sword/cx/update_icon() /obj/item/melee/transforming/energy/sword/cx/update_overlays()
. = ..()
var/mutable_appearance/blade_overlay = mutable_appearance(icon, "cxsword_blade") var/mutable_appearance/blade_overlay = mutable_appearance(icon, "cxsword_blade")
var/mutable_appearance/gem_overlay = mutable_appearance(icon, "cxsword_gem") var/mutable_appearance/gem_overlay = mutable_appearance(icon, "cxsword_gem")
@@ -309,15 +314,10 @@
blade_overlay.color = light_color blade_overlay.color = light_color
gem_overlay.color = light_color gem_overlay.color = light_color
cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other . += gem_overlay
add_overlay(gem_overlay)
if(active) if(active)
add_overlay(blade_overlay) . += blade_overlay
if(ismob(loc))
var/mob/M = loc
M.update_inv_hands()
/obj/item/melee/transforming/energy/sword/cx/AltClick(mob/living/user) /obj/item/melee/transforming/energy/sword/cx/AltClick(mob/living/user)
. = ..() . = ..()
+2 -4
View File
@@ -453,12 +453,10 @@
held_sausage = null held_sausage = null
update_icon() update_icon()
/obj/item/melee/roastingstick/update_icon() /obj/item/melee/roastingstick/update_overlays()
. = ..() . = ..()
cut_overlays()
if (held_sausage) if (held_sausage)
var/mutable_appearance/sausage = mutable_appearance(icon, "roastingstick_sausage") . += mutable_appearance(icon, "roastingstick_sausage")
add_overlay(sausage)
/obj/item/melee/roastingstick/proc/extend(user) /obj/item/melee/roastingstick/proc/extend(user)
to_chat(user, "<span class ='warning'>You extend [src].</span>") to_chat(user, "<span class ='warning'>You extend [src].</span>")
+6 -4
View File
@@ -143,14 +143,16 @@
update_icon() update_icon()
remove_occupant(user) remove_occupant(user)
/obj/item/pet_carrier/update_icon() /obj/item/pet_carrier/update_icon_state()
cut_overlay("unlocked")
cut_overlay("locked")
if(open) if(open)
icon_state = initial(icon_state) icon_state = initial(icon_state)
else else
icon_state = "pet_carrier_[!occupants.len ? "closed" : "occupied"]" icon_state = "pet_carrier_[!occupants.len ? "closed" : "occupied"]"
add_overlay("[locked ? "" : "un"]locked")
/obj/item/pet_carrier/update_overlays()
. = ..()
if(!open)
. += "[locked ? "" : "un"]locked"
/obj/item/pet_carrier/MouseDrop(atom/over_atom) /obj/item/pet_carrier/MouseDrop(atom/over_atom)
if(isopenturf(over_atom) && usr.canUseTopic(src, BE_CLOSE, ismonkey(usr)) && usr.Adjacent(over_atom) && open && occupants.len) if(isopenturf(over_atom) && usr.canUseTopic(src, BE_CLOSE, ismonkey(usr)) && usr.Adjacent(over_atom) && open && occupants.len)
+8 -8
View File
@@ -49,29 +49,29 @@
/obj/item/pinpointer/proc/scan_for_target() /obj/item/pinpointer/proc/scan_for_target()
return return
/obj/item/pinpointer/update_icon() /obj/item/pinpointer/update_overlays()
cut_overlays() . = ..()
if(!active) if(!active)
return return
if(!target) if(!target)
add_overlay("pinon[alert ? "alert" : ""]null") . += "pinon[alert ? "alert" : ""]null"
return return
var/turf/here = get_turf(src) var/turf/here = get_turf(src)
var/turf/there = get_turf(target) var/turf/there = get_turf(target)
if(!here || !there || here.z != there.z) if(!here || !there || here.z != there.z)
add_overlay("pinon[alert ? "alert" : ""]null") . += "pinon[alert ? "alert" : ""]null"
return return
if(get_dist_euclidian(here,there) <= minimum_range) if(get_dist_euclidian(here,there) <= minimum_range)
add_overlay("pinon[alert ? "alert" : ""]direct") . += "pinon[alert ? "alert" : ""]direct"
else else
setDir(get_dir(here, there)) setDir(get_dir(here, there))
switch(get_dist(here, there)) switch(get_dist(here, there))
if(1 to 8) if(1 to 8)
add_overlay("pinon[alert ? "alert" : "close"]") . += "pinon[alert ? "alert" : "close"]"
if(9 to 16) if(9 to 16)
add_overlay("pinon[alert ? "alert" : "medium"]") . += "pinon[alert ? "alert" : "medium"]"
if(16 to INFINITY) if(16 to INFINITY)
add_overlay("pinon[alert ? "alert" : "far"]") . += "pinon[alert ? "alert" : "far"]"
/obj/item/pinpointer/crew // A replacement for the old crew monitoring consoles /obj/item/pinpointer/crew // A replacement for the old crew monitoring consoles
name = "crew pinpointer" name = "crew pinpointer"
+3 -3
View File
@@ -241,11 +241,11 @@
tank = thetank tank = thetank
update_icon() update_icon()
/obj/item/pneumatic_cannon/update_icon() /obj/item/pneumatic_cannon/update_overlays()
cut_overlays() . = ..()
if(!tank) if(!tank)
return return
add_overlay(tank.icon_state) . += tank.icon_state
/obj/item/pneumatic_cannon/proc/fill_with_type(type, amount) /obj/item/pneumatic_cannon/proc/fill_with_type(type, amount)
if(!ispath(type, /obj) && !ispath(type, /mob)) if(!ispath(type, /obj) && !ispath(type, /mob))
+2 -6
View File
@@ -154,11 +154,7 @@
var/static/list/charge_machines = typecacheof(list(/obj/machinery/cell_charger, /obj/machinery/recharger, /obj/machinery/recharge_station, /obj/machinery/mech_bay_recharge_port)) var/static/list/charge_machines = typecacheof(list(/obj/machinery/cell_charger, /obj/machinery/recharger, /obj/machinery/recharge_station, /obj/machinery/mech_bay_recharge_port))
var/static/list/charge_items = typecacheof(list(/obj/item/stock_parts/cell, /obj/item/gun/energy)) var/static/list/charge_items = typecacheof(list(/obj/item/stock_parts/cell, /obj/item/gun/energy))
/obj/item/borg/charger/Initialize() /obj/item/borg/charger/update_icon_state()
. = ..()
/obj/item/borg/charger/update_icon()
..()
icon_state = "charger_[mode]" icon_state = "charger_[mode]"
/obj/item/borg/charger/attack_self(mob/user) /obj/item/borg/charger/attack_self(mob/user)
@@ -596,7 +592,7 @@
update_icon() update_icon()
to_chat(user, "<span class='boldnotice'>You [active? "activate":"deactivate"] [src].</span>") to_chat(user, "<span class='boldnotice'>You [active? "activate":"deactivate"] [src].</span>")
/obj/item/borg/projectile_dampen/update_icon() /obj/item/borg/projectile_dampen/update_icon_state()
icon_state = "[initial(icon_state)][active]" icon_state = "[initial(icon_state)][active]"
/obj/item/borg/projectile_dampen/proc/activate_field() /obj/item/borg/projectile_dampen/proc/activate_field()
+8 -8
View File
@@ -39,20 +39,20 @@
chest.cell = new /obj/item/stock_parts/cell/high/plus(chest) chest.cell = new /obj/item/stock_parts/cell/high/plus(chest)
..() ..()
/obj/item/robot_suit/update_icon() /obj/item/robot_suit/update_overlays()
cut_overlays() . = ..()
if(l_arm) if(l_arm)
add_overlay("[l_arm.icon_state]+o") . += "[l_arm.icon_state]+o"
if(r_arm) if(r_arm)
add_overlay("[r_arm.icon_state]+o") . += "[r_arm.icon_state]+o"
if(chest) if(chest)
add_overlay("[chest.icon_state]+o") . += "[chest.icon_state]+o"
if(l_leg) if(l_leg)
add_overlay("[l_leg.icon_state]+o") . += "[l_leg.icon_state]+o"
if(r_leg) if(r_leg)
add_overlay("[r_leg.icon_state]+o") . += "[r_leg.icon_state]+o"
if(head) if(head)
add_overlay("[head.icon_state]+o") . += "[head.icon_state]+o"
/obj/item/robot_suit/proc/check_completion() /obj/item/robot_suit/proc/check_completion()
if(src.l_arm && src.r_arm) if(src.l_arm && src.r_arm)
@@ -364,12 +364,9 @@
to_chat(toggle_action.owner, "<span class='notice'>You activate the self-repair module.</span>") to_chat(toggle_action.owner, "<span class='notice'>You activate the self-repair module.</span>")
activate_sr() activate_sr()
/obj/item/borg/upgrade/selfrepair/update_icon() /obj/item/borg/upgrade/selfrepair/update_icon_state()
if(toggle_action) if(toggle_action)
icon_state = "selfrepair_[on ? "on" : "off"]" icon_state = "selfrepair_[on ? "on" : "off"]"
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
else else
icon_state = "cyborg_upgrade5" icon_state = "cyborg_upgrade5"

Some files were not shown because too many files have changed in this diff Show More