Merge branch 'master' of https://github.com/Yawn-Wider/YWPolarisVore into July2020UpstreamPull

This commit is contained in:
Razgriz
2020-07-12 16:14:45 -07:00
1029 changed files with 311473 additions and 232993 deletions
+1 -1
View File
@@ -123,7 +123,7 @@
health -= amount
if(health <= 0)
visible_message("<span class='warning'>\The [src] breaks down!</span>")
playsound(loc, 'sound/effects/grillehit.ogg', 50, 1)
playsound(src, 'sound/effects/grillehit.ogg', 50, 1)
new /obj/item/stack/rods(get_turf(src))
Destroy()
@@ -1,475 +1,486 @@
/obj/structure/closet
name = "closet"
desc = "It's a basic storage unit."
icon = 'icons/obj/closet.dmi'
icon_state = "closed"
density = 1
w_class = ITEMSIZE_HUGE
layer = UNDER_JUNK_LAYER
var/icon_closed = "closed"
var/icon_opened = "open"
var/opened = 0
var/sealed = 0
var/seal_tool = /obj/item/weapon/weldingtool //Tool used to seal the closet, defaults to welder
var/wall_mounted = 0 //never solid (You can always pass over it)
var/health = 100
var/breakout = 0 //if someone is currently breaking out. mutex
var/breakout_time = 2 //2 minutes by default
var/breakout_sound = 'sound/effects/grillehit.ogg' //Sound that plays while breaking out
var/storage_capacity = 2 * MOB_MEDIUM //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/storage_cost = 40 //How much space this closet takes up if it's stuffed in another closet
var/open_sound = 'sound/machines/click.ogg'
var/close_sound = 'sound/machines/click.ogg'
var/store_misc = 1 //Chameleon item check
var/store_items = 1 //Will the closet store items?
var/store_mobs = 1 //Will the closet store mobs?
var/max_closets = 0 //Number of other closets allowed on tile before it won't close.
var/list/starts_with
/obj/structure/closet/Initialize()
..()
// Closets need to come later because of spawners potentially creating objects during init.
return INITIALIZE_HINT_LATELOAD
/obj/structure/closet/LateInitialize()
. = ..()
if(starts_with)
create_objects_in_loc(src, starts_with)
starts_with = null
if(!opened) // if closed, any item at the crate's loc is put in the contents
if(istype(loc, /mob/living)) return //VOREStation Edit - No collecting mob organs if spawned inside mob
var/obj/item/I
for(I in src.loc)
if(I.density || I.anchored || I == src) continue
I.forceMove(src)
// adjust locker size to hold all items with 5 units of free store room
var/content_size = 0
for(I in src.contents)
content_size += CEILING(I.w_class/2, 1)
if(content_size > storage_capacity-5)
storage_capacity = content_size + 5
update_icon()
/obj/structure/closet/examine(mob/user)
. = ..()
if(Adjacent(user) || isobserver(user))
var/content_size = 0
for(var/obj/item/I in src.contents)
if(!I.anchored)
content_size += CEILING(I.w_class/2, 1)
if(!content_size)
. += "It is empty."
else if(storage_capacity > content_size*4)
. += "It is barely filled."
else if(storage_capacity > content_size*2)
. += "It is less than half full."
else if(storage_capacity > content_size)
. += "There is still some free space."
else
. += "It is full."
if(!src.opened && isobserver(user))
. += "It contains: [counting_english_list(contents)]"
/obj/structure/closet/CanPass(atom/movable/mover, turf/target)
if(wall_mounted)
return TRUE
return ..()
/obj/structure/closet/proc/can_open()
if(src.sealed)
return 0
return 1
/obj/structure/closet/proc/can_close()
var/closet_count = 0
for(var/obj/structure/closet/closet in get_turf(src))
if(closet != src)
if(!closet.anchored)
closet_count ++
if(closet_count > max_closets)
return 0
return 1
/obj/structure/closet/proc/dump_contents()
//Cham Projector Exception
for(var/obj/effect/dummy/chameleon/AD in src)
AD.forceMove(src.loc)
for(var/obj/I in src)
I.forceMove(src.loc)
for(var/mob/M in src)
M.forceMove(src.loc)
if(M.client)
M.client.eye = M.client.mob
M.client.perspective = MOB_PERSPECTIVE
/obj/structure/closet/proc/open()
if(src.opened)
return 0
if(!src.can_open())
return 0
src.dump_contents()
src.icon_state = src.icon_opened
src.opened = 1
playsound(src.loc, open_sound, 15, 1, -3)
if(initial(density))
density = !density
return 1
/obj/structure/closet/proc/close()
if(!src.opened)
return 0
if(!src.can_close())
return 0
var/stored_units = 0
if(store_misc)
stored_units += store_misc(stored_units)
if(store_items)
stored_units += store_items(stored_units)
if(store_mobs)
stored_units += store_mobs(stored_units)
if(max_closets)
stored_units += store_closets(stored_units)
src.icon_state = src.icon_closed
src.opened = 0
playsound(src.loc, close_sound, 15, 1, -3)
if(initial(density))
density = !density
return 1
//Cham Projector Exception
/obj/structure/closet/proc/store_misc(var/stored_units)
var/added_units = 0
for(var/obj/effect/dummy/chameleon/AD in src.loc)
if((stored_units + added_units) > storage_capacity)
break
AD.forceMove(src)
added_units++
return added_units
/obj/structure/closet/proc/store_items(var/stored_units)
var/added_units = 0
for(var/obj/item/I in src.loc)
var/item_size = CEILING(I.w_class / 2, 1)
if(stored_units + added_units + item_size > storage_capacity)
continue
if(!I.anchored)
I.forceMove(src)
added_units += item_size
return added_units
/obj/structure/closet/proc/store_mobs(var/stored_units)
var/added_units = 0
for(var/mob/living/M in src.loc)
if(M.buckled || M.pinned.len)
continue
if(stored_units + added_units + M.mob_size > storage_capacity)
break
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.forceMove(src)
added_units += M.mob_size
return added_units
/obj/structure/closet/proc/store_closets(var/stored_units)
var/added_units = 0
for(var/obj/structure/closet/C in src.loc)
if(C == src) //Don't store ourself
continue
if(C.anchored) //Don't worry about anchored things on the same tile
continue
if(C.max_closets) //Prevents recursive storage
continue
if(stored_units + added_units + storage_cost > storage_capacity)
break
C.forceMove(src)
added_units += storage_cost
return added_units
/obj/structure/closet/proc/toggle(mob/user as mob)
if(!(src.opened ? src.close() : src.open()))
to_chat(user, "<span class='notice'>It won't budge!</span>")
return
update_icon()
// this should probably use dump_contents()
/obj/structure/closet/ex_act(severity)
switch(severity)
if(1)
for(var/atom/movable/A as mob|obj in src)//pulls everything out of the locker and hits it with an explosion
A.forceMove(src.loc)
A.ex_act(severity + 1)
qdel(src)
if(2)
if(prob(50))
for (var/atom/movable/A as mob|obj in src)
A.forceMove(src.loc)
A.ex_act(severity + 1)
qdel(src)
if(3)
if(prob(5))
for(var/atom/movable/A as mob|obj in src)
A.forceMove(src.loc)
qdel(src)
/obj/structure/closet/blob_act()
damage(100)
/obj/structure/closet/proc/damage(var/damage)
health -= damage
if(health <= 0)
for(var/atom/movable/A in src)
A.forceMove(src.loc)
qdel(src)
/obj/structure/closet/bullet_act(var/obj/item/projectile/Proj)
var/proj_damage = Proj.get_structure_damage()
if(!proj_damage)
return
..()
damage(proj_damage)
return
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(src.opened)
if(istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W
src.MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
return 0
if(istype(W,/obj/item/tk_grab))
return 0
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(!WT.remove_fuel(0,user))
if(!WT.isOn())
return
else
to_chat(user, "<span class='notice'>You need more welding fuel to complete this task.</span>")
return
playsound(src, WT.usesound, 50)
new /obj/item/stack/material/steel(src.loc)
for(var/mob/M in viewers(src))
M.show_message("<span class='notice'>\The [src] has been cut apart by [user] with \the [WT].</span>", 3, "You hear welding.", 2)
qdel(src)
return
if(istype(W, /obj/item/weapon/storage/laundry_basket) && W.contents.len)
var/obj/item/weapon/storage/laundry_basket/LB = W
var/turf/T = get_turf(src)
for(var/obj/item/I in LB.contents)
LB.remove_from_storage(I, T)
user.visible_message("<span class='notice'>[user] empties \the [LB] into \the [src].</span>", \
"<span class='notice'>You empty \the [LB] into \the [src].</span>", \
"<span class='notice'>You hear rustling of clothes.</span>")
return
if(isrobot(user))
return
if(W.loc != user) // This should stop mounted modules ending up outside the module.
return
usr.drop_item()
if(W)
W.forceMove(src.loc)
else if(istype(W, /obj/item/weapon/packageWrap))
return
else if(seal_tool)
if(istype(W, seal_tool))
var/obj/item/weapon/S = W
if(istype(S, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = S
if(!WT.remove_fuel(0,user))
if(!WT.isOn())
return
else
to_chat(user, "<span class='notice'>You need more welding fuel to complete this task.</span>")
return
if(do_after(user, 20 * S.toolspeed))
playsound(src, S.usesound, 50)
src.sealed = !src.sealed
src.update_icon()
for(var/mob/M in viewers(src))
M.show_message("<span class='warning'>[src] has been [sealed?"sealed":"unsealed"] by [user.name].</span>", 3)
else if(W.is_wrench())
if(sealed)
if(anchored)
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
else
user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
playsound(src, W.usesound, 50)
if(do_after(user, 20 * W.toolspeed))
if(!src) return
to_chat(user, "<span class='notice'>You [anchored? "un" : ""]secured \the [src]!</span>")
anchored = !anchored
else
src.attack_hand(user)
return
/obj/structure/closet/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
if(istype(O, /obj/screen)) //fix for HUD elements making their way into the world -Pete
return
if(O.loc == user)
return
if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis)
return
if((!( istype(O, /atom/movable) ) || O.anchored || !Adjacent(user) || !Adjacent(O) || !user.Adjacent(O) || user.contents.Find(src)))
return
if(!isturf(user.loc)) // are you in a container/closet/pod/etc?
return
if(!src.opened)
return
if(istype(O, /obj/structure/closet))
return
step_towards(O, src.loc)
if(user != O)
user.show_viewers("<span class='danger'>[user] stuffs [O] into [src]!</span>")
src.add_fingerprint(user)
return
/obj/structure/closet/attack_robot(mob/user)
if(Adjacent(user))
attack_hand(user)
/obj/structure/closet/relaymove(mob/user as mob)
if(user.stat || !isturf(src.loc))
return
if(!src.open())
to_chat(user, "<span class='notice'>It won't budge!</span>")
/obj/structure/closet/attack_hand(mob/user as mob)
src.add_fingerprint(user)
src.toggle(user)
// tk grab then use on self
/obj/structure/closet/attack_self_tk(mob/user as mob)
src.add_fingerprint(user)
if(!src.toggle())
to_chat(usr, "<span class='notice'>It won't budge!</span>")
/obj/structure/closet/verb/verb_toggleopen()
set src in oview(1)
set category = "Object"
set name = "Toggle Open"
if(!usr.canmove || usr.stat || usr.restrained())
return
if(ishuman(usr) || isrobot(usr))
src.add_fingerprint(usr)
src.toggle(usr)
else
to_chat(usr, "<span class='warning'>This mob type can't use this verb.</span>")
/obj/structure/closet/update_icon()//Putting the sealed stuff in updateicon() so it's easy to overwrite for special cases (Fridges, cabinets, and whatnot)
overlays.Cut()
if(!opened)
icon_state = icon_closed
if(sealed)
overlays += "welded"
else
icon_state = icon_opened
/obj/structure/closet/attack_generic(var/mob/user, var/damage, var/attack_message = "destroys")
if(damage < STRUCTURE_MIN_DAMAGE_THRESHOLD)
return
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
dump_contents()
spawn(1) qdel(src)
return 1
/obj/structure/closet/proc/req_breakout()
if(opened)
return 0 //Door's open... wait, why are you in it's contents then?
if(!sealed)
return 0 //closed but not sealed...
return 1
/obj/structure/closet/container_resist(var/mob/living/escapee)
if(breakout || !req_breakout())
return
escapee.setClickCooldown(100)
//okay, so the closet is either sealed or locked... resist!!!
to_chat(escapee, "<span class='warning'>You lean on the back of \the [src] and start pushing the door open. (this will take about [breakout_time] minutes)</span>")
visible_message("<span class='danger'>\The [src] begins to shake violently!</span>")
spawn(0)
breakout = 1 //can't think of a better way to do this right now.
for(var/i in 1 to (6*breakout_time * 2)) //minutes * 6 * 5seconds * 2
if(!do_after(escapee, 50)) //5 seconds
breakout = 0
return
if(!escapee || escapee.incapacitated() || escapee.loc != src)
breakout = 0
return //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
//Perform the same set of checks as above for weld and lock status to determine if there is even still a point in 'resisting'...
if(!req_breakout())
breakout = 0
return
playsound(src.loc, breakout_sound, 100, 1)
animate_shake()
add_fingerprint(escapee)
//Well then break it!
breakout = 0
to_chat(escapee, "<span class='warning'>You successfully break out!</span>")
visible_message("<span class='danger'>\The [escapee] successfully broke out of \the [src]!</span>")
playsound(src.loc, breakout_sound, 100, 1)
break_open()
animate_shake()
/obj/structure/closet/proc/break_open()
sealed = 0
update_icon()
//Do this to prevent contents from being opened into nullspace (read: bluespace)
if(istype(loc, /obj/structure/bigDelivery))
var/obj/structure/bigDelivery/BD = loc
BD.unwrap()
open()
/obj/structure/closet/proc/animate_shake()
var/init_px = pixel_x
var/shake_dir = pick(-1, 1)
animate(src, transform=turn(matrix(), 8*shake_dir), pixel_x=init_px + 2*shake_dir, time=1)
animate(transform=null, pixel_x=init_px, time=6, easing=ELASTIC_EASING)
/obj/structure/closet/onDropInto(var/atom/movable/AM)
return
/obj/structure/closet/AllowDrop()
return TRUE
/obj/structure/closet/return_air_for_internal_lifeform(var/mob/living/L)
if(src.loc)
if(istype(src.loc, /obj/structure/closet))
return (loc.return_air_for_internal_lifeform(L))
return return_air()
/obj/structure/closet/take_damage(var/damage)
if(damage < STRUCTURE_MIN_DAMAGE_THRESHOLD)
return
dump_contents()
spawn(1) qdel(src)
return 1
// Someone should really merge secure closets and crates into this, which Bay has done already.
/obj/structure/closet
name = "closet"
desc = "It's a basic storage unit."
icon = 'icons/obj/closets/bases/closet.dmi'
icon_state = "base"
density = 1
w_class = ITEMSIZE_HUGE
layer = UNDER_JUNK_LAYER
var/opened = 0
var/sealed = 0
var/seal_tool = /obj/item/weapon/weldingtool //Tool used to seal the closet, defaults to welder
var/wall_mounted = 0 //never solid (You can always pass over it)
var/health = 100
var/breakout = 0 //if someone is currently breaking out. mutex
var/breakout_time = 2 //2 minutes by default
var/breakout_sound = 'sound/effects/grillehit.ogg' //Sound that plays while breaking out
var/storage_capacity = 2 * MOB_MEDIUM //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/storage_cost = 40 //How much space this closet takes up if it's stuffed in another closet
var/open_sound = 'sound/machines/click.ogg'
var/close_sound = 'sound/machines/click.ogg'
var/store_misc = 1 //Chameleon item check
var/store_items = 1 //Will the closet store items?
var/store_mobs = 1 //Will the closet store mobs?
var/max_closets = 0 //Number of other closets allowed on tile before it won't close.
var/list/starts_with // List of type = count (or just type for 1)
var/closet_appearance = /decl/closet_appearance // The /decl that defines what decals we end up with, that makes our look unique
/obj/structure/closet/Initialize()
..()
// Closets need to come later because of spawners potentially creating objects during init.
return INITIALIZE_HINT_LATELOAD
/obj/structure/closet/LateInitialize()
. = ..()
if(starts_with)
create_objects_in_loc(src, starts_with)
starts_with = null
if(!opened) // if closed, any item at the crate's loc is put in the contents
if(istype(loc, /mob/living)) return //VOREStation Edit - No collecting mob organs if spawned inside mob
var/obj/item/I
for(I in loc)
if(I.density || I.anchored || I == src) continue
I.forceMove(src)
// adjust locker size to hold all items with 5 units of free store room
var/content_size = 0
for(I in contents)
content_size += CEILING(I.w_class/2, 1)
if(content_size > storage_capacity-5)
storage_capacity = content_size + 5
if(ispath(closet_appearance))
var/decl/closet_appearance/app = GLOB.closet_appearances[closet_appearance]
if(app)
icon = app.icon
color = null
update_icon()
/obj/structure/closet/examine(mob/user)
. = ..()
if(Adjacent(user) || isobserver(user))
var/content_size = 0
for(var/obj/item/I in contents)
if(!I.anchored)
content_size += CEILING(I.w_class/2, 1)
if(!content_size)
. += "It is empty."
else if(storage_capacity > content_size*4)
. += "It is barely filled."
else if(storage_capacity > content_size*2)
. += "It is less than half full."
else if(storage_capacity > content_size)
. += "There is still some free space."
else
. += "It is full."
if(!opened && isobserver(user))
. += "It contains: [counting_english_list(contents)]"
/obj/structure/closet/CanPass(atom/movable/mover, turf/target)
if(wall_mounted)
return TRUE
return ..()
/obj/structure/closet/proc/can_open()
if(sealed)
return 0
return 1
/obj/structure/closet/proc/can_close()
var/closet_count = 0
for(var/obj/structure/closet/closet in get_turf(src))
if(closet != src)
if(!closet.anchored)
closet_count ++
if(closet_count > max_closets)
return 0
return 1
/obj/structure/closet/proc/dump_contents()
//Cham Projector Exception
for(var/obj/effect/dummy/chameleon/AD in src)
AD.forceMove(loc)
for(var/obj/I in src)
I.forceMove(loc)
for(var/mob/M in src)
M.forceMove(loc)
if(M.client)
M.client.eye = M.client.mob
M.client.perspective = MOB_PERSPECTIVE
/obj/structure/closet/proc/open()
if(opened)
return 0
if(!can_open())
return 0
dump_contents()
opened = 1
playsound(src, open_sound, 15, 1, -3)
if(initial(density))
density = !density
update_icon()
return 1
/obj/structure/closet/proc/close()
if(!opened)
return 0
if(!can_close())
return 0
var/stored_units = 0
if(store_misc)
stored_units += store_misc(stored_units)
if(store_items)
stored_units += store_items(stored_units)
if(store_mobs)
stored_units += store_mobs(stored_units)
if(max_closets)
stored_units += store_closets(stored_units)
opened = 0
playsound(src, close_sound, 15, 1, -3)
if(initial(density))
density = !density
update_icon()
return 1
//Cham Projector Exception
/obj/structure/closet/proc/store_misc(var/stored_units)
var/added_units = 0
for(var/obj/effect/dummy/chameleon/AD in loc)
if((stored_units + added_units) > storage_capacity)
break
AD.forceMove(src)
added_units++
return added_units
/obj/structure/closet/proc/store_items(var/stored_units)
var/added_units = 0
for(var/obj/item/I in loc)
var/item_size = CEILING(I.w_class / 2, 1)
if(stored_units + added_units + item_size > storage_capacity)
continue
if(!I.anchored)
I.forceMove(src)
added_units += item_size
return added_units
/obj/structure/closet/proc/store_mobs(var/stored_units)
var/added_units = 0
for(var/mob/living/M in loc)
if(M.buckled || M.pinned.len)
continue
if(stored_units + added_units + M.mob_size > storage_capacity)
break
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.forceMove(src)
added_units += M.mob_size
return added_units
/obj/structure/closet/proc/store_closets(var/stored_units)
var/added_units = 0
for(var/obj/structure/closet/C in loc)
if(C == src) //Don't store ourself
continue
if(C.anchored) //Don't worry about anchored things on the same tile
continue
if(C.max_closets) //Prevents recursive storage
continue
if(stored_units + added_units + storage_cost > storage_capacity)
break
C.forceMove(src)
added_units += storage_cost
return added_units
/obj/structure/closet/proc/toggle(mob/user as mob)
if(!(opened ? close() : open()))
to_chat(user, "<span class='notice'>It won't budge!</span>")
return
update_icon()
// this should probably use dump_contents()
/obj/structure/closet/ex_act(severity)
switch(severity)
if(1)
for(var/atom/movable/A as mob|obj in src)//pulls everything out of the locker and hits it with an explosion
A.forceMove(loc)
A.ex_act(severity + 1)
qdel(src)
if(2)
if(prob(50))
for (var/atom/movable/A as mob|obj in src)
A.forceMove(loc)
A.ex_act(severity + 1)
qdel(src)
if(3)
if(prob(5))
for(var/atom/movable/A as mob|obj in src)
A.forceMove(loc)
qdel(src)
/obj/structure/closet/blob_act()
damage(100)
/obj/structure/closet/proc/damage(var/damage)
health -= damage
if(health <= 0)
for(var/atom/movable/A in src)
A.forceMove(loc)
qdel(src)
/obj/structure/closet/bullet_act(var/obj/item/projectile/Proj)
var/proj_damage = Proj.get_structure_damage()
if(!proj_damage)
return
..()
damage(proj_damage)
return
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(opened)
if(istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W
MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
return 0
if(istype(W,/obj/item/tk_grab))
return 0
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(!WT.remove_fuel(0,user))
if(!WT.isOn())
return
else
to_chat(user, "<span class='notice'>You need more welding fuel to complete this task.</span>")
return
playsound(src, WT.usesound, 50)
new /obj/item/stack/material/steel(loc)
for(var/mob/M in viewers(src))
M.show_message("<span class='notice'>\The [src] has been cut apart by [user] with \the [WT].</span>", 3, "You hear welding.", 2)
qdel(src)
return
if(istype(W, /obj/item/weapon/storage/laundry_basket) && W.contents.len)
var/obj/item/weapon/storage/laundry_basket/LB = W
var/turf/T = get_turf(src)
for(var/obj/item/I in LB.contents)
LB.remove_from_storage(I, T)
user.visible_message("<span class='notice'>[user] empties \the [LB] into \the [src].</span>", \
"<span class='notice'>You empty \the [LB] into \the [src].</span>", \
"<span class='notice'>You hear rustling of clothes.</span>")
return
if(isrobot(user))
return
if(W.loc != user) // This should stop mounted modules ending up outside the module.
return
usr.drop_item()
if(W)
W.forceMove(loc)
else if(istype(W, /obj/item/weapon/packageWrap))
return
else if(seal_tool)
if(istype(W, seal_tool))
var/obj/item/weapon/S = W
if(istype(S, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = S
if(!WT.remove_fuel(0,user))
if(!WT.isOn())
return
else
to_chat(user, "<span class='notice'>You need more welding fuel to complete this task.</span>")
return
if(do_after(user, 20 * S.toolspeed))
playsound(src, S.usesound, 50)
sealed = !sealed
update_icon()
for(var/mob/M in viewers(src))
M.show_message("<span class='warning'>[src] has been [sealed?"sealed":"unsealed"] by [user.name].</span>", 3)
else if(W.is_wrench())
if(sealed)
if(anchored)
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
else
user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
playsound(src, W.usesound, 50)
if(do_after(user, 20 * W.toolspeed))
if(!src) return
to_chat(user, "<span class='notice'>You [anchored? "un" : ""]secured \the [src]!</span>")
anchored = !anchored
else
attack_hand(user)
return
/obj/structure/closet/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
if(istype(O, /obj/screen)) //fix for HUD elements making their way into the world -Pete
return
if(O.loc == user)
return
if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis)
return
if((!( istype(O, /atom/movable) ) || O.anchored || !Adjacent(user) || !Adjacent(O) || !user.Adjacent(O) || user.contents.Find(src)))
return
if(!isturf(user.loc)) // are you in a container/closet/pod/etc?
return
if(!opened)
return
if(istype(O, /obj/structure/closet))
return
step_towards(O, loc)
if(user != O)
user.show_viewers("<span class='danger'>[user] stuffs [O] into [src]!</span>")
add_fingerprint(user)
return
/obj/structure/closet/attack_robot(mob/user)
if(Adjacent(user))
attack_hand(user)
/obj/structure/closet/relaymove(mob/user as mob)
if(user.stat || !isturf(loc))
return
if(!open())
to_chat(user, "<span class='notice'>It won't budge!</span>")
/obj/structure/closet/attack_hand(mob/user as mob)
add_fingerprint(user)
toggle(user)
// tk grab then use on self
/obj/structure/closet/attack_self_tk(mob/user as mob)
add_fingerprint(user)
if(!toggle())
to_chat(usr, "<span class='notice'>It won't budge!</span>")
/obj/structure/closet/verb/verb_toggleopen()
set src in oview(1)
set category = "Object"
set name = "Toggle Open"
if(!usr.canmove || usr.stat || usr.restrained())
return
if(ishuman(usr) || isrobot(usr))
add_fingerprint(usr)
toggle(usr)
else
to_chat(usr, "<span class='warning'>This mob type can't use this verb.</span>")
/obj/structure/closet/update_icon()
if(opened)
icon_state = "open"
else
icon_state = "closed_unlocked[sealed ? "_welded" : ""]"
/obj/structure/closet/attack_generic(var/mob/user, var/damage, var/attack_message = "destroys")
if(damage < STRUCTURE_MIN_DAMAGE_THRESHOLD)
return
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
dump_contents()
spawn(1) qdel(src)
return 1
/obj/structure/closet/proc/req_breakout()
if(opened)
return 0 //Door's open... wait, why are you in it's contents then?
if(!sealed)
return 0 //closed but not sealed...
return 1
/obj/structure/closet/container_resist(var/mob/living/escapee)
if(breakout || !req_breakout())
return
escapee.setClickCooldown(100)
//okay, so the closet is either sealed or locked... resist!!!
to_chat(escapee, "<span class='warning'>You lean on the back of \the [src] and start pushing the door open. (this will take about [breakout_time] minutes)</span>")
visible_message("<span class='danger'>\The [src] begins to shake violently!</span>")
breakout = 1 //can't think of a better way to do this right now.
for(var/i in 1 to (6*breakout_time * 2)) //minutes * 6 * 5seconds * 2
if(!do_after(escapee, 50)) //5 seconds
breakout = 0
return
if(!escapee || escapee.incapacitated() || escapee.loc != src)
breakout = 0
return //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
//Perform the same set of checks as above for weld and lock status to determine if there is even still a point in 'resisting'...
if(!req_breakout())
breakout = 0
return
playsound(src, breakout_sound, 100, 1)
animate_shake()
add_fingerprint(escapee)
//Well then break it!
breakout = 0
to_chat(escapee, "<span class='warning'>You successfully break out!</span>")
visible_message("<span class='danger'>\The [escapee] successfully broke out of \the [src]!</span>")
playsound(src, breakout_sound, 100, 1)
break_open()
animate_shake()
/obj/structure/closet/proc/break_open()
sealed = 0
update_icon()
//Do this to prevent contents from being opened into nullspace (read: bluespace)
if(istype(loc, /obj/structure/bigDelivery))
var/obj/structure/bigDelivery/BD = loc
BD.unwrap()
open()
/obj/structure/closet/proc/animate_shake()
var/init_px = pixel_x
var/shake_dir = pick(-1, 1)
animate(src, transform=turn(matrix(), 8*shake_dir), pixel_x=init_px + 2*shake_dir, time=1)
animate(transform=null, pixel_x=init_px, time=6, easing=ELASTIC_EASING)
/obj/structure/closet/onDropInto(var/atom/movable/AM)
return
/obj/structure/closet/AllowDrop()
return TRUE
/obj/structure/closet/return_air_for_internal_lifeform(var/mob/living/L)
if(loc)
if(istype(loc, /obj/structure/closet))
return (loc.return_air_for_internal_lifeform(L))
return return_air()
/obj/structure/closet/take_damage(var/damage)
if(damage < STRUCTURE_MIN_DAMAGE_THRESHOLD)
return
dump_contents()
spawn(1) qdel(src)
return 1
// Just a generic cabinet for mappers to use
/obj/structure/closet/cabinet
name = "cabinet"
icon = 'icons/obj/closets/bases/cabinet.dmi'
closet_appearance = /decl/closet_appearance/cabinet
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,98 @@
/decl/closet_appearance/wall/autolok
color = COLOR_GRAY20
decals = null
extra_decals = list(
"stripe_outer" = COLOR_BLUE_GRAY,
"stripe_inner" = COLOR_OFF_WHITE
)
/decl/closet_appearance/secure_closet/talon
color = COLOR_GRAY80
decals = list(
"lower_holes"
)
/decl/closet_appearance/secure_closet/talon/engineer
extra_decals = list(
"stripes_horizontal" = COLOR_BEASTY_BROWN
)
/decl/closet_appearance/secure_closet/talon/guard
extra_decals = list(
"stripes_horizontal" = COLOR_NT_RED
)
/decl/closet_appearance/secure_closet/talon/pilot
extra_decals = list(
"stripes_horizontal" = COLOR_PURPLE
)
/decl/closet_appearance/secure_closet/talon/doctor
extra_decals = list(
"stripes_horizontal" = COLOR_SKY_BLUE
)
/decl/closet_appearance/secure_closet/talon/captain
extra_decals = list(
"stripes_horizontal" = COLOR_GOLD
)
/decl/closet_appearance/secure_closet/nanotrasen
color = COLOR_BOTTLE_GREEN
decals = list(
"lower_holes"
)
/decl/closet_appearance/secure_closet/nanotrasen/security
extra_decals = list(
"stripe_vertical_mid_full" = COLOR_NAVY_BLUE,
"nanotrasen" = COLOR_GOLD
)
/decl/closet_appearance/secure_closet/nanotrasen/warden
extra_decals = list(
"stripe_vertical_left_full" = COLOR_NAVY_BLUE,
"stripe_vertical_right_full" = COLOR_NAVY_BLUE,
"nanotrasen" = COLOR_GOLD
)
/decl/closet_appearance/secure_closet/nanotrasen/commander
extra_decals = list(
"stripe_vertical_left_full" = COLOR_NAVY_BLUE,
"stripe_vertical_mid_full" = COLOR_GOLD,
"stripe_vertical_right_full" = COLOR_NAVY_BLUE,
"nanotrasen" = COLOR_GOLD
)
/decl/closet_appearance/secure_closet/expedition
color = COLOR_LIGHT_VIOLET
decals = list(
"lower_side_vent"
)
/decl/closet_appearance/secure_closet/expedition/pilot
extra_decals = list(
"stripe_vertical_mid_full" = COLOR_DARK_ORANGE,
"exped" = COLOR_DARK_ORANGE
)
/decl/closet_appearance/secure_closet/expedition/sar
extra_decals = list(
"stripe_vertical_mid_full" = COLOR_SAN_MARINO_BLUE,
"exped" = COLOR_SAN_MARINO_BLUE
)
/decl/closet_appearance/secure_closet/expedition/explorer
extra_decals = list(
"stripe_vertical_left_full" = COLOR_PURPLE,
"stripe_vertical_right_full" = COLOR_PURPLE,
"exped" = COLOR_PURPLE
)
/decl/closet_appearance/secure_closet/expedition/pathfinder
extra_decals = list(
"stripe_vertical_left_full" = COLOR_PURPLE,
"stripe_vertical_mid_full" = COLOR_GRAY40,
"stripe_vertical_right_full" = COLOR_PURPLE,
"exped" = COLOR_GRAY40
)
@@ -0,0 +1,36 @@
/decl/closet_appearance/wall/autolok/shuttleemerg
color = COLOR_YELLOW_GRAY
decals = list(
"upper_side_vent",
"lower_side_vent"
)
/decl/closet_appearance/secure_closet/lumber
can_lock = FALSE
color = COLOR_WARM_YELLOW
decals = list(
"upper_side_vent",
"lower_side_vent"
)
extra_decals = list(
"stripe_vertical_mid_full" = COLOR_BEASTY_BROWN,
"stripe_vertical_left_full" = COLOR_BEASTY_BROWN
)
/decl/closet_appearance/secure_closet/blueshield
color = COLOR_PALE_BLUE_GRAY
decals = list("lower_side_vent")
extra_decals = list(
"stripe_vertical_mid_full" = COLOR_CLOSET_GOLD,
"command" = COLOR_CLOSET_GOLD
)
/decl/closet_appearance/secure_closet/security_pilot
color = COLOR_NT_RED
decals = list(
"lower_holes"
)
extra_decals = list(
"stripe_vertical_mid_partial" = COLOR_WARM_YELLOW,
"hop" = COLOR_WARM_YELLOW
)
@@ -1,30 +1,25 @@
/obj/structure/closet/coffin
name = "coffin"
desc = "It's a burial receptacle for the dearly departed."
icon_state = "coffin"
icon_closed = "coffin"
icon_opened = "coffin_open"
icon = 'icons/obj/closets/coffin.dmi'
icon_state = "closed_unlocked"
seal_tool = /obj/item/weapon/tool/screwdriver
breakout_sound = 'sound/weapons/tablehit1.ogg'
/obj/structure/closet/coffin/update_icon()
if(!opened)
icon_state = icon_closed
else
icon_state = icon_opened
closet_appearance = null // Special icon for us
/* Graves */
/obj/structure/closet/grave
name = "grave"
desc = "Dirt."
icon_state = "grave"
icon_closed = "grave"
icon_opened = "grave_open"
icon = 'icons/obj/closets/grave.dmi'
icon_state = "closed_unlocked"
seal_tool = null
breakout_sound = 'sound/weapons/thudswoosh.ogg'
anchored = 1
max_closets = 1
opened = 1
closet_appearance = null // Special icon for us
/obj/structure/closet/grave/attack_hand(mob/user as mob)
if(opened)
@@ -1,6 +1,4 @@
/obj/structure/closet/crate/critter
name = "critter crate"
desc = "A crate which can sustain life for a while."
icon_state = "critter"
icon_opened = "critteropen"
icon_closed = "critter"
closet_appearance = /decl/closet_appearance/large_crate/critter
@@ -4,15 +4,24 @@
icon = 'icons/obj/egg_vr.dmi'
icon_state = "egg"
density = 0 //Just in case there's a lot of eggs, so it doesn't block hallways/areas.
icon_closed = "egg"
icon_opened = "egg_open"
icon_locked = "egg"
var/icon_closed = "egg"
var/icon_opened = "egg_open"
var/icon_locked = "egg"
open_sound = 'sound/vore/schlorp.ogg'
close_sound = 'sound/vore/schlorp.ogg'
opened = 0
sealed = 0 //Don't touch this.
health = 100
/obj/structure/closet/secure_closet/egg/update_icon()
if(opened)
icon_state = icon_opened
else
if(sealed)
icon_state = icon_locked
else
icon_state = icon_closed
/obj/structure/closet/secure_closet/egg/attackby(obj/item/weapon/W, mob/user as mob) //This also prevents crew from welding the eggs and making them unable to be opened.
if(istype(W, /obj/item/weapon/weldingtool))
src.dump_contents()
@@ -1,8 +1,7 @@
/obj/structure/closet/athletic_mixed
name = "athletic wardrobe"
desc = "It's a storage unit for athletic wear."
icon_state = "mixed"
icon_closed = "mixed"
closet_appearance = /decl/closet_appearance/wardrobe/mixed
starts_with = list(
/obj/item/clothing/under/shorts/grey,
@@ -24,6 +23,7 @@
/obj/structure/closet/boxinggloves
name = "boxing gloves"
desc = "It's a storage unit for gloves for use in the boxing ring."
closet_appearance = /decl/closet_appearance/wardrobe/mixed
starts_with = list(
/obj/item/clothing/gloves/boxing/blue,
@@ -34,6 +34,7 @@
/obj/structure/closet/masks
name = "mask closet"
desc = "IT'S A STORAGE UNIT FOR FIGHTER MASKS OLE!"
closet_appearance = /decl/closet_appearance/wardrobe/mixed
starts_with = list(
/obj/item/clothing/mask/luchador,
@@ -44,8 +45,7 @@
/obj/structure/closet/lasertag/red
name = "red laser tag equipment"
desc = "It's a storage unit for laser tag equipment."
icon_state = "red"
icon_closed = "red"
closet_appearance = /decl/closet_appearance/wardrobe/red
starts_with = list(
/obj/item/weapon/gun/energy/lasertag/red = 5,
@@ -55,8 +55,7 @@
/obj/structure/closet/lasertag/blue
name = "blue laser tag equipment"
desc = "It's a storage unit for laser tag equipment."
icon_state = "blue"
icon_closed = "blue"
closet_appearance = /decl/closet_appearance/wardrobe/blue
starts_with = list(
/obj/item/weapon/gun/energy/lasertag/blue = 5,
@@ -1,38 +1,23 @@
/obj/structure/closet/cabinet
name = "cabinet"
desc = "Old will forever be in fashion."
icon_state = "cabinet_closed"
icon_closed = "cabinet_closed"
icon_opened = "cabinet_open"
/obj/structure/closet/cabinet/update_icon()
if(!opened)
icon_state = icon_closed
else
icon_state = icon_opened
closet_appearance = /decl/closet_appearance/cabinet
/obj/structure/closet/acloset
name = "strange closet"
desc = "It looks alien!"
icon_state = "acloset"
icon_closed = "acloset"
icon_opened = "aclosetopen"
closet_appearance = /decl/closet_appearance/alien
/obj/structure/closet/gimmick
name = "administrative supply closet"
desc = "It's a storage unit for things that have no right being here."
icon_state = "syndicate1"
icon_closed = "syndicate1"
icon_opened = "syndicate1open"
closet_appearance = /decl/closet_appearance/tactical
anchored = 0
/obj/structure/closet/gimmick/russian
name = "russian surplus closet"
desc = "It's a storage unit for Russian standard-issue surplus."
icon_state = "syndicate1"
icon_closed = "syndicate1"
icon_opened = "syndicate1open"
closet_appearance = /decl/closet_appearance/tactical
starts_with = list(
/obj/item/clothing/head/ushanka = 5,
@@ -42,9 +27,7 @@
/obj/structure/closet/gimmick/tacticool
name = "tacticool gear closet"
desc = "It's a storage unit for Tacticool gear."
icon_state = "syndicate1"
icon_closed = "syndicate1"
icon_opened = "syndicate1open"
closet_appearance = /decl/closet_appearance/tactical
starts_with = list(
/obj/item/clothing/glasses/eyepatch,
@@ -60,9 +43,7 @@
/obj/structure/closet/thunderdome
name = "\improper Thunderdome closet"
desc = "Everything you need!"
icon_state = "syndicate"
icon_closed = "syndicate"
icon_opened = "syndicateopen"
closet_appearance = /decl/closet_appearance/thunderdomered
anchored = 1
/obj/structure/closet/thunderdome/tdred
@@ -78,9 +59,7 @@
/obj/structure/closet/thunderdome/tdgreen
name = "green-team Thunderdome closet"
icon_state = "syndicate1"
icon_closed = "syndicate1"
icon_opened = "syndicate1open"
closet_appearance = /decl/closet_appearance/thunderdomegreen
starts_with = list(
/obj/item/clothing/suit/armor/tdome/green = 3,
@@ -93,8 +72,6 @@
/obj/structure/closet/alien
name = "alien container"
desc = "Contains secrets of the universe."
icon = 'icons/obj/abductor.dmi'
icon_state = "alien_locker"
icon_closed = "alien_locker"
icon_opened = "alien_locker_open"
icon = 'icons/obj/closets/abductor.dmi'
anchored = TRUE
closet_appearance = null // special icons
@@ -11,8 +11,7 @@
/obj/structure/closet/gmcloset
name = "formal closet"
desc = "It's a storage unit for formal clothing."
icon_state = "black"
icon_closed = "black"
closet_appearance = /decl/closet_appearance/wardrobe/suit
starts_with = list(
/obj/item/clothing/head/that = 2,
@@ -37,8 +36,7 @@
/obj/structure/closet/chefcloset
name = "chef's closet"
desc = "It's a storage unit for foodservice garments."
icon_state = "black"
icon_closed = "black"
closet_appearance = /decl/closet_appearance/wardrobe/white
starts_with = list(
/obj/item/clothing/under/sundress,
@@ -55,8 +53,7 @@
/obj/structure/closet/jcloset
name = "custodial closet"
desc = "It's a storage unit for janitorial clothes and gear."
icon_state = "mixed"
icon_closed = "mixed"
closet_appearance = /decl/closet_appearance/wardrobe/janitor
starts_with = list(
/obj/item/clothing/under/rank/janitor,
@@ -79,8 +76,7 @@
/obj/structure/closet/lawcloset
name = "legal closet"
desc = "It's a storage unit for courtroom apparel and items."
icon_state = "blue"
icon_closed = "blue"
closet_appearance = /decl/closet_appearance/wardrobe/suit
starts_with = list(
/obj/item/clothing/under/lawyer/female = 2,
@@ -1,14 +1,10 @@
/obj/structure/closet/l3closet
name = "level-3 biohazard suit closet"
desc = "It's a storage unit for level-3 biohazard gear."
icon_state = "bio"
icon_closed = "bio"
icon_opened = "bioopen"
closet_appearance = /decl/closet_appearance/bio
/obj/structure/closet/l3closet/general
icon_state = "bio_general"
icon_closed = "bio_general"
icon_opened = "bio_generalopen"
closet_appearance = /decl/closet_appearance/bio
starts_with = list(
/obj/item/clothing/suit/bio_suit/general,
@@ -16,9 +12,7 @@
/obj/structure/closet/l3closet/virology
icon_state = "bio_virology"
icon_closed = "bio_virology"
icon_opened = "bio_virologyopen"
closet_appearance = /decl/closet_appearance/bio/virology
starts_with = list(
/obj/item/clothing/suit/bio_suit/virology,
@@ -28,9 +22,7 @@
/obj/structure/closet/l3closet/security
icon_state = "bio_security"
icon_closed = "bio_security"
icon_opened = "bio_securityopen"
closet_appearance = /decl/closet_appearance/bio/security
starts_with = list(
/obj/item/clothing/suit/bio_suit/security,
@@ -38,9 +30,7 @@
///obj/item/weapon/gun/energy/taser/xeno/sec) //VOREStation Removal
/obj/structure/closet/l3closet/janitor
icon_state = "bio_janitor"
icon_closed = "bio_janitor"
icon_opened = "bio_janitoropen"
closet_appearance = /decl/closet_appearance/bio/janitor
starts_with = list(
/obj/item/clothing/suit/bio_suit/janitor = 2,
@@ -50,9 +40,7 @@
/obj/structure/closet/l3closet/scientist
icon_state = "bio_scientist"
icon_closed = "bio_scientist"
icon_opened = "bio_scientistopen"
closet_appearance = /decl/closet_appearance/bio/science
starts_with = list(
/obj/item/clothing/suit/bio_suit/scientist,
@@ -65,9 +53,7 @@
/obj/structure/closet/l3closet/medical
icon_state = "bio_scientist"
icon_closed = "bio_scientist"
icon_opened = "bio_scientistopen"
closet_appearance = /decl/closet_appearance/bio/medical
starts_with = list(
/obj/item/clothing/suit/bio_suit/general = 3,
@@ -1,8 +1,6 @@
/obj/structure/closet/malf/suits
desc = "It's a storage unit for operational gear."
icon_state = "syndicate"
icon_closed = "syndicate"
icon_opened = "syndicateopen"
closet_appearance = /decl/closet_appearance/tactical
starts_with = list(
/obj/item/weapon/tank/jetpack/void,
@@ -37,14 +37,8 @@
/obj/structure/closet/secure_closet/explorer
name = "explorer locker"
icon = 'icons/obj/closet_vr.dmi'
icon_state = "secureexp1"
icon_closed = "secureexp"
icon_locked = "secureexp1"
icon_opened = "secureexpopen"
icon_broken = "secureexpbroken"
icon_off = "secureexpoff"
req_access = list(access_explorer)
closet_appearance = /decl/closet_appearance/secure_closet/expedition/explorer
starts_with = list(
/obj/item/clothing/under/explorer,
@@ -81,13 +75,8 @@
/obj/structure/closet/secure_closet/sar
name = "field medic locker"
desc = "Supplies for a wilderness first responder."
icon_state = "medical1"
icon_closed = "medical"
icon_locked = "medical1"
icon_opened = "medicalopen"
icon_broken = "medicalbroken"
icon_off = "medicaloff"
req_access = list(access_medical_equip)
closet_appearance = /decl/closet_appearance/secure_closet/expedition/sar
starts_with = list(
/obj/item/weapon/storage/backpack/dufflebag/emt,
@@ -128,6 +117,7 @@
/obj/structure/closet/secure_closet/pilot
name = "pilot locker"
req_access = list(access_pilot)
closet_appearance = /decl/closet_appearance/secure_closet/expedition/pilot
starts_with = list(
/obj/item/weapon/storage/backpack/parachute,
@@ -162,14 +152,8 @@
/obj/structure/closet/secure_closet/pathfinder //CHOMPedit: Changes bluespaceradio/tether_prelinked to bluespaceradio because we don't have Tether here
name = "pathfinder locker"
icon = 'icons/obj/closet_vr.dmi'
icon_state = "secureexp1"
icon_closed = "secureexp"
icon_locked = "secureexp1"
icon_opened = "secureexpopen"
icon_broken = "secureexpbroken"
icon_off = "secureexpoff"
req_access = list(access_gateway)
closet_appearance = /decl/closet_appearance/secure_closet/expedition/pathfinder
starts_with = list(
/obj/item/clothing/under/explorer,
@@ -193,6 +177,7 @@
/obj/item/weapon/material/knife/machete/deluxe,
/obj/item/weapon/gun/energy/locked/frontier/carbine,
/obj/item/clothing/accessory/holster/machete,
/obj/random/explorer_shield,
/obj/item/weapon/reagent_containers/food/snacks/liquidfood,
/obj/item/weapon/reagent_containers/food/snacks/liquidprotein,
/obj/item/device/cataloguer/compact/pathfinder)
@@ -217,3 +202,36 @@
/obj/item/seeds/kudzuseed,
/obj/item/seeds/libertymycelium,
/obj/item/seeds/reishimycelium)
/obj/structure/closet/autolok_wall
name = "autolok suit storage"
desc = "It's wall-mounted storage unit for an AutoLok suit."
icon = 'icons/obj/closets/bases/wall.dmi'
closet_appearance = /decl/closet_appearance/wall/autolok
anchored = 1
density = 0
wall_mounted = 1
store_mobs = 0
starts_with = list(
/obj/item/clothing/suit/space/void/autolok,
/obj/item/weapon/tank/emergency/oxygen/engi,
/obj/item/device/suit_cooling_unit/emergency
)
/obj/structure/closet/emergsuit_wall
name = "emergency suit storage"
desc = "It's wall-mounted storage unit for an emergency suit."
icon = 'icons/obj/closets/bases/wall.dmi'
closet_appearance = /decl/closet_appearance/wall/emergency
anchored = 1
density = 0
wall_mounted = 1
store_mobs = 0
starts_with = list(
/obj/item/clothing/head/helmet/space/emergency,
/obj/item/clothing/suit/space/emergency,
/obj/item/weapon/tank/emergency/oxygen/engi,
/obj/item/device/suit_cooling_unit/emergency
)
@@ -1,13 +1,7 @@
/obj/structure/closet/secure_closet/am_closet
name = "Antimatter Equipment"
req_access = list(access_all_personal_lockers)
icon_state = "secureeng1"
icon_closed = "secureeng"
icon_locked = "secureeng1"
icon_opened = "secureengopen"
icon_broken = "secureengbroken"
icon_off = "secureengoff"
closet_appearance = /decl/closet_appearance/secure_closet/engineering
New()
..()
@@ -1,24 +1,7 @@
/obj/structure/closet/secure_closet/bar
name = "booze closet"
req_access = list(access_bar)
icon_state = "cabinetdetective_locked"
icon_closed = "cabinetdetective"
icon_locked = "cabinetdetective_locked"
icon_opened = "cabinetdetective_open"
icon_broken = "cabinetdetective_broken"
icon_off = "cabinetdetective_broken"
closet_appearance = /decl/closet_appearance/cabinet/secure
starts_with = list(
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer = 10)
/obj/structure/closet/secure_closet/bar/update_icon()
if(broken)
icon_state = icon_broken
else
if(!opened)
if(locked)
icon_state = icon_locked
else
icon_state = icon_closed
else
icon_state = icon_opened
@@ -1,12 +1,7 @@
/obj/structure/closet/secure_closet/cargotech
name = "cargo technician's locker"
req_access = list(access_cargo)
icon_state = "securecargo1"
icon_closed = "securecargo"
icon_locked = "securecargo1"
icon_opened = "securecargoopen"
icon_broken = "securecargobroken"
icon_off = "securecargooff"
closet_appearance = /decl/closet_appearance/secure_closet/cargo
starts_with = list(
/obj/item/clothing/under/rank/cargotech,
@@ -34,12 +29,7 @@
/obj/structure/closet/secure_closet/quartermaster
name = "quartermaster's locker"
req_access = list(access_qm)
icon_state = "secureqm1"
icon_closed = "secureqm"
icon_locked = "secureqm1"
icon_opened = "secureqmopen"
icon_broken = "secureqmbroken"
icon_off = "secureqmoff"
closet_appearance = /decl/closet_appearance/secure_closet/cargo/qm
starts_with = list(
/obj/item/clothing/under/rank/cargo,
@@ -70,13 +60,8 @@
/obj/structure/closet/secure_closet/miner
name = "miner's equipment"
icon_state = "miningsec1"
icon_closed = "miningsec"
icon_locked = "miningsec1"
icon_opened = "miningsecopen"
icon_broken = "miningsecbroken"
icon_off = "miningsecoff"
req_access = list(access_mining)
closet_appearance = /decl/closet_appearance/secure_closet/mining
starts_with = list(
/obj/item/device/radio/headset/headset_mine,
@@ -104,9 +89,8 @@
/obj/structure/closet/lumber
name = "Lumberjack's equipment"
icon_state = "mining"
icon_closed = "mining"
icon_opened = "miningopen"
desc = "It's a storage unit for Lumberjack equpiment, though it seems the lock is broken."
closet_appearance = /decl/closet_appearance/secure_closet/lumber
starts_with = list(
/obj/item/device/radio/headset/headset_mine,
@@ -1,13 +1,7 @@
/obj/structure/closet/secure_closet/blueshield
name = "blueshield's locker"
name = "blueshield's closet"
req_access = list(access_blueshield)
icon = 'icons/obj/closet_yw.dmi'
icon_state = "bssecure1"
icon_closed = "bssecure"
icon_locked = "bssecure1"
icon_opened = "bssecureopen"
icon_broken = "bssecurebroken"
icon_off = "bssecureoff"
closet_appearance = /decl/closet_appearance/secure_closet/blueshield
storage_capacity = 2.5 * MOB_MEDIUM
starts_with = list(
@@ -39,13 +33,7 @@
/obj/structure/closet/secure_closet/security_pilot
name = "security pilot's locker"
req_access = list(access_secpilot)
icon = 'icons/obj/closet_yw.dmi'
icon_state = "secpilot1"
icon_closed = "secpilot"
icon_locked = "secpilot1"
icon_opened = "secpilotopen"
icon_broken = "secpilotbroken"
icon_off = "secpilotoff"
closet_appearance = /decl/closet_appearance/secure_closet/security_pilot
storage_capacity = 2.5 * MOB_MEDIUM
starts_with = list(
@@ -1,12 +1,7 @@
/obj/structure/closet/secure_closet/engineering_chief
name = "chief engineer's locker"
icon_state = "securece1"
icon_closed = "securece"
icon_locked = "securece1"
icon_opened = "secureceopen"
icon_broken = "securecebroken"
icon_off = "secureceoff"
req_access = list(access_ce)
closet_appearance = /decl/closet_appearance/secure_closet/engineering/ce
starts_with = list(
/obj/item/clothing/accessory/storage/brown_vest,
@@ -47,13 +42,8 @@
/obj/structure/closet/secure_closet/engineering_electrical
name = "electrical supplies"
icon_state = "secureengelec1"
icon_closed = "secureengelec"
icon_locked = "secureengelec1"
icon_opened = "toolclosetopen"
icon_broken = "secureengelecbroken"
icon_off = "secureengelecoff"
req_access = list(access_engine_equip)
closet_appearance = /decl/closet_appearance/secure_closet/engineering/electrical
starts_with = list(
/obj/item/clothing/gloves/yellow = 2,
@@ -64,13 +54,8 @@
/obj/structure/closet/secure_closet/engineering_welding
name = "welding supplies"
icon_state = "secureengweld1"
icon_closed = "secureengweld"
icon_locked = "secureengweld1"
icon_opened = "toolclosetopen"
icon_broken = "secureengweldbroken"
icon_off = "secureengweldoff"
req_access = list(access_construction)
closet_appearance = /decl/closet_appearance/secure_closet/engineering/welding
starts_with = list(
/obj/item/clothing/head/welding = 3,
@@ -80,13 +65,8 @@
/obj/structure/closet/secure_closet/engineering_personal
name = "engineer's locker"
icon_state = "secureeng1"
icon_closed = "secureeng"
icon_locked = "secureeng1"
icon_opened = "secureengopen"
icon_broken = "secureengbroken"
icon_off = "secureengoff"
req_access = list(access_engine_equip)
closet_appearance = /decl/closet_appearance/secure_closet/engineering
starts_with = list(
/obj/item/clothing/accessory/storage/brown_vest,
@@ -116,13 +96,8 @@
/obj/structure/closet/secure_closet/atmos_personal
name = "technician's locker"
icon_state = "secureatm1"
icon_closed = "secureatm"
icon_locked = "secureatm1"
icon_opened = "secureatmopen"
icon_broken = "secureatmbroken"
icon_off = "secureatmoff"
req_access = list(access_atmospherics)
closet_appearance = /decl/closet_appearance/secure_closet/engineering/atmos
starts_with = list(
/obj/item/clothing/accessory/storage/brown_vest,
@@ -1,20 +1,6 @@
/obj/structure/closet/secure_closet/freezer
/obj/structure/closet/secure_closet/freezer/update_icon()
if(broken)
icon_state = icon_broken
else
if(!opened)
if(locked)
icon_state = icon_locked
else
icon_state = icon_closed
else
icon_state = icon_opened
/obj/structure/closet/secure_closet/freezer/kitchen
name = "kitchen cabinet"
req_access = list()
req_access = list(access_kitchen)
starts_with = list(
/obj/item/weapon/reagent_containers/food/condiment/flour = 7,
@@ -26,12 +12,8 @@
/obj/structure/closet/secure_closet/freezer/meat
name = "meat fridge"
icon_state = "fridge1"
icon_closed = "fridge"
icon_locked = "fridge1"
icon_opened = "fridgeopen"
icon_broken = "fridgebroken"
icon_off = "fridge1"
icon = 'icons/obj/closets/fridge.dmi'
closet_appearance = null
starts_with = list(
/obj/item/weapon/reagent_containers/food/snacks/meat/monkey = 10)
@@ -39,12 +21,8 @@
/obj/structure/closet/secure_closet/freezer/fridge
name = "refrigerator"
icon_state = "fridge1"
icon_closed = "fridge"
icon_locked = "fridge1"
icon_opened = "fridgeopen"
icon_broken = "fridgebroken"
icon_off = "fridge1"
icon = 'icons/obj/closets/fridge.dmi'
closet_appearance = null
starts_with = list(
/obj/item/weapon/reagent_containers/food/drinks/milk = 6,
@@ -55,12 +33,8 @@
/obj/structure/closet/secure_closet/freezer/money
name = "freezer"
icon_state = "fridge1"
icon_closed = "fridge"
icon_locked = "fridge1"
icon_opened = "fridgeopen"
icon_broken = "fridgebroken"
icon_off = "fridge1"
icon = 'icons/obj/closets/fridge.dmi'
closet_appearance = null
req_access = list(access_heads_vault)
@@ -2,12 +2,8 @@
name = "gun cabinet"
icon = 'icons/obj/guncabinet.dmi'
icon_state = "base"
icon_off ="base"
icon_broken ="base"
icon_locked ="base"
icon_closed ="base"
icon_opened = "base"
req_one_access = list(access_armory)
closet_appearance = null
/obj/structure/closet/secure_closet/guncabinet/Initialize()
. = ..()
@@ -1,12 +1,7 @@
/obj/structure/closet/secure_closet/hydroponics
name = "botanist's locker"
req_access = list(access_hydroponics)
icon_state = "hydrosecure1"
icon_closed = "hydrosecure"
icon_locked = "hydrosecure1"
icon_opened = "hydrosecureopen"
icon_broken = "hydrosecurebroken"
icon_off = "hydrosecureoff"
closet_appearance = /decl/closet_appearance/secure_closet/hydroponics
starts_with = list(
/obj/item/weapon/storage/bag/plants,
@@ -32,12 +27,7 @@
/obj/structure/closet/secure_closet/hydroponics/sci
name = "xenoflorist's locker"
req_access = list(access_xenobiology)
icon_state = "scihydrosecure1"
icon_closed = "scihydrosecure"
icon_locked = "scihydrosecure1"
icon_opened = "scihydrosecureopen"
icon_broken = "scihydrosecurebroken"
icon_off = "scihydrosecureoff"
closet_appearance = /decl/closet_appearance/secure_closet/hydroponics/xenoflora
/obj/structure/closet/secure_closet/hydroponics/sci/Initialize()
starts_with += /obj/item/clothing/head/bio_hood/scientist
@@ -1,13 +1,8 @@
/obj/structure/closet/secure_closet/medical1
name = "medicine closet"
desc = "Filled with medical junk."
icon_state = "medical1"
icon_closed = "medical"
icon_locked = "medical1"
icon_opened = "medicalopen"
icon_broken = "medicalbroken"
icon_off = "medicaloff"
req_access = list(access_medical)
closet_appearance = /decl/closet_appearance/secure_closet/medical/alt
starts_with = list(
/obj/item/weapon/storage/box/autoinjectors,
@@ -21,13 +16,8 @@
/obj/structure/closet/secure_closet/medical2
name = "anesthetics closet"
desc = "Used to knock people out."
icon_state = "medical1"
icon_closed = "medical"
icon_locked = "medical1"
icon_opened = "medicalopen"
icon_broken = "medicalbroken"
icon_off = "medicaloff"
req_access = list(access_surgery)
closet_appearance = /decl/closet_appearance/secure_closet/medical
starts_with = list(
/obj/item/weapon/tank/anesthetic = 3,
@@ -37,12 +27,7 @@
/obj/structure/closet/secure_closet/medical3
name = "medical doctor's locker"
req_access = list(access_medical_equip)
icon_state = "securemed1"
icon_closed = "securemed"
icon_locked = "securemed1"
icon_opened = "securemedopen"
icon_broken = "securemedbroken"
icon_off = "securemedoff"
closet_appearance = /decl/closet_appearance/secure_closet/medical/doctor
starts_with = list(
/obj/item/clothing/under/rank/medical,
@@ -105,13 +90,8 @@
/obj/structure/closet/secure_closet/paramedic
name = "paramedic locker"
desc = "Supplies for a first responder."
icon_state = "medical1"
icon_closed = "medical"
icon_locked = "medical1"
icon_opened = "medicalopen"
icon_broken = "medicalbroken"
icon_off = "medicaloff"
req_access = list(access_medical_equip)
closet_appearance = /decl/closet_appearance/secure_closet/medical/paramedic
starts_with = list(
/obj/item/weapon/storage/backpack/dufflebag/emt,
@@ -141,12 +121,7 @@
/obj/structure/closet/secure_closet/CMO
name = "chief medical officer's locker"
req_access = list(access_cmo)
icon_state = "cmosecure1"
icon_closed = "cmosecure"
icon_locked = "cmosecure1"
icon_opened = "cmosecureopen"
icon_broken = "cmosecurebroken"
icon_off = "cmosecureoff"
closet_appearance = /decl/closet_appearance/secure_closet/cmo
starts_with = list(
/obj/item/clothing/under/rank/chief_medical_officer,
@@ -155,7 +130,7 @@
/obj/item/clothing/suit/storage/toggle/labcoat/cmoalt,
/obj/item/weapon/cartridge/cmo,
/obj/item/clothing/gloves/sterile/latex,
/obj/item/clothing/shoes/brown ,
/obj/item/clothing/shoes/brown,
/obj/item/device/radio/headset/heads/cmo,
/obj/item/device/radio/headset/heads/cmo/alt,
/obj/item/device/flash,
@@ -208,13 +183,8 @@
/obj/structure/closet/secure_closet/chemical
name = "chemical closet"
desc = "Store dangerous chemicals in here."
icon_state = "medical1"
icon_closed = "medical"
icon_locked = "medical1"
icon_opened = "medicalopen"
icon_broken = "medicalbroken"
icon_off = "medicaloff"
req_access = list(access_chemistry)
closet_appearance = /decl/closet_appearance/secure_closet/medical/chemistry
starts_with = list(
/obj/item/weapon/storage/box/pillbottles = 2,
@@ -228,15 +198,10 @@
/obj/structure/closet/secure_closet/psych
name = "psychiatric closet"
name = "psychiatric cabinet"
desc = "Store psychology tools and medicines in here."
icon_state = "medical1"
icon_closed = "medical"
icon_locked = "medical1"
icon_opened = "medicalopen"
icon_broken = "medicalbroken"
icon_off = "medicaloff"
req_access = list(access_psychiatrist)
closet_appearance = /decl/closet_appearance/cabinet/secure
starts_with = list(
/obj/item/clothing/under/rank/psych,
@@ -257,30 +222,14 @@
/obj/structure/closet/secure_closet/medical_wall
name = "first aid closet"
desc = "It's a secure wall-mounted storage unit for first aid supplies."
icon_state = "medical_wall_locked"
icon_closed = "medical_wall_unlocked"
icon_locked = "medical_wall_locked"
icon_opened = "medical_wall_open"
icon_broken = "medical_wall_spark"
icon_off = "medical_wall_off"
plane = TURF_PLANE
layer = ABOVE_TURF_LAYER
anchored = 1
density = 0
wall_mounted = 1
store_mobs = 0
req_access = list(access_medical_equip)
/obj/structure/closet/secure_closet/medical_wall/update_icon()
if(broken)
icon_state = icon_broken
else
if(!opened)
if(locked)
icon_state = icon_locked
else
icon_state = icon_closed
else
icon_state = icon_opened
closet_appearance = /decl/closet_appearance/wall/medical
/obj/structure/closet/secure_closet/medical_wall/pills
name = "pill cabinet"
@@ -20,6 +20,7 @@
/obj/structure/closet/secure_closet/personal/patient
name = "patient's closet"
closet_appearance = /decl/closet_appearance/secure_closet/patient
starts_with = list(
/obj/item/clothing/under/medigown,
@@ -28,30 +29,13 @@
/obj/structure/closet/secure_closet/personal/cabinet
icon_state = "cabinetdetective_locked"
icon_closed = "cabinetdetective"
icon_locked = "cabinetdetective_locked"
icon_opened = "cabinetdetective_open"
icon_broken = "cabinetdetective_broken"
icon_off = "cabinetdetective_broken"
closet_appearance = /decl/closet_appearance/cabinet/secure
starts_with = list(
/obj/item/weapon/storage/backpack/satchel/withwallet,
/obj/item/device/radio/headset
)
/obj/structure/closet/secure_closet/personal/cabinet/update_icon()
if(broken)
icon_state = icon_broken
else
if(!opened)
if(locked)
icon_state = icon_locked
else
icon_state = icon_closed
else
icon_state = icon_opened
/obj/structure/closet/secure_closet/personal/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (src.opened)
if (istype(W, /obj/item/weapon/grab))
@@ -69,8 +53,6 @@
if(src.allowed(user) || !src.registered_name || (istype(I) && (src.registered_name == I.registered_name)))
//they can open all lockers, or nobody owns this, or they own this locker
src.locked = !( src.locked )
if(src.locked) src.icon_state = src.icon_locked
else src.icon_state = src.icon_closed
if(!src.registered_name)
src.registered_name = I.registered_name
@@ -82,18 +64,18 @@
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src, "sparks", 50, 1)
else
to_chat(user, "<span class='warning'>Access Denied</span>")
return
update_icon()
/obj/structure/closet/secure_closet/personal/emag_act(var/remaining_charges, var/mob/user, var/visual_feedback, var/audible_feedback)
if(!broken)
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = src.icon_broken
update_icon()
if(visual_feedback)
visible_message("<span class='warning'>[visual_feedback]</span>", "<span class='warning'>[audible_feedback]</span>")
return 1
@@ -115,7 +97,6 @@
if(!src.close())
return
src.locked = 1
src.icon_state = src.icon_locked
update_icon()
src.registered_name = null
src.desc = "It's a secure locker for personnel. The first card swiped gains control."
return
@@ -1,12 +1,7 @@
/obj/structure/closet/secure_closet/scientist
name = "scientist's locker"
icon_state = "secureres1"
icon_closed = "secureres"
icon_locked = "secureres1"
icon_opened = "secureresopen"
icon_broken = "secureresbroken"
icon_off = "secureresoff"
req_access = list(access_tox_storage)
closet_appearance = /decl/closet_appearance/secure_closet/science
starts_with = list(
/obj/item/clothing/under/rank/scientist,
@@ -28,13 +23,8 @@
/obj/structure/closet/secure_closet/RD
name = "research director's locker"
icon_state = "rdsecure1"
icon_closed = "rdsecure"
icon_locked = "rdsecure1"
icon_opened = "rdsecureopen"
icon_broken = "rdsecurebroken"
icon_off = "rdsecureoff"
req_access = list(access_rd)
closet_appearance = /decl/closet_appearance/secure_closet/science/rd
starts_with = list(
/obj/item/clothing/suit/bio_suit/scientist,
@@ -55,3 +45,39 @@
/obj/item/clothing/suit/storage/hooded/wintercoat/science,
/obj/item/clothing/shoes/boots/winter/science,
/obj/item/weapon/bluespace_harpoon) //VOREStation Add
/obj/structure/closet/secure_closet/xenoarchaeologist
name = "Xenoarchaeologist Locker"
req_access = list(access_tox_storage)
closet_appearance = /decl/closet_appearance/secure_closet/science/xenoarch
starts_with = list(
/obj/item/clothing/under/rank/scientist,
/obj/item/clothing/suit/storage/toggle/labcoat,
/obj/item/clothing/shoes/white,
/obj/item/weapon/melee/umbrella, // vorestation addition,
/obj/item/clothing/glasses/science,
/obj/item/device/radio/headset/headset_sci,
/obj/item/weapon/storage/belt/archaeology,
/obj/item/weapon/storage/excavation)
/obj/structure/closet/excavation
name = "Excavation tools"
closet_appearance = /decl/closet_appearance/secure_closet/engineering/tools/xenoarch
starts_with = list(
/obj/item/weapon/storage/belt/archaeology,
/obj/item/weapon/storage/excavation,
/obj/item/device/flashlight/lantern,
/obj/item/device/ano_scanner,
/obj/item/device/depth_scanner,
/obj/item/device/core_sampler,
/obj/item/device/gps,
/obj/item/device/beacon_locator,
/obj/item/device/radio/beacon,
/obj/item/clothing/glasses/meson,
/obj/item/weapon/pickaxe,
/obj/item/device/measuring_tape,
/obj/item/weapon/pickaxe/hand,
/obj/item/weapon/storage/bag/fossils,
/obj/item/weapon/hand_labeler)
@@ -8,55 +8,44 @@
var/locked = 1
var/broken = 0
var/large = 1
icon_closed = "secure"
var/icon_locked = "secure1"
icon_opened = "secureopen"
var/icon_broken = "securebroken"
var/icon_off = "secureoff"
wall_mounted = 0 //never solid (You can always pass over it)
health = 200
closet_appearance = /decl/closet_appearance/secure_closet
/obj/structure/closet/secure_closet/can_open()
if(src.locked)
if(locked)
return 0
return ..()
/obj/structure/closet/secure_closet/close()
if(..())
if(broken)
icon_state = src.icon_off
return 1
else
return 0
/obj/structure/closet/secure_closet/emp_act(severity)
for(var/obj/O in src)
O.emp_act(severity)
if(!broken)
if(prob(50/severity))
src.locked = !src.locked
src.update_icon()
locked = !locked
update_icon()
if(prob(20/severity) && !opened)
if(!locked)
open()
else
src.req_access = list()
src.req_access += pick(get_all_station_access())
req_access = list()
req_access += pick(get_all_station_access())
..()
/obj/structure/closet/secure_closet/proc/togglelock(mob/user as mob)
if(src.opened)
if(opened)
to_chat(user, "<span class='notice'>Close the locker first.</span>")
return
if(src.broken)
if(broken)
to_chat(user, "<span class='warning'>The locker appears to be broken.</span>")
return
if(user.loc == src)
to_chat(user, "<span class='notice'>You can't reach the lock from inside.</span>")
return
if(src.allowed(user))
src.locked = !src.locked
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
if(allowed(user))
locked = !locked
playsound(src, 'sound/machines/click.ogg', 15, 1, -3)
for(var/mob/O in viewers(user, 3))
if((O.client && !( O.blinded )))
to_chat(O, "<span class='notice'>The locker has been [locked ? null : "un"]locked by [user].</span>")
@@ -65,13 +54,13 @@
to_chat(user, "<span class='notice'>Access Denied</span>")
/obj/structure/closet/secure_closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(src.opened)
if(opened)
if(istype(W, /obj/item/weapon/storage/laundry_basket))
return ..(W,user)
if(istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W
if(src.large)
src.MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
if(large)
MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
else
to_chat(user, "<span class='notice'>The locker is too small to stuff [G.affecting] into!</span>")
if(isrobot(user))
@@ -80,14 +69,14 @@
return
user.drop_item()
if(W)
W.forceMove(src.loc)
W.forceMove(loc)
else if(istype(W, /obj/item/weapon/melee/energy/blade))
if(emag_act(INFINITY, user, "<span class='danger'>The locker has been sliced open by [user] with \an [W]</span>!", "<span class='danger'>You hear metal being sliced and sparks flying.</span>"))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.set_up(5, 0, loc)
spark_system.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src, "sparks", 50, 1)
else if(W.is_wrench())
if(sealed)
if(anchored)
@@ -109,8 +98,6 @@
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = icon_off
flick(icon_broken, src)
if(visual_feedback)
visible_message(visual_feedback, audible_feedback)
@@ -118,14 +105,15 @@
visible_message("<span class='warning'>\The [src] has been broken by \the [user] with \an [emag_source]!</span>", "You hear a faint electrical spark.")
else
visible_message("<span class='warning'>\The [src] sparks and breaks open!</span>", "You hear a faint electrical spark.")
update_icon()
return 1
/obj/structure/closet/secure_closet/attack_hand(mob/user as mob)
src.add_fingerprint(user)
if(src.locked)
src.togglelock(user)
add_fingerprint(user)
if(locked)
togglelock(user)
else
src.toggle(user)
toggle(user)
/obj/structure/closet/secure_closet/AltClick()
..()
@@ -140,25 +128,22 @@
return
if(ishuman(usr) || isrobot(usr))
src.add_fingerprint(usr)
src.togglelock(usr)
add_fingerprint(usr)
togglelock(usr)
else
to_chat(usr, "<span class='warning'>This mob type can't use this verb.</span>")
/obj/structure/closet/secure_closet/update_icon()//Putting the sealed stuff in updateicon() so it's easy to overwrite for special cases (Fridges, cabinets, and whatnot)
overlays.Cut()
if(!opened)
if(broken)
icon_state = icon_off
else if(locked)
icon_state = icon_locked
else
icon_state = icon_closed
if(sealed)
overlays += "sealed"
/obj/structure/closet/secure_closet/update_icon()
if(opened)
icon_state = "open"
else
icon_state = icon_opened
if(broken)
icon_state = "closed_emagged[sealed ? "_welded" : ""]"
else
if(locked)
icon_state = "closed_locked[sealed ? "_welded" : ""]"
else
icon_state = "closed_unlocked[sealed ? "_welded" : ""]"
/obj/structure/closet/secure_closet/req_breakout()
if(!opened && locked) return 1
@@ -1,12 +1,7 @@
/obj/structure/closet/secure_closet/captains
name = "colony director's locker"
icon_state = "capsecure1"
icon_closed = "capsecure"
icon_locked = "capsecure1"
icon_opened = "capsecureopen"
icon_broken = "capsecurebroken"
icon_off = "capsecureoff"
req_access = list(access_captain)
closet_appearance = /decl/closet_appearance/secure_closet/command
starts_with = list(
/obj/item/weapon/storage/backpack/dufflebag/captain,
@@ -24,13 +19,8 @@
/obj/structure/closet/secure_closet/hop
name = "head of personnel's locker"
icon_state = "hopsecure1"
icon_closed = "hopsecure"
icon_locked = "hopsecure1"
icon_opened = "hopsecureopen"
icon_broken = "hopsecurebroken"
icon_off = "hopsecureoff"
req_access = list(access_hop)
closet_appearance = /decl/closet_appearance/secure_closet/command/hop
starts_with = list(
/obj/item/clothing/suit/storage/vest,
@@ -48,13 +38,8 @@
/obj/structure/closet/secure_closet/hop2
name = "head of personnel's attire"
icon_state = "hopsecure1"
icon_closed = "hopsecure"
icon_locked = "hopsecure1"
icon_opened = "hopsecureopen"
icon_broken = "hopsecurebroken"
icon_off = "hopsecureoff"
req_access = list(access_hop)
closet_appearance = /decl/closet_appearance/secure_closet/command/hop
starts_with = list(
/obj/item/clothing/under/rank/head_of_personnel,
@@ -80,14 +65,9 @@
/obj/structure/closet/secure_closet/hos
name = "head of security's locker"
req_access = list(access_hos)
icon_state = "hossecure1"
icon_closed = "hossecure"
icon_locked = "hossecure1"
icon_opened = "hossecureopen"
icon_broken = "hossecurebroken"
icon_off = "hossecureoff"
req_access = list(access_hos)
storage_capacity = 2.5 * MOB_MEDIUM
closet_appearance = /decl/closet_appearance/secure_closet/security/hos
starts_with = list(
/obj/item/clothing/head/helmet/HoS,
@@ -136,13 +116,8 @@
/obj/structure/closet/secure_closet/warden
name = "warden's locker"
icon_state = "wardensecure1"
icon_closed = "wardensecure"
icon_locked = "wardensecure1"
icon_opened = "wardensecureopen"
icon_broken = "wardensecurebroken"
icon_off = "wardensecureoff"
req_access = list(access_armory)
closet_appearance = /decl/closet_appearance/secure_closet/security/warden
starts_with = list(
/obj/item/clothing/suit/storage/vest/warden,
@@ -188,13 +163,8 @@
/obj/structure/closet/secure_closet/security
name = "security officer's locker"
icon_state = "sec1"
icon_closed = "sec"
icon_locked = "sec1"
icon_opened = "secopen"
icon_broken = "secbroken"
icon_off = "secoff"
req_access = list(access_brig)
closet_appearance = /decl/closet_appearance/secure_closet/security
starts_with = list(
/obj/item/clothing/suit/storage/vest/officer,
@@ -255,13 +225,8 @@
/obj/structure/closet/secure_closet/detective
name = "detective's cabinet"
icon_state = "cabinetdetective_locked"
icon_closed = "cabinetdetective"
icon_locked = "cabinetdetective_locked"
icon_opened = "cabinetdetective_open"
icon_broken = "cabinetdetective_broken"
icon_off = "cabinetdetective_broken"
req_access = list(access_forensics_lockers)
closet_appearance = /decl/closet_appearance/cabinet/secure
starts_with = list(
/obj/item/clothing/accessory/badge/holo/detective,
@@ -281,22 +246,10 @@
/obj/item/weapon/storage/bag/detective,
/obj/item/device/tape/random = 3)
/obj/structure/closet/secure_closet/detective/update_icon()
if(broken)
icon_state = icon_broken
else
if(!opened)
if(locked)
icon_state = icon_locked
else
icon_state = icon_closed
else
icon_state = icon_opened
/obj/structure/closet/secure_closet/injection
name = "lethal injections locker"
req_access = list(access_captain)
closet_appearance = /decl/closet_appearance/secure_closet/courtroom
starts_with = list(
/obj/item/weapon/reagent_containers/syringe/ld50_syringe/choral = 2)
@@ -306,6 +259,7 @@ GLOBAL_LIST_BOILERPLATE(all_brig_closets, /obj/structure/closet/secure_closet/br
/obj/structure/closet/secure_closet/brig
name = "brig locker"
req_access = list(access_brig)
closet_appearance = /decl/closet_appearance/secure_closet/brig
anchored = 1
var/id = null
@@ -328,6 +282,7 @@ GLOBAL_LIST_BOILERPLATE(all_brig_closets, /obj/structure/closet/secure_closet/br
/obj/structure/closet/secure_closet/courtroom
name = "courtroom locker"
req_access = list(access_lawyer)
closet_appearance = /decl/closet_appearance/secure_closet/courtroom
starts_with = list(
/obj/item/clothing/shoes/brown,
@@ -340,26 +295,9 @@ GLOBAL_LIST_BOILERPLATE(all_brig_closets, /obj/structure/closet/secure_closet/br
/obj/structure/closet/secure_closet/wall
name = "wall locker"
icon_state = "wall-locker1"
icon_closed = "wall-locker"
icon_locked = "wall-locker1"
icon_opened = "wall-lockeropen"
icon_broken = "wall-lockerbroken"
icon_off = "wall-lockeroff"
req_access = list(access_security)
closet_appearance = /decl/closet_appearance/wall
density = 1
//too small to put a man in
large = 0
/obj/structure/closet/secure_closet/wall/update_icon()
if(broken)
icon_state = icon_broken
else
if(!opened)
if(locked)
icon_state = icon_locked
else
icon_state = icon_closed
else
icon_state = icon_opened
@@ -1,12 +1,7 @@
/obj/structure/closet/secure_closet/hos
name = "head of security's attire"
icon_state = "hossecure1"
icon_closed = "hossecure"
icon_locked = "hossecure1"
icon_opened = "hossecureopen"
icon_broken = "hossecurebroken"
icon_off = "hossecureoff"
req_access = list(access_hos)
closet_appearance = /decl/closet_appearance/secure_closet/security/hos
storage_capacity = 2.5 * MOB_MEDIUM
starts_with = list(
@@ -30,13 +25,8 @@
/obj/structure/closet/secure_closet/hos2
name = "head of security's gear"
icon_state = "hossecure1"
icon_closed = "hossecure"
icon_locked = "hossecure1"
icon_opened = "hossecureopen"
icon_broken = "hossecurebroken"
icon_off = "hossecureoff"
req_access = list(access_hos)
closet_appearance = /decl/closet_appearance/secure_closet/security/hos
storage_capacity = 2.5 * MOB_MEDIUM
starts_with = list(
@@ -63,14 +53,8 @@
//Custom NT Security Lockers, Only found at central command
/obj/structure/closet/secure_closet/nanotrasen_security
name = "NanoTrasen security officer's locker"
icon = 'icons/obj/closet_vr.dmi'
icon_state = "secC1"
icon_closed = "secC"
icon_locked = "secC1"
icon_opened = "secCopen"
icon_broken = "secCbroken"
icon_off = "seCcoff"
req_access = list(access_brig)
closet_appearance = /decl/closet_appearance/secure_closet/nanotrasen/security
storage_capacity = 3.5 * MOB_MEDIUM
starts_with = list(
@@ -110,14 +94,8 @@
/obj/structure/closet/secure_closet/nanotrasen_commander
name = "NanoTrasen commander's locker"
icon = 'icons/obj/closet_vr.dmi'
icon_state = "secC1"
icon_closed = "secC"
icon_locked = "secC1"
icon_opened = "secCopen"
icon_broken = "secCbroken"
icon_off = "seCcoff"
req_access = list(access_brig)
closet_appearance = /decl/closet_appearance/secure_closet/nanotrasen/commander
storage_capacity = 3.5 * MOB_MEDIUM
starts_with = list(
@@ -165,14 +143,8 @@
/obj/structure/closet/secure_closet/nanotrasen_warden
name = "NanoTrasen warden's locker"
icon = 'icons/obj/closet_vr.dmi'
icon_state = "secC1"
icon_closed = "secC"
icon_locked = "secC1"
icon_opened = "secCopen"
icon_broken = "secCbroken"
icon_off = "seCcoff"
req_access = list(access_brig)
closet_appearance = /decl/closet_appearance/secure_closet/nanotrasen/warden
storage_capacity = 3.5 * MOB_MEDIUM
starts_with = list(
@@ -1,9 +1,7 @@
/obj/structure/closet/syndicate
name = "armory closet"
desc = "Why is this here?"
icon_state = "syndicate"
icon_closed = "syndicate"
icon_opened = "syndicateopen"
closet_appearance = /decl/closet_appearance/tactical/alt
/obj/structure/closet/syndicate/personal
desc = "It's a storage unit for operative gear."
@@ -15,9 +15,7 @@
/obj/structure/closet/emcloset
name = "emergency closet"
desc = "It's a storage unit for emergency breathmasks and O2 tanks."
icon_state = "emergency"
icon_closed = "emergency"
icon_opened = "emergencyopen"
closet_appearance = /decl/closet_appearance/oxygen
/obj/structure/closet/emcloset/Initialize()
switch (pickweight(list("small" = 55, "aid" = 25, "tank" = 10, "both" = 10)))
@@ -64,9 +62,7 @@
/obj/structure/closet/firecloset
name = "fire-safety closet"
desc = "It's a storage unit for fire-fighting supplies."
icon_state = "firecloset"
icon_closed = "firecloset"
icon_opened = "fireclosetopen"
closet_appearance = /decl/closet_appearance/oxygen/fire
starts_with = list(
/obj/item/clothing/suit/fire/firefighter,
@@ -93,21 +89,13 @@
/obj/item/weapon/extinguisher = 2,
/obj/item/clothing/head/hardhat/red = 2)
/obj/structure/closet/firecloset/update_icon()
if(!opened)
icon_state = icon_closed
else
icon_state = icon_opened
/*
* Tool Closet
*/
/obj/structure/closet/toolcloset
name = "tool closet"
desc = "It's a storage unit for tools."
icon_state = "toolcloset"
icon_closed = "toolcloset"
icon_opened = "toolclosetopen"
closet_appearance = /decl/closet_appearance/secure_closet/engineering/tools
/obj/structure/closet/toolcloset/Initialize()
starts_with = list()
@@ -151,9 +139,7 @@
/obj/structure/closet/radiation
name = "radiation suit closet"
desc = "It's a storage unit for rad-protective suits."
icon_state = "radsuitcloset"
icon_opened = "toolclosetopen"
icon_closed = "radsuitcloset"
closet_appearance = /decl/closet_appearance/secure_closet/engineering/tools/radiation
starts_with = list(
/obj/item/clothing/suit/radiation = 2,
@@ -166,9 +152,7 @@
/obj/structure/closet/bombcloset
name = "\improper EOD closet"
desc = "It's a storage unit for explosion-protective suits."
icon_state = "bombsuit"
icon_closed = "bombsuit"
icon_opened = "bombsuitopen"
closet_appearance = /decl/closet_appearance/bomb
starts_with = list(
/obj/item/clothing/suit/bomb_suit,
@@ -186,9 +170,7 @@
/obj/structure/closet/bombclosetsecurity
name = "\improper EOD closet"
desc = "It's a storage unit for explosion-protective suits."
icon_state = "bombsuitsec"
icon_closed = "bombsuitsec"
icon_opened = "bombsuitsecopen"
closet_appearance = /decl/closet_appearance/bomb/security
starts_with = list(
/obj/item/clothing/suit/bomb_suit/security,
@@ -202,14 +184,13 @@
/obj/structure/closet/hydrant //wall mounted fire closet
name = "fire-safety closet"
desc = "It's a storage unit for fire-fighting supplies."
icon_state = "hydrant"
icon_closed = "hydrant"
icon_opened = "hydrant_open"
closet_appearance = /decl/closet_appearance/wall/hydrant
plane = TURF_PLANE
layer = ABOVE_TURF_LAYER
anchored = 1
density = 0
wall_mounted = 1
store_mobs = 0
starts_with = list(
/obj/item/clothing/suit/fire/firefighter,
@@ -225,15 +206,8 @@
/obj/structure/closet/medical_wall //wall mounted medical closet
name = "first-aid closet"
desc = "It's wall-mounted storage unit for first aid supplies."
icon_state = "medical_wall"
icon_closed = "medical_wall"
icon_opened = "medical_wall_open"
closet_appearance = /decl/closet_appearance/wall/medical
anchored = 1
density = 0
wall_mounted = 1
/obj/structure/closet/medical_wall/update_icon()
if(!opened)
icon_state = icon_closed
else
icon_state = icon_opened
store_mobs = 0
@@ -1,10 +1,7 @@
/obj/structure/closet/shuttleemerg //wall mounted fire closet
name = "emergency repairs closet"
desc = "It's a storage unit for emergency repair supplies."
icon = 'icons/obj/closet_yw.dmi'
icon_state = "engicloset"
icon_closed = "engicloset"
icon_opened = "engicloset_open"
closet_appearance = /decl/closet_appearance/wall/autolok/shuttleemerg
plane = TURF_PLANE
layer = ABOVE_TURF_LAYER
anchored = 1
@@ -4,12 +4,11 @@
/obj/structure/closet/walllocker
desc = "A wall mounted storage locker."
name = "Wall Locker"
icon = 'icons/obj/walllocker.dmi'
icon_state = "wall-locker"
icon = 'icons/obj/closets/bases/wall.dmi'
closet_appearance = /decl/closet_appearance/wall
density = 0
anchored = 1
icon_closed = "wall-locker"
icon_opened = "wall-lockeropen"
store_mobs = 0
//spawns endless (3 sets) amounts of breathmask, emergency oxy tank and crowbar
@@ -18,9 +17,7 @@
desc = "A wall mounted locker with emergency supplies."
var/list/spawnitems = list(/obj/item/weapon/tank/emergency/oxygen,/obj/item/clothing/mask/breath,/obj/item/weapon/tool/crowbar/red,/obj/item/device/flashlight/flare,)
var/amount = 2 // spawns each items X times.
icon_state = "emerg"
icon_closed = "emerg"
icon_opened = "emerg_open"
closet_appearance = /decl/closet_appearance/wall/emergency
/obj/structure/closet/walllocker/emerglocker/toggle(mob/user as mob)
src.attack_hand(user)
@@ -1,13 +1,11 @@
/obj/structure/closet/wardrobe
name = "wardrobe"
desc = "It's a storage unit for standard-issue attire."
icon_state = "blue"
icon_closed = "blue"
closet_appearance = /decl/closet_appearance/wardrobe
/obj/structure/closet/wardrobe/red
name = "security wardrobe"
icon_state = "red"
icon_closed = "red"
closet_appearance = /decl/closet_appearance/wardrobe/red
starts_with = list(
/obj/item/clothing/under/rank/security = 3,
@@ -41,9 +39,7 @@
/obj/structure/closet/wardrobe/detective
name = "detective wardrobe"
icon_state = "cabinet_closed"
icon_closed = "cabinet_closed"
icon_opened = "cabinet_open"
closet_appearance = /decl/closet_appearance/cabinet
starts_with = list(
/obj/item/clothing/head/det = 2,
@@ -64,8 +60,7 @@
/obj/structure/closet/wardrobe/pink
name = "pink wardrobe"
icon_state = "pink"
icon_closed = "pink"
closet_appearance = /decl/closet_appearance/wardrobe/pink
starts_with = list(
/obj/item/clothing/under/color/pink = 3,
@@ -73,8 +68,7 @@
/obj/structure/closet/wardrobe/black
name = "black wardrobe"
icon_state = "black"
icon_closed = "black"
closet_appearance = /decl/closet_appearance/wardrobe/black
starts_with = list(
/obj/item/clothing/under/color/black = 3,
@@ -88,8 +82,7 @@
/obj/structure/closet/wardrobe/chaplain_black
name = "chapel wardrobe"
desc = "It's a storage unit for approved religious attire."
icon_state = "black"
icon_closed = "black"
closet_appearance = /decl/closet_appearance/wardrobe/chapel
starts_with = list(
/obj/item/clothing/under/rank/chaplain,
@@ -110,8 +103,7 @@
/obj/structure/closet/wardrobe/monastary
name = "Monastary wardrobe"
desc = "It's a storage unit for approved religious attire."
icon_state = "black"
icon_closed = "black"
closet_appearance = /decl/closet_appearance/wardrobe/black
starts_with = list(
/obj/item/clothing/suit/unathi/mantle = 2,
@@ -124,8 +116,7 @@
/obj/structure/closet/wardrobe/green
name = "green wardrobe"
icon_state = "green"
icon_closed = "green"
closet_appearance = /decl/closet_appearance/wardrobe/green
starts_with = list(
/obj/item/clothing/under/color/green = 3,
@@ -135,8 +126,7 @@
/obj/structure/closet/wardrobe/xenos
name = "xenos wardrobe"
icon_state = "green"
icon_closed = "green"
closet_appearance = /decl/closet_appearance/wardrobe/xenos
starts_with = list(
/obj/item/clothing/suit/unathi/mantle,
@@ -150,8 +140,7 @@
/obj/structure/closet/wardrobe/orange
name = "prison wardrobe"
desc = "It's a storage unit for regulation prisoner attire."
icon_state = "orange"
icon_closed = "orange"
closet_appearance = /decl/closet_appearance/wardrobe/orange
starts_with = list(
/obj/item/clothing/under/color/prison = 3,
@@ -160,8 +149,7 @@
/obj/structure/closet/wardrobe/yellow
name = "yellow wardrobe"
icon_state = "yellow"
icon_closed = "yellow"
closet_appearance = /decl/closet_appearance/wardrobe/yellow
starts_with = list(
/obj/item/clothing/under/color/yellow = 3,
@@ -172,8 +160,7 @@
/obj/structure/closet/wardrobe/atmospherics_yellow
name = "atmospherics wardrobe"
icon_state = "yellow"
icon_closed = "yellow"
closet_appearance = /decl/closet_appearance/wardrobe/engineer/atmos
starts_with = list(
/obj/item/clothing/under/rank/atmospheric_technician = 3,
@@ -187,8 +174,7 @@
/obj/structure/closet/wardrobe/engineering_yellow
name = "engineering wardrobe"
icon_state = "yellow"
icon_closed = "yellow"
closet_appearance = /decl/closet_appearance/wardrobe/engineer
starts_with = list(
/obj/item/clothing/under/rank/engineer = 3,
@@ -205,8 +191,7 @@
/obj/structure/closet/wardrobe/white
name = "white wardrobe"
icon_state = "white"
icon_closed = "white"
closet_appearance = /decl/closet_appearance/wardrobe/white
starts_with = list(
/obj/item/clothing/under/color/white = 3,
@@ -216,8 +201,7 @@
/obj/structure/closet/wardrobe/pjs
name = "pajama wardrobe"
icon_state = "white"
icon_closed = "white"
closet_appearance = /decl/closet_appearance/wardrobe/pjs
starts_with = list(
/obj/item/clothing/under/pj/red = 2,
@@ -228,8 +212,7 @@
/obj/structure/closet/wardrobe/science_white
name = "science wardrobe"
icon_state = "white"
icon_closed = "white"
closet_appearance = /decl/closet_appearance/wardrobe/science
starts_with = list(
/obj/item/clothing/under/rank/scientist = 3,
@@ -258,8 +241,7 @@
/obj/structure/closet/wardrobe/robotics_black
name = "robotics wardrobe"
icon_state = "black"
icon_closed = "black"
closet_appearance = /decl/closet_appearance/wardrobe/robotics
starts_with = list(
/obj/item/clothing/under/rank/roboticist = 2,
@@ -280,8 +262,7 @@
/obj/structure/closet/wardrobe/chemistry_white
name = "chemistry wardrobe"
icon_state = "white"
icon_closed = "white"
closet_appearance = /decl/closet_appearance/wardrobe/medical/chemistry
starts_with = list(
/obj/item/clothing/under/rank/chemist = 2,
@@ -295,8 +276,7 @@
/obj/structure/closet/wardrobe/genetics_white
name = "genetics wardrobe"
icon_state = "white"
icon_closed = "white"
closet_appearance = /decl/closet_appearance/wardrobe/medical/genetics
starts_with = list(
/obj/item/clothing/under/rank/geneticist = 2,
@@ -309,8 +289,7 @@
/obj/structure/closet/wardrobe/virology_white
name = "virology wardrobe"
icon_state = "white"
icon_closed = "white"
closet_appearance = /decl/closet_appearance/wardrobe/medical/virology
starts_with = list(
/obj/item/clothing/under/rank/virologist = 2,
@@ -324,8 +303,7 @@
/obj/structure/closet/wardrobe/medic_white
name = "medical wardrobe"
icon_state = "white"
icon_closed = "white"
closet_appearance = /decl/closet_appearance/wardrobe/medical/white
starts_with = list(
/obj/item/clothing/under/rank/medical = 2,
@@ -350,8 +328,7 @@
/obj/structure/closet/wardrobe/medic_gown
name = "cloning wardrobe"
icon_state = "white"
icon_closed = "white"
closet_appearance = /decl/closet_appearance/wardrobe/medical/patient
starts_with = list(
/obj/item/clothing/under/medigown = 4)
@@ -359,8 +336,7 @@
/obj/structure/closet/wardrobe/grey
name = "grey wardrobe"
icon_state = "grey"
icon_closed = "grey"
closet_appearance = /decl/closet_appearance/wardrobe/grey
starts_with = list(
/obj/item/clothing/under/color/grey = 3,
@@ -370,8 +346,7 @@
/obj/structure/closet/wardrobe/mixed
name = "mixed wardrobe"
icon_state = "mixed"
icon_closed = "mixed"
closet_appearance = /decl/closet_appearance/wardrobe/mixed
starts_with = list(
/obj/item/clothing/under/color/blue,
@@ -407,9 +382,7 @@
/obj/structure/closet/wardrobe/tactical
name = "tactical equipment"
icon_state = "syndicate1"
icon_closed = "syndicate1"
icon_opened = "syndicate1open"
closet_appearance = /decl/closet_appearance/tactical
starts_with = list(
/obj/item/clothing/under/tactical,
@@ -434,9 +407,7 @@
/obj/structure/closet/wardrobe/ert
name = "emergency response team equipment"
icon_state = "syndicate1"
icon_closed = "syndicate1"
icon_opened = "syndicate1open"
closet_appearance = /decl/closet_appearance/ert
starts_with = list(
/obj/item/clothing/under/rank/centcom,
@@ -453,8 +424,7 @@
/obj/structure/closet/wardrobe/suit
name = "suit locker"
icon_state = "mixed"
icon_closed = "mixed"
closet_appearance = /decl/closet_appearance/wardrobe/suit
starts_with = list(
/obj/item/clothing/under/assistantformal,
@@ -482,9 +452,7 @@
/obj/structure/closet/wardrobe/captain
name = "colony director's wardrobe"
icon_state = "cabinet_closed"
icon_closed = "cabinet_closed"
icon_opened = "cabinet_open"
closet_appearance = /decl/closet_appearance/cabinet
starts_with = list(
/obj/item/weapon/storage/backpack/captain,
@@ -3,13 +3,10 @@
/obj/structure/closet/crate
name = "crate"
desc = "A rectangular steel crate."
icon = 'icons/obj/storage_vr.dmi' //VOREStation edit
icon_state = "crate"
icon_opened = "crateopen"
icon_closed = "crate"
icon = 'icons/obj/closets/bases/crate.dmi'
closet_appearance = /decl/closet_appearance/crate
climbable = 1
var/points_per_crate = 5
// mouse_drag_pointer = MOUSE_ACTIVE_POINTER //???
var/rigged = 0
/obj/structure/closet/crate/can_open()
@@ -34,14 +31,14 @@
if(usr.stunned)
return 2
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
playsound(src, 'sound/machines/click.ogg', 15, 1, -3)
for(var/obj/O in src)
O.forceMove(get_turf(src))
icon_state = icon_opened
src.opened = 1
if(climbable)
structure_shaken()
update_icon()
return 1
/obj/structure/closet/crate/close()
@@ -50,7 +47,7 @@
if(!src.can_close())
return 0
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
playsound(src, 'sound/machines/click.ogg', 15, 1, -3)
var/itemcount = 0
for(var/obj/O in get_turf(src))
if(itemcount >= storage_capacity)
@@ -64,8 +61,8 @@
O.forceMove(src)
itemcount++
icon_state = icon_closed
src.opened = 0
update_icon()
return 1
/obj/structure/closet/crate/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -97,7 +94,7 @@
else if(W.is_wirecutter())
if(rigged)
to_chat(user , "<span class='notice'>You cut away the wiring.</span>")
playsound(src.loc, W.usesound, 100, 1)
playsound(src, W.usesound, 100, 1)
rigged = 0
return
else return attack_hand(user)
@@ -125,28 +122,25 @@
/obj/structure/closet/crate/secure
desc = "A secure crate."
name = "Secure crate"
icon_state = "securecrate"
icon_opened = "securecrateopen"
icon_closed = "securecrate"
var/redlight = "securecrater"
var/greenlight = "securecrateg"
var/sparks = "securecratesparks"
var/emag = "securecrateemag"
closet_appearance = /decl/closet_appearance/crate/secure
var/broken = 0
var/locked = 1
/obj/structure/closet/crate/secure/New()
..()
if(locked)
overlays.Cut()
overlays += redlight
else
overlays.Cut()
overlays += greenlight
/obj/structure/closet/crate/secure/can_open()
return !locked
/obj/structure/closet/crate/secure/update_icon()
if(opened)
icon_state = "open"
else
if(broken)
icon_state = "closed_emagged[sealed ? "_welded" : ""]"
else
if(locked)
icon_state = "closed_locked[sealed ? "_welded" : ""]"
else
icon_state = "closed_unlocked[sealed ? "_welded" : ""]"
/obj/structure/closet/crate/secure/proc/togglelock(mob/user as mob)
if(src.opened)
to_chat(user, "<span class='notice'>Close the crate first.</span>")
@@ -166,8 +160,7 @@
if(user)
for(var/mob/O in viewers(user, 3))
O.show_message( "<span class='notice'>The crate has been [locked ? null : "un"]locked by [user].</span>", 1)
overlays.Cut()
overlays += locked ? redlight : greenlight
update_icon()
/obj/structure/closet/crate/secure/verb/verb_togglelock()
set src in oview(1) // One square distance
@@ -202,14 +195,11 @@
/obj/structure/closet/crate/secure/emag_act(var/remaining_charges, var/mob/user)
if(!broken)
overlays.Cut()
overlays += emag
overlays += sparks
spawn(6) overlays -= sparks //Tried lots of stuff but nothing works right. so i have to use this *sadface*
playsound(src.loc, "sparks", 60, 1)
src.locked = 0
src.broken = 1
playsound(src, "sparks", 60, 1)
locked = 0
broken = 1
to_chat(user, "<span class='notice'>You unlock \the [src].</span>")
update_icon()
return 1
/obj/structure/closet/crate/secure/emp_act(severity)
@@ -217,75 +207,52 @@
O.emp_act(severity)
if(!broken && !opened && prob(50/severity))
if(!locked)
src.locked = 1
overlays.Cut()
overlays += redlight
locked = 1
else
overlays.Cut()
overlays += emag
overlays += sparks
spawn(6) overlays -= sparks //Tried lots of stuff but nothing works right. so i have to use this *sadface*
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
src.locked = 0
playsound(src, 'sound/effects/sparks4.ogg', 75, 1)
locked = 0
if(!opened && prob(20/severity))
if(!locked)
open()
else
src.req_access = list()
src.req_access += pick(get_all_station_access())
req_access = list()
req_access += pick(get_all_station_access())
update_icon()
..()
/obj/structure/closet/crate/plastic
name = "plastic crate"
desc = "A rectangular plastic crate."
icon_state = "plasticcrate"
icon_opened = "plasticcrateopen"
icon_closed = "plasticcrate"
closet_appearance = /decl/closet_appearance/crate/plastic
points_per_crate = 1 //5 crates per ordered crate, +5 for the crate it comes in.
/obj/structure/closet/crate/internals
name = "internals crate"
desc = "A internals crate."
icon_state = "o2crate"
icon_opened = "o2crateopen"
icon_closed = "o2crate"
/obj/structure/closet/crate/trashcart
name = "trash cart"
desc = "A heavy, metal trashcart with wheels."
icon_state = "trashcart"
icon_opened = "trashcartopen"
icon_closed = "trashcart"
closet_appearance = /decl/closet_appearance/cart/trash
/*these aren't needed anymore
/obj/structure/closet/crate/hat
desc = "A crate filled with Valuable Collector's Hats!."
name = "Hat Crate"
icon_state = "crate"
icon_opened = "crateopen"
icon_closed = "crate"
/obj/structure/closet/crate/contraband
name = "Poster crate"
desc = "A random assortment of posters manufactured by providers NOT listed under NanoTrasen's whitelist."
icon_state = "crate"
icon_opened = "crateopen"
icon_closed = "crate"
*/
/obj/structure/closet/crate/medical
name = "medical crate"
desc = "A medical crate."
icon_state = "medicalcrate"
icon_opened = "medicalcrateopen"
icon_closed = "medicalcrate"
closet_appearance = /decl/closet_appearance/crate/medical
/obj/structure/closet/crate/rcd
name = "\improper RCD crate"
desc = "A crate with rapid construction device."
icon_state = "engi_crate"
icon_opened = "engi_crateopen"
icon_closed = "engi_crate"
starts_with = list(
/obj/item/weapon/rcd_ammo = 3,
@@ -293,9 +260,6 @@
/obj/structure/closet/crate/solar
name = "solar pack crate"
icon_state = "engi_crate" //VOREStation Edit
icon_opened = "engi_crateopen" //VOREStation Edit
icon_closed = "engi_crate" //VOREStation Edit
starts_with = list(
/obj/item/solar_assembly = 21,
@@ -312,9 +276,7 @@
/obj/structure/closet/crate/freezer
name = "freezer"
desc = "A freezer."
icon_state = "freezer"
icon_opened = "freezeropen"
icon_closed = "freezer"
closet_appearance = /decl/closet_appearance/crate/freezer
var/target_temp = T0C - 40
var/cooling_power = 40
@@ -365,18 +327,14 @@
/obj/structure/closet/crate/bin
name = "large bin"
desc = "A large bin."
icon = 'icons/obj/storage.dmi' //VOREStation edit
icon_state = "largebin"
icon_opened = "largebinopen"
icon_closed = "largebin"
closet_appearance = null
icon = 'icons/obj/closets/largebin.dmi'
/obj/structure/closet/crate/radiation
name = "radioactive gear crate"
desc = "A crate with a radiation sign on it."
icon_state = "radiation"
icon_opened = "radiationopen"
icon_closed = "radiation"
closet_appearance = /decl/closet_appearance/crate/radiation
starts_with = list(
/obj/item/clothing/suit/radiation = 4,
@@ -386,72 +344,47 @@
/obj/structure/closet/crate/secure/weapon
name = "weapons crate"
desc = "A secure weapons crate."
icon_state = "weaponcrate"
icon_opened = "weaponcrateopen"
icon_closed = "weaponcrate"
closet_appearance = /decl/closet_appearance/crate/secure/weapon
/obj/structure/closet/crate/secure/phoron
name = "phoron crate"
desc = "A secure phoron crate."
icon_state = "phoroncrate"
icon_opened = "phoroncrateopen"
icon_closed = "phoroncrate"
closet_appearance = /decl/closet_appearance/crate/secure/hazard
/obj/structure/closet/crate/secure/gear
name = "gear crate"
desc = "A secure gear crate."
icon_state = "secgearcrate"
icon_opened = "secgearcrateopen"
icon_closed = "secgearcrate"
closet_appearance = /decl/closet_appearance/crate/secure/weapon
/obj/structure/closet/crate/secure/hydrosec
name = "secure hydroponics crate"
desc = "A crate with a lock on it, painted in the scheme of the station's botanists."
icon_state = "hydrosecurecrate"
icon_opened = "hydrosecurecrateopen"
icon_closed = "hydrosecurecrate"
closet_appearance = /decl/closet_appearance/crate/secure/hydroponics
/obj/structure/closet/crate/secure/engineering
desc = "A crate with a lock on it, painted in the scheme of the station's engineers."
name = "secure engineering crate"
icon_state = "engi_secure_crate"
icon_opened = "engi_secure_crateopen"
icon_closed = "engi_secure_crate"
/obj/structure/closet/crate/secure/science
name = "secure science crate"
desc = "A crate with a lock on it, painted in the scheme of the station's scientists."
icon_state = "scisecurecrate"
icon_opened = "scisecurecrateopen"
icon_closed = "scisecurecrate"
/obj/structure/closet/crate/secure/bin
name = "secure bin"
desc = "A secure bin."
icon = 'icons/obj/storage.dmi' //VOREStation edit
icon_state = "largebins"
icon_opened = "largebinsopen"
icon_closed = "largebins"
redlight = "largebinr"
greenlight = "largebing"
sparks = "largebinsparks"
emag = "largebinemag"
/obj/structure/closet/crate/large
name = "large crate"
desc = "A hefty metal crate."
icon = 'icons/obj/storage_vr.dmi' //VOREStation Edit
icon_state = "largemetal"
icon_opened = "largemetalopen"
icon_closed = "largemetal"
icon = 'icons/obj/closets/bases/large_crate.dmi'
closet_appearance = /decl/closet_appearance/large_crate
/obj/structure/closet/crate/large/close()
. = ..()
@@ -475,12 +408,8 @@
/obj/structure/closet/crate/secure/large
name = "large crate"
desc = "A hefty metal crate with an electronic locking system."
icon = 'icons/obj/storage_vr.dmi' //VOREStation Edit
icon_state = "largemetalsecure" //VOREStation Edit
icon_opened = "largemetalsecureopen" //VOREStation Edit
icon_closed = "largemetalsecure" //VOREStation Edit
redlight = "largemetalr"
greenlight = "largemetalg"
icon = 'icons/obj/closets/bases/large_crate.dmi'
closet_appearance = /decl/closet_appearance/large_crate/secure
/obj/structure/closet/crate/secure/large/close()
@@ -505,33 +434,19 @@
//fluff variant
/obj/structure/closet/crate/secure/large/reinforced
desc = "A hefty, reinforced metal crate with an electronic locking system."
icon_state = "largermetal"
icon_opened = "largermetalopen"
icon_closed = "largermetal"
/obj/structure/closet/crate/engineering
name = "engineering crate"
icon_state = "engi_crate"
icon_opened = "engi_crateopen"
icon_closed = "engi_crate"
/obj/structure/closet/crate/engineering/electrical
icon_state = "engi_e_crate"
icon_opened = "engi_crateopen"
icon_closed = "engi_e_crate"
/obj/structure/closet/crate/science
name = "science crate"
icon_state = "scicrate"
icon_opened = "scicrateopen"
icon_closed = "scicrate"
/obj/structure/closet/crate/hydroponics
name = "hydroponics crate"
desc = "All you need to destroy those pesky weeds and pests."
icon_state = "hydrocrate"
icon_opened = "hydrocrateopen"
icon_closed = "hydrocrate"
closet_appearance = /decl/closet_appearance/crate/hydroponics
/obj/structure/closet/crate/hydroponics/prespawned
@@ -34,6 +34,4 @@
return
/obj/structure/closet/crate/medical/blood
icon_state = "blood"
icon_opened = "bloodopen"
icon_closed = "blood"
closet_appearance = /decl/closet_appearance/cart/biohazard/alt
@@ -32,11 +32,11 @@
if(!T)
to_chat(user, "<span class='notice'>You can't open this here!</span>")
if(W.is_wrench() && do_after(user, 60 * W.toolspeed, src))
playsound(loc, W.usesound, 50, 1)
playsound(src, W.usesound, 50, 1)
disassemble(W, user)
user.visible_message("<span class='notice'>[user] begins loosening \the [src]'s bolts.</span>")
if(W.is_wirecutter() && do_after(user, 70 * W.toolspeed, src))
playsound(loc, W.usesound, 50, 1)
playsound(src, W.usesound, 50, 1)
disassemble(W, user)
user.visible_message("<span class='notice'>[user] begins cutting \the [src]'s bolts.</span>")
else
+1 -1
View File
@@ -22,7 +22,7 @@
..(P, def_zone)
/obj/structure/curtain/attack_hand(mob/user)
playsound(get_turf(loc), "rustle", 15, 1, -5)
playsound(src, "rustle", 15, 1, -5)
toggle()
..()
+2 -2
View File
@@ -43,7 +43,7 @@
playsound(src, "shatter", 70, 1)
update_icon()
else
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
playsound(src, 'sound/effects/Glasshit.ogg', 75, 1)
return
/obj/structure/displaycase/update_icon()
@@ -57,7 +57,7 @@
/obj/structure/displaycase/attackby(obj/item/weapon/W as obj, mob/user as mob)
user.setClickCooldown(user.get_attack_speed(W))
user.do_attack_animation(src)
playsound(loc, 'sound/effects/Glasshit.ogg', 50, 1)
playsound(src, 'sound/effects/Glasshit.ogg', 50, 1)
src.health -= W.force
src.healthcheck()
..()
@@ -268,7 +268,7 @@
if (S)
if (S.get_amount() >= 1)
if(material_name == "rglass")
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
playsound(src, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 40) && !glass)
if (S.use(1))
@@ -280,7 +280,7 @@
to_chat(user, "You cannot make an airlock out of that material.")
return
if(S.get_amount() >= 2)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
playsound(src, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 40) && !glass)
if (S.use(2))
+1 -1
View File
@@ -38,7 +38,7 @@
if(O.is_wrench())
if(!has_extinguisher)
to_chat(user, "<span class='notice'>You start to unwrench the extinguisher cabinet.</span>")
playsound(src.loc, O.usesound, 50, 1)
playsound(src, O.usesound, 50, 1)
if(do_after(user, 15 * O.toolspeed))
to_chat(user, "<span class='notice'>You unwrench the extinguisher cabinet.</span>")
new /obj/item/frame/extinguisher_cabinet( src.loc )
+4 -4
View File
@@ -31,7 +31,7 @@
if (isrobot(user) || locked)
if(istype(O, /obj/item/device/multitool))
to_chat(user, "<span class='warning'>Resetting circuitry...</span>")
playsound(user, 'sound/machines/lockreset.ogg', 50, 1)
playsound(src, 'sound/machines/lockreset.ogg', 50, 1)
if(do_after(user, 20 * O.toolspeed))
locked = 0
to_chat(user, "<span class = 'caution'> You disable the locking modules.</span>")
@@ -44,13 +44,13 @@
toggle_close_open()
return
else
playsound(user, 'sound/effects/Glasshit.ogg', 100, 1) //We don't want this playing every time
playsound(src, 'sound/effects/Glasshit.ogg', 100, 1) //We don't want this playing every time
if(W.force < 15)
to_chat(user, "<span class='notice'>The cabinet's protective glass glances off the hit.</span>")
else
hitstaken++
if(hitstaken == 4)
playsound(user, 'sound/effects/Glassbr3.ogg', 100, 1) //Break cabinet, receive goodies. Cabinet's fucked for life after that.
playsound(src, 'sound/effects/Glassbr3.ogg', 100, 1) //Break cabinet, receive goodies. Cabinet's fucked for life after that.
smashed = 1
locked = 0
open= 1
@@ -82,7 +82,7 @@
return
else
to_chat(user, "<span class='warning'>Resetting circuitry...</span>")
playsound(user, 'sound/machines/lockenable.ogg', 50, 1)
playsound(src, 'sound/machines/lockenable.ogg', 50, 1)
if(do_after(user,20 * O.toolspeed))
locked = 1
to_chat(user, "<span class = 'caution'> You re-enable the locking modules.</span>")
+4 -4
View File
@@ -20,7 +20,7 @@
if(user.a_intent == I_HURT)
user.setClickCooldown(user.get_attack_speed())
flick("[icon_state]_hit", src)
playsound(src.loc, 'sound/effects/woodhit.ogg', 25, 1, -1)
playsound(src, 'sound/effects/woodhit.ogg', 25, 1, -1)
user.do_attack_animation(src)
user.nutrition = user.nutrition - 5
to_chat(user, "<span class='warning'>You [pick(hit_message)] \the [src].</span>")
@@ -34,7 +34,7 @@
/obj/structure/fitness/weightlifter/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench())
playsound(src.loc, 'sound/items/Deconstruct.ogg', 75, 1)
playsound(src, 'sound/items/Deconstruct.ogg', 75, 1)
weight = ((weight) % qualifiers.len) + 1
to_chat(user, "You set the machine's weight level to [weight].")
@@ -52,11 +52,11 @@
return
else
being_used = 1
playsound(src.loc, 'sound/effects/weightlifter.ogg', 50, 1)
playsound(src, 'sound/effects/weightlifter.ogg', 50, 1)
user.set_dir(SOUTH)
flick("[icon_state]_[weight]", src)
if(do_after(user, 20 + (weight * 10)))
playsound(src.loc, 'sound/effects/weightdrop.ogg', 25, 1)
playsound(src, 'sound/effects/weightdrop.ogg', 25, 1)
user.adjust_nutrition(weight * -10)
to_chat(user, "<span class='notice'>You lift the weights [qualifiers[weight]].</span>")
being_used = 0
+101 -2
View File
@@ -9,18 +9,51 @@
layer = WINDOW_LAYER
anchored = 1
flags = ON_BORDER
/obj/structure/fitness/boxing_ropes/CanPass(atom/movable/mover, turf/target)
/obj/structure/fitness/boxing_ropes/CanPass(atom/movable/mover, turf/target) //sets it so that players can enter turf from all directions except the main direction.
if(istype(mover) && mover.checkpass(PASSTABLE))
return TRUE
if(get_dir(mover, target) == turn(dir, 180))
return !density
return TRUE
/obj/structure/fitness/boxing_ropes/CheckExit(atom/movable/O as mob|obj, target as turf)
/obj/structure/fitness/boxing_ropes/CheckExit(atom/movable/O as mob|obj, target as turf) // Sets it so that players can't leave the truf from the set direction.
if(istype(O) && O.checkpass(PASSTABLE))
return 1
if(get_dir(O.loc, target) == dir)
return 0
return 1
/obj/structure/fitness/boxing_ropes/do_climb(var/mob/living/user) //Sets it so that players can climb *over* the turf and will enter the the turf **this** turf is facing.
if(!can_climb(user))
return
usr.visible_message("<span class='warning'>[user] starts climbing onto \the [src]!</span>")
climbers |= user
if(!do_after(user,(issmall(user) ? 20 : 34)))
climbers -= user
return
if(!can_climb(user, post_climb_check=1))
climbers -= user
return
if(get_turf(user) == get_turf(src))
usr.forceMove(get_step(src, src.dir))
else
usr.forceMove(get_turf(src))
usr.visible_message("<span class='warning'>[user] climbed over \the [src]!</span>")
climbers -= user
/obj/structure/fitness/boxing_ropes/can_climb(var/mob/living/user, post_climb_check=0) //Sets it to keep people from climbing over into the next turf if it is occupied.
if(!..())
return 0
if(get_turf(user) == get_turf(src))
var/obj/occupied = neighbor_turf_impassable()
if(occupied)
to_chat(user, "<span class='danger'>You can't climb there, there's \a [occupied] in the way.</span>")
return 0
return 1
/obj/structure/fitness/boxing_ropes_bottom
name = "Ropes"
@@ -46,6 +79,39 @@
if(get_dir(O.loc, target) == dir)
return 0
return 1
/obj/structure/fitness/boxing_ropes_bottom/do_climb(var/mob/living/user)
if(!can_climb(user))
return
usr.visible_message("<span class='warning'>[user] starts climbing onto \the [src]!</span>")
climbers |= user
if(!do_after(user,(issmall(user) ? 20 : 34)))
climbers -= user
return
if(!can_climb(user, post_climb_check=1))
climbers -= user
return
if(get_turf(user) == get_turf(src))
usr.forceMove(get_step(src, src.dir))
else
usr.forceMove(get_turf(src))
usr.visible_message("<span class='warning'>[user] climbed over \the [src]!</span>")
climbers -= user
/obj/structure/fitness/boxing_ropes_bottom/can_climb(var/mob/living/user, post_climb_check=0)
if(!..())
return 0
if(get_turf(user) == get_turf(src))
var/obj/occupied = neighbor_turf_impassable()
if(occupied)
to_chat(user, "<span class='danger'>You can't climb there, there's \a [occupied] in the way.</span>")
return 0
return 1
@@ -72,6 +138,39 @@
if(get_dir(O.loc, target) == dir)
return 0
return 1
/obj/structure/fitness/boxing_turnbuckle/do_climb(var/mob/living/user)
if(!can_climb(user))
return
usr.visible_message("<span class='warning'>[user] starts climbing onto \the [src]!</span>")
climbers |= user
if(!do_after(user,(issmall(user) ? 20 : 34)))
climbers -= user
return
if(!can_climb(user, post_climb_check=1))
climbers -= user
return
if(get_turf(user) == get_turf(src))
usr.forceMove(get_step(src, src.dir))
else
usr.forceMove(get_turf(src))
usr.visible_message("<span class='warning'>[user] climbed over \the [src]!</span>")
climbers -= user
/obj/structure/fitness/boxing_turnbuckle/can_climb(var/mob/living/user, post_climb_check=0)
if(!..())
return 0
if(get_turf(user) == get_turf(src))
var/obj/occupied = neighbor_turf_impassable()
if(occupied)
to_chat(user, "<span class='danger'>You can't climb there, there's \a [occupied] in the way.</span>")
return 0
return 1
/turf/simulated/fitness
name = "Mat"
+2 -2
View File
@@ -58,9 +58,9 @@
damage_to_do = round(damage_to_do / 4)
if(damage_to_do > 0)
if(W.sharp && W.edge)
playsound(get_turf(src), 'sound/effects/woodcutting.ogg', 50, 1)
playsound(src, 'sound/effects/woodcutting.ogg', 50, 1)
else
playsound(get_turf(src), W.hitsound, 50, 1)
playsound(src, W.hitsound, 50, 1)
if(damage_to_do > 5 && !indestructable)
adjust_health(-damage_to_do)
else
+2 -2
View File
@@ -27,7 +27,7 @@
/obj/structure/grille/attack_hand(mob/user as mob)
user.setClickCooldown(user.get_attack_speed())
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
playsound(src, 'sound/effects/grillehit.ogg', 80, 1)
user.do_attack_animation(src)
var/damage_dealt = 1
@@ -153,7 +153,7 @@
else if((W.flags & NOCONDUCT) || !shock(user, 70))
user.setClickCooldown(user.get_attack_speed(W))
user.do_attack_animation(src)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
playsound(src, 'sound/effects/grillehit.ogg', 80, 1)
switch(W.damtype)
if("fire")
health -= W.force
+5 -5
View File
@@ -86,7 +86,7 @@
/obj/structure/inflatable/proc/hit(var/damage, var/sound_effect = 1)
health = max(0, health - damage)
if(sound_effect)
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
playsound(src, 'sound/effects/Glasshit.ogg', 75, 1)
if(health <= 0)
puncture()
@@ -102,7 +102,7 @@
qdel(src)
/obj/structure/inflatable/proc/deflate()
playsound(loc, 'sound/machines/hiss.ogg', 75, 1)
playsound(src, 'sound/machines/hiss.ogg', 75, 1)
//to_chat(user, "<span class='notice'>You slowly deflate the inflatable wall.</span>")
visible_message("[src] slowly deflates.")
spawn(50)
@@ -111,7 +111,7 @@
qdel(src)
/obj/structure/inflatable/proc/puncture()
playsound(loc, 'sound/machines/hiss.ogg', 75, 1)
playsound(src, 'sound/machines/hiss.ogg', 75, 1)
visible_message("[src] rapidly deflates!")
var/obj/item/inflatable/torn/R = new /obj/item/inflatable/torn(loc)
src.transfer_fingerprints_to(R)
@@ -227,7 +227,7 @@
icon_state = "door_closed"
/obj/structure/inflatable/door/deflate()
playsound(loc, 'sound/machines/hiss.ogg', 75, 1)
playsound(src, 'sound/machines/hiss.ogg', 75, 1)
visible_message("[src] slowly deflates.")
spawn(50)
var/obj/item/inflatable/door/R = new /obj/item/inflatable/door(loc)
@@ -235,7 +235,7 @@
qdel(src)
/obj/structure/inflatable/door/puncture()
playsound(loc, 'sound/machines/hiss.ogg', 75, 1)
playsound(src, 'sound/machines/hiss.ogg', 75, 1)
visible_message("[src] rapidly deflates!")
var/obj/item/inflatable/door/torn/R = new /obj/item/inflatable/door/torn(loc)
src.transfer_fingerprints_to(R)
+3 -2
View File
@@ -3,6 +3,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
/obj/structure/janitorialcart
name = "janitorial cart"
desc = "The ultimate in janitorial carts! Has space for water, mops, signs, trash bags, and more!"
description_info = "You can use alt-click while holding a mop to stow the mop. Alt-click holding a reagent container will empty the contents into the bucket without trying to put the container in any attached trash bag."
icon = 'icons/obj/janitor.dmi'
icon_state = "cart"
anchored = 0
@@ -56,7 +57,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
else
mybucket.reagents.trans_to_obj(I, 5) //
to_chat(user, "<span class='notice'>You wet [I] in [mybucket].</span>")
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
playsound(src, 'sound/effects/slosh.ogg', 25, 1)
else
to_chat(user, "<span class='notice'>[I] can't absorb anymore liquid!</span>")
else
@@ -328,7 +329,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
if(reagents.total_volume > 1)
reagents.trans_to_obj(I, 2)
to_chat(user, "<span class='notice'>You wet [I] in the [callme].</span>")
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
playsound(src, 'sound/effects/slosh.ogg', 25, 1)
else
to_chat(user, "<span class='notice'>This [callme] is out of water!</span>")
else if(istype(I, /obj/item/key))
@@ -0,0 +1,42 @@
/obj/structure/foodcart
name = "Foodcart"
icon = 'icons/obj/kitchen_vr.dmi'
icon_state = "foodcart-0"
desc = "The ultimate in food transport! When opened you notice two compartments with odd blue glows to them. One feels very warm, while the other is very cold."
anchored = 0
opacity = 0
density = 1
/obj/structure/foodcart/Initialize()
. = ..()
for(var/obj/item/I in loc)
if(istype(I, /obj/item/weapon/reagent_containers/food))
I.loc = src
update_icon()
/obj/structure/foodcart/attackby(obj/item/O as obj, mob/user as mob)
if(istype(O, /obj/item/weapon/reagent_containers/food))
user.drop_item()
O.loc = src
update_icon()
else
return
/obj/structure/foodcart/attack_hand(var/mob/user as mob)
if(contents.len)
var/obj/item/weapon/reagent_containers/food/choice = input("What would you like to grab from the cart?") as null|obj in contents
if(choice)
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
return
if(ishuman(user))
if(!user.get_active_hand())
user.put_in_hands(choice)
else
choice.loc = get_turf(src)
update_icon()
/obj/structure/foodcart/update_icon()
if(contents.len < 5)
icon_state = "foodcart-[contents.len]"
else
icon_state = "foodcart-5"
@@ -212,7 +212,7 @@
breather.internal = tank
breather.internals?.icon_state = "internal1"
valve_opened = TRUE
//playsound(get_turf(src), 'sound/effects/internals.ogg', 100, 1)
//playsound(src, 'sound/effects/internals.ogg', 100, 1)
update_icon()
START_PROCESSING(SSobj,src)
if ("Remove vessel")
+5 -5
View File
@@ -51,7 +51,7 @@
/obj/structure/mirror/attackby(obj/item/I as obj, mob/user as mob)
if(I.is_wrench())
if(!glass)
playsound(src.loc, I.usesound, 50, 1)
playsound(src, I.usesound, 50, 1)
if(do_after(user, 20 * I.toolspeed))
to_chat(user, "<span class='notice'>You unfasten the frame.</span>")
new /obj/item/frame/mirror( src.loc )
@@ -65,7 +65,7 @@
new /obj/item/weapon/material/shard( src.loc )
return
if(!shattered && glass)
playsound(src.loc, I.usesound, 50, 1)
playsound(src, I.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the glass.</span>")
glass = !glass
icon_state = "mirror_frame"
@@ -88,7 +88,7 @@
return
if(shattered && glass)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
if(prob(I.force * 2))
@@ -97,13 +97,13 @@
shatter()
else
visible_message("<span class='warning'>[user] hits [src] with [I]!</span>")
playsound(src.loc, 'sound/effects/Glasshit.ogg', 70, 1)
playsound(src, 'sound/effects/Glasshit.ogg', 70, 1)
/obj/structure/mirror/attack_generic(var/mob/user, var/damage)
user.do_attack_animation(src)
if(shattered && glass)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return 0
if(damage)
+1 -1
View File
@@ -28,4 +28,4 @@ GLOBAL_LIST_BOILERPLATE(all_mopbuckets, /obj/structure/mopbucket)
else
reagents.trans_to_obj(I, 5)
to_chat(user, "<span class='notice'>You wet \the [I] in \the [src].</span>")
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
playsound(src, 'sound/effects/slosh.ogg', 25, 1)
+5 -5
View File
@@ -95,13 +95,13 @@
for(var/atom/movable/A as mob|obj in src.connected.loc)
if (!( A.anchored ))
A.forceMove(src)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
qdel(src.connected)
src.connected = null
/obj/structure/morgue/proc/open()
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
src.connected = new /obj/structure/m_tray( src.loc )
step(src.connected, src.dir)
src.connected.layer = OBJ_LAYER
@@ -225,11 +225,11 @@ GLOBAL_LIST_BOILERPLATE(all_crematoriums, /obj/structure/morgue/crematorium)
for(var/atom/movable/A as mob|obj in src.connected.loc)
if (!( A.anchored ))
A.forceMove(src)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
//src.connected = null
qdel(src.connected)
else if (src.locked == 0)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
src.connected = new /obj/structure/m_tray/c_tray( src.loc )
step(src.connected, dir) //Vorestation Edit
src.connected.layer = OBJ_LAYER
@@ -319,7 +319,7 @@ GLOBAL_LIST_BOILERPLATE(all_crematoriums, /obj/structure/morgue/crematorium)
sleep(30)
cremating = 0
locked = 0
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
playsound(src, 'sound/machines/ding.ogg', 50, 1)
return
+1 -1
View File
@@ -55,5 +55,5 @@
sleep(30)
cremating = 0
locked = 0
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
playsound(src, 'sound/machines/ding.ogg', 50, 1)
return
+3 -3
View File
@@ -87,7 +87,7 @@
var/sound/music_played = sound(soundfile)
for(var/i in hearing_mobs)
var/mob/M = i
M.playsound_local(source, null, 100, falloff = 5, S = music_played)
M.playsound_local(source, null, 100, falloff = 0.5, S = music_played)
/datum/song/proc/updateDialog(mob/user)
instrumentObj.updateDialog() // assumes it's an object in world, override if otherwise
@@ -356,7 +356,7 @@
/obj/structure/device/piano/attackby(obj/item/O as obj, mob/user as mob)
if(O.is_wrench())
if(anchored)
playsound(src.loc, O.usesound, 50, 1)
playsound(src, O.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to loosen \the [src]'s casters...</span>")
if (do_after(user, 40 * O.toolspeed))
user.visible_message( \
@@ -365,7 +365,7 @@
"You hear ratchet.")
src.anchored = 0
else
playsound(src.loc, O.usesound, 50, 1)
playsound(src, O.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin to tighten \the [src] to the floor...</span>")
if (do_after(user, 20 * O.toolspeed))
user.visible_message( \
+1 -1
View File
@@ -43,7 +43,7 @@
to_chat(user, "<span class='notice'>You reach to pin your paper to the board but hesitate. You are certain your paper will not be seen among the many others already attached.</span>")
if(O.is_wrench())
to_chat(user, "<span class='notice'>You start to unwrench the noticeboard.</span>")
playsound(src.loc, O.usesound, 50, 1)
playsound(src, O.usesound, 50, 1)
if(do_after(user, 15 * O.toolspeed))
to_chat(user, "<span class='notice'>You unwrench the noticeboard.</span>")
new /obj/item/frame/noticeboard( src.loc )
+11 -11
View File
@@ -37,7 +37,7 @@
if(prob(1 + damage * 3))
visible_message("<span class='danger'>[shatter_message]</span>")
STOP_PROCESSING(SSobj, src)
playsound(get_turf(src),shatter_sound, 75, 1)
playsound(src,shatter_sound, 75, 1)
isbroken = 1
density = 0
icon_state = "[initial(icon_state)]-broken"
@@ -53,21 +53,21 @@
)
STOP_PROCESSING(SSobj, src)
user.do_attack_animation(src)
playsound(get_turf(src),shatter_sound, 75, 1)
playsound(src,shatter_sound, 75, 1)
isbroken = 1
density = 0
icon_state = "[initial(icon_state)]-broken"
set_light(0)
else
to_chat(user, "You hit \the [src]!")
playsound(get_turf(src),impact_sound, 75, 1)
playsound(src,impact_sound, 75, 1)
else
if(prob(damage * 2))
to_chat(user, "You pulverize what was left of \the [src]!")
qdel(src)
else
to_chat(user, "You hit \the [src]!")
playsound(get_turf(src),impact_sound, 75, 1)
playsound(src,impact_sound, 75, 1)
/obj/structure/cult/pylon/swarm/pylon_unique()
. = ..()
@@ -114,10 +114,10 @@
/obj/structure/cult/pylon/swarm/defender/pylonhit(var/damage)
if(!isbroken)
if(prob(1 + damage * 3) && round(damage * 0.8) >= 30)
if(prob(1 + damage * 3) && damage >= 25)
visible_message("<span class='danger'>[shatter_message]</span>")
STOP_PROCESSING(SSobj, src)
playsound(get_turf(src),shatter_sound, 75, 1)
playsound(src,shatter_sound, 75, 1)
isbroken = 1
density = 0
icon_state = "[initial(icon_state)]-broken"
@@ -125,7 +125,7 @@
/obj/structure/cult/pylon/swarm/defender/attackpylon(mob/user as mob, var/damage)
if(!isbroken)
if(prob(1 + damage * 3) && round(damage * 0.8) >= 25)
if(prob(1 + damage * 2) && damage >= 15)
user.visible_message(
"<span class='danger'>[user] smashed \the [src]!</span>",
"<span class='warning'>You hit \the [src], and its crystal breaks apart!</span>",
@@ -133,18 +133,18 @@
)
STOP_PROCESSING(SSobj, src)
user.do_attack_animation(src)
playsound(get_turf(src),shatter_sound, 75, 1)
playsound(src,shatter_sound, 75, 1)
isbroken = 1
density = 0
icon_state = "[initial(icon_state)]-broken"
set_light(0)
else
to_chat(user, "You hit \the [src]!")
playsound(get_turf(src),impact_sound, 75, 1)
playsound(src,impact_sound, 75, 1)
else
if(prob(damage * 2))
if(prob(damage * 3))
to_chat(user, "You pulverize what was left of \the [src]!")
qdel(src)
else
to_chat(user, "You hit \the [src]!")
playsound(get_turf(src),impact_sound, 75, 1)
playsound(src,impact_sound, 75, 1)
+6 -6
View File
@@ -63,7 +63,7 @@
health -= amount
if(health <= 0)
visible_message("<span class='warning'>\The [src] breaks down!</span>")
playsound(loc, 'sound/effects/grillehit.ogg', 50, 1)
playsound(src, 'sound/effects/grillehit.ogg', 50, 1)
new /obj/item/stack/rods(get_turf(src))
qdel(src)
@@ -203,7 +203,7 @@
/obj/structure/railing/attackby(obj/item/W as obj, mob/user as mob)
// Dismantle
if(W.is_wrench() && !anchored)
playsound(src.loc, W.usesound, 50, 1)
playsound(src, W.usesound, 50, 1)
if(do_after(user, 20, src))
user.visible_message("<span class='notice'>\The [user] dismantles \the [src].</span>", "<span class='notice'>You dismantle \the [src].</span>")
new /obj/item/stack/material/steel(get_turf(usr), 2)
@@ -214,7 +214,7 @@
if(health < maxhealth && istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/F = W
if(F.welding)
playsound(src.loc, F.usesound, 50, 1)
playsound(src, F.usesound, 50, 1)
if(do_after(user, 20, src))
user.visible_message("<span class='notice'>\The [user] repairs some damage to \the [src].</span>", "<span class='notice'>You repair some damage to \the [src].</span>")
health = min(health+(maxhealth/5), maxhealth) // 20% repair per application
@@ -223,7 +223,7 @@
// Install
if(W.is_screwdriver())
user.visible_message(anchored ? "<span class='notice'>\The [user] begins unscrewing \the [src].</span>" : "<span class='notice'>\The [user] begins fasten \the [src].</span>" )
playsound(loc, W.usesound, 75, 1)
playsound(src, W.usesound, 75, 1)
if(do_after(user, 10, src))
to_chat(user, (anchored ? "<span class='notice'>You have unfastened \the [src] from the floor.</span>" : "<span class='notice'>You have fastened \the [src] to the floor.</span>"))
anchored = !anchored
@@ -245,7 +245,7 @@
M.apply_damage(8,def_zone = "head")
take_damage(8)
visible_message("<span class='danger'>[G.assailant] slams [G.affecting]'s face against \the [src]!</span>")
playsound(loc, 'sound/effects/grillehit.ogg', 50, 1)
playsound(src, 'sound/effects/grillehit.ogg', 50, 1)
else
to_chat(user, "<span class='danger'>You need a better grip to do that!</span>")
return
@@ -260,7 +260,7 @@
return
else
playsound(loc, 'sound/effects/grillehit.ogg', 50, 1)
playsound(src, 'sound/effects/grillehit.ogg', 50, 1)
take_damage(W.force)
user.setClickCooldown(user.get_attack_speed(W))
+2 -2
View File
@@ -114,7 +114,7 @@ FLOOR SAFES
tumbler_2_pos = decrement(tumbler_2_pos)
if(canhear)
to_chat(user, "<span class='notice'>You hear a [pick("click", "chink", "clink")] from \the [src].</span>")
playsound(user, 'sound/machines/click.ogg', 20, 1)
playsound(src, 'sound/machines/click.ogg', 20, 1)
check_unlocked(user, canhear)
updateUsrDialog()
@@ -130,7 +130,7 @@ FLOOR SAFES
tumbler_2_pos = increment(tumbler_2_pos)
if(canhear)
to_chat(user, "<span class='notice'>You hear a [pick("click", "chink", "clink")] from \the [src].</span>")
playsound(user, 'sound/machines/click.ogg', 20, 1)
playsound(src, 'sound/machines/click.ogg', 20, 1)
check_unlocked(user, canhear)
updateUsrDialog()
return
+2 -2
View File
@@ -15,7 +15,7 @@
/obj/structure/salvageable/attackby(obj/item/I, mob/user)
if(I.is_crowbar())
playsound(loc, I.usesound, 50, 1)
playsound(src, I.usesound, 50, 1)
var/actual_time = I.toolspeed * 170
user.visible_message( \
"<span class='notice'>\The [user] begins salvaging from \the [src].</span>", \
@@ -240,7 +240,7 @@ obj/structure/salvageable/bliss/Initialize()
/obj/structure/salvageable/bliss/attackby(obj/item/I, mob/user)
if((. = ..()))
playsound(user, 'sound/machines/shutdown.ogg', 60, 1)
playsound(src, 'sound/machines/shutdown.ogg', 60, 1)
//////////////////
//// ONE STAR ////
+7 -7
View File
@@ -37,7 +37,7 @@
else
set_opacity(1)
if(material.products_need_process())
START_PROCESSING(SSobj, src)
START_PROCESSING(SSobj, src)
update_nearby_tiles(need_rebuild=1)
/obj/structure/simple_door/Destroy()
@@ -95,7 +95,7 @@
/obj/structure/simple_door/proc/Open()
isSwitchingStates = 1
playsound(loc, material.dooropen_noise, 100, 1)
playsound(src, material.dooropen_noise, 100, 1)
flick("[material.door_icon_base]opening",src)
sleep(10)
density = 0
@@ -107,7 +107,7 @@
/obj/structure/simple_door/proc/Close()
isSwitchingStates = 1
playsound(loc, material.dooropen_noise, 100, 1)
playsound(src, material.dooropen_noise, 100, 1)
flick("[material.door_icon_base]closing",src)
sleep(10)
density = 1
@@ -135,9 +135,9 @@
hardness -= W.force/10
visible_message("<span class='danger'>[user] hits [src] with [W]!</span>")
if(material == get_material_by_name("resin"))
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
playsound(src, 'sound/effects/attackblob.ogg', 100, 1)
else if(material == (get_material_by_name(MAT_WOOD) || get_material_by_name(MAT_SIFWOOD)))
playsound(loc, 'sound/effects/woodcutting.ogg', 100, 1)
playsound(src, 'sound/effects/woodcutting.ogg', 100, 1)
else
playsound(src, 'sound/weapons/smash.ogg', 50, 1)
CheckHardness()
@@ -160,9 +160,9 @@
/obj/structure/simple_door/attack_generic(var/mob/user, var/damage, var/attack_verb)
visible_message("<span class='danger'>[user] [attack_verb] the [src]!</span>")
if(material == get_material_by_name("resin"))
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
playsound(src, 'sound/effects/attackblob.ogg', 100, 1)
else if(material == (get_material_by_name(MAT_WOOD) || get_material_by_name(MAT_SIFWOOD)))
playsound(loc, 'sound/effects/woodcutting.ogg', 100, 1)
playsound(src, 'sound/effects/woodcutting.ogg', 100, 1)
else
playsound(src, 'sound/weapons/smash.ogg', 50, 1)
user.do_attack_animation(src)
@@ -73,7 +73,7 @@
/obj/structure/bed/nest/attackby(obj/item/weapon/W as obj, mob/user as mob)
var/aforce = W.force
health = max(0, health - aforce)
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
playsound(src, 'sound/effects/attackblob.ogg', 100, 1)
for(var/mob/M in viewers(src, 7))
M.show_message("<span class='warning'>[user] hits [src] with [W]!</span>", 1)
healthcheck()
@@ -128,7 +128,7 @@
to_chat(user, "\The [src] has no padding to remove.")
return
to_chat(user, "You remove the padding from \the [src].")
playsound(src.loc, W.usesound, 100, 1)
playsound(src, W.usesound, 100, 1)
remove_padding()
else if(istype(W, /obj/item/weapon/grab))
@@ -22,7 +22,7 @@
return
user.drop_item()
var/obj/structure/bed/chair/e_chair/E = new (src.loc, material.name)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
E.set_dir(dir)
E.part = SK
SK.loc = E
@@ -175,7 +175,7 @@
occupant.apply_effect(6, WEAKEN, blocked)
occupant.apply_effect(6, STUTTER, blocked)
occupant.apply_damage(10, BRUTE, def_zone, blocked, soaked)
playsound(src.loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
playsound(src, 'sound/weapons/punch1.ogg', 50, 1, -1)
if(istype(A, /mob/living))
var/mob/living/victim = A
def_zone = ran_zone()
@@ -236,7 +236,7 @@
..(newloc, DEFAULT_WALL_MATERIAL, padding)
/obj/structure/bed/chair/bay/shuttle/post_buckle_mob()
playsound(loc,buckling_sound,75,1)
playsound(src,buckling_sound,75,1)
if(has_buckled_mobs())
base_icon = "shuttle_chair-b"
else
@@ -149,7 +149,7 @@ var/global/list/stool_cache = list() //haha stool
to_chat(user, "\The [src] has no padding to remove.")
return
to_chat(user, "You remove the padding from \the [src].")
playsound(src.loc, W.usesound, 50, 1)
playsound(src, W.usesound, 50, 1)
remove_padding()
else
..()
@@ -166,7 +166,7 @@
occupant.apply_effect(6, WEAKEN, blocked)
occupant.apply_effect(6, STUTTER, blocked)
occupant.apply_damage(10, BRUTE, def_zone, soaked)
playsound(src.loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
playsound(src, 'sound/weapons/punch1.ogg', 50, 1, -1)
if(istype(A, /mob/living))
var/mob/living/victim = A
def_zone = ran_zone()
+13 -13
View File
@@ -46,7 +46,7 @@
/obj/structure/toilet/attackby(obj/item/I as obj, mob/living/user as mob)
if(I.is_crowbar())
to_chat(user, "<span class='notice'>You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"].</span>")
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
playsound(src, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
if(do_after(user, 30))
user.visible_message("<span class='notice'>[user] [cistern ? "replaces the lid on the cistern" : "lifts the lid off the cistern"]!</span>", "<span class='notice'>You [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]!</span>", "You hear grinding porcelain.")
cistern = !cistern
@@ -172,7 +172,7 @@
if(I.is_wrench())
var/newtemp = input(user, "What setting would you like to set the temperature valve to?", "Water Temperature Valve") in temperature_settings
to_chat(user, "<span class='notice'>You begin to adjust the temperature valve with \the [I].</span>")
playsound(src.loc, I.usesound, 50, 1)
playsound(src, I.usesound, 50, 1)
if(do_after(user, 50 * I.toolspeed))
watertemp = newtemp
user.visible_message("<span class='notice'>[user] adjusts the shower with \the [I].</span>", "<span class='notice'>You adjust the shower with \the [I].</span>")
@@ -384,14 +384,15 @@
return
to_chat(usr, "<span class='notice'>You start washing your hands.</span>")
playsound(loc, 'sound/effects/sink_long.ogg', 75, 1)
playsound(src, 'sound/effects/sink_long.ogg', 75, 1)
busy = 1
sleep(40)
if(!do_after(user, 40, src))
busy = 0
to_chat(usr, "<span class='notice'>You stop washing your hands.</span>")
return
busy = 0
if(!Adjacent(user)) return //Person has moved away from the sink
user.clean_blood()
if(ishuman(user))
user:update_inv_gloves()
@@ -407,7 +408,7 @@
if (istype(RG) && RG.is_open_container())
RG.reagents.add_reagent("water", min(RG.volume - RG.reagents.total_volume, RG.amount_per_transfer_from_this))
user.visible_message("<span class='notice'>[user] fills \the [RG] using \the [src].</span>","<span class='notice'>You fill \the [RG] using \the [src].</span>")
playsound(loc, 'sound/effects/sink.ogg', 75, 1)
playsound(src, 'sound/effects/sink.ogg', 75, 1)
return 1
else if (istype(O, /obj/item/weapon/melee/baton))
@@ -431,7 +432,7 @@
else if(istype(O, /obj/item/weapon/mop))
O.reagents.add_reagent("water", 5)
to_chat(user, "<span class='notice'>You wet \the [O] in \the [src].</span>")
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
playsound(src, 'sound/effects/slosh.ogg', 25, 1)
return
var/turf/location = user.loc
@@ -443,13 +444,12 @@
to_chat(usr, "<span class='notice'>You start washing \the [I].</span>")
busy = 1
sleep(40)
if(!do_after(user, 40, src))
busy = 0
to_chat(usr, "<span class='notice'>You stop washing \the [I].</span>")
return
busy = 0
if(user.loc != location) return //User has moved
if(!I) return //Item's been destroyed while washing
if(user.get_active_hand() != I) return //Person has switched hands or the item in their hands
O.clean_blood()
user.visible_message( \
"<span class='notice'>[user] washes \a [I] using \the [src].</span>", \
@@ -91,7 +91,7 @@ obj/structure/windoor_assembly/Destroy()
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0,user))
user.visible_message("[user] disassembles the windoor assembly.", "You start to disassemble the windoor assembly.")
playsound(src.loc, WT.usesound, 50, 1)
playsound(src, WT.usesound, 50, 1)
if(do_after(user, 40 * WT.toolspeed))
if(!src || !WT.isOn()) return
@@ -157,7 +157,7 @@ obj/structure/windoor_assembly/Destroy()
//Adding airlock electronics for access. Step 6 complete.
else if(istype(W, /obj/item/weapon/airlock_electronics))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
playsound(src, 'sound/items/Screwdriver.ogg', 100, 1)
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
if(do_after(user, 40))
+12 -7
View File
@@ -62,7 +62,7 @@
shatter()
else
if(sound_effect)
playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
playsound(src, 'sound/effects/Glasshit.ogg', 100, 1)
if(health < maxhealth / 4 && initialhealth >= maxhealth / 4)
visible_message("[src] looks like it's about to shatter!" )
update_icon()
@@ -176,7 +176,7 @@
/obj/structure/window/attack_tk(mob/user as mob)
user.visible_message("<span class='notice'>Something knocks on [src].</span>")
playsound(loc, 'sound/effects/Glasshit.ogg', 50, 1)
playsound(src, 'sound/effects/Glasshit.ogg', 50, 1)
/obj/structure/window/attack_hand(mob/user as mob)
user.setClickCooldown(user.get_attack_speed())
@@ -194,13 +194,13 @@
attack_generic(H,25)
return
playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1)
playsound(src, 'sound/effects/glassknock.ogg', 80, 1)
user.do_attack_animation(src)
usr.visible_message("<span class='danger'>\The [usr] bangs against \the [src]!</span>",
"<span class='danger'>You bang against \the [src]!</span>",
"You hear a banging sound.")
else
playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1)
playsound(src, 'sound/effects/glassknock.ogg', 80, 1)
usr.visible_message("[usr.name] knocks on the [src.name].",
"You knock on the [src.name].",
"You hear a knocking sound.")
@@ -301,13 +301,13 @@
else if(istype(W, /obj/item/stack/cable_coil) && reinf && state == 0 && !istype(src, /obj/structure/window/reinforced/polarized))
var/obj/item/stack/cable_coil/C = W
if (C.use(1))
playsound(src.loc, 'sound/effects/sparks1.ogg', 75, 1)
playsound(src, 'sound/effects/sparks1.ogg', 75, 1)
user.visible_message( \
"<span class='notice'>\The [user] begins to wire \the [src] for electrochromic tinting.</span>", \
"<span class='notice'>You begin to wire \the [src] for electrochromic tinting.</span>", \
"You hear sparks.")
if(do_after(user, 20 * C.toolspeed, src) && state == 0)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
var/obj/structure/window/reinforced/polarized/P = new(loc, dir)
if(is_fulltile())
P.fulltile = TRUE
@@ -330,7 +330,7 @@
update_nearby_icons()
step(src, get_dir(user, src))
else
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
playsound(src, 'sound/effects/Glasshit.ogg', 75, 1)
..()
return
@@ -424,6 +424,11 @@
/obj/structure/window/proc/is_fulltile()
return fulltile
/obj/structure/window/is_between_turfs(var/turf/origin, var/turf/target)
if(fulltile)
return TRUE
return ..()
//This proc is used to update the icons of nearby windows. It should not be confused with update_nearby_tiles(), which is an atmos proc!
/obj/structure/window/proc/update_nearby_icons()
update_icon()