Ok, done.
This commit is contained in:
@@ -63,7 +63,7 @@
|
||||
addtimer(CALLBACK(src, .proc/emagNotify), 150)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/vr_sleeper/update_icon()
|
||||
/obj/machinery/vr_sleeper/update_icon_state()
|
||||
icon_state = "[initial(icon_state)][state_open ? "-open" : ""]"
|
||||
|
||||
/obj/machinery/vr_sleeper/open_machine()
|
||||
|
||||
@@ -244,8 +244,9 @@ Difficulty: Very Hard
|
||||
var/list/stored_items = list()
|
||||
var/list/blacklist = list()
|
||||
|
||||
/obj/machinery/smartfridge/black_box/update_icon()
|
||||
return
|
||||
/obj/machinery/smartfridge/black_box/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/update_icon_blocker)
|
||||
|
||||
/obj/machinery/smartfridge/black_box/accept_check(obj/item/O)
|
||||
if(!istype(O))
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
var/icon_state_unpowered = null // Icon state when the computer is turned off.
|
||||
var/icon_state_powered = null // Icon state when the computer is turned on.
|
||||
var/icon_state_menu = "menu" // Icon state overlay when the computer is turned on, but no program is loaded that would override the screen.
|
||||
var/display_overlays = TRUE // If FALSE, don't draw overlays on this device at all
|
||||
var/max_hardware_size = 0 // Maximal hardware w_class. Tablets/PDAs have 1, laptops 2, consoles 4.
|
||||
var/steel_sheet_cost = 5 // Amount of steel sheets refunded when disassembling an empty frame of this computer.
|
||||
|
||||
@@ -208,20 +209,26 @@
|
||||
else if(obj_integrity < max_integrity)
|
||||
. += "<span class='warning'>It is damaged.</span>"
|
||||
|
||||
/obj/item/modular_computer/update_icon()
|
||||
cut_overlays()
|
||||
/obj/item/modular_computer/update_icon_state()
|
||||
if(!enabled)
|
||||
icon_state = icon_state_unpowered
|
||||
else
|
||||
icon_state = icon_state_powered
|
||||
|
||||
|
||||
/obj/item/modular_computer/update_overlays()
|
||||
. = ..()
|
||||
if(!display_overlays)
|
||||
return
|
||||
if(enabled)
|
||||
if(active_program)
|
||||
add_overlay(active_program.program_icon_state ? active_program.program_icon_state : icon_state_menu)
|
||||
. += active_program.program_icon_state ? active_program.program_icon_state : icon_state_menu
|
||||
else
|
||||
add_overlay(icon_state_menu)
|
||||
. += icon_state_menu
|
||||
|
||||
if(obj_integrity <= integrity_failure * max_integrity)
|
||||
add_overlay("bsod")
|
||||
add_overlay("broken")
|
||||
. += "bsod"
|
||||
. += "broken"
|
||||
|
||||
|
||||
// On-click handling. Turns on the computer if it's off and opens the GUI.
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
screen_on = 0 // Starts closed
|
||||
var/start_open = TRUE // unless this var is set to 1
|
||||
var/icon_state_closed = "laptop-closed"
|
||||
display_overlays = FALSE
|
||||
var/w_class_open = WEIGHT_CLASS_BULKY
|
||||
|
||||
/obj/item/modular_computer/laptop/examine(mob/user)
|
||||
@@ -31,12 +32,11 @@
|
||||
if(start_open && !screen_on)
|
||||
toggle_open()
|
||||
|
||||
/obj/item/modular_computer/laptop/update_icon()
|
||||
if(screen_on)
|
||||
..()
|
||||
else
|
||||
cut_overlays()
|
||||
/obj/item/modular_computer/laptop/update_icon_state()
|
||||
if(!screen_on)
|
||||
icon_state = icon_state_closed
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/item/modular_computer/laptop/attack_self(mob/user)
|
||||
if(!screen_on)
|
||||
@@ -97,6 +97,7 @@
|
||||
w_class = w_class_open
|
||||
|
||||
screen_on = !screen_on
|
||||
display_overlays = screen_on
|
||||
update_icon()
|
||||
|
||||
|
||||
|
||||
@@ -16,15 +16,15 @@
|
||||
machinery_computer.cpu = null
|
||||
machinery_computer = null
|
||||
|
||||
/obj/item/modular_computer/processor/New(comp)
|
||||
/obj/item/modular_computer/processor/Initialize(mapload)
|
||||
. = ..()
|
||||
if(!comp || !istype(comp, /obj/machinery/modular_computer))
|
||||
if(!loc || !istype(loc, /obj/machinery/modular_computer))
|
||||
CRASH("Inapropriate type passed to obj/item/modular_computer/processor/New()! Aborting.")
|
||||
return
|
||||
// Obtain reference to machinery computer
|
||||
all_components = list()
|
||||
idle_threads = list()
|
||||
machinery_computer = comp
|
||||
machinery_computer = loc
|
||||
machinery_computer.cpu = src
|
||||
hardware_flag = machinery_computer.hardware_flag
|
||||
max_hardware_size = machinery_computer.max_hardware_size
|
||||
@@ -34,14 +34,11 @@
|
||||
integrity_failure = machinery_computer.integrity_failure
|
||||
base_active_power_usage = machinery_computer.base_active_power_usage
|
||||
base_idle_power_usage = machinery_computer.base_idle_power_usage
|
||||
machinery_computer.RegisterSignal(src, COMSIG_ATOM_UPDATED_ICON, /atom/proc/update_icon) //when we update_icon, also update the computer
|
||||
|
||||
/obj/item/modular_computer/processor/relay_qdel()
|
||||
qdel(machinery_computer)
|
||||
|
||||
/obj/item/modular_computer/processor/update_icon()
|
||||
if(machinery_computer)
|
||||
return machinery_computer.update_icon()
|
||||
|
||||
// This thing is not meant to be used on it's own, get topic data from our machinery owner.
|
||||
//obj/item/modular_computer/processor/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
|
||||
// if(!machinery_computer)
|
||||
|
||||
@@ -15,14 +15,11 @@
|
||||
var/has_variants = TRUE
|
||||
var/finish_color = null
|
||||
|
||||
/obj/item/modular_computer/tablet/update_icon()
|
||||
..()
|
||||
/obj/item/modular_computer/tablet/update_icon_state()
|
||||
if(has_variants)
|
||||
if(!finish_color)
|
||||
finish_color = pick("red","blue","brown","green","black")
|
||||
icon_state = "tablet-[finish_color]"
|
||||
icon_state_unpowered = "tablet-[finish_color]"
|
||||
icon_state_powered = "tablet-[finish_color]"
|
||||
icon_state = icon_state_powered = icon_state_unpowered = "tablet-[finish_color]"
|
||||
|
||||
/obj/item/modular_computer/tablet/syndicate_contract_uplink
|
||||
name = "contractor tablet"
|
||||
|
||||
@@ -48,26 +48,28 @@
|
||||
if(cpu)
|
||||
. |= cpu.emag_act(user)
|
||||
|
||||
/obj/machinery/modular_computer/update_icon()
|
||||
cut_overlays()
|
||||
icon_state = icon_state_powered
|
||||
/obj/machinery/modular_computer/update_icon_state()
|
||||
if(cpu?.enabled)
|
||||
icon_state = icon_state_powered
|
||||
else if(stat & NOPOWER || !(cpu?.use_power()))
|
||||
icon_state = icon_state_unpowered
|
||||
|
||||
/obj/machinery/modular_computer/update_overlays()
|
||||
. = ..()
|
||||
if(!cpu || !cpu.enabled)
|
||||
if (!(stat & NOPOWER) && (cpu && cpu.use_power()))
|
||||
add_overlay(screen_icon_screensaver)
|
||||
else
|
||||
icon_state = icon_state_unpowered
|
||||
. += screen_icon_screensaver
|
||||
set_light(0)
|
||||
else
|
||||
set_light(light_strength)
|
||||
if(cpu.active_program)
|
||||
add_overlay(cpu.active_program.program_icon_state ? cpu.active_program.program_icon_state : screen_icon_state_menu)
|
||||
. += cpu.active_program.program_icon_state ? cpu.active_program.program_icon_state : screen_icon_state_menu
|
||||
else
|
||||
add_overlay(screen_icon_state_menu)
|
||||
. += screen_icon_state_menu
|
||||
|
||||
if(cpu && cpu.obj_integrity <= cpu.integrity_failure * cpu.max_integrity)
|
||||
add_overlay("bsod")
|
||||
add_overlay("broken")
|
||||
. += "bsod"
|
||||
. += "broken"
|
||||
|
||||
// Eject ID card from computer, if it has ID slot with card inside.
|
||||
/obj/machinery/modular_computer/proc/eject_id()
|
||||
|
||||
@@ -53,7 +53,7 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
picture = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/newscaster/update_icon()
|
||||
/obj/machinery/newscaster/update_icon_state()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
icon_state = "newscaster_off"
|
||||
else
|
||||
|
||||
@@ -25,14 +25,14 @@
|
||||
QDEL_NULL(toppaper) //let movable/Destroy handle the rest
|
||||
return ..()
|
||||
|
||||
/obj/item/clipboard/update_icon()
|
||||
cut_overlays()
|
||||
/obj/item/clipboard/update_overlays()
|
||||
. = ..()
|
||||
if(toppaper)
|
||||
add_overlay(toppaper.icon_state)
|
||||
copy_overlays(toppaper)
|
||||
. += toppaper.icon_state
|
||||
. += toppaper.overlays
|
||||
if(haspen)
|
||||
add_overlay("clipboard_pen")
|
||||
add_overlay("clipboard_over")
|
||||
. += "clipboard_pen"
|
||||
. += "clipboard_over"
|
||||
|
||||
|
||||
/obj/item/clipboard/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
@@ -7,13 +7,14 @@
|
||||
var/datum/mind/target
|
||||
item_flags = NOBLUDGEON
|
||||
|
||||
/obj/item/paper/contract/ComponentInitialize()
|
||||
return
|
||||
. = ..()
|
||||
AddElement(/datum/element/update_icon_blocker)
|
||||
|
||||
/obj/item/paper/contract/proc/update_text()
|
||||
return
|
||||
|
||||
/obj/item/paper/contract/update_icon()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/paper/contract/employment
|
||||
icon_state = "paper_words"
|
||||
|
||||
|
||||
@@ -28,11 +28,10 @@
|
||||
icon_state = "folder_white"
|
||||
|
||||
|
||||
/obj/item/folder/update_icon()
|
||||
cut_overlays()
|
||||
/obj/item/folder/update_overlays()
|
||||
. = ..()
|
||||
if(contents.len)
|
||||
add_overlay("folder_paper")
|
||||
|
||||
. += "folder_paper"
|
||||
|
||||
/obj/item/folder/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/paper) || istype(W, /obj/item/photo) || istype(W, /obj/item/documents))
|
||||
|
||||
@@ -78,8 +78,7 @@
|
||||
return get_dist(src, target) < 2
|
||||
return ..()
|
||||
|
||||
/obj/item/paper/update_icon()
|
||||
|
||||
/obj/item/paper/update_icon_state()
|
||||
if(resistance_flags & ON_FIRE)
|
||||
icon_state = "paper_onfire"
|
||||
return
|
||||
@@ -379,8 +378,9 @@
|
||||
icon_state = "scrap"
|
||||
slot_flags = null
|
||||
|
||||
/obj/item/paper/crumpled/update_icon()
|
||||
return
|
||||
/obj/item/paper/crumpled/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/update_icon_blocker)
|
||||
|
||||
/obj/item/paper/crumpled/bloody
|
||||
icon_state = "scrap_bloodied"
|
||||
|
||||
@@ -34,13 +34,13 @@
|
||||
return (BRUTELOSS)
|
||||
|
||||
|
||||
/obj/item/papercutter/update_icon()
|
||||
..()
|
||||
cut_overlays()
|
||||
/obj/item/papercutter/update_icon_state()
|
||||
icon_state = (storedcutter ? "[initial(icon_state)]-cutter" : "[initial(icon_state)]")
|
||||
if(storedpaper)
|
||||
add_overlay("paper")
|
||||
|
||||
/obj/item/papercutter/update_overlays()
|
||||
. = ..()
|
||||
if(storedpaper)
|
||||
. += "paper"
|
||||
|
||||
/obj/item/papercutter/attackby(obj/item/P, mob/user, params)
|
||||
if(istype(P, /obj/item/paper) && !storedpaper)
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
else if(istype(over_object, /obj/screen/inventory/hand))
|
||||
var/obj/screen/inventory/hand/H = over_object
|
||||
M.putItemFromInventoryInHandIfPossible(src, H.held_index)
|
||||
|
||||
|
||||
else
|
||||
. = ..()
|
||||
|
||||
@@ -125,14 +125,16 @@
|
||||
. += "It doesn't contain anything."
|
||||
|
||||
|
||||
/obj/item/paper_bin/update_icon()
|
||||
/obj/item/paper_bin/update_icon_state()
|
||||
if(total_paper < 1)
|
||||
icon_state = "paper_bin0"
|
||||
else
|
||||
icon_state = "[initial(icon_state)]"
|
||||
cut_overlays()
|
||||
|
||||
/obj/item/paper_bin/update_overlays()
|
||||
. = ..()
|
||||
if(bin_pen)
|
||||
add_overlay(mutable_appearance(bin_pen.icon, bin_pen.icon_state))
|
||||
. += mutable_appearance(bin_pen.icon, bin_pen.icon_state)
|
||||
|
||||
/obj/item/paper_bin/construction
|
||||
name = "construction paper bin"
|
||||
|
||||
@@ -55,12 +55,12 @@
|
||||
sleep(10)
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/paperplane/update_icon()
|
||||
cut_overlays()
|
||||
/obj/item/paperplane/update_overlays()
|
||||
. = ..()
|
||||
var/list/stamped = internalPaper.stamped
|
||||
if(stamped)
|
||||
for(var/S in stamped)
|
||||
add_overlay("paperplane_[S]")
|
||||
. += "paperplane_[S]"
|
||||
|
||||
/obj/item/paperplane/attack_self(mob/user)
|
||||
to_chat(user, "<span class='notice'>You unfold [src].</span>")
|
||||
|
||||
@@ -179,9 +179,10 @@
|
||||
sharpness = IS_SHARP
|
||||
var/on = FALSE
|
||||
|
||||
/obj/item/pen/edagger/Initialize()
|
||||
/obj/item/pen/edagger/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 60, 100, 0, 'sound/weapons/blade1.ogg')
|
||||
AddElement(/datum/element/update_icon_updates_onmob)
|
||||
|
||||
/obj/item/pen/edagger/get_sharpness()
|
||||
return on * sharpness
|
||||
@@ -209,10 +210,9 @@
|
||||
to_chat(user, "<span class='warning'>[src] is now active.</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/pen/edagger/update_icon()
|
||||
/obj/item/pen/edagger/update_icon_state()
|
||||
if(on)
|
||||
icon_state = "edagger"
|
||||
item_state = "edagger"
|
||||
icon_state = item_state = "edagger"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
else
|
||||
|
||||
@@ -43,10 +43,10 @@
|
||||
return list()
|
||||
return ..()
|
||||
|
||||
/obj/item/wallframe/picture/update_icon()
|
||||
cut_overlays()
|
||||
/obj/item/wallframe/picture/update_overlays()
|
||||
. = ..()
|
||||
if(displayed)
|
||||
add_overlay(image(displayed))
|
||||
. += image(displayed)
|
||||
|
||||
/obj/item/wallframe/picture/after_attach(obj/O)
|
||||
..()
|
||||
@@ -145,10 +145,10 @@
|
||||
if(framed)
|
||||
framed.show(user)
|
||||
|
||||
/obj/structure/sign/picture_frame/update_icon()
|
||||
cut_overlays()
|
||||
/obj/structure/sign/picture_frame/update_overlays()
|
||||
. = ..()
|
||||
if(framed)
|
||||
add_overlay(image(framed))
|
||||
. += image(framed)
|
||||
|
||||
/obj/structure/sign/picture_frame/deconstruct(disassembled = TRUE)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
if(setdesc && P.picture_desc)
|
||||
desc = P.picture_desc
|
||||
|
||||
/obj/item/photo/update_icon()
|
||||
/obj/item/photo/update_icon_state()
|
||||
if(!istype(picture) || !picture.picture_image)
|
||||
return
|
||||
var/icon/I = picture.get_small_icon()
|
||||
|
||||
@@ -297,8 +297,7 @@
|
||||
mist_on()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/pool/controller/update_icon()
|
||||
. = ..()
|
||||
/obj/machinery/pool/controller/update_icon_state()
|
||||
icon_state = "poolc_[temperature]"
|
||||
|
||||
/obj/machinery/pool/controller/proc/CanUpTemp(mob/user)
|
||||
@@ -412,7 +411,7 @@
|
||||
/obj/machinery/pool/controller/proc/mist_on() //Spawn /obj/effect/mist (from the shower) on all linked pool tiles
|
||||
if(mist_state)
|
||||
return
|
||||
mist_off() //make sure it cycles and deletes everything
|
||||
mist_off() //make sure it cycles and deletes everything
|
||||
mist_state = TRUE
|
||||
for(var/X in linked_turfs)
|
||||
var/turf/open/pool/W = X
|
||||
|
||||
@@ -151,10 +151,11 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/power/am_control_unit/update_icon()
|
||||
/obj/machinery/power/am_control_unit/update_icon_state()
|
||||
if(active)
|
||||
icon_state = "control_on"
|
||||
else icon_state = "control"
|
||||
else
|
||||
icon_state = "control"
|
||||
//No other icons for it atm
|
||||
|
||||
|
||||
|
||||
@@ -107,10 +107,9 @@
|
||||
check_stability()
|
||||
|
||||
|
||||
/obj/machinery/am_shielding/update_icon()
|
||||
/obj/machinery/am_shielding/update_icon_state()
|
||||
dirs = 0
|
||||
coredirs = 0
|
||||
cut_overlays()
|
||||
for(var/direction in GLOB.alldirs)
|
||||
var/turf/T = get_step(loc, direction)
|
||||
for(var/obj/machinery/machine in T)
|
||||
@@ -137,8 +136,10 @@
|
||||
|
||||
icon_state = "[prefix]shield_[icondirs]"
|
||||
|
||||
/obj/machinery/am_shielding/update_overlays()
|
||||
. = ..()
|
||||
if(core_check())
|
||||
add_overlay("core[control_unit && control_unit.active]")
|
||||
. += "core[control_unit?.active]"
|
||||
if(!processing)
|
||||
setup_core()
|
||||
else if(processing)
|
||||
|
||||
@@ -130,7 +130,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
invisibility = i ? INVISIBILITY_MAXIMUM : 0
|
||||
update_icon()
|
||||
|
||||
/obj/structure/cable/update_icon()
|
||||
/obj/structure/cable/update_icon_state()
|
||||
icon_state = "[d1]-[d2]"
|
||||
color = null
|
||||
add_atom_colour(cable_color, FIXED_COLOUR_PRIORITY)
|
||||
|
||||
@@ -58,16 +58,16 @@
|
||||
else
|
||||
return PROCESS_KILL
|
||||
|
||||
/obj/item/stock_parts/cell/update_icon()
|
||||
cut_overlays()
|
||||
/obj/item/stock_parts/cell/update_overlays()
|
||||
. = ..()
|
||||
if(grown_battery)
|
||||
add_overlay(image('icons/obj/power.dmi',"grown_wires"))
|
||||
. += image('icons/obj/power.dmi',"grown_wires")
|
||||
if(charge < 0.01)
|
||||
return
|
||||
else if(charge/maxcharge >=0.995)
|
||||
add_overlay("cell-o2")
|
||||
. += "cell-o2"
|
||||
else
|
||||
add_overlay("cell-o1")
|
||||
. += "cell-o1"
|
||||
|
||||
/obj/item/stock_parts/cell/proc/percent() // return % charge of cell
|
||||
return 100*charge/maxcharge
|
||||
@@ -281,8 +281,9 @@
|
||||
maxcharge = 50000
|
||||
ratingdesc = FALSE
|
||||
|
||||
/obj/item/stock_parts/cell/infinite/abductor/update_icon()
|
||||
return
|
||||
/obj/item/stock_parts/cell/infinite/abductor/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/update_icon_blocker)
|
||||
|
||||
|
||||
/obj/item/stock_parts/cell/potato
|
||||
|
||||
@@ -30,19 +30,15 @@
|
||||
SSair.atmos_machinery -= src
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/generator/update_icon()
|
||||
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
cut_overlays()
|
||||
else
|
||||
cut_overlays()
|
||||
|
||||
/obj/machinery/power/generator/update_overlays()
|
||||
. = ..()
|
||||
if(!(stat & (NOPOWER|BROKEN)))
|
||||
var/L = min(round(lastgenlev/100000),11)
|
||||
if(L != 0)
|
||||
add_overlay(image('icons/obj/power.dmi', "teg-op[L]"))
|
||||
. += image('icons/obj/power.dmi', "teg-op[L]")
|
||||
|
||||
if(hot_circ && cold_circ)
|
||||
add_overlay("teg-oc[lastcirc]")
|
||||
. += "teg-oc[lastcirc]"
|
||||
|
||||
|
||||
#define GENRATE 800 // generator output coefficient from Q
|
||||
|
||||
@@ -44,8 +44,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
|
||||
if(tesla_flags & TESLA_MACHINE_EXPLOSIVE)
|
||||
qdel(src)//like the singulo, tesla deletes it. stops it from exploding over and over
|
||||
|
||||
/obj/machinery/gravity_generator/update_icon()
|
||||
..()
|
||||
/obj/machinery/gravity_generator/update_icon_state()
|
||||
icon_state = "[get_status()]_[sprite_number]"
|
||||
|
||||
/obj/machinery/gravity_generator/proc/get_status()
|
||||
@@ -156,6 +155,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
|
||||
part.main_part = src
|
||||
parts += part
|
||||
part.update_icon()
|
||||
part.RegisterSignal(src, COMSIG_ATOM_UPDATED_ICON, /atom/proc/update_icon)
|
||||
|
||||
/obj/machinery/gravity_generator/main/proc/connected_parts()
|
||||
return parts.len == 8
|
||||
@@ -235,7 +235,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
|
||||
data["charging_state"] = charging_state
|
||||
data["on"] = on
|
||||
data["operational"] = (stat & BROKEN) ? FALSE : TRUE
|
||||
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/gravity_generator/main/ui_act(action, params)
|
||||
@@ -259,11 +259,6 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
|
||||
return "fix[min(broken_state, 3)]"
|
||||
return on || charging_state != POWER_IDLE ? "on" : "off"
|
||||
|
||||
/obj/machinery/gravity_generator/main/update_icon()
|
||||
..()
|
||||
for(var/obj/O in parts)
|
||||
O.update_icon()
|
||||
|
||||
// Set the charging state based on power/breaker.
|
||||
/obj/machinery/gravity_generator/main/proc/set_power()
|
||||
var/new_state = FALSE
|
||||
|
||||
@@ -291,8 +291,7 @@
|
||||
QDEL_NULL(cell)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/light/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/light/update_icon_state()
|
||||
switch(status) // set icon_states
|
||||
if(LIGHT_OK)
|
||||
var/area/A = get_base_area(src)
|
||||
@@ -303,17 +302,20 @@
|
||||
icon_state = "[base_state]_hijacked"
|
||||
else
|
||||
icon_state = "[base_state]"
|
||||
if(on)
|
||||
var/mutable_appearance/glowybit = mutable_appearance(overlayicon, base_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
|
||||
glowybit.alpha = CLAMP(light_power*250, 30, 200)
|
||||
add_overlay(glowybit)
|
||||
if(LIGHT_EMPTY)
|
||||
icon_state = "[base_state]-empty"
|
||||
if(LIGHT_BURNED)
|
||||
icon_state = "[base_state]-burned"
|
||||
if(LIGHT_BROKEN)
|
||||
icon_state = "[base_state]-broken"
|
||||
return
|
||||
|
||||
/obj/machinery/light/update_overlays()
|
||||
. = ..()
|
||||
if(on && status == LIGHT_OK)
|
||||
var/mutable_appearance/glowybit = mutable_appearance(overlayicon, base_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
|
||||
glowybit.alpha = CLAMP(light_power*250, 30, 200)
|
||||
. += glowybit
|
||||
|
||||
|
||||
// update the icon_state and luminosity of the light depending on its state
|
||||
/obj/machinery/light/proc/update(trigger = TRUE)
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
/obj/machinery/power/port_gen/proc/handleInactive()
|
||||
return
|
||||
|
||||
/obj/machinery/power/port_gen/update_icon()
|
||||
/obj/machinery/power/port_gen/update_icon_state()
|
||||
icon_state = "[base_icon]_[active]"
|
||||
|
||||
/obj/machinery/power/port_gen/process()
|
||||
|
||||
@@ -204,14 +204,14 @@
|
||||
if(loaded_tank && active && pulse_strength > RAD_COLLECTOR_EFFICIENCY)
|
||||
stored_power += (pulse_strength-RAD_COLLECTOR_EFFICIENCY)*RAD_COLLECTOR_COEFFICIENT
|
||||
|
||||
/obj/machinery/power/rad_collector/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/power/rad_collector/update_overlays()
|
||||
. = ..()
|
||||
if(loaded_tank)
|
||||
add_overlay("ptank")
|
||||
. += "ptank"
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(active)
|
||||
add_overlay("on")
|
||||
. += "on"
|
||||
|
||||
|
||||
/obj/machinery/power/rad_collector/proc/toggle_power()
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
QDEL_NULL(sparks)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/emitter/update_icon()
|
||||
/obj/machinery/power/emitter/update_icon_state()
|
||||
if (active && powernet && avail(active_power_usage))
|
||||
icon_state = icon_state_on
|
||||
else
|
||||
|
||||
@@ -44,14 +44,14 @@ field_generator power level display
|
||||
var/list/obj/machinery/field/generator/connected_gens
|
||||
var/clean_up = 0
|
||||
|
||||
/obj/machinery/field/generator/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/field/generator/update_overlays()
|
||||
. = ..()
|
||||
if(warming_up)
|
||||
add_overlay("+a[warming_up]")
|
||||
. += "+a[warming_up]"
|
||||
if(fields.len)
|
||||
add_overlay("+on")
|
||||
. += "+on"
|
||||
if(power_level)
|
||||
add_overlay("+p[power_level]")
|
||||
. += "+p[power_level]"
|
||||
|
||||
|
||||
/obj/machinery/field/generator/Initialize()
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
investigate_log("was moved whilst active; it <font color='red'>powered down</font>.", INVESTIGATE_SINGULO)
|
||||
|
||||
|
||||
/obj/structure/particle_accelerator/update_icon()
|
||||
/obj/structure/particle_accelerator/update_icon_state()
|
||||
switch(construction_state)
|
||||
if(PA_CONSTRUCTION_UNSECURED,PA_CONSTRUCTION_UNWIRED)
|
||||
icon_state="[reference]"
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
active = 0
|
||||
connected_parts.Cut()
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/update_icon()
|
||||
/obj/machinery/particle_accelerator/control_box/update_icon_state()
|
||||
if(active)
|
||||
icon_state = "control_boxp1"
|
||||
else
|
||||
|
||||
@@ -199,29 +199,25 @@
|
||||
stat |= BROKEN
|
||||
|
||||
|
||||
/obj/machinery/power/smes/update_icon()
|
||||
cut_overlays()
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
|
||||
if(panel_open)
|
||||
/obj/machinery/power/smes/update_overlays()
|
||||
. = ..()
|
||||
if((stat & BROKEN) || panel_open)
|
||||
return
|
||||
|
||||
if(outputting)
|
||||
add_overlay("smes-op1")
|
||||
. += "smes-op1"
|
||||
else
|
||||
add_overlay("smes-op0")
|
||||
. += "smes-op0"
|
||||
|
||||
if(inputting)
|
||||
add_overlay("smes-oc1")
|
||||
. += "smes-oc1"
|
||||
else
|
||||
if(input_attempt)
|
||||
add_overlay("smes-oc0")
|
||||
. += "smes-oc0"
|
||||
|
||||
var/clevel = chargedisplay()
|
||||
if(clevel>0)
|
||||
add_overlay("smes-og[clevel]")
|
||||
|
||||
. += "smes-og[clevel]"
|
||||
|
||||
/obj/machinery/power/smes/proc/chargedisplay()
|
||||
return CLAMP(round(5.5*charge/capacity),0,5)
|
||||
|
||||
@@ -39,8 +39,7 @@
|
||||
QDEL_NULL(BB)
|
||||
return ..()
|
||||
|
||||
/obj/item/ammo_casing/update_icon()
|
||||
..()
|
||||
/obj/item/ammo_casing/update_icon_state()
|
||||
icon_state = "[initial(icon_state)][BB ? "-live" : ""]"
|
||||
desc = "[initial(desc)][BB ? "" : " This one is spent."]"
|
||||
|
||||
|
||||
@@ -11,6 +11,5 @@
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/obj/item/ammo_casing/caseless/update_icon()
|
||||
..()
|
||||
/obj/item/ammo_casing/caseless/update_icon_state()
|
||||
icon_state = "[initial(icon_state)]"
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
harmful = FALSE
|
||||
var/modified = FALSE
|
||||
|
||||
/obj/item/ammo_casing/caseless/foam_dart/update_icon()
|
||||
..()
|
||||
/obj/item/ammo_casing/caseless/foam_dart/update_icon_state()
|
||||
if (modified)
|
||||
icon_state = "foamdart_empty"
|
||||
desc = "It's nerf or nothing! ... Although, this one doesn't look too safe."
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
chamber_round()
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/ballistic/update_icon()
|
||||
..()
|
||||
/obj/item/gun/ballistic/update_icon_state()
|
||||
if(current_skin)
|
||||
icon_state = "[unique_reskin[current_skin]][suppressed ? "-suppressed" : ""][sawn_off ? "-sawn" : ""]"
|
||||
else
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
to_chat(user, "<span class='notice'>You notch the arrow.</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/gun/ballistic/bow/update_icon()
|
||||
/obj/item/gun/ballistic/bow/update_icon_state()
|
||||
icon_state = "[initial(icon_state)]_[get_ammo() ? (chambered ? "firing" : "loaded") : "unloaded"]"
|
||||
|
||||
/obj/item/gun/ballistic/bow/can_shoot()
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
M.putItemFromInventoryInHandIfPossible(src, H.held_index)
|
||||
|
||||
|
||||
/obj/item/minigunpack/update_icon()
|
||||
/obj/item/minigunpack/update_icon_state()
|
||||
if(armed)
|
||||
icon_state = "notholstered"
|
||||
else
|
||||
|
||||
@@ -73,9 +73,6 @@
|
||||
recharge_newshot()
|
||||
return 1
|
||||
|
||||
/obj/item/gun/magic/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/gun/magic/shoot_with_empty_chamber(mob/living/user as mob|obj)
|
||||
to_chat(user, "<span class='warning'>The [name] whizzles quietly.</span>")
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
. = ..()
|
||||
. += "Has [charges] charge\s remaining."
|
||||
|
||||
/obj/item/gun/magic/wand/update_icon()
|
||||
/obj/item/gun/magic/wand/update_icon_state()
|
||||
icon_state = "[initial(icon_state)][charges ? "" : "-drained"]"
|
||||
|
||||
/obj/item/gun/magic/wand/attack(atom/target, mob/living/user)
|
||||
|
||||
@@ -144,14 +144,14 @@
|
||||
..()
|
||||
icon_state = "[(nopower_state && !powered()) ? nopower_state : initial(icon_state)]"
|
||||
|
||||
/obj/machinery/chem_dispenser/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/chem_dispenser/update_overlays()
|
||||
. = ..()
|
||||
if(has_panel_overlay && panel_open)
|
||||
add_overlay(mutable_appearance(icon, "[initial(icon_state)]_panel-o"))
|
||||
. += mutable_appearance(icon, "[initial(icon_state)]_panel-o")
|
||||
|
||||
if(beaker)
|
||||
beaker_overlay = display_beaker()
|
||||
add_overlay(beaker_overlay)
|
||||
. += beaker_overlay
|
||||
|
||||
/obj/machinery/chem_dispenser/emag_act(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
beaker = null
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/chem_heater/update_icon()
|
||||
/obj/machinery/chem_heater/update_icon_state()
|
||||
if(beaker)
|
||||
icon_state = "mixer1b"
|
||||
else
|
||||
|
||||
@@ -67,15 +67,17 @@
|
||||
bottle = null
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/chem_master/update_icon()
|
||||
cut_overlays()
|
||||
if (stat & BROKEN)
|
||||
add_overlay("waitlight")
|
||||
/obj/machinery/chem_master/update_icon_state()
|
||||
if(beaker)
|
||||
icon_state = "mixer1"
|
||||
else
|
||||
icon_state = "mixer0"
|
||||
|
||||
/obj/machinery/chem_master/update_overlays()
|
||||
. = ..()
|
||||
if (stat & BROKEN)
|
||||
. += "waitlight"
|
||||
|
||||
/obj/machinery/chem_master/blob_act(obj/structure/blob/B)
|
||||
if (prob(50))
|
||||
qdel(src)
|
||||
|
||||
@@ -109,16 +109,16 @@
|
||||
update_icon()
|
||||
playsound(loc, 'sound/machines/ping.ogg', 30, 1)
|
||||
|
||||
/obj/machinery/computer/pandemic/update_icon()
|
||||
/obj/machinery/computer/pandemic/update_icon_state()
|
||||
if(stat & BROKEN)
|
||||
icon_state = (beaker ? "mixer1_b" : "mixer0_b")
|
||||
return
|
||||
|
||||
icon_state = "mixer[(beaker) ? "1" : "0"][powered() ? "" : "_nopower"]"
|
||||
if(wait)
|
||||
add_overlay("waitlight")
|
||||
else
|
||||
cut_overlays()
|
||||
icon_state = "mixer[(beaker) ? "1" : "0"][powered() ? "" : "_nopower"]"
|
||||
|
||||
/obj/machinery/computer/pandemic/update_overlays()
|
||||
. = ..()
|
||||
if(!(stat & BROKEN) && wait)
|
||||
. += "waitlight"
|
||||
|
||||
/obj/machinery/computer/pandemic/ui_interact(mob/user, ui_key = "main", datum/tgui/ui, force_open = FALSE, datum/tgui/master_ui, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
AM.forceMove(drop_location())
|
||||
holdingitems = list()
|
||||
|
||||
/obj/machinery/reagentgrinder/update_icon()
|
||||
/obj/machinery/reagentgrinder/update_icon_state()
|
||||
if(beaker)
|
||||
icon_state = "juicer1"
|
||||
else
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
for(var/obj/item/stock_parts/matter_bin/B in component_parts)
|
||||
reagents.maximum_volume += REAGENTS_BASE_VOLUME * B.rating
|
||||
|
||||
/obj/machinery/smoke_machine/update_icon()
|
||||
/obj/machinery/smoke_machine/update_icon_state()
|
||||
if((!is_operational()) || (!on) || (reagents.total_volume == 0))
|
||||
if (panel_open)
|
||||
icon_state = "smoke0-o"
|
||||
@@ -42,7 +42,6 @@
|
||||
icon_state = "smoke0"
|
||||
else
|
||||
icon_state = "smoke1"
|
||||
return ..()
|
||||
|
||||
/obj/machinery/smoke_machine/RefreshParts()
|
||||
var/new_volume = REAGENTS_BASE_VOLUME
|
||||
|
||||
@@ -34,15 +34,11 @@
|
||||
else
|
||||
name = "blood pack"
|
||||
|
||||
/obj/item/reagent_containers/blood/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
/obj/item/reagent_containers/blood/update_overlays()
|
||||
. = ..()
|
||||
var/v = min(round(reagents.total_volume / volume * 10), 10)
|
||||
if(v > 0)
|
||||
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "bloodpack1")
|
||||
filling.icon_state = "bloodpack[v]"
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
. += mutable_appearance('icons/obj/reagentfillings.dmi', "bloodpack[v]", color = mix_color_from_reagents(reagents.reagent_list))
|
||||
|
||||
/obj/item/reagent_containers/blood/random
|
||||
icon_state = "random_bloodpack"
|
||||
@@ -120,7 +116,7 @@
|
||||
else
|
||||
if(!do_mob(user, C, 10))
|
||||
return
|
||||
|
||||
|
||||
to_chat(user, "<span class='notice'>You take a sip from the [src].</span>")
|
||||
user.visible_message("<span class='notice'>[user] puts the [src] up to their mouth.</span>")
|
||||
if(reagents.total_volume <= 0) // Safety: In case you spam clicked the blood bag on yourself, and it is now empty (below will divide by zero)
|
||||
|
||||
@@ -18,26 +18,27 @@
|
||||
/obj/item/reagent_containers/glass/bottle/on_reagent_change(changetype)
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/update_icon()
|
||||
cut_overlays()
|
||||
/obj/item/reagent_containers/glass/bottle/update_overlays()
|
||||
. = ..()
|
||||
if(!cached_icon)
|
||||
cached_icon = icon_state
|
||||
if(reagents.total_volume)
|
||||
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "[icon_state]-10")
|
||||
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "[cached_icon]-10", color = mix_color_from_reagents(reagents.reagent_list))
|
||||
|
||||
var/percent = round((reagents.total_volume / volume) * 100)
|
||||
switch(percent)
|
||||
if(0 to 9)
|
||||
filling.icon_state = "[icon_state]-10"
|
||||
filling.icon_state = "[cached_icon]-10"
|
||||
if(10 to 29)
|
||||
filling.icon_state = "[icon_state]25"
|
||||
filling.icon_state = "[cached_icon]25"
|
||||
if(30 to 49)
|
||||
filling.icon_state = "[icon_state]50"
|
||||
filling.icon_state = "[cached_icon]50"
|
||||
if(50 to 69)
|
||||
filling.icon_state = "[icon_state]75"
|
||||
filling.icon_state = "[cached_icon]75"
|
||||
if(70 to INFINITY)
|
||||
filling.icon_state = "[icon_state]100"
|
||||
filling.icon_state = "[cached_icon]100"
|
||||
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
. += filling
|
||||
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/epinephrine
|
||||
|
||||
@@ -86,12 +86,10 @@
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/dropper/update_icon()
|
||||
cut_overlays()
|
||||
/obj/item/reagent_containers/dropper/update_overlays()
|
||||
. = ..()
|
||||
if(reagents.total_volume)
|
||||
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "dropper")
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
. += mutable_appearance('icons/obj/reagentfillings.dmi', "dropper", color = mix_color_from_reagents(reagents.reagent_list))
|
||||
|
||||
/obj/item/reagent_containers/dropper/get_belt_overlay()
|
||||
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "pouch")
|
||||
|
||||
@@ -133,13 +133,13 @@
|
||||
/obj/item/reagent_containers/glass/beaker/on_reagent_change(changetype)
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/update_icon()
|
||||
/obj/item/reagent_containers/glass/beaker/update_overlays()
|
||||
. = ..()
|
||||
if(!cached_icon)
|
||||
cached_icon = icon_state
|
||||
cut_overlays()
|
||||
|
||||
if(reagents.total_volume)
|
||||
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "[cached_icon]10")
|
||||
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "[cached_icon]10", color = mix_color_from_reagents(reagents.reagent_list))
|
||||
|
||||
var/percent = round((reagents.total_volume / volume) * 100)
|
||||
switch(percent)
|
||||
@@ -157,9 +157,7 @@
|
||||
filling.icon_state = "[cached_icon]80"
|
||||
if(91 to INFINITY)
|
||||
filling.icon_state = "[cached_icon]100"
|
||||
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
. += filling
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/jar
|
||||
name = "honey jar"
|
||||
@@ -215,11 +213,7 @@
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,40,50,60,120,180)
|
||||
container_flags = TEMP_WEAK|APTFT_ALTCLICK|APTFT_VERB
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/plastic/update_icon()
|
||||
icon_state = "beakerlarge" // hack to lets us reuse the large beaker reagent fill states
|
||||
..()
|
||||
icon_state = "beakerwhite"
|
||||
cached_icon = "beakerlarge"
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/meta
|
||||
name = "metamaterial beaker"
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
reagents.add_reagent_list(list_reagents)
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/hypospray/medipen/update_icon()
|
||||
/obj/item/reagent_containers/hypospray/medipen/update_icon_state()
|
||||
if(reagents.total_volume > 0)
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
@@ -282,13 +282,12 @@
|
||||
vial = new start_vial
|
||||
update_icon()
|
||||
|
||||
/obj/item/hypospray/mkii/update_icon()
|
||||
..()
|
||||
/obj/item/hypospray/mkii/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/update_icon_updates_onmob)
|
||||
|
||||
/obj/item/hypospray/mkii/update_icon_state()
|
||||
icon_state = "[initial(icon_state)][vial ? "" : "-e"]"
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_hands()
|
||||
return
|
||||
|
||||
/obj/item/hypospray/mkii/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -19,37 +19,15 @@
|
||||
"pink hypovial" = "hypovial-pink"
|
||||
)
|
||||
always_reskinnable = TRUE
|
||||
cached_icon = "hypovial"
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/vial/Initialize()
|
||||
. = ..()
|
||||
if(!icon_state)
|
||||
icon_state = "hypovial"
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/vial/on_reagent_change()
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/vial/update_icon()
|
||||
cut_overlays()
|
||||
if(reagents.total_volume)
|
||||
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "hypovial10")
|
||||
|
||||
var/percent = round((reagents.total_volume / volume) * 100)
|
||||
switch(percent)
|
||||
if(0 to 9)
|
||||
filling.icon_state = "hypovial10"
|
||||
if(10 to 29)
|
||||
filling.icon_state = "hypovial25"
|
||||
if(30 to 49)
|
||||
filling.icon_state = "hypovial50"
|
||||
if(50 to 85)
|
||||
filling.icon_state = "hypovial75"
|
||||
if(86 to INFINITY)
|
||||
filling.icon_state = "hypovial100"
|
||||
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/vial/tiny
|
||||
name = "small hypovial"
|
||||
//Shouldn't be possible to get this without adminbuse
|
||||
@@ -80,27 +58,7 @@
|
||||
"large purple hypovial" = "hypoviallarge-p",
|
||||
"large black hypovial" = "hypoviallarge-t"
|
||||
)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/vial/large/update_icon()
|
||||
cut_overlays()
|
||||
if(reagents.total_volume)
|
||||
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "hypoviallarge10")
|
||||
|
||||
var/percent = round((reagents.total_volume / volume) * 100)
|
||||
switch(percent)
|
||||
if(0 to 9)
|
||||
filling.icon_state = "hypoviallarge10"
|
||||
if(10 to 29)
|
||||
filling.icon_state = "hypoviallarge25"
|
||||
if(30 to 49)
|
||||
filling.icon_state = "hypoviallarge50"
|
||||
if(50 to 85)
|
||||
filling.icon_state = "hypoviallarge75"
|
||||
if(86 to INFINITY)
|
||||
filling.icon_state = "hypoviallarge100"
|
||||
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
cached_icon = "hypoviallarge"
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/vial/large/bluespace
|
||||
possible_transfer_amounts = list(1,2,5,10,20)
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
var/mode = SYRINGE_DRAW
|
||||
var/busy = FALSE // needed for delayed drawing of blood
|
||||
var/proj_piercing = 0 //does it pierce through thick clothes when shot with syringe gun
|
||||
var/show_filling = TRUE
|
||||
custom_materials = list(/datum/material/iron=10, /datum/material/glass=20)
|
||||
reagent_flags = TRANSPARENT
|
||||
|
||||
@@ -21,6 +22,10 @@
|
||||
mode = SYRINGE_INJECT
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/update_icon_updates_onmob)
|
||||
|
||||
/obj/item/reagent_containers/syringe/on_reagent_change(changetype)
|
||||
update_icon()
|
||||
|
||||
@@ -152,29 +157,32 @@
|
||||
mode = SYRINGE_DRAW
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/reagent_containers/syringe/update_icon()
|
||||
cut_overlays()
|
||||
var/rounded_vol
|
||||
if(reagents && reagents.total_volume)
|
||||
rounded_vol = CLAMP(round((reagents.total_volume / volume * 15),5), 1, 15)
|
||||
var/image/filling_overlay = mutable_appearance('icons/obj/reagentfillings.dmi', "syringe[rounded_vol]")
|
||||
filling_overlay.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling_overlay)
|
||||
else
|
||||
rounded_vol = 0
|
||||
/obj/item/reagent_containers/syringe/update_icon_state()
|
||||
var/rounded_vol = get_rounded_vol()
|
||||
icon_state = "[rounded_vol]"
|
||||
item_state = "syringe_[rounded_vol]"
|
||||
|
||||
/obj/item/reagent_containers/syringe/update_overlays()
|
||||
. = ..()
|
||||
if(show_filling)
|
||||
var/rounded_vol = get_rounded_vol()
|
||||
if(reagents && reagents.total_volume)
|
||||
. += mutable_appearance('icons/obj/reagentfillings.dmi', "syringe[rounded_vol]", color = mix_color_from_reagents(reagents.reagent_list))
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
var/injoverlay
|
||||
switch(mode)
|
||||
if (SYRINGE_DRAW)
|
||||
injoverlay = "draw"
|
||||
if (SYRINGE_INJECT)
|
||||
injoverlay = "inject"
|
||||
add_overlay(injoverlay)
|
||||
M.update_inv_hands()
|
||||
. += injoverlay
|
||||
|
||||
///Used by update_icon() and update_overlays()
|
||||
/obj/item/reagent_containers/syringe/proc/get_rounded_vol()
|
||||
if(reagents && reagents.total_volume)
|
||||
return CLAMP(round((reagents.total_volume / volume * 15),5), 1, 15)
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/item/reagent_containers/syringe/epinephrine
|
||||
name = "syringe (epinephrine)"
|
||||
@@ -267,6 +275,7 @@
|
||||
amount_per_transfer_from_this = 20
|
||||
icon_state = "empty"
|
||||
item_state = "syringe_empty"
|
||||
show_filling = FALSE
|
||||
var/emptrig = FALSE
|
||||
|
||||
/obj/item/reagent_containers/syringe/dart/afterattack(atom/target, mob/user , proximity)
|
||||
@@ -317,28 +326,13 @@
|
||||
/obj/item/reagent_containers/syringe/dart/attack_self(mob/user)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/syringe/dart/update_icon()
|
||||
cut_overlays()
|
||||
var/rounded_vol
|
||||
|
||||
rounded_vol = "empty"
|
||||
if(reagents && reagents.total_volume)
|
||||
if(volume/round(reagents.total_volume, 1) == 1)
|
||||
rounded_vol="full"
|
||||
mode = SYRINGE_INJECT
|
||||
|
||||
icon_state = "[rounded_vol]"
|
||||
item_state = "syringe_[rounded_vol]"
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
var/injoverlay
|
||||
switch(mode)
|
||||
if (SYRINGE_DRAW)
|
||||
injoverlay = "draw"
|
||||
if (SYRINGE_INJECT)
|
||||
injoverlay = "ready"
|
||||
add_overlay(injoverlay)
|
||||
M.update_inv_hands()
|
||||
/obj/item/reagent_containers/syringe/dart/update_icon_state()
|
||||
var/empty_full = "empty"
|
||||
if(round(reagents.total_volume, 1) == reagents.maximum_volume)
|
||||
empty_full = "full"
|
||||
mode = SYRINGE_INJECT
|
||||
icon_state = "[empty_full]"
|
||||
item_state = "syringe_[empty_full]"
|
||||
|
||||
/obj/item/reagent_containers/syringe/dart/emp_act(severity)
|
||||
emptrig = TRUE
|
||||
|
||||
@@ -252,7 +252,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id)
|
||||
|
||||
// update the icon depending on the position
|
||||
|
||||
/obj/machinery/conveyor_switch/update_icon()
|
||||
/obj/machinery/conveyor_switch/update_icon_state()
|
||||
if(position<0)
|
||||
if(invert_icon)
|
||||
icon_state = "switch-fwd"
|
||||
|
||||
@@ -191,10 +191,6 @@
|
||||
AM.pipe_eject(0)
|
||||
update_icon()
|
||||
|
||||
// update the icon & overlays to reflect mode & status
|
||||
/obj/machinery/disposal/update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/disposal/proc/flush()
|
||||
flushing = TRUE
|
||||
flushAnimation()
|
||||
@@ -386,8 +382,8 @@
|
||||
pressure_charging = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/disposal/bin/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/disposal/bin/update_overlays()
|
||||
. = ..()
|
||||
if(stat & BROKEN)
|
||||
pressure_charging = FALSE
|
||||
flush = FALSE
|
||||
@@ -395,7 +391,7 @@
|
||||
|
||||
//flush handle
|
||||
if(flush)
|
||||
add_overlay("dispover-handle")
|
||||
. += "dispover-handle"
|
||||
|
||||
//only handle is shown if no power
|
||||
if(stat & NOPOWER || panel_open)
|
||||
@@ -403,13 +399,13 @@
|
||||
|
||||
//check for items in disposal - occupied light
|
||||
if(contents.len > 0)
|
||||
add_overlay("dispover-full")
|
||||
. += "dispover-full"
|
||||
|
||||
//charging and ready light
|
||||
if(pressure_charging)
|
||||
add_overlay("dispover-charge")
|
||||
. += "dispover-charge"
|
||||
else if(full_pressure)
|
||||
add_overlay("dispover-ready")
|
||||
. += "dispover-ready"
|
||||
|
||||
/obj/machinery/disposal/bin/proc/do_flush()
|
||||
set waitfor = FALSE
|
||||
|
||||
@@ -51,7 +51,7 @@ Note: Must be placed within 3 tiles of the R&D Console
|
||||
update_icon()
|
||||
reset_busy()
|
||||
|
||||
/obj/machinery/rnd/destructive_analyzer/update_icon()
|
||||
/obj/machinery/rnd/destructive_analyzer/update_icon_state()
|
||||
if(loaded_item)
|
||||
icon_state = "d_analyzer_l"
|
||||
else
|
||||
|
||||
@@ -514,7 +514,7 @@
|
||||
update_icon()
|
||||
recentlyExperimented = FALSE
|
||||
|
||||
/obj/machinery/rnd/experimentor/update_icon()
|
||||
/obj/machinery/rnd/experimentor/update_icon_state()
|
||||
icon_state = "h_lathe"
|
||||
|
||||
/obj/machinery/rnd/experimentor/proc/warn_admins(user, ReactionName)
|
||||
|
||||
@@ -519,8 +519,9 @@
|
||||
density = FALSE
|
||||
clockwork = TRUE //it'd look weird
|
||||
|
||||
/obj/machinery/computer/shuttle/pod/update_icon()
|
||||
return
|
||||
/obj/machinery/computer/shuttle/pod/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/update_icon_blocker)
|
||||
|
||||
/obj/machinery/computer/shuttle/pod/emag_act(mob/user)
|
||||
. = SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT)
|
||||
|
||||
@@ -31,14 +31,14 @@
|
||||
SSshuttle.manipulator = null
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/shuttle_manipulator/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/shuttle_manipulator/update_overlays()
|
||||
. = ..()
|
||||
var/mutable_appearance/hologram_projection = mutable_appearance(icon, "hologram_on")
|
||||
hologram_projection.pixel_y = 22
|
||||
var/mutable_appearance/hologram_ship = mutable_appearance(icon, "hologram_whiteship")
|
||||
hologram_ship.pixel_y = 27
|
||||
add_overlay(hologram_projection)
|
||||
add_overlay(hologram_ship)
|
||||
. += hologram_projection
|
||||
. += hologram_ship
|
||||
|
||||
/obj/machinery/shuttle_manipulator/can_interact(mob/user)
|
||||
// Only admins can use this, but they can use it from anywhere
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
desc = "Oh no, not again."
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/power/emitter/energycannon/magical/update_icon()
|
||||
/obj/machinery/power/emitter/energycannon/magical/update_icon_state()
|
||||
if(active)
|
||||
icon_state = icon_state_on
|
||||
else
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
anchored = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/satellite/update_icon()
|
||||
/obj/machinery/satellite/update_icon_state()
|
||||
icon_state = active ? "sat_active" : "sat_inactive"
|
||||
|
||||
/obj/machinery/satellite/attackby(obj/item/I, mob/user, params)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
if(M)
|
||||
M.adjustToxLoss(4, TRUE, TRUE) //forced to ensure people don't use it to gain tox as slime person
|
||||
|
||||
/obj/item/organ/appendix/update_icon()
|
||||
/obj/item/organ/appendix/update_icon_state()
|
||||
if(inflamed)
|
||||
icon_state = "appendixinflamed"
|
||||
name = "inflamed appendix"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
else
|
||||
CRASH("Invalid zone for [type]")
|
||||
|
||||
/obj/item/organ/cyberimp/arm/update_icon()
|
||||
/obj/item/organ/cyberimp/arm/update_icon_state()
|
||||
if(zone == BODY_ZONE_R_ARM)
|
||||
transform = null
|
||||
else // Mirroring the icon
|
||||
|
||||
@@ -178,14 +178,11 @@
|
||||
on = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/organ/cyberimp/chest/thrusters/update_icon()
|
||||
/obj/item/organ/cyberimp/chest/thrusters/update_icon_state()
|
||||
if(on)
|
||||
icon_state = "imp_jetpack-on"
|
||||
else
|
||||
icon_state = "imp_jetpack"
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
/obj/item/organ/cyberimp/chest/thrusters/proc/move_react()
|
||||
allow_thrust(0.01)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
var/failed = FALSE //to prevent constantly running failing code
|
||||
var/operated = FALSE //whether the heart's been operated on to fix some of its damages
|
||||
|
||||
/obj/item/organ/heart/update_icon()
|
||||
/obj/item/organ/heart/update_icon_state()
|
||||
if(beating)
|
||||
icon_state = "[icon_base]-on"
|
||||
else
|
||||
|
||||
@@ -55,12 +55,12 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/vehicle/ridden/janicart/update_icon()
|
||||
cut_overlays()
|
||||
/obj/vehicle/ridden/janicart/update_overlays()
|
||||
. = ..()
|
||||
if(mybag)
|
||||
add_overlay("cart_garbage")
|
||||
. += "cart_garbage"
|
||||
if(floorbuffer)
|
||||
add_overlay("cart_buffer")
|
||||
. += "cart_buffer"
|
||||
|
||||
/obj/vehicle/ridden/janicart/attack_hand(mob/user)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user