Merge branch 'master' into paramedic-tweaks
This commit is contained in:
@@ -62,6 +62,7 @@
|
||||
#define COMSIG_ATOM_NO_UPDATE_ICON_STATE 1
|
||||
#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_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_EXIT "atom_exit" //from base of atom/Exit(): (/atom/movable/exiting, /atom/newloc)
|
||||
#define COMPONENT_ATOM_BLOCK_EXIT 1
|
||||
|
||||
@@ -115,7 +115,7 @@ GLOBAL_VAR_INIT(miscreants_allowed, FALSE)
|
||||
|
||||
var/new_flavor = stripped_multiline_input(usr, "Set the flavor text in your 'examine' verb. This can also be used for OOC notes and preferences!", "Flavor Text", flavor_text, MAX_FAVOR_LEN, TRUE)
|
||||
if(!isnull(new_flavor))
|
||||
flavor_text = new_flavor
|
||||
flavor_text = html_decode(new_flavor)
|
||||
to_chat(src, "Your flavor text has been updated.")
|
||||
|
||||
//Flavor Text
|
||||
@@ -126,7 +126,7 @@ GLOBAL_VAR_INIT(miscreants_allowed, FALSE)
|
||||
|
||||
var/new_flavor = stripped_multiline_input(usr, "Set the temporary flavor text in your 'examine' verb. This should be used only for things pertaining to the current round!", "Short-Term Flavor Text", flavor_text_2, MAX_FAVOR_LEN, TRUE)
|
||||
if(!isnull(new_flavor))
|
||||
flavor_text_2 = new_flavor
|
||||
flavor_text_2 = html_decode(new_flavor)
|
||||
to_chat(src, "Your temporary flavor text has been updated.")
|
||||
|
||||
/mob/proc/print_flavor_text(flavor,temp = FALSE)
|
||||
|
||||
@@ -72,6 +72,22 @@
|
||||
var/hide_icon = 'icons/mob/actions.dmi'
|
||||
var/hide_state = "hide"
|
||||
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)
|
||||
if (!can_use(usr))
|
||||
@@ -137,9 +153,12 @@
|
||||
show_state = settings["toggle_show"]
|
||||
update_icon()
|
||||
|
||||
/obj/screen/movable/action_button/hide_toggle/update_icon()
|
||||
cut_overlays()
|
||||
add_overlay(mutable_appearance(hide_icon, hidden ? show_state : hide_state))
|
||||
/obj/screen/movable/action_button/hide_toggle/update_overlays()
|
||||
. = ..()
|
||||
if(hidden)
|
||||
. += show_appearance
|
||||
else
|
||||
. += hide_appearance
|
||||
|
||||
|
||||
/obj/screen/movable/action_button/MouseEntered(location,control,params)
|
||||
|
||||
@@ -166,29 +166,27 @@
|
||||
var/static/mutable_appearance/blocked_overlay = mutable_appearance('icons/mob/screen_gen.dmi', "blocked")
|
||||
var/held_index = 0
|
||||
|
||||
/obj/screen/inventory/hand/update_icon()
|
||||
/obj/screen/inventory/hand/update_overlays()
|
||||
. = ..()
|
||||
|
||||
if(!handcuff_overlay)
|
||||
var/state = (!(held_index % 2)) ? "markus" : "gabrielle"
|
||||
handcuff_overlay = mutable_appearance('icons/mob/screen_gen.dmi', state)
|
||||
|
||||
cut_overlay(list(handcuff_overlay, blocked_overlay, "hand_active"))
|
||||
|
||||
if(!hud?.mymob)
|
||||
return
|
||||
|
||||
if(iscarbon(hud.mymob))
|
||||
var/mob/living/carbon/C = hud.mymob
|
||||
if(C.handcuffed)
|
||||
add_overlay(handcuff_overlay)
|
||||
. += handcuff_overlay
|
||||
|
||||
if(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)
|
||||
add_overlay("hand_active")
|
||||
. += "hand_active"
|
||||
|
||||
|
||||
/obj/screen/inventory/hand/Click(location, control, params)
|
||||
|
||||
@@ -76,8 +76,8 @@
|
||||
layer = ABOVE_HUD_LAYER
|
||||
plane = ABOVE_HUD_PLANE
|
||||
|
||||
var/atom/movable/focus = null
|
||||
var/mob/living/carbon/tk_user = null
|
||||
var/atom/movable/focus
|
||||
var/mob/living/carbon/tk_user
|
||||
|
||||
/obj/item/tk_grab/Initialize()
|
||||
. = ..()
|
||||
@@ -85,6 +85,8 @@
|
||||
|
||||
/obj/item/tk_grab/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
focus = null
|
||||
tk_user = null
|
||||
return ..()
|
||||
|
||||
/obj/item/tk_grab/process()
|
||||
@@ -179,16 +181,14 @@
|
||||
return
|
||||
new /obj/effect/temp_visual/telekinesis(get_turf(focus))
|
||||
|
||||
/obj/item/tk_grab/update_icon()
|
||||
cut_overlays()
|
||||
if(focus)
|
||||
var/old_layer = focus.layer
|
||||
var/old_plane = focus.plane
|
||||
focus.layer = layer+0.01
|
||||
focus.plane = ABOVE_HUD_PLANE
|
||||
add_overlay(focus) //this is kind of ick, but it's better than using icon()
|
||||
focus.layer = old_layer
|
||||
focus.plane = old_plane
|
||||
/obj/item/tk_grab/update_overlays()
|
||||
. = ..()
|
||||
if(!focus)
|
||||
return
|
||||
var/mutable_appearance/focus_overlay = new(focus)
|
||||
focus_overlay.layer = layer + 0.01
|
||||
focus_overlay.plane = ABOVE_HUD_PLANE
|
||||
. += focus_overlay
|
||||
|
||||
/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>")
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
/datum/action/proc/link_to(Target)
|
||||
target = Target
|
||||
RegisterSignal(Target, COMSIG_ATOM_UPDATED_ICON, .proc/OnUpdatedIcon)
|
||||
|
||||
/datum/action/Destroy()
|
||||
if(owner)
|
||||
@@ -153,6 +154,9 @@
|
||||
var/mob/M = target
|
||||
M.ghostize(1)
|
||||
|
||||
/datum/action/proc/OnUpdatedIcon()
|
||||
UpdateButtonIcon()
|
||||
|
||||
//Presets for item actions
|
||||
/datum/action/item_action
|
||||
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)
|
||||
if(istype(A, action_type))
|
||||
return A
|
||||
return
|
||||
return
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/examine)
|
||||
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/applyplate)
|
||||
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)
|
||||
maxamount = _maxamount
|
||||
@@ -75,4 +77,13 @@
|
||||
/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
|
||||
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
|
||||
|
||||
@@ -150,7 +150,8 @@
|
||||
L.forceMove(get_turf(L))
|
||||
L.reset_perspective()
|
||||
L.setDir(SOUTH)
|
||||
qdel(src)
|
||||
if(!QDELETED(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/clothing/head/mob_holder/relaymove(mob/user)
|
||||
return
|
||||
|
||||
10
code/datums/elements/update_icon_blocker.dm
Normal file
10
code/datums/elements/update_icon_blocker.dm
Normal file
@@ -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
|
||||
16
code/datums/elements/update_icon_updates_onmob.dm
Normal file
16
code/datums/elements/update_icon_updates_onmob.dm
Normal file
@@ -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
|
||||
@@ -334,9 +334,11 @@
|
||||
/atom/proc/update_icon()
|
||||
// I expect we're going to need more return flags and options in this proc
|
||||
var/signalOut = SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_ICON)
|
||||
. = FALSE
|
||||
|
||||
if(!(signalOut & COMSIG_ATOM_NO_UPDATE_ICON_STATE))
|
||||
update_icon_state()
|
||||
. = TRUE
|
||||
|
||||
if(!(signalOut & COMSIG_ATOM_NO_UPDATE_OVERLAYS))
|
||||
var/list/new_overlays = update_overlays()
|
||||
@@ -346,6 +348,9 @@
|
||||
if(length(new_overlays))
|
||||
managed_overlays = new_overlays
|
||||
add_overlay(new_overlays)
|
||||
. = TRUE
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_UPDATED_ICON, signalOut, .)
|
||||
|
||||
/// Updates the icon state of the atom
|
||||
/atom/proc/update_icon_state()
|
||||
|
||||
@@ -4,23 +4,17 @@
|
||||
icon = 'icons/obj/machines/nuke.dmi'
|
||||
icon_state = "bananiumbomb_base"
|
||||
|
||||
/obj/machinery/nuclearbomb/syndicate/bananium/update_icon()
|
||||
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
|
||||
/obj/machinery/nuclearbomb/syndicate/bananium/update_icon_state()
|
||||
if(deconstruction_state != NUKESTATE_INTACT)
|
||||
icon_state = "bananiumbomb_base"
|
||||
update_icon_interior()
|
||||
update_icon_lights()
|
||||
return
|
||||
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)
|
||||
switch(off_station)
|
||||
|
||||
@@ -220,11 +220,11 @@ datum/gang_item/clothing/shades //Addition: Why not have cool shades on a gang m
|
||||
cost = 15
|
||||
item_path = /obj/item/ammo_box/magazine/sniper_rounds
|
||||
|
||||
/datum/gang_item/weapon/ammo/sleeper_ammo
|
||||
/*/datum/gang_item/weapon/ammo/sleeper_ammo //no. absolutely no.
|
||||
name = "Illicit Soporific Cartridges"
|
||||
id = "sniper_ammo"
|
||||
cost = 15
|
||||
item_path = /obj/item/ammo_box/magazine/sniper_rounds/soporific
|
||||
cost = 15 //who the fuck thought a ONE-HIT K.O. for 15 gbp IN AN ENVIRONMENT WHERE WE'RE GETTING RID OF HARDSTUNS is a GOOD IDEA
|
||||
item_path = /obj/item/ammo_box/magazine/sniper_rounds/soporific*/
|
||||
|
||||
/datum/gang_item/weapon/machinegun
|
||||
name = "Mounted Machine Gun"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
update_icon()
|
||||
|
||||
// update the icon_state
|
||||
/obj/machinery/bluespace_beacon/update_icon()
|
||||
/obj/machinery/bluespace_beacon/update_icon_state()
|
||||
var/state="floor_beacon"
|
||||
|
||||
if(invisibility)
|
||||
|
||||
@@ -9,16 +9,12 @@
|
||||
var/list/colorlist = list()
|
||||
|
||||
|
||||
/obj/machinery/pdapainter/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/pdapainter/update_icon_state()
|
||||
|
||||
if(stat & BROKEN)
|
||||
icon_state = "[initial(icon_state)]-broken"
|
||||
return
|
||||
|
||||
if(storedpda)
|
||||
add_overlay("[initial(icon_state)]-closed")
|
||||
|
||||
if(powered())
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
@@ -26,6 +22,15 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/pdapainter/update_overlays()
|
||||
. = ..()
|
||||
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
|
||||
if(storedpda)
|
||||
. += "[initial(icon_state)]-closed"
|
||||
|
||||
/obj/machinery/pdapainter/Initialize()
|
||||
. = ..()
|
||||
var/list/blocked = list(
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
reagents.maximum_volume = (500*E)
|
||||
|
||||
|
||||
/obj/machinery/sleeper/update_icon()
|
||||
/obj/machinery/sleeper/update_icon_state()
|
||||
icon_state = initial(icon_state)
|
||||
if(state_open)
|
||||
icon_state += "-open"
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
id_tag = INCINERATOR_SYNDICATELAVA_AIRLOCK_SENSOR
|
||||
master_tag = INCINERATOR_SYNDICATELAVA_AIRLOCK_CONTROLLER
|
||||
|
||||
/obj/machinery/airlock_sensor/update_icon()
|
||||
/obj/machinery/airlock_sensor/update_icon_state()
|
||||
if(on)
|
||||
if(alert)
|
||||
icon_state = "airlock_sensor_alert"
|
||||
|
||||
@@ -32,22 +32,22 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
radio = new /obj/item/radio/headset/silicon/ai(src)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/announcement_system/update_icon()
|
||||
/obj/machinery/announcement_system/update_icon_state()
|
||||
if(is_operational())
|
||||
icon_state = (panel_open ? "AAS_On_Open" : "AAS_On")
|
||||
else
|
||||
icon_state = (panel_open ? "AAS_Off_Open" : "AAS_Off")
|
||||
|
||||
|
||||
cut_overlays()
|
||||
/obj/machinery/announcement_system/update_overlays()
|
||||
. =..()
|
||||
if(arrivalToggle)
|
||||
add_overlay(greenlight)
|
||||
. += greenlight
|
||||
|
||||
if(newheadToggle)
|
||||
add_overlay(pinklight)
|
||||
. += pinklight
|
||||
|
||||
if(stat & BROKEN)
|
||||
add_overlay(errorlight)
|
||||
. += errorlight
|
||||
|
||||
/obj/machinery/announcement_system/Destroy()
|
||||
QDEL_NULL(radio)
|
||||
|
||||
@@ -19,21 +19,21 @@
|
||||
initial_icon_state = initial(icon_state)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/aug_manipulator/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
/obj/machinery/aug_manipulator/update_icon_state()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "[initial_icon_state]-broken"
|
||||
return
|
||||
|
||||
if(storedpart)
|
||||
add_overlay("[initial_icon_state]-closed")
|
||||
|
||||
if(powered())
|
||||
icon_state = initial_icon_state
|
||||
else
|
||||
icon_state = "[initial_icon_state]-off"
|
||||
|
||||
/obj/machinery/aug_manipulator/update_overlays()
|
||||
. = ..()
|
||||
if(storedpart)
|
||||
. += "[initial_icon_state]-closed"
|
||||
|
||||
/obj/machinery/aug_manipulator/Destroy()
|
||||
QDEL_NULL(storedpart)
|
||||
return ..()
|
||||
|
||||
@@ -54,16 +54,17 @@
|
||||
efficiency = E
|
||||
productivity = P
|
||||
|
||||
/obj/machinery/bloodbankgen/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/bloodbankgen/update_icon_state()
|
||||
if(is_operational())
|
||||
icon_state = "bloodbank-on"
|
||||
icon_state = "bloodbank-[is_operational() ? "on" : "off"]"
|
||||
|
||||
/obj/machinery/bloodbankgen/update_overlays()
|
||||
. = ..()
|
||||
if(panel_open)
|
||||
add_overlay("bloodbank-panel")
|
||||
. += "bloodbank-panel"
|
||||
|
||||
if(src.bag)
|
||||
add_overlay("bloodbag-input")
|
||||
if(bag)
|
||||
. += "bloodbag-input"
|
||||
if(bag.reagents.total_volume)
|
||||
var/mutable_appearance/filling_overlay = mutable_appearance(icon, "input-reagent")
|
||||
|
||||
@@ -85,10 +86,10 @@
|
||||
filling_overlay.icon_state = "input-reagent100"
|
||||
|
||||
filling_overlay.color = list(mix_color_from_reagents(bag.reagents.reagent_list))
|
||||
add_overlay(filling_overlay)
|
||||
. += filling_overlay
|
||||
|
||||
if(src.outbag)
|
||||
add_overlay("bloodbag-output")
|
||||
if(outbag)
|
||||
. += "bloodbag-output"
|
||||
if(outbag.reagents.total_volume)
|
||||
var/mutable_appearance/filling_overlay = mutable_appearance(icon, "output-reagent")
|
||||
|
||||
@@ -110,8 +111,7 @@
|
||||
filling_overlay.icon_state = "output-reagent100"
|
||||
|
||||
filling_overlay.color = list(mix_color_from_reagents(outbag.reagents.reagent_list))
|
||||
add_overlay(filling_overlay)
|
||||
return
|
||||
. += filling_overlay
|
||||
|
||||
/obj/machinery/bloodbankgen/process()
|
||||
if(!is_operational())
|
||||
|
||||
@@ -10,18 +10,19 @@
|
||||
circuit = /obj/item/circuitboard/machine/cell_charger
|
||||
pass_flags = PASSTABLE
|
||||
var/obj/item/stock_parts/cell/charging = null
|
||||
var/chargelevel = -1
|
||||
var/charge_rate = 500
|
||||
|
||||
/obj/machinery/cell_charger/update_icon()
|
||||
cut_overlays()
|
||||
if(charging)
|
||||
add_overlay(image(charging.icon, charging.icon_state))
|
||||
add_overlay("ccharger-on")
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
var/newlevel = round(charging.percent() * 4 / 100)
|
||||
chargelevel = newlevel
|
||||
add_overlay("ccharger-o[newlevel]")
|
||||
/obj/machinery/cell_charger/update_overlays()
|
||||
. += ..()
|
||||
|
||||
if(!charging)
|
||||
return
|
||||
|
||||
. += image(charging.icon, charging.icon_state)
|
||||
. += "ccharger-on"
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
var/newlevel = round(charging.percent() * 4 / 100)
|
||||
. += "ccharger-o[newlevel]"
|
||||
|
||||
/obj/machinery/cell_charger/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -54,7 +55,6 @@
|
||||
|
||||
charging = W
|
||||
user.visible_message("[user] inserts a cell into [src].", "<span class='notice'>You insert a cell into [src].</span>")
|
||||
chargelevel = -1
|
||||
update_icon()
|
||||
else
|
||||
if(!charging && default_deconstruction_screwdriver(user, icon_state, icon_state, W))
|
||||
@@ -77,7 +77,6 @@
|
||||
/obj/machinery/cell_charger/proc/removecell()
|
||||
charging.update_icon()
|
||||
charging = null
|
||||
chargelevel = -1
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/cell_charger/attack_hand(mob/user)
|
||||
|
||||
@@ -477,24 +477,30 @@
|
||||
|
||||
flesh_number = unattached_flesh.len
|
||||
|
||||
/obj/machinery/clonepod/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
/obj/machinery/clonepod/update_icon_state()
|
||||
if(mess)
|
||||
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/gib2 = image(CRYOMOBS, "gibdown")
|
||||
gib1.pixel_y = 27 + round(sin(world.time) * 3)
|
||||
gib1.pixel_x = round(sin(world.time * 3))
|
||||
gib2.pixel_y = 27 + round(cos(world.time) * 3)
|
||||
gib2.pixel_x = round(cos(world.time * 3))
|
||||
add_overlay(gib2)
|
||||
add_overlay(gib1)
|
||||
add_overlay("cover-on")
|
||||
|
||||
. += gib2
|
||||
. += gib1
|
||||
. += "cover-on"
|
||||
else if(occupant)
|
||||
icon_state = "pod_1"
|
||||
|
||||
var/image/occupant_overlay
|
||||
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_x = round(sin(world.time * 3))
|
||||
|
||||
add_overlay(occupant_overlay)
|
||||
add_overlay("cover-on")
|
||||
else
|
||||
icon_state = "pod_0"
|
||||
|
||||
if(panel_open)
|
||||
icon_state = "pod_0_maintenance"
|
||||
|
||||
add_overlay("panel")
|
||||
. += occupant_overlay
|
||||
. += "cover-on"
|
||||
. += "panel"
|
||||
|
||||
/*
|
||||
* Manual -- A big ol' manual.
|
||||
|
||||
@@ -48,13 +48,13 @@
|
||||
icon_state = initial(icon_state)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/computer/update_overlays()
|
||||
. = ..()
|
||||
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
|
||||
if(stat & NOPOWER)
|
||||
add_overlay("[icon_keyboard]_off")
|
||||
. += "[icon_keyboard]_off"
|
||||
return
|
||||
add_overlay(icon_keyboard)
|
||||
. += icon_keyboard
|
||||
|
||||
// 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
|
||||
|
||||
@@ -103,21 +103,20 @@
|
||||
add_fingerprint(usr)
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/computer/aifixer/update_icon()
|
||||
..()
|
||||
/obj/machinery/computer/aifixer/update_overlays()
|
||||
. = ..()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(active)
|
||||
. += "ai-fixer-on"
|
||||
if (occupier)
|
||||
switch (occupier.stat)
|
||||
if (0)
|
||||
. += "ai-fixer-full"
|
||||
if (2)
|
||||
. += "ai-fixer-404"
|
||||
else
|
||||
if(active)
|
||||
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")
|
||||
. += "ai-fixer-empty"
|
||||
|
||||
/obj/machinery/computer/aifixer/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card)
|
||||
if(!..())
|
||||
|
||||
@@ -78,23 +78,20 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/atmos_alert/update_icon()
|
||||
..()
|
||||
cut_overlays()
|
||||
/obj/machinery/computer/atmos_alert/update_overlays()
|
||||
. = ..()
|
||||
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
|
||||
var/overlay_state = icon_screen
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
add_overlay("[icon_keyboard]_off")
|
||||
. |= "[icon_keyboard]_off"
|
||||
return
|
||||
add_overlay(icon_keyboard)
|
||||
. |= icon_keyboard
|
||||
if(priority_alarms.len)
|
||||
overlay_state = "alert:2"
|
||||
add_overlay("alert:2")
|
||||
else if(minor_alarms.len)
|
||||
overlay_state = "alert:1"
|
||||
add_overlay("alert:1")
|
||||
else
|
||||
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, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir, alpha=128)
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
name = "incinerator chamber gas sensor"
|
||||
id_tag = ATMOS_GAS_MONITOR_SENSOR_INCINERATOR
|
||||
|
||||
/obj/machinery/air_sensor/update_icon()
|
||||
/obj/machinery/air_sensor/update_icon_state()
|
||||
icon_state = "gsensor[on]"
|
||||
|
||||
/obj/machinery/air_sensor/process_atmos()
|
||||
|
||||
@@ -175,11 +175,10 @@
|
||||
clockwork = TRUE //it'd look very weird
|
||||
light_power = 0
|
||||
|
||||
/obj/machinery/computer/security/telescreen/update_icon()
|
||||
/obj/machinery/computer/security/telescreen/update_icon_state()
|
||||
icon_state = initial(icon_state)
|
||||
if(stat & BROKEN)
|
||||
icon_state += "b"
|
||||
return
|
||||
|
||||
/obj/machinery/computer/security/telescreen/entertainment
|
||||
name = "entertainment monitor"
|
||||
|
||||
@@ -75,25 +75,23 @@
|
||||
L -= I
|
||||
return !cleared
|
||||
|
||||
/obj/machinery/computer/station_alert/update_icon()
|
||||
..()
|
||||
cut_overlays()
|
||||
/obj/machinery/computer/station_alert/update_overlays()
|
||||
. = ..()
|
||||
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
|
||||
var/overlay_state = icon_screen
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
add_overlay("[icon_keyboard]_off")
|
||||
. |= "[icon_keyboard]_off"
|
||||
return
|
||||
add_overlay(icon_keyboard)
|
||||
. |= icon_keyboard
|
||||
var/active_alarms = FALSE
|
||||
for(var/cat in alarms)
|
||||
var/list/L = alarms[cat]
|
||||
if(L.len)
|
||||
if(length(alarms[cat]))
|
||||
active_alarms = TRUE
|
||||
break
|
||||
if(active_alarms)
|
||||
overlay_state = "alert:2"
|
||||
add_overlay("alert:2")
|
||||
else
|
||||
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, 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
|
||||
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)
|
||||
add_overlay("[initial(icon_state)]-closed")
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/jukebox/update_icon()
|
||||
/obj/machinery/jukebox/update_icon_state()
|
||||
if(active)
|
||||
icon_state = "[initial(icon_state)]-active"
|
||||
else
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
if(scan_level >= 3)
|
||||
. += "<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
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
|
||||
@@ -428,7 +428,7 @@
|
||||
else
|
||||
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)
|
||||
return
|
||||
switch(state)
|
||||
|
||||
@@ -230,7 +230,7 @@
|
||||
/obj/machinery/door/proc/unelectrify()
|
||||
secondsElectrified = 0
|
||||
|
||||
/obj/machinery/door/update_icon()
|
||||
/obj/machinery/door/update_icon_state()
|
||||
if(density)
|
||||
icon_state = "door1"
|
||||
else
|
||||
|
||||
@@ -171,16 +171,20 @@
|
||||
if("closing")
|
||||
flick("door_closing", src)
|
||||
|
||||
/obj/machinery/door/firedoor/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/door/firedoor/update_icon_state()
|
||||
if(density)
|
||||
icon_state = "door_closed"
|
||||
if(welded)
|
||||
add_overlay("welded")
|
||||
else
|
||||
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()
|
||||
. = ..()
|
||||
@@ -283,8 +287,7 @@
|
||||
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>"
|
||||
|
||||
/obj/structure/firelock_frame/update_icon()
|
||||
..()
|
||||
/obj/structure/firelock_frame/update_icon_state()
|
||||
icon_state = "frame[constructionStep]"
|
||||
|
||||
/obj/structure/firelock_frame/attackby(obj/item/C, mob/user)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
else
|
||||
do_animate("deny")
|
||||
|
||||
/obj/machinery/door/password/update_icon()
|
||||
/obj/machinery/door/password/update_icon_state()
|
||||
if(density)
|
||||
icon_state = "closed"
|
||||
else
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
flick("closing", src)
|
||||
playsound(src, 'sound/machines/blastdoor.ogg', 30, 1)
|
||||
|
||||
/obj/machinery/door/poddoor/update_icon()
|
||||
/obj/machinery/door/poddoor/update_icon_state()
|
||||
if(density)
|
||||
icon_state = "closed"
|
||||
else
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
electronics = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/door/window/update_icon()
|
||||
/obj/machinery/door/window/update_icon_state()
|
||||
if(density)
|
||||
icon_state = base_state
|
||||
else
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
if(istype(a, dispense_type))
|
||||
.++
|
||||
|
||||
/obj/machinery/droneDispenser/update_icon()
|
||||
/obj/machinery/droneDispenser/update_icon_state()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
icon_state = icon_off
|
||||
else if(mode == DRONE_RECHARGING)
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/doorButtons/access_button/update_icon()
|
||||
/obj/machinery/doorButtons/access_button/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "access_button_off"
|
||||
else
|
||||
@@ -249,7 +249,7 @@
|
||||
else if(A.id_tag == idExterior)
|
||||
exteriorAirlock = A
|
||||
|
||||
/obj/machinery/doorButtons/airlock_controller/update_icon()
|
||||
/obj/machinery/doorButtons/airlock_controller/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "access_control_off"
|
||||
return
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
new_prog.master = src
|
||||
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(program.memory["processing"])
|
||||
icon_state = "airlock_control_process"
|
||||
|
||||
@@ -33,8 +33,6 @@
|
||||
popup.set_content(return_text())
|
||||
popup.open()
|
||||
|
||||
/obj/machinery/embedded_controller/update_icon()
|
||||
|
||||
/obj/machinery/embedded_controller/proc/return_text()
|
||||
|
||||
/obj/machinery/embedded_controller/proc/post_signal(datum/signal/signal, comm_line)
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
new_prog.master = src
|
||||
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)
|
||||
icon_state = "airlock_control_standby"
|
||||
else
|
||||
|
||||
@@ -55,10 +55,7 @@
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/firealarm/update_icon()
|
||||
cut_overlays()
|
||||
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
|
||||
|
||||
/obj/machinery/firealarm/update_icon_state()
|
||||
if(panel_open)
|
||||
icon_state = "fire_b[buildstage]"
|
||||
return
|
||||
@@ -72,26 +69,30 @@
|
||||
if(stat & NOPOWER)
|
||||
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))
|
||||
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)
|
||||
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)
|
||||
|
||||
var/area/A = src.loc
|
||||
A = A.loc
|
||||
|
||||
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)
|
||||
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)
|
||||
else
|
||||
add_overlay("fire_on")
|
||||
. += "fire_on"
|
||||
SSvis_overlays.add_vis_overlay(src, icon, "fire_on", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
|
||||
|
||||
/obj/machinery/firealarm/emp_act(severity)
|
||||
|
||||
@@ -68,7 +68,7 @@ The console is located at computer/gulag_teleporter.dm
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/gulag_teleporter/update_icon()
|
||||
/obj/machinery/gulag_teleporter/update_icon_state()
|
||||
icon_state = initial(icon_state) + (state_open ? "_open" : "")
|
||||
//no power or maintenance
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
var/interval = 20
|
||||
var/harvesting = FALSE
|
||||
var/warming_up = FALSE
|
||||
var/list/operation_order = list() //Order of wich we harvest limbs.
|
||||
var/allow_clothing = FALSE
|
||||
var/allow_living = FALSE
|
||||
@@ -27,12 +28,11 @@
|
||||
max_time -= L.rating
|
||||
interval = max(max_time,1)
|
||||
|
||||
/obj/machinery/harvester/update_icon(warming_up)
|
||||
if(warming_up)
|
||||
icon_state = initial(icon_state)+"-charging"
|
||||
return
|
||||
/obj/machinery/harvester/update_icon_state()
|
||||
if(state_open)
|
||||
icon_state = initial(icon_state)+"-open"
|
||||
else if(warming_up)
|
||||
icon_state = initial(icon_state)+"-charging"
|
||||
else if(harvesting)
|
||||
icon_state = initial(icon_state)+"-active"
|
||||
else
|
||||
@@ -43,6 +43,7 @@
|
||||
return
|
||||
. = ..()
|
||||
harvesting = FALSE
|
||||
warming_up = FALSE
|
||||
|
||||
/obj/machinery/harvester/attack_hand(mob/user)
|
||||
if(state_open)
|
||||
@@ -86,13 +87,15 @@
|
||||
return
|
||||
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
|
||||
warming_up = TRUE
|
||||
harvesting = TRUE
|
||||
visible_message("<span class='notice'>The [name] begins warming up!</span>")
|
||||
say("Initializing harvest protocol.")
|
||||
update_icon(TRUE)
|
||||
update_icon()
|
||||
addtimer(CALLBACK(src, .proc/harvest), interval)
|
||||
|
||||
/obj/machinery/harvester/proc/harvest()
|
||||
warming_up = FALSE
|
||||
update_icon()
|
||||
if(!harvesting || state_open || !powered(EQUIP) || !occupant || !iscarbon(occupant))
|
||||
return
|
||||
@@ -127,6 +130,7 @@
|
||||
addtimer(CALLBACK(src, .proc/harvest), interval)
|
||||
|
||||
/obj/machinery/harvester/proc/end_harvesting()
|
||||
warming_up = FALSE
|
||||
harvesting = FALSE
|
||||
open_machine()
|
||||
say("Subject has been successfully harvested.")
|
||||
|
||||
@@ -441,7 +441,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
set_light(0)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/holopad/update_icon()
|
||||
/obj/machinery/holopad/update_icon_state()
|
||||
var/total_users = LAZYLEN(masters) + LAZYLEN(holo_calls)
|
||||
if(ringing)
|
||||
icon_state = "holopad_ringing"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
QDEL_NULL(beaker)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/iv_drip/update_icon()
|
||||
/obj/machinery/iv_drip/update_icon_state()
|
||||
if(attached)
|
||||
if(mode)
|
||||
icon_state = "injecting"
|
||||
@@ -36,13 +36,14 @@
|
||||
else
|
||||
icon_state = "donateidle"
|
||||
|
||||
cut_overlays()
|
||||
/obj/machinery/iv_drip/update_overlays()
|
||||
. = ..()
|
||||
|
||||
if(beaker)
|
||||
if(attached)
|
||||
add_overlay("beakeractive")
|
||||
. += "beakeractive"
|
||||
else
|
||||
add_overlay("beakeridle")
|
||||
. += "beakeridle"
|
||||
if(beaker.reagents.total_volume)
|
||||
var/mutable_appearance/filling_overlay = mutable_appearance('icons/obj/iv_drip.dmi', "reagent")
|
||||
|
||||
@@ -64,7 +65,7 @@
|
||||
filling_overlay.icon_state = "reagent100"
|
||||
|
||||
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)
|
||||
. = ..()
|
||||
@@ -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."
|
||||
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)
|
||||
if (attached || beaker || !user.canUseTopic(src, BE_CLOSE))
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
on = area.lightswitch
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/light_switch/update_icon()
|
||||
/obj/machinery/light_switch/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "light-p"
|
||||
else
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
update_icon()
|
||||
|
||||
// update the icon_state
|
||||
/obj/machinery/magnetic_module/update_icon()
|
||||
/obj/machinery/magnetic_module/update_icon_state()
|
||||
var/state="floor_magnet"
|
||||
var/onstate=""
|
||||
if(!on)
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
update_icon()
|
||||
|
||||
// update the icon_state
|
||||
/obj/machinery/navbeacon/update_icon()
|
||||
/obj/machinery/navbeacon/update_icon_state()
|
||||
var/state="navbeacon[open]"
|
||||
|
||||
if(invisibility)
|
||||
|
||||
@@ -99,8 +99,7 @@
|
||||
if(!has_cover)
|
||||
INVOKE_ASYNC(src, .proc/popUp)
|
||||
|
||||
/obj/machinery/porta_turret/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/porta_turret/update_icon_state()
|
||||
if(!anchored)
|
||||
icon_state = "turretCover"
|
||||
return
|
||||
@@ -970,8 +969,7 @@
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/turretid/update_icon()
|
||||
..()
|
||||
/obj/machinery/turretid/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "control_off"
|
||||
else if (enabled)
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
pass_flags = PASSTABLE
|
||||
var/obj/item/charging = null
|
||||
var/recharge_coeff = 1
|
||||
var/using_power = FALSE //Did we put power into "charging" last process()?
|
||||
|
||||
var/static/list/allowed_devices = typecacheof(list(
|
||||
/obj/item/gun/energy,
|
||||
@@ -45,9 +46,11 @@
|
||||
if (new_charging)
|
||||
START_PROCESSING(SSmachines, src)
|
||||
use_power = ACTIVE_POWER_USE
|
||||
update_icon(scan = TRUE)
|
||||
using_power = TRUE
|
||||
update_icon()
|
||||
else
|
||||
use_power = IDLE_POWER_USE
|
||||
using_power = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/recharger/attackby(obj/item/G, mob/user, params)
|
||||
@@ -120,23 +123,23 @@
|
||||
if(stat & (NOPOWER|BROKEN) || !anchored)
|
||||
return PROCESS_KILL
|
||||
|
||||
var/using_power = 0
|
||||
using_power = FALSE
|
||||
if(charging)
|
||||
var/obj/item/stock_parts/cell/C = charging.get_cell()
|
||||
if(C)
|
||||
if(C.charge < C.maxcharge)
|
||||
C.give(C.chargerate * recharge_coeff)
|
||||
use_power(250 * recharge_coeff)
|
||||
using_power = 1
|
||||
update_icon(using_power)
|
||||
using_power = TRUE
|
||||
update_icon()
|
||||
|
||||
if(istype(charging, /obj/item/ammo_box/magazine/recharge))
|
||||
var/obj/item/ammo_box/magazine/recharge/R = charging
|
||||
if(R.stored_ammo.len < R.max_ammo)
|
||||
R.stored_ammo += new R.ammo_type(R)
|
||||
use_power(200 * recharge_coeff)
|
||||
using_power = 1
|
||||
update_icon(using_power)
|
||||
using_power = TRUE
|
||||
update_icon()
|
||||
return
|
||||
else
|
||||
return PROCESS_KILL
|
||||
@@ -161,20 +164,15 @@
|
||||
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)
|
||||
icon_state = "rechargeroff"
|
||||
return
|
||||
if(scan)
|
||||
icon_state = "rechargeroff"
|
||||
return
|
||||
if(panel_open)
|
||||
else if(panel_open)
|
||||
icon_state = "rechargeropen"
|
||||
return
|
||||
if(charging)
|
||||
else if(charging)
|
||||
if(using_power)
|
||||
icon_state = "recharger1"
|
||||
else
|
||||
icon_state = "recharger2"
|
||||
return
|
||||
icon_state = "recharger0"
|
||||
else
|
||||
icon_state = "recharger0"
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
use_power = ACTIVE_POWER_USE
|
||||
add_fingerprint(occupant)
|
||||
|
||||
/obj/machinery/recharge_station/update_icon()
|
||||
/obj/machinery/recharge_station/update_icon_state()
|
||||
if(is_operational())
|
||||
if(state_open)
|
||||
icon_state = "borgcharger0"
|
||||
|
||||
@@ -77,8 +77,7 @@
|
||||
to_chat(user, "<span class='notice'>You use the cryptographic sequencer on [src].</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/recycler/update_icon()
|
||||
..()
|
||||
/obj/machinery/recycler/update_icon_state()
|
||||
var/is_powered = !(stat & (BROKEN|NOPOWER))
|
||||
if(safety_mode)
|
||||
is_powered = FALSE
|
||||
|
||||
@@ -60,7 +60,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/requests_console/update_icon()
|
||||
/obj/machinery/requests_console/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
set_light(0)
|
||||
else
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
to_chat(user, "<span class='warning'>You short out the access controller.</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/shieldgen/update_icon()
|
||||
/obj/machinery/shieldgen/update_icon_state()
|
||||
if(active)
|
||||
icon_state = (stat & BROKEN) ? "shieldonbr":"shieldon"
|
||||
else
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
money++ //SPESSH MAJICKS
|
||||
|
||||
/obj/machinery/computer/slot_machine/update_icon()
|
||||
/obj/machinery/computer/slot_machine/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "slots0"
|
||||
|
||||
|
||||
@@ -53,17 +53,18 @@
|
||||
else
|
||||
. += "There is no power cell installed."
|
||||
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)
|
||||
icon_state = "sheater-[mode]"
|
||||
else
|
||||
icon_state = "sheater-off"
|
||||
|
||||
cut_overlays()
|
||||
/obj/machinery/space_heater/update_overlays()
|
||||
. = ..()
|
||||
if(panel_open)
|
||||
add_overlay("sheater-open")
|
||||
. += "sheater-open"
|
||||
|
||||
/obj/machinery/space_heater/process()
|
||||
if(!on || !is_operational())
|
||||
|
||||
@@ -140,29 +140,28 @@
|
||||
QDEL_NULL(storage)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/suit_storage_unit/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
/obj/machinery/suit_storage_unit/update_overlays()
|
||||
. = ..()
|
||||
if(uv)
|
||||
if(uv_super)
|
||||
add_overlay("super")
|
||||
. += "super"
|
||||
else if(occupant)
|
||||
add_overlay("uvhuman")
|
||||
. += "uvhuman"
|
||||
else
|
||||
add_overlay("uv")
|
||||
. += "uv"
|
||||
else if(state_open)
|
||||
if(stat & BROKEN)
|
||||
add_overlay("broken")
|
||||
. += "broken"
|
||||
else
|
||||
add_overlay("open")
|
||||
. += "open"
|
||||
if(suit)
|
||||
add_overlay("suit")
|
||||
. += "suit"
|
||||
if(helmet)
|
||||
add_overlay("helm")
|
||||
. += "helm"
|
||||
if(storage)
|
||||
add_overlay("storage")
|
||||
. += "storage"
|
||||
else if(occupant)
|
||||
add_overlay("human")
|
||||
. += "human"
|
||||
|
||||
/obj/machinery/suit_storage_unit/power_change()
|
||||
..()
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
. = ..()
|
||||
. += "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" : ""]"
|
||||
|
||||
/obj/machinery/syndicatebomb/proc/seconds_remaining()
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
if(!relay_information(signal, /obj/machinery/telecomms/hub))
|
||||
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)))
|
||||
icon_state = "server-nopower"
|
||||
else if (!toggled)
|
||||
|
||||
@@ -109,7 +109,7 @@ GLOBAL_LIST_EMPTY(telecomms_list)
|
||||
links |= T
|
||||
T.links |= src
|
||||
|
||||
/obj/machinery/telecomms/update_icon()
|
||||
/obj/machinery/telecomms/update_icon_state()
|
||||
if(on)
|
||||
if(panel_open)
|
||||
icon_state = "[initial(icon_state)]_o"
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
calibrated = FALSE
|
||||
return
|
||||
|
||||
/obj/machinery/teleport/hub/update_icon()
|
||||
/obj/machinery/teleport/hub/update_icon_state()
|
||||
if(panel_open)
|
||||
icon_state = "tele-o"
|
||||
else if(is_ready())
|
||||
@@ -218,7 +218,7 @@
|
||||
if(teleporter_hub)
|
||||
teleporter_hub.update_icon()
|
||||
|
||||
/obj/machinery/teleport/station/update_icon()
|
||||
/obj/machinery/teleport/station/update_icon_state()
|
||||
if(panel_open)
|
||||
icon_state = "controller-o"
|
||||
else if(stat & (BROKEN|NOPOWER))
|
||||
|
||||
@@ -38,8 +38,7 @@
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/transformer/update_icon()
|
||||
..()
|
||||
/obj/machinery/transformer/update_icon_state()
|
||||
if(stat & (BROKEN|NOPOWER) || cooldown == 1)
|
||||
icon_state = "separator-AO0"
|
||||
else
|
||||
|
||||
@@ -199,8 +199,7 @@
|
||||
|
||||
|
||||
|
||||
/obj/machinery/washing_machine/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/washing_machine/update_icon_state()
|
||||
if(busy)
|
||||
icon_state = "wm_running_[bloody_mess]"
|
||||
else if(bloody_mess)
|
||||
@@ -208,8 +207,11 @@
|
||||
else
|
||||
var/full = contents.len ? 1 : 0
|
||||
icon_state = "wm_[state_open]_[full]"
|
||||
|
||||
/obj/machinery/washing_machine/update_overlays()
|
||||
. = ..()
|
||||
if(panel_open)
|
||||
add_overlay("wm_panel")
|
||||
. += "wm_panel"
|
||||
|
||||
/obj/machinery/washing_machine/attackby(obj/item/W, mob/user, params)
|
||||
if(panel_open && !busy && default_unfasten_wrench(user, W))
|
||||
|
||||
@@ -128,11 +128,11 @@
|
||||
else
|
||||
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))
|
||||
return
|
||||
add_overlay("recharge_comp_on")
|
||||
. += "recharge_comp_on"
|
||||
|
||||
/obj/machinery/computer/mech_bay_power_console/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -45,16 +45,6 @@
|
||||
..()
|
||||
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()
|
||||
. = ..()
|
||||
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
|
||||
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
|
||||
name = "water"
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
@@ -474,7 +467,7 @@
|
||||
else
|
||||
update_icon()
|
||||
|
||||
/obj/effect/constructing_effect/update_icon()
|
||||
/obj/effect/constructing_effect/update_icon_state()
|
||||
icon_state = "rcd"
|
||||
if (delay < 10)
|
||||
icon_state += "_shortest"
|
||||
|
||||
@@ -552,8 +552,8 @@ RLD
|
||||
explosion(src, 0, 0, 3, 1, flame_range = 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/construction/rcd/update_icon()
|
||||
..()
|
||||
/obj/item/construction/rcd/update_overlays()
|
||||
. = ..()
|
||||
if(has_ammobar)
|
||||
var/ratio = CEILING((matter / max_matter) * ammo_sections, 1)
|
||||
cut_overlays() //To prevent infinite stacking of overlays
|
||||
@@ -707,11 +707,10 @@ RLD
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/construction/rld/update_icon()
|
||||
..()
|
||||
/obj/item/construction/rld/update_overlays()
|
||||
. = ..()
|
||||
var/ratio = CEILING((matter / max_matter) * ammo_sections, 1)
|
||||
cut_overlays() //To prevent infinite stacking of overlays
|
||||
add_overlay("rld_light[ratio]")
|
||||
. += "rld_light[ratio]"
|
||||
|
||||
/obj/item/construction/rld/attack_self(mob/user)
|
||||
..()
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
var/datum/radial_menu/persistent/wiring_gui_menu
|
||||
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)
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
@@ -90,34 +94,20 @@
|
||||
QDEL_NULL(wiring_gui_menu)
|
||||
return ..()
|
||||
|
||||
/obj/item/twohanded/rcl/update_icon()
|
||||
if(!loaded)
|
||||
icon_state = "rcl-empty"
|
||||
item_state = "rcl-empty"
|
||||
/obj/item/twohanded/rcl/update_icon_state()
|
||||
icon_state = initial(icon_state)
|
||||
item_state = initial(item_state)
|
||||
if(!loaded || !loaded.amount)
|
||||
icon_state += "-empty"
|
||||
item_state += "-0"
|
||||
|
||||
/obj/item/twohanded/rcl/update_overlays()
|
||||
. = ..()
|
||||
if(!loaded || !loaded.amount)
|
||||
return
|
||||
cut_overlays()
|
||||
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]")
|
||||
var/mutable_appearance/cable_overlay = mutable_appearance(icon, "rcl-[max(CEILING(loaded.amount/(max_amount/3), 1), 3)]")
|
||||
cable_overlay.color = GLOB.cable_colors[colors[current_color_index]]
|
||||
if(cable_amount >= 1)
|
||||
icon_state = "rcl"
|
||||
item_state = "rcl"
|
||||
add_overlay(cable_overlay)
|
||||
else
|
||||
icon_state = "rcl-empty"
|
||||
item_state = "rcl-0"
|
||||
add_overlay(cable_overlay)
|
||||
|
||||
. += cable_overlay
|
||||
|
||||
/obj/item/twohanded/rcl/proc/is_empty(mob/user, loud = 1)
|
||||
update_icon()
|
||||
@@ -323,33 +313,6 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
|
||||
actions_types = list()
|
||||
max_amount = 30
|
||||
name = "makeshift rapid cable layer"
|
||||
icon_state = "rclg"
|
||||
item_state = "rclg"
|
||||
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)
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
SSjukeboxes.removejukebox(SSjukeboxes.findjukeboxindex(src))
|
||||
. = ..()
|
||||
|
||||
/obj/item/boombox/update_icon()
|
||||
/obj/item/boombox/update_icon_state()
|
||||
icon_state = "[baseiconstate]_[boomingandboxing ? "on" : "off"]"
|
||||
return
|
||||
|
||||
@@ -48,8 +48,11 @@
|
||||
baseiconstate = "raiqbawks"
|
||||
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)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
@@ -58,4 +61,3 @@
|
||||
|
||||
/obj/item/boombox/raiq/process()
|
||||
set_light(5,0.95,pick("#d87aff","#7a7aff","#89ecff","#b88eff","#ff59ad"))
|
||||
return
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
if(start_lit)
|
||||
light()
|
||||
|
||||
/obj/item/candle/update_icon()
|
||||
/obj/item/candle/update_icon_state()
|
||||
icon_state = "candle[(wax > 400) ? ((wax > 750) ? 1 : 2) : 3][lit ? "_lit" : ""]"
|
||||
|
||||
/obj/item/candle/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
@@ -40,13 +40,13 @@
|
||||
.=..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/card/data/update_icon()
|
||||
cut_overlays()
|
||||
/obj/item/card/data/update_overlays()
|
||||
. = ..()
|
||||
if(detail_color == COLOR_FLOORTILE_GRAY)
|
||||
return
|
||||
var/mutable_appearance/detail_overlay = mutable_appearance('icons/obj/card.dmi', "[icon_state]-color")
|
||||
detail_overlay.color = detail_color
|
||||
add_overlay(detail_overlay)
|
||||
. += detail_overlay
|
||||
|
||||
/obj/item/card/data/attackby(obj/item/I, mob/living/user)
|
||||
if(istype(I, /obj/item/integrated_electronics/detailer))
|
||||
@@ -517,10 +517,16 @@ update_label("John Doe", "Clowny")
|
||||
//Polychromatic Knight Badge
|
||||
|
||||
/obj/item/card/id/knight
|
||||
var/id_color = "#00FF00" //defaults to green
|
||||
name = "knight badge"
|
||||
icon_state = "knight"
|
||||
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)
|
||||
if(newname || newjob)
|
||||
@@ -529,14 +535,10 @@ update_label("John Doe", "Clowny")
|
||||
|
||||
name = "[(!registered_name) ? "knight badge" : "[registered_name]'s Knight Badge"][(!assignment) ? "" : " ([assignment])"]"
|
||||
|
||||
/obj/item/card/id/knight/update_icon()
|
||||
var/mutable_appearance/id_overlay = mutable_appearance(icon, "knight_overlay")
|
||||
|
||||
if(id_color)
|
||||
id_overlay.color = id_color
|
||||
cut_overlays()
|
||||
|
||||
add_overlay(id_overlay)
|
||||
/obj/item/card/id/knight/update_overlays()
|
||||
. = ..()
|
||||
id_overlay.color = id_color
|
||||
. += id_overlay
|
||||
|
||||
/obj/item/card/id/knight/AltClick(mob/living/user)
|
||||
. = ..()
|
||||
@@ -556,10 +558,6 @@ update_label("John Doe", "Clowny")
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/item/card/id/knight/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/card/id/knight/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'>Alt-click to recolor it.</span>"
|
||||
|
||||
@@ -65,8 +65,9 @@
|
||||
TED = new(src.loc)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/item/gun/energy/chrono_gun/update_icon()
|
||||
return
|
||||
/obj/item/gun/energy/chrono_gun/ComponentInitialize()
|
||||
. = ..()
|
||||
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)
|
||||
if(field)
|
||||
|
||||
@@ -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>")
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/lighter/update_icon()
|
||||
cut_overlays()
|
||||
var/mutable_appearance/lighter_overlay = mutable_appearance(icon,"lighter_overlay_[overlay_state][lit ? "-on" : ""]")
|
||||
/obj/item/lighter/update_icon_state()
|
||||
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)
|
||||
if(get_temperature())
|
||||
@@ -645,12 +647,14 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
lighter_color = pick(color_list)
|
||||
update_icon()
|
||||
|
||||
/obj/item/lighter/greyscale/update_icon()
|
||||
cut_overlays()
|
||||
var/mutable_appearance/lighter_overlay = mutable_appearance(icon,"lighter_overlay_[overlay_state][lit ? "-on" : ""]")
|
||||
/obj/item/lighter/greyscale/update_icon_state()
|
||||
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
|
||||
add_overlay(lighter_overlay)
|
||||
. += lighter_overlay
|
||||
|
||||
/obj/item/lighter/greyscale/ignition_effect(atom/A, mob/user)
|
||||
if(get_temperature())
|
||||
|
||||
@@ -577,8 +577,8 @@
|
||||
new /obj/item/toy/crayon/black(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/crayons/update_icon()
|
||||
cut_overlays()
|
||||
/obj/item/storage/crayons/update_overlays()
|
||||
. = ..()
|
||||
for(var/obj/item/toy/crayon/crayon in contents)
|
||||
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
|
||||
|
||||
/obj/item/toy/crayon/spraycan/update_overlays()
|
||||
. = ..()
|
||||
if(use_overlays)
|
||||
cut_overlays()
|
||||
var/mutable_appearance/spray_overlay = mutable_appearance('icons/obj/crayons.dmi', "[is_capped ? "spraycan_cap_colors" : "spraycan_colors"]")
|
||||
spray_overlay.color = paint_color
|
||||
add_overlay(spray_overlay)
|
||||
. += spray_overlay
|
||||
|
||||
/obj/item/toy/crayon/spraycan/borg
|
||||
name = "cyborg spraycan"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
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/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/grab_ghost = FALSE // Do we pull the ghost back into their 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
|
||||
. = ..()
|
||||
if(cell)
|
||||
cell = new cell(src)
|
||||
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()
|
||||
return ..()
|
||||
return
|
||||
|
||||
/obj/item/defibrillator/loaded
|
||||
cell = /obj/item/stock_parts/cell/high
|
||||
|
||||
/obj/item/defibrillator/proc/update_power()
|
||||
if(!QDELETED(cell))
|
||||
@@ -57,6 +52,7 @@
|
||||
powered = TRUE
|
||||
else
|
||||
powered = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/defibrillator/update_overlays()
|
||||
. = ..()
|
||||
@@ -76,7 +72,7 @@
|
||||
/obj/item/defibrillator/CheckParts(list/parts_list)
|
||||
..()
|
||||
cell = locate(/obj/item/stock_parts/cell) in contents
|
||||
update_icon()
|
||||
update_power()
|
||||
|
||||
/obj/item/defibrillator/ui_action_click()
|
||||
toggle_paddles()
|
||||
@@ -124,7 +120,7 @@
|
||||
return
|
||||
cell = W
|
||||
to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
|
||||
update_icon()
|
||||
update_power()
|
||||
|
||||
else if(istype(W, /obj/item/screwdriver))
|
||||
if(cell)
|
||||
@@ -132,7 +128,7 @@
|
||||
cell.forceMove(get_turf(src))
|
||||
cell = null
|
||||
to_chat(user, "<span class='notice'>You remove the cell from [src].</span>")
|
||||
update_icon()
|
||||
update_power()
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -157,7 +153,7 @@
|
||||
safety = TRUE
|
||||
visible_message("<span class='notice'>[src] beeps: Safety protocols enabled!</span>")
|
||||
playsound(src, 'sound/machines/defib_saftyOn.ogg', 50, 0)
|
||||
update_icon()
|
||||
update_power()
|
||||
|
||||
/obj/item/defibrillator/proc/toggle_paddles()
|
||||
set name = "Toggle Paddles"
|
||||
@@ -170,14 +166,14 @@
|
||||
if(!usr.put_in_hands(paddles))
|
||||
on = FALSE
|
||||
to_chat(user, "<span class='warning'>You need a free hand to hold the paddles!</span>")
|
||||
update_icon()
|
||||
update_power()
|
||||
return
|
||||
else
|
||||
//Remove from their hands and back onto the defib unit
|
||||
paddles.unwield()
|
||||
remove_paddles(user)
|
||||
|
||||
update_icon()
|
||||
update_power()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
@@ -189,7 +185,7 @@
|
||||
..()
|
||||
if((slot_flags == ITEM_SLOT_BACK && slot != SLOT_BACK) || (slot_flags == ITEM_SLOT_BELT && slot != SLOT_BELT))
|
||||
remove_paddles(user)
|
||||
update_icon()
|
||||
update_power()
|
||||
|
||||
/obj/item/defibrillator/item_action_slot_check(slot, mob/user, datum/action/A)
|
||||
if(slot == user.getBackSlot())
|
||||
@@ -213,12 +209,12 @@
|
||||
if(cell)
|
||||
if(cell.charge < (paddles.revivecost+chrgdeductamt))
|
||||
powered = FALSE
|
||||
update_icon()
|
||||
update_power()
|
||||
if(cell.use(chrgdeductamt))
|
||||
update_icon()
|
||||
update_power()
|
||||
return TRUE
|
||||
else
|
||||
update_icon()
|
||||
update_power()
|
||||
return FALSE
|
||||
|
||||
/obj/item/defibrillator/proc/cooldowncheck(mob/user)
|
||||
@@ -232,7 +228,7 @@
|
||||
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
paddles.cooldown = FALSE
|
||||
paddles.update_icon()
|
||||
update_icon()
|
||||
update_power()
|
||||
|
||||
/obj/item/defibrillator/compact
|
||||
name = "compact defibrillator"
|
||||
@@ -249,7 +245,7 @@
|
||||
/obj/item/defibrillator/compact/loaded/Initialize()
|
||||
. = ..()
|
||||
cell = new(src)
|
||||
update_icon()
|
||||
update_power()
|
||||
|
||||
/obj/item/defibrillator/compact/combat
|
||||
name = "combat defibrillator"
|
||||
@@ -258,17 +254,12 @@
|
||||
safety = FALSE
|
||||
always_emagged = TRUE
|
||||
disarm_shock_time = 0
|
||||
|
||||
/obj/item/defibrillator/compact/combat/loaded/Initialize()
|
||||
. = ..()
|
||||
cell = new /obj/item/stock_parts/cell/infinite(src)
|
||||
update_icon()
|
||||
cell = /obj/item/stock_parts/cell/infinite
|
||||
|
||||
/obj/item/defibrillator/compact/combat/loaded/attackby(obj/item/W, mob/user, params)
|
||||
if(W == paddles)
|
||||
paddles.unwield()
|
||||
toggle_paddles()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
//paddles
|
||||
@@ -298,6 +289,10 @@
|
||||
|
||||
var/mob/listeningTo
|
||||
|
||||
/obj/item/twohanded/shockpaddles/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/update_icon_updates_onmob)
|
||||
|
||||
/obj/item/twohanded/shockpaddles/equipped(mob/user, slot)
|
||||
. = ..()
|
||||
if(!req_defib)
|
||||
@@ -339,14 +334,11 @@
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/twohanded/shockpaddles/update_icon()
|
||||
/obj/item/twohanded/shockpaddles/update_icon_state()
|
||||
icon_state = "defibpaddles[wielded]"
|
||||
item_state = "defibpaddles[wielded]"
|
||||
if(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)
|
||||
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
|
||||
defib.on = FALSE
|
||||
forceMove(defib)
|
||||
defib.update_icon()
|
||||
defib.update_power()
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/check_defib_exists(mainunit, mob/living/carbon/M, obj/O)
|
||||
if(!req_defib)
|
||||
|
||||
@@ -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/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
|
||||
|
||||
//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_mode = "font-family:monospace;" //The currently selected font.
|
||||
var/background_color = "#808000" //The currently selected background color.
|
||||
@@ -123,7 +128,8 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
inserted_item = new inserted_item(src)
|
||||
else
|
||||
inserted_item = new /obj/item/pen(src)
|
||||
update_icon(FALSE, TRUE)
|
||||
new_overlays = TRUE
|
||||
update_icon()
|
||||
|
||||
/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))
|
||||
return
|
||||
icon = new_icon
|
||||
update_icon(FALSE, TRUE)
|
||||
new_overlays = TRUE
|
||||
update_icon()
|
||||
to_chat(M, "[src] is now skinned as '[choice]'.")
|
||||
|
||||
/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]
|
||||
if(icon != pref_skin)
|
||||
icon = pref_skin
|
||||
update_icon(FALSE, TRUE)
|
||||
new_overlays = TRUE
|
||||
update_icon()
|
||||
equipped = TRUE
|
||||
|
||||
/obj/item/pda/proc/update_label()
|
||||
@@ -215,25 +223,27 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/pda/update_icon(alert = FALSE, new_overlays = FALSE)
|
||||
/obj/item/pda/update_overlays()
|
||||
. = ..()
|
||||
if(new_overlays)
|
||||
set_new_overlays()
|
||||
cut_overlays()
|
||||
add_overlay(alert ? current_overlays[PDA_OVERLAY_ALERT] : current_overlays[PDA_OVERLAY_SCREEN])
|
||||
. += new_alert ? current_overlays[PDA_OVERLAY_ALERT] : current_overlays[PDA_OVERLAY_SCREEN]
|
||||
var/mutable_appearance/overlay = new()
|
||||
overlay.pixel_x = overlays_x_offset
|
||||
if(id)
|
||||
overlay.icon_state = current_overlays[PDA_OVERLAY_ID]
|
||||
add_overlay(new /mutable_appearance(overlay))
|
||||
. += new /mutable_appearance(overlay)
|
||||
if(inserted_item)
|
||||
overlay.icon_state = current_overlays[PDA_OVERLAY_ITEM]
|
||||
add_overlay(new /mutable_appearance(overlay))
|
||||
. += new /mutable_appearance(overlay)
|
||||
if(fon)
|
||||
overlay.icon_state = current_overlays[PDA_OVERLAY_LIGHT]
|
||||
add_overlay(new /mutable_appearance(overlay))
|
||||
. += new /mutable_appearance(overlay)
|
||||
if(pai)
|
||||
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)
|
||||
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>)")
|
||||
|
||||
new_alert = TRUE
|
||||
update_icon(TRUE)
|
||||
|
||||
/obj/item/pda/proc/send_to_all(mob/living/U)
|
||||
|
||||
@@ -454,7 +454,7 @@
|
||||
on = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/flashlight/glowstick/update_icon()
|
||||
/obj/item/flashlight/glowstick/update_icon_state()
|
||||
item_state = "glowstick"
|
||||
cut_overlays()
|
||||
if(!fuel)
|
||||
|
||||
@@ -87,27 +87,25 @@
|
||||
|
||||
. += "<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)
|
||||
icon_state = "geiger_off"
|
||||
return 1
|
||||
if(obj_flags & EMAGGED)
|
||||
else if(obj_flags & EMAGGED)
|
||||
icon_state = "geiger_on_emag"
|
||||
return 1
|
||||
switch(radiation_count)
|
||||
if(-INFINITY to RAD_LEVEL_NORMAL)
|
||||
icon_state = "geiger_on_1"
|
||||
if(RAD_LEVEL_NORMAL + 1 to RAD_LEVEL_MODERATE)
|
||||
icon_state = "geiger_on_2"
|
||||
if(RAD_LEVEL_MODERATE + 1 to RAD_LEVEL_HIGH)
|
||||
icon_state = "geiger_on_3"
|
||||
if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH)
|
||||
icon_state = "geiger_on_4"
|
||||
if(RAD_LEVEL_VERY_HIGH + 1 to RAD_LEVEL_CRITICAL)
|
||||
icon_state = "geiger_on_4"
|
||||
if(RAD_LEVEL_CRITICAL + 1 to INFINITY)
|
||||
icon_state = "geiger_on_5"
|
||||
..()
|
||||
else
|
||||
switch(radiation_count)
|
||||
if(-INFINITY to RAD_LEVEL_NORMAL)
|
||||
icon_state = "geiger_on_1"
|
||||
if(RAD_LEVEL_NORMAL + 1 to RAD_LEVEL_MODERATE)
|
||||
icon_state = "geiger_on_2"
|
||||
if(RAD_LEVEL_MODERATE + 1 to RAD_LEVEL_HIGH)
|
||||
icon_state = "geiger_on_3"
|
||||
if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH)
|
||||
icon_state = "geiger_on_4"
|
||||
if(RAD_LEVEL_VERY_HIGH + 1 to RAD_LEVEL_CRITICAL)
|
||||
icon_state = "geiger_on_4"
|
||||
if(RAD_LEVEL_CRITICAL + 1 to INFINITY)
|
||||
icon_state = "geiger_on_5"
|
||||
|
||||
/obj/item/geiger_counter/proc/update_sound()
|
||||
var/datum/looping_sound/geiger/loop = soundloop
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
/obj/item/lightreplacer/attack_self(mob/user)
|
||||
to_chat(user, status_string())
|
||||
|
||||
/obj/item/lightreplacer/update_icon()
|
||||
/obj/item/lightreplacer/update_icon_state()
|
||||
icon_state = "lightreplacer[(obj_flags & EMAGGED ? 1 : 0)]"
|
||||
|
||||
/obj/item/lightreplacer/proc/status_string()
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
to_chat(user, "<span class='notice'>You clear the wired connection from the multitool.</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/multitool/update_icon()
|
||||
/obj/item/multitool/update_icon_state()
|
||||
if(selected_io)
|
||||
icon_state = "multitool_red"
|
||||
else
|
||||
@@ -149,7 +149,7 @@
|
||||
/obj/item/multitool/ai_detect/ui_action_click()
|
||||
return
|
||||
|
||||
/obj/item/multitool/ai_detect/update_icon()
|
||||
/obj/item/multitool/ai_detect/update_icon_state()
|
||||
if(selected_io)
|
||||
icon_state = "multitool_red"
|
||||
else
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
var/obj/structure/cable/attached // the attached cable
|
||||
|
||||
/obj/item/powersink/update_icon()
|
||||
/obj/item/powersink/update_icon_state()
|
||||
icon_state = "powersink[mode == OPERATING]"
|
||||
|
||||
/obj/item/powersink/proc/set_mode(value)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
qpad = null
|
||||
return TRUE
|
||||
|
||||
/obj/item/quantum_keycard/update_icon()
|
||||
/obj/item/quantum_keycard/update_icon_state()
|
||||
if(qpad)
|
||||
icon_state = "quantum_keycard_on"
|
||||
else
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
eject(usr)
|
||||
|
||||
|
||||
/obj/item/taperecorder/update_icon()
|
||||
/obj/item/taperecorder/update_icon_state()
|
||||
if(!mytape)
|
||||
icon_state = "taperecorder_empty"
|
||||
else if(recording)
|
||||
|
||||
@@ -134,8 +134,9 @@
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
sides = 100
|
||||
|
||||
/obj/item/dice/d100/update_icon()
|
||||
return
|
||||
/obj/item/dice/d100/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/update_icon_blocker)
|
||||
|
||||
/obj/item/dice/eightbd20
|
||||
name = "strange d20"
|
||||
@@ -144,8 +145,9 @@
|
||||
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")
|
||||
|
||||
/obj/item/dice/eightbd20/update_icon()
|
||||
return
|
||||
/obj/item/dice/eightbd20/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/update_icon_blocker)
|
||||
|
||||
/obj/item/dice/fourdd6
|
||||
name = "4d d6"
|
||||
@@ -154,8 +156,9 @@
|
||||
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")
|
||||
|
||||
/obj/item/dice/fourdd6/update_icon()
|
||||
return
|
||||
/obj/item/dice/fourdd6/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/update_icon_blocker)
|
||||
|
||||
/obj/item/dice/attack_self(mob/user)
|
||||
diceroll(user)
|
||||
@@ -187,9 +190,9 @@
|
||||
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>")
|
||||
|
||||
/obj/item/dice/update_icon()
|
||||
cut_overlays()
|
||||
add_overlay("[src.icon_state]-[src.result]")
|
||||
/obj/item/dice/update_overlays()
|
||||
. = ..()
|
||||
. += "[icon_state]-[result]"
|
||||
|
||||
/obj/item/dice/microwave_act(obj/machinery/microwave/M)
|
||||
if(can_be_rigged)
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
var/igniter_type = /obj/item/assembly/igniter
|
||||
trigger_guard = TRIGGER_GUARD_NORMAL
|
||||
|
||||
/obj/item/flamethrower/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/update_icon_updates_onmob)
|
||||
|
||||
/obj/item/flamethrower/Destroy()
|
||||
if(weldtool)
|
||||
qdel(weldtool)
|
||||
@@ -48,22 +52,17 @@
|
||||
if(isturf(location)) //start a fire if possible
|
||||
igniter.flamethrower_process(location)
|
||||
|
||||
/obj/item/flamethrower/update_icon_state()
|
||||
item_state = "flamethrower_[lit]"
|
||||
|
||||
/obj/item/flamethrower/update_icon()
|
||||
cut_overlays()
|
||||
/obj/item/flamethrower/update_overlays()
|
||||
. = ..()
|
||||
if(igniter)
|
||||
add_overlay("+igniter[status]")
|
||||
. += "+igniter[status]"
|
||||
if(ptank)
|
||||
add_overlay("+ptank")
|
||||
. += "+ptank"
|
||||
if(lit)
|
||||
add_overlay("+lit")
|
||||
item_state = "flamethrower_1"
|
||||
else
|
||||
item_state = "flamethrower_0"
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_hands()
|
||||
return
|
||||
. += "+lit"
|
||||
|
||||
/obj/item/flamethrower/afterattack(atom/target, mob/user, flag)
|
||||
. = ..()
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
user.gib(1, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/grenade/plastic/update_icon()
|
||||
/obj/item/grenade/plastic/update_icon_state()
|
||||
if(nadeassembly)
|
||||
icon_state = "[item_state]1"
|
||||
else
|
||||
|
||||
@@ -128,9 +128,6 @@
|
||||
item_color = param_color || item_color || pick(cable_colors)
|
||||
if(cable_colors[item_color])
|
||||
item_color = cable_colors[item_color]
|
||||
update_icon()
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/update_icon()
|
||||
color = null
|
||||
add_atom_colour(item_color, FIXED_COLOUR_PRIORITY)
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
colorize(null)
|
||||
active = FALSE
|
||||
|
||||
/obj/item/hot_potato/update_icon()
|
||||
/obj/item/hot_potato/update_icon_state()
|
||||
icon_state = active? icon_on : icon_off
|
||||
|
||||
/obj/item/hot_potato/syndicate
|
||||
|
||||
@@ -10,18 +10,14 @@
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
custom_materials = list(/datum/material/glass=500)
|
||||
var/obj/item/implant/imp = null
|
||||
var/obj/item/implant/imp
|
||||
var/imp_type
|
||||
|
||||
|
||||
/obj/item/implantcase/update_icon()
|
||||
/obj/item/implantcase/update_icon_state()
|
||||
if(imp)
|
||||
icon_state = "implantcase-[imp.item_color]"
|
||||
reagents = imp.reagents
|
||||
else
|
||||
icon_state = "implantcase-0"
|
||||
reagents = null
|
||||
|
||||
|
||||
/obj/item/implantcase/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/pen))
|
||||
@@ -46,6 +42,7 @@
|
||||
imp = I.imp
|
||||
I.imp = null
|
||||
update_icon()
|
||||
reagents = imp.reagents
|
||||
I.update_icon()
|
||||
else
|
||||
if(imp)
|
||||
@@ -54,6 +51,7 @@
|
||||
imp.forceMove(I)
|
||||
I.imp = imp
|
||||
imp = null
|
||||
reagents = null
|
||||
update_icon()
|
||||
I.update_icon()
|
||||
|
||||
|
||||
@@ -96,16 +96,17 @@
|
||||
visible_message("<span class='warning'>[M] has been implanted by [src].</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/implantchair/update_icon()
|
||||
/obj/machinery/implantchair/update_icon_state()
|
||||
icon_state = initial(icon_state)
|
||||
if(state_open)
|
||||
icon_state += "_open"
|
||||
if(occupant)
|
||||
icon_state += "_occupied"
|
||||
|
||||
/obj/machinery/implantchair/update_overlays()
|
||||
. = ..()
|
||||
if(ready)
|
||||
add_overlay("ready")
|
||||
else
|
||||
cut_overlays()
|
||||
. += "ready"
|
||||
|
||||
/obj/machinery/implantchair/proc/replenish()
|
||||
if(ready_implants < max_implants)
|
||||
|
||||
@@ -14,13 +14,12 @@
|
||||
var/imp_type = null
|
||||
|
||||
|
||||
/obj/item/implanter/update_icon()
|
||||
/obj/item/implanter/update_icon_state()
|
||||
if(imp)
|
||||
icon_state = "implanter1"
|
||||
else
|
||||
icon_state = "implanter0"
|
||||
|
||||
|
||||
/obj/item/implanter/attack(mob/living/M, mob/user)
|
||||
if(!istype(M))
|
||||
return
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
if(case)
|
||||
. += "<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]"
|
||||
|
||||
/obj/item/implantpad/AltClick(mob/user)
|
||||
|
||||
@@ -163,13 +163,14 @@
|
||||
if(opened)
|
||||
. += "<span class='notice'>Its battery compartment is open.</span>"
|
||||
|
||||
/obj/item/inducer/update_icon()
|
||||
cut_overlays()
|
||||
if(opened)
|
||||
if(!cell)
|
||||
add_overlay("inducer-nobat")
|
||||
else
|
||||
add_overlay("inducer-bat")
|
||||
/obj/item/inducer/update_overlays()
|
||||
. = ..()
|
||||
if(!opened)
|
||||
return
|
||||
if(!cell)
|
||||
. += "inducer-nobat"
|
||||
else
|
||||
. += "inducer-bat"
|
||||
|
||||
/obj/item/inducer/sci
|
||||
icon_state = "inducer-sci"
|
||||
|
||||
@@ -259,6 +259,10 @@
|
||||
light_color = "#37FFF7"
|
||||
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
|
||||
altafterattack(A, user, TRUE, params)
|
||||
return TRUE
|
||||
@@ -301,7 +305,8 @@
|
||||
if(!supress_message_text)
|
||||
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/gem_overlay = mutable_appearance(icon, "cxsword_gem")
|
||||
|
||||
@@ -309,15 +314,10 @@
|
||||
blade_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
|
||||
|
||||
add_overlay(gem_overlay)
|
||||
. += gem_overlay
|
||||
|
||||
if(active)
|
||||
add_overlay(blade_overlay)
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_hands()
|
||||
. += blade_overlay
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cx/AltClick(mob/living/user)
|
||||
. = ..()
|
||||
|
||||
@@ -453,12 +453,10 @@
|
||||
held_sausage = null
|
||||
update_icon()
|
||||
|
||||
/obj/item/melee/roastingstick/update_icon()
|
||||
/obj/item/melee/roastingstick/update_overlays()
|
||||
. = ..()
|
||||
cut_overlays()
|
||||
if (held_sausage)
|
||||
var/mutable_appearance/sausage = mutable_appearance(icon, "roastingstick_sausage")
|
||||
add_overlay(sausage)
|
||||
. += mutable_appearance(icon, "roastingstick_sausage")
|
||||
|
||||
/obj/item/melee/roastingstick/proc/extend(user)
|
||||
to_chat(user, "<span class ='warning'>You extend [src].</span>")
|
||||
|
||||
@@ -143,14 +143,16 @@
|
||||
update_icon()
|
||||
remove_occupant(user)
|
||||
|
||||
/obj/item/pet_carrier/update_icon()
|
||||
cut_overlay("unlocked")
|
||||
cut_overlay("locked")
|
||||
/obj/item/pet_carrier/update_icon_state()
|
||||
if(open)
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
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)
|
||||
if(isopenturf(over_atom) && usr.canUseTopic(src, BE_CLOSE, ismonkey(usr)) && usr.Adjacent(over_atom) && open && occupants.len)
|
||||
|
||||
@@ -49,29 +49,29 @@
|
||||
/obj/item/pinpointer/proc/scan_for_target()
|
||||
return
|
||||
|
||||
/obj/item/pinpointer/update_icon()
|
||||
cut_overlays()
|
||||
/obj/item/pinpointer/update_overlays()
|
||||
. = ..()
|
||||
if(!active)
|
||||
return
|
||||
if(!target)
|
||||
add_overlay("pinon[alert ? "alert" : ""]null")
|
||||
. += "pinon[alert ? "alert" : ""]null"
|
||||
return
|
||||
var/turf/here = get_turf(src)
|
||||
var/turf/there = get_turf(target)
|
||||
if(!here || !there || here.z != there.z)
|
||||
add_overlay("pinon[alert ? "alert" : ""]null")
|
||||
. += "pinon[alert ? "alert" : ""]null"
|
||||
return
|
||||
if(get_dist_euclidian(here,there) <= minimum_range)
|
||||
add_overlay("pinon[alert ? "alert" : ""]direct")
|
||||
. += "pinon[alert ? "alert" : ""]direct"
|
||||
else
|
||||
setDir(get_dir(here, there))
|
||||
switch(get_dist(here, there))
|
||||
if(1 to 8)
|
||||
add_overlay("pinon[alert ? "alert" : "close"]")
|
||||
. += "pinon[alert ? "alert" : "close"]"
|
||||
if(9 to 16)
|
||||
add_overlay("pinon[alert ? "alert" : "medium"]")
|
||||
. += "pinon[alert ? "alert" : "medium"]"
|
||||
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
|
||||
name = "crew pinpointer"
|
||||
|
||||
@@ -241,11 +241,11 @@
|
||||
tank = thetank
|
||||
update_icon()
|
||||
|
||||
/obj/item/pneumatic_cannon/update_icon()
|
||||
cut_overlays()
|
||||
/obj/item/pneumatic_cannon/update_overlays()
|
||||
. = ..()
|
||||
if(!tank)
|
||||
return
|
||||
add_overlay(tank.icon_state)
|
||||
. += tank.icon_state
|
||||
|
||||
/obj/item/pneumatic_cannon/proc/fill_with_type(type, amount)
|
||||
if(!ispath(type, /obj) && !ispath(type, /mob))
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user