mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Port TG updating appearances (#17943)
* Get pants that match or else you gonna look silly yo
* Posters
* Fix other hud elements
* Rereviewed
* Update shotglass.dm
* Fix for new merged PRs
* Typo
* Coming across other stuff
* Update theblob.dm
* No takebacksies
* smh i forget to leave a comment
* Updated for the detgun and cards
* Should have rerun langserver again
* No longer plastic, more in scope
* Damn you bluespace
* Reverting turret logic, out of scope at this point
* Tweak that part
* Went over energy guns again, and fixed UI White's sprite sheet
* Welding masks, glasses, and JUSTICE
* Update portable_atmospherics.dm
* Cleaning up, clearing things up
* Review and suggestions
* Update valve.dm
* More tweaks
* Missing character
* Not distinct lightmasks, so they can be overlays
* Update generator.dm
* Add parameter so holodeck doesn't try to make a perfect copy
* Update unsorted.dm
* Spiders
* Better fix for spiders, fix vamps too
* Ghosts
* Update telekinesis.dm
* Cleaning up old procs
* It's set up to not copy datums... Unless they're in a list
* Donuts, duct tape, and detgun. D3VR coming to Early Access
* Update procs that interact with doors so they call update_state instead
* Forgot one spot, and actually might as well just force lock
* Cleaning up other things... Sigh, and kitty ears
* oops
* Getting used to how it works
* blinds
* Going back to the suit obscuring thing, so it doesn't update all the time
* Missed that from merging master
* I made this PR and forgot about it
* Fix runtimes in cards
* Make things a bit more unified
* Update update_icons.dm
* yarn, really?
* Update library_equipment.dm
* Update shieldgen.dm
* Every time Charlie merges something, I go back and see if I can improve things further
* what's this? more?
* Update misc_special.dm
* wow, paper
* Review
* More reviews
* To be sure, seems like being broken messed something sometimes
* Brought airlocks closer to how TG works to iron out some stuff
* Pizza and morgue
* Doesn't seem to hurt, tried with holodeck
* Revert "Doesn't seem to hurt, tried with holodeck"
This reverts commit 158529302b.
* Icon conflict
* Fix organ damage
* Don't ask how. Why. It's like that on prod too.
* Cutting down on things and updating from TG.
* More flexible. Just in case the thing you stuck it on didn't destroy.
* Hydro was one the things I touched earlier on, better rework it
* Reviews
* Cleaning up further, also bri'ish
* Undo a change I did, and switch over to a more recent implementation
* Update biogenerator.dm
* Rolling back to old airlocks, but with new duct taped note
* Functionally the same. I'd just rather not have the smoothing happen there
* Went over APCs again
* Fix welding helmet names in species files
* Update airlock.dm
* Update persistent_overlay.dm
* Oh, topic
This commit is contained in:
@@ -70,13 +70,29 @@
|
||||
#define EXAMINE_POSITION_BEFORE (1<<1)
|
||||
//End positions
|
||||
#define COMPONENT_EXNAME_CHANGED (1<<0)
|
||||
///from base of atom/update_icon(): ()
|
||||
///from base of [/atom/proc/update_appearance]: (updates)
|
||||
#define COMSIG_ATOM_UPDATE_APPEARANCE "atom_update_appearance"
|
||||
/// If returned from [COMSIG_ATOM_UPDATE_APPEARANCE] it prevents the atom from updating its name.
|
||||
#define COMSIG_ATOM_NO_UPDATE_NAME UPDATE_NAME
|
||||
/// If returned from [COMSIG_ATOM_UPDATE_APPEARANCE] it prevents the atom from updating its desc.
|
||||
#define COMSIG_ATOM_NO_UPDATE_DESC UPDATE_DESC
|
||||
/// If returned from [COMSIG_ATOM_UPDATE_APPEARANCE] it prevents the atom from updating its icon.
|
||||
#define COMSIG_ATOM_NO_UPDATE_ICON UPDATE_ICON
|
||||
///from base of [/atom/proc/update_name]: (updates)
|
||||
#define COMSIG_ATOM_UPDATE_NAME "atom_update_name"
|
||||
///from base of [/atom/proc/update_desc]: (updates)
|
||||
#define COMSIG_ATOM_UPDATE_DESC "atom_update_desc"
|
||||
///from base of [/atom/update_icon]: ()
|
||||
#define COMSIG_ATOM_UPDATE_ICON "atom_update_icon"
|
||||
#define COMSIG_ATOM_NO_UPDATE_ICON_STATE (1<<0)
|
||||
#define COMSIG_ATOM_NO_UPDATE_OVERLAYS (1<<1)
|
||||
///from base of atom/update_overlays(): (list/new_overlays)
|
||||
/// If returned from [COMSIG_ATOM_UPDATE_ICON] it prevents the atom from updating its icon state.
|
||||
#define COMSIG_ATOM_NO_UPDATE_ICON_STATE UPDATE_ICON_STATE
|
||||
/// If returned from [COMSIG_ATOM_UPDATE_ICON] it prevents the atom from updating its overlays.
|
||||
#define COMSIG_ATOM_NO_UPDATE_OVERLAYS UPDATE_OVERLAYS
|
||||
///Sent after [atom/update_icon_state] is called by [/atom/update_icon]: ()
|
||||
#define COMSIG_ATOM_UPDATE_ICON_STATE "atom_update_icon_state"
|
||||
///Sent after [atom/update_overlays] is called by [/atom/update_icon]: (list/new_overlays)
|
||||
#define COMSIG_ATOM_UPDATE_OVERLAYS "atom_update_overlays"
|
||||
///from base of atom/update_icon(): (signalOut, did_anything)
|
||||
///from base of [/atom/update_icon]: (signalOut, did_anything)
|
||||
#define COMSIG_ATOM_UPDATED_ICON "atom_updated_icon"
|
||||
///from base of atom/Entered(): (atom/movable/entering, /atom)
|
||||
#define COMSIG_ATOM_ENTERED "atom_entered"
|
||||
|
||||
@@ -27,6 +27,17 @@
|
||||
///Whether or not this atom shows screentips when hovered over
|
||||
#define NO_SCREENTIPS 32768
|
||||
|
||||
// Update flags for [/atom/proc/update_appearance]
|
||||
/// Update the atom's name
|
||||
#define UPDATE_NAME (1<<0)
|
||||
/// Update the atom's desc
|
||||
#define UPDATE_DESC (1<<1)
|
||||
/// Update the atom's icon state
|
||||
#define UPDATE_ICON_STATE (1<<2)
|
||||
/// Update the atom's overlays
|
||||
#define UPDATE_OVERLAYS (1<<3)
|
||||
/// Update the atom's icon
|
||||
#define UPDATE_ICON (UPDATE_ICON_STATE|UPDATE_OVERLAYS)
|
||||
|
||||
/* Secondary atom flags, for the flags_2 var, denoted with a _2 */
|
||||
|
||||
|
||||
@@ -855,7 +855,7 @@ Returns 1 if the chain up to the area contains the given typepath
|
||||
|
||||
if(perfectcopy)
|
||||
if((O) && (original))
|
||||
var/static/list/forbidden_vars = list("type","loc","locs","vars", "parent","parent_type", "verbs","ckey","key","power_supply","contents","reagents","stat","x","y","z","group")
|
||||
var/static/list/forbidden_vars = list("type","loc","locs","vars", "parent","parent_type", "verbs","ckey","key","power_supply","contents","reagents","stat","x","y","z","group", "comp_lookup", "datum_components")
|
||||
|
||||
for(var/V in original.vars - forbidden_vars)
|
||||
if(istype(original.vars[V],/list))
|
||||
@@ -869,7 +869,7 @@ Returns 1 if the chain up to the area contains the given typepath
|
||||
O.update_icon()
|
||||
return O
|
||||
|
||||
/area/proc/copy_contents_to(area/A , platingRequired = 0 )
|
||||
/area/proc/copy_contents_to(area/A , platingRequired = 0, perfect_copy = TRUE)
|
||||
//Takes: Area. Optional: If it should copy to areas that don't have plating
|
||||
//Returns: Nothing.
|
||||
//Notes: Attempts to move the contents of one area to another area.
|
||||
@@ -949,7 +949,7 @@ Returns 1 if the chain up to the area contains the given typepath
|
||||
|
||||
|
||||
for(var/obj/O in objs)
|
||||
newobjs += DuplicateObject(O , 1)
|
||||
newobjs += DuplicateObject(O , perfect_copy)
|
||||
|
||||
|
||||
for(var/obj/O in newobjs)
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
name = "Show Buttons"
|
||||
else
|
||||
name = "Hide Buttons"
|
||||
UpdateIcon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
usr.update_action_buttons()
|
||||
|
||||
/obj/screen/movable/action_button/hide_toggle/AltClick(mob/user)
|
||||
@@ -114,13 +114,13 @@
|
||||
if(user.client)
|
||||
alpha = user.client.prefs.UI_style_alpha
|
||||
color = user.client.prefs.UI_style_color
|
||||
UpdateIcon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/screen/movable/action_button/hide_toggle/proc/UpdateIcon()
|
||||
cut_overlays()
|
||||
/obj/screen/movable/action_button/hide_toggle/update_overlays()
|
||||
. = ..()
|
||||
var/image/img = image(initial(icon), src, hidden ? "show" : "hide")
|
||||
img.appearance_flags = RESET_COLOR | RESET_ALPHA
|
||||
overlays += img
|
||||
. += img
|
||||
|
||||
/obj/screen/movable/action_button/MouseEntered(location, control, params)
|
||||
. = ..()
|
||||
|
||||
@@ -119,7 +119,8 @@
|
||||
|
||||
mymob.pullin = new /obj/screen/pull()
|
||||
mymob.pullin.icon = 'icons/mob/screen_alien.dmi'
|
||||
mymob.pullin.update_icon(mymob)
|
||||
mymob.pullin.hud = src
|
||||
mymob.pullin.update_icon(UPDATE_ICON_STATE)
|
||||
mymob.pullin.screen_loc = ui_pull_resist
|
||||
hotkeybuttons += mymob.pullin
|
||||
|
||||
@@ -127,7 +128,8 @@
|
||||
infodisplay += alien_plasma_display
|
||||
|
||||
zone_select = new /obj/screen/zone_sel/alien()
|
||||
zone_select.update_icon(mymob)
|
||||
zone_select.hud = src
|
||||
zone_select.update_icon(UPDATE_OVERLAYS)
|
||||
static_inventory += zone_select
|
||||
|
||||
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
|
||||
mymob.pullin = new /obj/screen/pull()
|
||||
mymob.pullin.icon = 'icons/mob/screen_alien.dmi'
|
||||
mymob.pullin.update_icon(mymob)
|
||||
mymob.pullin.hud = src
|
||||
mymob.pullin.update_icon(UPDATE_ICON_STATE)
|
||||
mymob.pullin.screen_loc = ui_pull_resist
|
||||
hotkeybuttons += mymob.pullin
|
||||
|
||||
@@ -35,5 +36,6 @@
|
||||
static_inventory += using
|
||||
|
||||
zone_select = new /obj/screen/zone_sel/alien()
|
||||
zone_select.update_icon(mymob)
|
||||
zone_select.hud = src
|
||||
zone_select.update_icon(UPDATE_OVERLAYS)
|
||||
static_inventory += zone_select
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
mymob.pullin = new /obj/screen/pull()
|
||||
mymob.pullin.icon = 'icons/mob/screen_bot.dmi'
|
||||
mymob.pullin.update_icon(mymob)
|
||||
mymob.pullin.hud = src
|
||||
mymob.pullin.update_icon(UPDATE_ICON_STATE)
|
||||
mymob.pullin.screen_loc = ui_bot_pull
|
||||
static_inventory += mymob.pullin
|
||||
|
||||
@@ -333,7 +333,8 @@
|
||||
|
||||
mymob.pullin = new /obj/screen/pull()
|
||||
mymob.pullin.icon = ui_style
|
||||
mymob.pullin.update_icon(mymob)
|
||||
mymob.pullin.hud = src
|
||||
mymob.pullin.update_icon(UPDATE_ICON_STATE)
|
||||
mymob.pullin.screen_loc = ui_pull_resist
|
||||
static_inventory += mymob.pullin
|
||||
|
||||
@@ -347,7 +348,8 @@
|
||||
zone_select.color = ui_color
|
||||
zone_select.icon = ui_style
|
||||
zone_select.alpha = ui_alpha
|
||||
zone_select.update_icon(mymob)
|
||||
zone_select.hud = src
|
||||
zone_select.update_icon(UPDATE_OVERLAYS)
|
||||
static_inventory += zone_select
|
||||
|
||||
inventory_shown = FALSE
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
mymob.pullin = new /obj/screen/pull()
|
||||
mymob.pullin.icon = 'icons/mob/screen_corgi.dmi'
|
||||
mymob.pullin.update_icon(mymob)
|
||||
mymob.pullin.hud = src
|
||||
mymob.pullin.update_icon(UPDATE_ICON_STATE)
|
||||
mymob.pullin.screen_loc = ui_construct_pull
|
||||
static_inventory += mymob.pullin
|
||||
|
||||
@@ -157,12 +157,14 @@
|
||||
|
||||
mymob.pullin = new /obj/screen/pull()
|
||||
mymob.pullin.icon = 'icons/mob/screen_robot.dmi'
|
||||
mymob.pullin.update_icon(mymob)
|
||||
mymob.pullin.hud = src
|
||||
mymob.pullin.update_icon(UPDATE_ICON_STATE)
|
||||
mymob.pullin.screen_loc = ui_borg_pull
|
||||
hotkeybuttons += mymob.pullin
|
||||
|
||||
zone_select = new /obj/screen/zone_sel/robot()
|
||||
zone_select.update_icon(mymob)
|
||||
zone_select.hud = src
|
||||
zone_select.update_icon(UPDATE_OVERLAYS)
|
||||
static_inventory += zone_select
|
||||
|
||||
//Headlamp
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
/obj/screen/Destroy()
|
||||
master = null
|
||||
hud = null
|
||||
return ..()
|
||||
|
||||
/obj/screen/proc/component_click(obj/screen/component_button/component, params)
|
||||
@@ -120,10 +121,8 @@
|
||||
/obj/screen/pull/Click()
|
||||
usr.stop_pulling()
|
||||
|
||||
/obj/screen/pull/update_icon(mob/mymob)
|
||||
if(!mymob)
|
||||
return
|
||||
if(mymob.pulling)
|
||||
/obj/screen/pull/update_icon_state()
|
||||
if(hud?.mymob?.pulling)
|
||||
icon_state = "pull"
|
||||
else
|
||||
icon_state = "pull0"
|
||||
@@ -223,6 +222,7 @@
|
||||
name = "damage zone"
|
||||
icon_state = "zone_sel"
|
||||
screen_loc = ui_zonesel
|
||||
var/overlay_file = 'icons/mob/zone_sel.dmi'
|
||||
var/selecting = "chest"
|
||||
var/static/list/hover_overlays_cache = list()
|
||||
var/hovering
|
||||
@@ -323,32 +323,27 @@
|
||||
return "eyes"
|
||||
return "head"
|
||||
|
||||
/obj/screen/zone_sel/proc/set_selected_zone(choice, mob/user)
|
||||
if(isobserver(user))
|
||||
/obj/screen/zone_sel/proc/set_selected_zone(choice)
|
||||
if(!hud)
|
||||
return
|
||||
if(isobserver(hud.mymob))
|
||||
return
|
||||
|
||||
if(choice != selecting)
|
||||
selecting = choice
|
||||
update_icon(user)
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
return 1
|
||||
|
||||
/obj/screen/zone_sel/update_icon(mob/user)
|
||||
overlays.Cut()
|
||||
var/image/human = image('icons/mob/zone_sel.dmi', "human")
|
||||
human.appearance_flags = RESET_COLOR
|
||||
overlays += human
|
||||
var/image/sel = image('icons/mob/zone_sel.dmi', "[selecting]")
|
||||
/obj/screen/zone_sel/update_overlays()
|
||||
. = ..()
|
||||
var/image/sel = image(overlay_file, "[selecting]")
|
||||
sel.appearance_flags = RESET_COLOR
|
||||
overlays += sel
|
||||
user.zone_selected = selecting
|
||||
. += sel
|
||||
hud.mymob.zone_selected = selecting
|
||||
|
||||
/obj/screen/zone_sel/alien
|
||||
icon = 'icons/mob/screen_alien.dmi'
|
||||
|
||||
/obj/screen/zone_sel/alien/update_icon(mob/user)
|
||||
overlays.Cut()
|
||||
overlays += image('icons/mob/screen_alien.dmi', "[selecting]")
|
||||
user.zone_selected = selecting
|
||||
overlay_file = 'icons/mob/screen_alien.dmi'
|
||||
|
||||
/obj/screen/zone_sel/robot
|
||||
icon = 'icons/mob/screen_robot.dmi'
|
||||
@@ -432,26 +427,24 @@
|
||||
var/image/active_overlay
|
||||
var/image/handcuff_overlay
|
||||
|
||||
/obj/screen/inventory/hand/update_icon()
|
||||
..()
|
||||
/obj/screen/inventory/hand/update_overlays()
|
||||
. = ..()
|
||||
if(!active_overlay)
|
||||
active_overlay = image("icon"=icon, "icon_state"="hand_active")
|
||||
if(!handcuff_overlay)
|
||||
var/state = (slot_id == slot_r_hand) ? "markus" : "gabrielle"
|
||||
handcuff_overlay = image("icon"='icons/mob/screen_gen.dmi', "icon_state"=state)
|
||||
|
||||
overlays.Cut()
|
||||
|
||||
if(hud && hud.mymob)
|
||||
if(iscarbon(hud.mymob))
|
||||
var/mob/living/carbon/C = hud.mymob
|
||||
if(C.handcuffed)
|
||||
overlays += handcuff_overlay
|
||||
. += handcuff_overlay
|
||||
|
||||
if(slot_id == slot_l_hand && hud.mymob.hand)
|
||||
overlays += active_overlay
|
||||
. += active_overlay
|
||||
else if(slot_id == slot_r_hand && !hud.mymob.hand)
|
||||
overlays += active_overlay
|
||||
. += active_overlay
|
||||
|
||||
/obj/screen/inventory/hand/Click()
|
||||
// At this point in client Click() code we have passed the 1/10 sec check and little else
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
layer = ABOVE_HUD_LAYER
|
||||
plane = ABOVE_HUD_PLANE
|
||||
|
||||
blocks_emissive = FALSE
|
||||
var/last_throw = 0
|
||||
var/atom/movable/focus = null
|
||||
var/mob/living/host = null
|
||||
@@ -164,7 +165,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
focus = target
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
apply_focus_overlay()
|
||||
// Make it behave like other equipment
|
||||
if(istype(target, /obj/item))
|
||||
@@ -180,7 +181,7 @@
|
||||
// Delete the key/value pair of item to TK grab
|
||||
host.tkgrabbed_objects -= focus
|
||||
focus = null
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/tk_grab/proc/apply_focus_overlay()
|
||||
if(!focus)
|
||||
@@ -193,9 +194,9 @@
|
||||
focus_object(target, user)
|
||||
|
||||
|
||||
/obj/item/tk_grab/update_icon()
|
||||
overlays.Cut()
|
||||
/obj/item/tk_grab/update_overlays()
|
||||
. = ..()
|
||||
if(focus && focus.icon && focus.icon_state)
|
||||
overlays += icon(focus.icon,focus.icon_state)
|
||||
. += icon(focus.icon,focus.icon_state)
|
||||
|
||||
#undef TK_COOLDOWN
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
if(!istype(I)) //Something went wrong
|
||||
return
|
||||
if(!hide_tape) //if TRUE this hides the tape overlay and added examine text
|
||||
RegisterSignal(parent, COMSIG_OBJ_UPDATE_ICON, .proc/add_tape_overlay)
|
||||
RegisterSignal(parent, COMSIG_ATOM_UPDATE_OVERLAYS, .proc/add_tape_overlay)
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/add_tape_text)
|
||||
x_offset = x
|
||||
y_offset = y
|
||||
@@ -27,7 +27,7 @@
|
||||
tape_overlay = new('icons/obj/bureaucracy.dmi', "tape")
|
||||
tape_overlay.Shift(EAST, x_offset - 2)
|
||||
tape_overlay.Shift(NORTH, y_offset - 2)
|
||||
O.overlays += tape_overlay
|
||||
O.add_overlay(tape_overlay)
|
||||
|
||||
/datum/component/ducttape/proc/remove_tape(obj/item/I, mob/user)
|
||||
to_chat(user, "<span class='notice'>You tear the tape off [I]!</span>")
|
||||
@@ -38,7 +38,7 @@
|
||||
for(var/datum/action/item_action/remove_tape/RT in I.actions)
|
||||
RT.Remove(user)
|
||||
qdel(RT)
|
||||
I.overlays.Cut(tape_overlay)
|
||||
I.cut_overlay(tape_overlay)
|
||||
user.transfer_fingerprints_to(I)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/datum/component/emissive_blocker
|
||||
/// Stores either the mutable_appearance or a list of them
|
||||
var/stored_blocker
|
||||
|
||||
/datum/component/emissive_blocker/Initialize(_stored_blocker)
|
||||
var/atom/movable/A = parent
|
||||
stored_blocker = _stored_blocker
|
||||
RegisterSignal(parent, COMSIG_ATOM_UPDATE_ICON_STATE, .proc/update_generic_block)
|
||||
A.add_overlay(stored_blocker)
|
||||
|
||||
/datum/component/emissive_blocker/Destroy()
|
||||
stored_blocker = null
|
||||
return ..()
|
||||
|
||||
/// Updates the generic blocker when the icon_state is changed
|
||||
/datum/component/emissive_blocker/proc/update_generic_block(datum/source)
|
||||
var/atom/movable/A = parent
|
||||
if(!A.blocks_emissive && stored_blocker)
|
||||
A.cut_overlay(stored_blocker)
|
||||
stored_blocker = null
|
||||
return
|
||||
if(!A.blocks_emissive)
|
||||
return
|
||||
var/mutable_appearance/gen_emissive_blocker = emissive_blocker(A.icon, A.icon_state, alpha = A.alpha, appearance_flags = A.appearance_flags)
|
||||
gen_emissive_blocker.dir = A.dir
|
||||
if(gen_emissive_blocker != stored_blocker || !A.overlays)
|
||||
A.cut_overlay(stored_blocker)
|
||||
stored_blocker = gen_emissive_blocker
|
||||
A.add_overlay(stored_blocker)
|
||||
@@ -0,0 +1,35 @@
|
||||
/datum/component/persistent_overlay
|
||||
var/image/persistent_overlay = null
|
||||
var/atom/target = null
|
||||
|
||||
/datum/component/persistent_overlay/Initialize(image_overlay, _target, timer)
|
||||
persistent_overlay = image_overlay
|
||||
target = _target
|
||||
if(timer)
|
||||
addtimer(CALLBACK(src, .proc/remove_persistent_overlay), timer)
|
||||
if(target)
|
||||
RegisterSignal(target, COMSIG_PARENT_QDELETING, .proc/remove_persistent_overlay)
|
||||
RegisterSignal(parent, COMSIG_PARENT_QDELETING, .proc/remove_persistent_overlay)
|
||||
add_persistent_overlay()
|
||||
|
||||
/datum/component/persistent_overlay/Destroy()
|
||||
persistent_overlay = null
|
||||
target = null
|
||||
return ..()
|
||||
|
||||
/datum/component/persistent_overlay/proc/remove_persistent_overlay(datum/source)
|
||||
var/atom/movable/A
|
||||
if(target)
|
||||
A = target
|
||||
else
|
||||
A = parent
|
||||
A.cut_overlay(persistent_overlay, priority = TRUE)
|
||||
qdel(src)
|
||||
|
||||
/datum/component/persistent_overlay/proc/add_persistent_overlay(datum/source)
|
||||
var/atom/movable/A
|
||||
if(target)
|
||||
A = target
|
||||
else
|
||||
A = parent
|
||||
A.add_overlay(persistent_overlay, priority = TRUE)
|
||||
@@ -364,7 +364,7 @@
|
||||
C.range = 20
|
||||
return C
|
||||
|
||||
/obj/effect/proc_holder/spell/fireball/update_icon()
|
||||
/obj/effect/proc_holder/spell/fireball/update_icon_state()
|
||||
if(!action)
|
||||
return
|
||||
action.button_icon_state = "fireball[active]"
|
||||
|
||||
@@ -370,7 +370,7 @@
|
||||
L.fire_mode = FALSE
|
||||
L.update(TRUE, TRUE, FALSE)
|
||||
|
||||
/area/proc/updateicon()
|
||||
/area/update_icon_state()
|
||||
var/weather_icon
|
||||
for(var/V in SSweather.processing)
|
||||
var/datum/weather/W = V
|
||||
@@ -380,7 +380,7 @@
|
||||
if(!weather_icon)
|
||||
icon_state = null
|
||||
|
||||
/area/space/updateicon()
|
||||
/area/space/update_icon_state()
|
||||
icon_state = null
|
||||
|
||||
/*
|
||||
@@ -417,7 +417,7 @@
|
||||
for(var/obj/machinery/M in src) // for each machine in the area
|
||||
M.power_change() // reverify power status (to update icons etc.)
|
||||
SEND_SIGNAL(src, COMSIG_AREA_POWER_CHANGE)
|
||||
updateicon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/area/proc/usage(chan)
|
||||
var/used = 0
|
||||
|
||||
@@ -36,25 +36,33 @@
|
||||
var/obj/machinery/computer/syndicate_depot/syndiecomms/comms_computer = null
|
||||
var/obj/structure/fusionreactor/reactor
|
||||
|
||||
/area/syndicate_depot/core/updateicon()
|
||||
/area/syndicate_depot/core/proc/update_state()
|
||||
if(destroyed)
|
||||
icon_state = null
|
||||
invisibility = INVISIBILITY_MAXIMUM
|
||||
else if(on_peaceful)
|
||||
icon_state = "green"
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
else if(used_self_destruct)
|
||||
icon_state = "radiation"
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
else if(called_backup)
|
||||
icon_state = "red"
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
else if(local_alarm)
|
||||
icon_state = "bluenew"
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
else
|
||||
icon_state = null
|
||||
invisibility = INVISIBILITY_MAXIMUM
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/area/syndicate_depot/core/update_icon_state()
|
||||
if(invisibility == INVISIBILITY_MAXIMUM)
|
||||
icon_state = null
|
||||
return
|
||||
else if(on_peaceful)
|
||||
icon_state = "green"
|
||||
else if(used_self_destruct)
|
||||
icon_state = "radiation"
|
||||
else if(called_backup)
|
||||
icon_state = "red"
|
||||
else if(local_alarm)
|
||||
icon_state = "bluenew"
|
||||
|
||||
/area/syndicate_depot/core/proc/reset_alert()
|
||||
|
||||
@@ -84,7 +92,7 @@
|
||||
detected_pod = FALSE
|
||||
detected_double_agent = FALSE
|
||||
mine_trigger_count = 0
|
||||
updateicon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
if(!istype(reactor))
|
||||
for(var/obj/structure/fusionreactor/R in src)
|
||||
@@ -112,7 +120,7 @@
|
||||
return
|
||||
if(!used_self_destruct)
|
||||
activate_self_destruct(reason, FALSE, null)
|
||||
updateicon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/area/syndicate_depot/core/proc/locker_looted()
|
||||
if(!something_looted)
|
||||
@@ -197,7 +205,7 @@
|
||||
message_admins("- SYNDI DEPOT VISITOR: [ADMIN_FULLMONTY(M)]")
|
||||
list_add(M, hostile_list)
|
||||
peaceful_list = list()
|
||||
updateicon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/area/syndicate_depot/core/proc/local_alarm(reason, silent)
|
||||
if(local_alarm)
|
||||
@@ -219,7 +227,7 @@
|
||||
var/mob/living/simple_animal/bot/ed209/syndicate/B = new /mob/living/simple_animal/bot/ed209/syndicate(get_turf(S))
|
||||
list_add(B, guard_list)
|
||||
B.depotarea = src
|
||||
updateicon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/area/syndicate_depot/core/proc/call_backup(reason, silent)
|
||||
if(called_backup || used_self_destruct)
|
||||
@@ -252,7 +260,7 @@
|
||||
list_add(S, guard_list)
|
||||
else if(!silent)
|
||||
announce_here("Depot Communications Offline", "Comms computer is damaged, destroyed or depowered. Unable to call in backup from Syndicate HQ.")
|
||||
updateicon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/area/syndicate_depot/core/proc/activate_self_destruct(reason, containment_failure, mob/user)
|
||||
if(used_self_destruct)
|
||||
@@ -265,7 +273,7 @@
|
||||
called_backup = TRUE
|
||||
activate_lockdown(TRUE)
|
||||
lockout_computers()
|
||||
updateicon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
despawn_guards()
|
||||
if(containment_failure)
|
||||
announce_here("Depot Code DELTA", reason)
|
||||
@@ -287,7 +295,7 @@
|
||||
else
|
||||
log_debug("Depot: [src] called activate_self_destruct with no reactor.")
|
||||
message_admins("<span class='adminnotice'>Syndicate Depot lacks reactor to initiate self-destruct. Must be destroyed manually.</span>")
|
||||
updateicon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/area/syndicate_depot/core/proc/activate_lockdown()
|
||||
if(used_lockdown)
|
||||
@@ -312,7 +320,7 @@
|
||||
if(istype(A, /obj/machinery/door/airlock/hatch/syndicate/vault))
|
||||
continue
|
||||
A.emergency = !!openaccess
|
||||
A.update_icon()
|
||||
A.update_appearance()
|
||||
|
||||
/area/syndicate_depot/core/proc/toggle_falsewalls()
|
||||
for(var/obj/structure/falsewall/plastitanium/F in src)
|
||||
|
||||
@@ -45,6 +45,8 @@
|
||||
var/list/priority_overlays //overlays that should remain on top and not normally removed when using cut_overlay functions, like c4.
|
||||
var/list/remove_overlays // a very temporary list of overlays to remove
|
||||
var/list/add_overlays // a very temporary list of overlays to add
|
||||
///overlays managed by [update_overlays][/atom/proc/update_overlays] to prevent removing overlays that weren't added by the same proc. Single items are stored on their own, not in a list.
|
||||
var/list/managed_overlays
|
||||
|
||||
var/list/atom_colours //used to store the different colors on an atom
|
||||
//its inherent color, the colored paint applied on it, special color effect etc...
|
||||
@@ -189,6 +191,8 @@
|
||||
LAZYCLEARLIST(overlays)
|
||||
LAZYCLEARLIST(priority_overlays)
|
||||
|
||||
managed_overlays = null
|
||||
|
||||
QDEL_NULL(light)
|
||||
|
||||
return ..()
|
||||
@@ -391,6 +395,70 @@
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .)
|
||||
|
||||
/**
|
||||
* Updates the appearence of the icon
|
||||
*
|
||||
* Mostly delegates to update_name, update_desc, and update_icon
|
||||
*
|
||||
* Arguments:
|
||||
* - updates: A set of bitflags dictating what should be updated. Defaults to [ALL]
|
||||
*/
|
||||
/atom/proc/update_appearance(updates=ALL)
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
|
||||
/// Signal sent should the appearance be updated. This is more broad if listening to a more specific signal doesn't cut it
|
||||
updates &= ~SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_APPEARANCE, updates)
|
||||
if(updates & UPDATE_NAME)
|
||||
update_name(updates)
|
||||
if(updates & UPDATE_DESC)
|
||||
update_desc(updates)
|
||||
if(updates & UPDATE_ICON)
|
||||
update_icon(updates)
|
||||
|
||||
/// Updates the name of the atom
|
||||
/atom/proc/update_name(updates=ALL)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
return SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_NAME, updates)
|
||||
|
||||
/// Updates the description of the atom
|
||||
/atom/proc/update_desc(updates=ALL)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
return SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_DESC, updates)
|
||||
|
||||
/// Updates the icon of the atom
|
||||
/atom/proc/update_icon(updates=ALL)
|
||||
SIGNAL_HANDLER
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
|
||||
updates &= ~SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_ICON, updates)
|
||||
if(updates & UPDATE_ICON_STATE)
|
||||
update_icon_state()
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_ICON_STATE)
|
||||
|
||||
if(updates & UPDATE_OVERLAYS)
|
||||
var/list/new_overlays = update_overlays(updates)
|
||||
if(managed_overlays)
|
||||
cut_overlay(managed_overlays)
|
||||
managed_overlays = null
|
||||
if(length(new_overlays))
|
||||
if(length(new_overlays) == 1)
|
||||
managed_overlays = new_overlays[1]
|
||||
else
|
||||
managed_overlays = new_overlays
|
||||
add_overlay(new_overlays)
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_OVERLAYS)
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_UPDATED_ICON, updates)
|
||||
|
||||
/// Updates the icon state of the atom
|
||||
/atom/proc/update_icon_state()
|
||||
return
|
||||
|
||||
/// Updates the overlays of the atom. It has to return a list of overlays if it can't call the parent to create one. The list can contain anything that would be valid for the add_overlay proc: Images, mutable appearances, icon states...
|
||||
/atom/proc/update_overlays()
|
||||
return list()
|
||||
|
||||
/atom/proc/relaymove()
|
||||
return
|
||||
|
||||
|
||||
@@ -51,24 +51,17 @@
|
||||
gen_emissive_blocker.color = EM_BLOCK_COLOR
|
||||
gen_emissive_blocker.dir = dir
|
||||
gen_emissive_blocker.appearance_flags |= appearance_flags
|
||||
add_overlay(list(gen_emissive_blocker))
|
||||
AddComponent(/datum/component/emissive_blocker, gen_emissive_blocker)
|
||||
if(EMISSIVE_BLOCK_UNIQUE)
|
||||
render_target = ref(src)
|
||||
em_block = new(src, render_target)
|
||||
add_overlay(list(em_block))
|
||||
|
||||
/atom/movable/proc/update_emissive_block()
|
||||
if(!blocks_emissive)
|
||||
return
|
||||
else if (blocks_emissive == EMISSIVE_BLOCK_GENERIC)
|
||||
var/mutable_appearance/gen_emissive_blocker = emissive_blocker(icon, icon_state, alpha = src.alpha, appearance_flags = src.appearance_flags)
|
||||
gen_emissive_blocker.dir = dir
|
||||
return gen_emissive_blocker
|
||||
else if(blocks_emissive == EMISSIVE_BLOCK_UNIQUE)
|
||||
if(!em_block && !QDELETED(src))
|
||||
render_target = ref(src)
|
||||
em_block = new(src, render_target)
|
||||
add_overlay(list(em_block))
|
||||
if(!em_block && !QDELETED(src))
|
||||
render_target = ref(src)
|
||||
em_block = new(src, render_target)
|
||||
add_overlay(list(em_block))
|
||||
|
||||
/atom/movable/Destroy()
|
||||
unbuckle_all_mobs(force = TRUE)
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
/datum/atom_hud/data/human/medical/basic
|
||||
|
||||
/datum/atom_hud/data/human/medical/basic/proc/check_sensors(mob/living/carbon/human/H)
|
||||
if(!istype(H)) return 0
|
||||
if(!istype(H)) return
|
||||
var/obj/item/clothing/under/U = H.w_uniform
|
||||
if(!istype(U)) return 0
|
||||
if(U.sensor_mode <= 2) return 0
|
||||
return 1
|
||||
if(!istype(U)) return
|
||||
if(U.sensor_mode <= SENSOR_VITALS) return
|
||||
return TRUE
|
||||
|
||||
/datum/atom_hud/data/human/medical/basic/add_to_single_hud(mob/M, mob/living/carbon/H)
|
||||
if(check_sensors(H) || istype(M,/mob/dead/observer) )
|
||||
|
||||
@@ -168,6 +168,12 @@
|
||||
add_fingerprint(usr)
|
||||
SStgui.update_uis(src)
|
||||
|
||||
/obj/machinery/dna_scannernew/update_icon_state()
|
||||
if(occupant)
|
||||
icon_state = "scanner_occupied"
|
||||
else
|
||||
icon_state = "scanner_open"
|
||||
|
||||
/obj/machinery/dna_scannernew/MouseDrop_T(atom/movable/O, mob/user)
|
||||
if(!istype(O))
|
||||
return
|
||||
@@ -266,7 +272,7 @@
|
||||
/obj/machinery/dna_scannernew/proc/put_in(mob/M)
|
||||
M.forceMove(src)
|
||||
occupant = M
|
||||
icon_state = "scanner_occupied"
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
SStgui.update_uis(src)
|
||||
|
||||
// search for ghosts, if the corpse is empty and the scanner is connected to a cloner
|
||||
@@ -288,7 +294,7 @@
|
||||
return
|
||||
occupant.forceMove(loc)
|
||||
occupant = null
|
||||
icon_state = "scanner_open"
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
SStgui.update_uis(src)
|
||||
|
||||
/obj/machinery/dna_scannernew/force_eject_occupant(mob/target)
|
||||
@@ -304,7 +310,7 @@
|
||||
if(A == occupant)
|
||||
occupant = null
|
||||
updateUsrDialog()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
SStgui.update_uis(src)
|
||||
|
||||
// Checks if occupants can be irradiated/mutated - prevents exploits where wearing full rad protection would still let you gain mutations
|
||||
|
||||
@@ -394,7 +394,7 @@
|
||||
var/can_eat = TRUE
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
if((C.head && (C.head.flags_cover & HEADCOVERSMOUTH)) || (C.wear_mask && (C.wear_mask.flags_cover & MASKCOVERSMOUTH) && !C.wear_mask.mask_adjusted))
|
||||
if((C.head && (C.head.flags_cover & HEADCOVERSMOUTH)) || (C.wear_mask && (C.wear_mask.flags_cover & MASKCOVERSMOUTH) && !C.wear_mask.up))
|
||||
if(show_message)
|
||||
to_chat(C, "<span class='warning'>Your mouth is covered, preventing you from eating!</span>")
|
||||
can_eat = FALSE
|
||||
|
||||
@@ -11,12 +11,11 @@
|
||||
START_PROCESSING(SSobj, src)
|
||||
N?.forceMove(src)
|
||||
|
||||
/obj/structure/blob/captured_nuke/update_icon()
|
||||
..()
|
||||
cut_overlays()
|
||||
/obj/structure/blob/captured_nuke/update_overlays()
|
||||
. = ..()
|
||||
var/image/nuke_overlay = image('icons/mob/blob.dmi', "blob_nuke_overlay")
|
||||
nuke_overlay.appearance_flags = RESET_COLOR
|
||||
add_overlay(nuke_overlay)
|
||||
. += nuke_overlay
|
||||
|
||||
/obj/structure/blob/captured_nuke/Destroy()
|
||||
for(var/obj/machinery/nuclearbomb/O in contents)
|
||||
|
||||
@@ -12,20 +12,43 @@
|
||||
/obj/structure/blob/shield/core
|
||||
point_return = 0
|
||||
|
||||
/obj/structure/blob/shield/update_icon()
|
||||
..()
|
||||
/obj/structure/blob/shield/check_integrity()
|
||||
var/old_compromised_integrity = compromised_integrity
|
||||
if(obj_integrity < max_integrity * 0.5)
|
||||
icon_state = "[initial(icon_state)]_damaged"
|
||||
name = "weakened [initial(name)]"
|
||||
desc = "A wall of twitching tendrils."
|
||||
compromised_integrity = TRUE
|
||||
else
|
||||
compromised_integrity = FALSE
|
||||
if(old_compromised_integrity != compromised_integrity)
|
||||
update_state()
|
||||
update_appearance(UPDATE_NAME|UPDATE_DESC|UPDATE_ICON_STATE)
|
||||
|
||||
/obj/structure/blob/shield/update_state()
|
||||
if(compromised_integrity)
|
||||
atmosblock = FALSE
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
name = initial(name)
|
||||
desc = initial(desc)
|
||||
atmosblock = TRUE
|
||||
air_update_turf(1)
|
||||
|
||||
/obj/structure/blob/shield/update_name()
|
||||
. = ..()
|
||||
if(compromised_integrity)
|
||||
name = "weakened [initial(name)]"
|
||||
else
|
||||
name = initial(name)
|
||||
|
||||
/obj/structure/blob/shield/update_desc()
|
||||
. = ..()
|
||||
if(compromised_integrity)
|
||||
desc = "A wall of twitching tendrils."
|
||||
else
|
||||
desc = initial(desc)
|
||||
|
||||
/obj/structure/blob/shield/update_icon_state()
|
||||
if(compromised_integrity)
|
||||
icon_state = "[initial(icon_state)]_damaged"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/structure/blob/shield/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(istype(mover) && mover.checkpass(PASSBLOB)) return 1
|
||||
return 0
|
||||
|
||||
@@ -14,13 +14,15 @@
|
||||
var/brute_resist = 0.5 //multiplies brute damage by this
|
||||
var/fire_resist = 1 //multiplies burn damage by this
|
||||
var/atmosblock = FALSE //if the blob blocks atmos and heat spread
|
||||
/// If a threshold is reached, resulting in shifting variables
|
||||
var/compromised_integrity = FALSE
|
||||
var/mob/camera/blob/overmind
|
||||
|
||||
/obj/structure/blob/Initialize(mapload)
|
||||
. = ..()
|
||||
GLOB.blobs += src
|
||||
setDir(pick(GLOB.cardinal))
|
||||
update_icon()
|
||||
check_integrity()
|
||||
if(atmosblock)
|
||||
air_update_turf(TRUE)
|
||||
ConsumeTile()
|
||||
@@ -63,13 +65,19 @@
|
||||
/obj/structure/blob/proc/Life()
|
||||
return
|
||||
|
||||
/obj/structure/blob/proc/check_integrity()
|
||||
return
|
||||
|
||||
/obj/structure/blob/proc/update_state()
|
||||
return
|
||||
|
||||
/obj/structure/blob/proc/RegenHealth()
|
||||
// All blobs heal over time when pulsed, but it has a cool down
|
||||
if(health_timestamp > world.time)
|
||||
return 0
|
||||
if(obj_integrity < max_integrity)
|
||||
obj_integrity = min(max_integrity, obj_integrity + 1)
|
||||
update_icon()
|
||||
check_integrity()
|
||||
health_timestamp = world.time + 10 // 1 seconds
|
||||
|
||||
|
||||
@@ -186,7 +194,7 @@
|
||||
/obj/structure/blob/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
. = ..()
|
||||
if(. && obj_integrity > 0)
|
||||
update_icon()
|
||||
check_integrity()
|
||||
|
||||
/obj/structure/blob/proc/change_to(type)
|
||||
if(!ispath(type))
|
||||
@@ -219,6 +227,7 @@
|
||||
if(lowertext(B.blob_reagent_datum.color) == lowertext(src.color)) // Goddamit why we use strings for these
|
||||
return B.blob_reagent_datum.description
|
||||
return "something unknown"
|
||||
|
||||
/obj/structure/blob/normal
|
||||
icon_state = "blob"
|
||||
light_range = 0
|
||||
@@ -226,20 +235,38 @@
|
||||
max_integrity = 25
|
||||
brute_resist = 0.25
|
||||
|
||||
/obj/structure/blob/normal/update_icon()
|
||||
..()
|
||||
/obj/structure/blob/normal/check_integrity()
|
||||
var/old_compromised_integrity = compromised_integrity
|
||||
if(obj_integrity <= 15)
|
||||
icon_state = "blob_damaged"
|
||||
name = "fragile blob"
|
||||
desc = "A thin lattice of slightly twitching tendrils."
|
||||
compromised_integrity = TRUE
|
||||
else
|
||||
compromised_integrity = FALSE
|
||||
if(old_compromised_integrity != compromised_integrity)
|
||||
update_state()
|
||||
update_appearance(UPDATE_NAME|UPDATE_DESC|UPDATE_ICON_STATE)
|
||||
|
||||
/obj/structure/blob/normal/update_state()
|
||||
if(compromised_integrity)
|
||||
brute_resist = 0.5
|
||||
else if(overmind)
|
||||
icon_state = "blob"
|
||||
name = "blob"
|
||||
desc = "A thick wall of writhing tendrils."
|
||||
else
|
||||
brute_resist = 0.25
|
||||
|
||||
/obj/structure/blob/normal/update_name()
|
||||
. = ..()
|
||||
if(compromised_integrity)
|
||||
name = "fragile blob"
|
||||
else
|
||||
name = "[overmind ? "blob" : "dead blob"]"
|
||||
|
||||
/obj/structure/blob/normal/update_desc()
|
||||
. = ..()
|
||||
if(compromised_integrity)
|
||||
desc = "A thin lattice of slightly twitching tendrils."
|
||||
else
|
||||
desc = "A thick wall of [overmind ? "writhing" : "lifeless"] tendrils."
|
||||
|
||||
/obj/structure/blob/normal/update_icon_state()
|
||||
if(compromised_integrity)
|
||||
icon_state = "blob_damaged"
|
||||
else
|
||||
icon_state = "blob"
|
||||
name = "dead blob"
|
||||
desc = "A thick wall of lifeless tendrils."
|
||||
brute_resist = 0.25
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
prefix = "darkened"
|
||||
claw_damage_increase = 4
|
||||
|
||||
/obj/item/whetstone/cult/update_icon()
|
||||
/obj/item/whetstone/cult/update_icon_state()
|
||||
icon_state = "cult_sharpener[used ? "_used" : ""]"
|
||||
|
||||
/obj/item/whetstone/cult/attackby(obj/item/I, mob/user, params)
|
||||
@@ -571,7 +571,7 @@
|
||||
qdel(spear_act)
|
||||
..()
|
||||
|
||||
/obj/item/twohanded/cult_spear/update_icon()
|
||||
/obj/item/twohanded/cult_spear/update_icon_state()
|
||||
icon_state = "bloodspear[wielded]"
|
||||
|
||||
/obj/item/twohanded/cult_spear/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
|
||||
@@ -384,7 +384,7 @@
|
||||
<br>
|
||||
Congratulations! You are now trained for invasive xenobiology research!"}
|
||||
|
||||
/obj/item/paper/abductor/update_icon()
|
||||
/obj/item/paper/abductor/update_icon_state()
|
||||
return
|
||||
|
||||
/obj/item/paper/abductor/AltClick()
|
||||
@@ -422,12 +422,12 @@ Congratulations! You are now trained for invasive xenobiology research!"}
|
||||
txt = "probing"
|
||||
|
||||
to_chat(usr, "<span class='notice'>You switch the baton to [txt] mode.</span>")
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
/obj/item/abductor_baton/update_icon()
|
||||
/obj/item/abductor_baton/update_icon_state()
|
||||
switch(mode)
|
||||
if(BATON_STUN)
|
||||
icon_state = "wonderprodStun"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
var/mind_control_duration = 1800
|
||||
var/active_mind_control = FALSE
|
||||
|
||||
/obj/item/organ/internal/heart/gland/update_icon()
|
||||
/obj/item/organ/internal/heart/gland/update_icon_state()
|
||||
return
|
||||
|
||||
/obj/item/organ/internal/heart/gland/proc/ownerCheck()
|
||||
|
||||
@@ -17,6 +17,12 @@
|
||||
eject_abductee()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/abductor/experiment/update_icon_state()
|
||||
if(occupant)
|
||||
icon_state = "experiment"
|
||||
else
|
||||
icon_state = "experiment-open"
|
||||
|
||||
/obj/machinery/abductor/experiment/MouseDrop_T(mob/living/carbon/human/target, mob/user)
|
||||
if(user.stat || HAS_TRAIT(user, TRAIT_UI_BLOCKED) || !Adjacent(user) || !target.Adjacent(user) || !ishuman(target))
|
||||
return
|
||||
@@ -34,7 +40,7 @@
|
||||
|
||||
target.forceMove(src)
|
||||
occupant = target
|
||||
icon_state = "experiment"
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/machinery/abductor/experiment/attack_hand(mob/user)
|
||||
@@ -196,7 +202,7 @@
|
||||
var/mob/living/carbon/human/H = grabbed.affecting
|
||||
H.forceMove(src)
|
||||
occupant = H
|
||||
icon_state = "experiment"
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
add_fingerprint(user)
|
||||
qdel(G)
|
||||
return
|
||||
@@ -212,11 +218,11 @@
|
||||
if(A == occupant)
|
||||
occupant = null
|
||||
updateUsrDialog()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/abductor/experiment/proc/eject_abductee()
|
||||
if(!occupant)
|
||||
return
|
||||
occupant.forceMove(get_turf(src))
|
||||
occupant = null
|
||||
icon_state = "experiment-open"
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
@@ -465,10 +465,9 @@
|
||||
<b>Protector</b>: You will become leashed to your holoparasite instead of them to you. Has two modes, a medium attack/defense mode and a protection mode which greatly reduces incoming damage to the holoparasite.
|
||||
"}
|
||||
|
||||
/obj/item/paper/guardian/update_icon()
|
||||
/obj/item/paper/guardian/update_icon_state()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/storage/box/syndie_kit/guardian
|
||||
name = "holoparasite injector kit"
|
||||
|
||||
|
||||
@@ -248,7 +248,7 @@
|
||||
icon_state = "demon_heart"
|
||||
origin_tech = "combat=5;biotech=7"
|
||||
|
||||
/obj/item/organ/internal/heart/demon/update_icon()
|
||||
/obj/item/organ/internal/heart/demon/update_icon_state()
|
||||
return //always beating visually
|
||||
|
||||
/obj/item/organ/internal/heart/demon/prepare_eat()
|
||||
|
||||
@@ -73,6 +73,11 @@ GLOBAL_VAR(bomb_set)
|
||||
INVOKE_ASYNC(src, .proc/explode)
|
||||
return
|
||||
|
||||
/obj/machinery/nuclearbomb/update_overlays()
|
||||
. = ..()
|
||||
if(panel_open)
|
||||
. += "npanel_open"
|
||||
|
||||
/obj/machinery/nuclearbomb/attackby(obj/item/O as obj, mob/user as mob, params)
|
||||
if(istype(O, /obj/item/disk/nuclear))
|
||||
if(extended)
|
||||
@@ -184,13 +189,11 @@ GLOBAL_VAR(bomb_set)
|
||||
if(auth || (istype(I, /obj/item/screwdriver/nuke)))
|
||||
if(!panel_open)
|
||||
panel_open = TRUE
|
||||
overlays += image(icon, "npanel_open")
|
||||
to_chat(user, "You unscrew the control panel of [src].")
|
||||
anchor_stage = removal_stage
|
||||
removal_stage = core_stage
|
||||
else
|
||||
panel_open = FALSE
|
||||
overlays -= image(icon, "npanel_open")
|
||||
to_chat(user, "You screw the control panel of [src] back on.")
|
||||
core_stage = removal_stage
|
||||
removal_stage = anchor_stage
|
||||
@@ -199,11 +202,11 @@ GLOBAL_VAR(bomb_set)
|
||||
to_chat(user, "[src] emits a buzzing noise, the panel staying locked in.")
|
||||
if(panel_open == TRUE)
|
||||
panel_open = FALSE
|
||||
overlays -= image(icon, "npanel_open")
|
||||
to_chat(user, "You screw the control panel of [src] back on.")
|
||||
core_stage = removal_stage
|
||||
removal_stage = anchor_stage
|
||||
flick("nuclearbombc", src)
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/machinery/nuclearbomb/wirecutter_act(mob/user, obj/item/I)
|
||||
if(!panel_open)
|
||||
|
||||
@@ -43,10 +43,10 @@
|
||||
|
||||
/obj/machinery/bluespace_beacon/hide(intact)
|
||||
invisibility = intact ? INVISIBILITY_MAXIMUM : 0
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
// update the icon_state
|
||||
/obj/machinery/bluespace_beacon/update_icon()
|
||||
/obj/machinery/bluespace_beacon/update_icon_state()
|
||||
var/state="floor_beacon"
|
||||
if(invisibility)
|
||||
icon_state = "[state]f"
|
||||
@@ -60,11 +60,11 @@
|
||||
Beacon.loc = loc
|
||||
else
|
||||
create_beacon()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
else
|
||||
if(Beacon)
|
||||
destroy_beacon()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
|
||||
/obj/machinery/bluespace_beacon/syndicate
|
||||
|
||||
@@ -9,23 +9,21 @@
|
||||
var/obj/item/pda/storedpda = null
|
||||
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
|
||||
icon_state = "[initial(icon_state)]-off"
|
||||
|
||||
return
|
||||
/obj/machinery/pdapainter/update_overlays()
|
||||
. = ..()
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
if(storedpda)
|
||||
. += "[initial(icon_state)]-closed"
|
||||
|
||||
/obj/machinery/pdapainter/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
else
|
||||
set_light(0)
|
||||
|
||||
/obj/machinery/sleeper/update_icon_state()
|
||||
if(occupant)
|
||||
icon_state = base_icon
|
||||
else
|
||||
icon_state = "[base_icon]-open"
|
||||
|
||||
/obj/machinery/sleeper/Initialize(mapload)
|
||||
. = ..()
|
||||
component_parts = list()
|
||||
@@ -346,7 +352,7 @@
|
||||
var/mob/M = G.affecting
|
||||
M.forceMove(src)
|
||||
occupant = M
|
||||
icon_state = "[base_icon]"
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
to_chat(M, "<span class='boldnotice'>You feel cool air surround you. You go numb as your senses turn inward.</span>")
|
||||
add_fingerprint(user)
|
||||
qdel(G)
|
||||
@@ -396,7 +402,7 @@
|
||||
if(A == occupant)
|
||||
occupant = null
|
||||
updateUsrDialog()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
SStgui.update_uis(src)
|
||||
if(A == beaker)
|
||||
beaker = null
|
||||
@@ -431,7 +437,7 @@
|
||||
return
|
||||
occupant.forceMove(loc)
|
||||
occupant = null
|
||||
icon_state = "[base_icon]-open"
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
// eject trash the occupant dropped
|
||||
for(var/atom/movable/A in contents - component_parts - list(beaker))
|
||||
A.forceMove(loc)
|
||||
@@ -468,7 +474,6 @@
|
||||
if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other
|
||||
return
|
||||
|
||||
icon_state = "[base_icon]-open"
|
||||
go_out()
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
@@ -504,7 +509,7 @@
|
||||
return
|
||||
L.forceMove(src)
|
||||
occupant = L
|
||||
icon_state = "[base_icon]"
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
to_chat(L, "<span class='boldnotice'>You feel cool air surround you. You go numb as your senses turn inward.</span>")
|
||||
add_fingerprint(user)
|
||||
if(user.pulling == L)
|
||||
@@ -575,7 +580,7 @@
|
||||
usr.stop_pulling()
|
||||
usr.forceMove(src)
|
||||
occupant = usr
|
||||
icon_state = "[base_icon]"
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
for(var/obj/O in src)
|
||||
qdel(O)
|
||||
|
||||
@@ -48,6 +48,12 @@
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 2)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/bodyscanner/update_icon_state()
|
||||
if(occupant)
|
||||
icon_state = "bodyscanner"
|
||||
else
|
||||
icon_state = "bodyscanner-open"
|
||||
|
||||
/obj/machinery/bodyscanner/attackby(obj/item/I, mob/user)
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
@@ -71,7 +77,7 @@
|
||||
return
|
||||
M.forceMove(src)
|
||||
occupant = M
|
||||
icon_state = "bodyscanner"
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
add_fingerprint(user)
|
||||
qdel(TYPECAST_YOUR_SHIT)
|
||||
SStgui.update_uis(src)
|
||||
@@ -135,7 +141,7 @@
|
||||
|
||||
H.forceMove(src)
|
||||
occupant = H
|
||||
icon_state = "bodyscanner"
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
add_fingerprint(user)
|
||||
SStgui.update_uis(src)
|
||||
|
||||
@@ -178,7 +184,7 @@
|
||||
return
|
||||
occupant.forceMove(loc)
|
||||
occupant = null
|
||||
icon_state = "bodyscanner-open"
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
// eject trash the occupant dropped
|
||||
for(var/atom/movable/A in contents - component_parts)
|
||||
A.forceMove(loc)
|
||||
@@ -197,7 +203,7 @@
|
||||
if(A == occupant)
|
||||
occupant = null
|
||||
updateUsrDialog()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/bodyscanner/narsie_act()
|
||||
go_out()
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
stat |= NOPOWER
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/ai_slipper/attack_ai(mob/user)
|
||||
add_hiddenprint(user)
|
||||
@@ -56,7 +56,7 @@
|
||||
power_change()
|
||||
addtimer(CALLBACK(src, .proc/recharge), cooldown_time)
|
||||
|
||||
/obj/machinery/ai_slipper/update_icon()
|
||||
/obj/machinery/ai_slipper/update_icon_state()
|
||||
if(stat & (NOPOWER|BROKEN) || cooldown_on || !uses)
|
||||
icon_state = "liquid_dispenser"
|
||||
else
|
||||
|
||||
@@ -74,21 +74,21 @@
|
||||
return
|
||||
if(!isEmpProof())
|
||||
if(prob(150/severity))
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
var/list/previous_network = network
|
||||
network = list()
|
||||
GLOB.cameranet.removeCamera(src)
|
||||
stat |= EMPED
|
||||
set_light(0)
|
||||
emped = emped+1 //Increase the number of consecutive EMP's
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
var/thisemp = emped //Take note of which EMP this proc is for
|
||||
spawn(900)
|
||||
if(!QDELETED(src))
|
||||
if(emped == thisemp) //Only fix it if the camera hasn't been EMP'd again
|
||||
network = previous_network
|
||||
stat &= ~EMPED
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
if(can_use())
|
||||
GLOB.cameranet.addCamera(src)
|
||||
emped = 0 //Resets the consecutive EMP count
|
||||
@@ -243,7 +243,7 @@
|
||||
new /obj/item/stack/cable_coil(loc, 2)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/camera/update_icon()
|
||||
/obj/machinery/camera/update_icon_state()
|
||||
if(!status)
|
||||
icon_state = "[initial(icon_state)]1"
|
||||
else if(stat & EMPED)
|
||||
@@ -277,7 +277,7 @@
|
||||
visible_message("<span class='danger'>\The [src] [change_msg]!</span>")
|
||||
|
||||
playsound(loc, toggle_sound, 100, 1)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
// now disconnect anyone using the camera
|
||||
//Apparently, this will disconnect anyone even if the camera was re-activated.
|
||||
|
||||
@@ -127,12 +127,12 @@
|
||||
WRENCH_ANCHOR_TO_WALL_MESSAGE
|
||||
anchored = TRUE
|
||||
state = ASSEMBLY_WRENCHED
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
auto_turn()
|
||||
else if(state == ASSEMBLY_WRENCHED)
|
||||
WRENCH_UNANCHOR_WALL_MESSAGE
|
||||
anchored = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
state = ASSEMBLY_UNBUILT
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] can't fit here!</span>")
|
||||
@@ -155,7 +155,7 @@
|
||||
to_chat(user, "<span class='notice'>You unweld [src] from its place.</span>")
|
||||
state = ASSEMBLY_WRENCHED
|
||||
|
||||
/obj/item/camera_assembly/update_icon()
|
||||
/obj/item/camera_assembly/update_icon_state()
|
||||
if(anchored)
|
||||
icon_state = "camera1"
|
||||
else
|
||||
|
||||
@@ -21,20 +21,13 @@
|
||||
QDEL_NULL(charging)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/cell_charger/proc/updateicon()
|
||||
/obj/machinery/cell_charger/update_icon_state()
|
||||
icon_state = "ccharger[charging ? 1 : 0]"
|
||||
|
||||
/obj/machinery/cell_charger/update_overlays()
|
||||
. = ..()
|
||||
if(charging && !(stat & (BROKEN|NOPOWER)))
|
||||
var/newlevel = round(charging.percent() * 4 / 100)
|
||||
|
||||
if(chargelevel != newlevel)
|
||||
chargelevel = newlevel
|
||||
|
||||
overlays.Cut()
|
||||
overlays += "ccharger-o[newlevel]"
|
||||
|
||||
else
|
||||
overlays.Cut()
|
||||
. += "ccharger-o[chargelevel]"
|
||||
|
||||
/obj/machinery/cell_charger/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -66,8 +59,8 @@
|
||||
I.forceMove(src)
|
||||
charging = I
|
||||
user.visible_message("[user] inserts a cell into the charger.", "<span class='notice'>You insert a cell into the charger.</span>")
|
||||
chargelevel = -1
|
||||
updateicon()
|
||||
check_level()
|
||||
update_icon()
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -89,7 +82,7 @@
|
||||
charging.update_icon()
|
||||
charging = null
|
||||
chargelevel = -1
|
||||
updateicon()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/cell_charger/attack_hand(mob/user)
|
||||
if(!charging)
|
||||
@@ -134,4 +127,11 @@
|
||||
use_power(200) //this used to use CELLRATE, but CELLRATE is fucking awful. feel free to fix this properly!
|
||||
charging.give(175) //inefficiency.
|
||||
|
||||
updateicon()
|
||||
if(check_level())
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/machinery/cell_charger/proc/check_level()
|
||||
var/newlevel = round(charging.percent() * 4 / 100)
|
||||
if(chargelevel != newlevel)
|
||||
chargelevel = newlevel
|
||||
return TRUE
|
||||
|
||||
@@ -523,13 +523,7 @@ GLOBAL_LIST_INIT(cloner_biomass_items, list(\
|
||||
mess = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/clonepod/update_icon()
|
||||
..()
|
||||
cut_overlays()
|
||||
|
||||
if(panel_open)
|
||||
add_overlay("panel_open")
|
||||
|
||||
/obj/machinery/clonepod/update_icon_state()
|
||||
if(occupant && !(stat & NOPOWER))
|
||||
icon_state = "pod_cloning"
|
||||
else if(mess)
|
||||
@@ -537,6 +531,11 @@ GLOBAL_LIST_INIT(cloner_biomass_items, list(\
|
||||
else
|
||||
icon_state = "pod_idle"
|
||||
|
||||
/obj/machinery/clonepod/update_overlays()
|
||||
. = ..()
|
||||
if(panel_open)
|
||||
. += "panel_open"
|
||||
|
||||
/obj/machinery/clonepod/relaymove(mob/user)
|
||||
if(user.stat == CONSCIOUS)
|
||||
go_out()
|
||||
|
||||
@@ -289,7 +289,7 @@
|
||||
for(var/mob/living/simple_animal/hostile/carp/C in linkedholodeck)
|
||||
qdel(C)
|
||||
|
||||
holographic_items = A.copy_contents_to(linkedholodeck , 1)
|
||||
holographic_items = A.copy_contents_to(linkedholodeck , 1, perfect_copy = FALSE)
|
||||
|
||||
if(emagged)
|
||||
for(var/obj/item/holo/H in linkedholodeck)
|
||||
@@ -343,9 +343,9 @@
|
||||
|
||||
/turf/simulated/floor/holofloor/carpet/Initialize(mapload)
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/turf/simulated/floor/holofloor/carpet/update_icon()
|
||||
/turf/simulated/floor/holofloor/carpet/update_icon_state()
|
||||
if(!..())
|
||||
return 0
|
||||
if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
|
||||
@@ -594,7 +594,7 @@
|
||||
|
||||
ready = !ready
|
||||
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
var/numbuttons = 0
|
||||
var/numready = 0
|
||||
@@ -606,7 +606,7 @@
|
||||
if(numbuttons == numready)
|
||||
begin_event()
|
||||
|
||||
/obj/machinery/readybutton/update_icon()
|
||||
/obj/machinery/readybutton/update_icon_state()
|
||||
if(ready)
|
||||
icon_state = "auth_on"
|
||||
else
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
return
|
||||
playsound(loc, P.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You place the circuit board inside the frame.</span>")
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
state = CIRCUIT_CORE
|
||||
P.forceMove(src)
|
||||
circuit = P
|
||||
@@ -38,7 +38,7 @@
|
||||
if(do_after(user, 20, target = src) && state == SCREWED_CORE && C.use(5))
|
||||
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
|
||||
state = CABLED_CORE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need five lengths of cable to wire the AI core!</span>")
|
||||
return
|
||||
@@ -51,7 +51,7 @@
|
||||
if(do_after(user, 20, target = src) && state == CABLED_CORE && G.use(2))
|
||||
to_chat(user, "<span class='notice'>You put in the glass panel.</span>")
|
||||
state = GLASS_CORE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need two sheets of reinforced glass to insert them into the AI core!</span>")
|
||||
return
|
||||
@@ -119,7 +119,7 @@
|
||||
M.forceMove(src)
|
||||
brain = M
|
||||
to_chat(user, "<span class='notice'>You add [M.name] to the frame.</span>")
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return
|
||||
|
||||
return ..()
|
||||
@@ -147,7 +147,7 @@
|
||||
to_chat(user, "<span class='notice'>You remove the brain.</span>")
|
||||
brain.forceMove(loc)
|
||||
brain = null
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/structure/AIcore/screwdriver_act(mob/living/user, obj/item/I)
|
||||
if(!(state in list(SCREWED_CORE, CIRCUIT_CORE, GLASS_CORE, AI_READY_CORE)))
|
||||
@@ -185,7 +185,7 @@
|
||||
if(AI_READY_CORE)
|
||||
to_chat(user, "<span class='notice'>You disconnect the monitor.</span>")
|
||||
state = GLASS_CORE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
|
||||
/obj/structure/AIcore/wirecutter_act(mob/living/user, obj/item/I)
|
||||
@@ -199,7 +199,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You remove the cables.</span>")
|
||||
state = SCREWED_CORE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( loc )
|
||||
A.amount = 5
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
return
|
||||
default_unfasten_wrench(user, I, 20)
|
||||
|
||||
/obj/structure/AIcore/update_icon()
|
||||
/obj/structure/AIcore/update_icon_state()
|
||||
switch(state)
|
||||
if(EMPTY_CORE)
|
||||
icon_state = "0"
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
if("radio")
|
||||
occupant.aiRadio.disabledAi = !occupant.aiRadio.disabledAi
|
||||
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/aifixer/proc/fix_ai() // Can we fix it? Probrably.
|
||||
@@ -86,26 +86,22 @@
|
||||
occupant.updatehealth()
|
||||
if(occupant.health >= 0 && occupant.stat == DEAD)
|
||||
occupant.update_revive()
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
sleep(10)
|
||||
active = FALSE
|
||||
|
||||
/obj/machinery/computer/aifixer/update_icon()
|
||||
..()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
/obj/machinery/computer/aifixer/update_overlays()
|
||||
. = ..()
|
||||
if(active)
|
||||
. += "ai-fixer-on"
|
||||
if(occupant)
|
||||
switch(occupant.stat)
|
||||
if(0)
|
||||
. += "ai-fixer-full"
|
||||
if(2)
|
||||
. += "ai-fixer-404"
|
||||
else
|
||||
var/overlay_layer = LIGHTING_LAYER+0.2 // +0.1 from the default computer overlays
|
||||
if(active)
|
||||
overlays += image(icon,"ai-fixer-on",overlay_layer)
|
||||
if(occupant)
|
||||
switch(occupant.stat)
|
||||
if(0)
|
||||
overlays += image(icon,"ai-fixer-full",overlay_layer)
|
||||
if(2)
|
||||
overlays += image(icon,"ai-fixer-404",overlay_layer)
|
||||
else
|
||||
overlays += image(icon,"ai-fixer-empty",overlay_layer)
|
||||
. += "ai-fixer-empty"
|
||||
|
||||
/obj/machinery/computer/aifixer/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card)
|
||||
if(!..())
|
||||
@@ -121,7 +117,7 @@
|
||||
AI.aiRadio.disabledAi = TRUE
|
||||
to_chat(AI, "You have been uploaded to a stationary terminal. Sadly, there is no remote access from here.")
|
||||
to_chat(user, "<span class='boldnotice'>Transfer successful</span>: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed.")
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
else //Uploading AI from terminal to card
|
||||
if(occupant && !active)
|
||||
@@ -129,7 +125,7 @@
|
||||
to_chat(user, "<span class='boldnotice'>Transfer successful</span>: [occupant.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory.")
|
||||
occupant.forceMove(card)
|
||||
occupant = null
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
else if(active)
|
||||
to_chat(user, "<span class='boldannounce'>ERROR</span>: Reconstruction in progress.")
|
||||
else if(!occupant)
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
minor_alarms += zone
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/atmos_alert/update_icon()
|
||||
/obj/machinery/computer/atmos_alert/update_icon_state()
|
||||
if(length(priority_alarms))
|
||||
icon_screen = "alert:2"
|
||||
else if(length(minor_alarms))
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
// 16 for nitrogen concentration
|
||||
// 32 for carbon dioxide concentration
|
||||
|
||||
/obj/machinery/air_sensor/update_icon()
|
||||
/obj/machinery/air_sensor/update_icon_state()
|
||||
icon_state = "gsensor[on]"
|
||||
|
||||
/obj/machinery/air_sensor/multitool_menu(mob/user, obj/item/multitool/P)
|
||||
|
||||
@@ -457,8 +457,7 @@
|
||||
if(state == STATE_GLASS)
|
||||
new /obj/item/stack/sheet/glass(location, 2)
|
||||
|
||||
/obj/structure/computerframe/update_icon()
|
||||
. = ..()
|
||||
/obj/structure/computerframe/update_icon_state()
|
||||
icon_state = "comp_frame_[state]"
|
||||
|
||||
/obj/structure/computerframe/welder_act(mob/user, obj/item/I)
|
||||
|
||||
@@ -67,24 +67,24 @@
|
||||
update_icon()
|
||||
flickering = FALSE
|
||||
|
||||
/obj/machinery/computer/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/computer/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
if((stat & NOPOWER) || force_no_power_icon_state)
|
||||
if(icon_keyboard)
|
||||
add_overlay("[icon_keyboard]_off")
|
||||
. += "[icon_keyboard]_off"
|
||||
return
|
||||
|
||||
// This whole block lets screens and keyboards ignore lighting and be visible even in the darkest room
|
||||
var/overlay_state = icon_screen
|
||||
if(stat & BROKEN)
|
||||
overlay_state = "[icon_state]_broken"
|
||||
add_overlay("[overlay_state]")
|
||||
. += "[overlay_state]"
|
||||
if(!(stat & BROKEN) && light)
|
||||
underlays += emissive_appearance(icon, "[icon_state]_lightmask")
|
||||
|
||||
if(icon_keyboard)
|
||||
add_overlay("[icon_keyboard]")
|
||||
. += "[icon_keyboard]"
|
||||
underlays += emissive_appearance(icon, "[icon_keyboard]_lightmask")
|
||||
|
||||
/obj/machinery/computer/power_change()
|
||||
|
||||
@@ -81,14 +81,12 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>A no server error appears on the screen.</span>")
|
||||
|
||||
/obj/machinery/computer/message_monitor/update_icon()
|
||||
/obj/machinery/computer/message_monitor/update_icon_state()
|
||||
if(emag || hacking)
|
||||
icon_screen = hack_icon
|
||||
else
|
||||
icon_screen = normal_icon
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/message_monitor/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
return
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/station_alert/update_icon()
|
||||
/obj/machinery/computer/station_alert/update_icon_state()
|
||||
var/active_alarms = FALSE
|
||||
var/list/list/temp_alarm_list = SSalarm.alarms.Copy()
|
||||
for(var/cat in temp_alarm_list)
|
||||
@@ -92,5 +92,3 @@
|
||||
icon_screen = "alert:2"
|
||||
else
|
||||
icon_screen = "alert:0"
|
||||
|
||||
..()
|
||||
|
||||
@@ -70,13 +70,11 @@
|
||||
WRENCH_UNANCHOR_MESSAGE
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
|
||||
/obj/machinery/disco/update_icon()
|
||||
/obj/machinery/disco/update_icon_state()
|
||||
if(active)
|
||||
icon_state = "disco1"
|
||||
else
|
||||
icon_state = "disco0"
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/disco/attack_hand(mob/user)
|
||||
if(..())
|
||||
@@ -127,7 +125,7 @@
|
||||
playsound(src, 'sound/misc/compiler-failure.ogg', 50, 1)
|
||||
return
|
||||
active = TRUE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
dance_setup()
|
||||
START_PROCESSING(SSobj, src)
|
||||
lights_spin()
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
/obj/machinery/defibrillator_mount/loaded/Initialize(mapload) //loaded subtype for mapping use
|
||||
. = ..()
|
||||
defib = new/obj/item/defibrillator/loaded(src)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/machinery/defibrillator_mount/Destroy()
|
||||
QDEL_NULL(defib)
|
||||
@@ -58,19 +58,19 @@
|
||||
if(defib && defib.cell && defib.cell.charge < defib.cell.maxcharge && is_operational())
|
||||
use_power(200)
|
||||
defib.cell.give(180) //90% efficiency, slightly better than the cell charger's 87.5%
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/machinery/defibrillator_mount/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/defibrillator_mount/update_overlays()
|
||||
. = ..()
|
||||
if(defib)
|
||||
add_overlay("defib")
|
||||
. += "defib"
|
||||
if(defib.powered)
|
||||
add_overlay(defib.safety ? "online" : "emagged")
|
||||
. += "[defib.safety ? "online" : "emagged"]"
|
||||
var/ratio = defib.cell.charge / defib.cell.maxcharge
|
||||
ratio = CEILING(ratio * 4, 1) * 25
|
||||
add_overlay("charge[ratio]")
|
||||
. += "charge[ratio]"
|
||||
if(clamps_locked)
|
||||
add_overlay("clamps")
|
||||
. += "clamps"
|
||||
|
||||
//defib interaction
|
||||
/obj/machinery/defibrillator_mount/attack_hand(mob/living/user)
|
||||
@@ -95,7 +95,7 @@
|
||||
"<span class='notice'>You press [I] into the mount, and it clicks into place.</span>")
|
||||
playsound(src, 'sound/machines/click.ogg', 50, TRUE)
|
||||
defib = I
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
return
|
||||
else if(defib && I == defib.paddles)
|
||||
user.drop_item()
|
||||
@@ -108,7 +108,7 @@
|
||||
return
|
||||
clamps_locked = !clamps_locked
|
||||
to_chat(user, "<span class='notice'>Clamps [clamps_locked ? "" : "dis"]engaged.</span>")
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Insufficient access.</span>")
|
||||
return
|
||||
@@ -143,7 +143,7 @@
|
||||
"<span class='notice'>You slide out [defib] from [src] and unhook the charging cables.</span>")
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, TRUE)
|
||||
defib = null
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
//wallframe, for attaching the mounts easily
|
||||
/obj/item/mounted/frame/defib_mount
|
||||
|
||||
@@ -330,8 +330,14 @@ GLOBAL_LIST_EMPTY(airlock_overlays)
|
||||
if(AIRLOCK_OPEN, AIRLOCK_CLOSED)
|
||||
if(AIRLOCK_DENY, AIRLOCK_OPENING, AIRLOCK_CLOSING, AIRLOCK_EMAG)
|
||||
icon_state = "nonexistenticonstate" //MADNESS
|
||||
|
||||
. = ..(UPDATE_ICON_STATE) // Sent after the icon_state is changed
|
||||
|
||||
set_airlock_overlays(state)
|
||||
|
||||
/obj/machinery/door/airlock/update_icon_state()
|
||||
return
|
||||
|
||||
/obj/machinery/door/airlock/proc/set_airlock_overlays(state)
|
||||
var/image/frame_overlay
|
||||
var/image/filling_overlay
|
||||
@@ -1380,9 +1386,13 @@ GLOBAL_LIST_EMPTY(airlock_overlays)
|
||||
/obj/machinery/door/airlock/proc/note_type() //Returns a string representing the type of note pinned to this airlock
|
||||
if(!note)
|
||||
return
|
||||
else if(istype(note, /obj/item/paper))
|
||||
return "note"
|
||||
else if(istype(note, /obj/item/photo))
|
||||
if(istype(note, /obj/item/paper))
|
||||
var/obj/item/paper/pinned_paper = note
|
||||
if(pinned_paper.info)
|
||||
return "note_words"
|
||||
else
|
||||
return "note"
|
||||
if(istype(note, /obj/item/photo))
|
||||
return "photo"
|
||||
|
||||
//Removes the current note on the door if any. Returns if a note is removed
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
var/alert = 0
|
||||
var/previousPressure
|
||||
|
||||
/obj/machinery/airlock_sensor/update_icon()
|
||||
/obj/machinery/airlock_sensor/update_icon_state()
|
||||
if(on)
|
||||
if(alert)
|
||||
icon_state = "airlock_sensor_alert"
|
||||
@@ -191,7 +191,7 @@
|
||||
|
||||
alert = (pressure < ONE_ATMOSPHERE*0.8)
|
||||
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/airlock_sensor/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
@@ -226,7 +226,7 @@
|
||||
var/command = "cycle"
|
||||
var/on = TRUE
|
||||
|
||||
/obj/machinery/access_button/update_icon()
|
||||
/obj/machinery/access_button/update_icon_state()
|
||||
if(on)
|
||||
icon_state = "access_button_standby"
|
||||
else
|
||||
|
||||
@@ -142,9 +142,9 @@
|
||||
if(T.id == id)
|
||||
targets += T
|
||||
|
||||
if(targets.len==0)
|
||||
if(!length(targets))
|
||||
stat |= BROKEN
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/door_timer/Destroy()
|
||||
QDEL_NULL(Radio)
|
||||
@@ -165,7 +165,7 @@
|
||||
timer_end() // open doors, reset timer, clear status screen
|
||||
timing = FALSE
|
||||
. = PROCESS_KILL
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
else
|
||||
timer_end()
|
||||
return PROCESS_KILL
|
||||
@@ -173,7 +173,7 @@
|
||||
// has the door power situation changed, if so update icon.
|
||||
/obj/machinery/door_timer/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
|
||||
// open/closedoor checks if door_timer has power, if so it checks if the
|
||||
@@ -358,7 +358,7 @@
|
||||
prisoner_time = null
|
||||
timing = TRUE
|
||||
timer_start()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
if("restart_timer")
|
||||
if(timing)
|
||||
var/reset_reason = sanitize(copytext(input(usr, "Reason for resetting timer:", name, "") as text|null, 1, MAX_MESSAGE_LEN))
|
||||
@@ -395,7 +395,7 @@
|
||||
// if NOPOWER, display blank
|
||||
// if BROKEN, display blue screen of death icon AI uses
|
||||
// if timing=true, run update display function
|
||||
/obj/machinery/door_timer/update_icon()
|
||||
/obj/machinery/door_timer/update_icon_state()
|
||||
if(stat & (NOPOWER))
|
||||
icon_state = "frame"
|
||||
return
|
||||
|
||||
@@ -149,26 +149,34 @@
|
||||
var/mob/living/simple_animal/bot/B = user
|
||||
B.door_opened(src)
|
||||
else
|
||||
if(pry_open_check(user))
|
||||
return
|
||||
do_animate("deny")
|
||||
if(HAS_TRAIT(user, TRAIT_FORCE_DOORS))
|
||||
var/datum/antagonist/vampire/V = user.mind.has_antag_datum(/datum/antagonist/vampire)
|
||||
|
||||
if(V && HAS_TRAIT_FROM(user, TRAIT_FORCE_DOORS, VAMPIRE_TRAIT))
|
||||
if(!V.bloodusable)
|
||||
REMOVE_TRAIT(user, TRAIT_FORCE_DOORS, VAMPIRE_TRAIT)
|
||||
return
|
||||
if(welded)
|
||||
to_chat(user, "<span class='warning'>The door is welded.</span>")
|
||||
return
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>The door is bolted.</span>")
|
||||
return
|
||||
if(density)
|
||||
visible_message("<span class='danger'>[user] forces the door open!</span>")
|
||||
playsound(loc, "sparks", 100, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
|
||||
open(TRUE)
|
||||
if(V && HAS_TRAIT_FROM(user, TRAIT_FORCE_DOORS, VAMPIRE_TRAIT))
|
||||
V.bloodusable = max(V.bloodusable - 5, 0)
|
||||
/obj/machinery/door/proc/pry_open_check(mob/user)
|
||||
. = TRUE
|
||||
if(isterrorspider(user))
|
||||
return
|
||||
|
||||
if(!HAS_TRAIT(user, TRAIT_FORCE_DOORS))
|
||||
return FALSE
|
||||
var/datum/antagonist/vampire/V = user.mind?.has_antag_datum(/datum/antagonist/vampire)
|
||||
if(V && HAS_TRAIT_FROM(user, TRAIT_FORCE_DOORS, VAMPIRE_TRAIT))
|
||||
if(!V.bloodusable)
|
||||
REMOVE_TRAIT(user, TRAIT_FORCE_DOORS, VAMPIRE_TRAIT)
|
||||
return FALSE
|
||||
if(welded)
|
||||
to_chat(user, "<span class='warning'>The door is welded.</span>")
|
||||
return FALSE
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>The door is bolted.</span>")
|
||||
return FALSE
|
||||
if(density)
|
||||
visible_message("<span class='danger'>[user] forces the door open!</span>")
|
||||
playsound(loc, "sparks", 100, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
|
||||
open(TRUE)
|
||||
if(V && HAS_TRAIT_FROM(user, TRAIT_FORCE_DOORS, VAMPIRE_TRAIT))
|
||||
V.bloodusable = max(V.bloodusable - 5, 0)
|
||||
|
||||
/obj/machinery/door/attack_ai(mob/user)
|
||||
return attack_hand(user)
|
||||
@@ -194,7 +202,7 @@
|
||||
open()
|
||||
else
|
||||
close()
|
||||
return
|
||||
return TRUE
|
||||
if(density)
|
||||
do_animate("deny")
|
||||
|
||||
@@ -259,11 +267,8 @@
|
||||
emagged = TRUE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/door/update_icon()
|
||||
if(density)
|
||||
icon_state = "door1"
|
||||
else
|
||||
icon_state = "door0"
|
||||
/obj/machinery/door/update_icon_state()
|
||||
icon_state = "door[density]"
|
||||
|
||||
/obj/machinery/door/proc/do_animate(animation)
|
||||
switch(animation)
|
||||
|
||||
@@ -200,18 +200,21 @@
|
||||
flick("door_closing", src)
|
||||
playsound(src, 'sound/machines/airlock_ext_close.ogg', 30, 1)
|
||||
|
||||
/obj/machinery/door/firedoor/update_icon()
|
||||
overlays.Cut()
|
||||
if(active_alarm && hasPower())
|
||||
overlays += image('icons/obj/doors/doorfire.dmi', "alarmlights")
|
||||
/obj/machinery/door/firedoor/update_icon_state()
|
||||
if(density)
|
||||
icon_state = "door_closed"
|
||||
if(welded)
|
||||
overlays += "welded"
|
||||
else
|
||||
icon_state = "door_open"
|
||||
if(welded)
|
||||
overlays += "welded_open"
|
||||
|
||||
/obj/machinery/door/firedoor/update_overlays()
|
||||
. = ..()
|
||||
if(active_alarm && hasPower())
|
||||
. += image('icons/obj/doors/doorfire.dmi', "alarmlights")
|
||||
if(density && welded)
|
||||
. += "welded"
|
||||
return
|
||||
if(welded)
|
||||
. += "welded_open"
|
||||
|
||||
/obj/machinery/door/firedoor/proc/activate_alarm()
|
||||
active_alarm = TRUE
|
||||
@@ -344,8 +347,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)
|
||||
|
||||
@@ -50,7 +50,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
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
/obj/machinery/door/window/Initialize(mapload)
|
||||
. = ..()
|
||||
if(req_access && req_access.len)
|
||||
icon_state = "[icon_state]"
|
||||
base_state = icon_state
|
||||
|
||||
/obj/machinery/door/window/Destroy()
|
||||
@@ -38,7 +37,7 @@
|
||||
QDEL_NULL(electronics)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/door/window/update_icon()
|
||||
/obj/machinery/door/window/update_icon_state()
|
||||
if(density)
|
||||
icon_state = base_state
|
||||
else
|
||||
|
||||
@@ -24,19 +24,19 @@
|
||||
else
|
||||
stat |= NOPOWER
|
||||
set_light(0)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/machinery/dye_generator/extinguish_light()
|
||||
set_light(0)
|
||||
underlays.Cut()
|
||||
|
||||
/obj/machinery/dye_generator/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/dye_generator/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
add_overlay("barbervend_off")
|
||||
. += "barbervend_off"
|
||||
if(stat & BROKEN)
|
||||
add_overlay("barbervend_broken")
|
||||
. += "barbervend_broken"
|
||||
if(light)
|
||||
underlays += emissive_appearance(icon, "barbervend_lightmask")
|
||||
|
||||
@@ -58,14 +58,14 @@
|
||||
var/obj/item/hair_dye_bottle/HD = I
|
||||
user.visible_message("<span class='notice'>[user] fills [HD] up with some dye.</span>","<span class='notice'>You fill [HD] up with some hair dye.</span>")
|
||||
HD.dye_color = dye_color
|
||||
HD.update_dye_overlay()
|
||||
HD.update_icon()
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/dye_generator/obj_break(damage_flag)
|
||||
if(!(stat & BROKEN))
|
||||
stat |= BROKEN
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
//Hair Dye Bottle
|
||||
|
||||
@@ -83,13 +83,13 @@
|
||||
|
||||
/obj/item/hair_dye_bottle/New()
|
||||
..()
|
||||
update_dye_overlay()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/hair_dye_bottle/proc/update_dye_overlay()
|
||||
overlays.Cut()
|
||||
/obj/item/hair_dye_bottle/update_overlays()
|
||||
. = ..()
|
||||
var/image/I = new('icons/obj/items.dmi', "hairdyebottle-overlay")
|
||||
I.color = dye_color
|
||||
overlays += I
|
||||
. += I
|
||||
|
||||
/obj/item/hair_dye_bottle/attack(mob/living/carbon/M, mob/user)
|
||||
if(user.a_intent != INTENT_HELP)
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
name = "Access Controller"
|
||||
tag_secure = 1
|
||||
|
||||
/obj/machinery/embedded_controller/radio/airlock/access_controller/update_icon()
|
||||
/obj/machinery/embedded_controller/radio/airlock/access_controller/update_icon_state()
|
||||
if(on && program)
|
||||
if(program.memory["processing"])
|
||||
icon_state = "access_control_process"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var/on = TRUE
|
||||
|
||||
/obj/machinery/embedded_controller/proc/post_signal(datum/signal/signal, comm_line)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/embedded_controller/receive_signal(datum/signal/signal, receive_method, receive_param)
|
||||
if(!signal || signal.encryption) return
|
||||
@@ -23,7 +23,7 @@
|
||||
if(program)
|
||||
program.process()
|
||||
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
src.updateDialog()
|
||||
|
||||
/obj/machinery/embedded_controller/attack_ghost(mob/user as mob)
|
||||
@@ -60,7 +60,7 @@
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/embedded_controller/radio/update_icon()
|
||||
/obj/machinery/embedded_controller/radio/update_icon_state()
|
||||
if(on && program)
|
||||
if(program.memory["processing"])
|
||||
icon_state = "airlock_control_process"
|
||||
|
||||
@@ -44,13 +44,7 @@ FIRE ALARM
|
||||
report_fire_alarms = FALSE
|
||||
show_alert_level = FALSE
|
||||
|
||||
/obj/machinery/firealarm/update_icon()
|
||||
underlays.Cut()
|
||||
if(light)
|
||||
if(overlays)
|
||||
underlays += emissive_appearance(icon, "firealarm_overlay_lightmask")
|
||||
if(!wiresexposed)
|
||||
underlays += emissive_appearance(icon, "firealarm_lightmask")
|
||||
/obj/machinery/firealarm/update_icon_state()
|
||||
if(wiresexposed)
|
||||
icon_state = "firealarm_b[buildstage]"
|
||||
return
|
||||
@@ -63,6 +57,17 @@ FIRE ALARM
|
||||
else
|
||||
icon_state = "firealarm_on"
|
||||
|
||||
/obj/machinery/firealarm/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
if(is_station_contact(z) && show_alert_level)
|
||||
if(GLOB.security_level)
|
||||
. += "overlay_[get_security_level()]"
|
||||
if(light)
|
||||
underlays += emissive_appearance(icon, "firealarm_overlay_lightmask")
|
||||
if(light && !wiresexposed)
|
||||
underlays += emissive_appearance(icon, "firealarm_lightmask")
|
||||
|
||||
/obj/machinery/firealarm/emag_act(mob/user)
|
||||
if(!emagged)
|
||||
emagged = TRUE
|
||||
@@ -271,12 +276,6 @@ FIRE ALARM
|
||||
setDir(direction)
|
||||
set_pixel_offsets_from_dir(26, -26, 26, -26)
|
||||
|
||||
if(is_station_contact(z) && show_alert_level)
|
||||
if(GLOB.security_level)
|
||||
overlays += image('icons/obj/monitors.dmi', "overlay_[get_security_level()]")
|
||||
else
|
||||
overlays += image('icons/obj/monitors.dmi', "overlay_green")
|
||||
|
||||
myArea = get_area(src)
|
||||
LAZYADD(myArea.firealarms, src)
|
||||
|
||||
|
||||
@@ -26,20 +26,21 @@
|
||||
QDEL_NULL(cell)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/floodlight/proc/updateicon()
|
||||
/obj/machinery/floodlight/update_icon_state()
|
||||
icon_state = "flood[open ? "o" : ""][open && cell ? "b" : ""]0[on]"
|
||||
|
||||
/obj/machinery/floodlight/process()
|
||||
if(!cell && on)
|
||||
on = FALSE
|
||||
visible_message("<span class='warning'>[src] shuts down due to lack of power!</span>")
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
set_light(0)
|
||||
return
|
||||
if(on)
|
||||
cell.charge -= use
|
||||
if(cell.charge <= 0)
|
||||
on = FALSE
|
||||
updateicon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
set_light(0)
|
||||
visible_message("<span class='warning'>[src] shuts down due to lack of power!</span>")
|
||||
|
||||
@@ -55,7 +56,7 @@
|
||||
cell.loc = loc
|
||||
|
||||
cell.add_fingerprint(user)
|
||||
cell.update_icon()
|
||||
cell.update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
cell = null
|
||||
to_chat(user, "You remove the power cell.")
|
||||
@@ -63,7 +64,7 @@
|
||||
on = FALSE
|
||||
visible_message("<span class='warning'>[src] shuts down due to lack of power!</span>")
|
||||
set_light(0)
|
||||
updateicon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return
|
||||
|
||||
if(on)
|
||||
@@ -79,7 +80,7 @@
|
||||
to_chat(user, "<span class='notice'>You turn on the light.</span>")
|
||||
set_light(brightness_on)
|
||||
|
||||
updateicon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/floodlight/proc/mapVarInit()
|
||||
if(on)
|
||||
@@ -88,7 +89,7 @@
|
||||
if(cell.charge <= 0)
|
||||
return
|
||||
set_light(brightness_on)
|
||||
updateicon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/floodlight/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/wrench))
|
||||
@@ -106,7 +107,7 @@
|
||||
"<span class='notice'> You have loosened \the [src]'s casters.</span>", \
|
||||
"You hear ratchet.")
|
||||
anchored = FALSE
|
||||
updateicon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(!open)
|
||||
@@ -116,19 +117,18 @@
|
||||
else
|
||||
unlocked = TRUE
|
||||
to_chat(user, "You unscrew the battery panel.")
|
||||
updateicon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
if(unlocked)
|
||||
if(open)
|
||||
open = FALSE
|
||||
overlays = null
|
||||
to_chat(user, "You crowbar the battery panel in place.")
|
||||
else
|
||||
if(unlocked)
|
||||
open = TRUE
|
||||
to_chat(user, "You remove the battery panel.")
|
||||
updateicon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return
|
||||
if(istype(W, /obj/item/stock_parts/cell))
|
||||
if(open)
|
||||
@@ -139,11 +139,11 @@
|
||||
W.loc = src
|
||||
cell = W
|
||||
to_chat(user, "You insert the power cell.")
|
||||
updateicon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/floodlight/extinguish_light()
|
||||
on = FALSE
|
||||
set_light(0)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
|
||||
/obj/machinery/gameboard/power_change()
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
if(stat & NOPOWER)
|
||||
set_light(0)
|
||||
else
|
||||
set_light(3, 3)
|
||||
|
||||
/obj/machinery/gameboard/update_icon()
|
||||
/obj/machinery/gameboard/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "gboard_off"
|
||||
else
|
||||
|
||||
@@ -290,7 +290,7 @@ GLOBAL_LIST_EMPTY(holopads)
|
||||
playsound(src, 'sound/machines/twobeep.ogg', 100) //bring, bring!
|
||||
ringing = TRUE
|
||||
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
|
||||
//Try to transfer hologram to another pad that can project on T
|
||||
@@ -405,13 +405,11 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
active_power_usage = HOLOPAD_PASSIVE_POWER_USAGE + (HOLOGRAM_POWER_USAGE * total_users)
|
||||
if(total_users)
|
||||
set_light(2)
|
||||
icon_state = "holopad1"
|
||||
else
|
||||
set_light(0)
|
||||
icon_state = "holopad0"
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/hologram/holopad/update_icon()
|
||||
/obj/machinery/hologram/holopad/update_icon_state()
|
||||
var/total_users = LAZYLEN(masters) + LAZYLEN(holo_calls)
|
||||
if(icon_state == "holopad_open")
|
||||
return
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
lit = !lit
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/holosign/update_icon()
|
||||
/obj/machinery/holosign/update_icon_state()
|
||||
if(!lit)
|
||||
icon_state = "sign_off"
|
||||
else
|
||||
@@ -25,7 +25,7 @@
|
||||
/obj/machinery/holosign/power_change()
|
||||
if(stat & NOPOWER)
|
||||
lit = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/holosign/surgery
|
||||
name = "surgery holosign"
|
||||
|
||||
@@ -11,19 +11,18 @@
|
||||
|
||||
/obj/machinery/iv_drip/process()
|
||||
if(istype(bag) && bag.injection_target)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
return
|
||||
return PROCESS_KILL
|
||||
|
||||
/obj/machinery/iv_drip/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
/obj/machinery/iv_drip/update_overlays()
|
||||
. = ..()
|
||||
if(bag)
|
||||
add_overlay("hangingbag")
|
||||
. += "hangingbag"
|
||||
if(bag.reagents.total_volume)
|
||||
var/image/filling = image('icons/goonstation/objects/iv.dmi', src, "hangingbag-fluid")
|
||||
filling.icon += mix_color_from_reagents(bag.reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
. += filling
|
||||
|
||||
/obj/machinery/iv_drip/MouseDrop(mob/living/target)
|
||||
if(usr.incapacitated())
|
||||
@@ -39,9 +38,9 @@
|
||||
/obj/machinery/iv_drip/attack_hand(mob/user)
|
||||
if(bag)
|
||||
user.put_in_hands(bag)
|
||||
bag.update_icon()
|
||||
bag.update_icon(UPDATE_OVERLAYS)
|
||||
bag = null
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/machinery/iv_drip/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/reagent_containers/iv_bag))
|
||||
@@ -54,12 +53,12 @@
|
||||
I.forceMove(src)
|
||||
bag = I
|
||||
to_chat(user, "<span class='notice'>You attach [I] to [src].</span>")
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
START_PROCESSING(SSmachines, src)
|
||||
else if (bag && istype(I, /obj/item/reagent_containers))
|
||||
bag.attackby(I)
|
||||
I.afterattack(bag, usr, TRUE)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
name = "light switch([area.name])"
|
||||
|
||||
src.on = src.area.lightswitch
|
||||
updateicon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/light_switch/Initialize()
|
||||
..()
|
||||
@@ -63,18 +63,15 @@
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/light_switch/proc/updateicon()
|
||||
/obj/machinery/light_switch/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "light-p"
|
||||
else
|
||||
if(on)
|
||||
icon_state = "light1"
|
||||
else
|
||||
icon_state = "light0"
|
||||
return
|
||||
icon_state = "light[on]"
|
||||
|
||||
/obj/machinery/light_switch/examine(mob/user)
|
||||
. = ..()
|
||||
. += "A light switch. It is [on? "on" : "off"]."
|
||||
. += "A light switch. It is [on ? "on" : "off"]."
|
||||
|
||||
/obj/machinery/light_switch/attack_ghost(mob/user)
|
||||
if(user.can_advanced_admin_interact())
|
||||
@@ -83,11 +80,11 @@
|
||||
/obj/machinery/light_switch/attack_hand(mob/user)
|
||||
on = !on
|
||||
playsound(src, 'sound/machines/lightswitch.ogg', 10, TRUE)
|
||||
updateicon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
if(light_connect)
|
||||
area.lightswitch = on
|
||||
area.updateicon()
|
||||
area.update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
if(logic_connect && powered(LIGHT)) //Don't bother sending a signal if we aren't set to send them or we have no power to send with.
|
||||
handle_output()
|
||||
@@ -95,7 +92,7 @@
|
||||
if(light_connect)
|
||||
for(var/obj/machinery/light_switch/L in area)
|
||||
L.on = on
|
||||
L.updateicon()
|
||||
L.update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
area.power_change()
|
||||
|
||||
@@ -135,7 +132,7 @@
|
||||
else
|
||||
stat |= NOPOWER
|
||||
|
||||
updateicon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/light_switch/emp_act(severity)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
|
||||
@@ -44,20 +44,11 @@
|
||||
// update the invisibility and icon
|
||||
/obj/machinery/magnetic_module/hide(intact)
|
||||
invisibility = intact ? INVISIBILITY_MAXIMUM : 0
|
||||
updateicon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
// update the icon_state
|
||||
/obj/machinery/magnetic_module/proc/updateicon()
|
||||
var/state="floor_magnet"
|
||||
var/onstate=""
|
||||
if(!on)
|
||||
onstate="0"
|
||||
|
||||
if(invisibility)
|
||||
icon_state = "[state][onstate]-f" // if invisible, set icon to faded version
|
||||
/obj/machinery/magnetic_module/update_icon_state()
|
||||
icon_state = "floor_magnet[on ? "" : "0"][invisibility ? "-f" : ""]" // if invisible, set icon to faded version
|
||||
// in case of being revealed by T-scanner
|
||||
else
|
||||
icon_state = "[state][onstate]"
|
||||
|
||||
/obj/machinery/magnetic_module/receive_signal(datum/signal/signal)
|
||||
var/command = signal.data["command"]
|
||||
@@ -149,7 +140,7 @@
|
||||
active_power_usage = electricity_level*15
|
||||
else
|
||||
use_power = 0
|
||||
updateicon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
|
||||
/obj/machinery/magnetic_module/proc/magnetic_process() // proc that actually does the pulling
|
||||
|
||||
@@ -76,17 +76,11 @@
|
||||
// hide the object if turf is intact
|
||||
/obj/machinery/navbeacon/hide(intact)
|
||||
invisibility = intact ? INVISIBILITY_MAXIMUM : 0
|
||||
updateicon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
// update the icon_state
|
||||
/obj/machinery/navbeacon/proc/updateicon()
|
||||
var/state="navbeacon[open]"
|
||||
|
||||
if(invisibility)
|
||||
icon_state = "[state]-f" // if invisible, set icon to faded version
|
||||
// in case revealed by T-scanner
|
||||
else
|
||||
icon_state = "[state]"
|
||||
/obj/machinery/navbeacon/update_icon_state()
|
||||
icon_state = "navbeacon[open][invisibility ? "-f" : ""]" // if invisible, set icon to faded version
|
||||
// in case revealed by T-scanner
|
||||
|
||||
/obj/machinery/navbeacon/attackby(obj/item/I, mob/user, params)
|
||||
var/turf/T = loc
|
||||
@@ -98,7 +92,7 @@
|
||||
|
||||
user.visible_message("[user] [open ? "opens" : "closes"] the beacon's cover.", "<span class='notice'>You [open ? "open" : "close"] the beacon's cover.</span>")
|
||||
|
||||
updateicon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
else if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda))
|
||||
if(open)
|
||||
@@ -221,4 +215,4 @@ Transponder Codes:<UL>"}
|
||||
|
||||
/obj/machinery/navbeacon/invisible/hide(intact)
|
||||
invisibility = INVISIBILITY_MAXIMUM
|
||||
updateicon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
)
|
||||
return data
|
||||
|
||||
/obj/machinery/porta_turret/tag/update_icon()
|
||||
/obj/machinery/porta_turret/tag/update_icon_state()
|
||||
if(!anchored)
|
||||
icon_state = "turretCover"
|
||||
return
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
eshot_sound = 'sound/weapons/pulse.ogg'
|
||||
|
||||
GLOBAL_LIST_EMPTY(turret_icons)
|
||||
/obj/machinery/porta_turret/update_icon()
|
||||
/obj/machinery/porta_turret/update_icon_state()
|
||||
if(!GLOB.turret_icons)
|
||||
GLOB.turret_icons = list()
|
||||
GLOB.turret_icons["open"] = image(icon, "openTurretCover")
|
||||
@@ -321,7 +321,7 @@ GLOBAL_LIST_EMPTY(turret_icons)
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
stat |= NOPOWER
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
|
||||
/obj/machinery/porta_turret/attackby(obj/item/I, mob/user)
|
||||
@@ -364,16 +364,10 @@ GLOBAL_LIST_EMPTY(turret_icons)
|
||||
wrenching = TRUE
|
||||
if(do_after(user, 50 * I.toolspeed, target = src))
|
||||
//This code handles moving the turret around. After all, it's a portable turret!
|
||||
if(!anchored)
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
anchored = TRUE
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>You secure the exterior bolts on the turret.</span>")
|
||||
else if(anchored)
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
anchored = FALSE
|
||||
to_chat(user, "<span class='notice'>You unsecure the exterior bolts on the turret.</span>")
|
||||
update_icon()
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
anchored = !anchored
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "" : "un"]secure the exterior bolts on the turret.</span>")
|
||||
wrenching = FALSE
|
||||
|
||||
else if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda))
|
||||
@@ -499,7 +493,7 @@ GLOBAL_LIST_EMPTY(turret_icons)
|
||||
stat |= BROKEN //enables the BROKEN bit
|
||||
if(spark_system)
|
||||
spark_system.start() //creates some sparks because they look cool
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/porta_turret/process()
|
||||
//the main machinery process
|
||||
@@ -651,7 +645,7 @@ GLOBAL_LIST_EMPTY(turret_icons)
|
||||
/obj/machinery/porta_turret/proc/pop_up() //pops the turret up
|
||||
set_raised_raising(raised, TRUE)
|
||||
playsound(get_turf(src), 'sound/effects/turret/open.wav', 60, 1)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
var/atom/flick_holder = new /atom/movable/porta_turret_cover(loc)
|
||||
flick_holder.layer = layer + 0.1
|
||||
@@ -660,7 +654,7 @@ GLOBAL_LIST_EMPTY(turret_icons)
|
||||
qdel(flick_holder)
|
||||
|
||||
set_raised_raising(TRUE, FALSE)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/porta_turret/proc/pop_down() //pops the turret down
|
||||
last_target = null
|
||||
@@ -672,7 +666,7 @@ GLOBAL_LIST_EMPTY(turret_icons)
|
||||
return
|
||||
set_raised_raising(raised, TRUE)
|
||||
playsound(get_turf(src), 'sound/effects/turret/open.wav', 60, 1)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
var/atom/flick_holder = new /atom/movable/porta_turret_cover(loc)
|
||||
flick_holder.layer = layer + 0.1
|
||||
@@ -682,7 +676,7 @@ GLOBAL_LIST_EMPTY(turret_icons)
|
||||
|
||||
set_raised_raising(FALSE, FALSE)
|
||||
set_angle(0)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/porta_turret/on_assess_perp(mob/living/carbon/human/perp)
|
||||
if((check_access || attacked) && !allowed(perp))
|
||||
@@ -722,7 +716,7 @@ GLOBAL_LIST_EMPTY(turret_icons)
|
||||
if(!istype(T) || !istype(U))
|
||||
return
|
||||
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
var/obj/item/projectile/A
|
||||
if(emagged || lethal)
|
||||
if(eprojectile)
|
||||
@@ -1059,7 +1053,7 @@ GLOBAL_LIST_EMPTY(turret_icons)
|
||||
req_access = list(ACCESS_SYNDICATE)
|
||||
one_access = FALSE
|
||||
|
||||
/obj/machinery/porta_turret/syndicate/update_icon()
|
||||
/obj/machinery/porta_turret/syndicate/update_icon_state()
|
||||
if(stat & BROKEN)
|
||||
icon_state = icon_state_destroyed
|
||||
else if(enabled)
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
charging = G
|
||||
use_power = ACTIVE_POWER_USE
|
||||
using_power = check_cell_needs_recharging(get_cell_from(G))
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] isn't connected to anything!</span>")
|
||||
return TRUE
|
||||
@@ -97,7 +97,7 @@
|
||||
user.put_in_hands(charging)
|
||||
charging = null
|
||||
use_power = IDLE_POWER_USE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/recharger/attack_tk(mob/user)
|
||||
if(charging)
|
||||
@@ -105,14 +105,14 @@
|
||||
charging.forceMove(loc)
|
||||
charging = null
|
||||
use_power = IDLE_POWER_USE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/recharger/process()
|
||||
if(stat & (NOPOWER|BROKEN) || !anchored)
|
||||
return
|
||||
|
||||
using_power = try_recharging_if_possible()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/recharger/emp_act(severity)
|
||||
if(stat & (NOPOWER|BROKEN) || !anchored)
|
||||
@@ -132,9 +132,9 @@
|
||||
|
||||
/obj/machinery/recharger/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/recharger/update_icon() //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 = icon_state_off
|
||||
return
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
component_parts += new /obj/item/stock_parts/manipulator(null)
|
||||
component_parts += new /obj/item/stock_parts/cell/high(null)
|
||||
RefreshParts()
|
||||
build_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/recharge_station/upgraded/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -87,7 +87,7 @@
|
||||
if(A == occupant)
|
||||
occupant = null
|
||||
updateUsrDialog()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/recharge_station/narsie_act()
|
||||
go_out()
|
||||
@@ -116,9 +116,9 @@
|
||||
go_out()
|
||||
..(severity)
|
||||
|
||||
/obj/machinery/recharge_station/proc/build_icon()
|
||||
/obj/machinery/recharge_station/update_icon_state()
|
||||
if(NOPOWER|BROKEN)
|
||||
if(src.occupant)
|
||||
if(occupant)
|
||||
icon_state = "borgcharger1"
|
||||
else
|
||||
icon_state = "borgcharger0"
|
||||
@@ -164,7 +164,7 @@
|
||||
return
|
||||
occupant.forceMove(loc)
|
||||
occupant = null
|
||||
build_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
use_power = IDLE_POWER_USE
|
||||
return
|
||||
|
||||
@@ -234,6 +234,6 @@
|
||||
occupant = user
|
||||
|
||||
add_fingerprint(user)
|
||||
build_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_use_power(1)
|
||||
return
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
component_parts += new /obj/item/stock_parts/matter_bin(null)
|
||||
component_parts += new /obj/item/stock_parts/manipulator(null)
|
||||
RefreshParts()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/recycler/ComponentInitialize()
|
||||
..()
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
/obj/machinery/recycler/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/recycler/attackby(obj/item/I, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
@@ -80,15 +80,14 @@
|
||||
emagged = TRUE
|
||||
if(emergency_mode)
|
||||
emergency_mode = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
playsound(src, "sparks", 75, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
|
||||
to_chat(user, "<span class='notice'>You use the cryptographic sequencer on [src].</span>")
|
||||
|
||||
/obj/machinery/recycler/update_icon()
|
||||
..()
|
||||
/obj/machinery/recycler/update_icon_state()
|
||||
var/is_powered = !(stat & (BROKEN|NOPOWER))
|
||||
if(emergency_mode)
|
||||
is_powered = 0
|
||||
is_powered = FALSE
|
||||
icon_state = icon_name + "[is_powered]" + "[(blood ? "bld" : "")]" // add the blood tag at the end
|
||||
|
||||
// This is purely for admin possession !FUN!.
|
||||
@@ -151,14 +150,14 @@
|
||||
/obj/machinery/recycler/proc/emergency_stop(mob/living/L)
|
||||
playsound(loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
|
||||
emergency_mode = TRUE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
L.loc = loc
|
||||
addtimer(CALLBACK(src, .proc/reboot), SAFETY_COOLDOWN)
|
||||
|
||||
/obj/machinery/recycler/proc/reboot()
|
||||
playsound(loc, 'sound/machines/ping.ogg', 50, 0)
|
||||
emergency_mode = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/recycler/proc/crush_living(mob/living/L)
|
||||
|
||||
@@ -169,17 +168,17 @@
|
||||
else
|
||||
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
|
||||
|
||||
var/gib = 1
|
||||
var/gib = TRUE
|
||||
// By default, the emagged recycler will gib all non-carbons. (human simple animal mobs don't count)
|
||||
if(iscarbon(L))
|
||||
gib = 0
|
||||
gib = FALSE
|
||||
if(L.stat == CONSCIOUS)
|
||||
L.say("ARRRRRRRRRRRGH!!!")
|
||||
add_mob_blood(L)
|
||||
|
||||
if(!blood && !issilicon(L))
|
||||
blood = TRUE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
// Remove and recycle the equipped items
|
||||
if(eat_victim_items)
|
||||
|
||||
@@ -73,9 +73,9 @@ GLOBAL_LIST_EMPTY(allRequestConsoles)
|
||||
|
||||
/obj/machinery/requests_console/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/requests_console/update_icon()
|
||||
/obj/machinery/requests_console/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
if(icon_state != "req_comp_off")
|
||||
icon_state = "req_comp_off"
|
||||
@@ -336,7 +336,7 @@ GLOBAL_LIST_EMPTY(allRequestConsoles)
|
||||
capitalize(title)
|
||||
if(newmessagepriority < priority)
|
||||
newmessagepriority = priority
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
if(!silent)
|
||||
playsound(loc, 'sound/machines/twobeep.ogg', 50, TRUE)
|
||||
atom_say(title)
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
return //If it's already turned on, how did this get called?
|
||||
|
||||
active = TRUE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
anchored = TRUE
|
||||
|
||||
for(var/turf/target_tile in range(2, src))
|
||||
@@ -170,7 +170,7 @@
|
||||
return //If it's already off, how did this get called?
|
||||
|
||||
active = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
QDEL_LIST(deployed_shields)
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
malfunction = TRUE
|
||||
if(health <= 0)
|
||||
qdel(src)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return
|
||||
|
||||
/obj/machinery/shieldgen/ex_act(severity)
|
||||
@@ -239,7 +239,7 @@
|
||||
/obj/machinery/shieldgen/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(istype(I, /obj/item/card/emag))
|
||||
malfunction = TRUE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
else if(istype(I, /obj/item/stack/cable_coil) && malfunction && is_open)
|
||||
var/obj/item/stack/cable_coil/coil = I
|
||||
@@ -249,10 +249,10 @@
|
||||
return
|
||||
coil.use(1)
|
||||
health = max_health
|
||||
malfunction = TRUE
|
||||
malfunction = FALSE
|
||||
playsound(loc, coil.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You repair [src]!</span>")
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
else if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda))
|
||||
if(allowed(user))
|
||||
@@ -286,48 +286,41 @@
|
||||
if(active)
|
||||
visible_message("<span class='warning'>[src] shuts off!</span>")
|
||||
shields_down()
|
||||
anchored = FALSE
|
||||
else
|
||||
if(istype(get_turf(src), /turf/space))
|
||||
return //No wrenching these in space!
|
||||
WRENCH_ANCHOR_MESSAGE
|
||||
anchored = TRUE
|
||||
|
||||
/obj/machinery/shieldgen/update_icon()
|
||||
if(active)
|
||||
icon_state = malfunction ? "shieldonbr":"shieldon"
|
||||
else
|
||||
icon_state = malfunction ? "shieldoffbr":"shieldoff"
|
||||
return
|
||||
anchored = !anchored
|
||||
|
||||
/obj/machinery/shieldgen/update_icon_state()
|
||||
icon_state = "shield[active ? "on" : "off"][malfunction ? "br" : ""]"
|
||||
|
||||
////FIELD GEN START //shameless copypasta from fieldgen, powersink, and grille
|
||||
#define maxstoredpower 500
|
||||
/obj/machinery/shieldwallgen
|
||||
name = "Shield Generator"
|
||||
desc = "A shield generator."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "Shield_Gen"
|
||||
anchored = FALSE
|
||||
density = TRUE
|
||||
req_access = list(ACCESS_TELEPORTER)
|
||||
var/active = 0
|
||||
var/power = 0
|
||||
var/state = 0
|
||||
var/steps = 0
|
||||
var/last_check = 0
|
||||
var/check_delay = 10
|
||||
var/locked = TRUE
|
||||
var/directwired = 1
|
||||
var/obj/structure/cable/attached // the attached cable
|
||||
var/storedpower = 0
|
||||
flags = CONDUCT
|
||||
use_power = NO_POWER_USE
|
||||
name = "Shield Generator"
|
||||
desc = "A shield generator."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "Shield_Gen"
|
||||
anchored = FALSE
|
||||
density = TRUE
|
||||
req_access = list(ACCESS_TELEPORTER)
|
||||
var/active = FALSE
|
||||
var/power = FALSE
|
||||
var/state = FALSE
|
||||
var/steps = 0
|
||||
var/locked = TRUE
|
||||
var/storedpower = 0
|
||||
flags = CONDUCT
|
||||
use_power = NO_POWER_USE
|
||||
|
||||
/obj/machinery/shieldwallgen/update_icon_state()
|
||||
icon_state = "Shield_Gen[active ? " +a" : ""]"
|
||||
|
||||
/obj/machinery/shieldwallgen/proc/power()
|
||||
if(!anchored)
|
||||
power = 0
|
||||
return 0
|
||||
power = FALSE
|
||||
return
|
||||
var/turf/T = loc
|
||||
|
||||
var/obj/structure/cable/C = T.get_cable_node()
|
||||
@@ -336,16 +329,16 @@
|
||||
PN = C.powernet // find the powernet of the connected cable
|
||||
|
||||
if(!PN)
|
||||
power = 0
|
||||
return 0
|
||||
power = FALSE
|
||||
return
|
||||
|
||||
var/surplus = max(PN.avail-PN.load, 0)
|
||||
var/shieldload = min(rand(50,200), surplus)
|
||||
if(shieldload==0 && !storedpower) // no cable or no power, and no power stored
|
||||
power = 0
|
||||
return 0
|
||||
if(shieldload == 0 && !storedpower) // no cable or no power, and no power stored
|
||||
power = FALSE
|
||||
return
|
||||
else
|
||||
power = 1 // IVE GOT THE POWER!
|
||||
power = TRUE // IVE GOT THE POWER!
|
||||
if(PN) //runtime errors fixer. They were caused by PN.load trying to access missing network in case of working on stored power.
|
||||
storedpower += shieldload
|
||||
PN.load += shieldload //uses powernet power.
|
||||
@@ -355,29 +348,22 @@
|
||||
/obj/machinery/shieldwallgen/attack_hand(mob/user)
|
||||
if(state != 1)
|
||||
to_chat(user, "<span class='warning'>The shield generator needs to be firmly secured to the floor first.</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
if(locked && !issilicon(user))
|
||||
to_chat(user, "<span class='warning'>The controls are locked!</span>")
|
||||
return 1
|
||||
if(power != 1)
|
||||
return TRUE
|
||||
if(!power)
|
||||
to_chat(user, "<span class='warning'>The shield generator needs to be powered by wire underneath.</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
if(active >= 1)
|
||||
active = 0
|
||||
icon_state = "Shield_Gen"
|
||||
|
||||
user.visible_message("[user] turned the shield generator off.", \
|
||||
"You turn off the shield generator.", \
|
||||
"You hear heavy droning fade out.")
|
||||
active = !active
|
||||
user.visible_message("[user] turned the shield generator [active ? "on" : "off"].", \
|
||||
"You turn [active ? "on" : "off"] the shield generator.", \
|
||||
"You hear heavy droning [active ? "" : "fade out"].")
|
||||
if(active)
|
||||
for(var/dir in list(NORTH, SOUTH, EAST, WEST))
|
||||
cleanup(dir)
|
||||
else
|
||||
active = 1
|
||||
icon_state = "Shield_Gen +a"
|
||||
user.visible_message("[user] turned the shield generator on.", \
|
||||
"You turn on the shield generator.", \
|
||||
"You hear heavy droning.")
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/machinery/shieldwallgen/process()
|
||||
@@ -390,9 +376,9 @@
|
||||
if(storedpower <= 0)
|
||||
storedpower = 0
|
||||
|
||||
if(active == 1)
|
||||
if(!state == 1)
|
||||
active = 0
|
||||
if(active)
|
||||
if(state)
|
||||
active = FALSE
|
||||
return
|
||||
spawn(1)
|
||||
setup_field(1)
|
||||
@@ -402,15 +388,14 @@
|
||||
setup_field(4)
|
||||
spawn(4)
|
||||
setup_field(8)
|
||||
active = 2
|
||||
if(active >= 1)
|
||||
if(power == 0)
|
||||
if(active)
|
||||
if(!power)
|
||||
visible_message("<span class='warning'>[name] shuts down due to lack of power!</span>", \
|
||||
"You hear heavy droning fade out")
|
||||
icon_state = "Shield_Gen"
|
||||
active = 0
|
||||
active = FALSE
|
||||
for(var/dir in list(NORTH, SOUTH, EAST, WEST))
|
||||
cleanup(dir)
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/shieldwallgen/proc/setup_field(NSEW = 0)
|
||||
var/turf/T = loc
|
||||
@@ -458,25 +443,6 @@
|
||||
|
||||
|
||||
/obj/machinery/shieldwallgen/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wrench))
|
||||
if(active)
|
||||
to_chat(user, "Turn off the field generator first.")
|
||||
return
|
||||
|
||||
else if(state == 0)
|
||||
state = 1
|
||||
playsound(loc, I.usesound, 75, 1)
|
||||
to_chat(user, "You secure the external reinforcing bolts to the floor.")
|
||||
anchored = TRUE
|
||||
return
|
||||
|
||||
else if(state == 1)
|
||||
state = 0
|
||||
playsound(loc, I.usesound, 75, 1)
|
||||
to_chat(user, "You undo the external reinforcing bolts.")
|
||||
anchored = FALSE
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/card/id)||istype(I, /obj/item/pda))
|
||||
if(allowed(user))
|
||||
locked = !locked
|
||||
@@ -488,6 +454,17 @@
|
||||
add_fingerprint(user)
|
||||
..()
|
||||
|
||||
/obj/machinery/shieldwallgen/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(active)
|
||||
to_chat(user, "Turn off the field generator first.")
|
||||
return
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
state = !state
|
||||
anchored = !anchored
|
||||
to_chat(user, anchored ? "You secure the external reinforcing bolts to the floor." : "You undo the external reinforcing bolts.")
|
||||
|
||||
/obj/machinery/shieldwallgen/proc/cleanup(NSEW)
|
||||
var/obj/machinery/shieldwall/F
|
||||
var/obj/machinery/shieldwallgen/G
|
||||
@@ -522,29 +499,26 @@
|
||||
|
||||
////////////// Containment Field START
|
||||
/obj/machinery/shieldwall
|
||||
name = "Shield"
|
||||
desc = "An energy shield."
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "shieldwall"
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
move_resist = INFINITY
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
light_range = 3
|
||||
var/needs_power = 0
|
||||
var/active = TRUE
|
||||
var/delay = 5
|
||||
var/last_active
|
||||
var/mob/U
|
||||
var/obj/machinery/shieldwallgen/gen_primary
|
||||
var/obj/machinery/shieldwallgen/gen_secondary
|
||||
name = "Shield"
|
||||
desc = "An energy shield."
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "shieldwall"
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
move_resist = INFINITY
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
light_range = 3
|
||||
var/needs_power = FALSE
|
||||
var/active = TRUE
|
||||
var/obj/machinery/shieldwallgen/gen_primary
|
||||
var/obj/machinery/shieldwallgen/gen_secondary
|
||||
|
||||
/obj/machinery/shieldwall/New(obj/machinery/shieldwallgen/A, obj/machinery/shieldwallgen/B)
|
||||
..()
|
||||
gen_primary = A
|
||||
gen_secondary = B
|
||||
if(A && B)
|
||||
needs_power = 1
|
||||
needs_power = TRUE
|
||||
|
||||
/obj/machinery/shieldwall/attack_hand(mob/user)
|
||||
return
|
||||
@@ -629,16 +603,16 @@
|
||||
if(isliving(mover))
|
||||
var/mob/living/M = mover
|
||||
if("syndicate" in M.faction)
|
||||
return 1
|
||||
return TRUE
|
||||
if(istype(mover, /obj/item/projectile))
|
||||
return 0
|
||||
return FALSE
|
||||
return ..(mover, target, height)
|
||||
|
||||
/obj/machinery/shieldwall/syndicate/CanAStarPass(ID, to_dir, caller)
|
||||
if(isliving(caller))
|
||||
var/mob/living/M = caller
|
||||
if("syndicate" in M.faction)
|
||||
return 1
|
||||
return TRUE
|
||||
return ..(ID, to_dir, caller)
|
||||
|
||||
/obj/machinery/shieldwall/syndicate/proc/phaseout()
|
||||
|
||||
@@ -87,10 +87,9 @@
|
||||
..()
|
||||
if(!powered())
|
||||
turn_on_or_off(FALSE, TRUE)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/snow_machine/update_icon()
|
||||
..()
|
||||
/obj/machinery/snow_machine/update_icon_state()
|
||||
if(panel_open)
|
||||
icon_state = "snow_machine_openpanel"
|
||||
else
|
||||
@@ -131,5 +130,5 @@
|
||||
if(!active && give_message)
|
||||
visible_message("<span class='warning'>[src] switches off!</span>")
|
||||
playsound(loc, 'sound/machines/buzz-sigh.ogg', 50, FALSE)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return TRUE
|
||||
|
||||
@@ -26,12 +26,13 @@
|
||||
QDEL_NULL(cell)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/space_heater/update_icon()
|
||||
overlays.Cut()
|
||||
/obj/machinery/space_heater/update_icon_state()
|
||||
icon_state = "sheater[on]"
|
||||
|
||||
/obj/machinery/space_heater/update_overlays()
|
||||
. = ..()
|
||||
if(open)
|
||||
overlays += "sheater-open"
|
||||
return
|
||||
. += "sheater-open"
|
||||
|
||||
/obj/machinery/space_heater/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -289,7 +289,7 @@
|
||||
boots = new boots_type(src)
|
||||
if(storage_type)
|
||||
storage = new storage_type(src)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
//move this into machinery eventually...
|
||||
if(occupant_typecache)
|
||||
@@ -300,32 +300,32 @@
|
||||
QDEL_NULL(wires)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/suit_storage_unit/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/suit_storage_unit/update_overlays()
|
||||
. = ..()
|
||||
if(panel_open)
|
||||
add_overlay("[base_icon_state]_panel")
|
||||
. += "[base_icon_state]_panel"
|
||||
|
||||
if(uv)
|
||||
if(uv_super)
|
||||
add_overlay("[base_icon_state]_super")
|
||||
add_overlay("[base_icon_state]_[occupant ? "body" : "uvstrong"]")
|
||||
. += "[base_icon_state]_super"
|
||||
. += "[base_icon_state]_[occupant ? "body" : "uvstrong"]"
|
||||
else
|
||||
add_overlay("[base_icon_state]_[occupant ? "body" : "uv"]")
|
||||
add_overlay("[base_icon_state]_lights_red")
|
||||
. += "[base_icon_state]_[occupant ? "body" : "uv"]"
|
||||
. += "[base_icon_state]_lights_red"
|
||||
return
|
||||
|
||||
if(state_open)
|
||||
add_overlay("[base_icon_state]_open")
|
||||
. += "[base_icon_state]_open"
|
||||
if(suit)
|
||||
add_overlay("[base_icon_state]_suit")
|
||||
. += "[base_icon_state]_suit"
|
||||
if(helmet)
|
||||
add_overlay("[base_icon_state]_helm")
|
||||
. += "[base_icon_state]_helm"
|
||||
if(storage)
|
||||
add_overlay("[base_icon_state]_storage")
|
||||
. += "[base_icon_state]_storage"
|
||||
else
|
||||
add_overlay("[base_icon_state]_lights_closed")
|
||||
. += "[base_icon_state]_lights_closed"
|
||||
|
||||
add_overlay("[base_icon_state]_[occupant ? "body" : "ready"]")
|
||||
. += "[base_icon_state]_[occupant ? "body" : "ready"]"
|
||||
|
||||
/obj/machinery/suit_storage_unit/attackby(obj/item/I, mob/user, params)
|
||||
if(shocked)
|
||||
@@ -344,7 +344,7 @@
|
||||
return
|
||||
if(state_open)
|
||||
if(store_item(I, user))
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
SStgui.update_uis(src)
|
||||
to_chat(user, "<span class='notice'>You load [I] into the storage compartment.</span>")
|
||||
else
|
||||
@@ -360,7 +360,7 @@
|
||||
if(shock(user, 100))
|
||||
return
|
||||
if(default_deconstruction_screwdriver(user, "[base_icon_state]", "[base_icon_state]", I))
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/**
|
||||
* Tries to store the item into whatever slot it can go, returns true if the item is stored successfully.
|
||||
@@ -405,7 +405,7 @@
|
||||
if(!is_operational() && state_open)
|
||||
open_machine()
|
||||
dump_contents()
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
|
||||
/obj/machinery/suit_storage_unit/proc/dump_contents()
|
||||
@@ -498,7 +498,7 @@
|
||||
playsound(src, 'sound/machines/airlock_close.ogg', 25, 1)
|
||||
if(occupant)
|
||||
dump_contents()
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
SStgui.update_uis(src)
|
||||
|
||||
/obj/machinery/suit_storage_unit/relaymove(mob/user)
|
||||
@@ -547,7 +547,7 @@
|
||||
state_open = TRUE
|
||||
if(drop)
|
||||
dropContents()
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
SStgui.update_uis(src)
|
||||
|
||||
/obj/machinery/suit_storage_unit/dropContents()
|
||||
@@ -576,7 +576,7 @@
|
||||
occupant = target
|
||||
target.forceMove(src)
|
||||
SStgui.update_uis(src)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
|
||||
////////
|
||||
@@ -649,7 +649,7 @@
|
||||
cook()
|
||||
if("eject_occupant")
|
||||
eject_occupant(usr)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/machinery/suit_storage_unit/proc/toggleUV()
|
||||
if(!panel_open)
|
||||
@@ -731,7 +731,7 @@
|
||||
occupant = null
|
||||
if(!state_open)
|
||||
state_open = 1
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
return
|
||||
|
||||
/obj/machinery/suit_storage_unit/force_eject_occupant(mob/target)
|
||||
@@ -747,7 +747,7 @@
|
||||
eject_occupant(usr)
|
||||
add_fingerprint(usr)
|
||||
SStgui.update_uis(src)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
return
|
||||
|
||||
/obj/machinery/suit_storage_unit/verb/move_inside()
|
||||
@@ -774,7 +774,7 @@
|
||||
usr.forceMove(src)
|
||||
occupant = usr
|
||||
state_open = FALSE //Close the thing after the guy gets inside
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
add_fingerprint(usr)
|
||||
SStgui.update_uis(src)
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
if(active && !defused && ((detonation_timer <= world.time) || explode_now))
|
||||
active = FALSE
|
||||
timer_set = initial(timer_set)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
try_detonate(TRUE)
|
||||
//Counter terrorists win
|
||||
else if(defused)
|
||||
@@ -87,7 +87,7 @@
|
||||
wires = new(src)
|
||||
if(payload)
|
||||
payload = new payload(src)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
countdown = new(src)
|
||||
|
||||
/obj/machinery/syndicatebomb/Destroy()
|
||||
@@ -101,7 +101,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()
|
||||
@@ -152,7 +152,7 @@
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
open_panel = !open_panel
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
to_chat(user, "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>")
|
||||
|
||||
/obj/machinery/syndicatebomb/wirecutter_act(mob/user, obj/item/I)
|
||||
@@ -254,7 +254,7 @@
|
||||
else
|
||||
loc.visible_message("<span class='danger'>[bicon(src)] [timer_set] seconds until detonation, please clear the area.</span>")
|
||||
activate()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
add_fingerprint(user)
|
||||
|
||||
var/turf/bombturf = get_turf(src)
|
||||
@@ -362,7 +362,7 @@
|
||||
holder.delayedbig = FALSE
|
||||
holder.delayedlittle = FALSE
|
||||
holder.explode_now = FALSE
|
||||
holder.update_icon()
|
||||
holder.update_icon(UPDATE_ICON_STATE)
|
||||
holder.updateDialog()
|
||||
|
||||
/obj/item/bombcore/training/detonate()
|
||||
|
||||
@@ -51,7 +51,7 @@ GLOBAL_LIST_EMPTY(tcomms_machines)
|
||||
/obj/machinery/tcomms/Initialize(mapload)
|
||||
. = ..()
|
||||
GLOB.tcomms_machines += src
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
if((!mapload) && (usr))
|
||||
// To the person who asks "Hey affected, why are you using this massive operator when you can use AREACOORD?" Well, ill tell you
|
||||
// get_area_name is fucking broken and uses a for(x in world) search
|
||||
@@ -82,8 +82,7 @@ GLOBAL_LIST_EMPTY(tcomms_machines)
|
||||
*
|
||||
* Ensures that the icon updates properly based on if the machine is active or not. This removes the need for this check in many other places.
|
||||
*/
|
||||
/obj/machinery/tcomms/update_icon()
|
||||
. = ..()
|
||||
/obj/machinery/tcomms/update_icon_state()
|
||||
// Show the off sprite if were inactive, ion'd or unpowered
|
||||
var/functioning = (active && !(stat & NOPOWER) && !ion)
|
||||
icon_state = "[initial(icon_state)][panel_open ? "_o" : null][functioning ? null : "_off"]"
|
||||
@@ -114,7 +113,7 @@ GLOBAL_LIST_EMPTY(tcomms_machines)
|
||||
*/
|
||||
/obj/machinery/tcomms/proc/start_ion()
|
||||
ion = TRUE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/**
|
||||
* End of Ion Anomaly Event
|
||||
@@ -123,7 +122,7 @@ GLOBAL_LIST_EMPTY(tcomms_machines)
|
||||
*/
|
||||
/obj/machinery/tcomms/proc/end_ion()
|
||||
ion = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/**
|
||||
* Z-Level transit change helper
|
||||
@@ -136,7 +135,7 @@ GLOBAL_LIST_EMPTY(tcomms_machines)
|
||||
active = FALSE
|
||||
// This needs a timer because otherwise its on the shuttle Z and the message is missed
|
||||
addtimer(CALLBACK(src, /atom.proc/visible_message, "<span class='warning'>Radio equipment on [src] has been overloaded by heavy bluespace interference. Please restart the machine.</span>"), 5)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
|
||||
/**
|
||||
@@ -160,7 +159,7 @@ GLOBAL_LIST_EMPTY(tcomms_machines)
|
||||
*/
|
||||
/obj/machinery/tcomms/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/**
|
||||
* # Telecommunications Message
|
||||
@@ -448,7 +447,7 @@ GLOBAL_LIST_EMPTY(tcomms_machines)
|
||||
if(C.network_id == "STATION-CORE")
|
||||
info = "<center><h2>Telecommunications Key</h2></center>\n\t<br>The station core linkage password is '[C.link_password]'.<br>Should this paper be misplaced or destroyed, fear not, as the password is visible under the core linkage section. Should you wish to modify this password, it can be modified from the core."
|
||||
info_links = info
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
// Save time, even though there should only be one STATION-CORE in the world
|
||||
break
|
||||
return ..()
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
power_station.engaged = FALSE
|
||||
if(power_station.teleporter_hub.accurate < 3)
|
||||
power_station.teleporter_hub.calibrated = FALSE
|
||||
power_station.teleporter_hub.update_icon()
|
||||
power_station.teleporter_hub.update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/**
|
||||
* Calibrates the hub. Helper function of ui_act
|
||||
@@ -288,7 +288,7 @@
|
||||
trg.stat &= ~NOPOWER
|
||||
if(trg.teleporter_hub)
|
||||
trg.teleporter_hub.stat &= ~NOPOWER
|
||||
trg.teleporter_hub.update_icon()
|
||||
trg.teleporter_hub.update_icon(UPDATE_ICON_STATE)
|
||||
if(trg.teleporter_console)
|
||||
trg.teleporter_console.stat &= ~NOPOWER
|
||||
trg.teleporter_console.update_icon()
|
||||
@@ -405,7 +405,7 @@
|
||||
if(accurate < 3)
|
||||
calibrated = FALSE
|
||||
|
||||
/obj/machinery/teleport/hub/update_icon()
|
||||
/obj/machinery/teleport/hub/update_icon_state()
|
||||
if(panel_open)
|
||||
icon_state = "tele-o"
|
||||
else if(power_station && power_station.engaged)
|
||||
@@ -432,7 +432,7 @@
|
||||
for(var/obj/item/stock_parts/matter_bin/M in component_parts)
|
||||
A -= M.rating * 10
|
||||
tele_delay = max(A, 0)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/**
|
||||
Internal helper function
|
||||
@@ -464,18 +464,18 @@
|
||||
use_power(5000)
|
||||
if(tele_delay)
|
||||
recalibrating = TRUE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
addtimer(CALLBACK(src, .proc/BumpedCallback), tele_delay)
|
||||
|
||||
/obj/machinery/teleport/perma/proc/BumpedCallback()
|
||||
recalibrating = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/teleport/perma/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/teleport/perma/update_icon()
|
||||
/obj/machinery/teleport/perma/update_icon_state()
|
||||
if(panel_open)
|
||||
icon_state = "tele-o"
|
||||
else if(target && !recalibrating && !(stat & (BROKEN|NOPOWER)))
|
||||
@@ -543,7 +543,7 @@
|
||||
/obj/machinery/teleport/station/Destroy()
|
||||
if(teleporter_hub)
|
||||
teleporter_hub.power_station = null
|
||||
teleporter_hub.update_icon()
|
||||
teleporter_hub.update_icon(UPDATE_ICON_STATE)
|
||||
teleporter_hub = null
|
||||
if(teleporter_console)
|
||||
teleporter_console.power_station = null
|
||||
@@ -584,7 +584,7 @@
|
||||
|
||||
/obj/machinery/teleport/station/screwdriver_act(mob/user, obj/item/I)
|
||||
if(default_deconstruction_screwdriver(user, "controller-o", "controller", I))
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/teleport/station/wirecutter_act(mob/user, obj/item/I)
|
||||
@@ -618,17 +618,17 @@
|
||||
else
|
||||
visible_message("<span class='alert'>No target detected.</span>")
|
||||
engaged = FALSE
|
||||
teleporter_hub.update_icon()
|
||||
teleporter_hub.update_icon(UPDATE_ICON_STATE)
|
||||
if(istype(user))
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/machinery/teleport/station/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
if(teleporter_hub)
|
||||
teleporter_hub.update_icon()
|
||||
teleporter_hub.update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/teleport/station/update_icon()
|
||||
/obj/machinery/teleport/station/update_icon_state()
|
||||
if(panel_open)
|
||||
icon_state = "controller-o"
|
||||
else if(stat & NOPOWER)
|
||||
|
||||
@@ -48,10 +48,9 @@
|
||||
|
||||
/obj/machinery/transformer/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/transformer/update_icon()
|
||||
..()
|
||||
/obj/machinery/transformer/update_icon_state()
|
||||
if(is_on_cooldown || stat & (BROKEN|NOPOWER))
|
||||
icon_state = "separator-AO0"
|
||||
else
|
||||
@@ -66,7 +65,7 @@
|
||||
/// Resets `is_on_cooldown` to `FALSE` and updates our icon. Used in a callback after the transformer does a transformation.
|
||||
/obj/machinery/transformer/proc/reset_cooldown()
|
||||
is_on_cooldown = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/transformer/Bumped(atom/movable/AM)
|
||||
// They have to be human to be transformed.
|
||||
@@ -94,7 +93,7 @@
|
||||
|
||||
// Activate the cooldown
|
||||
is_on_cooldown = TRUE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
addtimer(CALLBACK(src, .proc/reset_cooldown), cooldown_duration)
|
||||
addtimer(CALLBACK(null, .proc/playsound, loc, 'sound/machines/ping.ogg', 50, 0), 3 SECONDS)
|
||||
|
||||
@@ -141,7 +140,7 @@
|
||||
|
||||
// Activate the cooldown
|
||||
is_on_cooldown = TRUE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
addtimer(CALLBACK(src, .proc/reset_cooldown), cooldown_duration)
|
||||
|
||||
/obj/machinery/transformer/xray
|
||||
@@ -167,10 +166,9 @@
|
||||
|
||||
/obj/machinery/transformer/xray/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/transformer/xray/update_icon()
|
||||
..()
|
||||
/obj/machinery/transformer/xray/update_icon_state()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
icon_state = "separator-AO0"
|
||||
else
|
||||
|
||||
@@ -215,15 +215,14 @@
|
||||
if(faction == aTurret.faction)
|
||||
aTurret.setState(TC)
|
||||
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/turretid/power_change()
|
||||
..()
|
||||
updateTurrets()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/turretid/update_icon()
|
||||
..()
|
||||
/obj/machinery/turretid/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "control_off"
|
||||
set_light(0)
|
||||
|
||||
@@ -164,17 +164,17 @@
|
||||
for(var/obj/item/vending_refill/VR in component_parts)
|
||||
restock(VR)
|
||||
|
||||
/obj/machinery/vending/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/vending/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
if(panel_open)
|
||||
add_overlay("[icon_panel ? "[icon_panel]_panel" : "[icon_state]_panel"]")
|
||||
. += "[icon_panel ? "[icon_panel]_panel" : "[icon_state]_panel"]"
|
||||
if(icon_addon)
|
||||
add_overlay("[icon_addon]")
|
||||
. += "[icon_addon]"
|
||||
if((stat & (BROKEN|NOPOWER)) || force_no_power_icon_state)
|
||||
add_overlay("[icon_off ? "[icon_off]_off" : "[icon_state]_off"]")
|
||||
. += "[icon_off ? "[icon_off]_off" : "[icon_state]_off"]"
|
||||
if(stat & BROKEN)
|
||||
add_overlay("[icon_broken ? "[icon_broken]_broken" : "[icon_state]_broken"]")
|
||||
. += "[icon_broken ? "[icon_broken]_broken" : "[icon_state]_broken"]"
|
||||
return
|
||||
if(light)
|
||||
underlays += emissive_appearance(icon, "[icon_lightmask ? "[icon_lightmask]_lightmask" : "[icon_state]_off"]")
|
||||
@@ -203,14 +203,14 @@
|
||||
for(var/i in 1 to amount)
|
||||
force_no_power_icon_state = TRUE
|
||||
set_light(0)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
sleep(rand(1, 3))
|
||||
|
||||
force_no_power_icon_state = FALSE
|
||||
set_light(light_range_on, light_power_on)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
sleep(rand(1, 10))
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
flickering = FALSE
|
||||
|
||||
/**
|
||||
@@ -363,7 +363,7 @@
|
||||
if(anchored)
|
||||
panel_open = !panel_open
|
||||
panel_open ? SCREWDRIVER_OPEN_PANEL_MESSAGE : SCREWDRIVER_CLOSE_PANEL_MESSAGE
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
SStgui.update_uis(src)
|
||||
|
||||
/obj/machinery/vending/wirecutter_act(mob/user, obj/item/I)
|
||||
@@ -840,13 +840,13 @@
|
||||
set_light(0)
|
||||
else
|
||||
set_light(light_range_on, light_power_on)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/machinery/vending/obj_break(damage_flag)
|
||||
if(!(stat & BROKEN))
|
||||
stat |= BROKEN
|
||||
set_light(0)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
var/dump_amount = 0
|
||||
var/found_anything = TRUE
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
state = 8
|
||||
else
|
||||
state = 5
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
sleep(200)
|
||||
for(var/atom/A in contents)
|
||||
A.clean_blood()
|
||||
@@ -188,7 +188,7 @@
|
||||
gibs_ready = 1
|
||||
else
|
||||
state = 4
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/washing_machine/verb/climb_out()
|
||||
set name = "Climb out"
|
||||
@@ -200,7 +200,7 @@
|
||||
usr.loc = src.loc
|
||||
|
||||
|
||||
/obj/machinery/washing_machine/update_icon()
|
||||
/obj/machinery/washing_machine/update_icon_state()
|
||||
icon_state = "wm_[state][panel]"
|
||||
|
||||
/obj/machinery/washing_machine/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
@@ -216,7 +216,7 @@
|
||||
user.drop_item()
|
||||
crayon = W
|
||||
crayon.loc = src
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
else
|
||||
return ..()
|
||||
else
|
||||
@@ -228,7 +228,7 @@
|
||||
G.affecting.loc = src
|
||||
qdel(G)
|
||||
state = 3
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
else
|
||||
return ..()
|
||||
else if(istype(W,/obj/item/stack/sheet/hairlesshide) || \
|
||||
@@ -296,7 +296,7 @@
|
||||
to_chat(user, "<span class='notice'>You can't put the item in right now.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The washing machine is full.</span>")
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -332,7 +332,7 @@
|
||||
state = 1
|
||||
|
||||
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/machinery/washing_machine/deconstruct(disassembled = TRUE)
|
||||
new /obj/item/stack/sheet/metal(drop_location(), 2)
|
||||
|
||||
@@ -438,13 +438,13 @@
|
||||
NC.cable_color("red")
|
||||
NC.d1 = 0
|
||||
NC.d2 = fdirn
|
||||
NC.updateicon()
|
||||
NC.update_icon()
|
||||
|
||||
var/datum/powernet/PN
|
||||
if(last_piece && last_piece.d2 != Dir)
|
||||
last_piece.d1 = min(last_piece.d2, Dir)
|
||||
last_piece.d2 = max(last_piece.d2, Dir)
|
||||
last_piece.updateicon()
|
||||
last_piece.update_icon()
|
||||
PN = last_piece.powernet
|
||||
|
||||
if(!PN)
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
var/obj/machinery/mech_bay_recharge_port/recharge_port
|
||||
|
||||
|
||||
/obj/machinery/computer/mech_bay_power_console/update_icon()
|
||||
/obj/machinery/computer/mech_bay_power_console/update_overlays()
|
||||
if(!recharge_port || !recharge_port.recharging_mecha || !recharge_port.recharging_mecha.cell || !(recharge_port.recharging_mecha.cell.charge < recharge_port.recharging_mecha.cell.maxcharge) || stat & (NOPOWER|BROKEN))
|
||||
icon_screen = "recharge_comp"
|
||||
else
|
||||
|
||||
@@ -42,24 +42,34 @@
|
||||
|
||||
/obj/mecha/working/ripley/go_out()
|
||||
..()
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/mecha/working/ripley/moved_inside(mob/living/carbon/human/H)
|
||||
..()
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/mecha/working/ripley/mmi_moved_inside(obj/item/mmi/mmi_as_oc, mob/user)
|
||||
..()
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/mecha/working/ripley/update_icon()
|
||||
..()
|
||||
if(hides)
|
||||
cut_overlays()
|
||||
if(hides < 3)
|
||||
add_overlay(occupant ? "ripley-g" : "ripley-g-open")
|
||||
else
|
||||
add_overlay(occupant ? "ripley-g-full" : "ripley-g-full-open")
|
||||
/obj/mecha/working/ripley/update_desc()
|
||||
. = ..()
|
||||
if(!hides) // Just in case if hides are somehow removed
|
||||
desc = initial(desc)
|
||||
return
|
||||
if(hides == 3)
|
||||
desc = "Autonomous Power Loader Unit. It's wearing a fearsome carapace entirely composed of goliath hide plates - its pilot must be an experienced monster hunter."
|
||||
else
|
||||
desc = "Autonomous Power Loader Unit. Its armour is enhanced with some goliath hide plates."
|
||||
|
||||
/obj/mecha/working/ripley/update_overlays()
|
||||
. = ..()
|
||||
if(!hides)
|
||||
return
|
||||
if(hides == 3)
|
||||
. += occupant ? "ripley-g-full" : "ripley-g-full-open"
|
||||
else
|
||||
. += occupant ? "ripley-g" : "ripley-g-open"
|
||||
|
||||
/obj/mecha/working/ripley/firefighter
|
||||
desc = "A standard APLU chassis that was refitted with additional thermal protection and a cistern."
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/update_icon()
|
||||
color = "#FFFFFF"
|
||||
. = ..()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/up
|
||||
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6", "xgibup1", "xgibup1", "xgibup1")
|
||||
|
||||
@@ -50,6 +50,7 @@ GLOBAL_LIST_EMPTY(splatter_cache)
|
||||
if(basecolor == "rainbow")
|
||||
basecolor = "#[pick(list("FF0000","FF7F00","FFFF00","00FF00","0000FF","4B0082","8F00FF"))]"
|
||||
color = basecolor
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/proc/dry()
|
||||
name = dryname
|
||||
@@ -142,21 +143,26 @@ GLOBAL_LIST_EMPTY(splatter_cache)
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6")
|
||||
no_clear = TRUE
|
||||
mergeable_decal = FALSE
|
||||
|
||||
var/image/giblets
|
||||
var/fleshcolor = "#FFFFFF"
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/Destroy()
|
||||
giblets = null
|
||||
return ..()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/update_icon()
|
||||
var/image/giblets = new(base_icon, "[icon_state]_flesh", dir)
|
||||
giblets = new(base_icon, "[icon_state]_flesh", dir)
|
||||
if(!fleshcolor || fleshcolor == "rainbow")
|
||||
fleshcolor = "#[pick(list("FF0000","FF7F00","FFFF00","00FF00","0000FF","4B0082","8F00FF"))]"
|
||||
giblets.color = fleshcolor
|
||||
var/icon/blood = new(base_icon,"[icon_state]",dir)
|
||||
|
||||
icon = blood
|
||||
overlays.Cut()
|
||||
overlays += giblets
|
||||
. = ..()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/update_overlays()
|
||||
. = ..()
|
||||
. += giblets
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/ex_act(severity)
|
||||
return
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/robot/update_icon()
|
||||
color = "#FFFFFF"
|
||||
. = ..()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/robot/dry() //pieces of robots do not dry up like
|
||||
return
|
||||
|
||||
@@ -87,8 +87,8 @@ GLOBAL_LIST_EMPTY(fluidtrack_cache)
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/update_icon()
|
||||
overlays.Cut()
|
||||
/obj/effect/decal/cleanable/blood/footprints/update_overlays()
|
||||
. = ..()
|
||||
|
||||
for(var/Ddir in GLOB.cardinal)
|
||||
if(entered_dirs & Ddir)
|
||||
@@ -100,7 +100,7 @@ GLOBAL_LIST_EMPTY(fluidtrack_cache)
|
||||
GLOB.fluidtrack_cache["entered-[blood_state]-[Ddir]"] = I
|
||||
if(I)
|
||||
I.color = basecolor
|
||||
overlays += I
|
||||
. += I
|
||||
if(exited_dirs & Ddir)
|
||||
var/image/I
|
||||
if(GLOB.fluidtrack_cache["exited-[blood_state]-[Ddir]"])
|
||||
@@ -110,7 +110,7 @@ GLOBAL_LIST_EMPTY(fluidtrack_cache)
|
||||
GLOB.fluidtrack_cache["exited-[blood_state]-[Ddir]"] = I
|
||||
if(I)
|
||||
I.color = basecolor
|
||||
overlays += I
|
||||
. += I
|
||||
|
||||
alpha = base_alpha + bloodiness
|
||||
|
||||
|
||||
@@ -62,9 +62,9 @@
|
||||
var/poster_item_icon_state = "rolled_poster"
|
||||
|
||||
/obj/structure/sign/poster/Initialize(mapload)
|
||||
. = ..()
|
||||
if(random_basetype)
|
||||
randomise(random_basetype)
|
||||
. = ..()
|
||||
if(!ruined)
|
||||
original_name = name
|
||||
name = "poster - [name]"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
var/obj/structure/foamedmetal/M = new(src.loc)
|
||||
M.metal = metal
|
||||
M.updateicon()
|
||||
M.update_state()
|
||||
|
||||
flick("[icon_state]-disolve", src)
|
||||
sleep(5)
|
||||
@@ -193,15 +193,20 @@
|
||||
/obj/structure/foamedmetal/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
playsound(src.loc, 'sound/weapons/tap.ogg', 100, TRUE)
|
||||
|
||||
/obj/structure/foamedmetal/proc/updateicon()
|
||||
/obj/structure/foamedmetal/proc/update_state()
|
||||
if(metal == MFOAM_ALUMINUM)
|
||||
icon_state = "metalfoam"
|
||||
max_integrity = 20
|
||||
obj_integrity = max_integrity
|
||||
else
|
||||
icon_state = "ironfoam"
|
||||
max_integrity = 50
|
||||
obj_integrity = max_integrity
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/structure/foamedmetal/update_icon_state()
|
||||
if(metal == MFOAM_ALUMINUM)
|
||||
icon_state = "metalfoam"
|
||||
else
|
||||
icon_state = "ironfoam"
|
||||
|
||||
/obj/structure/foamedmetal/attack_hand(mob/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
|
||||
@@ -30,19 +30,25 @@
|
||||
|
||||
visible_message("[user] places [I] in [src].")
|
||||
add_fingerprint(user)
|
||||
update_icon()
|
||||
update_appearance(UPDATE_DESC|UPDATE_ICON_STATE)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/ashtray/update_icon()
|
||||
/obj/item/ashtray/update_icon_state()
|
||||
if(contents.len == max_butts)
|
||||
icon_state = icon_full
|
||||
desc = initial(desc) + " It's stuffed full."
|
||||
else if(contents.len > max_butts * 0.5)
|
||||
icon_state = icon_half
|
||||
desc = initial(desc) + " It's half-filled."
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/item/ashtray/update_desc()
|
||||
. = ..()
|
||||
if(contents.len == max_butts)
|
||||
desc = initial(desc) + " It's stuffed full."
|
||||
else if(contents.len > max_butts * 0.5)
|
||||
desc = initial(desc) + " It's half-filled."
|
||||
else
|
||||
desc = initial(desc)
|
||||
|
||||
/obj/item/ashtray/deconstruct()
|
||||
@@ -52,7 +58,7 @@
|
||||
/obj/item/ashtray/proc/empty_tray()
|
||||
for(var/obj/item/I in contents)
|
||||
I.forceMove(loc)
|
||||
update_icon()
|
||||
update_appearance(UPDATE_DESC|UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/ashtray/throw_impact(atom/hit_atom)
|
||||
if(contents.len)
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
/obj/structure/closet/body_bag/update_overlays()
|
||||
..()
|
||||
if(name != initial(name))
|
||||
add_overlay("bodybag_label")
|
||||
. += "bodybag_label"
|
||||
|
||||
/obj/structure/closet/body_bag/MouseDrop(over_object, src_location, over_location)
|
||||
. = ..()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user