mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 11:34:19 +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:
@@ -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