mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +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:
@@ -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)
|
||||
. = ..()
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/candle/update_icon()
|
||||
/obj/item/candle/update_icon_state()
|
||||
if(flickering)
|
||||
icon_state = "candle[get_icon_index()]_flicker"
|
||||
else
|
||||
@@ -58,7 +58,7 @@
|
||||
usr.visible_message(show_message)
|
||||
set_light(CANDLE_LUM)
|
||||
START_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/candle/proc/get_icon_index()
|
||||
if(wax > 150)
|
||||
@@ -70,12 +70,12 @@
|
||||
|
||||
/obj/item/candle/proc/start_flickering()
|
||||
flickering = TRUE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
addtimer(CALLBACK(src, .proc/stop_flickering), 4 SECONDS, TIMER_UNIQUE)
|
||||
|
||||
/obj/item/candle/proc/stop_flickering()
|
||||
flickering = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/candle/process()
|
||||
if(!lit)
|
||||
@@ -88,7 +88,7 @@
|
||||
var/mob/M = src.loc
|
||||
M.unEquip(src, 1) //src is being deleted anyway
|
||||
qdel(src)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
if(isturf(loc)) //start a fire if possible
|
||||
var/turf/T = loc
|
||||
T.hotspot_expose(700, 5)
|
||||
@@ -98,7 +98,7 @@
|
||||
if(lit)
|
||||
user.visible_message("<span class='notice'>[user] snuffs out [src].</span>")
|
||||
lit = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
set_light(0)
|
||||
|
||||
/obj/item/candle/eternal
|
||||
|
||||
@@ -269,13 +269,12 @@
|
||||
if("Toggle Cap")
|
||||
to_chat(user, "<span class='notice'>You [capped ? "remove" : "replace"] the cap of [src].</span>")
|
||||
capped = !capped
|
||||
icon_state = "spraycan[capped ? "_cap" : ""]"
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
if("Change Drawing")
|
||||
..()
|
||||
if("Change Color")
|
||||
colour = input(user,"Choose Color") as color
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/toy/crayon/spraycan/afterattack(atom/target, mob/user as mob, proximity)
|
||||
if(!proximity)
|
||||
@@ -300,8 +299,11 @@
|
||||
playsound(user.loc, 'sound/effects/spray.ogg', 5, 1, 5)
|
||||
..()
|
||||
|
||||
/obj/item/toy/crayon/spraycan/update_icon()
|
||||
overlays.Cut()
|
||||
/obj/item/toy/crayon/spraycan/update_icon_state()
|
||||
icon_state = "spraycan[capped ? "_cap" : ""]"
|
||||
|
||||
/obj/item/toy/crayon/spraycan/update_overlays()
|
||||
. = ..()
|
||||
var/image/I = image('icons/obj/crayons.dmi',icon_state = "[capped ? "spraycan_cap_colors" : "spraycan_colors"]")
|
||||
I.color = colour
|
||||
overlays += I
|
||||
. += I
|
||||
|
||||
@@ -15,34 +15,32 @@
|
||||
|
||||
/obj/item/flashlight/Initialize()
|
||||
. = ..()
|
||||
if(on)
|
||||
icon_state = "[initial(icon_state)]-on"
|
||||
set_light(brightness_on)
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
set_light(0)
|
||||
update_brightness()
|
||||
|
||||
/obj/item/flashlight/proc/update_brightness(mob/user = null)
|
||||
/obj/item/flashlight/update_icon_state()
|
||||
if(on)
|
||||
icon_state = "[initial(icon_state)]-on"
|
||||
else
|
||||
icon_state = "[initial(icon_state)]"
|
||||
|
||||
/obj/item/flashlight/proc/update_brightness()
|
||||
if(on)
|
||||
set_light(brightness_on)
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
set_light(0)
|
||||
update_icon()
|
||||
|
||||
/obj/item/flashlight/attack_self(mob/user)
|
||||
if(!isturf(user.loc))
|
||||
to_chat(user, "You cannot turn the light on while in this [user.loc].")//To prevent some lighting anomalities.
|
||||
|
||||
return 0
|
||||
return FALSE
|
||||
on = !on
|
||||
playsound(user, togglesound, 100, 1)
|
||||
update_brightness(user)
|
||||
update_brightness()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
return 1
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/item/flashlight/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
add_fingerprint(user)
|
||||
@@ -129,15 +127,12 @@
|
||||
materials = list()
|
||||
on = TRUE
|
||||
|
||||
|
||||
// green-shaded desk lamp
|
||||
/obj/item/flashlight/lamp/green
|
||||
desc = "A classic green-shaded desk lamp."
|
||||
icon_state = "lampgreen"
|
||||
item_state = "lampgreen"
|
||||
|
||||
|
||||
|
||||
/obj/item/flashlight/lamp/verb/toggle_light()
|
||||
set name = "Toggle light"
|
||||
set category = "Object"
|
||||
@@ -153,7 +148,6 @@
|
||||
icon_state = "bananalamp"
|
||||
item_state = "bananalamp"
|
||||
|
||||
|
||||
// FLARES
|
||||
|
||||
/obj/item/flashlight/flare
|
||||
@@ -174,6 +168,12 @@
|
||||
fuel = rand(fuel_lower, fuel_upp)
|
||||
..()
|
||||
|
||||
/obj/item/flashlight/flare/update_icon_state()
|
||||
if(!fuel)
|
||||
icon_state = "[initial(icon_state)]-empty"
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/flashlight/flare/process()
|
||||
var/turf/pos = get_turf(src)
|
||||
if(pos && produce_heat)
|
||||
@@ -181,8 +181,6 @@
|
||||
fuel = max(fuel - 1, 0)
|
||||
if(!fuel || !on)
|
||||
turn_off()
|
||||
if(!fuel)
|
||||
icon_state = "[initial(icon_state)]-empty"
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/flashlight/flare/Destroy()
|
||||
@@ -193,21 +191,9 @@
|
||||
on = FALSE
|
||||
force = initial(force)
|
||||
damtype = initial(damtype)
|
||||
if(ismob(loc))
|
||||
var/mob/U = loc
|
||||
update_brightness(U)
|
||||
else
|
||||
update_brightness(null)
|
||||
|
||||
/obj/item/flashlight/flare/update_brightness(mob/user = null)
|
||||
..()
|
||||
if(on)
|
||||
item_state = "[initial(item_state)]-on"
|
||||
else
|
||||
item_state = "[initial(item_state)]"
|
||||
update_brightness()
|
||||
|
||||
/obj/item/flashlight/flare/attack_self(mob/user)
|
||||
|
||||
// Usual checks
|
||||
if(!fuel)
|
||||
to_chat(user, "<span class='notice'>[src] is out of fuel.</span>")
|
||||
@@ -220,8 +206,9 @@
|
||||
// All good, turn it on.
|
||||
if(.)
|
||||
user.visible_message("<span class='notice'>[user] activates [src].</span>", "<span class='notice'>You activate [src].</span>")
|
||||
force = on_damage
|
||||
damtype = "fire"
|
||||
if(produce_heat)
|
||||
force = on_damage
|
||||
damtype = "fire"
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
// GLOWSTICKS
|
||||
@@ -234,30 +221,25 @@
|
||||
icon_state = "glowstick"
|
||||
item_state = "glowstick"
|
||||
togglesound = 'sound/effects/bone_break_1.ogg'
|
||||
produce_heat = 0
|
||||
produce_heat = FALSE
|
||||
fuel_lower = 1600
|
||||
fuel_upp = 2000
|
||||
blocks_emissive = FALSE
|
||||
|
||||
/obj/item/flashlight/flare/glowstick/Initialize()
|
||||
light_color = color
|
||||
..()
|
||||
|
||||
/obj/item/flashlight/flare/glowstick/update_icon()
|
||||
item_state = "glowstick"
|
||||
cut_overlays()
|
||||
/obj/item/flashlight/flare/glowstick/update_icon_state()
|
||||
if(!fuel)
|
||||
icon_state = "glowstick-empty"
|
||||
cut_overlays()
|
||||
update_brightness(0)
|
||||
else if(on)
|
||||
|
||||
/obj/item/flashlight/flare/glowstick/update_overlays()
|
||||
. = ..()
|
||||
if(on)
|
||||
var/mutable_appearance/glowstick_overlay = mutable_appearance(icon, "glowstick-glow")
|
||||
glowstick_overlay.color = color
|
||||
add_overlay(glowstick_overlay)
|
||||
item_state = "glowstick-on"
|
||||
update_brightness(brightness_on)
|
||||
else
|
||||
icon_state = "glowstick"
|
||||
cut_overlays()
|
||||
. += glowstick_overlay
|
||||
|
||||
/obj/item/flashlight/flare/glowstick/red
|
||||
name = "red glowstick"
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
current_tick_amount = 0
|
||||
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_sound()
|
||||
|
||||
/obj/item/geiger_counter/examine(mob/user)
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
. += "<span class='notice'>The last radiation amount detected was [last_tick_amount]</span>"
|
||||
|
||||
/obj/item/geiger_counter/update_icon()
|
||||
/obj/item/geiger_counter/update_icon_state()
|
||||
if(!scanning)
|
||||
icon_state = "geiger_off"
|
||||
else if(emagged)
|
||||
@@ -113,11 +113,11 @@
|
||||
if(amount <= RAD_BACKGROUND_RADIATION || !scanning)
|
||||
return
|
||||
current_tick_amount += amount
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/geiger_counter/attack_self(mob/user)
|
||||
scanning = !scanning
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
to_chat(user, "<span class='notice'>[bicon(src)] You switch [scanning ? "on" : "off"] [src].</span>")
|
||||
|
||||
/obj/item/geiger_counter/afterattack(atom/target, mob/user)
|
||||
@@ -158,7 +158,7 @@
|
||||
user.visible_message("<span class='notice'>[user] refastens [src]'s maintenance panel!</span>", "<span class='notice'>You reset [src] to its factory settings!</span>")
|
||||
emagged = FALSE
|
||||
radiation_count = 0
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return TRUE
|
||||
else
|
||||
return ..()
|
||||
@@ -171,7 +171,7 @@
|
||||
return
|
||||
radiation_count = 0
|
||||
to_chat(user, "<span class='notice'>You flush [src]'s radiation counts, resetting it to normal.</span>")
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/geiger_counter/emag_act(mob/user)
|
||||
if(emagged)
|
||||
|
||||
@@ -147,14 +147,23 @@
|
||||
|
||||
/obj/item/lightreplacer/emag_act(user as mob)
|
||||
if(!emagged)
|
||||
Emag()
|
||||
emagged = !emagged
|
||||
playsound(loc, "sparks", 100, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
|
||||
update_appearance(UPDATE_NAME|UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/lightreplacer/attack_self(mob/user)
|
||||
for(var/obj/machinery/light/target in user.loc)
|
||||
ReplaceLight(target, user)
|
||||
to_chat(user, status_string())
|
||||
|
||||
/obj/item/lightreplacer/update_icon()
|
||||
/obj/item/lightreplacer/update_name()
|
||||
. = ..()
|
||||
if(emagged)
|
||||
name = "shortcircuited [initial(name)]"
|
||||
else
|
||||
name = initial(name)
|
||||
|
||||
/obj/item/lightreplacer/update_icon_state()
|
||||
icon_state = "lightreplacer[emagged]"
|
||||
|
||||
/obj/item/lightreplacer/proc/status_string()
|
||||
@@ -214,15 +223,6 @@
|
||||
to_chat(U, "<span class='warning'>There is a working [target.fitting] already inserted!</span>")
|
||||
return
|
||||
|
||||
/obj/item/lightreplacer/proc/Emag()
|
||||
emagged = !emagged
|
||||
playsound(loc, "sparks", 100, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
|
||||
if(emagged)
|
||||
name = "shortcircuited [initial(name)]"
|
||||
else
|
||||
name = initial(name)
|
||||
update_icon()
|
||||
|
||||
/obj/item/lightreplacer/proc/CanUse(mob/living/user)
|
||||
add_fingerprint(user)
|
||||
if(uses > 0)
|
||||
@@ -249,9 +249,8 @@
|
||||
to_chat(U, "[src]'s refill light blinks red.")
|
||||
|
||||
/obj/item/lightreplacer/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
J.put_in_cart(src, user)
|
||||
J.myreplacer = src
|
||||
J.update_icon()
|
||||
J.put_in_cart(src, user)
|
||||
|
||||
/obj/item/lightreplacer/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
return
|
||||
|
||||
@@ -58,5 +58,5 @@
|
||||
A.icon = initial(airlock.icon)
|
||||
A.overlays_file = initial(airlock.overlays_file)
|
||||
A.assemblytype = initial(airlock.assemblytype)
|
||||
A.update_icon()
|
||||
A.update_appearance()
|
||||
return TRUE
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
attached = null
|
||||
return ..()
|
||||
|
||||
/obj/item/powersink/update_icon()
|
||||
/obj/item/powersink/update_icon_state()
|
||||
icon_state = "powersink[mode == OPERATING]"
|
||||
|
||||
/obj/item/powersink/proc/set_mode(value)
|
||||
@@ -60,7 +60,7 @@
|
||||
density = TRUE
|
||||
|
||||
mode = value
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
set_light(0)
|
||||
|
||||
/obj/item/powersink/screwdriver_act(mob/user, obj/item/I)
|
||||
|
||||
@@ -61,10 +61,10 @@
|
||||
if(direction)
|
||||
setDir(direction)
|
||||
set_pixel_offsets_from_dir(28, -28, 28, -28)
|
||||
b_stat=1
|
||||
b_stat = TRUE
|
||||
on = FALSE
|
||||
GLOB.global_intercoms.Add(src)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/radio/intercom/Initialize()
|
||||
. = ..()
|
||||
@@ -184,12 +184,12 @@
|
||||
return
|
||||
if(!I.use_tool(src, user, 10, volume = I.tool_volume) || buildstage != 2)
|
||||
return
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
on = TRUE
|
||||
b_stat = 0
|
||||
b_stat = FALSE
|
||||
buildstage = 3
|
||||
to_chat(user, "<span class='notice'>You secure the electronics!</span>")
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_operating_status()
|
||||
for(var/i, i<= 5, i++)
|
||||
wires.on_cut(i, 1)
|
||||
@@ -203,9 +203,9 @@
|
||||
WIRECUTTER_SNIP_MESSAGE
|
||||
new /obj/item/stack/cable_coil(get_turf(src),5)
|
||||
on = FALSE
|
||||
b_stat = 1
|
||||
b_stat = TRUE
|
||||
buildstage = 1
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_operating_status(FALSE)
|
||||
|
||||
/obj/item/radio/intercom/welder_act(mob/user, obj/item/I)
|
||||
@@ -220,11 +220,11 @@
|
||||
new /obj/item/mounted/frame/intercom(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/radio/intercom/update_icon()
|
||||
/obj/item/radio/intercom/update_icon_state()
|
||||
if(!circuitry_installed)
|
||||
icon_state="intercom-frame"
|
||||
return
|
||||
icon_state = "intercom[!on?"-p":""][b_stat ? "-open":""]"
|
||||
else
|
||||
icon_state = "intercom[!on?"-p":""][b_stat ? "-open":""]"
|
||||
|
||||
/obj/item/radio/intercom/proc/update_operating_status(on = TRUE)
|
||||
var/area/current_area = get_area(src)
|
||||
@@ -249,7 +249,7 @@
|
||||
on = FALSE
|
||||
else
|
||||
on = current_area.powered(EQUIP) // set "on" to the equipment power status of our area.
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/intercom_electronics
|
||||
name = "intercom electronics"
|
||||
|
||||
@@ -596,6 +596,7 @@ REAGENT SCANNER
|
||||
var/obj/item/stock_parts/cell/cell
|
||||
var/cell_type = /obj/item/stock_parts/cell/upgraded
|
||||
var/ready = TRUE // Ready to scan
|
||||
var/printing = FALSE
|
||||
var/time_to_use = 0 // How much time remaining before next scan is available.
|
||||
var/usecharge = 750
|
||||
var/scan_time = 10 SECONDS //how long does it take to scan
|
||||
@@ -626,20 +627,22 @@ REAGENT SCANNER
|
||||
playsound(src, 'sound/machines/defib_saftyon.ogg', 50, 0)
|
||||
update_icon()
|
||||
|
||||
/obj/item/bodyanalyzer/update_icon(printing = FALSE)
|
||||
overlays.Cut()
|
||||
var/percent = cell.percent()
|
||||
/obj/item/bodyanalyzer/update_icon_state()
|
||||
if(!cell)
|
||||
icon_state = "bodyanalyzer_0"
|
||||
return
|
||||
if(ready)
|
||||
icon_state = "bodyanalyzer_1"
|
||||
else
|
||||
icon_state = "bodyanalyzer_2"
|
||||
|
||||
/obj/item/bodyanalyzer/update_overlays()
|
||||
. = ..()
|
||||
var/percent = cell.percent()
|
||||
var/overlayid = round(percent / 10)
|
||||
overlayid = "bodyanalyzer_charge[overlayid]"
|
||||
overlays += icon(icon, overlayid)
|
||||
|
||||
. += "bodyanalyzer_charge[overlayid]"
|
||||
if(printing)
|
||||
overlays += icon(icon, "bodyanalyzer_printing")
|
||||
. += "bodyanalyzer_printing"
|
||||
|
||||
/obj/item/bodyanalyzer/attack(mob/living/M, mob/living/carbon/human/user)
|
||||
if(user.incapacitated() || !user.Adjacent(M))
|
||||
@@ -686,14 +689,16 @@ REAGENT SCANNER
|
||||
else
|
||||
cell.use(usecharge)
|
||||
ready = FALSE
|
||||
update_icon(TRUE)
|
||||
printing = TRUE
|
||||
update_icon()
|
||||
addtimer(CALLBACK(src, /obj/item/bodyanalyzer/.proc/setReady), scan_cd)
|
||||
addtimer(CALLBACK(src, /obj/item/bodyanalyzer/.proc/update_icon), 20)
|
||||
|
||||
addtimer(VARSET_CALLBACK(src, printing, FALSE), 1.4 SECONDS)
|
||||
addtimer(CALLBACK(src, /atom/.proc/update_icon, UPDATE_OVERLAYS), 1.5 SECONDS)
|
||||
else if(iscorgi(M) && M.stat == DEAD)
|
||||
to_chat(user, "<span class='notice'>You wonder if [M.p_they()] was a good dog. <b>[src] tells you they were the best...</b></span>") // :'(
|
||||
playsound(loc, 'sound/machines/ping.ogg', 50, 0)
|
||||
ready = FALSE
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
addtimer(CALLBACK(src, /obj/item/bodyanalyzer/.proc/setReady), scan_cd)
|
||||
time_to_use = world.time + scan_cd
|
||||
else
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
..()
|
||||
if(starts_with_tape)
|
||||
mytape = new /obj/item/tape/random(src)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
soundloop = new(list(src))
|
||||
|
||||
/obj/item/taperecorder/Destroy()
|
||||
@@ -53,7 +53,7 @@
|
||||
mytape = I
|
||||
to_chat(user, "<span class='notice'>You insert [I] into [src].</span>")
|
||||
playsound(src, 'sound/items/taperecorder/taperecorder_close.ogg', 50, FALSE)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/taperecorder/proc/eject(mob/user)
|
||||
if(mytape)
|
||||
@@ -62,7 +62,7 @@
|
||||
stop()
|
||||
user.put_in_hands(mytape)
|
||||
mytape = null
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
|
||||
/obj/item/taperecorder/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
|
||||
@@ -92,7 +92,7 @@
|
||||
eject(usr)
|
||||
|
||||
|
||||
/obj/item/taperecorder/update_icon()
|
||||
/obj/item/taperecorder/update_icon_state()
|
||||
if(!mytape)
|
||||
icon_state = "taperecorder_empty"
|
||||
else if(recording)
|
||||
@@ -102,7 +102,6 @@
|
||||
else
|
||||
icon_state = "taperecorder_idle"
|
||||
|
||||
|
||||
/obj/item/taperecorder/hear_talk(mob/living/M as mob, list/message_pieces)
|
||||
var/msg = multilingual_to_message(message_pieces)
|
||||
if(mytape && recording)
|
||||
@@ -146,7 +145,7 @@
|
||||
recording = TRUE
|
||||
atom_say("Recording started.")
|
||||
update_sound()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] Recording started."
|
||||
var/used = mytape.used_capacity //to stop runtimes when you eject the tape
|
||||
@@ -180,7 +179,7 @@
|
||||
playsound(src, 'sound/items/taperecorder/taperecorder_stop.ogg', 50, FALSE)
|
||||
atom_say("Playback stopped.")
|
||||
playing = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_sound()
|
||||
|
||||
|
||||
@@ -198,7 +197,7 @@
|
||||
return
|
||||
|
||||
playing = TRUE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
update_sound()
|
||||
atom_say("Playback started.")
|
||||
playsound(src, 'sound/items/taperecorder/taperecorder_play.ogg', 50, FALSE)
|
||||
@@ -285,7 +284,7 @@
|
||||
var/used_capacity = 0
|
||||
var/list/storedinfo = list()
|
||||
var/list/timestamp = list()
|
||||
var/ruined = 0
|
||||
var/ruined = FALSE
|
||||
|
||||
/obj/item/tape/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
|
||||
..()
|
||||
@@ -308,22 +307,23 @@
|
||||
to_chat(usr, "<span class='notice'>You erase the data from [src].</span>")
|
||||
clear()
|
||||
|
||||
/obj/item/tape/update_overlays()
|
||||
. = ..()
|
||||
if(ruined)
|
||||
. += "ribbonoverlay"
|
||||
|
||||
/obj/item/tape/proc/clear()
|
||||
used_capacity = 0
|
||||
storedinfo.Cut()
|
||||
timestamp.Cut()
|
||||
|
||||
/obj/item/tape/proc/ruin()
|
||||
if(!ruined)
|
||||
overlays += "ribbonoverlay"
|
||||
ruined = 1
|
||||
|
||||
|
||||
ruined = TRUE
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/tape/proc/fix()
|
||||
overlays -= "ribbonoverlay"
|
||||
ruined = 0
|
||||
|
||||
ruined = FALSE
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/tape/attackby(obj/item/I, mob/user)
|
||||
if(ruined && istype(I, /obj/item/screwdriver))
|
||||
|
||||
@@ -152,23 +152,25 @@
|
||||
spawn(50) // To stop a signal being spammed from a proxy sensor constantly going off or whatever
|
||||
toggle = TRUE
|
||||
|
||||
/obj/item/transfer_valve/update_icon()
|
||||
overlays.Cut()
|
||||
underlays = null
|
||||
|
||||
/obj/item/transfer_valve/update_icon_state()
|
||||
if(!tank_one && !tank_two && !attached_device)
|
||||
icon_state = "valve_1"
|
||||
else
|
||||
icon_state = "valve"
|
||||
|
||||
/obj/item/transfer_valve/update_overlays()
|
||||
. = ..()
|
||||
underlays.Cut()
|
||||
if(!tank_one && !tank_two && !attached_device)
|
||||
return
|
||||
icon_state = "valve"
|
||||
|
||||
if(tank_one)
|
||||
overlays += "[tank_one.icon_state]"
|
||||
. += "[tank_one.icon_state]"
|
||||
if(tank_two)
|
||||
var/icon/J = new(icon, icon_state = "[tank_two.icon_state]")
|
||||
J.Shift(WEST, 13)
|
||||
underlays += J
|
||||
if(attached_device)
|
||||
overlays += "device"
|
||||
. += "device"
|
||||
|
||||
/obj/item/transfer_valve/proc/merge_gases()
|
||||
tank_two.air_contents.volume += tank_one.air_contents.volume
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
max_integrity = 40
|
||||
resistance_flags = FLAMMABLE
|
||||
custom_fire_overlay = "fire"
|
||||
var/rolled = FALSE
|
||||
|
||||
/obj/item/flag/attackby(obj/item/W, mob/user, params)
|
||||
@@ -29,18 +30,16 @@
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/flag/update_icon()
|
||||
overlays.Cut()
|
||||
/obj/item/flag/update_icon_state()
|
||||
updateFlagIcon()
|
||||
item_state = icon_state
|
||||
if(rolled)
|
||||
icon_state = "[icon_state]_rolled"
|
||||
custom_fire_overlay = "fire_rolled"
|
||||
else
|
||||
custom_fire_overlay = initial(custom_fire_overlay)
|
||||
if(resistance_flags & ON_FIRE)
|
||||
item_state = "[item_state]_fire"
|
||||
if((resistance_flags & ON_FIRE) && rolled)
|
||||
overlays += image('icons/obj/flag.dmi', src , "fire_rolled")
|
||||
else if((resistance_flags & ON_FIRE) && !rolled)
|
||||
overlays += image('icons/obj/flag.dmi', src , "fire")
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_r_hand()
|
||||
|
||||
@@ -41,16 +41,18 @@
|
||||
GLOB.poi_list -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/his_grace/update_icon()
|
||||
/obj/item/his_grace/update_icon_state()
|
||||
icon_state = ascended ? "gold" : "green"
|
||||
item_state = ascended ? "toolbox_gold" : "artistic_toolbox"
|
||||
cut_overlays()
|
||||
|
||||
/obj/item/his_grace/update_overlays()
|
||||
. = ..()
|
||||
if(ascended)
|
||||
add_overlay("triple_latch")
|
||||
. += "triple_latch"
|
||||
else if(awakened)
|
||||
add_overlay("single_latch_open")
|
||||
. += "single_latch_open"
|
||||
else
|
||||
add_overlay("single_latch")
|
||||
. += "single_latch"
|
||||
|
||||
/obj/item/his_grace/attack_self(mob/living/user)
|
||||
if(!awakened)
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
/obj/item/robot_parts/robot_suit/New()
|
||||
..()
|
||||
updateicon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/robot_parts/robot_suit/Destroy()
|
||||
QDEL_NULL(l_arm)
|
||||
@@ -117,20 +117,20 @@
|
||||
/obj/item/robot_parts/robot_suit/attack_self(mob/user)
|
||||
return
|
||||
|
||||
/obj/item/robot_parts/robot_suit/proc/updateicon()
|
||||
overlays.Cut()
|
||||
/obj/item/robot_parts/robot_suit/update_overlays()
|
||||
. = ..()
|
||||
if(l_arm)
|
||||
overlays += "l_arm+o"
|
||||
. += "l_arm+o"
|
||||
if(r_arm)
|
||||
overlays += "r_arm+o"
|
||||
. += "r_arm+o"
|
||||
if(chest)
|
||||
overlays += "chest+o"
|
||||
. += "chest+o"
|
||||
if(l_leg)
|
||||
overlays += "l_leg+o"
|
||||
. += "l_leg+o"
|
||||
if(r_leg)
|
||||
overlays += "r_leg+o"
|
||||
. += "r_leg+o"
|
||||
if(head)
|
||||
overlays += "head+o"
|
||||
. += "head+o"
|
||||
|
||||
/obj/item/robot_parts/robot_suit/proc/check_completion()
|
||||
if(l_arm && r_arm)
|
||||
@@ -158,7 +158,7 @@
|
||||
user.drop_item()
|
||||
W.forceMove(src)
|
||||
l_leg = W
|
||||
updateicon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
if(istype(W, /obj/item/robot_parts/r_leg))
|
||||
if(r_leg)
|
||||
@@ -166,7 +166,7 @@
|
||||
user.drop_item()
|
||||
W.forceMove(src)
|
||||
r_leg = W
|
||||
updateicon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
if(istype(W, /obj/item/robot_parts/l_arm))
|
||||
if(l_arm)
|
||||
@@ -174,7 +174,7 @@
|
||||
user.drop_item()
|
||||
W.forceMove(src)
|
||||
l_arm = W
|
||||
updateicon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
if(istype(W, /obj/item/robot_parts/r_arm))
|
||||
if(r_arm)
|
||||
@@ -182,7 +182,7 @@
|
||||
user.drop_item()
|
||||
W.forceMove(src)
|
||||
r_arm = W
|
||||
updateicon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
if(istype(W, /obj/item/robot_parts/chest))
|
||||
var/obj/item/robot_parts/chest/CH = W
|
||||
@@ -192,7 +192,7 @@
|
||||
user.drop_item()
|
||||
W.forceMove(src)
|
||||
chest = W
|
||||
updateicon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
else if(!CH.wired)
|
||||
to_chat(user, "<span class='notice'>You need to attach wires to it first!</span>")
|
||||
else
|
||||
@@ -206,7 +206,7 @@
|
||||
user.drop_item()
|
||||
W.forceMove(src)
|
||||
head = W
|
||||
updateicon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You need to attach a flash to it first!</span>")
|
||||
|
||||
|
||||
@@ -39,11 +39,11 @@
|
||||
/obj/item/borg/upgrade/proc/pre_install_checks(mob/living/silicon/robot/R)
|
||||
if(R.stat == DEAD)
|
||||
to_chat(usr, "<span class='warning'>[src] will not function on a deceased cyborg.</span>")
|
||||
return FALSE
|
||||
return
|
||||
if(module_type && !istype(R.module, module_type))
|
||||
to_chat(R, "<span class='warning'>Upgrade mounting error! No suitable hardpoint detected!</span>")
|
||||
to_chat(usr, "<span class='warning'>There's no mounting point for the module!</span>")
|
||||
return FALSE
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
@@ -99,7 +99,7 @@
|
||||
/obj/item/borg/upgrade/rename/do_install(mob/living/silicon/robot/R)
|
||||
if(!R.allow_rename)
|
||||
to_chat(R, "<span class='warning'>Internal diagnostic error: incompatible upgrade module detected.</span>")
|
||||
return 0
|
||||
return
|
||||
R.notify_ai(3, R.name, heldname)
|
||||
R.name = heldname
|
||||
R.custom_name = heldname
|
||||
@@ -116,7 +116,7 @@
|
||||
/obj/item/borg/upgrade/restart/do_install(mob/living/silicon/robot/R)
|
||||
if(R.health < 0)
|
||||
to_chat(usr, "<span class='warning'>You have to repair the cyborg before using this module!</span>")
|
||||
return 0
|
||||
return
|
||||
|
||||
if(!R.key)
|
||||
for(var/mob/dead/observer/ghost in GLOB.player_list)
|
||||
@@ -286,7 +286,7 @@
|
||||
var/obj/item/borg/upgrade/selfrepair/U = locate() in R
|
||||
if(U)
|
||||
to_chat(usr, "<span class='warning'>This unit is already equipped with a self-repair module.</span>")
|
||||
return 0
|
||||
return
|
||||
|
||||
cyborg = R
|
||||
icon_state = "selfrepair_off"
|
||||
@@ -308,9 +308,9 @@
|
||||
else
|
||||
to_chat(cyborg, "<span class='notice'>You deactivate the self-repair module.</span>")
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/update_icon()
|
||||
/obj/item/borg/upgrade/selfrepair/update_icon_state()
|
||||
if(cyborg)
|
||||
icon_state = "selfrepair_[on ? "on" : "off"]"
|
||||
for(var/X in actions)
|
||||
@@ -322,7 +322,7 @@
|
||||
/obj/item/borg/upgrade/selfrepair/proc/deactivate()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
on = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/process()
|
||||
if(!repair_tick)
|
||||
|
||||
@@ -43,7 +43,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
|
||||
is_cyborg = TRUE
|
||||
materials = list()
|
||||
|
||||
/obj/item/stack/rods/cyborg/update_icon()
|
||||
/obj/item/stack/rods/cyborg/update_icon_state()
|
||||
return // icon_state should always be a full stack of rods.
|
||||
|
||||
/obj/item/stack/rods/ten
|
||||
@@ -58,9 +58,9 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
|
||||
/obj/item/stack/rods/New(loc, amount=null)
|
||||
..()
|
||||
recipes = GLOB.rod_recipes
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/stack/rods/update_icon()
|
||||
/obj/item/stack/rods/update_icon_state()
|
||||
var/amount = get_amount()
|
||||
if((amount <= 5) && (amount > 0))
|
||||
icon_state = "rods-[amount]"
|
||||
|
||||
@@ -199,11 +199,7 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( \
|
||||
D.armor = D.armor.setRating(bullet_value = min(D.armor.getRating(BULLET) + 5, 50))
|
||||
D.armor = D.armor.setRating(laser_value = min(D.armor.getRating(LASER) + 5, 50))
|
||||
to_chat(user, "<span class='info'>You strengthen [target], improving its resistance against melee attacks.</span>")
|
||||
D.update_icon()
|
||||
if(D.hides == 3)
|
||||
D.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
|
||||
D.desc = "Autonomous Power Loader Unit. Its armour is enhanced with some goliath hide plates."
|
||||
D.update_appearance(UPDATE_DESC|UPDATE_OVERLAYS)
|
||||
use(1)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't improve [D] any further!</span>")
|
||||
|
||||
@@ -170,15 +170,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>There's not enough fuel in [A] to refuel [src]!</span>")
|
||||
|
||||
/obj/item/weldingtool/proc/update_torch()
|
||||
overlays.Cut()
|
||||
if(tool_enabled)
|
||||
overlays += "[initial(icon_state)]-on"
|
||||
item_state = "[initial(item_state)]1"
|
||||
else
|
||||
item_state = "[initial(item_state)]"
|
||||
|
||||
/obj/item/weldingtool/update_icon()
|
||||
/obj/item/weldingtool/update_icon_state()
|
||||
if(low_fuel_changes_icon)
|
||||
var/ratio = GET_FUEL / maximum_fuel
|
||||
ratio = CEILING(ratio*4, 1) * 25
|
||||
@@ -186,8 +178,15 @@
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)][ratio]"
|
||||
update_torch()
|
||||
..()
|
||||
if(tool_enabled)
|
||||
item_state = "[initial(item_state)]1"
|
||||
else
|
||||
item_state = "[initial(item_state)]"
|
||||
|
||||
/obj/item/weldingtool/update_overlays()
|
||||
. = ..()
|
||||
if(tool_enabled)
|
||||
. += "[initial(icon_state)]-on"
|
||||
|
||||
/obj/item/weldingtool/cyborg_recharge(coeff, emagged)
|
||||
if(reagents.check_and_add("fuel", maximum_fuel, 2 * coeff))
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/toy/balloon/update_icon()
|
||||
/obj/item/toy/balloon/update_icon_state()
|
||||
if(src.reagents.total_volume >= 1)
|
||||
icon_state = "waterballoon"
|
||||
item_state = "waterballoon"
|
||||
@@ -772,21 +772,20 @@
|
||||
|
||||
/obj/item/toy/windup_toolbox/Initialize(mapload)
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/toy/windup_toolbox/update_icon()
|
||||
..()
|
||||
cut_overlays()
|
||||
/obj/item/toy/windup_toolbox/update_overlays()
|
||||
. = ..()
|
||||
if(active)
|
||||
add_overlay("single_latch_open")
|
||||
. += "single_latch_open"
|
||||
else
|
||||
add_overlay("single_latch")
|
||||
. += "single_latch"
|
||||
|
||||
/obj/item/toy/windup_toolbox/attack_self(mob/user)
|
||||
if(!active)
|
||||
to_chat(user, "<span class='notice'>You wind up [src], it begins to rumble.</span>")
|
||||
active = TRUE
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
playsound(src, 'sound/effects/pope_entry.ogg', 100)
|
||||
animate_rumble(src)
|
||||
addtimer(CALLBACK(src, .proc/stopRumble), 60 SECONDS)
|
||||
@@ -795,7 +794,7 @@
|
||||
|
||||
/obj/item/toy/windup_toolbox/proc/stopRumble()
|
||||
active = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
visible_message("<span class='warning'>[src] slowly stops rattling and falls still, its latch snapping shut.</span>") //subtle difference
|
||||
playsound(loc, 'sound/weapons/batonextend.ogg', 100, TRUE)
|
||||
animate(src, transform = matrix())
|
||||
@@ -1113,7 +1112,7 @@
|
||||
wieldsound = 'sound/weapons/chainsawstart.ogg'
|
||||
attack_verb = list("sawed", "cut", "hacked", "carved", "cleaved", "butchered", "felled", "timbered")
|
||||
|
||||
/obj/item/twohanded/toy/chainsaw/update_icon()
|
||||
/obj/item/twohanded/toy/chainsaw/update_icon_state()
|
||||
if(wielded)
|
||||
icon_state = "chainsaw[wielded]"
|
||||
else
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
loaded.amount = amount
|
||||
else
|
||||
return
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
to_chat(user, "<span class='notice'>You add the cables to [src]. It now contains [loaded.amount].</span>")
|
||||
else
|
||||
..()
|
||||
@@ -58,7 +58,7 @@
|
||||
loaded.forceMove(user.loc)
|
||||
user.put_in_hands(loaded)
|
||||
loaded = null
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/twohanded/rcl/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -71,7 +71,7 @@
|
||||
active = FALSE
|
||||
return ..()
|
||||
|
||||
/obj/item/twohanded/rcl/update_icon()
|
||||
/obj/item/twohanded/rcl/update_icon_state()
|
||||
if(!loaded)
|
||||
icon_state = "rcl-0"
|
||||
item_state = "rcl-0"
|
||||
@@ -89,10 +89,9 @@
|
||||
else
|
||||
icon_state = "rcl-0"
|
||||
item_state = "rcl-0"
|
||||
..()
|
||||
|
||||
/obj/item/twohanded/rcl/proc/is_empty(mob/user, loud = 1)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
if(!loaded || !loaded.amount)
|
||||
if(loud)
|
||||
to_chat(user, "<span class='notice'>The last of the cables unreel from [src].</span>")
|
||||
@@ -151,4 +150,4 @@
|
||||
loaded = new()
|
||||
loaded.max_amount = max_amount
|
||||
loaded.amount = max_amount
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
@@ -16,10 +16,9 @@
|
||||
|
||||
/obj/item/stack/spacecash/New(loc, amt = null)
|
||||
..()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/stack/spacecash/update_icon()
|
||||
..()
|
||||
/obj/item/stack/spacecash/update_icon_state()
|
||||
name = "[amount == max_amount ? "1000000" : amount] Credit[amount > 1 ? "s" : ""]"
|
||||
if(amount >= 1 && amount < 10)
|
||||
icon_state = "cashgreen"
|
||||
|
||||
@@ -63,8 +63,8 @@
|
||||
TED = new(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/gun/energy/chrono_gun/update_icon()
|
||||
return
|
||||
/obj/item/gun/energy/chrono_gun/update_overlays()
|
||||
return list()
|
||||
|
||||
/obj/item/gun/energy/chrono_gun/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override, bonus_spread = 0)
|
||||
if(field)
|
||||
@@ -177,7 +177,7 @@
|
||||
cached_icon.Insert(mob_icon, "frame[i]")
|
||||
|
||||
mob_underlay = mutable_appearance(cached_icon, "frame1")
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
desc = initial(desc) + "<br><span class='info'>It appears to contain [target.name].</span>"
|
||||
START_PROCESSING(SSobj, src)
|
||||
@@ -188,7 +188,7 @@
|
||||
gun.field_disconnect(src)
|
||||
return ..()
|
||||
|
||||
/obj/structure/chrono_field/update_icon()
|
||||
/obj/structure/chrono_field/update_icon_state()
|
||||
var/ttk_frame = 1 - (tickstokill / initial(tickstokill))
|
||||
ttk_frame = clamp(CEILING(ttk_frame * CHRONO_FRAME_COUNT, 1), 1, CHRONO_FRAME_COUNT)
|
||||
if(ttk_frame != RPpos)
|
||||
@@ -217,7 +217,7 @@
|
||||
captured.Paralyse(8 SECONDS)
|
||||
if(captured.loc != src)
|
||||
captured.forceMove(src)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
if(gun)
|
||||
if(gun.field_check(src))
|
||||
tickstokill--
|
||||
|
||||
@@ -33,17 +33,16 @@
|
||||
/obj/item/defibrillator/Initialize(mapload) //starts without a cell for rnd
|
||||
. = ..()
|
||||
paddles = new paddle_type(src)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/defibrillator/loaded/Initialize(mapload) //starts with hicap
|
||||
. = ..()
|
||||
cell = new(src)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/defibrillator/update_icon()
|
||||
/obj/item/defibrillator/update_icon(updates=ALL)
|
||||
update_power()
|
||||
update_overlays()
|
||||
update_charge()
|
||||
..()
|
||||
|
||||
/obj/item/defibrillator/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -58,28 +57,25 @@
|
||||
else
|
||||
powered = FALSE
|
||||
|
||||
/obj/item/defibrillator/proc/update_overlays()
|
||||
overlays.Cut()
|
||||
/obj/item/defibrillator/update_overlays()
|
||||
. = ..()
|
||||
if(paddles_on_defib)
|
||||
overlays += "[icon_state]-paddles"
|
||||
if(powered)
|
||||
overlays += "[icon_state]-powered"
|
||||
if(!cell)
|
||||
overlays += "[icon_state]-nocell"
|
||||
. += "[icon_state]-paddles"
|
||||
if(!safety)
|
||||
overlays += "[icon_state]-emagged"
|
||||
|
||||
/obj/item/defibrillator/proc/update_charge()
|
||||
if(powered) //so it doesn't show charge if it's unpowered
|
||||
if(cell)
|
||||
var/ratio = cell.charge / cell.maxcharge
|
||||
ratio = CEILING(ratio*4, 1) * 25
|
||||
overlays += "[icon_state]-charge[ratio]"
|
||||
. += "[icon_state]-emagged"
|
||||
if(powered)
|
||||
. += "[icon_state]-powered"
|
||||
if(powered && cell)
|
||||
var/ratio = cell.charge / cell.maxcharge
|
||||
ratio = CEILING(ratio*4, 1) * 25
|
||||
. += "[icon_state]-charge[ratio]"
|
||||
if(!cell)
|
||||
. += "[icon_state]-nocell"
|
||||
|
||||
/obj/item/defibrillator/CheckParts(list/parts_list)
|
||||
..()
|
||||
cell = locate(/obj/item/stock_parts/cell) in contents
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/defibrillator/ui_action_click()
|
||||
toggle_paddles()
|
||||
@@ -109,7 +105,7 @@
|
||||
cell = null
|
||||
to_chat(user, "<span class='notice'>You remove the cell from [src].</span>")
|
||||
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
return
|
||||
|
||||
/obj/item/defibrillator/emag_act(user as mob)
|
||||
@@ -131,7 +127,7 @@
|
||||
safety = TRUE
|
||||
visible_message("<span class='notice'>[src] beeps: Safety protocols enabled!</span>")
|
||||
playsound(get_turf(src), 'sound/machines/defib_saftyon.ogg', 50, 0)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
..()
|
||||
|
||||
/obj/item/defibrillator/verb/toggle_paddles()
|
||||
@@ -146,7 +142,7 @@
|
||||
|
||||
if(!usr.put_in_hands(paddles))
|
||||
to_chat(user, "<span class='warning'>You need a free hand to hold the paddles!</span>")
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
return
|
||||
paddles.loc = user
|
||||
paddles_on_defib = FALSE
|
||||
@@ -154,7 +150,7 @@
|
||||
//Remove from their hands and back onto the defib unit
|
||||
remove_paddles(user)
|
||||
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
@@ -163,7 +159,7 @@
|
||||
..()
|
||||
if(slot != slot_back)
|
||||
remove_paddles(user)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/defibrillator/item_action_slot_check(slot, mob/user)
|
||||
if(slot == slot_back)
|
||||
@@ -174,7 +170,7 @@
|
||||
if(paddles in get_both_hands(M))
|
||||
M.unEquip(paddles)
|
||||
paddles_on_defib = TRUE
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
return
|
||||
|
||||
/obj/item/defibrillator/Destroy()
|
||||
@@ -189,12 +185,12 @@
|
||||
if(cell)
|
||||
if(cell.charge < (paddles.revivecost+chrgdeductamt))
|
||||
powered = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
if(cell.use(chrgdeductamt))
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
return TRUE
|
||||
else
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
return FALSE
|
||||
|
||||
/obj/item/defibrillator/proc/cooldowncheck(mob/user)
|
||||
@@ -207,8 +203,8 @@
|
||||
user.visible_message("<span class='notice'>[src] beeps: Charge depleted.</span>")
|
||||
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
paddles.cooldown = FALSE
|
||||
paddles.update_icon()
|
||||
update_icon()
|
||||
paddles.update_icon(UPDATE_ICON_STATE)
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/defibrillator/compact
|
||||
name = "compact defibrillator"
|
||||
@@ -223,7 +219,7 @@
|
||||
/obj/item/defibrillator/compact/loaded/Initialize(mapload)
|
||||
. = ..()
|
||||
cell = new(src)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/defibrillator/compact/item_action_slot_check(slot, mob/user)
|
||||
if(slot == slot_belt)
|
||||
@@ -242,7 +238,7 @@
|
||||
/obj/item/defibrillator/compact/combat/loaded/Initialize(mapload)
|
||||
. = ..()
|
||||
cell = new(src)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/defibrillator/compact/advanced
|
||||
name = "advanced compact defibrillator"
|
||||
@@ -260,12 +256,12 @@
|
||||
if(W == paddles)
|
||||
paddles.unwield()
|
||||
toggle_paddles()
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/defibrillator/compact/advanced/loaded/Initialize(mapload)
|
||||
. = ..()
|
||||
cell = new /obj/item/stock_parts/cell/bluespace/charging(src)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/defibrillator/compact/advanced/emp_act(severity)
|
||||
if(world.time > next_emp_message)
|
||||
@@ -277,7 +273,7 @@
|
||||
if(W == paddles)
|
||||
paddles.unwield()
|
||||
toggle_paddles()
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
return
|
||||
|
||||
//paddles
|
||||
@@ -306,10 +302,10 @@
|
||||
defib = mainunit
|
||||
loc = defib
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return
|
||||
|
||||
/obj/item/twohanded/shockpaddles/update_icon()
|
||||
/obj/item/twohanded/shockpaddles/update_icon_state()
|
||||
icon_state = "[base_icon_state][wielded]"
|
||||
item_state = "[base_icon_state][wielded]"
|
||||
if(cooldown)
|
||||
@@ -330,8 +326,8 @@
|
||||
to_chat(user, "<span class='notice'>The paddles snap back into the main unit.</span>")
|
||||
defib.paddles_on_defib = TRUE
|
||||
loc = defib
|
||||
defib.update_icon()
|
||||
update_icon()
|
||||
defib.update_icon(UPDATE_OVERLAYS)
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
unwield(user)
|
||||
|
||||
/obj/item/twohanded/shockpaddles/on_mob_move(dir, mob/user)
|
||||
@@ -384,12 +380,12 @@
|
||||
defib.deductcharge(revivecost)
|
||||
cooldown = TRUE
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
defib.cooldowncheck(user)
|
||||
return
|
||||
user.visible_message("<span class='warning'>[user] begins to place [src] on [M.name]'s chest.</span>", "<span class='warning'>You begin to place [src] on [M.name]'s chest.</span>")
|
||||
busy = TRUE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
var/mob/dead/observer/ghost = H.get_ghost(TRUE)
|
||||
if(ghost && ghost.can_reenter_corpse)
|
||||
to_chat(ghost, "<span class='ghostalert'>Your heart is being defibrillated. Return to your body if you want to be revived!</span> (Verbs -> Ghost -> Re-enter corpse)")
|
||||
@@ -415,14 +411,14 @@
|
||||
user.visible_message("<span class='notice'>[defib] buzzes: Patient's chest is obscured. Operation aborted.</span>")
|
||||
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return
|
||||
if(H.undergoing_cardiac_arrest())
|
||||
if(!H.get_int_organ(/obj/item/organ/internal/heart) && !H.get_int_organ(/obj/item/organ/internal/brain/slime)) //prevents defibing someone still alive suffering from a heart attack attack if they lack a heart
|
||||
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Failed to pick up any heart electrical activity.</span>")
|
||||
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return
|
||||
else
|
||||
var/obj/item/organ/internal/heart/heart = H.get_int_organ(/obj/item/organ/internal/heart)
|
||||
@@ -430,7 +426,7 @@
|
||||
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Heart necrosis detected.</span>")
|
||||
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return
|
||||
H.set_heartattack(FALSE)
|
||||
SEND_SIGNAL(H, COMSIG_LIVING_MINOR_SHOCK, 100)
|
||||
@@ -442,7 +438,7 @@
|
||||
defib.deductcharge(revivecost)
|
||||
busy = FALSE
|
||||
cooldown = TRUE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
defib.cooldowncheck(user)
|
||||
return
|
||||
if(H.stat == DEAD)
|
||||
@@ -497,14 +493,14 @@
|
||||
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed.</span>")
|
||||
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
defib.deductcharge(revivecost)
|
||||
update_icon()
|
||||
cooldown = TRUE
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
defib.cooldowncheck(user)
|
||||
else
|
||||
user.visible_message("<span class='notice'>[defib] buzzes: Patient is not in a valid state. Operation aborted.</span>")
|
||||
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/borg_defib
|
||||
name = "defibrillator paddles"
|
||||
@@ -551,10 +547,10 @@
|
||||
R.cell.use(revivecost)
|
||||
cooldown = TRUE
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
spawn(50)
|
||||
cooldown = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return
|
||||
user.visible_message("<span class='warning'>[user] begins to place [src] on [M.name]'s chest.</span>", "<span class='warning'>You begin to place [src] on [M.name]'s chest.</span>")
|
||||
busy = TRUE
|
||||
@@ -619,16 +615,16 @@
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
R.cell.use(revivecost)
|
||||
update_icon()
|
||||
cooldown = TRUE
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
spawn(50)
|
||||
cooldown = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] buzzes: Patient is not in a valid state. Operation aborted.</span>")
|
||||
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/twohanded/shockpaddles/syndicate
|
||||
name = "combat defibrillator paddles"
|
||||
|
||||
@@ -304,8 +304,8 @@
|
||||
icon_state = "d100"
|
||||
sides = 100
|
||||
|
||||
/obj/item/dice/d100/update_icon()
|
||||
return
|
||||
/obj/item/dice/d100/update_overlays()
|
||||
return list()
|
||||
|
||||
/obj/item/dice/d20/e20
|
||||
var/triggered = FALSE
|
||||
@@ -333,7 +333,7 @@
|
||||
comment = "NAT 20!"
|
||||
else if(sides == 20 && result == 1)
|
||||
comment = "Ouch, bad luck."
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
if(initial(icon_state) == "d00")
|
||||
result = (result - 1) * 10
|
||||
if(length(special_faces) == sides)
|
||||
@@ -375,9 +375,9 @@
|
||||
log_game("E20 detonated at [A.name] ([epicenter.x],[epicenter.y],[epicenter.z]) with a roll of [actual_result]. Triggered by: [key_name(user)]")
|
||||
add_attack_logs(user, src, "detonated with a roll of [actual_result]", ATKLOG_FEW)
|
||||
|
||||
/obj/item/dice/update_icon()
|
||||
overlays.Cut()
|
||||
overlays += "[icon_state][result]"
|
||||
/obj/item/dice/update_overlays()
|
||||
. = ..()
|
||||
. += "[icon_state][result]"
|
||||
|
||||
/obj/item/storage/box/dice
|
||||
name = "Box of dice"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
icon_state = "lepopen"
|
||||
var/used = FALSE
|
||||
|
||||
/obj/item/dnascrambler/update_icon()
|
||||
/obj/item/dnascrambler/update_icon_state()
|
||||
if(used)
|
||||
icon_state = "lepopen0"
|
||||
else
|
||||
@@ -52,5 +52,5 @@
|
||||
|
||||
add_attack_logs(user, target, "injected with [src]")
|
||||
used = TRUE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
name = "used " + name
|
||||
|
||||
@@ -33,14 +33,14 @@
|
||||
assemblyattacher = user.ckey
|
||||
to_chat(user, "<span class='notice'>You add [A] to [src].</span>")
|
||||
playsound(src, 'sound/weapons/tap.ogg', 20, 1)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return
|
||||
if(nadeassembly && istype(I, /obj/item/wirecutters))
|
||||
playsound(src, I.usesound, 20, 1)
|
||||
nadeassembly.loc = get_turf(src)
|
||||
nadeassembly.master = null
|
||||
nadeassembly = null
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -80,16 +80,16 @@
|
||||
if(do_after(user, 50 * toolspeed, target = AM))
|
||||
if(!user.unEquip(src))
|
||||
return
|
||||
src.target = AM
|
||||
target = AM
|
||||
loc = null
|
||||
|
||||
message_admins("[key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) planted [src.name] on [target.name] at ([target.x],[target.y],[target.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[target.x];Y=[target.y];Z=[target.z]'>JMP</a>) with [det_time] second fuse",0,1)
|
||||
log_game("[key_name(user)] planted [name] on [target.name] at ([target.x],[target.y],[target.z]) with [det_time] second fuse")
|
||||
|
||||
target.overlays += image_overlay
|
||||
AddComponent(/datum/component/persistent_overlay, image_overlay, target)
|
||||
if(!nadeassembly)
|
||||
to_chat(user, "<span class='notice'>You plant the bomb. Timer counting down from [det_time].</span>")
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time*10)
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time SECONDS)
|
||||
|
||||
/obj/item/grenade/plastic/suicide_act(mob/user)
|
||||
message_admins("[key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) suicided with [src.name] at ([user.x],[user.y],[user.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",0,1)
|
||||
@@ -120,7 +120,7 @@
|
||||
user.gib()
|
||||
return OBLITERATION
|
||||
|
||||
/obj/item/grenade/plastic/update_icon()
|
||||
/obj/item/grenade/plastic/update_icon_state()
|
||||
if(nadeassembly)
|
||||
icon_state = "[item_state]1"
|
||||
else
|
||||
@@ -153,7 +153,6 @@
|
||||
if(target)
|
||||
if(!QDELETED(target))
|
||||
location = get_turf(target)
|
||||
target.overlays -= image_overlay
|
||||
if(!ex_breach && istype(target, /turf/simulated/wall)) //Walls get dismantled instead of destroyed to avoid making unwanted holes to space.
|
||||
var/turf/simulated/wall/W = target
|
||||
W.dismantle_wall(TRUE, TRUE)
|
||||
@@ -219,7 +218,6 @@
|
||||
if(target)
|
||||
if(!QDELETED(target))
|
||||
location = get_turf(target)
|
||||
target.overlays -= image_overlay
|
||||
else
|
||||
location = get_turf(src)
|
||||
if(location)
|
||||
|
||||
@@ -48,14 +48,8 @@
|
||||
igniter.flamethrower_process(location)
|
||||
|
||||
|
||||
/obj/item/flamethrower/update_icon()
|
||||
cut_overlays()
|
||||
if(igniter)
|
||||
add_overlay("+igniter[status]")
|
||||
if(ptank)
|
||||
add_overlay("+ptank")
|
||||
/obj/item/flamethrower/update_icon_state()
|
||||
if(lit)
|
||||
add_overlay("+lit")
|
||||
item_state = "flamethrower_1"
|
||||
else
|
||||
item_state = "flamethrower_0"
|
||||
@@ -64,6 +58,15 @@
|
||||
M.update_inv_l_hand()
|
||||
M.update_inv_r_hand()
|
||||
|
||||
/obj/item/flamethrower/update_overlays()
|
||||
. = ..()
|
||||
if(igniter)
|
||||
. += "+igniter[status]"
|
||||
if(ptank)
|
||||
. += "+ptank"
|
||||
if(lit)
|
||||
. += "+lit"
|
||||
|
||||
/obj/item/flamethrower/can_enter_storage(obj/item/storage/S, mob/user)
|
||||
if(lit)
|
||||
to_chat(user, "<span class='warning'>[S] can't hold [src] while it's lit!</span>")
|
||||
|
||||
@@ -10,32 +10,24 @@
|
||||
icon_state = "garrot_wrap"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/mob/living/carbon/human/strangling
|
||||
var/improvised = 0
|
||||
var/improvised = FALSE
|
||||
var/garrote_time
|
||||
|
||||
/obj/item/twohanded/garrote/Destroy()
|
||||
strangling = null
|
||||
return ..()
|
||||
|
||||
/obj/item/twohanded/garrote/update_icon()
|
||||
/obj/item/twohanded/garrote/update_icon_state()
|
||||
if(strangling) // If we're strangling someone we want our icon to stay wielded
|
||||
icon_state = "garrot_unwrap"
|
||||
return
|
||||
|
||||
icon_state = "garrot_[wielded ? "un" : ""]wrap"
|
||||
icon_state = "garrot_[improvised ? "I_" : ""]unwrap"
|
||||
else
|
||||
icon_state = "garrot_[improvised ? "I_" : ""][wielded ? "un" : ""]wrap"
|
||||
|
||||
/obj/item/twohanded/garrote/improvised // Made via tablecrafting
|
||||
name = "garrote"
|
||||
desc = "A length of cable with a shoddily-carved wooden handle tied to either end.<br>You suspect you'd have to be behind the target to use this weapon effectively."
|
||||
icon_state = "garrot_I_wrap"
|
||||
improvised = 1
|
||||
|
||||
/obj/item/twohanded/garrote/improvised/update_icon()
|
||||
if(strangling)
|
||||
icon_state = "garrot_I_unwrap"
|
||||
return
|
||||
|
||||
icon_state = "garrot_I_[wielded ? "un" : ""]wrap"
|
||||
improvised = TRUE
|
||||
|
||||
/obj/item/twohanded/garrote/wield(mob/living/carbon/user)
|
||||
if(strangling)
|
||||
@@ -43,7 +35,7 @@
|
||||
"<span class='warning'>You remove [src] from [strangling]'s neck.</span>")
|
||||
|
||||
strangling = null
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
else
|
||||
@@ -99,7 +91,7 @@
|
||||
garrote_time = world.time + 10
|
||||
START_PROCESSING(SSobj, src)
|
||||
strangling = M
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
playsound(src.loc, 'sound/weapons/cablecuff.ogg', 15, 1, -1)
|
||||
|
||||
@@ -112,14 +104,14 @@
|
||||
/obj/item/twohanded/garrote/process()
|
||||
if(!strangling)
|
||||
// Our mark got gibbed or similar
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
|
||||
|
||||
if(!istype(loc, /mob/living/carbon/human))
|
||||
strangling = null
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
|
||||
@@ -137,7 +129,7 @@
|
||||
"<span class='warning'>You lose your grip on [strangling]'s neck.</span>")
|
||||
|
||||
strangling = null
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
return
|
||||
@@ -147,7 +139,7 @@
|
||||
"<span class='warning'>You lose your grip on [strangling]'s neck.</span>")
|
||||
|
||||
strangling = null
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
return
|
||||
|
||||
@@ -50,22 +50,10 @@
|
||||
return O
|
||||
return null
|
||||
|
||||
|
||||
/obj/item/grenade/chem_grenade/proc/update_overlays()
|
||||
underlays = list()
|
||||
if(nadeassembly)
|
||||
underlays += "[nadeassembly.a_left.icon_state]_left"
|
||||
for(var/O in nadeassembly.a_left.attached_overlays)
|
||||
underlays += "[O]_l"
|
||||
underlays += "[nadeassembly.a_right.icon_state]_right"
|
||||
for(var/O in nadeassembly.a_right.attached_overlays)
|
||||
underlays += "[O]_r"
|
||||
|
||||
/obj/item/grenade/chem_grenade/update_icon()
|
||||
/obj/item/grenade/chem_grenade/update_icon_state()
|
||||
if(nadeassembly)
|
||||
icon = 'icons/obj/assemblies/new_assemblies.dmi'
|
||||
icon_state = bomb_state
|
||||
update_overlays()
|
||||
var/obj/item/assembly/A = get_trigger()
|
||||
if(stage != READY)
|
||||
name = "bomb casing[label]"
|
||||
@@ -90,6 +78,15 @@
|
||||
else
|
||||
icon_state += "_locked"
|
||||
name = payload_name + "grenade" + label
|
||||
|
||||
underlays.Cut()
|
||||
if(nadeassembly)
|
||||
underlays += "[nadeassembly.a_left.icon_state]_left"
|
||||
for(var/O in nadeassembly.a_left.attached_overlays)
|
||||
underlays += "[O]_l"
|
||||
underlays += "[nadeassembly.a_right.icon_state]_right"
|
||||
for(var/O in nadeassembly.a_right.attached_overlays)
|
||||
underlays += "[O]_r"
|
||||
|
||||
|
||||
/obj/item/grenade/chem_grenade/attack_self(mob/user)
|
||||
@@ -98,7 +95,7 @@
|
||||
var/area/A = get_area(bombturf)
|
||||
if(nadeassembly)
|
||||
nadeassembly.attack_self(user)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
else if(clown_check(user))
|
||||
// This used to go before the assembly check, but that has absolutely zero to do with priming the damn thing. You could spam the admins with it.
|
||||
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) [contained].")
|
||||
@@ -133,7 +130,7 @@
|
||||
else
|
||||
if(label)
|
||||
label = null
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
to_chat(user, "You remove the label from [src].")
|
||||
return 1
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
@@ -142,7 +139,7 @@
|
||||
to_chat(user, "<span class='notice'>You lock the assembly.</span>")
|
||||
playsound(loc, prime_sound, 25, -3)
|
||||
stage = READY
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
contained = ""
|
||||
cores = "" // clear them out so no recursive logging by accidentally
|
||||
for(var/obj/O in beakers)
|
||||
@@ -195,7 +192,7 @@
|
||||
assemblyattacher = user.ckey
|
||||
stage = WIRED
|
||||
to_chat(user, "<span class='notice'>You add [A] to [src]!</span>")
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
else if(stage == EMPTY && istype(I, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = I
|
||||
@@ -203,12 +200,12 @@
|
||||
|
||||
stage = WIRED
|
||||
to_chat(user, "<span class='notice'>You rig [src].</span>")
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
else if(stage == READY && istype(I, /obj/item/wirecutters))
|
||||
to_chat(user, "<span class='notice'>You unlock the assembly.</span>")
|
||||
stage = WIRED
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
else if(stage == WIRED && istype(I, /obj/item/wrench))
|
||||
to_chat(user, "<span class='notice'>You open the grenade and remove the contents.</span>")
|
||||
@@ -223,7 +220,7 @@
|
||||
for(var/obj/O in beakers)
|
||||
O.forceMove(get_turf(src))
|
||||
beakers = list()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
|
||||
//assembly stuff
|
||||
@@ -286,7 +283,7 @@
|
||||
O.forceMove(get_turf(src))
|
||||
beakers = list()
|
||||
stage = EMPTY
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return
|
||||
|
||||
if(nadeassembly)
|
||||
@@ -448,7 +445,7 @@
|
||||
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
|
||||
/obj/item/grenade/chem_grenade/firefighting
|
||||
@@ -466,7 +463,7 @@
|
||||
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/grenade/chem_grenade/incendiary
|
||||
payload_name = "incendiary"
|
||||
@@ -485,7 +482,7 @@
|
||||
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
|
||||
/obj/item/grenade/chem_grenade/antiweed
|
||||
@@ -506,7 +503,7 @@
|
||||
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
|
||||
/obj/item/grenade/chem_grenade/cleaner
|
||||
@@ -526,7 +523,7 @@
|
||||
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
|
||||
/obj/item/grenade/chem_grenade/teargas
|
||||
@@ -546,7 +543,7 @@
|
||||
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/grenade/chem_grenade/facid
|
||||
payload_name = "acid smoke"
|
||||
@@ -566,7 +563,7 @@
|
||||
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/grenade/chem_grenade/saringas
|
||||
payload_name = "sarin gas"
|
||||
@@ -585,7 +582,7 @@
|
||||
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
#undef EMPTY
|
||||
#undef WIRED
|
||||
|
||||
@@ -42,8 +42,6 @@
|
||||
/obj/item/implanter/mindshield/New()
|
||||
imp = new /obj/item/implant/mindshield(src)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/implantcase/mindshield
|
||||
name = "implant case - 'mindshield'"
|
||||
|
||||
@@ -12,18 +12,22 @@
|
||||
materials = list(MAT_GLASS=500)
|
||||
var/obj/item/implant/imp = null
|
||||
|
||||
|
||||
/obj/item/implantcase/update_icon()
|
||||
/obj/item/implantcase/proc/update_state()
|
||||
if(imp)
|
||||
icon_state = "implantcase-[imp.item_color]"
|
||||
origin_tech = imp.origin_tech
|
||||
flags = imp.flags & ~DROPDEL
|
||||
reagents = imp.reagents
|
||||
else
|
||||
icon_state = "implantcase-0"
|
||||
origin_tech = initial(origin_tech)
|
||||
flags = initial(flags)
|
||||
reagents = null
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/implantcase/update_icon_state()
|
||||
if(imp)
|
||||
icon_state = "implantcase-[imp.item_color]"
|
||||
else
|
||||
icon_state = "implantcase-0"
|
||||
|
||||
|
||||
/obj/item/implantcase/attackby(obj/item/W, mob/user, params)
|
||||
@@ -38,8 +42,8 @@
|
||||
I.imp.loc = src
|
||||
imp = I.imp
|
||||
I.imp = null
|
||||
update_icon()
|
||||
I.update_icon()
|
||||
update_state()
|
||||
I.update_icon(UPDATE_ICON_STATE)
|
||||
else
|
||||
if(imp)
|
||||
if(I.imp)
|
||||
@@ -47,8 +51,8 @@
|
||||
imp.loc = I
|
||||
I.imp = imp
|
||||
imp = null
|
||||
update_icon()
|
||||
I.update_icon()
|
||||
update_state()
|
||||
I.update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/*else if(istype(W, /obj/item/ammo_casing/shotgun/implanter))
|
||||
var/obj/item/ammo_casing/shotgun/implanter/I = W
|
||||
@@ -57,7 +61,7 @@
|
||||
|
||||
/obj/item/implantcase/New()
|
||||
..()
|
||||
update_icon()
|
||||
update_state()
|
||||
|
||||
|
||||
/obj/item/implantcase/tracking
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
var/obj/item/implant/imp = null
|
||||
|
||||
|
||||
/obj/item/implanter/update_icon()
|
||||
/obj/item/implanter/update_icon_state()
|
||||
if(imp)
|
||||
icon_state = "implanter1"
|
||||
origin_tech = imp.origin_tech
|
||||
@@ -38,7 +38,7 @@
|
||||
else
|
||||
M.visible_message("[user] has implanted [M].", "<span class='notice'>[user] implants you.</span>")
|
||||
imp = null
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/implanter/attackby(obj/item/W, mob/user, params)
|
||||
..()
|
||||
@@ -48,7 +48,7 @@
|
||||
/obj/item/implanter/New()
|
||||
..()
|
||||
spawn(1)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
|
||||
/obj/item/implanter/adrenalin
|
||||
|
||||
@@ -14,12 +14,11 @@
|
||||
dropcase()
|
||||
return ..()
|
||||
|
||||
/obj/item/implantpad/update_icon()
|
||||
/obj/item/implantpad/update_icon_state()
|
||||
if(case)
|
||||
src.icon_state = "implantpad-1"
|
||||
icon_state = "implantpad-1"
|
||||
else
|
||||
src.icon_state = "implantpad-0"
|
||||
return
|
||||
icon_state = "implantpad-0"
|
||||
|
||||
/obj/item/implantpad/proc/addcase(mob/user as mob, obj/item/implantcase/C as obj)
|
||||
if(!user || !C)
|
||||
@@ -30,7 +29,7 @@
|
||||
user.unEquip(C)
|
||||
C.forceMove(src)
|
||||
case = C
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/implantpad/proc/dropcase(mob/user as mob)
|
||||
if(!case)
|
||||
@@ -41,12 +40,12 @@
|
||||
add_fingerprint(user)
|
||||
case.add_fingerprint(user)
|
||||
case = null
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return
|
||||
|
||||
case.forceMove(get_turf(src))
|
||||
case = null
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/implantpad/verb/remove_implant()
|
||||
set category = "Object"
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/obj/item/restraints/legcuffs/beartrap/New()
|
||||
..()
|
||||
|
||||
/obj/item/restraints/legcuffs/beartrap/update_icon()
|
||||
/obj/item/restraints/legcuffs/beartrap/update_icon_state()
|
||||
icon_state = "beartrap[armed]"
|
||||
|
||||
/obj/item/restraints/legcuffs/beartrap/Destroy()
|
||||
@@ -43,7 +43,7 @@
|
||||
..()
|
||||
if(ishuman(user) && !user.stat && !user.restrained())
|
||||
armed = !armed
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
to_chat(user, "<span class='notice'>[src] is now [armed ? "armed" : "disarmed"]</span>")
|
||||
|
||||
/obj/item/restraints/legcuffs/beartrap/attackby(obj/item/I, mob/user) //Let's get explosive.
|
||||
|
||||
@@ -70,9 +70,8 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/mop/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
J.mymop = src
|
||||
J.put_in_cart(src, user)
|
||||
J.mymop=src
|
||||
J.update_icon()
|
||||
|
||||
/obj/item/mop/wash(mob/user, atom/source)
|
||||
reagents.add_reagent("water", 5)
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
possible_transfer_amounts = list(5,10,20,30,50,70)
|
||||
volume = 70
|
||||
container_type = OPENCONTAINER
|
||||
blocks_emissive = EMISSIVE_BLOCK_GENERIC
|
||||
|
||||
/obj/item/reagent_containers/glass/paint/afterattack(turf/simulated/target, mob/user, proximity)
|
||||
if(!proximity)
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
playsound(loc, 'sound/items/eatfood.ogg', 50, 1, -1)
|
||||
return TOXLOSS
|
||||
|
||||
/obj/item/storage/bag/trash/update_icon()
|
||||
/obj/item/storage/bag/trash/update_icon_state()
|
||||
switch(contents.len)
|
||||
if(21 to INFINITY)
|
||||
icon_state = "[initial(icon_state)]3"
|
||||
@@ -59,14 +59,12 @@
|
||||
var/mob/living/carbon/human/H = loc
|
||||
H.update_inv_l_hand()
|
||||
H.update_inv_r_hand()
|
||||
..()
|
||||
|
||||
/obj/item/storage/bag/trash/cyborg
|
||||
|
||||
/obj/item/storage/bag/trash/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
J.mybag = src
|
||||
J.put_in_cart(src, user)
|
||||
J.mybag=src
|
||||
J.update_icon()
|
||||
|
||||
/obj/item/storage/bag/trash/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J)
|
||||
return
|
||||
@@ -405,58 +403,51 @@
|
||||
if(prob(10))
|
||||
M.Weaken(4 SECONDS)
|
||||
|
||||
/obj/item/storage/bag/tray/proc/rebuild_overlays()
|
||||
overlays.Cut()
|
||||
/obj/item/storage/bag/tray/update_icon_state()
|
||||
return
|
||||
|
||||
/obj/item/storage/bag/tray/update_overlays()
|
||||
. = ..()
|
||||
for(var/obj/item/I in contents)
|
||||
overlays += image("icon" = I.icon, "icon_state" = I.icon_state, "layer" = -1)
|
||||
|
||||
/obj/item/storage/bag/tray/remove_from_storage(obj/item/W as obj, atom/new_location)
|
||||
..()
|
||||
rebuild_overlays()
|
||||
|
||||
/obj/item/storage/bag/tray/handle_item_insertion(obj/item/I, prevent_warning = 0)
|
||||
overlays += image("icon" = I.icon, "icon_state" = I.icon_state, "layer" = -1)
|
||||
..()
|
||||
. += image(icon = I.icon, icon_state = I.icon_state, layer = -1)
|
||||
|
||||
/obj/item/storage/bag/tray/cyborg
|
||||
|
||||
/obj/item/storage/bag/tray/cyborg/afterattack(atom/target, mob/user as mob)
|
||||
if( isturf(target) || istype(target,/obj/structure/table) )
|
||||
var/foundtable = istype(target,/obj/structure/table/)
|
||||
if( !foundtable ) //it must be a turf!
|
||||
var/found_table = istype(target,/obj/structure/table/)
|
||||
if(!found_table) //it must be a turf!
|
||||
for(var/obj/structure/table/T in target)
|
||||
foundtable = 1
|
||||
found_table = TRUE
|
||||
break
|
||||
|
||||
var/turf/dropspot
|
||||
if( !foundtable ) // don't unload things onto walls or other silly places.
|
||||
if(!found_table) // don't unload things onto walls or other silly places.
|
||||
dropspot = user.loc
|
||||
else if( isturf(target) ) // they clicked on a turf with a table in it
|
||||
dropspot = target
|
||||
else // they clicked on a table
|
||||
dropspot = target.loc
|
||||
|
||||
overlays = null
|
||||
|
||||
var/droppedSomething = 0
|
||||
var/dropped_something = FALSE
|
||||
|
||||
for(var/obj/item/I in contents)
|
||||
I.loc = dropspot
|
||||
contents.Remove(I)
|
||||
droppedSomething = 1
|
||||
if(!foundtable && isturf(dropspot))
|
||||
dropped_something = TRUE
|
||||
if(!found_table && isturf(dropspot))
|
||||
// if no table, presume that the person just shittily dropped the tray on the ground and made a mess everywhere!
|
||||
spawn()
|
||||
for(var/i = 1, i <= rand(1,2), i++)
|
||||
if(I)
|
||||
step(I, pick(NORTH,SOUTH,EAST,WEST))
|
||||
sleep(rand(2,4))
|
||||
if( droppedSomething )
|
||||
if( foundtable )
|
||||
if(dropped_something)
|
||||
if(found_table)
|
||||
user.visible_message("<span class='notice'>[user] unloads [user.p_their()] service tray.</span>")
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] drops all the items on [user.p_their()] tray.</span>")
|
||||
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -466,8 +457,8 @@
|
||||
/obj/item/storage/bag/tray/cookies_tray/populate_contents() // By Azule Utama, thank you a lot!
|
||||
for(var/i in 1 to 6)
|
||||
var/obj/item/C = new cookie(src)
|
||||
handle_item_insertion(C) // Done this way so the tray actually has the cookies visible when spawned
|
||||
rebuild_overlays()
|
||||
C.in_inventory = TRUE
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/storage/bag/tray/cookies_tray/sugarcookie
|
||||
cookie = /obj/item/reagent_containers/food/snacks/sugarcookie
|
||||
|
||||
@@ -13,14 +13,13 @@
|
||||
/// Do we have overlays for items held inside the belt?
|
||||
var/use_item_overlays = FALSE
|
||||
|
||||
/obj/item/storage/belt/update_icon()
|
||||
/obj/item/storage/belt/update_overlays()
|
||||
. = ..()
|
||||
if(use_item_overlays)
|
||||
cut_overlays()
|
||||
for(var/obj/item/I in contents)
|
||||
var/image/belt_image = image(icon, I.belt_icon)
|
||||
belt_image.color = I.color
|
||||
add_overlay(belt_image)
|
||||
..()
|
||||
. += belt_image
|
||||
|
||||
/obj/item/storage/belt/proc/can_use()
|
||||
return is_equipped()
|
||||
@@ -433,8 +432,7 @@
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/belt/lazarus/update_icon()
|
||||
..()
|
||||
/obj/item/storage/belt/lazarus/update_icon_state()
|
||||
icon_state = "[initial(icon_state)]_[length(contents)]"
|
||||
|
||||
/obj/item/storage/belt/lazarus/attackby(obj/item/I, mob/user)
|
||||
@@ -465,8 +463,7 @@
|
||||
for(var/I in 1 to 8)
|
||||
new /obj/item/ammo_casing/shotgun/beanbag(src)
|
||||
|
||||
/obj/item/storage/belt/bandolier/update_icon()
|
||||
..()
|
||||
/obj/item/storage/belt/bandolier/update_icon_state()
|
||||
icon_state = "[initial(icon_state)]_[length(contents)]"
|
||||
|
||||
/obj/item/storage/belt/bandolier/attackby(obj/item/I, mob/user)
|
||||
@@ -611,13 +608,13 @@
|
||||
return
|
||||
playsound(src, 'sound/weapons/blade_unsheath.ogg', 20)
|
||||
|
||||
/obj/item/storage/belt/rapier/update_icon()
|
||||
. = ..()
|
||||
icon_state = initial(icon_state)
|
||||
item_state = initial(item_state)
|
||||
/obj/item/storage/belt/rapier/update_icon_state()
|
||||
if(length(contents))
|
||||
icon_state = "[icon_state]-rapier"
|
||||
item_state = "[item_state]-rapier"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
item_state = initial(item_state)
|
||||
if(isliving(loc))
|
||||
var/mob/living/L = loc
|
||||
L.update_inv_belt()
|
||||
|
||||
@@ -724,10 +724,26 @@
|
||||
foldable = null
|
||||
var/design = NODESIGN
|
||||
|
||||
/obj/item/storage/box/papersack/update_icon()
|
||||
if(!contents.len)
|
||||
/obj/item/storage/box/papersack/update_desc()
|
||||
. = ..()
|
||||
switch(design)
|
||||
if(NODESIGN)
|
||||
desc = "A sack neatly crafted out of paper."
|
||||
if(NANOTRASEN)
|
||||
desc = "A standard Nanotrasen paper lunch sack for loyal employees on the go."
|
||||
if(SYNDI)
|
||||
desc = "The design on this paper sack is a remnant of the notorious 'SyndieSnacks' program."
|
||||
if(HEART)
|
||||
desc = "A paper sack with a heart etched onto the side."
|
||||
if(SMILE)
|
||||
desc = "A paper sack with a crude smile etched onto the side."
|
||||
|
||||
/obj/item/storage/box/papersack/update_icon_state()
|
||||
item_state = "paperbag_[design]"
|
||||
if(!length(contents))
|
||||
icon_state = "[item_state]"
|
||||
else icon_state = "[item_state]_closed"
|
||||
else
|
||||
icon_state = "[item_state]_closed"
|
||||
|
||||
/obj/item/storage/box/papersack/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/pen))
|
||||
@@ -746,19 +762,7 @@
|
||||
return
|
||||
to_chat(usr, "<span class='notice'>You make some modifications to [src] using your pen.</span>")
|
||||
design = switchDesign
|
||||
icon_state = "paperbag_[design]"
|
||||
item_state = "paperbag_[design]"
|
||||
switch(design)
|
||||
if(NODESIGN)
|
||||
desc = "A sack neatly crafted out of paper."
|
||||
if(NANOTRASEN)
|
||||
desc = "A standard Nanotrasen paper lunch sack for loyal employees on the go."
|
||||
if(SYNDI)
|
||||
desc = "The design on this paper sack is a remnant of the notorious 'SyndieSnacks' program."
|
||||
if(HEART)
|
||||
desc = "A paper sack with a heart etched onto the side."
|
||||
if(SMILE)
|
||||
desc = "A paper sack with a crude smile etched onto the side."
|
||||
update_appearance(UPDATE_DESC|UPDATE_ICON_STATE)
|
||||
return
|
||||
else if(is_sharp(W))
|
||||
if(!contents.len)
|
||||
|
||||
@@ -18,10 +18,8 @@
|
||||
resistance_flags = FLAMMABLE
|
||||
var/icon_type
|
||||
|
||||
/obj/item/storage/fancy/update_icon(itemremoved = 0)
|
||||
var/total_contents = length(contents) - itemremoved
|
||||
icon_state = "[icon_type]box[total_contents]"
|
||||
return
|
||||
/obj/item/storage/fancy/update_icon_state()
|
||||
icon_state = "[icon_type]box[length(contents)]"
|
||||
|
||||
/obj/item/storage/fancy/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -48,23 +46,23 @@
|
||||
foldable = /obj/item/stack/sheet/cardboard
|
||||
foldable_amt = 1
|
||||
|
||||
/obj/item/storage/fancy/donut_box/update_icon()
|
||||
overlays.Cut()
|
||||
|
||||
/obj/item/storage/fancy/donut_box/update_overlays()
|
||||
. = ..()
|
||||
for(var/I = 1 to length(contents))
|
||||
var/obj/item/reagent_containers/food/snacks/donut/donut = contents[I]
|
||||
var/icon/new_donut_icon = icon('icons/obj/food/containers.dmi', "donut_[donut.donut_sprite_type]")
|
||||
new_donut_icon.Shift(EAST, 3 * (I-1))
|
||||
overlays += new_donut_icon
|
||||
. += new_donut_icon
|
||||
|
||||
overlays += icon('icons/obj/food/containers.dmi', "donutbox_front")
|
||||
. += "donutbox_front"
|
||||
|
||||
/obj/item/storage/fancy/donut_box/populate_contents()
|
||||
for(var/I in 1 to storage_slots)
|
||||
new /obj/item/reagent_containers/food/snacks/donut(src)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/storage/fancy/donut_box/empty/populate_contents()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
return
|
||||
|
||||
/*
|
||||
@@ -138,11 +136,11 @@
|
||||
new /obj/item/toy/crayon/black(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/fancy/crayons/update_icon()
|
||||
overlays = list() //resets list
|
||||
overlays += image('icons/obj/crayons.dmi',"crayonbox")
|
||||
/obj/item/storage/fancy/crayons/update_overlays()
|
||||
. = ..()
|
||||
. += image('icons/obj/crayons.dmi',"crayonbox")
|
||||
for(var/obj/item/toy/crayon/crayon in contents)
|
||||
overlays += image('icons/obj/crayons.dmi',crayon.colourName)
|
||||
. += image('icons/obj/crayons.dmi',crayon.colourName)
|
||||
|
||||
/obj/item/storage/fancy/crayons/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/toy/crayon))
|
||||
@@ -184,7 +182,7 @@
|
||||
for(var/I in 1 to storage_slots)
|
||||
new cigarette_type(src)
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/update_icon()
|
||||
/obj/item/storage/fancy/cigarettes/update_icon_state()
|
||||
icon_state = "[initial(icon_state)][contents.len]"
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
@@ -325,10 +323,10 @@
|
||||
for(var/I in 1 to storage_slots)
|
||||
new /obj/item/rollingpaper(src)
|
||||
|
||||
/obj/item/storage/fancy/rollingpapers/update_icon()
|
||||
overlays.Cut()
|
||||
/obj/item/storage/fancy/rollingpapers/update_overlays()
|
||||
. = ..()
|
||||
if(!contents.len)
|
||||
overlays += "[icon_state]_empty"
|
||||
. += "[icon_state]_empty"
|
||||
|
||||
/*
|
||||
* Vial Box
|
||||
@@ -364,15 +362,18 @@
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/lockbox/vials/update_icon()
|
||||
/obj/item/storage/lockbox/vials/update_icon_state()
|
||||
icon_state = "vialbox[length(contents)]"
|
||||
cut_overlays()
|
||||
|
||||
/obj/item/storage/lockbox/vials/update_overlays()
|
||||
. = ..()
|
||||
if(!broken)
|
||||
overlays += image(icon, src, "led[locked]")
|
||||
. += "led[locked]"
|
||||
if(locked)
|
||||
overlays += image(icon, src, "cover")
|
||||
. += "cover"
|
||||
else
|
||||
overlays += image(icon, src, "ledb")
|
||||
. += "ledb"
|
||||
|
||||
/obj/item/storage/lockbox/vials/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
|
||||
@@ -460,7 +460,7 @@
|
||||
|
||||
if(istype(src, /obj/item/storage/fancy))
|
||||
var/obj/item/storage/fancy/F = src
|
||||
F.update_icon(TRUE)
|
||||
F.update_icon()
|
||||
|
||||
for(var/_M in mobs_viewing)
|
||||
var/mob/M = _M
|
||||
|
||||
@@ -24,16 +24,16 @@
|
||||
. = ..()
|
||||
if(has_latches)
|
||||
if(prob(10))
|
||||
latches = "double_latch"
|
||||
if(prob(1))
|
||||
latches = "triple_latch"
|
||||
update_icon()
|
||||
else
|
||||
latches = "double_latch"
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/storage/toolbox/update_icon()
|
||||
..()
|
||||
cut_overlays()
|
||||
/obj/item/storage/toolbox/update_overlays()
|
||||
. = ..()
|
||||
if(has_latches)
|
||||
add_overlay(latches)
|
||||
. += latches
|
||||
|
||||
/obj/item/storage/toolbox/emergency
|
||||
name = "emergency toolbox"
|
||||
|
||||
@@ -36,17 +36,16 @@
|
||||
if(.)
|
||||
if(W == front_id)
|
||||
front_id = null
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/storage/wallet/handle_item_insertion(obj/item/W as obj, prevent_warning = 0)
|
||||
. = ..(W, prevent_warning)
|
||||
if(.)
|
||||
if(!front_id && istype(W, /obj/item/card/id))
|
||||
front_id = W
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/wallet/update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/storage/wallet/update_icon_state()
|
||||
if(front_id)
|
||||
switch(front_id.icon_state)
|
||||
if("silver")
|
||||
@@ -112,7 +111,7 @@
|
||||
desc = "A cheap, [item_color] wallet from the arcade."
|
||||
icon_state = "[item_color]_wallet"
|
||||
|
||||
/obj/item/storage/wallet/color/update_icon()
|
||||
/obj/item/storage/wallet/color/update_icon_state()
|
||||
if(front_id)
|
||||
switch(front_id.icon_state)
|
||||
if("silver")
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
user.visible_message("<span class='suicide'>[user] is putting the live [name] in [user.p_their()] mouth! It looks like [user.p_theyre()] trying to commit suicide.</span>")
|
||||
return FIRELOSS
|
||||
|
||||
/obj/item/melee/baton/update_icon()
|
||||
/obj/item/melee/baton/update_icon_state()
|
||||
if(turned_on)
|
||||
icon_state = "[base_icon]_active"
|
||||
else if(!cell)
|
||||
@@ -97,7 +97,7 @@
|
||||
if(cell.rigged)
|
||||
cell = null
|
||||
turned_on = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
if(cell.charge < (hitcost)) // If after the deduction the baton doesn't have enough charge for a stun hit it turns off.
|
||||
turned_on = FALSE
|
||||
update_icon()
|
||||
@@ -117,7 +117,7 @@
|
||||
I.forceMove(src)
|
||||
cell = I
|
||||
to_chat(user, "<span class='notice'>You install [I] into [src].</span>")
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/melee/baton/screwdriver_act(mob/living/user, obj/item/I)
|
||||
if(!cell)
|
||||
@@ -131,7 +131,7 @@
|
||||
cell.update_icon()
|
||||
cell = null
|
||||
turned_on = FALSE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/melee/baton/attack_self(mob/user)
|
||||
if(cell?.charge >= hitcost)
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
if(!silent)
|
||||
to_chat(C, "<span class='warning'>You are not wearing a suitable mask or helmet.</span>")
|
||||
return FALSE
|
||||
if(M.mask_adjusted) // If the mask is equipped but pushed down
|
||||
if(M.up) // If the mask is equipped but pushed away
|
||||
M.adjustmask(C) // Adjust it back
|
||||
|
||||
if(!silent)
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
|
||||
/obj/item/stack/tape_roll/New(loc, amount=null)
|
||||
..()
|
||||
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/stack/tape_roll/attack(mob/living/carbon/human/M, mob/living/user)
|
||||
if(!istype(M)) //What good is a duct tape mask if you are unable to speak?
|
||||
@@ -42,7 +41,7 @@
|
||||
M.equip_to_slot(G, slot_wear_mask)
|
||||
G.add_fingerprint(user)
|
||||
|
||||
/obj/item/stack/tape_roll/update_icon()
|
||||
/obj/item/stack/tape_roll/update_icon_state()
|
||||
var/amount = get_amount()
|
||||
if((amount <= 2) && (amount > 0))
|
||||
icon_state = "taperoll"
|
||||
@@ -54,4 +53,3 @@
|
||||
icon_state = "taperoll-4"
|
||||
else
|
||||
icon_state = "taperoll-4"
|
||||
..()
|
||||
|
||||
@@ -202,9 +202,8 @@
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 30)
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
/obj/item/twohanded/fireaxe/update_icon() //Currently only here to fuck with the on-mob icons.
|
||||
/obj/item/twohanded/fireaxe/update_icon_state() //Currently only here to fuck with the on-mob icons.
|
||||
icon_state = "fireaxe[wielded]"
|
||||
..()
|
||||
|
||||
/obj/item/twohanded/fireaxe/afterattack(atom/A, mob/user, proximity)
|
||||
if(!proximity)
|
||||
@@ -221,7 +220,7 @@
|
||||
force_wielded = 23
|
||||
needs_permit = TRUE
|
||||
|
||||
/obj/item/twohanded/fireaxe/boneaxe/update_icon()
|
||||
/obj/item/twohanded/fireaxe/boneaxe/update_icon_state()
|
||||
icon_state = "bone_axe[wielded]"
|
||||
|
||||
/obj/item/twohanded/fireaxe/energized
|
||||
@@ -231,7 +230,7 @@
|
||||
var/charge = 30
|
||||
var/max_charge = 30
|
||||
|
||||
/obj/item/twohanded/fireaxe/energized/update_icon()
|
||||
/obj/item/twohanded/fireaxe/energized/update_icon_state()
|
||||
if(wielded)
|
||||
icon_state = "fireaxe2"
|
||||
else
|
||||
@@ -298,14 +297,13 @@
|
||||
if(!blade_color)
|
||||
blade_color = pick("red", "blue", "green", "purple")
|
||||
|
||||
/obj/item/twohanded/dualsaber/update_icon()
|
||||
/obj/item/twohanded/dualsaber/update_icon_state()
|
||||
if(wielded)
|
||||
icon_state = "dualsaber[blade_color][wielded]"
|
||||
set_light(brightness_on, l_color=colormap[blade_color])
|
||||
else
|
||||
icon_state = "dualsaber0"
|
||||
set_light(0)
|
||||
..()
|
||||
|
||||
/obj/item/twohanded/dualsaber/attack(mob/target, mob/living/user)
|
||||
if(HAS_TRAIT(user, TRAIT_HULK))
|
||||
@@ -406,7 +404,7 @@
|
||||
needs_permit = TRUE
|
||||
var/icon_prefix = "spearglass"
|
||||
|
||||
/obj/item/twohanded/spear/update_icon()
|
||||
/obj/item/twohanded/spear/update_icon_state()
|
||||
icon_state = "[icon_prefix][wielded]"
|
||||
|
||||
/obj/item/twohanded/spear/CheckParts(list/parts_list)
|
||||
@@ -609,12 +607,11 @@
|
||||
attack_verb = list("sawed", "cut", "hacked", "carved", "cleaved", "butchered", "felled", "timbered")
|
||||
sharp = TRUE
|
||||
|
||||
/obj/item/twohanded/chainsaw/update_icon()
|
||||
/obj/item/twohanded/chainsaw/update_icon_state()
|
||||
if(wielded)
|
||||
icon_state = "chainsaw[wielded]"
|
||||
else
|
||||
icon_state = "chainsaw0"
|
||||
..()
|
||||
|
||||
/obj/item/twohanded/chainsaw/attack(mob/living/target, mob/living/user)
|
||||
if(wielded)
|
||||
@@ -685,9 +682,8 @@
|
||||
if(charged < 2)
|
||||
charged++
|
||||
|
||||
/obj/item/twohanded/singularityhammer/update_icon() //Currently only here to fuck with the on-mob icons.
|
||||
/obj/item/twohanded/singularityhammer/update_icon_state() //Currently only here to fuck with the on-mob icons.
|
||||
icon_state = "singulohammer[wielded]"
|
||||
..()
|
||||
|
||||
/obj/item/twohanded/singularityhammer/proc/vortex(turf/pull, mob/wielder)
|
||||
for(var/atom/movable/X in orange(5, pull))
|
||||
@@ -762,9 +758,8 @@
|
||||
L.Stun(6 SECONDS)
|
||||
shock(L)
|
||||
|
||||
/obj/item/twohanded/mjollnir/update_icon() //Currently only here to fuck with the on-mob icons.
|
||||
/obj/item/twohanded/mjollnir/update_icon_state() //Currently only here to fuck with the on-mob icons.
|
||||
icon_state = "mjollnir[wielded]"
|
||||
..()
|
||||
|
||||
/obj/item/twohanded/knighthammer
|
||||
name = "singuloth knight's hammer"
|
||||
@@ -793,9 +788,8 @@
|
||||
if(charged < 5)
|
||||
charged++
|
||||
|
||||
/obj/item/twohanded/knighthammer/update_icon() //Currently only here to fuck with the on-mob icons.
|
||||
/obj/item/twohanded/knighthammer/update_icon_state() //Currently only here to fuck with the on-mob icons.
|
||||
icon_state = "knighthammer[wielded]"
|
||||
..()
|
||||
|
||||
/obj/item/twohanded/knighthammer/afterattack(atom/A, mob/user, proximity)
|
||||
if(!proximity)
|
||||
|
||||
@@ -209,8 +209,8 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
if(!(resistance_flags & ON_FIRE) && (resistance_flags & FLAMMABLE) && !(resistance_flags & FIRE_PROOF))
|
||||
resistance_flags |= ON_FIRE
|
||||
SSfires.processing[src] = src
|
||||
add_overlay(GLOB.fire_overlay, TRUE)
|
||||
return 1
|
||||
add_overlay(custom_fire_overlay ? custom_fire_overlay : GLOB.fire_overlay)
|
||||
return TRUE
|
||||
|
||||
///called when the obj is destroyed by fire
|
||||
/obj/proc/burn()
|
||||
@@ -222,7 +222,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
/obj/proc/extinguish()
|
||||
if(resistance_flags & ON_FIRE)
|
||||
resistance_flags &= ~ON_FIRE
|
||||
cut_overlay(GLOB.fire_overlay, TRUE)
|
||||
cut_overlay(custom_fire_overlay ? custom_fire_overlay : GLOB.fire_overlay, TRUE)
|
||||
SSfires.processing -= src
|
||||
|
||||
///Called when the obj is hit by a tesla bolt.
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
var/damage_deflection = 0
|
||||
|
||||
var/resistance_flags = NONE // INDESTRUCTIBLE
|
||||
var/custom_fire_overlay // Update_fire_overlay will check if a different icon state should be used
|
||||
|
||||
var/acid_level = 0 //how much acid is on that obj
|
||||
|
||||
@@ -168,9 +169,6 @@
|
||||
/obj/proc/interact(mob/user)
|
||||
return
|
||||
|
||||
/obj/proc/update_icon()
|
||||
SEND_SIGNAL(src, COMSIG_OBJ_UPDATE_ICON)
|
||||
|
||||
/mob/proc/unset_machine()
|
||||
if(machine)
|
||||
UnregisterSignal(machine, COMSIG_PARENT_QDELETING)
|
||||
|
||||
@@ -284,7 +284,7 @@ LINEN BINS
|
||||
. += "There are [amount] bed sheets in the bin."
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/update_icon()
|
||||
/obj/structure/bedsheetbin/update_icon_state()
|
||||
switch(amount)
|
||||
if(0)
|
||||
icon_state = "linenbin-empty"
|
||||
@@ -313,6 +313,7 @@ LINEN BINS
|
||||
I.forceMove(src)
|
||||
sheets.Add(I)
|
||||
amount++
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
|
||||
else if(amount && !hidden && I.w_class < WEIGHT_CLASS_BULKY) //make sure there's sheets to hide it among, make sure nothing else is hidden in there.
|
||||
if(I.flags & ABSTRACT)
|
||||
@@ -346,7 +347,7 @@ LINEN BINS
|
||||
hidden.loc = user.loc
|
||||
to_chat(user, "<span class='notice'>[hidden] falls out of [B]!</span>")
|
||||
hidden = null
|
||||
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -365,7 +366,7 @@ LINEN BINS
|
||||
|
||||
B.loc = loc
|
||||
to_chat(user, "<span class='notice'>You telekinetically remove [B] from [src].</span>")
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
if(hidden)
|
||||
hidden.loc = loc
|
||||
|
||||
@@ -9,44 +9,42 @@
|
||||
/obj/structure/coatrack/attack_hand(mob/user as mob)
|
||||
user.visible_message("[user] takes [coat] off \the [src].", "You take [coat] off the \the [src]")
|
||||
if(!user.put_in_active_hand(coat))
|
||||
coat.loc = get_turf(user)
|
||||
coat.forceMove(get_turf(user))
|
||||
coat = null
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/structure/coatrack/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
var/can_hang = 0
|
||||
var/can_hang = FALSE
|
||||
for(var/T in allowed)
|
||||
if(istype(W,T))
|
||||
can_hang = 1
|
||||
can_hang = TRUE
|
||||
if(can_hang && !coat)
|
||||
user.visible_message("[user] hangs [W] on \the [src].", "You hang [W] on the \the [src]")
|
||||
coat = W
|
||||
user.drop_item(src)
|
||||
coat.loc = src
|
||||
update_icon()
|
||||
else
|
||||
return ..()
|
||||
coat.forceMove(src)
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/coatrack/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
var/can_hang = 0
|
||||
var/can_hang = FALSE
|
||||
for(var/T in allowed)
|
||||
if(istype(mover,T))
|
||||
can_hang = 1
|
||||
|
||||
can_hang = TRUE
|
||||
if(can_hang && !coat)
|
||||
src.visible_message("[mover] lands on \the [src].")
|
||||
visible_message("[mover] lands on \the [src].")
|
||||
coat = mover
|
||||
coat.loc = src
|
||||
update_icon()
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
coat.forceMove(src)
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/coatrack/update_icon()
|
||||
overlays.Cut()
|
||||
/obj/structure/coatrack/update_overlays()
|
||||
. = ..()
|
||||
if(istype(coat, /obj/item/clothing/suit/storage/labcoat))
|
||||
overlays += image(icon, icon_state = "coat_lab")
|
||||
. += "coat_lab"
|
||||
if(istype(coat, /obj/item/clothing/suit/storage/labcoat/cmo))
|
||||
overlays += image(icon, icon_state = "coat_cmo")
|
||||
. += "coat_cmo"
|
||||
if(istype(coat, /obj/item/clothing/suit/storage/det_suit))
|
||||
overlays += image(icon, icon_state = "coat_det")
|
||||
. += "coat_det"
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
var/storage_capacity = 30 //This is so that someone can't pack hundreds of items in a locker/crate then open it in a populated area to crash clients.
|
||||
var/material_drop = /obj/item/stack/sheet/metal
|
||||
var/material_drop_amount = 2
|
||||
var/transparent
|
||||
|
||||
// Please dont override this unless you absolutely have to
|
||||
/obj/structure/closet/Initialize(mapload)
|
||||
@@ -298,23 +299,22 @@
|
||||
return
|
||||
to_chat(usr, "<span class='warning'>This mob type can't use this verb.</span>")
|
||||
|
||||
/obj/structure/closet/update_icon()//Putting the welded stuff in updateicon() so it's easy to overwrite for special cases (Fridges, cabinets, and whatnot)
|
||||
/obj/structure/closet/update_icon_state()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
icon_state = "[icon_closed][transparent ? "_trans" : ""]"
|
||||
else
|
||||
icon_state = icon_opened
|
||||
update_overlays()
|
||||
icon_state = "[icon_opened][transparent ? "_trans" : ""]"
|
||||
|
||||
/obj/structure/closet/proc/update_overlays(transparent = FALSE)
|
||||
cut_overlays()
|
||||
/obj/structure/closet/update_overlays()
|
||||
. = ..()
|
||||
if(transparent && opened)
|
||||
add_overlay("[open_door_sprite]_trans")
|
||||
. += "[open_door_sprite]_trans"
|
||||
return
|
||||
if(opened)
|
||||
add_overlay(open_door_sprite)
|
||||
. += open_door_sprite
|
||||
return
|
||||
if(welded)
|
||||
add_overlay("welded")
|
||||
. += "welded"
|
||||
|
||||
// Objects that try to exit a locker by stepping were doing so successfully,
|
||||
// and due to an oversight in turf/Enter() were going through walls. That
|
||||
@@ -399,20 +399,17 @@
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/bluespace/proc/UpdateTransparency(atom/movable/AM, atom/location)
|
||||
var/transparent = FALSE
|
||||
transparent = FALSE
|
||||
for(var/atom/A in location)
|
||||
if(A.density && A != src && A != AM)
|
||||
transparent = TRUE
|
||||
break
|
||||
icon_opened = transparent ? "bluespace_open_trans" : "bluespace_open"
|
||||
icon_closed = transparent ? "bluespace_trans" : "bluespace"
|
||||
icon_state = opened ? icon_opened : icon_closed
|
||||
update_overlays(transparent)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/bluespace/Crossed(atom/movable/AM, oldloc)
|
||||
if(AM.density)
|
||||
icon_state = opened ? "bluespace_open_trans" : "bluespace_trans"
|
||||
update_overlays(TRUE)
|
||||
transparent = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/bluespace/Move(NewLoc, direct) // Allows for "phasing" throug objects but doesn't allow you to stuff your EOC homebois in one of these and push them through walls.
|
||||
var/turf/T = get_turf(NewLoc)
|
||||
|
||||
@@ -11,12 +11,15 @@
|
||||
open_sound_volume = 25
|
||||
close_sound_volume = 50
|
||||
|
||||
/obj/structure/closet/coffin/update_icon()
|
||||
/obj/structure/closet/coffin/update_icon_state()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/coffin/update_overlays()
|
||||
return list()
|
||||
|
||||
/obj/structure/closet/coffin/sarcophagus
|
||||
name = "sarcophagus"
|
||||
icon_state = "sarc"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/obj/structure/closet/fireaxecabinet/populate_contents()
|
||||
fireaxe = new/obj/item/twohanded/fireaxe(src)
|
||||
has_axe = "full"
|
||||
update_icon() // So its initial icon doesn't show it without the fireaxe
|
||||
update_icon(UPDATE_ICON_STATE) // So its initial icon doesn't show it without the fireaxe
|
||||
|
||||
/obj/structure/closet/fireaxecabinet/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -37,7 +37,7 @@
|
||||
if(do_after(user, 20 * O.toolspeed, target = src))
|
||||
locked = FALSE
|
||||
to_chat(user, "<span class = 'caution'> You disable the locking modules.</span>")
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return
|
||||
else if(istype(O, /obj/item))
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
@@ -58,7 +58,7 @@
|
||||
smashed = TRUE
|
||||
locked = FALSE
|
||||
localopened = TRUE
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return
|
||||
if(istype(O, /obj/item/twohanded/fireaxe) && localopened)
|
||||
if(!fireaxe)
|
||||
@@ -73,7 +73,7 @@
|
||||
has_axe = "full"
|
||||
contents += F
|
||||
to_chat(user, "<span class='notice'>You place \the [F] back in the [name].</span>")
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
else
|
||||
if(smashed)
|
||||
return
|
||||
@@ -107,7 +107,7 @@
|
||||
fireaxe = null
|
||||
|
||||
add_fingerprint(user)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return
|
||||
if(smashed)
|
||||
return
|
||||
@@ -119,7 +119,7 @@
|
||||
to_chat(user, "<span class='notice'>You telekinetically remove \the [fireaxe].</span>")
|
||||
has_axe = "empty"
|
||||
fireaxe = null
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return
|
||||
attack_hand(user)
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
to_chat(usr, "<span class='notice'>[src] is empty.</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>[src] is closed.</span>")
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/structure/closet/fireaxecabinet/attack_ai(mob/user as mob)
|
||||
if(smashed)
|
||||
@@ -180,14 +180,17 @@
|
||||
else
|
||||
flick("fireaxe_[has_axe]_opening", src)
|
||||
sleep(10)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
|
||||
/obj/structure/closet/fireaxecabinet/update_icon()
|
||||
/obj/structure/closet/fireaxecabinet/update_icon_state()
|
||||
if(localopened && !smashed)
|
||||
icon_state = "fireaxe_[has_axe]_open"
|
||||
return
|
||||
icon_state = "fireaxe_[has_axe]_[hitstaken]hits"
|
||||
else
|
||||
icon_state = "fireaxe_[has_axe]_[hitstaken]hits"
|
||||
|
||||
/obj/structure/closet/fireaxecabinet/update_overlays()
|
||||
return list()
|
||||
|
||||
/obj/structure/closet/fireaxecabinet/open()
|
||||
return
|
||||
|
||||
@@ -10,12 +10,15 @@
|
||||
close_sound_volume = 50
|
||||
max_integrity = 70
|
||||
|
||||
/obj/structure/closet/cabinet/update_icon()
|
||||
/obj/structure/closet/cabinet/update_icon_state()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/cabinet/update_overlays()
|
||||
return list()
|
||||
|
||||
/obj/structure/closet/acloset
|
||||
name = "strange closet"
|
||||
desc = "It looks alien!"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/secure_closet/guncabinet/update_overlays()
|
||||
cut_overlays()
|
||||
. = list()
|
||||
if(!opened)
|
||||
var/lasers = 0
|
||||
var/ballistics = 0
|
||||
@@ -43,10 +43,10 @@
|
||||
gun.icon_state = "projectile"
|
||||
|
||||
gun.pixel_x = i*4
|
||||
add_overlay(gun)
|
||||
. += gun
|
||||
|
||||
add_overlay("door")
|
||||
. += "door"
|
||||
if(broken)
|
||||
add_overlay("off")
|
||||
. += "off"
|
||||
else if(locked)
|
||||
add_overlay("locked")
|
||||
. += "locked"
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
locked = FALSE
|
||||
add_overlay("sparking")
|
||||
to_chat(user, "<span class='notice'>You break the lock on [src].</span>")
|
||||
addtimer(CALLBACK(src, .proc/update_icon), 1 SECONDS)
|
||||
addtimer(CALLBACK(src, /atom/.proc/update_icon), 1 SECONDS)
|
||||
|
||||
/obj/structure/closet/secure_closet/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -105,9 +105,12 @@
|
||||
/obj/structure/closet/statue/verb_toggleopen()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/update_icon()
|
||||
/obj/structure/closet/statue/update_icon_state()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/update_overlays()
|
||||
return list()
|
||||
|
||||
/obj/structure/closet/statue/proc/shatter(mob/user)
|
||||
if(user)
|
||||
user.dust()
|
||||
|
||||
@@ -15,11 +15,10 @@
|
||||
// A list of beacon names that the crate will announce the arrival of, when delivered.
|
||||
var/list/announce_beacons = list()
|
||||
|
||||
/obj/structure/closet/crate/update_icon()
|
||||
..()
|
||||
cut_overlays()
|
||||
/obj/structure/closet/crate/update_overlays()
|
||||
. = ..()
|
||||
if(manifest)
|
||||
add_overlay("manifest")
|
||||
. += "manifest"
|
||||
|
||||
/obj/structure/closet/crate/can_open()
|
||||
return TRUE
|
||||
@@ -175,15 +174,15 @@
|
||||
locked = TRUE
|
||||
can_be_emaged = TRUE
|
||||
|
||||
/obj/structure/closet/crate/secure/update_icon()
|
||||
..()
|
||||
/obj/structure/closet/crate/secure/update_overlays()
|
||||
. = ..()
|
||||
if(broken)
|
||||
add_overlay(emag)
|
||||
. += emag
|
||||
return
|
||||
if(locked)
|
||||
add_overlay(redlight)
|
||||
. += redlight
|
||||
else
|
||||
add_overlay(greenlight)
|
||||
. += greenlight
|
||||
|
||||
/obj/structure/closet/crate/secure/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
|
||||
if(prob(tamperproof) && damage_amount >= DAMAGE_PRECISION)
|
||||
|
||||
@@ -10,11 +10,10 @@
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/largecrate/update_icon()
|
||||
..()
|
||||
overlays.Cut()
|
||||
/obj/structure/largecrate/update_overlays()
|
||||
. = ..()
|
||||
if(manifest)
|
||||
overlays += "manifest"
|
||||
. += "manifest"
|
||||
|
||||
/obj/structure/largecrate/attack_hand(mob/user as mob)
|
||||
if(manifest)
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
if(istype(depotarea))
|
||||
if(!depotarea.used_self_destruct)
|
||||
depotarea.used_self_destruct = TRUE // Silences all further alerts from this point onwards.
|
||||
depotarea.updateicon()
|
||||
depotarea.update_state()
|
||||
depotarea.shields_down()
|
||||
else
|
||||
log_debug("[src] at [x],[y],[z] failed depotarea istype check during Initialize()! Either it was spawned outside the depot area (bad idea), or a bug is happening.")
|
||||
@@ -103,7 +103,7 @@
|
||||
depotarea = get_area(src)
|
||||
if(istype(depotarea))
|
||||
depotarea.destroyed = TRUE
|
||||
depotarea.updateicon()
|
||||
depotarea.update_state()
|
||||
|
||||
for(var/obj/structure/closet/L in range(30, T))
|
||||
for(var/obj/O in L)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
trophy_message = showpiece_entry["trophy_message"]
|
||||
if(start_showpiece_type)
|
||||
showpiece = new start_showpiece_type (src)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/structure/displaycase/Destroy()
|
||||
QDEL_NULL(electronics)
|
||||
@@ -81,7 +81,7 @@
|
||||
open = TRUE
|
||||
new /obj/item/shard(drop_location())
|
||||
playsound(src, "shatter", 70, TRUE)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
trigger_alarm()
|
||||
|
||||
/obj/structure/displaycase/proc/trigger_alarm()
|
||||
@@ -95,17 +95,17 @@
|
||||
playsound(src, 'sound/machines/burglar_alarm.ogg', 50, 0)
|
||||
sleep(74) // 7.4 seconds long
|
||||
|
||||
/obj/structure/displaycase/update_icon()
|
||||
cut_overlays()
|
||||
/obj/structure/displaycase/update_overlays()
|
||||
. = ..()
|
||||
if(broken)
|
||||
add_overlay("glassbox_broken")
|
||||
. += "glassbox_broken"
|
||||
if(showpiece)
|
||||
var/mutable_appearance/showpiece_overlay = mutable_appearance(showpiece.icon, showpiece.icon_state)
|
||||
showpiece_overlay.copy_overlays(showpiece)
|
||||
showpiece_overlay.transform *= 0.6
|
||||
add_overlay(showpiece_overlay)
|
||||
. += showpiece_overlay
|
||||
if(!open && !broken)
|
||||
add_overlay("glassbox_closed")
|
||||
. += "glassbox_closed"
|
||||
|
||||
/obj/structure/displaycase/attackby(obj/item/I, mob/user, params)
|
||||
if(I.GetID() && !broken && openable)
|
||||
@@ -131,7 +131,7 @@
|
||||
broken = FALSE
|
||||
open = FALSE
|
||||
obj_integrity = max_integrity
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
|
||||
/obj/structure/displaycase/proc/toggle_lock()
|
||||
open = !open
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/structure/displaycase/attack_hand(mob/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
@@ -182,7 +182,7 @@
|
||||
to_chat(user, "<span class='notice'>You deactivate the hover field built into the case.</span>")
|
||||
dump()
|
||||
add_fingerprint(user)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
return
|
||||
else
|
||||
//prevents remote "kicks" with TK
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
/obj/structure/door_assembly/Initialize(mapload)
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
update_name()
|
||||
|
||||
/obj/structure/door_assembly/Destroy()
|
||||
@@ -131,7 +131,7 @@
|
||||
else
|
||||
return ..()
|
||||
update_name()
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/structure/door_assembly/crowbar_act(mob/user, obj/item/I)
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
@@ -152,7 +152,7 @@
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.forceMove(loc)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
update_name()
|
||||
|
||||
/obj/structure/door_assembly/screwdriver_act(mob/user, obj/item/I)
|
||||
@@ -189,7 +189,7 @@
|
||||
electronics.forceMove(door)
|
||||
electronics = null
|
||||
qdel(src)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/structure/door_assembly/wirecutter_act(mob/user, obj/item/I)
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS)
|
||||
@@ -203,7 +203,7 @@
|
||||
to_chat(user, "<span class='notice'>You cut the wires from the airlock assembly.</span>")
|
||||
new/obj/item/stack/cable_coil(get_turf(user), 1)
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_WIRES
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/structure/door_assembly/wrench_act(mob/user, obj/item/I)
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_WIRES)
|
||||
@@ -256,17 +256,18 @@
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You disassemble the airlock assembly.</span>")
|
||||
deconstruct(TRUE)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/structure/door_assembly/update_icon()
|
||||
overlays.Cut()
|
||||
/obj/structure/door_assembly/update_overlays()
|
||||
. = ..()
|
||||
if(!glass)
|
||||
overlays += get_airlock_overlay("fill_construction", icon)
|
||||
. += get_airlock_overlay("fill_construction", icon)
|
||||
else if(glass)
|
||||
overlays += get_airlock_overlay("glass_construction", overlays_file)
|
||||
overlays += get_airlock_overlay("panel_c[state+1]", overlays_file)
|
||||
. += get_airlock_overlay("glass_construction", overlays_file)
|
||||
. += get_airlock_overlay("panel_c[state+1]", overlays_file)
|
||||
|
||||
/obj/structure/door_assembly/proc/update_name()
|
||||
/obj/structure/door_assembly/update_name()
|
||||
. = ..()
|
||||
name = ""
|
||||
switch(state)
|
||||
if(AIRLOCK_ASSEMBLY_NEEDS_WIRES)
|
||||
@@ -289,7 +290,7 @@
|
||||
if(electronics)
|
||||
target.electronics = source.electronics
|
||||
source.electronics.forceMove(target)
|
||||
target.update_icon()
|
||||
target.update_icon(UPDATE_OVERLAYS)
|
||||
target.update_name()
|
||||
qdel(source)
|
||||
|
||||
|
||||
@@ -6,10 +6,11 @@
|
||||
var/obj/item/assembly/shock_kit/part = null
|
||||
var/last_time = 1.0
|
||||
var/delay_time = 50
|
||||
var/shocking = FALSE
|
||||
|
||||
/obj/structure/chair/e_chair/Initialize(mapload, obj/item/assembly/shock_kit/sk)
|
||||
. = ..()
|
||||
overlays += image('icons/obj/chairs.dmi', src, "echair_over", MOB_LAYER + 1, dir)
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
if(sk)
|
||||
part = sk
|
||||
@@ -50,17 +51,25 @@
|
||||
|
||||
/obj/structure/chair/e_chair/rotate()
|
||||
..()
|
||||
overlays.Cut()
|
||||
overlays += image('icons/obj/chairs.dmi', src, "echair_over", MOB_LAYER + 1, dir) //there's probably a better way of handling this, but eh. -Pete
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/structure/chair/e_chair/update_icon_state()
|
||||
icon_state = "echair[shocking]"
|
||||
|
||||
/obj/structure/chair/e_chair/update_overlays()
|
||||
. = ..()
|
||||
. += image('icons/obj/chairs.dmi', src, "echair_over", MOB_LAYER + 1, dir)
|
||||
|
||||
/obj/structure/chair/e_chair/proc/shock()
|
||||
if(last_time + delay_time > world.time)
|
||||
return
|
||||
last_time = world.time
|
||||
|
||||
icon_state = "echair1"
|
||||
shocking = TRUE
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
spawn(delay_time)
|
||||
icon_state = "echair0"
|
||||
shocking = FALSE
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
// special power handling
|
||||
var/area/A = get_area(src)
|
||||
@@ -70,7 +79,7 @@
|
||||
return
|
||||
A.use_power(5000, EQUIP)
|
||||
var/light = A.power_light
|
||||
A.updateicon()
|
||||
A.update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
flick("echair_shock", src)
|
||||
do_sparks(12, 1, src)
|
||||
@@ -83,4 +92,4 @@
|
||||
spawn(1)
|
||||
buckled_mob.electrocute_act(110, src, 1)
|
||||
A.power_light = light
|
||||
A.updateicon()
|
||||
A.update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
@@ -37,49 +37,49 @@
|
||||
if(!myglass)
|
||||
put_in_cart(I, user)
|
||||
myglass=I
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
else
|
||||
to_chat(user, fail_msg)
|
||||
else if(istype(I, /obj/item/stack/sheet/metal))
|
||||
if(!mymetal)
|
||||
put_in_cart(I, user)
|
||||
mymetal=I
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
else
|
||||
to_chat(user, fail_msg)
|
||||
else if(istype(I, /obj/item/stack/sheet/plasteel))
|
||||
if(!myplasteel)
|
||||
put_in_cart(I, user)
|
||||
myplasteel=I
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
else
|
||||
to_chat(user, fail_msg)
|
||||
else if(istype(I, /obj/item/flashlight))
|
||||
if(!myflashlight)
|
||||
put_in_cart(I, user)
|
||||
myflashlight=I
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
else
|
||||
to_chat(user, fail_msg)
|
||||
else if(istype(I, /obj/item/storage/toolbox/mechanical))
|
||||
if(!mybluetoolbox)
|
||||
put_in_cart(I, user)
|
||||
mybluetoolbox=I
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
else
|
||||
to_chat(user, fail_msg)
|
||||
else if(istype(I, /obj/item/storage/toolbox/electrical))
|
||||
if(!myyellowtoolbox)
|
||||
put_in_cart(I, user)
|
||||
myyellowtoolbox=I
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
else
|
||||
to_chat(user, fail_msg)
|
||||
else if(istype(I, /obj/item/storage/toolbox))
|
||||
if(!myredtoolbox)
|
||||
put_in_cart(I, user)
|
||||
myredtoolbox=I
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
else
|
||||
to_chat(user, fail_msg)
|
||||
else if(istype(I, /obj/item/wrench))
|
||||
@@ -120,6 +120,7 @@
|
||||
var/datum/browser/popup = new(user, "engicart", name, 240, 160)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
/obj/structure/engineeringcart/Topic(href, href_list)
|
||||
if(!in_range(src, usr))
|
||||
return
|
||||
@@ -162,22 +163,22 @@
|
||||
to_chat(user, "<span class='notice'>You take [myyellowtoolbox] from [src].</span>")
|
||||
myyellowtoolbox = null
|
||||
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/structure/engineeringcart/update_icon()
|
||||
overlays.Cut()
|
||||
/obj/structure/engineeringcart/update_overlays()
|
||||
. = ..()
|
||||
if(myglass)
|
||||
overlays += "cart_glass"
|
||||
. += "cart_glass"
|
||||
if(mymetal)
|
||||
overlays += "cart_metal"
|
||||
. += "cart_metal"
|
||||
if(myplasteel)
|
||||
overlays += "cart_plasteel"
|
||||
. += "cart_plasteel"
|
||||
if(myflashlight)
|
||||
overlays += "cart_flashlight"
|
||||
. += "cart_flashlight"
|
||||
if(mybluetoolbox)
|
||||
overlays += "cart_bluetoolbox"
|
||||
. += "cart_bluetoolbox"
|
||||
if(myredtoolbox)
|
||||
overlays += "cart_redtoolbox"
|
||||
. += "cart_redtoolbox"
|
||||
if(myyellowtoolbox)
|
||||
overlays += "cart_yellowtoolbox"
|
||||
. += "cart_yellowtoolbox"
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
return
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3)
|
||||
opened = !opened
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/structure/extinguisher_cabinet/Destroy()
|
||||
QDEL_NULL(has_extinguisher)
|
||||
@@ -59,7 +59,7 @@
|
||||
/obj/structure/extinguisher_cabinet/handle_atom_del(atom/A)
|
||||
if(A == has_extinguisher)
|
||||
has_extinguisher = null
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user, params)
|
||||
if(isrobot(user) || isalien(user))
|
||||
@@ -71,17 +71,17 @@
|
||||
user.drop_item(O)
|
||||
contents += O
|
||||
has_extinguisher = O
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
to_chat(user, "<span class='notice'>You place [O] in [src].</span>")
|
||||
return TRUE
|
||||
else
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3)
|
||||
opened = !opened
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3)
|
||||
opened = !opened
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
else
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3)
|
||||
opened = !opened
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attack_tk(mob/user)
|
||||
if(has_extinguisher)
|
||||
@@ -135,7 +135,7 @@
|
||||
else
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3)
|
||||
opened = !opened
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/structure/extinguisher_cabinet/obj_break(damage_flag)
|
||||
if(!broken && !(flags & NODECONSTRUCT))
|
||||
@@ -144,7 +144,7 @@
|
||||
if(has_extinguisher)
|
||||
has_extinguisher.forceMove(loc)
|
||||
has_extinguisher = null
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/structure/extinguisher_cabinet/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
@@ -154,7 +154,7 @@
|
||||
has_extinguisher = null
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/extinguisher_cabinet/update_icon()
|
||||
/obj/structure/extinguisher_cabinet/update_icon_state()
|
||||
if(!opened)
|
||||
icon_state = "extinguisher_closed"
|
||||
return
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
opening = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/structure/falsewall/update_icon()
|
||||
/obj/structure/falsewall/update_icon_state()
|
||||
if(opening)
|
||||
smoothing_flags = NONE
|
||||
clear_smooth_overlays()
|
||||
|
||||
@@ -50,9 +50,9 @@
|
||||
|
||||
/obj/structure/grille/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/structure/grille/update_icon()
|
||||
/obj/structure/grille/update_icon_state()
|
||||
if(QDELETED(src) || broken)
|
||||
return
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
T.air_update_turf(TRUE)
|
||||
|
||||
/obj/structure/inflatable/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
return 0
|
||||
return
|
||||
|
||||
/obj/structure/inflatable/CanAtmosPass(turf/T)
|
||||
return !density
|
||||
@@ -105,14 +105,12 @@
|
||||
|
||||
/obj/structure/inflatable/door //Based on mineral door code
|
||||
name = "inflatable door"
|
||||
|
||||
icon = 'icons/obj/inflatable.dmi'
|
||||
icon_state = "door_closed"
|
||||
torn = /obj/item/inflatable/door/torn
|
||||
intact = /obj/item/inflatable/door
|
||||
|
||||
var/state_open = FALSE
|
||||
var/isSwitchingStates = FALSE
|
||||
var/is_operating = FALSE
|
||||
|
||||
/obj/structure/inflatable/door/detailed_examine()
|
||||
return "Click the door to open or close it. It only stops air while closed.<br>\
|
||||
@@ -123,10 +121,10 @@
|
||||
return
|
||||
else if(isrobot(user)) //but cyborgs can
|
||||
if(get_dist(user,src) <= 1) //not remotely though
|
||||
return TryToSwitchState(user)
|
||||
return try_to_operate(user)
|
||||
|
||||
/obj/structure/inflatable/door/attack_hand(mob/user as mob)
|
||||
return TryToSwitchState(user)
|
||||
return try_to_operate(user)
|
||||
|
||||
/obj/structure/inflatable/door/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(istype(mover, /obj/effect/beam))
|
||||
@@ -136,8 +134,8 @@
|
||||
/obj/structure/inflatable/door/CanAtmosPass(turf/T)
|
||||
return !density
|
||||
|
||||
/obj/structure/inflatable/door/proc/TryToSwitchState(atom/user)
|
||||
if(isSwitchingStates)
|
||||
/obj/structure/inflatable/door/proc/try_to_operate(atom/user)
|
||||
if(is_operating)
|
||||
return
|
||||
if(ismob(user))
|
||||
var/mob/M = user
|
||||
@@ -147,42 +145,28 @@
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
if(!C.handcuffed)
|
||||
SwitchState()
|
||||
operate()
|
||||
else
|
||||
SwitchState()
|
||||
operate()
|
||||
else if(istype(user, /obj/mecha))
|
||||
SwitchState()
|
||||
operate()
|
||||
|
||||
/obj/structure/inflatable/door/proc/SwitchState()
|
||||
if(state_open)
|
||||
Close()
|
||||
/obj/structure/inflatable/door/proc/operate()
|
||||
is_operating = TRUE
|
||||
//playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 100, 1)
|
||||
if(!state_open)
|
||||
flick("door_opening",src)
|
||||
else
|
||||
Open()
|
||||
flick("door_closing",src)
|
||||
sleep(10)
|
||||
density = !density
|
||||
opacity = !opacity
|
||||
state_open = !state_open
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
is_operating = FALSE
|
||||
air_update_turf(1)
|
||||
|
||||
/obj/structure/inflatable/door/proc/Open()
|
||||
isSwitchingStates = TRUE
|
||||
//playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 100, 1)
|
||||
flick("door_opening",src)
|
||||
sleep(10)
|
||||
density = FALSE
|
||||
opacity = FALSE
|
||||
state_open = TRUE
|
||||
update_icon()
|
||||
isSwitchingStates = FALSE
|
||||
|
||||
/obj/structure/inflatable/door/proc/Close()
|
||||
isSwitchingStates = TRUE
|
||||
//playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 100, 1)
|
||||
flick("door_closing",src)
|
||||
sleep(10)
|
||||
density = TRUE
|
||||
opacity = FALSE
|
||||
state_open = FALSE
|
||||
update_icon()
|
||||
isSwitchingStates = FALSE
|
||||
|
||||
/obj/structure/inflatable/door/update_icon()
|
||||
/obj/structure/inflatable/door/update_icon_state()
|
||||
if(state_open)
|
||||
icon_state = "door_open"
|
||||
else
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/janitorialcart/on_reagent_change()
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/structure/janitorialcart/attackby(obj/item/I, mob/user, params)
|
||||
var/fail_msg = "<span class='notice'>There is already one of those in [src].</span>"
|
||||
@@ -66,7 +66,7 @@
|
||||
if(!myspray)
|
||||
put_in_cart(I, user)
|
||||
myspray=I
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
else
|
||||
to_chat(user, fail_msg)
|
||||
else if(istype(I, /obj/item/lightreplacer))
|
||||
@@ -79,7 +79,7 @@
|
||||
if(signs < max_signs)
|
||||
put_in_cart(I, user)
|
||||
signs++
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] can't hold any more signs.</span>")
|
||||
else if(istype(I, /obj/item/crowbar))
|
||||
@@ -163,22 +163,22 @@
|
||||
WARNING("Signs ([signs]) didn't match contents")
|
||||
signs = 0
|
||||
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
updateUsrDialog()
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/update_icon()
|
||||
overlays = null
|
||||
/obj/structure/janitorialcart/update_overlays()
|
||||
. = ..()
|
||||
if(mybag)
|
||||
overlays += "cart_garbage"
|
||||
. += "cart_garbage"
|
||||
if(mymop)
|
||||
overlays += "cart_mop"
|
||||
. += "cart_mop"
|
||||
if(myspray)
|
||||
overlays += "cart_spray"
|
||||
. += "cart_spray"
|
||||
if(myreplacer)
|
||||
overlays += "cart_replacer"
|
||||
. += "cart_replacer"
|
||||
if(signs)
|
||||
overlays += "cart_sign[signs]"
|
||||
. += "cart_sign[signs]"
|
||||
if(reagents.total_volume > 0)
|
||||
var/image/reagentsImage = image(icon,src,"cart_reagents0")
|
||||
reagentsImage.alpha = 150
|
||||
@@ -192,4 +192,4 @@
|
||||
if(76 to 100)
|
||||
reagentsImage.icon_state = "cart_reagents4"
|
||||
reagentsImage.icon += mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(reagentsImage)
|
||||
. += reagentsImage
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
down.update_icon()
|
||||
up = down = null
|
||||
|
||||
/obj/structure/ladder/update_icon()
|
||||
/obj/structure/ladder/update_icon_state()
|
||||
if(up && down)
|
||||
icon_state = "ladder11"
|
||||
|
||||
@@ -198,5 +198,5 @@
|
||||
. = ..()
|
||||
set_light(light_range, light_power) //magical glowing anchor
|
||||
|
||||
/obj/structure/ladder/unbreakable/dive_point/update_icon()
|
||||
/obj/structure/ladder/unbreakable/dive_point/update_icon_state()
|
||||
return
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
rad_insulation = RAD_MEDIUM_INSULATION
|
||||
var/initial_state
|
||||
var/state_open = FALSE
|
||||
var/isSwitchingStates = FALSE
|
||||
var/is_operating = FALSE
|
||||
var/close_delay = -1 //-1 if does not auto close.
|
||||
|
||||
var/hardness = 1
|
||||
@@ -41,20 +41,20 @@
|
||||
/obj/structure/mineral_door/Bumped(atom/user)
|
||||
..()
|
||||
if(!state_open)
|
||||
return TryToSwitchState(user)
|
||||
return try_to_operate(user)
|
||||
|
||||
/obj/structure/mineral_door/attack_ai(mob/user) //those aren't machinery, they're just big fucking slabs of a mineral
|
||||
if(isAI(user)) //so the AI can't open it
|
||||
return
|
||||
else if(isrobot(user) && Adjacent(user)) //but cyborgs can, but not remotely
|
||||
return TryToSwitchState(user)
|
||||
return try_to_operate(user)
|
||||
|
||||
/obj/structure/mineral_door/attack_hand(mob/user)
|
||||
return TryToSwitchState(user)
|
||||
return try_to_operate(user)
|
||||
|
||||
/obj/structure/mineral_door/attack_ghost(mob/user)
|
||||
if(user.can_advanced_admin_interact())
|
||||
SwitchState()
|
||||
operate()
|
||||
|
||||
/obj/structure/mineral_door/CanPass(atom/movable/mover, turf/target, height = 0)
|
||||
if(istype(mover, /obj/effect/beam))
|
||||
@@ -64,8 +64,8 @@
|
||||
/obj/structure/mineral_door/CanAtmosPass(turf/T)
|
||||
return !density
|
||||
|
||||
/obj/structure/mineral_door/proc/TryToSwitchState(atom/user)
|
||||
if(isSwitchingStates)
|
||||
/obj/structure/mineral_door/proc/try_to_operate(atom/user)
|
||||
if(is_operating)
|
||||
return
|
||||
if(isliving(user))
|
||||
var/mob/living/M = user
|
||||
@@ -75,52 +75,35 @@
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
if(!C.handcuffed)
|
||||
SwitchState()
|
||||
operate()
|
||||
else
|
||||
SwitchState()
|
||||
operate()
|
||||
else if(istype(user, /obj/mecha))
|
||||
SwitchState()
|
||||
operate()
|
||||
|
||||
/obj/structure/mineral_door/proc/SwitchState()
|
||||
if(state_open)
|
||||
Close()
|
||||
/obj/structure/mineral_door/proc/operate()
|
||||
is_operating = TRUE
|
||||
if(!state_open)
|
||||
playsound(loc, openSound, 100, 1)
|
||||
flick("[initial_state]opening",src)
|
||||
else
|
||||
Open()
|
||||
|
||||
/obj/structure/mineral_door/proc/Open()
|
||||
isSwitchingStates = TRUE
|
||||
playsound(loc, openSound, 100, 1)
|
||||
flick("[initial_state]opening",src)
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/mob/living/L in T)
|
||||
return
|
||||
playsound(loc, closeSound, 100, 1)
|
||||
flick("[initial_state]closing",src)
|
||||
sleep(10)
|
||||
density = FALSE
|
||||
opacity = FALSE
|
||||
state_open = TRUE
|
||||
density = !density
|
||||
opacity = !opacity
|
||||
state_open = !state_open
|
||||
air_update_turf(1)
|
||||
update_icon()
|
||||
isSwitchingStates = FALSE
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
is_operating = FALSE
|
||||
|
||||
if(close_delay != -1)
|
||||
spawn(close_delay)
|
||||
Close()
|
||||
if(state_open && close_delay != -1)
|
||||
addtimer(CALLBACK(src, .proc/operate), close_delay)
|
||||
|
||||
/obj/structure/mineral_door/proc/Close()
|
||||
if(isSwitchingStates || !state_open)
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/mob/living/L in T)
|
||||
return
|
||||
isSwitchingStates = TRUE
|
||||
playsound(loc, closeSound, 100, 1)
|
||||
flick("[initial_state]closing",src)
|
||||
sleep(10)
|
||||
density = TRUE
|
||||
opacity = TRUE
|
||||
state_open = FALSE
|
||||
air_update_turf(1)
|
||||
update_icon()
|
||||
isSwitchingStates = FALSE
|
||||
|
||||
/obj/structure/mineral_door/update_icon()
|
||||
/obj/structure/mineral_door/update_icon_state()
|
||||
if(state_open)
|
||||
icon_state = "[initial_state]open"
|
||||
else
|
||||
@@ -180,7 +163,7 @@
|
||||
opacity = FALSE
|
||||
rad_insulation = RAD_VERY_LIGHT_INSULATION
|
||||
|
||||
/obj/structure/mineral_door/transparent/Close()
|
||||
/obj/structure/mineral_door/transparent/operate()
|
||||
..()
|
||||
set_opacity(0)
|
||||
|
||||
@@ -235,6 +218,6 @@
|
||||
damageSound = 'sound/effects/attackblob.ogg'
|
||||
sheetType = null
|
||||
|
||||
/obj/structure/mineral_door/resin/TryToSwitchState(atom/user)
|
||||
/obj/structure/mineral_door/resin/try_to_operate(atom/user)
|
||||
if(isalien(user))
|
||||
return ..()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
density = TRUE
|
||||
container_type = OPENCONTAINER
|
||||
face_while_pulling = FALSE
|
||||
var/obj/item/mop/mymop = null
|
||||
var/obj/item/mop/stored_mop = null
|
||||
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
||||
|
||||
/obj/structure/mopbucket/Initialize(mapload)
|
||||
@@ -29,12 +29,12 @@
|
||||
|
||||
/obj/structure/mopbucket/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/mop))
|
||||
var/obj/item/mop/m = W
|
||||
if(m.reagents.total_volume < m.reagents.maximum_volume)
|
||||
m.wet_mop(src, user)
|
||||
var/obj/item/mop/M = W
|
||||
if(M.reagents.total_volume < M.reagents.maximum_volume)
|
||||
M.wet_mop(src, user)
|
||||
return
|
||||
if(!mymop)
|
||||
m.janicart_insert(user, src)
|
||||
if(!stored_mop)
|
||||
M.janicart_insert(user, src)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>Theres already a mop in the mopbucket.</span>")
|
||||
return
|
||||
@@ -47,12 +47,12 @@
|
||||
return
|
||||
|
||||
/obj/structure/mopbucket/on_reagent_change()
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/structure/mopbucket/update_icon()
|
||||
overlays.Cut()
|
||||
if(mymop)
|
||||
overlays += image(icon,"mopbucket_mop")
|
||||
/obj/structure/mopbucket/update_overlays()
|
||||
. = ..()
|
||||
if(stored_mop)
|
||||
. += "mopbucket_mop"
|
||||
if(reagents.total_volume > 0)
|
||||
var/image/reagentsImage = image(icon, src, "mopbucket_reagents0")
|
||||
reagentsImage.alpha = 150
|
||||
@@ -66,15 +66,15 @@
|
||||
if(76 to 100)
|
||||
reagentsImage.icon_state = "mopbucket_reagents4"
|
||||
reagentsImage.icon += mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(reagentsImage)
|
||||
. += reagentsImage
|
||||
|
||||
/obj/structure/mopbucket/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(mymop)
|
||||
user.put_in_hands(mymop)
|
||||
to_chat(user, "<span class='notice'>You take [mymop] from [src].</span>")
|
||||
mymop = null
|
||||
update_icon()
|
||||
if(stored_mop)
|
||||
user.put_in_hands(stored_mop)
|
||||
to_chat(user, "<span class='notice'>You take [stored_mop] from [src].</span>")
|
||||
stored_mop = null
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -40,36 +40,39 @@
|
||||
|
||||
/obj/structure/morgue/Initialize()
|
||||
. = ..()
|
||||
update()
|
||||
update_icon(update_state())
|
||||
|
||||
/obj/structure/morgue/proc/update()
|
||||
cut_overlays()
|
||||
if(!connected)
|
||||
if(contents.len)
|
||||
var/mob/living/M = locate() in contents
|
||||
var/obj/structure/closet/body_bag/B = locate() in contents
|
||||
if(M==null) M = locate() in B
|
||||
|
||||
if(M)
|
||||
var/mob/dead/observer/G = M.get_ghost()
|
||||
if(M.mind && !M.mind.suicided)
|
||||
if(M.client)
|
||||
status = REVIVABLE
|
||||
else if(G && G.client) //There is a ghost and it is connected to the server
|
||||
status = GHOST_CONNECTED
|
||||
else
|
||||
status = UNREVIVABLE
|
||||
else
|
||||
status = UNREVIVABLE
|
||||
else
|
||||
status = NOT_BODY
|
||||
else
|
||||
status = EMPTY_MORGUE
|
||||
add_overlay("morgue_[status]")
|
||||
else
|
||||
/obj/structure/morgue/proc/update_state()
|
||||
. = UPDATE_OVERLAYS
|
||||
if(connected)
|
||||
status = EXTENDED_TRAY
|
||||
return
|
||||
if(!length(contents))
|
||||
status = EMPTY_MORGUE
|
||||
return
|
||||
var/mob/living/M = locate() in contents
|
||||
var/obj/structure/closet/body_bag/B = locate() in contents
|
||||
if(!M)
|
||||
M = locate() in B
|
||||
if(!M)
|
||||
status = NOT_BODY
|
||||
return
|
||||
var/mob/dead/observer/G = M.get_ghost()
|
||||
if(M.mind && !M.mind.suicided)
|
||||
if(M.client)
|
||||
status = REVIVABLE
|
||||
return
|
||||
if(G && G.client) //There is a ghost and it is connected to the server
|
||||
status = GHOST_CONNECTED
|
||||
return
|
||||
status = UNREVIVABLE
|
||||
|
||||
/obj/structure/morgue/update_overlays()
|
||||
. = ..()
|
||||
if(!connected)
|
||||
. += "morgue_[status]"
|
||||
if(name != initial(name))
|
||||
add_overlay("morgue_label")
|
||||
. += "morgue_label"
|
||||
|
||||
/obj/structure/morgue/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -110,7 +113,7 @@
|
||||
playsound(loc, open_sound, 50, 1)
|
||||
connect()
|
||||
add_fingerprint(user)
|
||||
update()
|
||||
update_icon(update_state())
|
||||
return
|
||||
|
||||
/obj/structure/morgue/attackby(P as obj, mob/user as mob, params)
|
||||
@@ -118,7 +121,7 @@
|
||||
var/t = rename_interactive(user, P)
|
||||
if(isnull(t))
|
||||
return
|
||||
update()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
add_fingerprint(user)
|
||||
return
|
||||
return ..()
|
||||
@@ -127,7 +130,7 @@
|
||||
if(name != initial(name))
|
||||
to_chat(user, "<span class='notice'>You cut the tag off the morgue.</span>")
|
||||
name = initial(name)
|
||||
update()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/morgue/relaymove(mob/user as mob)
|
||||
@@ -196,7 +199,7 @@
|
||||
if(!( A.anchored ))
|
||||
A.forceMove(connected)
|
||||
connected.connected = null
|
||||
connected.update()
|
||||
connected.update_icon(UPDATE_OVERLAYS)
|
||||
add_fingerprint(user)
|
||||
qdel(src)
|
||||
return
|
||||
@@ -256,17 +259,18 @@
|
||||
|
||||
/obj/structure/crematorium/Initialize(mapload)
|
||||
. = ..()
|
||||
update()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/structure/crematorium/proc/update()
|
||||
cut_overlays()
|
||||
if(!connected)
|
||||
add_overlay("crema_closed")
|
||||
if(cremating)
|
||||
add_overlay("crema_active")
|
||||
return
|
||||
if(contents.len)
|
||||
add_overlay("crema_full")
|
||||
/obj/structure/crematorium/update_overlays()
|
||||
. = ..()
|
||||
if(connected)
|
||||
return
|
||||
. += "crema_closed"
|
||||
if(cremating)
|
||||
. += "crema_active"
|
||||
return
|
||||
if(length(contents))
|
||||
. += "crema_full"
|
||||
|
||||
/obj/structure/crematorium/ex_act(severity)
|
||||
switch(severity)
|
||||
@@ -306,7 +310,7 @@
|
||||
playsound(loc, open_sound, 50, 1)
|
||||
connect()
|
||||
add_fingerprint(user)
|
||||
update()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/structure/crematorium/attackby(P as obj, mob/user as mob, params)
|
||||
if(istype(P, /obj/item/pen))
|
||||
@@ -327,7 +331,7 @@
|
||||
var/turf/T = get_step(src, SOUTH)
|
||||
if(T.contents.Find(connected))
|
||||
connected.connected = src
|
||||
update()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
for(var/atom/movable/A in src)
|
||||
A.forceMove(connected.loc)
|
||||
connected.icon_state = "crema_tray"
|
||||
@@ -349,7 +353,7 @@
|
||||
|
||||
cremating = TRUE
|
||||
locked = TRUE
|
||||
update()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
for(var/mob/living/M in search_contents_for(/mob/living))
|
||||
if(QDELETED(M))
|
||||
@@ -371,7 +375,7 @@
|
||||
sleep(30)
|
||||
cremating = FALSE
|
||||
locked = FALSE
|
||||
update()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
playsound(loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
return
|
||||
|
||||
@@ -419,7 +423,7 @@
|
||||
A.forceMove(connected)
|
||||
//Foreach goto(26)
|
||||
connected.connected = null
|
||||
connected.update()
|
||||
connected.update_icon(UPDATE_OVERLAYS)
|
||||
add_fingerprint(user)
|
||||
qdel(src)
|
||||
return
|
||||
@@ -488,7 +492,7 @@
|
||||
if(istype(C)) //We found our corpse, is it inside a morgue?
|
||||
morgue = get(C.loc, /obj/structure/morgue)
|
||||
if(morgue)
|
||||
morgue.update()
|
||||
morgue.update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
#undef EXTENDED_TRAY
|
||||
#undef EMPTY_MORGUE
|
||||
|
||||
@@ -112,7 +112,7 @@ GLOBAL_LIST_EMPTY(safes)
|
||||
/obj/structure/safe/examine_status(mob/user)
|
||||
return
|
||||
|
||||
/obj/structure/safe/update_icon()
|
||||
/obj/structure/safe/update_icon_state()
|
||||
if(open)
|
||||
if(broken)
|
||||
icon_state = "[initial(icon_state)]-open-broken"
|
||||
@@ -124,17 +124,13 @@ GLOBAL_LIST_EMPTY(safes)
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
var/list/overlays_to_cut = list(drill_overlay)
|
||||
if(!drill_timer)
|
||||
overlays_to_cut += progress_bar
|
||||
|
||||
cut_overlay(overlays_to_cut)
|
||||
|
||||
/obj/structure/safe/update_overlays()
|
||||
. = ..()
|
||||
if(istype(drill, /obj/item/thermal_drill))
|
||||
var/drill_icon = istype(drill, /obj/item/thermal_drill/diamond_drill) ? "d" : "h"
|
||||
var/state = "[initial(icon_state)]_[drill_icon]-drill-[drill_timer ? "on" : "off"]"
|
||||
drill_overlay = image(icon = 'icons/effects/drill.dmi', icon_state = state, pixel_x = drill_x_offset, pixel_y = drill_y_offset)
|
||||
add_overlay(drill_overlay)
|
||||
. += drill_overlay
|
||||
|
||||
/obj/structure/safe/attack_ghost(mob/user)
|
||||
if(..() || drill)
|
||||
|
||||
@@ -49,15 +49,15 @@
|
||||
/obj/structure/table/proc/deconstruction_hints(mob/user)
|
||||
return "<span class='notice'>The top is <b>screwed</b> on, but the main <b>bolts</b> are also visible.</span>"
|
||||
|
||||
/obj/structure/table/update_icon()
|
||||
/obj/structure/table/update_icon(updates=ALL)
|
||||
. = ..()
|
||||
update_smoothing()
|
||||
|
||||
/obj/structure/table/update_icon_state()
|
||||
if((smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) && !flipped)
|
||||
icon_state = ""
|
||||
QUEUE_SMOOTH(src)
|
||||
QUEUE_SMOOTH_NEIGHBORS(src)
|
||||
|
||||
if(flipped)
|
||||
clear_smooth_overlays()
|
||||
|
||||
var/type = 0
|
||||
var/subtype = null
|
||||
for(var/direction in list(turn(dir,90), turn(dir,-90)) )
|
||||
@@ -80,7 +80,13 @@
|
||||
|
||||
icon_state = "[base]flip[type][type == 1 ? subtype : ""]"
|
||||
|
||||
return 1
|
||||
/obj/structure/table/proc/update_smoothing()
|
||||
if((smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) && !flipped)
|
||||
QUEUE_SMOOTH(src)
|
||||
QUEUE_SMOOTH_NEIGHBORS(src)
|
||||
|
||||
if(flipped)
|
||||
clear_smooth_overlays()
|
||||
|
||||
/obj/structure/table/narsie_act()
|
||||
new /obj/structure/table/wood(loc)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
/obj/structure/dispenser/Initialize(mapload)
|
||||
. = ..()
|
||||
initialize_tanks()
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/structure/dispenser/Destroy()
|
||||
QDEL_LIST(stored_plasma_tanks)
|
||||
@@ -37,21 +37,21 @@
|
||||
var/obj/item/tank/internals/oxygen/O = new(src)
|
||||
stored_oxygen_tanks.Add(O)
|
||||
|
||||
/obj/structure/dispenser/update_icon()
|
||||
cut_overlays()
|
||||
/obj/structure/dispenser/update_overlays()
|
||||
. = ..()
|
||||
var/oxy_tank_amount = LAZYLEN(stored_oxygen_tanks)
|
||||
switch(oxy_tank_amount)
|
||||
if(1 to 3)
|
||||
overlays += "oxygen-[oxy_tank_amount]"
|
||||
. += "oxygen-[oxy_tank_amount]"
|
||||
if(4 to INFINITY)
|
||||
overlays += "oxygen-4"
|
||||
. += "oxygen-4"
|
||||
|
||||
var/pla_tank_amount = LAZYLEN(stored_plasma_tanks)
|
||||
switch(pla_tank_amount)
|
||||
if(1 to 4)
|
||||
overlays += "plasma-[pla_tank_amount]"
|
||||
. += "plasma-[pla_tank_amount]"
|
||||
if(5 to INFINITY)
|
||||
overlays += "plasma-5"
|
||||
. += "plasma-5"
|
||||
|
||||
/obj/structure/dispenser/attack_hand(mob/user)
|
||||
if(..())
|
||||
@@ -119,7 +119,7 @@
|
||||
T.forceMove(loc) // If the user's hands are full, place it on the tile of the dispenser.
|
||||
|
||||
to_chat(user, "<span class='notice'>You take [T] out of [src].</span>")
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/// Called when the user clicks on the dispenser with a tank. Tries to insert the tank into the dispenser, and updates the UI if successful.
|
||||
/obj/structure/dispenser/proc/try_insert_tank(mob/living/user, list/tank_list, obj/item/tank/T)
|
||||
@@ -133,7 +133,7 @@
|
||||
|
||||
T.forceMove(src)
|
||||
tank_list.Add(T)
|
||||
update_icon()
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
to_chat(user, "<span class='notice'>You put [T] in [src].</span>")
|
||||
SStgui.update_uis(src)
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
open = !open
|
||||
update_icon()
|
||||
|
||||
/obj/structure/toilet/update_icon()
|
||||
/obj/structure/toilet/update_icon_state()
|
||||
icon_state = "toilet[open][cistern]"
|
||||
if(!anchored)
|
||||
pixel_x = 0
|
||||
@@ -340,11 +340,11 @@
|
||||
transfer_prints_to(S, TRUE)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/shower/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/shower/update_overlays()
|
||||
. = ..()
|
||||
if(on)
|
||||
var/mutable_appearance/water_falling = mutable_appearance('icons/obj/watercloset.dmi', "water", ABOVE_MOB_LAYER)
|
||||
add_overlay(water_falling)
|
||||
. += water_falling
|
||||
|
||||
/obj/machinery/shower/proc/handle_mist()
|
||||
// If there is no mist, and the shower was turned on (on a non-freezing temp): make mist in 5 seconds
|
||||
@@ -565,8 +565,7 @@
|
||||
dir = dir_choices[selected]
|
||||
update_icon() //is this necessary? probably not
|
||||
|
||||
/obj/structure/sink/update_icon()
|
||||
..()
|
||||
/obj/structure/sink/update_icon_state()
|
||||
layer = OBJ_LAYER
|
||||
if(!anchored)
|
||||
pixel_x = 0
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
setDir(ini_dir)
|
||||
move_update_air(T)
|
||||
|
||||
/obj/structure/windoor_assembly/update_icon()
|
||||
/obj/structure/windoor_assembly/update_icon_state()
|
||||
icon_state = "[facing]_[secure ? "secure_" : ""]windoor_assembly[state]"
|
||||
|
||||
/obj/structure/windoor_assembly/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
@@ -156,7 +156,7 @@
|
||||
return ..()
|
||||
|
||||
//Update to reflect changes(if applicable)
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/structure/windoor_assembly/crowbar_act(mob/user, obj/item/I) //Crowbar to complete the assembly, Step 7 complete.
|
||||
if(state != "02")
|
||||
@@ -244,7 +244,7 @@
|
||||
name = "secure anchored windoor assembly"
|
||||
else
|
||||
name = "anchored windoor assembly"
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/structure/windoor_assembly/wrench_act(mob/user, obj/item/I)
|
||||
if(state != "01")
|
||||
@@ -282,7 +282,7 @@
|
||||
name = "secure windoor assembly"
|
||||
else
|
||||
name = "windoor assembly"
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/structure/windoor_assembly/welder_act(mob/user, obj/item/I)
|
||||
if(state != "01")
|
||||
@@ -320,7 +320,7 @@
|
||||
setDir(target_dir)
|
||||
|
||||
ini_dir = dir
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/windoor_assembly/AltClick(mob/user)
|
||||
@@ -348,5 +348,5 @@
|
||||
facing = "l"
|
||||
to_chat(usr, "The windoor will now slide to the left.")
|
||||
|
||||
update_icon()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return
|
||||
|
||||
@@ -454,7 +454,8 @@
|
||||
if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
|
||||
QUEUE_SMOOTH_NEIGHBORS(src)
|
||||
|
||||
/obj/structure/window/update_icon()
|
||||
/obj/structure/window/update_overlays()
|
||||
. = ..()
|
||||
if(!QDELETED(src))
|
||||
if(!fulltile)
|
||||
return
|
||||
@@ -464,11 +465,10 @@
|
||||
if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
|
||||
QUEUE_SMOOTH(src)
|
||||
|
||||
cut_overlay(crack_overlay)
|
||||
if(ratio > 75)
|
||||
return
|
||||
crack_overlay = mutable_appearance('icons/obj/structures.dmi', "damage[ratio]", -(layer+0.1))
|
||||
add_overlay(crack_overlay)
|
||||
. += crack_overlay
|
||||
|
||||
/obj/structure/window/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
@@ -569,7 +569,7 @@
|
||||
if(active && !powered(power_channel))
|
||||
toggle_tint()
|
||||
|
||||
/obj/machinery/button/windowtint/update_icon()
|
||||
/obj/machinery/button/windowtint/update_icon_state()
|
||||
icon_state = "light[active]"
|
||||
|
||||
/obj/structure/window/plasmabasic
|
||||
|
||||
Reference in New Issue
Block a user