mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-22 04:22:40 +01:00
Merge remote-tracking branch 'remotes/git-svn' (r4527) into bs12_with_tgport
Conflicts: baystation12.dme code/game/gamemodes/cult/runes.dm code/game/gamemodes/events.dm code/game/machinery/telecomms/broadcaster.dm code/game/machinery/telecomms/machine_interactions.dm code/game/objects/devices/uplinks.dm code/game/objects/weapons.dm code/modules/mining/mine_items.dm html/changelog.html icons/obj/chemical.dmi maps/tgstation.2.0.9.dmm Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
//Alium nests. Essentially beds with an unbuckle delay that only aliums can buckle mobs to.
|
||||
/obj/structure/stool/bed/nest/manual_unbuckle(mob/user as mob)
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src)
|
||||
if(buckled_mob != user)
|
||||
buckled_mob.visible_message(\
|
||||
"<span class='notice'>[user.name] pulls [buckled_mob.name] free from the sticky nest!</span>",\
|
||||
"<span class='notice'>[user.name] pulls you free from the gelatinous resin.</span>",\
|
||||
"<span class='notice'>You hear squelching...</span>")
|
||||
buckled_mob.pixel_y = 0
|
||||
unbuckle()
|
||||
else
|
||||
buckled_mob.visible_message(\
|
||||
"<span class='warning'>[buckled_mob.name] struggles to break free of the gelatinous resin...</span>",\
|
||||
"<span class='warning'>You struggle to break free from the gelatinous resin...</span>",\
|
||||
"<span class='notice'>You hear squelching...</span>")
|
||||
spawn(1200)
|
||||
if(buckled_mob && user.buckled == src)
|
||||
buckled_mob.pixel_y = 0
|
||||
unbuckle()
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/nest/buckle_mob(mob/M as mob, mob/user as mob)
|
||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || usr.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
|
||||
return
|
||||
|
||||
if(istype(M,/mob/living/carbon/alien))
|
||||
return
|
||||
if(!istype(user,/mob/living/carbon/alien/humanoid))
|
||||
return
|
||||
|
||||
unbuckle()
|
||||
|
||||
if(M == usr)
|
||||
return
|
||||
else
|
||||
M.visible_message(\
|
||||
"<span class='notice'>[user.name] secretes a thick vile goo, securing [M.name] into [src]!</span>",\
|
||||
"<span class='warning'>[user.name] drenches you in a foul-smelling resin, trapping you in the [src]!</span>",\
|
||||
"<span class='notice'>You hear squelching...</span>")
|
||||
M.buckled = src
|
||||
M.loc = src.loc
|
||||
M.dir = src.dir
|
||||
M.update_canmove()
|
||||
M.pixel_y = 6
|
||||
src.buckled_mob = M
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/structure/stool/blob_act()
|
||||
del(src)
|
||||
|
||||
/obj/structure/stool/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)
|
||||
for(var/mob/M in viewers(src, 7))
|
||||
M.show_message("<span class='warning'>[user] hits [src] with [W]!</span>", 1)
|
||||
healthcheck()
|
||||
|
||||
/obj/structure/stool/bed/nest/proc/healthcheck()
|
||||
if(health <=0)
|
||||
density = 0
|
||||
del(src)
|
||||
return
|
||||
@@ -0,0 +1,252 @@
|
||||
/obj/structure/closet/alter_health()
|
||||
return get_turf(src)
|
||||
|
||||
/obj/structure/closet/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0 || wall_mounted)) return 1
|
||||
return (!density)
|
||||
|
||||
/obj/structure/closet/proc/can_open()
|
||||
if(src.welded)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/can_close()
|
||||
for(var/obj/structure/closet/closet in get_turf(src))
|
||||
if(closet != src)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/dump_contents()
|
||||
//Cham Projector Exception
|
||||
for(var/obj/effect/dummy/chameleon/AD in src)
|
||||
AD.loc = src.loc
|
||||
|
||||
for(var/obj/item/I in src)
|
||||
I.loc = src.loc
|
||||
|
||||
for(var/mob/M in src)
|
||||
M.loc = 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
|
||||
if(istype(src, /obj/structure/closet/body_bag))
|
||||
playsound(src.loc, 'sound/items/zip.ogg', 15, 1, -3)
|
||||
else
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
density = 0
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/close()
|
||||
if(!src.opened)
|
||||
return 0
|
||||
if(!src.can_close())
|
||||
return 0
|
||||
|
||||
var/itemcount = 0
|
||||
|
||||
//Cham Projector Exception
|
||||
for(var/obj/effect/dummy/chameleon/AD in src.loc)
|
||||
if(itemcount >= storage_capacity)
|
||||
break
|
||||
AD.loc = src
|
||||
itemcount++
|
||||
|
||||
for(var/obj/item/I in src.loc)
|
||||
if(itemcount >= storage_capacity)
|
||||
break
|
||||
if(!I.anchored)
|
||||
I.loc = src
|
||||
itemcount++
|
||||
|
||||
for(var/mob/M in src.loc)
|
||||
if(itemcount >= storage_capacity)
|
||||
break
|
||||
if(istype (M, /mob/dead/observer))
|
||||
continue
|
||||
if(M.buckled)
|
||||
continue
|
||||
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
|
||||
M.loc = src
|
||||
itemcount++
|
||||
|
||||
src.icon_state = src.icon_closed
|
||||
src.opened = 0
|
||||
if(istype(src, /obj/structure/closet/body_bag))
|
||||
playsound(src.loc, 'sound/items/zip.ogg', 15, 1, -3)
|
||||
else
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
density = 1
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/toggle()
|
||||
if(src.opened)
|
||||
return src.close()
|
||||
return src.open()
|
||||
|
||||
// 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.loc = src.loc
|
||||
A.ex_act(severity++)
|
||||
del(src)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
for (var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.ex_act(severity++)
|
||||
del(src)
|
||||
if(3)
|
||||
if(prob(5))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.ex_act(severity++)
|
||||
del(src)
|
||||
|
||||
/obj/structure/closet/bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
..()
|
||||
if(health <= 0)
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
del(src)
|
||||
|
||||
return
|
||||
|
||||
// this should probably use dump_contents()
|
||||
/obj/structure/closet/blob_act()
|
||||
if(prob(75))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
del(src)
|
||||
|
||||
/obj/structure/closet/meteorhit(obj/O as obj)
|
||||
if(O.icon_state == "flaming")
|
||||
for(var/mob/M in src)
|
||||
M.meteorhit(O)
|
||||
src.dump_contents()
|
||||
del(src)
|
||||
|
||||
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(src.opened)
|
||||
if(istype(W, /obj/item/weapon/grab))
|
||||
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(!WT.remove_fuel(0,user))
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
return
|
||||
new /obj/item/stack/sheet/metal(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)
|
||||
del(src)
|
||||
return
|
||||
|
||||
if(isrobot(user))
|
||||
return
|
||||
|
||||
usr.drop_item()
|
||||
|
||||
if(W)
|
||||
W.loc = src.loc
|
||||
|
||||
else if(istype(W, /obj/item/weapon/packageWrap))
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(!WT.remove_fuel(0,user))
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
return
|
||||
src.welded =! src.welded
|
||||
src.update_icon()
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message("<span class='warning'>[src] has been [welded?"welded shut":"unwelded"] by [user.name].</span>", 3, "You hear welding.", 2)
|
||||
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) || istype(O, /obj/hud)) //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 || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)))
|
||||
return
|
||||
if(user.loc==null) // just in case someone manages to get a closet into the blue light dimension, as unlikely as that seems
|
||||
return
|
||||
if(!istype(user.loc, /turf)) // 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/relaymove(mob/user as mob)
|
||||
if(user.stat)
|
||||
return
|
||||
|
||||
if(!src.open())
|
||||
user << "<span class='notice'>It won't budge!</span>"
|
||||
if(!lastbang)
|
||||
lastbang = 1
|
||||
for (var/mob/M in hearers(src, null))
|
||||
M << text("<FONT size=[]>BANG, bang!</FONT>", max(0, 5 - get_dist(src, M)))
|
||||
spawn(30)
|
||||
lastbang = 0
|
||||
|
||||
|
||||
/obj/structure/closet/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/structure/closet/attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
|
||||
if(!src.toggle())
|
||||
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))
|
||||
src.attack_hand(usr)
|
||||
else
|
||||
usr << "<span class='warning'>This mob type can't use this verb.</span>"
|
||||
|
||||
/obj/structure/closet/update_icon()//Putting the welded stuff in updateicon() so it's easy to overwrite for special cases (Fridges, cabinets, and whatnot)
|
||||
overlays = null
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
if(welded)
|
||||
overlays += "welded"
|
||||
else
|
||||
icon_state = icon_opened
|
||||
@@ -0,0 +1,15 @@
|
||||
/obj/structure/closet/bombcloset/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/suit/bomb_suit( src )
|
||||
new /obj/item/clothing/under/color/black( src )
|
||||
new /obj/item/clothing/shoes/black( src )
|
||||
new /obj/item/clothing/head/bomb_hood( src )
|
||||
|
||||
/obj/structure/closet/bombclosetsecurity/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/suit/bomb_suit/security( src )
|
||||
new /obj/item/clothing/under/rank/security( src )
|
||||
new /obj/item/clothing/shoes/brown( src )
|
||||
new /obj/item/clothing/head/bomb_hood/security( src )
|
||||
@@ -0,0 +1,37 @@
|
||||
/obj/structure/closet/emcloset/New()
|
||||
..()
|
||||
|
||||
if (prob(40))
|
||||
new /obj/item/weapon/storage/toolbox/emergency(src)
|
||||
|
||||
switch (pickweight(list("small" = 40, "aid" = 25, "tank" = 20, "both" = 10, "nothing" = 4, "delete" = 1)))
|
||||
if ("small")
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
|
||||
if ("aid")
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
new /obj/item/weapon/storage/firstaid/o2(src)
|
||||
|
||||
if ("tank")
|
||||
new /obj/item/weapon/tank/air(src)
|
||||
|
||||
if ("both")
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
|
||||
if ("nothing")
|
||||
// doot
|
||||
|
||||
// teehee
|
||||
if ("delete")
|
||||
del(src)
|
||||
|
||||
//If you want to re-add fire, just add "fire" = 15 to the pick list.
|
||||
/*if ("fire")
|
||||
new /obj/structure/closet/firecloset(src.loc)
|
||||
del(src)*/
|
||||
|
||||
/obj/structure/closet/emcloset/legacy/New()
|
||||
new /obj/item/weapon/tank/oxygen(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
@@ -0,0 +1,58 @@
|
||||
/obj/structure/extinguisher_cabinet
|
||||
name = "extinguisher cabinet"
|
||||
desc = "A small wall mounted cabinet designed to hold a fire extinguisher."
|
||||
icon = 'icons/obj/closet.dmi'
|
||||
icon_state = "extinguisher_closed"
|
||||
anchored = 1
|
||||
density = 0
|
||||
var/obj/item/weapon/extinguisher/has_extinguisher = new/obj/item/weapon/extinguisher
|
||||
var/opened = 0
|
||||
|
||||
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if (isrobot(usr))
|
||||
return
|
||||
if (istype(O, /obj/item/weapon/extinguisher))
|
||||
if(!has_extinguisher && opened)
|
||||
user.drop_item(O)
|
||||
src.contents += O
|
||||
has_extinguisher = O
|
||||
user << "\blue You place the extinguisher in the [src.name]."
|
||||
else
|
||||
opened = !opened
|
||||
else
|
||||
opened = !opened
|
||||
update_icon()
|
||||
|
||||
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attack_hand(mob/user as mob)
|
||||
if(has_extinguisher)
|
||||
user.put_in_hands(has_extinguisher)
|
||||
has_extinguisher = null
|
||||
user << "\blue You take the extinguisher from the [name]."
|
||||
opened = 1
|
||||
else
|
||||
opened = !opened
|
||||
update_icon()
|
||||
|
||||
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attack_paw(mob/user as mob)
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/extinguisher_cabinet/update_icon()
|
||||
if(!opened)
|
||||
icon_state = "extinguisher_closed"
|
||||
return
|
||||
if(has_extinguisher)
|
||||
if(istype(has_extinguisher, /obj/item/weapon/extinguisher/mini))
|
||||
icon_state = "extinguisher_mini"
|
||||
else
|
||||
icon_state = "extinguisher_full"
|
||||
else
|
||||
icon_state = "extinguisher_empty"
|
||||
@@ -0,0 +1,198 @@
|
||||
//I still dont think this should be a closet but whatever
|
||||
/obj/structure/closet/fireaxecabinet
|
||||
name = "Fire Axe Cabinet"
|
||||
desc = "There is small label that reads \"For Emergency use only\" along with details for safe use of the axe. As if."
|
||||
var/obj/item/weapon/twohanded/fireaxe/fireaxe = new/obj/item/weapon/twohanded/fireaxe
|
||||
icon_state = "fireaxe1000"
|
||||
icon_closed = "fireaxe1000"
|
||||
icon_opened = "fireaxe1100"
|
||||
anchored = 1
|
||||
density = 0
|
||||
var/localopened = 0 //Setting this to keep it from behaviouring like a normal closet and obstructing movement in the map. -Agouri
|
||||
opened = 1
|
||||
var/hitstaken = 0
|
||||
var/locked = 1
|
||||
var/smashed = 0
|
||||
|
||||
attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
|
||||
//..() //That's very useful, Erro
|
||||
|
||||
var/hasaxe = 0 //gonna come in handy later~
|
||||
if(fireaxe)
|
||||
hasaxe = 1
|
||||
|
||||
if (isrobot(usr) || src.locked)
|
||||
if(istype(O, /obj/item/device/multitool))
|
||||
user << "\red Resetting circuitry..."
|
||||
playsound(user, 'sound/machines/lockreset.ogg', 50, 1)
|
||||
sleep(50) // Sleeping time~
|
||||
src.locked = 0
|
||||
user << "\blue You disable the locking modules."
|
||||
update_icon()
|
||||
return
|
||||
else if(istype(O, /obj/item/weapon))
|
||||
var/obj/item/weapon/W = O
|
||||
if(src.smashed || src.localopened)
|
||||
if(localopened)
|
||||
localopened = 0
|
||||
icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
return
|
||||
else
|
||||
playsound(user, 'sound/effects/Glasshit.ogg', 100, 1) //We don't want this playing every time
|
||||
if(W.force < 15)
|
||||
user << "\blue The cabinet's protective glass glances off the hit."
|
||||
else
|
||||
src.hitstaken++
|
||||
if(src.hitstaken == 4)
|
||||
playsound(user, 'sound/effects/Glassbr3.ogg', 100, 1) //Break cabinet, receive goodies. Cabinet's fucked for life after that.
|
||||
src.smashed = 1
|
||||
src.locked = 0
|
||||
src.localopened = 1
|
||||
update_icon()
|
||||
return
|
||||
if (istype(O, /obj/item/weapon/twohanded/fireaxe) && src.localopened)
|
||||
if(!fireaxe)
|
||||
if(O:wielded)
|
||||
user << "\red Unwield the axe first."
|
||||
return
|
||||
fireaxe = O
|
||||
user.drop_item(O)
|
||||
src.contents += O
|
||||
user << "\blue You place the fire axe back in the [src.name]."
|
||||
update_icon()
|
||||
else
|
||||
if(src.smashed)
|
||||
return
|
||||
else
|
||||
localopened = !localopened
|
||||
if(localopened)
|
||||
icon_state = text("fireaxe[][][][]opening",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
else
|
||||
icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
else
|
||||
if(src.smashed)
|
||||
return
|
||||
if(istype(O, /obj/item/device/multitool))
|
||||
if(localopened)
|
||||
localopened = 0
|
||||
icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
return
|
||||
else
|
||||
user << "\red Resetting circuitry..."
|
||||
sleep(50)
|
||||
src.locked = 1
|
||||
user << "\blue You re-enable the locking modules."
|
||||
playsound(user, 'sound/machines/lockenable.ogg', 50, 1)
|
||||
return
|
||||
else
|
||||
localopened = !localopened
|
||||
if(localopened)
|
||||
icon_state = text("fireaxe[][][][]opening",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
else
|
||||
icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
|
||||
|
||||
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
|
||||
var/hasaxe = 0
|
||||
if(fireaxe)
|
||||
hasaxe = 1
|
||||
|
||||
if(src.locked)
|
||||
user <<"\red The cabinet won't budge!"
|
||||
return
|
||||
if(localopened)
|
||||
if(fireaxe)
|
||||
user.put_in_hands(fireaxe)
|
||||
fireaxe = null
|
||||
user << "\blue You take the fire axe from the [name]."
|
||||
src.add_fingerprint(user)
|
||||
update_icon()
|
||||
else
|
||||
if(src.smashed)
|
||||
return
|
||||
else
|
||||
localopened = !localopened
|
||||
if(localopened)
|
||||
src.icon_state = text("fireaxe[][][][]opening",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
else
|
||||
src.icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
|
||||
else
|
||||
localopened = !localopened //I'm pretty sure we don't need an if(src.smashed) in here. In case I'm wrong and it fucks up teh cabinet, **MARKER**. -Agouri
|
||||
if(localopened)
|
||||
src.icon_state = text("fireaxe[][][][]opening",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
else
|
||||
src.icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
|
||||
verb/toggle_openness() //nice name, huh? HUH?! -Erro //YEAH -Agouri
|
||||
set name = "Open/Close"
|
||||
set category = "Object"
|
||||
|
||||
if (isrobot(usr) || src.locked || src.smashed)
|
||||
if(src.locked)
|
||||
usr << "\red The cabinet won't budge!"
|
||||
else if(src.smashed)
|
||||
usr << "\blue The protective glass is broken!"
|
||||
return
|
||||
|
||||
localopened = !localopened
|
||||
update_icon()
|
||||
|
||||
verb/remove_fire_axe()
|
||||
set name = "Remove Fire Axe"
|
||||
set category = "Object"
|
||||
|
||||
if (isrobot(usr))
|
||||
return
|
||||
|
||||
if (localopened)
|
||||
if(fireaxe)
|
||||
usr.put_in_hands(fireaxe)
|
||||
fireaxe = null
|
||||
usr << "\blue You take the Fire axe from the [name]."
|
||||
else
|
||||
usr << "\blue The [src.name] is empty."
|
||||
else
|
||||
usr << "\blue The [src.name] is closed."
|
||||
update_icon()
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
if(src.smashed)
|
||||
user << "\red The security of the cabinet is compromised."
|
||||
return
|
||||
else
|
||||
locked = !locked
|
||||
if(locked)
|
||||
user << "\red Cabinet locked."
|
||||
else
|
||||
user << "\blue Cabinet unlocked."
|
||||
return
|
||||
|
||||
update_icon() //Template: fireaxe[has fireaxe][is opened][hits taken][is smashed]. If you want the opening or closing animations, add "opening" or "closing" right after the numbers
|
||||
var/hasaxe = 0
|
||||
if(fireaxe)
|
||||
hasaxe = 1
|
||||
icon_state = text("fireaxe[][][][]",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
|
||||
open()
|
||||
return
|
||||
|
||||
close()
|
||||
return
|
||||
@@ -0,0 +1,78 @@
|
||||
/obj/structure/closet/firecloset/full/New()
|
||||
..()
|
||||
sleep(4)
|
||||
contents = list()
|
||||
|
||||
new /obj/item/clothing/suit/fire/firefighter(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/device/flashlight(src)
|
||||
new /obj/item/weapon/tank/oxygen/red(src)
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
|
||||
/obj/structure/closet/firecloset/New()
|
||||
..()
|
||||
|
||||
new /obj/item/clothing/suit/fire/firefighter(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/weapon/tank/oxygen/red(src)
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
|
||||
/*switch (pickweight(list("nothing" = 5, "bare-bones" = 35, "basic" = 40, "pickpocketed" = 10, "untouched" = 10)))
|
||||
if ("nothing")
|
||||
//better luck next time
|
||||
if ("bare-bones")
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
if ("basic")
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
if ("pickpocketed") //suit got stolen
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/weapon/tank/oxygen(src)
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
new /obj/item/clothing/head/helmet/hardhat/red(src)
|
||||
if ("untouched")
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/weapon/tank/oxygen(src)
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
new /obj/item/clothing/suit/fire/firefighter(src)
|
||||
new /obj/item/clothing/head/helmet/hardhat/red(src)*/
|
||||
|
||||
/obj/structure/closet/toolcloset/New()
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/suit/hazardvest(src)
|
||||
if(prob(70))
|
||||
new /obj/item/device/flashlight(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/screwdriver(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/wrench(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/weldingtool(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/crowbar(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/wirecutters(src)
|
||||
if(prob(70))
|
||||
new /obj/item/device/t_scanner(src)
|
||||
if(prob(20))
|
||||
new /obj/item/weapon/storage/belt/utility(src)
|
||||
if(prob(30))
|
||||
new /obj/item/weapon/cable_coil/random(src)
|
||||
if(prob(30))
|
||||
new /obj/item/weapon/cable_coil/random(src)
|
||||
if(prob(30))
|
||||
new /obj/item/weapon/cable_coil/random(src)
|
||||
if(prob(20))
|
||||
new /obj/item/device/multitool(src)
|
||||
if(prob(5))
|
||||
new /obj/item/clothing/gloves/yellow(src)
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/head/hardhat(src)
|
||||
|
||||
/obj/structure/closet/radiation/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/radiation(src)
|
||||
new /obj/item/clothing/head/radiation(src)
|
||||
@@ -0,0 +1,39 @@
|
||||
/obj/structure/closet/athletic_mixed/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/under/shorts/grey(src)
|
||||
new /obj/item/clothing/under/shorts/black(src)
|
||||
new /obj/item/clothing/under/shorts/red(src)
|
||||
new /obj/item/clothing/under/shorts/blue(src)
|
||||
new /obj/item/clothing/under/shorts/green(src)
|
||||
|
||||
/obj/structure/closet/boxinggloves/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/gloves/boxing/blue(src)
|
||||
new /obj/item/clothing/gloves/boxing/green(src)
|
||||
new /obj/item/clothing/gloves/boxing/yellow(src)
|
||||
new /obj/item/clothing/gloves/boxing(src)
|
||||
|
||||
/obj/structure/closet/masks/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/mask/luchador(src)
|
||||
new /obj/item/clothing/mask/luchador/rudos(src)
|
||||
new /obj/item/clothing/mask/luchador/tecnicos(src)
|
||||
|
||||
/obj/structure/closet/lasertag/red/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/weapon/gun/energy/laser/redtag(src)
|
||||
new /obj/item/weapon/gun/energy/laser/redtag(src)
|
||||
new /obj/item/clothing/suit/redtag(src)
|
||||
new /obj/item/clothing/suit/redtag(src)
|
||||
|
||||
/obj/structure/closet/lasertag/blue/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/weapon/gun/energy/laser/bluetag(src)
|
||||
new /obj/item/weapon/gun/energy/laser/bluetag(src)
|
||||
new /obj/item/clothing/suit/bluetag(src)
|
||||
new /obj/item/clothing/suit/bluetag(src)
|
||||
@@ -0,0 +1,31 @@
|
||||
/obj/structure/closet/gimmick/russian/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/head/ushanka(src)
|
||||
new /obj/item/clothing/head/ushanka(src)
|
||||
new /obj/item/clothing/head/ushanka(src)
|
||||
new /obj/item/clothing/head/ushanka(src)
|
||||
new /obj/item/clothing/head/ushanka(src)
|
||||
new /obj/item/clothing/under/soviet(src)
|
||||
new /obj/item/clothing/under/soviet(src)
|
||||
new /obj/item/clothing/under/soviet(src)
|
||||
new /obj/item/clothing/under/soviet(src)
|
||||
new /obj/item/clothing/under/soviet(src)
|
||||
|
||||
/obj/structure/closet/gimmick/tacticool/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/glasses/eyepatch(src)
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/clothing/gloves/swat(src)
|
||||
new /obj/item/clothing/gloves/swat(src)
|
||||
new /obj/item/clothing/head/helmet/swat(src)
|
||||
new /obj/item/clothing/head/helmet/swat(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/clothing/shoes/swat(src)
|
||||
new /obj/item/clothing/shoes/swat(src)
|
||||
new /obj/item/clothing/suit/armor/swat(src)
|
||||
new /obj/item/clothing/suit/armor/swat(src)
|
||||
new /obj/item/clothing/under/syndicate/tacticool(src)
|
||||
new /obj/item/clothing/under/syndicate/tacticool(src)
|
||||
@@ -0,0 +1,13 @@
|
||||
/obj/structure/closet/gmcloset/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/head/that(src)
|
||||
new /obj/item/clothing/head/that(src)
|
||||
new /obj/item/clothing/under/sl_suit(src)
|
||||
new /obj/item/clothing/under/sl_suit(src)
|
||||
new /obj/item/clothing/under/rank/bartender(src)
|
||||
new /obj/item/clothing/under/rank/bartender(src)
|
||||
new /obj/item/clothing/suit/wcoat(src)
|
||||
new /obj/item/clothing/suit/wcoat(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
@@ -0,0 +1,16 @@
|
||||
/obj/structure/closet/jcloset/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/under/rank/janitor(src)
|
||||
new /obj/item/weapon/cartridge/janitor(src)
|
||||
new /obj/item/device/flashlight(src)
|
||||
new /obj/item/clothing/shoes/galoshes(src)
|
||||
new /obj/item/weapon/caution(src)
|
||||
new /obj/item/weapon/caution(src)
|
||||
new /obj/item/weapon/caution(src)
|
||||
new /obj/item/weapon/caution(src)
|
||||
new /obj/item/weapon/caution(src)
|
||||
new /obj/item/weapon/caution(src)
|
||||
new /obj/item/weapon/trashbag(src)
|
||||
new /obj/item/device/lightreplacer(src)
|
||||
new /obj/item/clothing/head/soft/purple(src)
|
||||
@@ -0,0 +1,103 @@
|
||||
/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(access_kitchen)
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
for(var/i = 0, i < 16, i++)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/flour(src)
|
||||
new /obj/item/weapon/reagent_containers/food/condiment/sugar(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/kitchen/mining
|
||||
req_access = list()
|
||||
|
||||
|
||||
|
||||
/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"
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
for(var/i = 0, i < 4, i++)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/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"
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
for(var/i = 0, i < 5, i++)
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/milk(src)
|
||||
for(var/i = 0, i < 5, i++)
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/soymilk(src)
|
||||
for(var/i = 0, i < 2, i++)
|
||||
new /obj/item/weapon/storage/fancy/egg_box(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/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"
|
||||
req_access = list(access_heads_vault)
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
for(var/i = 0, i < 3, i++)
|
||||
new /obj/item/weapon/spacecash/c1000(src)
|
||||
for(var/i = 0, i < 5, i++)
|
||||
new /obj/item/weapon/spacecash/c500(src)
|
||||
for(var/i = 0, i < 6, i++)
|
||||
new /obj/item/weapon/spacecash/c200(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/obj/structure/closet/l3closet/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/suit/bio_suit/general( src )
|
||||
new /obj/item/clothing/head/bio_hood/general( src )
|
||||
|
||||
/obj/structure/closet/l3closet/general/New()
|
||||
..()
|
||||
sleep(2)
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/bio_suit/general( src )
|
||||
new /obj/item/clothing/head/bio_hood/general( src )
|
||||
|
||||
/obj/structure/closet/l3closet/virology/New()
|
||||
..()
|
||||
sleep(2)
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/bio_suit/virology( src )
|
||||
new /obj/item/clothing/head/bio_hood/virology( src )
|
||||
|
||||
/obj/structure/closet/l3closet/security/New()
|
||||
..()
|
||||
sleep(2)
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/bio_suit/security( src )
|
||||
new /obj/item/clothing/head/bio_hood/security( src )
|
||||
|
||||
/obj/structure/closet/l3closet/janitor/New()
|
||||
..()
|
||||
sleep(2)
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/bio_suit/janitor( src )
|
||||
new /obj/item/clothing/head/bio_hood/janitor( src )
|
||||
|
||||
/obj/structure/closet/l3closet/scientist/New()
|
||||
..()
|
||||
sleep(2)
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/bio_suit/scientist( src )
|
||||
new /obj/item/clothing/head/bio_hood/scientist( src )
|
||||
@@ -0,0 +1,10 @@
|
||||
/obj/structure/closet/malf/suits/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/weapon/tank/jetpack/void(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/clothing/head/helmet/space/nasavoid(src)
|
||||
new /obj/item/clothing/suit/space/nasavoid(src)
|
||||
new /obj/item/weapon/crowbar(src)
|
||||
new /obj/item/weapon/cell(src)
|
||||
new /obj/item/device/multitool(src)
|
||||
@@ -0,0 +1,24 @@
|
||||
/obj/structure/closet/syndicate/nuclear/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/ammo_magazine/a50(src)
|
||||
new /obj/item/ammo_magazine/a50(src)
|
||||
new /obj/item/ammo_magazine/a50(src)
|
||||
new /obj/item/ammo_magazine/a50(src)
|
||||
new /obj/item/ammo_magazine/a50(src)
|
||||
new /obj/item/weapon/storage/handcuff_kit(src)
|
||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/weapon/pinpointer/nukeop(src)
|
||||
new /obj/item/weapon/pinpointer/nukeop(src)
|
||||
new /obj/item/weapon/pinpointer/nukeop(src)
|
||||
new /obj/item/weapon/pinpointer/nukeop(src)
|
||||
new /obj/item/weapon/pinpointer/nukeop(src)
|
||||
new /obj/item/device/pda/syndicate(src)
|
||||
var/obj/item/device/radio/uplink/U = new(src)
|
||||
U.hidden_uplink.uses = 40
|
||||
return
|
||||
@@ -0,0 +1,37 @@
|
||||
/obj/structure/closet/secure_closet/bar
|
||||
name = "Booze"
|
||||
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"
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/beer( src )
|
||||
return
|
||||
|
||||
/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
|
||||
@@ -0,0 +1,45 @@
|
||||
/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"
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/under/rank/cargotech(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/device/radio/headset/headset_cargo(src)
|
||||
new /obj/item/clothing/gloves/black(src)
|
||||
new /obj/item/clothing/head/soft(src)
|
||||
// new /obj/item/weapon/cartridge/quartermaster(src)
|
||||
return
|
||||
|
||||
/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"
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/under/rank/cargo(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/device/radio/headset/heads/qm(src)
|
||||
new /obj/item/clothing/gloves/black(src)
|
||||
// new /obj/item/weapon/cartridge/quartermaster(src)
|
||||
new /obj/item/clothing/suit/fire/firefighter(src)
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/clothing/glasses/meson(src)
|
||||
new /obj/item/clothing/head/soft(src)
|
||||
return
|
||||
@@ -0,0 +1,115 @@
|
||||
/obj/structure/closet/secure_closet/engineering_chief
|
||||
name = "Chief Engineer's Locker"
|
||||
req_access = list(access_ce)
|
||||
icon_state = "securece1"
|
||||
icon_closed = "securece"
|
||||
icon_locked = "securece1"
|
||||
icon_opened = "secureceopen"
|
||||
icon_broken = "securecebroken"
|
||||
icon_off = "secureceoff"
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
if(prob(50))
|
||||
new /obj/item/weapon/storage/backpack/industrial(src)
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_eng(src)
|
||||
new /obj/item/blueprints(src)
|
||||
new /obj/item/clothing/under/rank/chief_engineer(src)
|
||||
new /obj/item/clothing/head/hardhat/white(src)
|
||||
new /obj/item/clothing/head/welding(src)
|
||||
new /obj/item/clothing/gloves/yellow(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/weapon/cartridge/ce(src)
|
||||
new /obj/item/device/radio/headset/heads/ce(src)
|
||||
new /obj/item/weapon/storage/toolbox/mechanical(src)
|
||||
new /obj/item/clothing/suit/hazardvest(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/device/multitool(src)
|
||||
new /obj/item/device/flash(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_electrical
|
||||
name = "Electrical Supplies"
|
||||
req_access = list(access_engine)
|
||||
icon_state = "secureengelec1"
|
||||
icon_closed = "secureengelec"
|
||||
icon_locked = "secureengelec1"
|
||||
icon_opened = "toolclosetopen"
|
||||
icon_broken = "secureengelecbroken"
|
||||
icon_off = "secureengelecoff"
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/gloves/yellow(src)
|
||||
new /obj/item/clothing/gloves/yellow(src)
|
||||
new /obj/item/weapon/storage/toolbox/electrical(src)
|
||||
new /obj/item/weapon/storage/toolbox/electrical(src)
|
||||
new /obj/item/weapon/storage/toolbox/electrical(src)
|
||||
new /obj/item/weapon/module/power_control(src)
|
||||
new /obj/item/weapon/module/power_control(src)
|
||||
new /obj/item/weapon/module/power_control(src)
|
||||
new /obj/item/device/multitool(src)
|
||||
new /obj/item/device/multitool(src)
|
||||
new /obj/item/device/multitool(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_welding
|
||||
name = "Welding Supplies"
|
||||
req_access = list(access_engine)
|
||||
icon_state = "secureengweld1"
|
||||
icon_closed = "secureengweld"
|
||||
icon_locked = "secureengweld1"
|
||||
icon_opened = "toolclosetopen"
|
||||
icon_broken = "secureengweldbroken"
|
||||
icon_off = "secureengweldoff"
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/head/welding(src)
|
||||
new /obj/item/clothing/head/welding(src)
|
||||
new /obj/item/clothing/head/welding(src)
|
||||
new /obj/item/weapon/weldingtool/largetank(src)
|
||||
new /obj/item/weapon/weldingtool/largetank(src)
|
||||
new /obj/item/weapon/weldingtool/largetank(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_personal
|
||||
name = "Engineer's Locker"
|
||||
req_access = list(access_engine)
|
||||
icon_state = "secureeng1"
|
||||
icon_closed = "secureeng"
|
||||
icon_locked = "secureeng1"
|
||||
icon_opened = "secureengopen"
|
||||
icon_broken = "secureengbroken"
|
||||
icon_off = "secureengoff"
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
if(prob(50))
|
||||
new /obj/item/weapon/storage/backpack/industrial(src)
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_eng(src)
|
||||
new /obj/item/clothing/under/rank/engineer(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/weapon/storage/toolbox/mechanical(src)
|
||||
// new /obj/item/weapon/cartridge/engineering(src)
|
||||
new /obj/item/device/radio/headset/headset_eng(src)
|
||||
new /obj/item/clothing/suit/hazardvest(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/clothing/glasses/meson(src)
|
||||
return
|
||||
@@ -0,0 +1,26 @@
|
||||
/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"
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
switch(rand(1,2))
|
||||
if(1)
|
||||
new /obj/item/clothing/suit/apron(src)
|
||||
if(2)
|
||||
new /obj/item/clothing/suit/apron/overalls(src)
|
||||
new /obj/item/weapon/plantbag(src)
|
||||
new /obj/item/clothing/under/rank/hydroponics(src)
|
||||
new /obj/item/device/analyzer/plant_analyzer(src)
|
||||
new /obj/item/clothing/head/greenbandana(src)
|
||||
new /obj/item/weapon/minihoe(src)
|
||||
new /obj/item/weapon/hatchet(src)
|
||||
return
|
||||
@@ -0,0 +1,161 @@
|
||||
/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)
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/weapon/storage/syringes(src)
|
||||
new /obj/item/weapon/reagent_containers/dropper(src)
|
||||
new /obj/item/weapon/reagent_containers/dropper(src)
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker(src)
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker(src)
|
||||
new /obj/item/weapon/reagent_containers/glass/bottle/inaprovaline(src)
|
||||
new /obj/item/weapon/reagent_containers/glass/bottle/inaprovaline(src)
|
||||
new /obj/item/weapon/reagent_containers/glass/bottle/antitoxin(src)
|
||||
new /obj/item/weapon/reagent_containers/glass/bottle/antitoxin(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/medical2
|
||||
name = "Anesthetic"
|
||||
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)
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/weapon/tank/anesthetic(src)
|
||||
new /obj/item/weapon/tank/anesthetic(src)
|
||||
new /obj/item/weapon/tank/anesthetic(src)
|
||||
new /obj/item/clothing/mask/breath/medical(src)
|
||||
new /obj/item/clothing/mask/breath/medical(src)
|
||||
new /obj/item/clothing/mask/breath/medical(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/medical3
|
||||
name = "Medical Doctor's Locker"
|
||||
req_access = list(access_surgery)
|
||||
icon_state = "securemed1"
|
||||
icon_closed = "securemed"
|
||||
icon_locked = "securemed1"
|
||||
icon_opened = "securemedopen"
|
||||
icon_broken = "securemedbroken"
|
||||
icon_off = "securemedoff"
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
if(prob(50))
|
||||
new /obj/item/weapon/storage/backpack/medic(src)
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_med(src)
|
||||
new /obj/item/clothing/under/rank/nursesuit (src)
|
||||
new /obj/item/clothing/head/nursehat (src)
|
||||
switch(pick("blue", "green", "purple"))
|
||||
if ("blue")
|
||||
new /obj/item/clothing/under/rank/medical/blue(src)
|
||||
if ("green")
|
||||
new /obj/item/clothing/under/rank/medical/green(src)
|
||||
if ("purple")
|
||||
new /obj/item/clothing/under/rank/medical/purple(src)
|
||||
switch(pick("blue", "green", "purple"))
|
||||
if ("blue")
|
||||
new /obj/item/clothing/under/rank/medical/blue(src)
|
||||
if ("green")
|
||||
new /obj/item/clothing/under/rank/medical/green(src)
|
||||
if ("purple")
|
||||
new /obj/item/clothing/under/rank/medical/purple(src)
|
||||
new /obj/item/clothing/under/rank/medical(src)
|
||||
new /obj/item/clothing/suit/labcoat(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
// new /obj/item/weapon/cartridge/medical(src)
|
||||
new /obj/item/device/radio/headset/headset_med(src)
|
||||
new /obj/item/weapon/storage/belt/medical(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/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"
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
if(prob(50))
|
||||
new /obj/item/weapon/storage/backpack/medic(src)
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_med(src)
|
||||
new /obj/item/clothing/suit/bio_suit/cmo(src)
|
||||
new /obj/item/clothing/head/bio_hood/cmo(src)
|
||||
new /obj/item/clothing/under/rank/chief_medical_officer(src)
|
||||
new /obj/item/clothing/suit/labcoat/cmo(src)
|
||||
new /obj/item/weapon/cartridge/cmo(src)
|
||||
new /obj/item/clothing/gloves/latex(src)
|
||||
new /obj/item/clothing/shoes/brown (src)
|
||||
new /obj/item/device/radio/headset/heads/cmo(src)
|
||||
new /obj/item/weapon/storage/belt/medical(src)
|
||||
new /obj/item/device/flash(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/animal
|
||||
name = "Animal Control"
|
||||
req_access = list(access_surgery)
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/device/assembly/signaler(src)
|
||||
new /obj/item/device/radio/electropack(src)
|
||||
new /obj/item/device/radio/electropack(src)
|
||||
new /obj/item/device/radio/electropack(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/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)
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/weapon/storage/pillbottlebox(src)
|
||||
new /obj/item/weapon/storage/pillbottlebox(src)
|
||||
return
|
||||
@@ -0,0 +1,69 @@
|
||||
/obj/structure/closet/secure_closet/personal/var/registered_name = null
|
||||
/obj/structure/closet/secure_closet/personal/req_access = list(access_all_personal_lockers)
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/New()
|
||||
..()
|
||||
spawn(2)
|
||||
if(prob(50))
|
||||
new /obj/item/weapon/storage/backpack(src)
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_norm(src)
|
||||
new /obj/item/device/radio/headset( src )
|
||||
return
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/patient/New()
|
||||
..()
|
||||
spawn(4)
|
||||
contents = list()
|
||||
new /obj/item/clothing/under/color/white( src )
|
||||
new /obj/item/clothing/shoes/white( src )
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/cabinet/New()
|
||||
..()
|
||||
spawn(4)
|
||||
contents = list()
|
||||
new /obj/item/weapon/storage/backpack/satchel/withwallet( src )
|
||||
new /obj/item/device/radio/headset( src )
|
||||
return
|
||||
|
||||
/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))
|
||||
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
user.drop_item()
|
||||
if (W) W.loc = src.loc
|
||||
else if(istype(W, /obj/item/weapon/card/id))
|
||||
if(src.broken)
|
||||
user << "\red It appears to be broken."
|
||||
return
|
||||
var/obj/item/weapon/card/id/I = W
|
||||
if(!I || !I.registered_name) return
|
||||
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
|
||||
src.desc = "Owned by [I.registered_name]."
|
||||
else
|
||||
user << "\red Access Denied"
|
||||
else if( (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && !src.broken)
|
||||
broken = 1
|
||||
locked = 0
|
||||
desc = "It appears to be broken."
|
||||
icon_state = src.icon_broken
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
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)
|
||||
for(var/mob/O in viewers(user, 3))
|
||||
O.show_message("\blue The locker has been sliced open by [user] with an energy blade!", 1, "\red You hear metal being sliced and sparks flying.", 2)
|
||||
else
|
||||
user << "\red Access Denied"
|
||||
return
|
||||
@@ -0,0 +1,49 @@
|
||||
/obj/structure/closet/secure_closet/scientist
|
||||
name = "Scientist's Locker"
|
||||
req_access = list(access_tox_storage)
|
||||
icon_state = "secureres1"
|
||||
icon_closed = "secureres"
|
||||
icon_locked = "secureres1"
|
||||
icon_opened = "secureresopen"
|
||||
icon_broken = "secureresbroken"
|
||||
icon_off = "secureresoff"
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/under/rank/scientist(src)
|
||||
new /obj/item/clothing/suit/labcoat(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
// new /obj/item/weapon/cartridge/signal/toxins(src)
|
||||
new /obj/item/device/radio/headset/headset_sci(src)
|
||||
new /obj/item/weapon/tank/air(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/RD
|
||||
name = "Research Director's Locker"
|
||||
req_access = list(access_rd)
|
||||
icon_state = "rdsecure1"
|
||||
icon_closed = "rdsecure"
|
||||
icon_locked = "rdsecure1"
|
||||
icon_opened = "rdsecureopen"
|
||||
icon_broken = "rdsecurebroken"
|
||||
icon_off = "rdsecureoff"
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/suit/bio_suit/scientist(src)
|
||||
new /obj/item/clothing/head/bio_hood/scientist(src)
|
||||
new /obj/item/clothing/under/rank/research_director(src)
|
||||
new /obj/item/clothing/suit/labcoat(src)
|
||||
new /obj/item/weapon/cartridge/rd(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/gloves/latex(src)
|
||||
new /obj/item/device/radio/headset/heads/rd(src)
|
||||
new /obj/item/weapon/tank/air(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/device/flash(src)
|
||||
return
|
||||
@@ -0,0 +1,146 @@
|
||||
/obj/structure/closet/secure_closet/can_open()
|
||||
..()
|
||||
if(src.locked)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/secure_closet/close()
|
||||
..()
|
||||
if(broken)
|
||||
icon_state = src.icon_off
|
||||
return 1
|
||||
|
||||
/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
|
||||
if(prob(20/severity) && !opened)
|
||||
if(!locked)
|
||||
open()
|
||||
else
|
||||
src.req_access = list()
|
||||
src.req_access += pick(get_all_accesses())
|
||||
..()
|
||||
|
||||
/obj/structure/closet/secure_closet/proc/togglelock(mob/user as mob)
|
||||
if(src.allowed(user))
|
||||
src.locked = !src.locked
|
||||
for(var/mob/O in viewers(user, 3))
|
||||
if((O.client && !( O.blinded )))
|
||||
O << "<span class='notice'>The locker has been [locked ? null : "un"]locked by [user].</span>"
|
||||
if(src.locked)
|
||||
src.icon_state = src.icon_locked
|
||||
else
|
||||
src.icon_state = src.icon_closed
|
||||
else
|
||||
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(istype(W, /obj/item/weapon/grab))
|
||||
if(src.large)
|
||||
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
else
|
||||
user << "<span class='notice'>The locker is too small to stuff [W] into!</span>"
|
||||
user.drop_item()
|
||||
if(W)
|
||||
W.loc = src.loc
|
||||
else if(src.broken)
|
||||
user << "<span class='notice'>The locker appears to be broken.</span>"
|
||||
return
|
||||
else if((istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && !src.broken)
|
||||
broken = 1
|
||||
locked = 0
|
||||
desc = "It appears to be broken."
|
||||
icon_state = icon_off
|
||||
flick(icon_broken, src)
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
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)
|
||||
for(var/mob/O in viewers(user, 3))
|
||||
O.show_message("<span class='warning'>The locker has been sliced open by [user] with an energy blade!</span>", 1, "You hear metal being sliced and sparks flying.", 2)
|
||||
else
|
||||
for(var/mob/O in viewers(user, 3))
|
||||
O.show_message("<span class='warning'>The locker has been broken by [user] with an electromagnetic card!</span>", 1, "You hear a faint electrical spark.", 2)
|
||||
else
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(!WT.remove_fuel(0,user))
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
return
|
||||
src.welded =! src.welded
|
||||
src.update_icon()
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message("<span class='warning'>[src] has been [welded?"welded shut":"unwelded"] by [user.name].</span>", 3, "You hear welding.", 2)
|
||||
else
|
||||
togglelock(user)
|
||||
|
||||
/obj/structure/closet/secure_closet/relaymove(mob/user as mob)
|
||||
if(user.stat)
|
||||
return
|
||||
|
||||
if(user.stat)
|
||||
return
|
||||
if(!(src.locked))
|
||||
for(var/obj/item/I in src)
|
||||
I.loc = src.loc
|
||||
for(var/mob/M in src)
|
||||
M.loc = src.loc
|
||||
if(M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
src.icon_state = src.icon_opened
|
||||
src.opened = 1
|
||||
else
|
||||
user << "<span class='notice'>The locker is locked!</span>"
|
||||
if(world.time > lastbang+5)
|
||||
lastbang = world.time
|
||||
for(var/mob/M in hearers(src, null))
|
||||
M << "<FONT size=[max(0, 5 - get_dist(src, M))]>BANG, bang!</FONT>"
|
||||
return
|
||||
|
||||
/obj/structure/closet/secure_closet/attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
|
||||
if(!src.toggle())
|
||||
return src.attackby(null, user)
|
||||
|
||||
/obj/structure/closet/secure_closet/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/structure/closet/secure_closet/verb/verb_togglelock()
|
||||
set src in oview(1) // One square distance
|
||||
set category = "Object"
|
||||
set name = "Toggle Lock"
|
||||
|
||||
if(!usr.canmove || usr.stat || usr.restrained()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain
|
||||
return
|
||||
|
||||
if(get_dist(usr, src) != 1)
|
||||
return
|
||||
|
||||
if(src.broken)
|
||||
return
|
||||
|
||||
if (ishuman(usr))
|
||||
if (!opened)
|
||||
togglelock(usr)
|
||||
else
|
||||
usr << "<span class='warning'>This mob type can't use this verb.</span>"
|
||||
|
||||
/obj/structure/closet/secure_closet/update_icon()//Putting the welded stuff in updateicon() so it's easy to overwrite for special cases (Fridges, cabinets, and whatnot)
|
||||
overlays = null
|
||||
if(!opened)
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
else
|
||||
icon_state = icon_closed
|
||||
if(welded)
|
||||
overlays += "welded"
|
||||
else
|
||||
icon_state = icon_opened
|
||||
@@ -0,0 +1,244 @@
|
||||
/obj/structure/closet/secure_closet/captains
|
||||
name = "Captain's Locker"
|
||||
req_access = list(access_captain)
|
||||
icon_state = "capsecure1"
|
||||
icon_closed = "capsecure"
|
||||
icon_locked = "capsecure1"
|
||||
icon_opened = "capsecureopen"
|
||||
icon_broken = "capsecurebroken"
|
||||
icon_off = "capsecureoff"
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
if(prob(50))
|
||||
new /obj/item/weapon/storage/backpack/captain(src)
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_cap(src)
|
||||
new /obj/item/clothing/suit/captunic(src)
|
||||
new /obj/item/clothing/head/helmet/cap(src)
|
||||
new /obj/item/clothing/under/rank/captain(src)
|
||||
new /obj/item/clothing/suit/armor/vest(src)
|
||||
new /obj/item/weapon/cartridge/captain(src)
|
||||
new /obj/item/clothing/head/helmet/swat(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/device/radio/headset/heads/captain(src)
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/flask(src)
|
||||
new /obj/item/clothing/gloves/captain(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/hop
|
||||
name = "Head of Personnel's Locker"
|
||||
req_access = list(access_hop)
|
||||
icon_state = "hopsecure1"
|
||||
icon_closed = "hopsecure"
|
||||
icon_locked = "hopsecure1"
|
||||
icon_opened = "hopsecureopen"
|
||||
icon_broken = "hopsecurebroken"
|
||||
icon_off = "hopsecureoff"
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/under/rank/head_of_personnel(src)
|
||||
new /obj/item/clothing/suit/armor/vest(src)
|
||||
new /obj/item/clothing/head/helmet(src)
|
||||
new /obj/item/weapon/cartridge/hop(src)
|
||||
new /obj/item/device/radio/headset/heads/hop(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/weapon/storage/id_kit(src)
|
||||
new /obj/item/weapon/storage/id_kit( src )
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/device/flash(src)
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/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"
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
if(prob(50))
|
||||
new /obj/item/weapon/storage/backpack/security(src)
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_sec(src)
|
||||
new /obj/item/clothing/suit/armor/vest(src)
|
||||
new /obj/item/clothing/under/jensen(src)
|
||||
new /obj/item/clothing/suit/armor/hos/jensen(src)
|
||||
new /obj/item/clothing/head/helmet/HoS/dermal(src)
|
||||
new /obj/item/weapon/cartridge/hos(src)
|
||||
new /obj/item/device/radio/headset/heads/hos(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
||||
new /obj/item/weapon/shield/riot(src)
|
||||
new /obj/item/weapon/storage/lockbox/loyalty(src)
|
||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||
new /obj/item/weapon/storage/belt/security(src)
|
||||
new /obj/item/device/flash(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/warden
|
||||
name = "Warden's Locker"
|
||||
req_access = list(access_armory)
|
||||
icon_state = "wardensecure1"
|
||||
icon_closed = "wardensecure"
|
||||
icon_locked = "wardensecure1"
|
||||
icon_opened = "wardensecureopen"
|
||||
icon_broken = "wardensecurebroken"
|
||||
icon_off = "wardensecureoff"
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
if(prob(50))
|
||||
new /obj/item/weapon/storage/backpack/security(src)
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_sec(src)
|
||||
new /obj/item/clothing/suit/armor/vest(src)
|
||||
new /obj/item/clothing/under/rank/warden(src)
|
||||
new /obj/item/clothing/suit/armor/vest/warden(src)
|
||||
new /obj/item/clothing/head/helmet/warden(src)
|
||||
// new /obj/item/weapon/cartridge/security(src)
|
||||
new /obj/item/device/radio/headset/headset_sec(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||
new /obj/item/weapon/storage/belt/security(src)
|
||||
new /obj/item/weapon/reagent_containers/spray/pepper(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/gun/energy/taser(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/security
|
||||
name = "Security Officer's Locker"
|
||||
req_access = list(access_security)
|
||||
icon_state = "sec1"
|
||||
icon_closed = "sec"
|
||||
icon_locked = "sec1"
|
||||
icon_opened = "secopen"
|
||||
icon_broken = "secbroken"
|
||||
icon_off = "secoff"
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
if(prob(50))
|
||||
new /obj/item/weapon/storage/backpack/security(src)
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_sec(src)
|
||||
new /obj/item/clothing/suit/armor/vest(src)
|
||||
new /obj/item/clothing/head/helmet(src)
|
||||
// new /obj/item/weapon/cartridge/security(src)
|
||||
new /obj/item/device/radio/headset/headset_sec(src)
|
||||
new /obj/item/weapon/storage/belt/security(src)
|
||||
new /obj/item/device/flash(src)
|
||||
new /obj/item/weapon/reagent_containers/spray/pepper(src)
|
||||
new /obj/item/weapon/grenade/flashbang(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/gun/energy/taser(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/detective
|
||||
name = "Detective's Cabinet"
|
||||
req_access = list(access_forensics_lockers)
|
||||
icon_state = "cabinetdetective_locked"
|
||||
icon_closed = "cabinetdetective"
|
||||
icon_locked = "cabinetdetective_locked"
|
||||
icon_opened = "cabinetdetective_open"
|
||||
icon_broken = "cabinetdetective_broken"
|
||||
icon_off = "cabinetdetective_broken"
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/under/det(src)
|
||||
new /obj/item/clothing/suit/armor/det_suit(src)
|
||||
new /obj/item/clothing/suit/det_suit(src)
|
||||
new /obj/item/clothing/gloves/black(src)
|
||||
new /obj/item/clothing/head/det_hat(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/device/radio/headset/headset_sec(src)
|
||||
new /obj/item/weapon/cartridge/detective(src)
|
||||
new /obj/item/weapon/storage/fcard_kit(src)
|
||||
new /obj/item/weapon/fcardholder(src)
|
||||
new /obj/item/weapon/clipboard(src)
|
||||
new /obj/item/device/detective_scanner(src)
|
||||
new /obj/item/weapon/storage/box/evidence(src)
|
||||
return
|
||||
|
||||
/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"
|
||||
req_access = list(access_hos)
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/weapon/reagent_containers/ld50_syringe/choral(src)
|
||||
new /obj/item/weapon/reagent_containers/ld50_syringe/choral(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/brig
|
||||
name = "Brig Locker"
|
||||
req_access = list(access_brig)
|
||||
anchored = 1
|
||||
var/id = null
|
||||
|
||||
New()
|
||||
new /obj/item/clothing/under/color/orange( src )
|
||||
new /obj/item/clothing/shoes/orange( src )
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/courtroom
|
||||
name = "Courtroom Locker"
|
||||
req_access = list(access_court)
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/weapon/paper/Court (src)
|
||||
new /obj/item/weapon/paper/Court (src)
|
||||
new /obj/item/weapon/paper/Court (src)
|
||||
new /obj/item/weapon/pen (src)
|
||||
new /obj/item/clothing/suit/judgerobe (src)
|
||||
new /obj/item/clothing/head/powdered_wig (src)
|
||||
new /obj/item/weapon/storage/briefcase(src)
|
||||
return
|
||||
@@ -0,0 +1,14 @@
|
||||
/obj/structure/closet/syndicate/personal/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/weapon/tank/jetpack/oxygen(src)
|
||||
new /obj/item/clothing/mask/gas/syndicate(src)
|
||||
new /obj/item/clothing/under/syndicate(src)
|
||||
new /obj/item/clothing/head/helmet/space/rig/syndi(src)
|
||||
new /obj/item/clothing/suit/space/rig/syndi(src)
|
||||
new /obj/item/weapon/crowbar/red(src)
|
||||
new /obj/item/weapon/cell/high(src)
|
||||
new /obj/item/weapon/card/id/syndicate(src)
|
||||
new /obj/item/device/multitool(src)
|
||||
new /obj/item/weapon/shield/energy(src)
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/obj/structure/closet/thunderdome/New()
|
||||
..()
|
||||
sleep(2)
|
||||
|
||||
/obj/structure/closet/thunderdome/tdred/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/suit/armor/tdome/red(src)
|
||||
new /obj/item/clothing/suit/armor/tdome/red(src)
|
||||
new /obj/item/clothing/suit/armor/tdome/red(src)
|
||||
new /obj/item/weapon/melee/energy/sword(src)
|
||||
new /obj/item/weapon/melee/energy/sword(src)
|
||||
new /obj/item/weapon/melee/energy/sword(src)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
|
||||
/obj/structure/closet/thunderdome/tdgreen/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/suit/armor/tdome/green(src)
|
||||
new /obj/item/clothing/suit/armor/tdome/green(src)
|
||||
new /obj/item/clothing/suit/armor/tdome/green(src)
|
||||
new /obj/item/weapon/melee/energy/sword(src)
|
||||
new /obj/item/weapon/melee/energy/sword(src)
|
||||
new /obj/item/weapon/melee/energy/sword(src)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/melee/baton(src)
|
||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||
new /obj/item/weapon/storage/flashbang_kit(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
@@ -0,0 +1,229 @@
|
||||
/obj/structure/closet/wardrobe/New()
|
||||
new /obj/item/clothing/under/color/blue(src)
|
||||
new /obj/item/clothing/under/color/blue(src)
|
||||
new /obj/item/clothing/under/color/blue(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/red/New()
|
||||
new /obj/item/clothing/under/rank/security(src)
|
||||
new /obj/item/clothing/under/rank/security(src)
|
||||
new /obj/item/clothing/under/rank/security(src)
|
||||
new /obj/item/clothing/shoes/jackboots(src)
|
||||
new /obj/item/clothing/shoes/jackboots(src)
|
||||
new /obj/item/clothing/shoes/jackboots(src)
|
||||
new /obj/item/clothing/head/soft/sec(src)
|
||||
new /obj/item/clothing/head/soft/sec(src)
|
||||
new /obj/item/clothing/head/soft/sec(src)
|
||||
new /obj/item/clothing/head/beret/sec(src)
|
||||
new /obj/item/clothing/head/beret/sec(src)
|
||||
new /obj/item/clothing/head/beret/sec(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/pink/New()
|
||||
new /obj/item/clothing/under/color/pink(src)
|
||||
new /obj/item/clothing/under/color/pink(src)
|
||||
new /obj/item/clothing/under/color/pink(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/black/New()
|
||||
new /obj/item/clothing/under/color/black(src)
|
||||
new /obj/item/clothing/under/color/black(src)
|
||||
new /obj/item/clothing/under/color/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/head/that(src)
|
||||
new /obj/item/clothing/head/that(src)
|
||||
new /obj/item/clothing/head/that(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/chaplain_black/New()
|
||||
new /obj/item/clothing/under/rank/chaplain(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/suit/nun(src)
|
||||
new /obj/item/clothing/head/nun_hood(src)
|
||||
new /obj/item/clothing/suit/chaplain_hoodie(src)
|
||||
new /obj/item/clothing/head/chaplain_hood(src)
|
||||
new /obj/item/clothing/suit/holidaypriest(src)
|
||||
new /obj/item/weapon/storage/backpack/cultpack (src)
|
||||
new /obj/item/weapon/storage/fancy/candle_box(src)
|
||||
new /obj/item/weapon/storage/fancy/candle_box(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/green/New()
|
||||
new /obj/item/clothing/under/color/green(src)
|
||||
new /obj/item/clothing/under/color/green(src)
|
||||
new /obj/item/clothing/under/color/green(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
//new /obj/item/clothing/head/soft/green(src)
|
||||
//new /obj/item/clothing/head/soft/green(src)
|
||||
//new /obj/item/clothing/head/soft/green(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/orange/New()
|
||||
new /obj/item/clothing/under/color/orange(src)
|
||||
new /obj/item/clothing/under/color/orange(src)
|
||||
new /obj/item/clothing/under/color/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
//new /obj/item/clothing/head/soft/orange(src)
|
||||
//new /obj/item/clothing/head/soft/orange(src)
|
||||
//new /obj/item/clothing/head/soft/orange(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/yellow/New()
|
||||
new /obj/item/clothing/under/color/yellow(src)
|
||||
new /obj/item/clothing/under/color/yellow(src)
|
||||
new /obj/item/clothing/under/color/yellow(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
//new /obj/item/clothing/head/soft/yellow(src)
|
||||
//new /obj/item/clothing/head/soft/yellow(src)
|
||||
//new /obj/item/clothing/head/soft/yellow(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/atmospherics_yellow/New()
|
||||
new /obj/item/clothing/under/rank/atmospheric_technician(src)
|
||||
new /obj/item/clothing/under/rank/atmospheric_technician(src)
|
||||
new /obj/item/clothing/under/rank/atmospheric_technician(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
//new /obj/item/clothing/head/soft/yellow(src)
|
||||
//new /obj/item/clothing/head/soft/yellow(src)
|
||||
//new /obj/item/clothing/head/soft/yellow(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/engineering_yellow/New()
|
||||
new /obj/item/clothing/under/rank/engineer(src)
|
||||
new /obj/item/clothing/under/rank/engineer(src)
|
||||
new /obj/item/clothing/under/rank/engineer(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
//new /obj/item/clothing/head/soft/yellow(src)
|
||||
//new /obj/item/clothing/head/soft/yellow(src)
|
||||
//new /obj/item/clothing/head/soft/yellow(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/white/New()
|
||||
new /obj/item/clothing/under/color/white(src)
|
||||
new /obj/item/clothing/under/color/white(src)
|
||||
new /obj/item/clothing/under/color/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/pjs/New()
|
||||
new /obj/item/clothing/under/pj/red(src)
|
||||
new /obj/item/clothing/under/pj/red(src)
|
||||
new /obj/item/clothing/under/pj/blue(src)
|
||||
new /obj/item/clothing/under/pj/blue(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/toxins_white/New()
|
||||
new /obj/item/clothing/under/rank/scientist(src)
|
||||
new /obj/item/clothing/under/rank/scientist(src)
|
||||
new /obj/item/clothing/under/rank/scientist(src)
|
||||
new /obj/item/clothing/suit/labcoat(src)
|
||||
new /obj/item/clothing/suit/labcoat(src)
|
||||
new /obj/item/clothing/suit/labcoat(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/robotics_black/New()
|
||||
new /obj/item/clothing/under/rank/roboticist(src)
|
||||
new /obj/item/clothing/under/rank/roboticist(src)
|
||||
new /obj/item/clothing/suit/labcoat(src)
|
||||
new /obj/item/clothing/suit/labcoat(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/chemistry_white/New()
|
||||
new /obj/item/clothing/under/rank/chemist(src)
|
||||
new /obj/item/clothing/under/rank/chemist(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/suit/labcoat/chemist(src)
|
||||
new /obj/item/clothing/suit/labcoat/chemist(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/genetics_white/New()
|
||||
new /obj/item/clothing/under/rank/geneticist(src)
|
||||
new /obj/item/clothing/under/rank/geneticist(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/suit/labcoat/genetics(src)
|
||||
new /obj/item/clothing/suit/labcoat/genetics(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/virology_white/New()
|
||||
new /obj/item/clothing/under/rank/virologist(src)
|
||||
new /obj/item/clothing/under/rank/virologist(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/suit/labcoat/virologist(src)
|
||||
new /obj/item/clothing/suit/labcoat/virologist(src)
|
||||
new /obj/item/clothing/mask/surgical(src)
|
||||
new /obj/item/clothing/mask/surgical(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/grey/New()
|
||||
new /obj/item/clothing/under/color/grey(src)
|
||||
new /obj/item/clothing/under/color/grey(src)
|
||||
new /obj/item/clothing/under/color/grey(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/head/soft/grey(src)
|
||||
new /obj/item/clothing/head/soft/grey(src)
|
||||
new /obj/item/clothing/head/soft/grey(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/mixed/New()
|
||||
new /obj/item/clothing/under/color/white(src)
|
||||
new /obj/item/clothing/under/color/blue(src)
|
||||
new /obj/item/clothing/under/color/yellow(src)
|
||||
new /obj/item/clothing/under/color/green(src)
|
||||
new /obj/item/clothing/under/color/orange(src)
|
||||
new /obj/item/clothing/under/color/pink(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
//new /obj/item/clothing/head/soft/mime(src)
|
||||
//new /obj/item/clothing/head/soft/blue(src)
|
||||
//new /obj/item/clothing/head/soft/yellow(src)
|
||||
//new /obj/item/clothing/head/soft/green(src)
|
||||
//new /obj/item/clothing/head/soft/orange(src)
|
||||
//new /obj/item/clothing/head/soft/purple(src)
|
||||
//if(prob(10)) new /obj/item/clothing/head/soft/rainbow(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/lawcloset/New()
|
||||
new /obj/item/clothing/under/lawyer/female(src)
|
||||
new /obj/item/clothing/under/lawyer/black(src)
|
||||
new /obj/item/clothing/under/lawyer/red(src)
|
||||
new /obj/item/clothing/under/lawyer/bluesuit(src)
|
||||
new /obj/item/clothing/suit/lawyer/bluejacket(src)
|
||||
new /obj/item/clothing/under/lawyer/purpsuit(src)
|
||||
new /obj/item/clothing/suit/lawyer/purpjacket(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
@@ -0,0 +1,354 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/obj/structure/closet/crate
|
||||
desc = "A crate."
|
||||
name = "Crate"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "crate"
|
||||
density = 1
|
||||
icon_opened = "crateopen"
|
||||
icon_closed = "crate"
|
||||
req_access = null
|
||||
opened = 0
|
||||
flags = FPRINT
|
||||
// mouse_drag_pointer = MOUSE_ACTIVE_POINTER //???
|
||||
|
||||
/obj/structure/closet/crate/internals
|
||||
desc = "A internals crate."
|
||||
name = "Internals crate"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "o2crate"
|
||||
density = 1
|
||||
icon_opened = "o2crateopen"
|
||||
icon_closed = "o2crate"
|
||||
|
||||
/obj/structure/closet/crate/trashcart
|
||||
desc = "A heavy, metal trashcart with wheels."
|
||||
name = "Trash Cart"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "trashcart"
|
||||
density = 1
|
||||
icon_opened = "trashcartopen"
|
||||
icon_closed = "trashcart"
|
||||
|
||||
/*these aren't needed anymore
|
||||
/obj/structure/closet/crate/hat
|
||||
desc = "A crate filled with Valuable Collector's Hats!."
|
||||
name = "Hat Crate"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "crate"
|
||||
density = 1
|
||||
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 = 'icons/obj/storage.dmi'
|
||||
icon_state = "crate"
|
||||
density = 1
|
||||
icon_opened = "crateopen"
|
||||
icon_closed = "crate"
|
||||
*/
|
||||
|
||||
/obj/structure/closet/crate/medical
|
||||
desc = "A medical crate."
|
||||
name = "Medical crate"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "medicalcrate"
|
||||
density = 1
|
||||
icon_opened = "medicalcrateopen"
|
||||
icon_closed = "medicalcrate"
|
||||
|
||||
/obj/structure/closet/crate/rcd
|
||||
desc = "A crate for the storage of the RCD."
|
||||
name = "RCD crate"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "crate"
|
||||
density = 1
|
||||
icon_opened = "crateopen"
|
||||
icon_closed = "crate"
|
||||
|
||||
/obj/structure/closet/crate/freezer
|
||||
desc = "A freezer."
|
||||
name = "Freezer"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "freezer"
|
||||
density = 1
|
||||
icon_opened = "freezeropen"
|
||||
icon_closed = "freezer"
|
||||
var/target_temp = T0C - 40
|
||||
var/cooling_power = 40
|
||||
|
||||
return_air()
|
||||
var/datum/gas_mixture/gas = (..())
|
||||
if(!gas) return null
|
||||
var/datum/gas_mixture/newgas = new/datum/gas_mixture()
|
||||
newgas.oxygen = gas.oxygen
|
||||
newgas.carbon_dioxide = gas.carbon_dioxide
|
||||
newgas.nitrogen = gas.nitrogen
|
||||
newgas.toxins = gas.toxins
|
||||
newgas.volume = gas.volume
|
||||
newgas.temperature = gas.temperature
|
||||
if(newgas.temperature <= target_temp) return
|
||||
|
||||
if((newgas.temperature - cooling_power) > target_temp)
|
||||
newgas.temperature -= cooling_power
|
||||
else
|
||||
newgas.temperature = target_temp
|
||||
return newgas
|
||||
|
||||
|
||||
/obj/structure/closet/crate/bin
|
||||
desc = "A large bin."
|
||||
name = "Large bin"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "largebin"
|
||||
density = 1
|
||||
icon_opened = "largebinopen"
|
||||
icon_closed = "largebin"
|
||||
|
||||
/obj/structure/closet/crate/radiation
|
||||
desc = "A crate with a radiation sign on it."
|
||||
name = "Radioactive gear crate"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "radiation"
|
||||
density = 1
|
||||
icon_opened = "radiationopen"
|
||||
icon_closed = "radiation"
|
||||
|
||||
/obj/structure/closet/crate/secure/weapon
|
||||
desc = "A secure weapons crate."
|
||||
name = "Weapons crate"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "weaponcrate"
|
||||
density = 1
|
||||
icon_opened = "weaponcrateopen"
|
||||
icon_closed = "weaponcrate"
|
||||
|
||||
/obj/structure/closet/crate/secure/plasma
|
||||
desc = "A secure plasma crate."
|
||||
name = "Plasma crate"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "plasmacrate"
|
||||
density = 1
|
||||
icon_opened = "plasmacrateopen"
|
||||
icon_closed = "plasmacrate"
|
||||
|
||||
/obj/structure/closet/crate/secure/gear
|
||||
desc = "A secure gear crate."
|
||||
name = "Gear crate"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "secgearcrate"
|
||||
density = 1
|
||||
icon_opened = "secgearcrateopen"
|
||||
icon_closed = "secgearcrate"
|
||||
|
||||
/obj/structure/closet/crate/secure/bin
|
||||
desc = "A secure bin."
|
||||
name = "Secure bin"
|
||||
icon_state = "largebins"
|
||||
icon_opened = "largebinsopen"
|
||||
icon_closed = "largebins"
|
||||
redlight = "largebinr"
|
||||
greenlight = "largebing"
|
||||
sparks = "largebinsparks"
|
||||
emag = "largebinemag"
|
||||
|
||||
/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"
|
||||
var/broken = 0
|
||||
var/locked = 1
|
||||
|
||||
/obj/structure/closet/crate/hydroponics
|
||||
name = "Hydroponics crate"
|
||||
desc = "All you need to destroy those pesky weeds and pests."
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "hydrocrate"
|
||||
icon_opened = "hydrocrateopen"
|
||||
icon_closed = "hydrocrate"
|
||||
density = 1
|
||||
|
||||
/obj/structure/closet/crate/hydroponics/prespawned
|
||||
//This exists so the prespawned hydro crates spawn with their contents.
|
||||
/* name = "Hydroponics crate"
|
||||
desc = "All you need to destroy those pesky weeds and pests."
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "hydrocrate"
|
||||
icon_opened = "hydrocrateopen"
|
||||
icon_closed = "hydrocrate"
|
||||
density = 1*/
|
||||
New()
|
||||
..()
|
||||
new /obj/item/weapon/reagent_containers/spray/plantbgone(src)
|
||||
new /obj/item/weapon/reagent_containers/spray/plantbgone(src)
|
||||
new /obj/item/weapon/minihoe(src)
|
||||
// new /obj/item/weapon/weedspray(src)
|
||||
// new /obj/item/weapon/weedspray(src)
|
||||
// new /obj/item/weapon/pestspray(src)
|
||||
// new /obj/item/weapon/pestspray(src)
|
||||
// new /obj/item/weapon/pestspray(src)
|
||||
|
||||
/obj/structure/closet/crate/New()
|
||||
..()
|
||||
spawn(1)
|
||||
if(!opened) // if closed, any item at the crate's loc is put in the contents
|
||||
for(var/obj/item/I in src.loc)
|
||||
if(I.density || I.anchored || I == src) continue
|
||||
I.loc = src
|
||||
|
||||
/obj/structure/closet/crate/secure/New()
|
||||
..()
|
||||
if(locked)
|
||||
overlays = null
|
||||
overlays += redlight
|
||||
else
|
||||
overlays = null
|
||||
overlays += greenlight
|
||||
|
||||
/obj/structure/closet/crate/rcd/New()
|
||||
..()
|
||||
new /obj/item/weapon/rcd_ammo(src)
|
||||
new /obj/item/weapon/rcd_ammo(src)
|
||||
new /obj/item/weapon/rcd_ammo(src)
|
||||
new /obj/item/weapon/rcd(src)
|
||||
|
||||
/obj/structure/closet/crate/radiation/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/radiation(src)
|
||||
new /obj/item/clothing/head/radiation(src)
|
||||
new /obj/item/clothing/suit/radiation(src)
|
||||
new /obj/item/clothing/head/radiation(src)
|
||||
new /obj/item/clothing/suit/radiation(src)
|
||||
new /obj/item/clothing/head/radiation(src)
|
||||
new /obj/item/clothing/suit/radiation(src)
|
||||
new /obj/item/clothing/head/radiation(src)
|
||||
|
||||
/obj/structure/closet/crate/open()
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
|
||||
for(var/obj/O in src)
|
||||
O.loc = get_turf(src)
|
||||
|
||||
icon_state = icon_opened
|
||||
src.opened = 1
|
||||
|
||||
/obj/structure/closet/crate/close()
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
|
||||
var/itemcount = 0
|
||||
|
||||
for(var/obj/O in get_turf(src))
|
||||
if(itemcount >= storage_capacity)
|
||||
break
|
||||
if(O.density || O.anchored || O == src) continue
|
||||
O.loc = src
|
||||
itemcount++
|
||||
|
||||
icon_state = icon_closed
|
||||
src.opened = 0
|
||||
|
||||
/obj/structure/closet/crate/attack_hand(mob/user as mob)
|
||||
if(opened) close()
|
||||
else open()
|
||||
return
|
||||
|
||||
/obj/structure/closet/crate/secure/attack_hand(mob/user as mob)
|
||||
if(locked && !broken)
|
||||
if (allowed(user))
|
||||
user << "<span class='notice'>You unlock \the [src].</span>"
|
||||
src.locked = 0
|
||||
overlays = null
|
||||
overlays += greenlight
|
||||
return
|
||||
else
|
||||
user << "<span class='notice'>\The [src] is locked.</span>"
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/closet/crate/secure/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/card) && src.allowed(user) && !locked && !opened && !broken)
|
||||
user << "<span class='notice'>You lock \the [src].</span>"
|
||||
src.locked = 1
|
||||
overlays = null
|
||||
overlays += redlight
|
||||
return
|
||||
else if ( (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && locked &&!broken)
|
||||
overlays = null
|
||||
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
|
||||
user << "<span class='notice'>You unlock \the [src].</span>"
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/crate/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/closet/crate/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(opened)
|
||||
if(isrobot(user))
|
||||
return
|
||||
user.drop_item()
|
||||
if(W)
|
||||
W.loc = src.loc
|
||||
else if(istype(W, /obj/item/weapon/packageWrap))
|
||||
return
|
||||
else return attack_hand(user)
|
||||
|
||||
/obj/structure/closet/crate/secure/emp_act(severity)
|
||||
for(var/obj/O in src)
|
||||
O.emp_act(severity)
|
||||
if(!broken && !opened && prob(50/severity))
|
||||
if(!locked)
|
||||
src.locked = 1
|
||||
overlays = null
|
||||
overlays += redlight
|
||||
else
|
||||
overlays = null
|
||||
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
|
||||
if(!opened && prob(20/severity))
|
||||
if(!locked)
|
||||
open()
|
||||
else
|
||||
src.req_access = list()
|
||||
src.req_access += pick(get_all_accesses())
|
||||
..()
|
||||
|
||||
|
||||
/obj/structure/closet/crate/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
for(var/obj/O in src.contents)
|
||||
del(O)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
for(var/obj/O in src.contents)
|
||||
if(prob(50))
|
||||
del(O)
|
||||
del(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
return
|
||||
@@ -0,0 +1,27 @@
|
||||
/obj/structure/largecrate
|
||||
name = "large crate"
|
||||
desc = "A hefty wooden crate."
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "densecrate"
|
||||
density = 1
|
||||
flags = FPRINT
|
||||
|
||||
/obj/structure/largecrate/attack_hand(mob/user as mob)
|
||||
user << "<span class='notice'>You need a crowbar to pry this open!</span>"
|
||||
return
|
||||
|
||||
/obj/structure/largecrate/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
new /obj/item/stack/sheet/wood(src)
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/obj/O in contents)
|
||||
O.loc = T
|
||||
user.visible_message("<span class='notice'>[user] pries \the [src] open.</span>", \
|
||||
"<span class='notice'>You pry open \the [src].</span>", \
|
||||
"<span class='notice'>You hear splitting wood.</span>")
|
||||
del(src)
|
||||
else
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/largecrate/mule
|
||||
icon_state = "mulecrate"
|
||||
@@ -0,0 +1,87 @@
|
||||
/obj/structure/displaycase/ex_act(severity)
|
||||
switch(severity)
|
||||
if (1)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
if (occupied)
|
||||
new /obj/item/weapon/gun/energy/laser/captain( src.loc )
|
||||
occupied = 0
|
||||
del(src)
|
||||
if (2)
|
||||
if (prob(50))
|
||||
src.health -= 15
|
||||
src.healthcheck()
|
||||
if (3)
|
||||
if (prob(50))
|
||||
src.health -= 5
|
||||
src.healthcheck()
|
||||
|
||||
|
||||
/obj/structure/displaycase/bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
..()
|
||||
src.healthcheck()
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/displaycase/blob_act()
|
||||
if (prob(75))
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
if (occupied)
|
||||
new /obj/item/weapon/gun/energy/laser/captain( src.loc )
|
||||
occupied = 0
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/structure/displaycase/meteorhit(obj/O as obj)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/weapon/gun/energy/laser/captain( src.loc )
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/structure/displaycase/proc/healthcheck()
|
||||
if (src.health <= 0)
|
||||
if (!( src.destroyed ))
|
||||
src.density = 0
|
||||
src.destroyed = 1
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
playsound(src, "shatter", 70, 1)
|
||||
update_icon()
|
||||
else
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
return
|
||||
|
||||
/obj/structure/displaycase/update_icon()
|
||||
if(src.destroyed)
|
||||
src.icon_state = "glassboxb[src.occupied]"
|
||||
else
|
||||
src.icon_state = "glassbox[src.occupied]"
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/displaycase/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
src.health -= W.force
|
||||
src.healthcheck()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/displaycase/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/structure/displaycase/attack_hand(mob/user as mob)
|
||||
if (src.destroyed && src.occupied)
|
||||
new /obj/item/weapon/gun/energy/laser/captain( src.loc )
|
||||
user << "\b You deactivate the hover field built into the case."
|
||||
src.occupied = 0
|
||||
src.add_fingerprint(user)
|
||||
update_icon()
|
||||
return
|
||||
else
|
||||
usr << text("\blue You kick the display case.")
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\red [] kicks the display case.", usr)
|
||||
src.health -= 2
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
|
||||
@@ -0,0 +1,533 @@
|
||||
obj/structure/door_assembly
|
||||
icon = 'icons/obj/doors/door_assembly.dmi'
|
||||
|
||||
name = "Airlock Assembly"
|
||||
icon_state = "door_as_0"
|
||||
anchored = 0
|
||||
density = 1
|
||||
var/state = 0
|
||||
var/mineral = null
|
||||
var/base_icon_state = "door_as_0"
|
||||
var/glass_base_icon_state = "door_as_g0"
|
||||
var/obj/item/weapon/airlock_electronics/electronics = null
|
||||
var/airlock_type = /obj/machinery/door/airlock //the type path of the airlock once completed
|
||||
var/glass_type = /obj/machinery/door/airlock/glass
|
||||
var/glass = null
|
||||
|
||||
New()
|
||||
base_icon_state = copytext(icon_state,1,lentext(icon_state))
|
||||
|
||||
door_assembly_0
|
||||
name = "Airlock Assembly"
|
||||
icon_state = "door_as_1"
|
||||
airlock_type = /obj/machinery/door/airlock
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
glass = 0
|
||||
|
||||
door_assembly_com
|
||||
name = "Command Airlock Assembly"
|
||||
icon_state = "door_as_com1"
|
||||
glass_base_icon_state = "door_as_gcom"
|
||||
glass_type = /obj/machinery/door/airlock/glass_command
|
||||
airlock_type = /obj/machinery/door/airlock/command
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
glass = 0
|
||||
|
||||
glass
|
||||
glass = 1
|
||||
icon_state = "door_as_gcom1"
|
||||
|
||||
door_assembly_sec
|
||||
name = "Security Airlock Assembly"
|
||||
icon_state = "door_as_sec1"
|
||||
glass_base_icon_state = "door_as_gsec"
|
||||
glass_type = /obj/machinery/door/airlock/glass_security
|
||||
airlock_type = /obj/machinery/door/airlock/security
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
glass = 0
|
||||
|
||||
glass
|
||||
glass = 1
|
||||
icon_state = "door_as_gsec1"
|
||||
|
||||
door_assembly_eng
|
||||
name = "Engineering Airlock Assembly"
|
||||
icon_state = "door_as_eng1"
|
||||
glass_base_icon_state = "door_as_geng"
|
||||
glass_type = /obj/machinery/door/airlock/glass_engineering
|
||||
airlock_type = /obj/machinery/door/airlock/engineering
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
glass = 0
|
||||
|
||||
glass
|
||||
glass = 1
|
||||
icon_state = "door_as_geng1"
|
||||
|
||||
door_assembly_min
|
||||
name = "Mining Airlock Assembly"
|
||||
icon_state = "door_as_min1"
|
||||
glass_base_icon_state = "door_as_gmin"
|
||||
glass_type = /obj/machinery/door/airlock/glass_mining
|
||||
airlock_type = /obj/machinery/door/airlock/mining
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
glass = 0
|
||||
|
||||
glass
|
||||
glass = 1
|
||||
icon_state = "door_as_gmin1"
|
||||
|
||||
door_assembly_atmo
|
||||
name = "Atmospherics Airlock Assembly"
|
||||
icon_state = "door_as_atmo1"
|
||||
glass_base_icon_state = "door_as_gatmo"
|
||||
glass_type = /obj/machinery/door/airlock/glass_atmos
|
||||
airlock_type = /obj/machinery/door/airlock/atmos
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
glass = 0
|
||||
|
||||
glass
|
||||
glass = 1
|
||||
icon_state = "door_as_gatmo1"
|
||||
|
||||
door_assembly_research
|
||||
name = "Research Airlock Assembly"
|
||||
icon_state = "door_as_res1"
|
||||
glass_base_icon_state = "door_as_gres"
|
||||
glass_type = /obj/machinery/door/airlock/glass_research
|
||||
airlock_type = /obj/machinery/door/airlock/research
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
glass = 0
|
||||
|
||||
glass
|
||||
glass = 1
|
||||
icon_state = "door_as_gres1"
|
||||
|
||||
door_assembly_science
|
||||
name = "Science Airlock Assembly"
|
||||
icon_state = "door_as_sci1"
|
||||
glass_base_icon_state = "door_as_gsci"
|
||||
glass_type = /obj/machinery/door/airlock/glass_science
|
||||
airlock_type = /obj/machinery/door/airlock/science
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
glass = 0
|
||||
|
||||
glass
|
||||
glass = 1
|
||||
icon_state = "door_as_gsci1"
|
||||
|
||||
door_assembly_med
|
||||
name = "Medical Airlock Assembly"
|
||||
icon_state = "door_as_med1"
|
||||
airlock_type = /obj/machinery/door/airlock/medical
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
|
||||
glass
|
||||
mineral = "glass"
|
||||
icon_state = "door_as_gmed1"
|
||||
|
||||
door_assembly_mai
|
||||
name = "Maintenance Airlock Assembly"
|
||||
icon_state = "door_as_mai1"
|
||||
airlock_type = /obj/machinery/door/airlock/maintenance
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
glass = 0
|
||||
|
||||
door_assembly_ext
|
||||
name = "External Airlock Assembly"
|
||||
icon_state = "door_as_ext1"
|
||||
airlock_type = /obj/machinery/door/airlock/external
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
glass = 0
|
||||
|
||||
door_assembly_fre
|
||||
name = "Freezer Airlock Assembly"
|
||||
icon_state = "door_as_fre1"
|
||||
airlock_type = /obj/machinery/door/airlock/freezer
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
glass = 0
|
||||
|
||||
door_assembly_hatch
|
||||
name = "Airtight Hatch Assembly"
|
||||
icon_state = "door_as_hatch1"
|
||||
airlock_type = /obj/machinery/door/airlock/hatch
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
glass = 0
|
||||
|
||||
door_assembly_mhatch
|
||||
name = "Maintenance Hatch Assembly"
|
||||
icon_state = "door_as_mhatch1"
|
||||
airlock_type = /obj/machinery/door/airlock/maintenance_hatch
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
glass = 0
|
||||
|
||||
door_assembly_glass
|
||||
name = "Glass Airlock Assembly"
|
||||
icon_state = "door_as_g1"
|
||||
airlock_type = /obj/machinery/door/airlock/glass
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
mineral = "glass"
|
||||
|
||||
door_assembly_gold
|
||||
name = "Gold Airlock Assembly"
|
||||
icon_state = "door_as_gold1"
|
||||
airlock_type = /obj/machinery/door/airlock/gold
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
mineral = "gold"
|
||||
|
||||
door_assembly_silver
|
||||
name = "Silver Airlock Assembly"
|
||||
icon_state = "door_as_silver1"
|
||||
airlock_type = /obj/machinery/door/airlock/silver
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
mineral = "silver"
|
||||
|
||||
door_assembly_diamond
|
||||
name = "Diamond Airlock Assembly"
|
||||
icon_state = "door_as_diamond1"
|
||||
airlock_type = /obj/machinery/door/airlock/diamond
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
mineral = "diamond"
|
||||
|
||||
door_assembly_uranium
|
||||
name = "Uranium Airlock Assembly"
|
||||
icon_state = "door_as_uranium1"
|
||||
airlock_type = /obj/machinery/door/airlock/uranium
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
mineral = "uranium"
|
||||
|
||||
door_assembly_plasma
|
||||
name = "Plasma Airlock Assembly"
|
||||
icon_state = "door_as_plasma1"
|
||||
airlock_type = /obj/machinery/door/airlock/plasma
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
mineral = "plasma"
|
||||
|
||||
door_assembly_clown
|
||||
name = "Bananium Airlock Assembly"
|
||||
icon_state = "door_as_clown1"
|
||||
airlock_type = /obj/machinery/door/airlock/clown
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
mineral = "clown"
|
||||
|
||||
door_assembly_sandstone
|
||||
name = "Sandstone Airlock Assembly"
|
||||
icon_state = "door_as_sandstone1"
|
||||
airlock_type = /obj/machinery/door/airlock/sandstone
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
mineral = "sandstone"
|
||||
|
||||
door_assembly_sandstone
|
||||
name = "Sandstone Airlock Assembly"
|
||||
icon_state = "door_as_sandstone1"
|
||||
airlock_type = /obj/machinery/door/airlock/sandstone
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
mineral = "sandstone"
|
||||
|
||||
door_assembly_highsecurity // Borrowing this until WJohnston makes sprites for the assembly
|
||||
name = "High Tech Security Assembly"
|
||||
icon_state = "door_as_highsec1"
|
||||
airlock_type = /obj/machinery/door/airlock/highsecurity
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
glass = 0
|
||||
|
||||
/obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && !anchored )
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0,user))
|
||||
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src || !WT.isOn()) return
|
||||
user << "\blue You dissasembled the airlock assembly!"
|
||||
new /obj/item/stack/sheet/metal(get_turf(src), 4)
|
||||
switch(mineral)
|
||||
if("glass")
|
||||
new /obj/item/stack/sheet/rglass(get_turf(src))
|
||||
if("gold")
|
||||
new /obj/item/stack/sheet/gold(get_turf(src))
|
||||
new /obj/item/stack/sheet/gold(get_turf(src))
|
||||
if("silver")
|
||||
new /obj/item/stack/sheet/silver(get_turf(src))
|
||||
new /obj/item/stack/sheet/silver(get_turf(src))
|
||||
if("diamond")
|
||||
new /obj/item/stack/sheet/diamond(get_turf(src))
|
||||
new /obj/item/stack/sheet/diamond(get_turf(src))
|
||||
if("uranium")
|
||||
new /obj/item/stack/sheet/uranium(get_turf(src))
|
||||
new /obj/item/stack/sheet/uranium(get_turf(src))
|
||||
if("plasma")
|
||||
new /obj/item/stack/sheet/plasma(get_turf(src))
|
||||
new /obj/item/stack/sheet/plasma(get_turf(src))
|
||||
if("clown")
|
||||
new /obj/item/stack/sheet/clown(get_turf(src))
|
||||
new /obj/item/stack/sheet/clown(get_turf(src))
|
||||
if("sandstone")
|
||||
new /obj/item/stack/sheet/sandstone(get_turf(src))
|
||||
new /obj/item/stack/sheet/sandstone(get_turf(src))
|
||||
del(src)
|
||||
else
|
||||
user << "\blue You need more welding fuel to dissassemble the airlock assembly."
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench) && !anchored )
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user.visible_message("[user] secures the airlock assembly to the floor.", "You start to secure the airlock assembly to the floor.")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You secured the airlock assembly!"
|
||||
src.name = "Secured Airlock Assembly"
|
||||
src.anchored = 1
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench) && anchored )
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user.visible_message("[user] unsecures the airlock assembly from the floor.", "You start to unsecure the airlock assembly from the floor.")
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You unsecured the airlock assembly!"
|
||||
src.name = "Airlock Assembly"
|
||||
src.anchored = 0
|
||||
|
||||
else if(istype(W, /obj/item/weapon/cable_coil) && state == 0 && anchored )
|
||||
var/obj/item/weapon/cable_coil/coil = W
|
||||
user.visible_message("[user] wires the airlock assembly.", "You start to wire the airlock assembly.")
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
coil.use(1)
|
||||
src.state = 1
|
||||
user << "\blue You wire the Airlock!"
|
||||
src.name = "Wired Airlock Assembly"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1 )
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You cut the airlock wires.!"
|
||||
new/obj/item/weapon/cable_coil(get_turf(user), 1)
|
||||
src.state = 0
|
||||
src.name = "Secured Airlock Assembly"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/airlock_electronics) && state == 1 )
|
||||
playsound(src.loc, '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.")
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You installed the airlock electronics!"
|
||||
src.state = 2
|
||||
src.name = "Near finished Airlock Assembly"
|
||||
src.electronics = W
|
||||
else
|
||||
W.loc = src.loc
|
||||
|
||||
//del(W)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/crowbar) && state == 2 )
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to install electronics into the airlock assembly.")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You removed the airlock electronics!"
|
||||
src.state = 1
|
||||
src.name = "Wired Airlock Assembly"
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
if (!electronics)
|
||||
ae = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
else
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.loc = src.loc
|
||||
else if(istype(W, /obj/item/stack/sheet) && !mineral)
|
||||
var/obj/item/stack/sheet/G = W
|
||||
if(G)
|
||||
if(G.amount>=1)
|
||||
switch(G.type)
|
||||
if(/obj/item/stack/sheet/rglass)
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] adds [G.name] to the airlock assembly.", "You start to install [G.name] into the airlock assembly.")
|
||||
if(do_after(user, 40))
|
||||
user << "\blue You installed reinforced glass windows into the airlock assembly!"
|
||||
G.use(1)
|
||||
src.mineral = "glass"
|
||||
src.name = "Near finished Window Airlock Assembly"
|
||||
src.airlock_type = /obj/machinery/door/airlock/glass
|
||||
src.base_icon_state = "door_as_g" //this will be applied to the icon_state with the correct state number at the proc's end.
|
||||
if(/obj/item/stack/sheet/gold)
|
||||
if(G.amount>=2)
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] adds [G.name] to the airlock assembly.", "You start to install [G.name] into the airlock assembly.")
|
||||
if(do_after(user, 40))
|
||||
user << "\blue You installed gold plating into the airlock assembly!"
|
||||
G.use(2)
|
||||
src.mineral = "gold"
|
||||
src.name = "Near finished Gold Airlock Assembly"
|
||||
src.airlock_type = /obj/machinery/door/airlock/gold
|
||||
src.base_icon_state = "door_as_gold"
|
||||
if(/obj/item/stack/sheet/silver)
|
||||
if(G.amount>=2)
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] adds [G.name] to the airlock assembly.", "You start to install [G.name] into the airlock assembly.")
|
||||
if(do_after(user, 40))
|
||||
user << "\blue You installed silver plating into the airlock assembly!"
|
||||
G.use(2)
|
||||
src.mineral = "silver"
|
||||
src.name = "Near finished Silver Airlock Assembly"
|
||||
src.airlock_type = /obj/machinery/door/airlock/silver
|
||||
src.base_icon_state = "door_as_silver"
|
||||
if(/obj/item/stack/sheet/diamond)
|
||||
if(G.amount>=2)
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] adds [G.name] to the airlock assembly.", "You start to install [G.name] into the airlock assembly.")
|
||||
if(do_after(user, 40))
|
||||
user << "\blue You installed diamond plating into the airlock assembly!"
|
||||
G.use(2)
|
||||
src.mineral = "diamond"
|
||||
src.name = "Near finished Diamond Airlock Assembly"
|
||||
src.airlock_type = /obj/machinery/door/airlock/diamond
|
||||
src.base_icon_state = "door_as_diamond"
|
||||
if(/obj/item/stack/sheet/uranium)
|
||||
if(G.amount>=2)
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] adds [G.name] to the airlock assembly.", "You start to install [G.name] into the airlock assembly.")
|
||||
if(do_after(user, 40))
|
||||
user << "\blue You installed uranium plating into the airlock assembly!"
|
||||
G.use(2)
|
||||
src.mineral = "uranium"
|
||||
src.name = "Near finished Uranium Airlock Assembly"
|
||||
src.airlock_type = /obj/machinery/door/airlock/uranium
|
||||
src.base_icon_state = "door_as_uranium"
|
||||
if(/obj/item/stack/sheet/plasma)
|
||||
if(G.amount>=2)
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] adds [G.name] to the airlock assembly.", "You start to install [G.name] into the airlock assembly.")
|
||||
if(do_after(user, 40))
|
||||
user << "\blue You installed plasma plating into the airlock assembly!"
|
||||
G.use(2)
|
||||
src.mineral = "plasma"
|
||||
src.name = "Near finished Plasma Airlock Assembly"
|
||||
src.airlock_type = /obj/machinery/door/airlock/plasma
|
||||
src.base_icon_state = "door_as_plasma"
|
||||
if(/obj/item/stack/sheet/clown)
|
||||
if(G.amount>=2)
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] adds [G.name] to the airlock assembly.", "You start to install [G.name] into the airlock assembly.")
|
||||
if(do_after(user, 40))
|
||||
user << "\blue You installed bananium plating into the airlock assembly!"
|
||||
G.use(2)
|
||||
playsound(src.loc, 'sound/items/bikehorn.ogg', 15, 1, -3)
|
||||
src.mineral = "clown"
|
||||
src.name = "Near finished Bananium Airlock Assembly"
|
||||
src.airlock_type = /obj/machinery/door/airlock/clown
|
||||
src.base_icon_state = "door_as_clown"
|
||||
if(/obj/item/stack/sheet/sandstone)
|
||||
if(G.amount>=2)
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] adds [G.name] to the airlock assembly.", "You start to install [G.name] into the airlock assembly.")
|
||||
if(do_after(user, 40))
|
||||
user << "\blue You installed sandstone plating into the airlock assembly!"
|
||||
G.use(2)
|
||||
src.mineral = "sandstone"
|
||||
src.name = "Near finished Sandstone Airlock Assembly"
|
||||
src.airlock_type = /obj/machinery/door/airlock/sandstone
|
||||
src.base_icon_state = "door_as_sandstone"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user << "\blue Now finishing the airlock."
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You finish the airlock!"
|
||||
var/obj/machinery/door/airlock/door
|
||||
switch(mineral)
|
||||
if("glass")
|
||||
airlock_type = /obj/machinery/door/airlock/glass
|
||||
door = new src.airlock_type( src.loc )
|
||||
if("gold")
|
||||
airlock_type = /obj/machinery/door/airlock/gold
|
||||
door = new src.airlock_type( src.loc )
|
||||
if("silver")
|
||||
airlock_type = /obj/machinery/door/airlock/silver
|
||||
door = new src.airlock_type( src.loc )
|
||||
if("diamond")
|
||||
airlock_type = /obj/machinery/door/airlock/diamond
|
||||
door = new src.airlock_type( src.loc )
|
||||
if("uranium")
|
||||
airlock_type = /obj/machinery/door/airlock/uranium
|
||||
door = new src.airlock_type( src.loc )
|
||||
if("plasma")
|
||||
airlock_type = /obj/machinery/door/airlock/plasma
|
||||
door = new src.airlock_type( src.loc )
|
||||
if("clown")
|
||||
airlock_type = /obj/machinery/door/airlock/clown
|
||||
door = new src.airlock_type( src.loc )
|
||||
if("sandstone")
|
||||
airlock_type = /obj/machinery/door/airlock/sandstone
|
||||
door = new src.airlock_type( src.loc )
|
||||
else
|
||||
door = new src.airlock_type( src.loc )
|
||||
//door.req_access = src.req_access
|
||||
door.electronics = src.electronics
|
||||
door.req_access = src.electronics.conf_access
|
||||
src.electronics.loc = door
|
||||
del(src)
|
||||
else
|
||||
..()
|
||||
icon_state = "[base_icon_state][state]"
|
||||
//This updates the icon_state. They are named as "door_as1_eng" where the 1 in that example
|
||||
//represents what state it's in. So the most generic algorithm for the correct updating of
|
||||
//this is simply to change the number.
|
||||
@@ -0,0 +1,77 @@
|
||||
/obj/structure/stool/bed/chair/e_chair
|
||||
name = "electric chair"
|
||||
desc = "Looks absolutely SHOCKING!"
|
||||
icon_state = "echair0"
|
||||
var/on = 0
|
||||
var/obj/item/assembly/shock_kit/part = null
|
||||
var/last_time = 1.0
|
||||
|
||||
/obj/structure/stool/bed/chair/e_chair/New()
|
||||
overlays += image('icons/obj/objects.dmi', src, "echair_over", MOB_LAYER + 1, dir)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
var/obj/structure/stool/bed/chair/C = new /obj/structure/stool/bed/chair(src.loc)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
C.dir = src.dir
|
||||
src.part.loc = src.loc
|
||||
src.part.master = null
|
||||
src.part = null
|
||||
del(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/e_chair/verb/toggle()
|
||||
set name = "Toggle Electric Chair"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(on)
|
||||
on = 0
|
||||
icon_state = "echair0"
|
||||
else
|
||||
on = 1
|
||||
icon_state = "echair1"
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/e_chair/rotate()
|
||||
..()
|
||||
overlays = null
|
||||
overlays += image('icons/obj/objects.dmi', src, "echair_over", MOB_LAYER + 1, dir) //there's probably a better way of handling this, but eh. -Pete
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/e_chair/proc/shock()
|
||||
if(!(src.on))
|
||||
return
|
||||
if((src.last_time + 50) > world.time)
|
||||
return
|
||||
src.last_time = world.time
|
||||
|
||||
// special power handling
|
||||
var/area/A = get_area(src)
|
||||
if(!isarea(A))
|
||||
return
|
||||
if(!A.powered(EQUIP))
|
||||
return
|
||||
A.use_power(EQUIP, 5000)
|
||||
var/light = A.power_light
|
||||
A.updateicon()
|
||||
|
||||
flick("echair1", src)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(12, 1, src)
|
||||
s.start()
|
||||
if(buckled_mob)
|
||||
buckled_mob.burn_skin(85)
|
||||
buckled_mob << "\red <B>You feel a deep shock course through your body!</B>"
|
||||
sleep(1)
|
||||
buckled_mob.burn_skin(85)
|
||||
buckled_mob.Stun(600)
|
||||
for(var/mob/M in hearers(src, null))
|
||||
M.show_message("\red The electric chair went off!.", 3, "\red You hear a deep sharp shock.", 2)
|
||||
|
||||
A.power_light = light
|
||||
A.updateicon()
|
||||
return
|
||||
@@ -0,0 +1,214 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/obj/structure/grille
|
||||
desc = "A piece of metal with evenly spaced gridlike holes in it. Blocks large object but lets small items, gas, or energy beams through. Strangely enough these grilles also lets meteors pass through them, whether they be small or huge station breaking death stones."
|
||||
name = "grille"
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "grille"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
flags = FPRINT | CONDUCT
|
||||
pressure_resistance = 5*ONE_ATMOSPHERE
|
||||
layer = 2.9
|
||||
var/health = 10
|
||||
var/destroyed = 0
|
||||
proc
|
||||
healthcheck()
|
||||
shock(mob/user, prb)
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if(prob(50))
|
||||
del(src)
|
||||
return
|
||||
if(3.0)
|
||||
if(prob(25))
|
||||
src.health -= 11
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
|
||||
blob_act()
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
meteorhit(var/obj/M)
|
||||
if (M.icon_state == "flaming")
|
||||
src.health -= 2
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
|
||||
attack_hand(var/mob/user)
|
||||
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
user.visible_message("[user.name] kicks the [src.name].", \
|
||||
"You kick the [src.name].", \
|
||||
"You hear a noise")
|
||||
if((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
|
||||
src.health -= 5
|
||||
else if(!shock(user, 70))
|
||||
src.health -= 3
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
|
||||
attack_paw(var/mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
|
||||
attack_alien(var/mob/user)
|
||||
if (istype(usr, /mob/living/carbon/alien/larva)) return
|
||||
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
user.visible_message("[user.name] mangles the [src.name].", \
|
||||
"You mangle the [src.name].", \
|
||||
"You hear a noise")
|
||||
if(!shock(usr, 70))
|
||||
src.health -= 5
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
attack_metroid(var/mob/user)
|
||||
if(!istype(usr, /mob/living/carbon/metroid/adult)) return
|
||||
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
user.visible_message("[user.name] smashes against the [src.name].", \
|
||||
"You smash against the [src.name].", \
|
||||
"You hear a noise")
|
||||
src.health -= rand(2,3)
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
attack_animal(var/mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0) return
|
||||
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
M.visible_message("[M.name] smashes against the [src.name].", \
|
||||
"You smash against the [src.name].", \
|
||||
"You hear a noise")
|
||||
src.health -= M.melee_damage_upper
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
if(istype(mover) && mover.checkpass(PASSGRILLE))
|
||||
return 1
|
||||
else
|
||||
if (istype(mover, /obj/item/projectile))
|
||||
return prob(30)
|
||||
else
|
||||
return !src.density
|
||||
|
||||
|
||||
attackby(obj/item/weapon/W, mob/user)
|
||||
if(iswirecutter(W))
|
||||
if(!shock(user, 100))
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
src.health = 0
|
||||
if(!destroyed)
|
||||
src.health = -100
|
||||
else if ((isscrewdriver(W)) && (istype(src.loc, /turf/simulated) || src.anchored))
|
||||
if(!shock(user, 90))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
src.anchored = !( src.anchored )
|
||||
user << (src.anchored ? "You have fastened the grille to the floor." : "You have unfastened the grill.")
|
||||
for(var/mob/O in oviewers())
|
||||
O << text("\red [user] [src.anchored ? "fastens" : "unfastens"] the grille.")
|
||||
return
|
||||
else if( istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass) )
|
||||
var/dir_to_set = 1
|
||||
if(src.loc == usr.loc)
|
||||
dir_to_set = usr.dir
|
||||
else
|
||||
if( ( src.x == usr.x ) || (src.y == usr.y) ) //Only supposed to work for cardinal directions.
|
||||
if( src.x == usr.x )
|
||||
if( src.y > usr.y )
|
||||
dir_to_set = 2
|
||||
else
|
||||
dir_to_set = 1
|
||||
else if( src.y == usr.y )
|
||||
if( src.x > usr.x )
|
||||
dir_to_set = 8
|
||||
else
|
||||
dir_to_set = 4
|
||||
else
|
||||
usr << "\red You can't reach there.."
|
||||
return //Only works for cardinal direcitons, diagonals aren't supposed to work like this.
|
||||
for(var/obj/structure/window/WINDOW in src.loc)
|
||||
if(WINDOW.dir == dir_to_set)
|
||||
usr << "\red There is already a window facing this way there."
|
||||
return
|
||||
usr << "\blue You start placing the window"
|
||||
if(do_after(user,20))
|
||||
if(!src) return //Grille destroyed while waiting
|
||||
for(var/obj/structure/window/WINDOW in src.loc)
|
||||
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
|
||||
usr << "\red There is already a window facing this way there."
|
||||
return
|
||||
var/obj/structure/window/WD
|
||||
if(istype(W,/obj/item/stack/sheet/rglass))
|
||||
WD = new/obj/structure/window(src.loc,1) //reinforced window
|
||||
else
|
||||
WD = new/obj/structure/window(src.loc,0) //normal window
|
||||
WD.dir = dir_to_set
|
||||
WD.ini_dir = dir_to_set
|
||||
WD.anchored = 0
|
||||
WD.state = 0
|
||||
var/obj/item/stack/ST = W
|
||||
ST.use(1)
|
||||
usr << "\blue You place the [WD] on the [src]"
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/shard))
|
||||
src.health -= W.force * 0.1
|
||||
else if(!shock(user, 70))
|
||||
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
switch(W.damtype)
|
||||
if("fire")
|
||||
src.health -= W.force
|
||||
if("brute")
|
||||
src.health -= W.force * 0.1
|
||||
src.healthcheck()
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
healthcheck()
|
||||
if (src.health <= 0)
|
||||
if (!( src.destroyed ))
|
||||
src.icon_state = "brokengrille"
|
||||
src.density = 0
|
||||
src.destroyed = 1
|
||||
new /obj/item/stack/rods( src.loc )
|
||||
|
||||
else
|
||||
if (src.health <= -10.0)
|
||||
new /obj/item/stack/rods( src.loc )
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
return
|
||||
|
||||
// shock user with probability prb (if all connections & power are working)
|
||||
// returns 1 if shocked, 0 otherwise
|
||||
|
||||
shock(mob/user, prb)
|
||||
if(!anchored || destroyed) // anchored/destroyed grilles are never connected
|
||||
return 0
|
||||
if(!prob(prb))
|
||||
return 0
|
||||
if(!in_range(src, usr))//To prevent TK and mech users from getting shocked
|
||||
return 0
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/structure/cable/C = T.get_cable_node()
|
||||
if(C)
|
||||
if (electrocute_mob(user, C, src))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
return 0
|
||||
@@ -0,0 +1,69 @@
|
||||
//////Kitchen Spike
|
||||
|
||||
/obj/structure/kitchenspike
|
||||
attack_paw(mob/user as mob)
|
||||
return src.attack_hand(usr)
|
||||
|
||||
attackby(obj/item/weapon/grab/G as obj, mob/user as mob)
|
||||
if(!istype(G, /obj/item/weapon/grab))
|
||||
return
|
||||
if(istype(G.affecting, /mob/living/carbon/monkey))
|
||||
if(src.occupied == 0)
|
||||
src.icon_state = "spikebloody"
|
||||
src.occupied = 1
|
||||
src.meat = 5
|
||||
src.meattype = 1
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red [user] has forced [G.affecting] onto the spike, killing them instantly!"))
|
||||
del(G.affecting)
|
||||
del(G)
|
||||
|
||||
else
|
||||
user << "\red The spike already has something on it, finish collecting its meat first!"
|
||||
else if(istype(G.affecting, /mob/living/carbon/alien))
|
||||
if(src.occupied == 0)
|
||||
src.icon_state = "spikebloodygreen"
|
||||
src.occupied = 1
|
||||
src.meat = 5
|
||||
src.meattype = 2
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red [user] has forced [G.affecting] onto the spike, killing them instantly!"))
|
||||
del(G.affecting)
|
||||
del(G)
|
||||
else
|
||||
user << "\red The spike already has something on it, finish collecting its meat first!"
|
||||
else
|
||||
user << "\red They are too big for the spike, try something smaller!"
|
||||
return
|
||||
|
||||
// MouseDrop_T(var/atom/movable/C, mob/user)
|
||||
// if(istype(C, /obj/mob/carbon/monkey)
|
||||
// else if(istype(C, /obj/mob/carbon/alien) && !istype(C, /mob/living/carbon/alien/larva/metroid))
|
||||
// else if(istype(C, /obj/livestock/spesscarp
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
if(src.occupied)
|
||||
if(src.meattype == 1)
|
||||
if(src.meat > 1)
|
||||
src.meat--
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey( src.loc )
|
||||
usr << "You remove some meat from the monkey."
|
||||
else if(src.meat == 1)
|
||||
src.meat--
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey(src.loc)
|
||||
usr << "You remove the last piece of meat from the monkey!"
|
||||
src.icon_state = "spike"
|
||||
src.occupied = 0
|
||||
else if(src.meattype == 2)
|
||||
if(src.meat > 1)
|
||||
src.meat--
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/xenomeat( src.loc )
|
||||
usr << "You remove some meat from the alien."
|
||||
else if(src.meat == 1)
|
||||
src.meat--
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/xenomeat(src.loc)
|
||||
usr << "You remove the last piece of meat from the alien!"
|
||||
src.icon_state = "spike"
|
||||
src.occupied = 0
|
||||
@@ -0,0 +1,73 @@
|
||||
/obj/structure/ladder
|
||||
name = "ladder"
|
||||
desc = "A sturdy metal ladder."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "ladder11"
|
||||
var/id = null
|
||||
var/height = 0 //the 'height' of the ladder. higher numbers are considered physically higher
|
||||
var/obj/structure/ladder/down = null //the ladder below this one
|
||||
var/obj/structure/ladder/up = null //the ladder above this one
|
||||
|
||||
/obj/structure/ladder/New()
|
||||
spawn(8)
|
||||
for(var/obj/structure/ladder/L in world)
|
||||
if(L.id == id)
|
||||
if(L.height == (height - 1))
|
||||
down = L
|
||||
continue
|
||||
if(L.height == (height + 1))
|
||||
up = L
|
||||
continue
|
||||
|
||||
if(up && down) //if both our connections are filled
|
||||
break
|
||||
update_icon()
|
||||
|
||||
/obj/structure/ladder/update_icon()
|
||||
if(up && down)
|
||||
icon_state = "ladder11"
|
||||
|
||||
else if(up)
|
||||
icon_state = "ladder10"
|
||||
|
||||
else if(down)
|
||||
icon_state = "ladder01"
|
||||
|
||||
else //wtf make your ladders properly assholes
|
||||
icon_state = "ladder00"
|
||||
|
||||
/obj/structure/ladder/attack_hand(mob/user as mob)
|
||||
if(up && down)
|
||||
switch( alert("Go up or down the ladder?", "Ladder", "Up", "Down", "Cancel") )
|
||||
if("Up")
|
||||
user.visible_message("<span class='notice'>[user] climbs up \the [src]!</span>", \
|
||||
"<span class='notice'>You climb up \the [src]!</span>")
|
||||
user.loc = get_turf(up)
|
||||
up.add_fingerprint(user)
|
||||
if("Down")
|
||||
user.visible_message("<span class='notice'>[user] climbs down \the [src]!</span>", \
|
||||
"<span class='notice'>You climb down \the [src]!</span>")
|
||||
user.loc = get_turf(down)
|
||||
down.add_fingerprint(user)
|
||||
if("Cancel")
|
||||
return
|
||||
|
||||
else if(up)
|
||||
user.visible_message("<span class='notice'>[user] climbs up \the [src]!</span>", \
|
||||
"<span class='notice'>You climb up \the [src]!</span>")
|
||||
user.loc = get_turf(up)
|
||||
up.add_fingerprint(user)
|
||||
|
||||
else if(down)
|
||||
user.visible_message("<span class='notice'>[user] climbs down \the [src]!</span>", \
|
||||
"<span class='notice'>You climb down \the [src]!</span>")
|
||||
user.loc = get_turf(down)
|
||||
down.add_fingerprint(user)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/ladder/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/ladder/attackby(obj/item/weapon/W, mob/user as mob)
|
||||
return attack_hand(user)
|
||||
@@ -0,0 +1,97 @@
|
||||
/obj/structure/lamarr
|
||||
name = "Lab Cage"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "labcage1"
|
||||
desc = "A glass lab container for storing interesting creatures."
|
||||
density = 1
|
||||
anchored = 1
|
||||
unacidable = 1//Dissolving the case would also delete Lamarr
|
||||
var/health = 30
|
||||
var/occupied = 1
|
||||
var/destroyed = 0
|
||||
|
||||
/obj/structure/lamarr/ex_act(severity)
|
||||
switch(severity)
|
||||
if (1)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
Break()
|
||||
del(src)
|
||||
if (2)
|
||||
if (prob(50))
|
||||
src.health -= 15
|
||||
src.healthcheck()
|
||||
if (3)
|
||||
if (prob(50))
|
||||
src.health -= 5
|
||||
src.healthcheck()
|
||||
|
||||
|
||||
/obj/structure/lamarr/bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
..()
|
||||
src.healthcheck()
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/lamarr/blob_act()
|
||||
if (prob(75))
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
Break()
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/structure/lamarr/meteorhit(obj/O as obj)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
Break()
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/structure/lamarr/proc/healthcheck()
|
||||
if (src.health <= 0)
|
||||
if (!( src.destroyed ))
|
||||
src.density = 0
|
||||
src.destroyed = 1
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
playsound(src, "shatter", 70, 1)
|
||||
Break()
|
||||
else
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
return
|
||||
|
||||
/obj/structure/lamarr/update_icon()
|
||||
if(src.destroyed)
|
||||
src.icon_state = "labcageb[src.occupied]"
|
||||
else
|
||||
src.icon_state = "labcage[src.occupied]"
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/lamarr/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
src.health -= W.force
|
||||
src.healthcheck()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/lamarr/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/structure/lamarr/attack_hand(mob/user as mob)
|
||||
if (src.destroyed)
|
||||
return
|
||||
else
|
||||
usr << text("\blue You kick the lab cage.")
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\red [] kicks the lab cage.", usr)
|
||||
src.health -= 2
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/structure/lamarr/proc/Break()
|
||||
if(occupied)
|
||||
var/obj/item/clothing/mask/facehugger/A = new /obj/item/clothing/mask/facehugger( src.loc )
|
||||
A.sterile = 1
|
||||
A.name = "Lamarr"
|
||||
occupied = 0
|
||||
update_icon()
|
||||
return
|
||||
@@ -0,0 +1,295 @@
|
||||
//NOT using the existing /obj/machinery/door type, since that has some complications on its own, mainly based on its
|
||||
//machineryness
|
||||
|
||||
/obj/structure/mineral_door
|
||||
name = "mineral door"
|
||||
density = 1
|
||||
anchored = 1
|
||||
opacity = 1
|
||||
|
||||
icon = 'icons/obj/doors/mineral_doors.dmi'
|
||||
icon_state = "metal"
|
||||
|
||||
var/mineralType = "metal"
|
||||
var/state = 0 //closed, 1 == open
|
||||
var/isSwitchingStates = 0
|
||||
var/hardness = 1
|
||||
var/oreAmount = 7
|
||||
|
||||
New(location)
|
||||
..()
|
||||
icon_state = mineralType
|
||||
name = "[mineralType] door"
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
Del()
|
||||
update_nearby_tiles()
|
||||
..()
|
||||
|
||||
Bumped(atom/user)
|
||||
..()
|
||||
if(!state)
|
||||
return TryToSwitchState(user)
|
||||
return
|
||||
|
||||
attack_ai(mob/user as mob) //those aren't machinery, they're just big fucking slabs of a mineral
|
||||
if(isAI(user)) //so the AI can't open it
|
||||
return
|
||||
else if(isrobot(user)) //but cyborgs can
|
||||
if(get_dist(user,src) <= 1) //not remotely though
|
||||
return TryToSwitchState(user)
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group) return 0
|
||||
if(istype(mover, /obj/effect/beam))
|
||||
return !opacity
|
||||
return !density
|
||||
|
||||
proc/TryToSwitchState(atom/user)
|
||||
if(isSwitchingStates) return
|
||||
if(ismob(user))
|
||||
var/mob/M = user
|
||||
if(world.time - user.last_bumped <= 60) return //NOTE do we really need that?
|
||||
if(M.client && !M:handcuffed)
|
||||
SwitchState()
|
||||
else if(istype(user, /obj/mecha))
|
||||
SwitchState()
|
||||
|
||||
proc/SwitchState()
|
||||
if(state)
|
||||
Close()
|
||||
else
|
||||
Open()
|
||||
|
||||
proc/Open()
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 100, 1)
|
||||
flick("[mineralType]opening",src)
|
||||
sleep(10)
|
||||
density = 0
|
||||
opacity = 0
|
||||
state = 1
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
proc/Close()
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 100, 1)
|
||||
flick("[mineralType]closing",src)
|
||||
sleep(10)
|
||||
density = 1
|
||||
opacity = 1
|
||||
state = 0
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
update_icon()
|
||||
if(state)
|
||||
icon_state = "[mineralType]open"
|
||||
else
|
||||
icon_state = mineralType
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/pickaxe))
|
||||
var/obj/item/weapon/pickaxe/digTool = W
|
||||
user << "You start digging the [name]."
|
||||
if(do_after(user,digTool.digspeed*hardness) && src)
|
||||
user << "You finished digging."
|
||||
Dismantle()
|
||||
else if(istype(W,/obj/item/weapon)) //not sure, can't not just weapons get passed to this proc?
|
||||
hardness -= W.force/100
|
||||
user << "You hit the [name] with your [W.name]!"
|
||||
CheckHardness()
|
||||
else
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
proc/CheckHardness()
|
||||
if(hardness <= 0)
|
||||
Dismantle(1)
|
||||
|
||||
proc/Dismantle(devastated = 0)
|
||||
if(!devastated)
|
||||
var/ore = text2path("/obj/item/stack/sheet/[mineralType]")
|
||||
for(var/i = 1, i <= oreAmount, i++)
|
||||
new ore(get_turf(src))
|
||||
else
|
||||
var/ore = text2path("/obj/item/stack/sheet/[mineralType]")
|
||||
for(var/i = 3, i <= oreAmount, i++)
|
||||
new ore(get_turf(src))
|
||||
del(src)
|
||||
|
||||
ex_act(severity = 1)
|
||||
switch(severity)
|
||||
if(1)
|
||||
Dismantle(1)
|
||||
if(2)
|
||||
if(prob(20))
|
||||
Dismantle(1)
|
||||
else
|
||||
hardness--
|
||||
CheckHardness()
|
||||
if(3)
|
||||
hardness -= 0.1
|
||||
CheckHardness()
|
||||
return
|
||||
|
||||
proc/update_nearby_tiles(need_rebuild) //Copypasta from airlock code
|
||||
if(!air_master) return 0
|
||||
|
||||
var/turf/simulated/source = loc
|
||||
var/turf/simulated/north = get_step(source,NORTH)
|
||||
var/turf/simulated/south = get_step(source,SOUTH)
|
||||
var/turf/simulated/east = get_step(source,EAST)
|
||||
var/turf/simulated/west = get_step(source,WEST)
|
||||
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(north)) air_master.tiles_to_update += north
|
||||
if(istype(south)) air_master.tiles_to_update += south
|
||||
if(istype(east)) air_master.tiles_to_update += east
|
||||
if(istype(west)) air_master.tiles_to_update += west
|
||||
|
||||
return 1
|
||||
|
||||
/obj/structure/mineral_door/iron
|
||||
mineralType = "metal"
|
||||
hardness = 3
|
||||
|
||||
/obj/structure/mineral_door/silver
|
||||
mineralType = "silver"
|
||||
hardness = 3
|
||||
|
||||
/obj/structure/mineral_door/gold
|
||||
mineralType = "gold"
|
||||
|
||||
/obj/structure/mineral_door/uranium
|
||||
mineralType = "uranium"
|
||||
hardness = 3
|
||||
|
||||
New()
|
||||
..()
|
||||
sd_SetLuminosity(3)
|
||||
|
||||
/obj/structure/mineral_door/sandstone
|
||||
mineralType = "sandstone"
|
||||
hardness = 0.5
|
||||
|
||||
/obj/structure/mineral_door/transparent
|
||||
opacity = 0
|
||||
|
||||
Close()
|
||||
..()
|
||||
opacity = 0
|
||||
|
||||
/obj/structure/mineral_door/transparent/plasma
|
||||
mineralType = "plasma"
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
TemperatureAct(100)
|
||||
..()
|
||||
|
||||
temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
TemperatureAct(exposed_temperature)
|
||||
|
||||
//skytodo:
|
||||
proc/TemperatureAct(temperature)
|
||||
for(var/turf/simulated/floor/target_tile in range(2,loc))
|
||||
/*if(target_tile.parent && target_tile.parent.group_processing)
|
||||
target_tile.parent.suspend_group_processing()*/
|
||||
|
||||
var/datum/gas_mixture/napalm = new
|
||||
|
||||
var/toxinsToDeduce = temperature/10
|
||||
|
||||
napalm.toxins = toxinsToDeduce
|
||||
napalm.temperature = 200+T0C
|
||||
|
||||
target_tile.assume_air(napalm)
|
||||
spawn (0) target_tile.hotspot_expose(temperature, 400)
|
||||
|
||||
hardness -= toxinsToDeduce/100
|
||||
CheckHardness()
|
||||
|
||||
/obj/structure/mineral_door/transparent/diamond
|
||||
mineralType = "diamond"
|
||||
hardness = 10
|
||||
|
||||
/obj/structure/mineral_door/wood
|
||||
mineralType = "wood"
|
||||
hardness = 1
|
||||
|
||||
Open()
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, 'sound/effects/doorcreaky.ogg', 100, 1)
|
||||
flick("[mineralType]opening",src)
|
||||
sleep(10)
|
||||
density = 0
|
||||
opacity = 0
|
||||
state = 1
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
Close()
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, 'sound/effects/doorcreaky.ogg', 100, 1)
|
||||
flick("[mineralType]closing",src)
|
||||
sleep(10)
|
||||
density = 1
|
||||
opacity = 1
|
||||
state = 0
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
Dismantle(devastated = 0)
|
||||
if(!devastated)
|
||||
for(var/i = 1, i <= oreAmount, i++)
|
||||
new/obj/item/stack/sheet/wood(get_turf(src))
|
||||
del(src)
|
||||
|
||||
/obj/structure/mineral_door/resin
|
||||
mineralType = "resin"
|
||||
hardness = 5
|
||||
var/close_delay = 100
|
||||
|
||||
TryToSwitchState(atom/user)
|
||||
if(isalien(user))
|
||||
return ..()
|
||||
|
||||
Open()
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
flick("[mineralType]opening",src)
|
||||
sleep(10)
|
||||
density = 0
|
||||
opacity = 0
|
||||
state = 1
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
spawn(close_delay)
|
||||
if(!isSwitchingStates && state == 1)
|
||||
Close()
|
||||
|
||||
Close()
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
flick("[mineralType]closing",src)
|
||||
sleep(10)
|
||||
density = 1
|
||||
opacity = 1
|
||||
state = 0
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
Dismantle(devastated = 0)
|
||||
del(src)
|
||||
@@ -0,0 +1,32 @@
|
||||
//wip wip wup
|
||||
/obj/structure/mirror
|
||||
name = "mirror"
|
||||
desc = "Mirror mirror on the wall, who's the most robust of them all?"
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "mirror"
|
||||
density = 0
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/mirror/attack_hand(mob/user as mob)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
var/userloc = H.loc
|
||||
|
||||
//see code/modules/mob/new_player/preferences.dm at approx line 545 for comments!
|
||||
//this is largely copypasted from there.
|
||||
|
||||
//handle facial hair (if necessary)
|
||||
if(H.gender == MALE)
|
||||
var/new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in facial_hair_styles_list
|
||||
if(userloc != H.loc) return //no tele-grooming
|
||||
if(new_style)
|
||||
H.f_style = new_style
|
||||
|
||||
//handle normal hair
|
||||
var/new_style = input(user, "Select a hair style", "Grooming") as null|anything in hair_styles_list
|
||||
if(userloc != H.loc) return //no tele-grooming
|
||||
if(new_style)
|
||||
H.h_style = new_style
|
||||
|
||||
H.update_hair()
|
||||
@@ -0,0 +1,34 @@
|
||||
/obj/structure/mopbucket/New()
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
|
||||
/obj/structure/mopbucket/examine()
|
||||
set src in usr
|
||||
usr << text("\icon[] [] contains [] units of water left!", src, src.name, src.reagents.total_volume)
|
||||
..()
|
||||
|
||||
/obj/structure/mopbucket/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/mop))
|
||||
if (src.reagents.total_volume >= 2)
|
||||
src.reagents.trans_to(W, 2)
|
||||
user << "\blue You wet the mop"
|
||||
playsound(src.loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
if (src.reagents.total_volume < 1)
|
||||
user << "\blue Out of water!"
|
||||
return
|
||||
|
||||
/obj/structure/mopbucket/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
del(src)
|
||||
return
|
||||
@@ -0,0 +1,587 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/datum/song
|
||||
var/name = "Untitled"
|
||||
var/list/lines = new()
|
||||
var/tempo = 5
|
||||
|
||||
/obj/structure/device/piano
|
||||
name = "space minimoog"
|
||||
icon = 'icons/obj/musician.dmi'
|
||||
icon_state = "minimoog"
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/datum/song/song
|
||||
var/playing = 0
|
||||
var/help = 0
|
||||
var/edit = 1
|
||||
var/repeat = 0
|
||||
|
||||
proc
|
||||
playnote(var/note as text)
|
||||
//world << "Note: [note]"
|
||||
var/soundfile
|
||||
/*BYOND loads resource files at compile time if they are ''. This means you can't really manipulate them dynamically.
|
||||
Tried doing it dynamically at first but its more trouble than its worth. Would have saved many lines tho.*/
|
||||
switch(note)
|
||||
if("Cn1")
|
||||
soundfile = 'sound/piano/Cn1.ogg'
|
||||
if("C#1")
|
||||
soundfile = 'sound/piano/C#1.ogg'
|
||||
if("Db1")
|
||||
soundfile = 'sound/piano/Db1.ogg'
|
||||
if("Dn1")
|
||||
soundfile = 'sound/piano/Dn1.ogg'
|
||||
if("D#1")
|
||||
soundfile = 'sound/piano/D#1.ogg'
|
||||
if("Eb1")
|
||||
soundfile = 'sound/piano/Eb1.ogg'
|
||||
if("En1")
|
||||
soundfile = 'sound/piano/En1.ogg'
|
||||
if("E#1")
|
||||
soundfile = 'sound/piano/E#1.ogg'
|
||||
if("Fb1")
|
||||
soundfile = 'sound/piano/Fb1.ogg'
|
||||
if("Fn1")
|
||||
soundfile = 'sound/piano/Fn1.ogg'
|
||||
if("F#1")
|
||||
soundfile = 'sound/piano/F#1.ogg'
|
||||
if("Gb1")
|
||||
soundfile = 'sound/piano/Gb1.ogg'
|
||||
if("Gn1")
|
||||
soundfile = 'sound/piano/Gn1.ogg'
|
||||
if("G#1")
|
||||
soundfile = 'sound/piano/G#1.ogg'
|
||||
if("Ab1")
|
||||
soundfile = 'sound/piano/Ab1.ogg'
|
||||
if("An1")
|
||||
soundfile = 'sound/piano/An1.ogg'
|
||||
if("A#1")
|
||||
soundfile = 'sound/piano/A#1.ogg'
|
||||
if("Bb1")
|
||||
soundfile = 'sound/piano/Bb1.ogg'
|
||||
if("Bn1")
|
||||
soundfile = 'sound/piano/Bn1.ogg'
|
||||
if("B#1")
|
||||
soundfile = 'sound/piano/B#1.ogg'
|
||||
if("Cb2")
|
||||
soundfile = 'sound/piano/Cb2.ogg'
|
||||
if("Cn2")
|
||||
soundfile = 'sound/piano/Cn2.ogg'
|
||||
if("C#2")
|
||||
soundfile = 'sound/piano/C#2.ogg'
|
||||
if("Db2")
|
||||
soundfile = 'sound/piano/Db2.ogg'
|
||||
if("Dn2")
|
||||
soundfile = 'sound/piano/Dn2.ogg'
|
||||
if("D#2")
|
||||
soundfile = 'sound/piano/D#2.ogg'
|
||||
if("Eb2")
|
||||
soundfile = 'sound/piano/Eb2.ogg'
|
||||
if("En2")
|
||||
soundfile = 'sound/piano/En2.ogg'
|
||||
if("E#2")
|
||||
soundfile = 'sound/piano/E#2.ogg'
|
||||
if("Fb2")
|
||||
soundfile = 'sound/piano/Fb2.ogg'
|
||||
if("Fn2")
|
||||
soundfile = 'sound/piano/Fn2.ogg'
|
||||
if("F#2")
|
||||
soundfile = 'sound/piano/F#2.ogg'
|
||||
if("Gb2")
|
||||
soundfile = 'sound/piano/Gb2.ogg'
|
||||
if("Gn2")
|
||||
soundfile = 'sound/piano/Gn2.ogg'
|
||||
if("G#2")
|
||||
soundfile = 'sound/piano/G#2.ogg'
|
||||
if("Ab2")
|
||||
soundfile = 'sound/piano/Ab2.ogg'
|
||||
if("An2")
|
||||
soundfile = 'sound/piano/An2.ogg'
|
||||
if("A#2")
|
||||
soundfile = 'sound/piano/A#2.ogg'
|
||||
if("Bb2")
|
||||
soundfile = 'sound/piano/Bb2.ogg'
|
||||
if("Bn2")
|
||||
soundfile = 'sound/piano/Bn2.ogg'
|
||||
if("B#2")
|
||||
soundfile = 'sound/piano/B#2.ogg'
|
||||
if("Cb3")
|
||||
soundfile = 'sound/piano/Cb3.ogg'
|
||||
if("Cn3")
|
||||
soundfile = 'sound/piano/Cn3.ogg'
|
||||
if("C#3")
|
||||
soundfile = 'sound/piano/C#3.ogg'
|
||||
if("Db3")
|
||||
soundfile = 'sound/piano/Db3.ogg'
|
||||
if("Dn3")
|
||||
soundfile = 'sound/piano/Dn3.ogg'
|
||||
if("D#3")
|
||||
soundfile = 'sound/piano/D#3.ogg'
|
||||
if("Eb3")
|
||||
soundfile = 'sound/piano/Eb3.ogg'
|
||||
if("En3")
|
||||
soundfile = 'sound/piano/En3.ogg'
|
||||
if("E#3")
|
||||
soundfile = 'sound/piano/E#3.ogg'
|
||||
if("Fb3")
|
||||
soundfile = 'sound/piano/Fb3.ogg'
|
||||
if("Fn3")
|
||||
soundfile = 'sound/piano/Fn3.ogg'
|
||||
if("F#3")
|
||||
soundfile = 'sound/piano/F#3.ogg'
|
||||
if("Gb3")
|
||||
soundfile = 'sound/piano/Gb3.ogg'
|
||||
if("Gn3")
|
||||
soundfile = 'sound/piano/Gn3.ogg'
|
||||
if("G#3")
|
||||
soundfile = 'sound/piano/G#3.ogg'
|
||||
if("Ab3")
|
||||
soundfile = 'sound/piano/Ab3.ogg'
|
||||
if("An3")
|
||||
soundfile = 'sound/piano/An3.ogg'
|
||||
if("A#3")
|
||||
soundfile = 'sound/piano/A#3.ogg'
|
||||
if("Bb3")
|
||||
soundfile = 'sound/piano/Bb3.ogg'
|
||||
if("Bn3")
|
||||
soundfile = 'sound/piano/Bn3.ogg'
|
||||
if("B#3")
|
||||
soundfile = 'sound/piano/B#3.ogg'
|
||||
if("Cb4")
|
||||
soundfile = 'sound/piano/Cb4.ogg'
|
||||
if("Cn4")
|
||||
soundfile = 'sound/piano/Cn4.ogg'
|
||||
if("C#4")
|
||||
soundfile = 'sound/piano/C#4.ogg'
|
||||
if("Db4")
|
||||
soundfile = 'sound/piano/Db4.ogg'
|
||||
if("Dn4")
|
||||
soundfile = 'sound/piano/Dn4.ogg'
|
||||
if("D#4")
|
||||
soundfile = 'sound/piano/D#4.ogg'
|
||||
if("Eb4")
|
||||
soundfile = 'sound/piano/Eb4.ogg'
|
||||
if("En4")
|
||||
soundfile = 'sound/piano/En4.ogg'
|
||||
if("E#4")
|
||||
soundfile = 'sound/piano/E#4.ogg'
|
||||
if("Fb4")
|
||||
soundfile = 'sound/piano/Fb4.ogg'
|
||||
if("Fn4")
|
||||
soundfile = 'sound/piano/Fn4.ogg'
|
||||
if("F#4")
|
||||
soundfile = 'sound/piano/F#4.ogg'
|
||||
if("Gb4")
|
||||
soundfile = 'sound/piano/Gb4.ogg'
|
||||
if("Gn4")
|
||||
soundfile = 'sound/piano/Gn4.ogg'
|
||||
if("G#4")
|
||||
soundfile = 'sound/piano/G#4.ogg'
|
||||
if("Ab4")
|
||||
soundfile = 'sound/piano/Ab4.ogg'
|
||||
if("An4")
|
||||
soundfile = 'sound/piano/An4.ogg'
|
||||
if("A#4")
|
||||
soundfile = 'sound/piano/A#4.ogg'
|
||||
if("Bb4")
|
||||
soundfile = 'sound/piano/Bb4.ogg'
|
||||
if("Bn4")
|
||||
soundfile = 'sound/piano/Bn4.ogg'
|
||||
if("B#4")
|
||||
soundfile = 'sound/piano/B#4.ogg'
|
||||
if("Cb5")
|
||||
soundfile = 'sound/piano/Cb5.ogg'
|
||||
if("Cn5")
|
||||
soundfile = 'sound/piano/Cn5.ogg'
|
||||
if("C#5")
|
||||
soundfile = 'sound/piano/C#5.ogg'
|
||||
if("Db5")
|
||||
soundfile = 'sound/piano/Db5.ogg'
|
||||
if("Dn5")
|
||||
soundfile = 'sound/piano/Dn5.ogg'
|
||||
if("D#5")
|
||||
soundfile = 'sound/piano/D#5.ogg'
|
||||
if("Eb5")
|
||||
soundfile = 'sound/piano/Eb5.ogg'
|
||||
if("En5")
|
||||
soundfile = 'sound/piano/En5.ogg'
|
||||
if("E#5")
|
||||
soundfile = 'sound/piano/E#5.ogg'
|
||||
if("Fb5")
|
||||
soundfile = 'sound/piano/Fb5.ogg'
|
||||
if("Fn5")
|
||||
soundfile = 'sound/piano/Fn5.ogg'
|
||||
if("F#5")
|
||||
soundfile = 'sound/piano/F#5.ogg'
|
||||
if("Gb5")
|
||||
soundfile = 'sound/piano/Gb5.ogg'
|
||||
if("Gn5")
|
||||
soundfile = 'sound/piano/Gn5.ogg'
|
||||
if("G#5")
|
||||
soundfile = 'sound/piano/G#5.ogg'
|
||||
if("Ab5")
|
||||
soundfile = 'sound/piano/Ab5.ogg'
|
||||
if("An5")
|
||||
soundfile = 'sound/piano/An5.ogg'
|
||||
if("A#5")
|
||||
soundfile = 'sound/piano/A#5.ogg'
|
||||
if("Bb5")
|
||||
soundfile = 'sound/piano/Bb5.ogg'
|
||||
if("Bn5")
|
||||
soundfile = 'sound/piano/Bn5.ogg'
|
||||
if("B#5")
|
||||
soundfile = 'sound/piano/B#5.ogg'
|
||||
if("Cb6")
|
||||
soundfile = 'sound/piano/Cb6.ogg'
|
||||
if("Cn6")
|
||||
soundfile = 'sound/piano/Cn6.ogg'
|
||||
if("C#6")
|
||||
soundfile = 'sound/piano/C#6.ogg'
|
||||
if("Db6")
|
||||
soundfile = 'sound/piano/Db6.ogg'
|
||||
if("Dn6")
|
||||
soundfile = 'sound/piano/Dn6.ogg'
|
||||
if("D#6")
|
||||
soundfile = 'sound/piano/D#6.ogg'
|
||||
if("Eb6")
|
||||
soundfile = 'sound/piano/Eb6.ogg'
|
||||
if("En6")
|
||||
soundfile = 'sound/piano/En6.ogg'
|
||||
if("E#6")
|
||||
soundfile = 'sound/piano/E#6.ogg'
|
||||
if("Fb6")
|
||||
soundfile = 'sound/piano/Fb6.ogg'
|
||||
if("Fn6")
|
||||
soundfile = 'sound/piano/Fn6.ogg'
|
||||
if("F#6")
|
||||
soundfile = 'sound/piano/F#6.ogg'
|
||||
if("Gb6")
|
||||
soundfile = 'sound/piano/Gb6.ogg'
|
||||
if("Gn6")
|
||||
soundfile = 'sound/piano/Gn6.ogg'
|
||||
if("G#6")
|
||||
soundfile = 'sound/piano/G#6.ogg'
|
||||
if("Ab6")
|
||||
soundfile = 'sound/piano/Ab6.ogg'
|
||||
if("An6")
|
||||
soundfile = 'sound/piano/An6.ogg'
|
||||
if("A#6")
|
||||
soundfile = 'sound/piano/A#6.ogg'
|
||||
if("Bb6")
|
||||
soundfile = 'sound/piano/Bb6.ogg'
|
||||
if("Bn6")
|
||||
soundfile = 'sound/piano/Bn6.ogg'
|
||||
if("B#6")
|
||||
soundfile = 'sound/piano/B#6.ogg'
|
||||
if("Cb7")
|
||||
soundfile = 'sound/piano/Cb7.ogg'
|
||||
if("Cn7")
|
||||
soundfile = 'sound/piano/Cn7.ogg'
|
||||
if("C#7")
|
||||
soundfile = 'sound/piano/C#7.ogg'
|
||||
if("Db7")
|
||||
soundfile = 'sound/piano/Db7.ogg'
|
||||
if("Dn7")
|
||||
soundfile = 'sound/piano/Dn7.ogg'
|
||||
if("D#7")
|
||||
soundfile = 'sound/piano/D#7.ogg'
|
||||
if("Eb7")
|
||||
soundfile = 'sound/piano/Eb7.ogg'
|
||||
if("En7")
|
||||
soundfile = 'sound/piano/En7.ogg'
|
||||
if("E#7")
|
||||
soundfile = 'sound/piano/E#7.ogg'
|
||||
if("Fb7")
|
||||
soundfile = 'sound/piano/Fb7.ogg'
|
||||
if("Fn7")
|
||||
soundfile = 'sound/piano/Fn7.ogg'
|
||||
if("F#7")
|
||||
soundfile = 'sound/piano/F#7.ogg'
|
||||
if("Gb7")
|
||||
soundfile = 'sound/piano/Gb7.ogg'
|
||||
if("Gn7")
|
||||
soundfile = 'sound/piano/Gn7.ogg'
|
||||
if("G#7")
|
||||
soundfile = 'sound/piano/G#7.ogg'
|
||||
if("Ab7")
|
||||
soundfile = 'sound/piano/Ab7.ogg'
|
||||
if("An7")
|
||||
soundfile = 'sound/piano/An7.ogg'
|
||||
if("A#7")
|
||||
soundfile = 'sound/piano/A#7.ogg'
|
||||
if("Bb7")
|
||||
soundfile = 'sound/piano/Bb7.ogg'
|
||||
if("Bn7")
|
||||
soundfile = 'sound/piano/Bn7.ogg'
|
||||
if("B#7")
|
||||
soundfile = 'sound/piano/B#7.ogg'
|
||||
if("Cb8")
|
||||
soundfile = 'sound/piano/Cb8.ogg'
|
||||
if("Cn8")
|
||||
soundfile = 'sound/piano/Cn8.ogg'
|
||||
if("C#8")
|
||||
soundfile = 'sound/piano/C#8.ogg'
|
||||
if("Db8")
|
||||
soundfile = 'sound/piano/Db8.ogg'
|
||||
if("Dn8")
|
||||
soundfile = 'sound/piano/Dn8.ogg'
|
||||
if("D#8")
|
||||
soundfile = 'sound/piano/D#8.ogg'
|
||||
if("Eb8")
|
||||
soundfile = 'sound/piano/Eb8.ogg'
|
||||
if("En8")
|
||||
soundfile = 'sound/piano/En8.ogg'
|
||||
if("E#8")
|
||||
soundfile = 'sound/piano/E#8.ogg'
|
||||
if("Fb8")
|
||||
soundfile = 'sound/piano/Fb8.ogg'
|
||||
if("Fn8")
|
||||
soundfile = 'sound/piano/Fn8.ogg'
|
||||
if("F#8")
|
||||
soundfile = 'sound/piano/F#8.ogg'
|
||||
if("Gb8")
|
||||
soundfile = 'sound/piano/Gb8.ogg'
|
||||
if("Gn8")
|
||||
soundfile = 'sound/piano/Gn8.ogg'
|
||||
if("G#8")
|
||||
soundfile = 'sound/piano/G#8.ogg'
|
||||
if("Ab8")
|
||||
soundfile = 'sound/piano/Ab8.ogg'
|
||||
if("An8")
|
||||
soundfile = 'sound/piano/An8.ogg'
|
||||
if("A#8")
|
||||
soundfile = 'sound/piano/A#8.ogg'
|
||||
if("Bb8")
|
||||
soundfile = 'sound/piano/Bb8.ogg'
|
||||
if("Bn8")
|
||||
soundfile = 'sound/piano/Bn8.ogg'
|
||||
if("B#8")
|
||||
soundfile = 'sound/piano/B#8.ogg'
|
||||
if("Cb9")
|
||||
soundfile = 'sound/piano/Cb9.ogg'
|
||||
if("Cn9")
|
||||
soundfile = 'sound/piano/Cn9.ogg'
|
||||
else
|
||||
return
|
||||
|
||||
for(var/mob/M in hearers(15, src))
|
||||
M << sound(soundfile)
|
||||
|
||||
playsong()
|
||||
do
|
||||
var/cur_oct[7]
|
||||
var/cur_acc[7]
|
||||
for(var/i = 1 to 7)
|
||||
cur_oct[i] = "3"
|
||||
cur_acc[i] = "n"
|
||||
|
||||
for(var/line in song.lines)
|
||||
//world << line
|
||||
for(var/beat in dd_text2list(lowertext(line), ","))
|
||||
//world << "beat: [beat]"
|
||||
var/list/notes = dd_text2list(beat, "/")
|
||||
for(var/note in dd_text2list(notes[1], "-"))
|
||||
//world << "note: [note]"
|
||||
if(!playing || !anchored)//If the piano is playing, or is loose
|
||||
playing = 0
|
||||
return
|
||||
if(lentext(note) == 0)
|
||||
continue
|
||||
//world << "Parse: [copytext(note,1,2)]"
|
||||
var/cur_note = text2ascii(note) - 96
|
||||
if(cur_note < 1 || cur_note > 7)
|
||||
continue
|
||||
for(var/i=2 to lentext(note))
|
||||
var/ni = copytext(note,i,i+1)
|
||||
if(!text2num(ni))
|
||||
if(ni == "#" || ni == "b" || ni == "n")
|
||||
cur_acc[cur_note] = ni
|
||||
else if(ni == "s")
|
||||
cur_acc[cur_note] = "#" // so shift is never required
|
||||
else
|
||||
cur_oct[cur_note] = ni
|
||||
playnote(uppertext(copytext(note,1,2)) + cur_acc[cur_note] + cur_oct[cur_note])
|
||||
if(notes.len >= 2 && text2num(notes[2]))
|
||||
sleep(song.tempo / text2num(notes[2]))
|
||||
else
|
||||
sleep(song.tempo)
|
||||
if(repeat > 0)
|
||||
repeat-- //Infinite loops are baaaad.
|
||||
while(repeat > 0)
|
||||
playing = 0
|
||||
updateUsrDialog()
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
if(!anchored)
|
||||
return
|
||||
|
||||
usr.machine = src
|
||||
var/dat = "<HEAD><TITLE>Piano</TITLE></HEAD><BODY>"
|
||||
|
||||
if(song)
|
||||
if(song.lines.len > 0 && !(playing))
|
||||
dat += "<A href='?src=\ref[src];play=1'>Play Song</A><BR><BR>"
|
||||
dat += "<A href='?src=\ref[src];repeat=1'>Repeat Song: [repeat] times.</A><BR><BR>"
|
||||
if(playing)
|
||||
dat += "<A href='?src=\ref[src];stop=1'>Stop Playing</A><BR>"
|
||||
dat += "Repeats left: [repeat].<BR><BR>"
|
||||
if(!edit)
|
||||
dat += "<A href='?src=\ref[src];edit=2'>Show Editor</A><BR><BR>"
|
||||
else
|
||||
dat += "<A href='?src=\ref[src];edit=1'>Hide Editor</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];newsong=1'>Start a New Song</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];import=1'>Import a Song</A><BR><BR>"
|
||||
if(song)
|
||||
var/calctempo = (10/song.tempo)*60
|
||||
dat += "Tempo : <A href='?src=\ref[src];tempo=10'>-</A><A href='?src=\ref[src];tempo=1'>-</A> [calctempo] BPM <A href='?src=\ref[src];tempo=-1'>+</A><A href='?src=\ref[src];tempo=-10'>+</A><BR><BR>"
|
||||
var/linecount = 0
|
||||
for(var/line in song.lines)
|
||||
linecount += 1
|
||||
dat += "Line [linecount]: [line] <A href='?src=\ref[src];deleteline=[linecount]'>Delete Line</A> <A href='?src=\ref[src];modifyline=[linecount]'>Modify Line</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];newline=1'>Add Line</A><BR><BR>"
|
||||
if(help)
|
||||
dat += "<A href='?src=\ref[src];help=1'>Hide Help</A><BR>"
|
||||
dat += {"
|
||||
Lines are a series of chords, separated by commas (,), each with notes seperated by hyphens (-).<br>
|
||||
Every note in a chord will play together, with chord timed by the tempo.<br>
|
||||
<br>
|
||||
Notes are played by the names of the note, and optionally, the accidental, and/or the octave number.<br>
|
||||
By default, every note is natural and in octave 3. Defining otherwise is remembered for each note.<br>
|
||||
Example: <i>C,D,E,F,G,A,B</i> will play a C major scale.<br>
|
||||
After a note has an accidental placed, it will be remembered: <i>C,C4,C,C3</i> is C3,C4,C4,C3</i><br>
|
||||
Chords can be played simply by seperating each note with a hyphon: <i>A-C#,Cn-E,E-G#,Gn-B</i><br>
|
||||
A pause may be denoted by an empty chord: <i>C,E,,C,G</i><br>
|
||||
To make a chord be a different time, end it with /x, where the chord length will be length<br>
|
||||
defined by tempo / x: <i>C,G/2,E/4</i><br>
|
||||
Combined, an example is: <i>E-E4/4,/2,G#/8,B/8,E3-E4/4</i>
|
||||
<br>
|
||||
Lines may be up to 50 characters.<br>
|
||||
A song may only contain up to 50 lines.<br>
|
||||
"}
|
||||
else
|
||||
dat += "<A href='?src=\ref[src];help=2'>Show Help</A><BR>"
|
||||
dat += "</BODY></HTML>"
|
||||
user << browse(dat, "window=piano;size=700x300")
|
||||
onclose(user, "piano")
|
||||
|
||||
Topic(href, href_list)
|
||||
|
||||
if(!in_range(src, usr) || issilicon(usr) || !anchored || !usr.canmove || usr.restrained())
|
||||
usr << browse(null, "window=piano;size=700x300")
|
||||
onclose(usr, "piano")
|
||||
return
|
||||
|
||||
if(href_list["repeat"]) //Changing this from a toggle to a number of repeats to avoid infinite loops.
|
||||
if(playing) return //So that people cant keep adding to repeat. If the do it intentionally, it could result in the server crashing.
|
||||
var/tempnum = input("How many times do you want to repeat this piece? (max:10)") as num
|
||||
if(tempnum > 10)
|
||||
tempnum = 10
|
||||
repeat = tempnum
|
||||
|
||||
else if(href_list["tempo"])
|
||||
song.tempo += text2num(href_list["tempo"])
|
||||
if(song.tempo < 1)
|
||||
song.tempo = 1
|
||||
|
||||
else if(href_list["play"])
|
||||
if(song)
|
||||
playing = 1
|
||||
spawn() playsong()
|
||||
|
||||
else if(href_list["newsong"])
|
||||
song = new()
|
||||
|
||||
else if(href_list["newline"])
|
||||
var/newline = input("Enter your line: ", "Piano") as text|null
|
||||
if(!newline)
|
||||
return
|
||||
if(song.lines.len > 50)
|
||||
return
|
||||
if(lentext(newline) > 50)
|
||||
newline = copytext(newline, 1, 50)
|
||||
song.lines.Add(newline)
|
||||
|
||||
else if(href_list["deleteline"])
|
||||
var/num = text2num(href_list["deleteline"])
|
||||
song.lines.Cut(num, num+1)
|
||||
|
||||
else if(href_list["modifyline"])
|
||||
var/num = text2num(href_list["modifyline"])
|
||||
var/content = input("Enter your line: ", "Piano", song.lines[num]) as text|null
|
||||
if(!content)
|
||||
return
|
||||
if(lentext(content) > 50)
|
||||
content = copytext(content, 1, 50)
|
||||
song.lines[num] = content
|
||||
|
||||
else if(href_list["stop"])
|
||||
playing = 0
|
||||
|
||||
else if(href_list["help"])
|
||||
help = text2num(href_list["help"]) - 1
|
||||
|
||||
else if(href_list["edit"])
|
||||
edit = text2num(href_list["edit"]) - 1
|
||||
|
||||
else if(href_list["import"])
|
||||
var/t = ""
|
||||
do
|
||||
t = input(usr, "Please paste the entire song, formatted:", text("[]", src.name), t) as message
|
||||
if (!in_range(src, usr))
|
||||
return
|
||||
|
||||
if(lentext(t) >= 3072)
|
||||
var/cont = input(usr, "Your message is too long! Would you like to continue editing it?", "", "yes") in list("yes", "no")
|
||||
if(cont == "no")
|
||||
break
|
||||
while(lentext(t) > 3072)
|
||||
|
||||
//split into lines
|
||||
spawn()
|
||||
var/list/lines = dd_text2list(t, "\n")
|
||||
var/tempo = 5
|
||||
if(copytext(lines[1],1,6) == "BPM: ")
|
||||
tempo = 600 / text2num(copytext(lines[1],6))
|
||||
lines.Cut(1,2)
|
||||
if(lines.len > 50)
|
||||
usr << "Too many lines!"
|
||||
lines.Cut(51)
|
||||
var/linenum = 1
|
||||
for(var/l in lines)
|
||||
if(lentext(l) > 50)
|
||||
usr << "Line [linenum] too long!"
|
||||
lines.Remove(l)
|
||||
else
|
||||
linenum++
|
||||
song = new()
|
||||
song.lines = lines
|
||||
song.tempo = tempo
|
||||
updateUsrDialog()
|
||||
|
||||
add_fingerprint(usr)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
attackby(obj/item/O as obj, mob/user as mob)
|
||||
if (istype(O, /obj/item/weapon/wrench))
|
||||
if (anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "\blue You begin to loosen \the [src]'s casters..."
|
||||
if (do_after(user, 40))
|
||||
user.visible_message( \
|
||||
"[user] loosens \the [src]'s casters.", \
|
||||
"\blue You have loosened \the [src]. Now it can be pulled somewhere else.", \
|
||||
"You hear ratchet.")
|
||||
src.anchored = 0
|
||||
else
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "\blue You begin to tighten \the [src] to the floor..."
|
||||
if (do_after(user, 20))
|
||||
user.visible_message( \
|
||||
"[user] tightens \the [src]'s casters.", \
|
||||
"\blue You have tightened \the [src]'s casters. Now it can be played again.", \
|
||||
"You hear ratchet.")
|
||||
src.anchored = 1
|
||||
else
|
||||
..()
|
||||
@@ -0,0 +1,67 @@
|
||||
/obj/structure/noticeboard
|
||||
|
||||
//attaching papers!!
|
||||
/obj/structure/noticeboard/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob)
|
||||
if (istype(O, /obj/item/weapon/paper))
|
||||
if (src.notices < 5)
|
||||
O.add_fingerprint(user)
|
||||
src.add_fingerprint(user)
|
||||
user.drop_item()
|
||||
O.loc = src
|
||||
src.notices++
|
||||
src.icon_state = text("nboard0[]", src.notices) //update sprite
|
||||
user << "\blue You pin the paper to the noticeboard."
|
||||
else
|
||||
user << "\red 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."
|
||||
|
||||
/obj/structure/noticeboard/attack_hand(user as mob)
|
||||
var/dat = "<B>Noticeboard</B><BR>"
|
||||
for(var/obj/item/weapon/paper/P in src)
|
||||
dat += text("<A href='?src=\ref[];read=\ref[]'>[]</A> <A href='?src=\ref[];write=\ref[]'>Write</A> <A href='?src=\ref[];remove=\ref[]'>Remove</A><BR>", src, P, P.name, src, P, src, P)
|
||||
user << browse("<HEAD><TITLE>Notices</TITLE></HEAD>[dat]","window=noticeboard")
|
||||
onclose(user, "noticeboard")
|
||||
|
||||
|
||||
/obj/structure/noticeboard/Topic(href, href_list)
|
||||
..()
|
||||
usr.machine = src
|
||||
if (href_list["remove"])
|
||||
if ((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open
|
||||
usr << "\red It's a bit hard to remove the notice when you're restrained like this."
|
||||
return
|
||||
var/obj/item/P = locate(href_list["remove"])
|
||||
if ((P && P.loc == src))
|
||||
P.loc = get_turf(src) //dump paper on the floor because you're a clumsy fuck
|
||||
P.layer = 20
|
||||
P.add_fingerprint(usr)
|
||||
src.add_fingerprint(usr)
|
||||
src.notices--
|
||||
src.icon_state = text("nboard0[]", src.notices)
|
||||
|
||||
if(href_list["write"])
|
||||
if ((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open
|
||||
usr << "\red It's a bit hard to write when you're restrained like this."
|
||||
return
|
||||
var/obj/item/P = locate(href_list["write"])
|
||||
|
||||
if((P && P.loc == src)) //if the paper's on the board
|
||||
if (istype(usr.r_hand, /obj/item/weapon/pen)) //and you're holding a pen
|
||||
src.add_fingerprint(usr)
|
||||
P.attackby(usr.r_hand, usr) //then do ittttt
|
||||
else
|
||||
if (istype(usr.l_hand, /obj/item/weapon/pen)) //check other hand for pen
|
||||
src.add_fingerprint(usr)
|
||||
P.attackby(usr.l_hand, usr)
|
||||
else
|
||||
usr << "\red You'll need something to write with!"
|
||||
|
||||
if (href_list["read"])
|
||||
var/obj/item/weapon/paper/P = locate(href_list["read"])
|
||||
if ((P && P.loc == src))
|
||||
if (!( istype(usr, /mob/living/carbon/human) ))
|
||||
usr << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", P.name, stars(P.info)), text("window=[]", P.name))
|
||||
onclose(usr, "[P.name]")
|
||||
else
|
||||
usr << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", P.name, P.info), text("window=[]", P.name))
|
||||
onclose(usr, "[P.name]")
|
||||
return
|
||||
@@ -0,0 +1,227 @@
|
||||
/obj/structure/stool/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
del(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/stool/blob_act()
|
||||
if(prob(75))
|
||||
new /obj/item/stack/sheet/metal(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/structure/stool/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if (src.anchored)
|
||||
src.anchored = 0
|
||||
user << "\blue You unfasten [src] from the floor."
|
||||
else
|
||||
src.anchored = 1
|
||||
user << "\blue You fasten [src] to the floor."
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
new /obj/item/stack/sheet/metal(src.loc)
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/assembly/shock_kit))
|
||||
var/obj/structure/stool/bed/chair/e_chair/E = new /obj/structure/stool/bed/chair/e_chair(src.loc)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
E.dir = src.dir
|
||||
E.part = W
|
||||
W.loc = E
|
||||
W.master = E
|
||||
user.u_equip(W)
|
||||
W.layer = initial(W.layer)
|
||||
del(src)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
new /obj/item/stack/sheet/wood(src.loc)
|
||||
del(src)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/stool/bed/Del()
|
||||
unbuckle()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/proc/unbuckle()
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
|
||||
buckled_mob.buckled = null
|
||||
buckled_mob.anchored = initial(buckled_mob.anchored)
|
||||
buckled_mob.update_canmove()
|
||||
buckled_mob = null
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/proc/manual_unbuckle(mob/user as mob)
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src)
|
||||
if(buckled_mob != user)
|
||||
buckled_mob.visible_message(\
|
||||
"\blue [buckled_mob.name] was unbuckled by [user.name]!",\
|
||||
"You unbuckled from [src] by [user.name].",\
|
||||
"You hear metal clanking")
|
||||
else
|
||||
buckled_mob.visible_message(\
|
||||
"\blue [buckled_mob.name] unbuckles!",\
|
||||
"You unbuckle yourself from [src].",\
|
||||
"You hear metal clanking")
|
||||
unbuckle()
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/proc/buckle_mob(mob/M as mob, mob/user as mob)
|
||||
if (!ticker)
|
||||
user << "You can't buckle anyone in before the game starts."
|
||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
|
||||
return
|
||||
|
||||
unbuckle()
|
||||
|
||||
if (M == usr)
|
||||
M.visible_message(\
|
||||
"\blue [M.name] buckles in!",\
|
||||
"You buckle yourself to [src].",\
|
||||
"You hear metal clanking")
|
||||
else
|
||||
M.visible_message(\
|
||||
"\blue [M.name] is buckled in to [src] by [user.name]!",\
|
||||
"You are buckled in to [src] by [user.name].",\
|
||||
"You hear metal clanking")
|
||||
M.buckled = src
|
||||
M.loc = src.loc
|
||||
M.dir = src.dir
|
||||
M.update_canmove()
|
||||
src.buckled_mob = M
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/MouseDrop_T(mob/M as mob, mob/user as mob)
|
||||
if(!istype(M)) return
|
||||
if(issimpleanimal(user))
|
||||
user << "\red You are unable to work the complex mechanisms of a buckle!"
|
||||
return
|
||||
buckle_mob(M, user)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/structure/stool/bed/attack_hand(mob/user as mob)
|
||||
manual_unbuckle(user)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/New()
|
||||
if(anchored)
|
||||
src.verbs -= /atom/movable/verb/pull
|
||||
handle_rotation()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/proc/handle_rotation() //making this into a seperate proc so office chairs can call it on Move()
|
||||
if(src.dir == NORTH)
|
||||
src.layer = FLY_LAYER
|
||||
else
|
||||
src.layer = OBJ_LAYER
|
||||
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.loc != src.loc)
|
||||
buckled_mob.buckled = null //Temporary, so Move() succeeds.
|
||||
if(!buckled_mob.Move(loc))
|
||||
unbuckle()
|
||||
buckled_mob = null
|
||||
else
|
||||
buckled_mob.buckled = src //Restoring
|
||||
if(buckled_mob)
|
||||
buckled_mob.dir = dir
|
||||
|
||||
/obj/structure/stool/bed/chair/verb/rotate()
|
||||
set name = "Rotate Chair"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
src.dir = turn(src.dir, 90)
|
||||
handle_rotation()
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/MouseDrop_T(mob/M as mob, mob/user as mob)
|
||||
if(!istype(M)) return
|
||||
buckle_mob(M, user)
|
||||
return
|
||||
|
||||
//roller bed
|
||||
|
||||
/obj/structure/stool/bed/roller
|
||||
name = "roller bed"
|
||||
icon = 'icons/obj/rollerbed.dmi'
|
||||
icon_state = "down"
|
||||
anchored = 0
|
||||
|
||||
/obj/item/roller
|
||||
name = "roller bed"
|
||||
desc = "A collapsed roller bed that can be carried around."
|
||||
icon = 'rollerbed.dmi'
|
||||
icon_state = "folded"
|
||||
w_class = 4.0 // Can't be put in backpacks. Oh well.
|
||||
|
||||
attack_self(mob/user)
|
||||
var/obj/structure/stool/bed/roller/R = new /obj/structure/stool/bed/roller(user.loc)
|
||||
R.add_fingerprint(user)
|
||||
del(src)
|
||||
|
||||
/obj/structure/stool/bed/roller/Move()
|
||||
..()
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src)
|
||||
buckled_mob.loc = src.loc
|
||||
|
||||
/obj/structure/stool/bed/roller/buckle_mob(mob/M as mob, mob/user as mob)
|
||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || istype(usr, /mob/living/silicon/pai) )
|
||||
return
|
||||
M.pixel_y = 6
|
||||
density = 1
|
||||
icon_state = "up"
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/roller/manual_unbuckle(mob/user as mob)
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
|
||||
buckled_mob.pixel_y = 0
|
||||
buckled_mob.anchored = initial(buckled_mob.anchored)
|
||||
buckled_mob.buckled = null
|
||||
buckled_mob.update_canmove()
|
||||
buckled_mob = null
|
||||
density = 0
|
||||
icon_state = "down"
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/roller/MouseDrop(over_object, src_location, over_location)
|
||||
..()
|
||||
if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
|
||||
if(!ishuman(usr)) return
|
||||
if(buckled_mob) return 0
|
||||
visible_message("\The [usr] collapses \the [src.name]")
|
||||
new/obj/item/roller(get_turf(src))
|
||||
spawn(0)
|
||||
del(src)
|
||||
return
|
||||
|
||||
@@ -0,0 +1,349 @@
|
||||
/*
|
||||
CONTAINS:
|
||||
TABLE AND RACK OBJECT INTERATIONS
|
||||
*/
|
||||
|
||||
|
||||
//TABLE
|
||||
/obj/structure/table/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(25))
|
||||
src.density = 0
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/table/blob_act()
|
||||
if(prob(75))
|
||||
if(istype(src, /obj/structure/table/woodentable))
|
||||
new /obj/item/weapon/table_parts/wood( src.loc )
|
||||
del(src)
|
||||
return
|
||||
new /obj/item/weapon/table_parts( src.loc )
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/table/hand_p(mob/user as mob)
|
||||
return src.attack_paw(user)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/table/attack_paw(mob/user as mob)
|
||||
if ((HULK in usr.mutations))
|
||||
usr << "\blue You destroy the table."
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [user] smashes the table apart!"
|
||||
if(istype(src, /obj/structure/table/reinforced))
|
||||
new /obj/item/weapon/table_parts/reinforced( src.loc )
|
||||
else if(istype(src, /obj/structure/table/woodentable))
|
||||
new/obj/item/weapon/table_parts/wood( src.loc )
|
||||
else
|
||||
new /obj/item/weapon/table_parts( src.loc )
|
||||
src.density = 0
|
||||
del(src)
|
||||
if (!( locate(/obj/structure/table, user.loc) ))
|
||||
step(user, get_dir(user, src))
|
||||
if (user.loc == src.loc)
|
||||
user.layer = TURF_LAYER
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "[user] hides under the table!"
|
||||
//Foreach goto(69)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/table/attack_alien(mob/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N
|
||||
usr << "\green You destroy the table."
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [user] slices the table apart!"
|
||||
if(istype(src, /obj/structure/table/reinforced))
|
||||
new /obj/item/weapon/table_parts/reinforced( src.loc )
|
||||
else if(istype(src, /obj/structure/table/woodentable))
|
||||
new/obj/item/weapon/table_parts/wood( src.loc )
|
||||
else
|
||||
new /obj/item/weapon/table_parts( src.loc )
|
||||
src.density = 0
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/table/attack_animal(mob/living/simple_animal/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N
|
||||
if(user.wall_smash)
|
||||
usr << "\red You destroy the table."
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [user] smashes the table apart!"
|
||||
if(istype(src, /obj/structure/table/reinforced))
|
||||
new /obj/item/weapon/table_parts/reinforced( src.loc )
|
||||
else if(istype(src, /obj/structure/table/woodentable))
|
||||
new/obj/item/weapon/table_parts/wood( src.loc )
|
||||
else
|
||||
new /obj/item/weapon/table_parts( src.loc )
|
||||
src.density = 0
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/structure/table/attack_hand(mob/user as mob)
|
||||
if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
|
||||
usr << "\blue You destroy the table."
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [user] smashes the table apart!"
|
||||
if(istype(src, /obj/structure/table/reinforced))
|
||||
new /obj/item/weapon/table_parts/reinforced( src.loc )
|
||||
else if(istype(src, /obj/structure/table/woodentable))
|
||||
new/obj/item/weapon/table_parts/wood( src.loc )
|
||||
else
|
||||
new /obj/item/weapon/table_parts( src.loc )
|
||||
src.density = 0
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/table/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
/obj/structure/table/MouseDrop_T(obj/O as obj, mob/user as mob)
|
||||
|
||||
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
user.drop_item()
|
||||
if (O.loc != src.loc)
|
||||
step(O, get_dir(O, src))
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/table/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if(G.state<2)
|
||||
user << "\red You need a better grip to do that!"
|
||||
return
|
||||
G.affecting.loc = src.loc
|
||||
G.affecting.Weaken(5)
|
||||
for(var/mob/O in viewers(world.view, src))
|
||||
if (O.client)
|
||||
O << "\red [G.assailant] puts [G.affecting] on the table."
|
||||
del(W)
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
user << "\blue Now disassembling table"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user,50))
|
||||
new /obj/item/weapon/table_parts( src.loc )
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
|
||||
if(isrobot(user))
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
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)
|
||||
for(var/mob/O in viewers(user, 4))
|
||||
O.show_message("\blue The table was sliced apart by [user]!", 1, "\red You hear metal coming apart.", 2)
|
||||
new /obj/item/weapon/table_parts( src.loc )
|
||||
del(src)
|
||||
return
|
||||
|
||||
user.drop_item(src)
|
||||
//if(W && W.loc) W.loc = src.loc // Unnecessary - see: mob/proc/drop_item(atom) - Doohl
|
||||
return
|
||||
|
||||
|
||||
//WOODEN TABLES
|
||||
/obj/structure/table/woodentable/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if(G.state<2)
|
||||
user << "\red You need a better grip to do that!"
|
||||
return
|
||||
G.affecting.loc = src.loc
|
||||
G.affecting.Weaken(5)
|
||||
for(var/mob/O in viewers(world.view, src))
|
||||
if (O.client)
|
||||
O << "\red [G.assailant] puts [G.affecting] on the wooden table."
|
||||
del(W)
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
user << "\blue Now disassembling the wooden table"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
sleep(50)
|
||||
new /obj/item/weapon/table_parts/wood( src.loc )
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
del(src)
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
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)
|
||||
for(var/mob/O in viewers(user, 4))
|
||||
O.show_message("\blue The wooden table was sliced apart by [user]!", 1, "\red You hear wood coming apart.", 2)
|
||||
new /obj/item/weapon/table_parts/wood( src.loc )
|
||||
del(src)
|
||||
return
|
||||
|
||||
user.drop_item(src)
|
||||
//if(W && W.loc) W.loc = src.loc
|
||||
return
|
||||
|
||||
|
||||
//REINFORCED TABLES
|
||||
/obj/structure/table/reinforced/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if(G.state<2)
|
||||
user << "\red You need a better grip to do that!"
|
||||
return
|
||||
G.affecting.loc = src.loc
|
||||
G.affecting.Weaken(5)
|
||||
for(var/mob/O in viewers(world.view, src))
|
||||
if (O.client)
|
||||
O << "\red [G.assailant] puts [G.affecting] on the reinforced table."
|
||||
del(W)
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
if(src.status == 2)
|
||||
user << "\blue Now weakening the reinforced table"
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
if (do_after(user, 50))
|
||||
if(!src || !WT.isOn()) return
|
||||
user << "\blue Table weakened"
|
||||
src.status = 1
|
||||
else
|
||||
user << "\blue Now strengthening the reinforced table"
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
if (do_after(user, 50))
|
||||
if(!src || !WT.isOn()) return
|
||||
user << "\blue Table strengthened"
|
||||
src.status = 2
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
user.drop_item(src)
|
||||
//if(W && W.loc) W.loc = src.loc
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if(src.status == 1)
|
||||
user << "\blue Now disassembling the reinforced table"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if (do_after(user, 50))
|
||||
new /obj/item/weapon/table_parts/reinforced( src.loc )
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
del(src)
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
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)
|
||||
for(var/mob/O in viewers(user, 4))
|
||||
O.show_message("\blue The reinforced table was sliced apart by [user]!", 1, "\red You hear metal coming apart.", 2)
|
||||
new /obj/item/weapon/table_parts/reinforced( src.loc )
|
||||
del(src)
|
||||
return
|
||||
|
||||
user.drop_item(src)
|
||||
//if(W && W.loc) W.loc = src.loc
|
||||
return
|
||||
|
||||
//RACKS
|
||||
|
||||
/obj/structure/rack/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
if(2.0)
|
||||
del(src)
|
||||
if(prob(50))
|
||||
new /obj/item/weapon/rack_parts(src.loc)
|
||||
if(3.0)
|
||||
if(prob(25))
|
||||
del(src)
|
||||
new /obj/item/weapon/rack_parts(src.loc)
|
||||
|
||||
/obj/structure/rack/blob_act()
|
||||
if(prob(75))
|
||||
del(src)
|
||||
return
|
||||
else if(prob(50))
|
||||
new /obj/item/weapon/rack_parts(src.loc)
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/structure/rack/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
if(src.density == 0) //Because broken racks -Agouri |TODO: SPRITE!|
|
||||
return 1
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/structure/rack/MouseDrop_T(obj/O as obj, mob/user as mob)
|
||||
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
user.drop_item()
|
||||
if (O.loc != src.loc)
|
||||
step(O, get_dir(O, src))
|
||||
return
|
||||
|
||||
/obj/structure/rack/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/weapon/rack_parts( src.loc )
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
user.drop_item()
|
||||
if(W && W.loc) W.loc = src.loc
|
||||
return
|
||||
|
||||
/obj/structure/rack/meteorhit(obj/O as obj)
|
||||
del(src)
|
||||
@@ -0,0 +1,52 @@
|
||||
// Basically they are for the firing range
|
||||
/obj/structure/target_stake
|
||||
name = "target stake"
|
||||
desc = "A thin platform with negatively-magnetized wheels."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "target_stake"
|
||||
density = 1
|
||||
flags = CONDUCT
|
||||
var/obj/item/target/pinned_target // the current pinned target
|
||||
|
||||
Move()
|
||||
..()
|
||||
// Move the pinned target along with the stake
|
||||
if(pinned_target in view(3, src))
|
||||
pinned_target.loc = loc
|
||||
|
||||
else // Sanity check: if the pinned target can't be found in immediate view
|
||||
pinned_target = null
|
||||
density = 1
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
// Putting objects on the stake. Most importantly, targets
|
||||
if(pinned_target)
|
||||
return // get rid of that pinned target first!
|
||||
|
||||
if(istype(W, /obj/item/target))
|
||||
density = 0
|
||||
W.density = 1
|
||||
user.drop_item(src)
|
||||
W.loc = loc
|
||||
W.layer = 3.1
|
||||
pinned_target = W
|
||||
user << "You slide the target into the stake."
|
||||
return
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
// taking pinned targets off!
|
||||
if(pinned_target)
|
||||
density = 1
|
||||
pinned_target.density = 0
|
||||
pinned_target.layer = OBJ_LAYER
|
||||
|
||||
pinned_target.loc = user.loc
|
||||
if(ishuman(user))
|
||||
if(!user.get_active_hand())
|
||||
user.put_in_hands(pinned_target)
|
||||
user << "You take the target out of the stake."
|
||||
else
|
||||
pinned_target.loc = get_turf_loc(user)
|
||||
user << "You take the target out of the stake."
|
||||
|
||||
pinned_target = null
|
||||
@@ -0,0 +1,365 @@
|
||||
//todo: toothbrushes, and some sort of "toilet-filthinator" for the hos
|
||||
|
||||
/obj/structure/toilet
|
||||
name = "toilet"
|
||||
desc = "The HT-451, a torque rotation-based, waste disposal unit for small matter. This one seems remarkably clean."
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "toilet00"
|
||||
density = 0
|
||||
anchored = 1
|
||||
var/open = 0 //if the lid is up
|
||||
var/cistern = 0 //if the cistern bit is open
|
||||
var/w_items = 0 //the combined w_class of all the items in the cistern
|
||||
var/mob/living/swirlie = null //the mob being given a swirlie
|
||||
|
||||
/obj/structure/toilet/New()
|
||||
open = round(rand(0, 1))
|
||||
update_icon()
|
||||
|
||||
/obj/structure/toilet/attack_hand(mob/living/user as mob)
|
||||
if(swirlie)
|
||||
usr.visible_message("<span class='danger'>[user] slams the toilet seat onto [swirlie.name]'s head!</span>", "<span class='notice'>You slam the toilet seat onto [swirlie.name]'s head!</span>", "You hear reverberating porcelain.")
|
||||
swirlie.adjustBruteLoss(8)
|
||||
return
|
||||
|
||||
if(cistern && !open)
|
||||
if(!contents.len)
|
||||
user << "<span class='notice'>The cistern is empty.</span>"
|
||||
return
|
||||
else
|
||||
var/obj/item/I = pick(contents)
|
||||
if(ishuman(user))
|
||||
user.put_in_hands(I)
|
||||
else
|
||||
I.loc = get_turf(src)
|
||||
user << "<span class='notice'>You find \an [I] in the cistern.</span>"
|
||||
w_items -= I.w_class
|
||||
return
|
||||
|
||||
open = !open
|
||||
update_icon()
|
||||
|
||||
/obj/structure/toilet/update_icon()
|
||||
icon_state = "toilet[open][cistern]"
|
||||
|
||||
/obj/structure/toilet/attackby(obj/item/I as obj, mob/living/user as mob)
|
||||
if(istype(I, /obj/item/weapon/crowbar))
|
||||
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)
|
||||
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
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = I
|
||||
|
||||
if(isliving(G.affecting))
|
||||
var/mob/living/GM = G.affecting
|
||||
|
||||
if(G.state>1)
|
||||
if(!GM.loc == get_turf(src))
|
||||
user << "<span class='notice'>[GM.name] needs to be on the toilet.</span>"
|
||||
return
|
||||
if(open && !swirlie)
|
||||
user.visible_message("<span class='danger'>[user] starts to give [GM.name] a swirlie!</span>", "<span class='notice'>You start to give [GM.name] a swirlie!</span>")
|
||||
swirlie = GM
|
||||
if(do_after(user, 30, 5, 0))
|
||||
user.visible_message("<span class='danger'>[user] gives [GM.name] a swirlie!</span>", "<span class='notice'>You give [GM.name] a swirlie!</span>", "You hear a toilet flushing.")
|
||||
if(!GM.internal)
|
||||
GM.adjustOxyLoss(5)
|
||||
swirlie = null
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user] slams [GM.name] into the [src]!</span>", "<span class='notice'>You slam [GM.name] into the [src]!</span>")
|
||||
GM.adjustBruteLoss(8)
|
||||
else
|
||||
user << "<span class='notice'>You need a tighter grip.</span>"
|
||||
|
||||
if(cistern)
|
||||
if(I.w_class > 3)
|
||||
user << "<span class='notice'>\The [I] does not fit.</span>"
|
||||
return
|
||||
if(w_items + I.w_class > 5)
|
||||
user << "<span class='notice'>The cistern is full.</span>"
|
||||
return
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
w_items += I.w_class
|
||||
user << "You carefully place \the [I] into the cistern."
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/urinal
|
||||
name = "urinal"
|
||||
desc = "The HU-452, an experimental urinal."
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "urinal"
|
||||
density = 0
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/urinal/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = I
|
||||
if(isliving(G.affecting))
|
||||
var/mob/living/GM = G.affecting
|
||||
if(G.state>1)
|
||||
if(!GM.loc == get_turf(src))
|
||||
user << "<span class='notice'>[GM.name] needs to be on the urinal.</span>"
|
||||
return
|
||||
user.visible_message("<span class='danger'>[user] slams [GM.name] into the [src]!</span>", "<span class='notice'>You slam [GM.name] into the [src]!</span>")
|
||||
GM.adjustBruteLoss(8)
|
||||
else
|
||||
user << "<span class='notice'>You need a tighter grip.</span>"
|
||||
|
||||
|
||||
|
||||
/obj/machinery/shower
|
||||
name = "shower"
|
||||
desc = "The HS-451. Installed in the 2550s by the Nanotrasen Hygiene Division."
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "shower"
|
||||
density = 0
|
||||
anchored = 1
|
||||
var/on = 0
|
||||
var/obj/effect/mist/mymist = null
|
||||
var/ismist = 0 //needs a var so we can make it linger~
|
||||
var/watertemp = "normal" //freezing, normal, or boiling
|
||||
var/mobpresent = 0 //true if there is a mob on the shower's loc, this is to ease process()
|
||||
|
||||
//add heat controls? when emagged, you can freeze to death in it?
|
||||
|
||||
/obj/effect/mist
|
||||
name = "mist"
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "mist"
|
||||
layer = MOB_LAYER + 1
|
||||
anchored = 1
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/machinery/shower/attack_hand(mob/M as mob)
|
||||
on = !on
|
||||
update_icon()
|
||||
if(on && M.loc == loc)
|
||||
wash(M)
|
||||
check_heat(M)
|
||||
|
||||
/obj/machinery/shower/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(I.type == /obj/item/device/analyzer)
|
||||
user << "<span class='notice'>The water temperature seems to be [watertemp].</span>"
|
||||
if(istype(I, /obj/item/weapon/wrench))
|
||||
user << "<span class='notice'>You begin to adjust the temperature valve with the [I].</span>"
|
||||
if(do_after(user, 50))
|
||||
switch(watertemp)
|
||||
if("normal")
|
||||
watertemp = "freezing"
|
||||
if("freezing")
|
||||
watertemp = "boiling"
|
||||
if("boiling")
|
||||
watertemp = "normal"
|
||||
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>")
|
||||
|
||||
/obj/machinery/shower/update_icon() //this is terribly unreadable, but basically it makes the shower mist up
|
||||
overlays = null //once it's been on for a while, in addition to handling the water overlay.
|
||||
if(mymist)
|
||||
del(mymist)
|
||||
|
||||
if(on)
|
||||
overlays += image('icons/obj/watercloset.dmi', src, "water", MOB_LAYER + 1, dir)
|
||||
if(watertemp == "freezing")
|
||||
return
|
||||
if(!ismist)
|
||||
spawn(50)
|
||||
if(src && on)
|
||||
ismist = 1
|
||||
mymist = new /obj/effect/mist(loc)
|
||||
else
|
||||
ismist = 1
|
||||
mymist = new /obj/effect/mist(loc)
|
||||
else if(ismist)
|
||||
ismist = 1
|
||||
mymist = new /obj/effect/mist(loc)
|
||||
spawn(250)
|
||||
if(src && !on)
|
||||
del(mymist)
|
||||
ismist = 0
|
||||
|
||||
/obj/machinery/shower/HasEntered(atom/movable/O)
|
||||
..()
|
||||
wash(O)
|
||||
if(ismob(O))
|
||||
mobpresent += 1
|
||||
check_heat(O)
|
||||
|
||||
/obj/machinery/shower/Uncrossed(atom/movable/O)
|
||||
if(ismob(O))
|
||||
mobpresent -= 1
|
||||
..()
|
||||
|
||||
//Yes, showers are super powerful as far as washing goes.
|
||||
/obj/machinery/shower/proc/wash(atom/movable/O as obj|mob)
|
||||
if(!on) return
|
||||
|
||||
if(iscarbon(O))
|
||||
var/mob/living/carbon/M = O
|
||||
if(M.r_hand)
|
||||
M.r_hand.clean_blood()
|
||||
if(M.l_hand)
|
||||
M.l_hand.clean_blood()
|
||||
if(M.wear_mask)
|
||||
if(M.wear_mask.clean_blood())
|
||||
M.update_inv_wear_mask(0)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.head)
|
||||
if(H.head.clean_blood())
|
||||
H.update_inv_head(0)
|
||||
if(H.wear_suit)
|
||||
if(H.wear_suit.clean_blood())
|
||||
H.update_inv_wear_suit(0)
|
||||
else if(H.w_uniform)
|
||||
if(H.w_uniform.clean_blood())
|
||||
H.update_inv_w_uniform(0)
|
||||
if(H.shoes)
|
||||
if(H.shoes.clean_blood())
|
||||
H.update_inv_shoes(0)
|
||||
|
||||
O.clean_blood()
|
||||
|
||||
if(isturf(loc))
|
||||
var/turf/tile = loc
|
||||
loc.clean_blood()
|
||||
for(var/obj/effect/E in tile)
|
||||
if(istype(E,/obj/effect/rune) || istype(E,/obj/effect/decal/cleanable) || istype(E,/obj/effect/overlay))
|
||||
del(E)
|
||||
|
||||
/obj/machinery/shower/process()
|
||||
if(!on || !mobpresent) return
|
||||
for(var/mob/living/carbon/C in loc)
|
||||
check_heat(C)
|
||||
|
||||
/obj/machinery/shower/proc/check_heat(mob/M as mob)
|
||||
if(!on || watertemp == "normal") return
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
|
||||
if(watertemp == "freezing")
|
||||
C.bodytemperature = max(80, C.bodytemperature - 80)
|
||||
C << "<span class='warning'>The water is freezing!</span>"
|
||||
return
|
||||
if(watertemp == "boiling")
|
||||
C.bodytemperature = min(500, C.bodytemperature + 35)
|
||||
C.adjustFireLoss(5)
|
||||
C << "<span class='danger'>The water is searing!</span>"
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/bikehorn/rubberducky
|
||||
name = "rubber ducky"
|
||||
desc = "Rubber ducky you're so fine, you make bathtime lots of fuuun. Rubber ducky I'm awfully fooooond of yooooouuuu~" //thanks doohl
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "rubberducky"
|
||||
item_state = "rubberducky"
|
||||
|
||||
|
||||
|
||||
/obj/structure/sink
|
||||
name = "sink"
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "sink"
|
||||
desc = "A sink used for washing one's hands and face."
|
||||
anchored = 1
|
||||
var/busy = 0 //Something's being washed at the moment
|
||||
|
||||
/obj/structure/sink/attack_hand(mob/M as mob)
|
||||
if(isrobot(M) || isAI(M))
|
||||
return
|
||||
|
||||
if(busy)
|
||||
M << "\red Someone's already washing here."
|
||||
return
|
||||
|
||||
var/turf/location = M.loc
|
||||
if(!isturf(location)) return
|
||||
usr << "\blue You start washing your hands."
|
||||
|
||||
busy = 1
|
||||
sleep(40)
|
||||
busy = 0
|
||||
|
||||
if(M.loc != location) return //Person has moved away from the sink
|
||||
|
||||
M.clean_blood()
|
||||
for(var/mob/V in viewers(src, null))
|
||||
V.show_message("\blue [M] washes their hands using \the [src].")
|
||||
|
||||
/obj/structure/sink/attackby(obj/item/O as obj, mob/user as mob)
|
||||
if(busy)
|
||||
user << "\red Someone's already washing here."
|
||||
return
|
||||
|
||||
if (istype(O, /obj/item/weapon/reagent_containers))
|
||||
var/obj/item/weapon/reagent_containers/RG = O
|
||||
RG.reagents.add_reagent("water", min(RG.volume - RG.reagents.total_volume, RG.amount_per_transfer_from_this))
|
||||
user.visible_message("\blue [user] fills the [RG] using \the [src].","\blue You fill the [RG] using \the [src].")
|
||||
return
|
||||
|
||||
else if (istype(O, /obj/item/weapon/melee/baton))
|
||||
var/obj/item/weapon/melee/baton/B = O
|
||||
if (B.charges > 0 && B.status == 1)
|
||||
flick("baton_active", src)
|
||||
user.Stun(10)
|
||||
user.stuttering = 10
|
||||
user.Weaken(10)
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
R.cell.charge -= 20
|
||||
else
|
||||
B.charges--
|
||||
user.visible_message( \
|
||||
"[user] was stunned by his wet [O].", \
|
||||
"\red You have wet \the [O], it shocks you!")
|
||||
return
|
||||
|
||||
var/turf/location = user.loc
|
||||
if(!isturf(location)) return
|
||||
|
||||
var/obj/item/I = O
|
||||
if(!I || !istype(I,/obj/item)) return
|
||||
|
||||
usr << "\blue You start washing \the [I]."
|
||||
|
||||
busy = 1
|
||||
sleep(40)
|
||||
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( \
|
||||
"\blue [user] washes \a [I] using \the [src].", \
|
||||
"\blue You wash \a [I] using \the [src].")
|
||||
|
||||
|
||||
/obj/structure/sink/kitchen
|
||||
name = "kitchen sink"
|
||||
icon_state = "sink_alt"
|
||||
|
||||
|
||||
/obj/structure/sink/puddle //splishy splashy ^_^
|
||||
name = "puddle"
|
||||
icon_state = "puddle"
|
||||
|
||||
/obj/structure/sink/puddle/attack_hand(mob/M as mob)
|
||||
icon_state = "puddle-splash"
|
||||
..()
|
||||
icon_state = "puddle"
|
||||
|
||||
/obj/structure/sink/puddle/attackby(obj/item/O as obj, mob/user as mob)
|
||||
icon_state = "puddle-splash"
|
||||
..()
|
||||
icon_state = "puddle"
|
||||
@@ -0,0 +1,299 @@
|
||||
/* Windoor (window door) assembly -Nodrak
|
||||
* Step 1: Create a windoor out of rglass
|
||||
* Step 2: Add r-glass to the assembly to make a secure windoor (Optional)
|
||||
* Step 3: Rotate or Flip the assembly to face and open the way you want
|
||||
* Step 4: Wrench the assembly in place
|
||||
* Step 5: Add cables to the assembly
|
||||
* Step 6: Set access for the door.
|
||||
* Step 7: Screwdriver the door to complete
|
||||
*/
|
||||
|
||||
|
||||
obj/structure/windoor_assembly
|
||||
icon = 'icons/obj/doors/windoor.dmi'
|
||||
|
||||
name = "Windoor Assembly"
|
||||
icon_state = "l_windoor_assembly01"
|
||||
anchored = 0
|
||||
density = 0
|
||||
dir = NORTH
|
||||
|
||||
var/ini_dir
|
||||
var/obj/item/weapon/airlock_electronics/electronics = null
|
||||
|
||||
//Vars to help with the icon's name
|
||||
var/facing = "l" //Does the windoor open to the left or right?
|
||||
var/secure = "" //Whether or not this creates a secure windoor
|
||||
var/state = "01" //How far the door assembly has progressed in terms of sprites
|
||||
|
||||
obj/structure/windoor_assembly/New(dir=NORTH)
|
||||
..()
|
||||
src.ini_dir = src.dir
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
obj/structure/windoor_assembly/Del()
|
||||
density = 0
|
||||
update_nearby_tiles()
|
||||
..()
|
||||
|
||||
/obj/structure/windoor_assembly/update_icon()
|
||||
icon_state = "[facing]_[secure]windoor_assembly[state]"
|
||||
|
||||
/obj/structure/windoor_assembly/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return 1
|
||||
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
|
||||
if(air_group) return 0
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
|
||||
/obj/structure/windoor_assembly/CheckExit(atom/movable/mover as mob|obj, turf/target as turf)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return 1
|
||||
if(get_dir(loc, target) == dir)
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
|
||||
|
||||
/obj/structure/windoor_assembly/attackby(obj/item/W as obj, mob/user as mob)
|
||||
//I really should have spread this out across more states but thin little windoors are hard to sprite.
|
||||
switch(state)
|
||||
if("01")
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && !anchored )
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if (WT.remove_fuel(0,user))
|
||||
user.visible_message("[user] dissassembles the windoor assembly.", "You start to dissassemble the windoor assembly.")
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src || !WT.isOn()) return
|
||||
user << "\blue You dissasembled the windoor assembly!"
|
||||
new /obj/item/stack/sheet/rglass(get_turf(src), 5)
|
||||
if(secure)
|
||||
new /obj/item/stack/rods(get_turf(src), 4)
|
||||
del(src)
|
||||
else
|
||||
user << "\blue You need more welding fuel to dissassemble the windoor assembly."
|
||||
return
|
||||
|
||||
//Wrenching an unsecure assembly anchors it in place. Step 4 complete
|
||||
if(istype(W, /obj/item/weapon/wrench) && !anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user.visible_message("[user] secures the windoor assembly to the floor.", "You start to secure the windoor assembly to the floor.")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You've secured the windoor assembly!"
|
||||
src.anchored = 1
|
||||
if(src.secure)
|
||||
src.name = "Secure Anchored Windoor Assembly"
|
||||
else
|
||||
src.name = "Anchored Windoor Assembly"
|
||||
|
||||
//Unwrenching an unsecure assembly un-anchors it. Step 4 undone
|
||||
else if(istype(W, /obj/item/weapon/wrench) && anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user.visible_message("[user] unsecures the windoor assembly to the floor.", "You start to unsecure the windoor assembly to the floor.")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You've unsecured the windoor assembly!"
|
||||
src.anchored = 0
|
||||
if(src.secure)
|
||||
src.name = "Secure Windoor Assembly"
|
||||
else
|
||||
src.name = "Windoor Assembly"
|
||||
|
||||
//Adding plasteel makes the assembly a secure windoor assembly. Step 2 (optional) complete.
|
||||
else if(istype(W, /obj/item/stack/sheet/plasteel) && !secure)
|
||||
var/obj/item/stack/sheet/plasteel/P = W
|
||||
if(P.amount < 2)
|
||||
user << "\red You need more plasteel to do this."
|
||||
return
|
||||
user << "\blue You start to reinforce the windoor with plasteel."
|
||||
|
||||
if(do_after(user,40))
|
||||
if(!src) return
|
||||
|
||||
P.use(2)
|
||||
user << "\blue You reinforce the windoor."
|
||||
src.secure = "secure_"
|
||||
if(src.anchored)
|
||||
src.name = "Secure Anchored Windoor Assembly"
|
||||
else
|
||||
src.name = "Secure Windoor Assembly"
|
||||
|
||||
//Adding cable to the assembly. Step 5 complete.
|
||||
else if(istype(W, /obj/item/weapon/cable_coil) && anchored)
|
||||
user.visible_message("[user] wires the windoor assembly.", "You start to wire the windoor assembly.")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
var/obj/item/weapon/cable_coil/CC = W
|
||||
CC.use(1)
|
||||
user << "\blue You wire the windoor!"
|
||||
src.state = "02"
|
||||
if(src.secure)
|
||||
src.name = "Secure Wired Windoor Assembly"
|
||||
else
|
||||
src.name = "Wired Windoor Assembly"
|
||||
else
|
||||
..()
|
||||
|
||||
if("02")
|
||||
|
||||
//Removing wire from the assembly. Step 5 undone.
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
|
||||
user << "\blue You cut the windoor wires.!"
|
||||
new/obj/item/weapon/cable_coil(get_turf(user), 1)
|
||||
src.state = "01"
|
||||
if(src.secure)
|
||||
src.name = "Secure Wired Windoor Assembly"
|
||||
else
|
||||
src.name = "Wired Windoor Assembly"
|
||||
|
||||
//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)
|
||||
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))
|
||||
if(!src) return
|
||||
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
user << "\blue You've installed the airlock electronics!"
|
||||
src.name = "Near finished Windoor Assembly"
|
||||
src.electronics = W
|
||||
else
|
||||
W.loc = src.loc
|
||||
|
||||
//Screwdriver to remove airlock electronics. Step 6 undone.
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to uninstall electronics from the airlock assembly.")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You've removed the airlock electronics!"
|
||||
src.name = "Wired Windoor Assembly"
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
if (!electronics)
|
||||
ae = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
else
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.loc = src.loc
|
||||
|
||||
|
||||
//Crowbar to complete the assembly, Step 7 complete.
|
||||
else if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(!src.electronics)
|
||||
usr << "\red The assembly is missing electronics."
|
||||
return
|
||||
usr << browse(null, "window=windoor_access")
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] pries the windoor into the frame.", "You start prying the windoor into the frame.")
|
||||
|
||||
if(do_after(user, 40))
|
||||
|
||||
if(!src) return
|
||||
|
||||
density = 1 //Shouldn't matter but just incase
|
||||
user << "\blue You finish the windoor!"
|
||||
|
||||
if(secure)
|
||||
var/obj/machinery/door/window/brigdoor/windoor = new /obj/machinery/door/window/brigdoor(src.loc)
|
||||
if(src.facing == "l")
|
||||
windoor.icon_state = "leftsecureopen"
|
||||
windoor.base_state = "leftsecure"
|
||||
else
|
||||
windoor.icon_state = "rightsecureopen"
|
||||
windoor.base_state = "rightsecure"
|
||||
windoor.dir = src.dir
|
||||
windoor.density = 0
|
||||
|
||||
windoor.req_access = src.electronics.conf_access
|
||||
windoor.electronics = src.electronics
|
||||
src.electronics.loc = windoor
|
||||
else
|
||||
var/obj/machinery/door/window/windoor = new /obj/machinery/door/window(src.loc)
|
||||
if(src.facing == "l")
|
||||
windoor.icon_state = "leftopen"
|
||||
windoor.base_state = "left"
|
||||
else
|
||||
windoor.icon_state = "rightopen"
|
||||
windoor.base_state = "right"
|
||||
windoor.dir = src.dir
|
||||
windoor.density = 0
|
||||
|
||||
windoor.req_access = src.electronics.conf_access
|
||||
windoor.electronics = src.electronics
|
||||
src.electronics.loc = windoor
|
||||
|
||||
|
||||
del(src)
|
||||
|
||||
|
||||
else
|
||||
..()
|
||||
|
||||
//Update to reflect changes(if applicable)
|
||||
update_icon()
|
||||
|
||||
|
||||
//Rotates the windoor assembly clockwise
|
||||
/obj/structure/windoor_assembly/verb/revrotate()
|
||||
set name = "Rotate Windoor Assembly"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if (src.anchored)
|
||||
usr << "It is fastened to the floor; therefore, you can't rotate it!"
|
||||
return 0
|
||||
if(src.state != "01")
|
||||
update_nearby_tiles(need_rebuild=1) //Compel updates before
|
||||
|
||||
src.dir = turn(src.dir, 270)
|
||||
|
||||
if(src.state != "01")
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
src.ini_dir = src.dir
|
||||
update_icon()
|
||||
return
|
||||
|
||||
//Flips the windoor assembly, determines whather the door opens to the left or the right
|
||||
/obj/structure/windoor_assembly/verb/flip()
|
||||
set name = "Flip Windoor Assembly"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(src.facing == "l")
|
||||
usr << "The windoor will now slide to the right."
|
||||
src.facing = "r"
|
||||
else
|
||||
src.facing = "l"
|
||||
usr << "The windoor will now slide to the left."
|
||||
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/windoor_assembly/proc/update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
|
||||
var/turf/simulated/source = loc
|
||||
var/turf/simulated/target = get_step(source,dir)
|
||||
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(target)) air_master.tiles_to_update += target
|
||||
|
||||
return 1
|
||||
@@ -0,0 +1,394 @@
|
||||
/obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
..()
|
||||
if(health <=0)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/stack/rods( src.loc )
|
||||
src.density = 0
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/structure/window/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
if(reinf) new /obj/item/stack/rods( src.loc)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(50))
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
if(reinf) new /obj/item/stack/rods( src.loc)
|
||||
|
||||
del(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/window/blob_act()
|
||||
if(reinf) new /obj/item/stack/rods( src.loc)
|
||||
density = 0
|
||||
del(src)
|
||||
|
||||
/obj/structure/window/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return 1
|
||||
if (src.dir == SOUTHWEST || src.dir == SOUTHEAST || src.dir == NORTHWEST || src.dir == NORTHEAST)
|
||||
return 0 //full tile window, you can't move into it!
|
||||
if(get_dir(loc, target) == dir)
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
|
||||
/obj/structure/window/CheckExit(atom/movable/O as mob|obj, target as turf)
|
||||
if(istype(O) && O.checkpass(PASSGLASS))
|
||||
return 1
|
||||
if (get_dir(O.loc, target) == dir)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/window/meteorhit()
|
||||
|
||||
//*****RM
|
||||
//world << "glass at [x],[y],[z] Mhit"
|
||||
src.health = 0
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
if(reinf) new /obj/item/stack/rods( src.loc)
|
||||
src.density = 0
|
||||
|
||||
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/window/hitby(AM as mob|obj)
|
||||
|
||||
..()
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[src] was hit by [AM].</B>", 1)
|
||||
var/tforce = 0
|
||||
if(ismob(AM))
|
||||
tforce = 40
|
||||
else
|
||||
tforce = AM:throwforce
|
||||
if(reinf) tforce /= 4.0
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
|
||||
src.health = max(0, src.health - tforce)
|
||||
if (src.health <= 7 && !reinf)
|
||||
src.anchored = 0
|
||||
update_nearby_icons()
|
||||
step(src, get_dir(AM, src))
|
||||
if (src.health <= 0)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
if(reinf) new /obj/item/stack/rods( src.loc)
|
||||
src.density = 0
|
||||
del(src)
|
||||
return
|
||||
//..() //Does this really need to be here twice? The parent proc doesn't even do anything yet. - Nodrak
|
||||
return
|
||||
|
||||
//These all need to be rewritten to use visiblemessage()
|
||||
|
||||
/obj/structure/window/attack_hand()
|
||||
if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
|
||||
usr << "\blue You smash through the window."
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [usr] smashes through the window!"
|
||||
src.health = 0
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
if(reinf) new /obj/item/stack/rods( src.loc)
|
||||
src.density = 0
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/structure/window/attack_paw()
|
||||
if ((HULK in usr.mutations))
|
||||
usr << "\blue You smash through the window."
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [usr] smashes through the window!"
|
||||
src.health = 0
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
if(reinf) new /obj/item/stack/rods( src.loc)
|
||||
src.density = 0
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/structure/window/attack_alien()
|
||||
if (istype(usr, /mob/living/carbon/alien/larva))//Safety check for larva. /N
|
||||
return
|
||||
usr << "\green You smash against the window."
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [usr] smashes against the window."
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
|
||||
src.health -= 15
|
||||
if(src.health <= 0)
|
||||
usr << "\green You smash through the window."
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [usr] smashes through the window!"
|
||||
src.health = 0
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
if(reinf)
|
||||
new /obj/item/stack/rods(src.loc)
|
||||
src.density = 0
|
||||
del(src)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/window/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if (M.melee_damage_upper == 0)
|
||||
return
|
||||
M << "\green You smash against the window."
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [M] smashes against the window."
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
|
||||
src.health -= M.melee_damage_upper
|
||||
if(src.health <= 0)
|
||||
M << "\green You smash through the window."
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [M] smashes through the window!"
|
||||
src.health = 0
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
if(reinf)
|
||||
new /obj/item/stack/rods(src.loc)
|
||||
src.density = 0
|
||||
del(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/window/attack_metroid()
|
||||
if(!istype(usr, /mob/living/carbon/metroid/adult))
|
||||
return
|
||||
|
||||
usr<< "\green You smash against the window."
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [usr] smashes against the window."
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
|
||||
src.health -= rand(10,15)
|
||||
if(src.health <= 0)
|
||||
usr << "\green You smash through the window."
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [usr] smashes through the window!"
|
||||
src.health = 0
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
if(reinf)
|
||||
new /obj/item/stack/rods(src.loc)
|
||||
src.density = 0
|
||||
del(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/window/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(!istype(W)) return//I really wish I did not need this
|
||||
if (istype(W, /obj/item/weapon/screwdriver))
|
||||
if(reinf && state >= 1)
|
||||
state = 3 - state
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 75, 1)
|
||||
usr << ( state==1? "You have unfastened the window from the frame." : "You have fastened the window to the frame." )
|
||||
else if(reinf && state == 0)
|
||||
anchored = !anchored
|
||||
update_nearby_icons()
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 75, 1)
|
||||
user << (src.anchored ? "You have fastened the frame to the floor." : "You have unfastened the frame from the floor.")
|
||||
else if(!reinf)
|
||||
src.anchored = !( src.anchored )
|
||||
update_nearby_icons()
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 75, 1)
|
||||
user << (src.anchored ? "You have fastened the window to the floor." : "You have unfastened the window.")
|
||||
else if(istype(W, /obj/item/weapon/crowbar) && reinf && state <=1)
|
||||
state = 1-state;
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 75, 1)
|
||||
user << (state ? "You have pried the window into the frame." : "You have pried the window out of the frame.")
|
||||
else
|
||||
|
||||
var/aforce = W.force
|
||||
if(reinf) aforce /= 2.0
|
||||
if(W.damtype == BRUTE || W.damtype == BURN)
|
||||
src.health = max(0, src.health - aforce)
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
if (src.health <= 7)
|
||||
src.anchored = 0
|
||||
update_nearby_icons()
|
||||
step(src, get_dir(user, src))
|
||||
if (src.health <= 0)
|
||||
if (src.dir == SOUTHWEST)
|
||||
var/index = null
|
||||
index = 0
|
||||
while(index < 2)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
if(reinf) new /obj/item/stack/rods( src.loc)
|
||||
index++
|
||||
else
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
if(reinf) new /obj/item/stack/rods( src.loc)
|
||||
src.density = 0
|
||||
del(src)
|
||||
return
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/window/verb/rotate()
|
||||
set name = "Rotate Window Counter-Clockwise"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if (src.anchored)
|
||||
usr << "It is fastened to the floor; therefore, you can't rotate it!"
|
||||
return 0
|
||||
|
||||
update_nearby_tiles(need_rebuild=1) //Compel updates before
|
||||
|
||||
src.dir = turn(src.dir, 90)
|
||||
|
||||
updateSilicate()
|
||||
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
src.ini_dir = src.dir
|
||||
return
|
||||
|
||||
/obj/structure/window/verb/revrotate()
|
||||
set name = "Rotate Window Clockwise"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if (src.anchored)
|
||||
usr << "It is fastened to the floor; therefore, you can't rotate it!"
|
||||
return 0
|
||||
|
||||
update_nearby_tiles(need_rebuild=1) //Compel updates before
|
||||
|
||||
src.dir = turn(src.dir, 270)
|
||||
|
||||
updateSilicate()
|
||||
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
src.ini_dir = src.dir
|
||||
return
|
||||
|
||||
/obj/structure/window/proc/updateSilicate()
|
||||
if(silicateIcon && silicate)
|
||||
src.icon = initial(icon)
|
||||
|
||||
var/icon/I = icon(icon,icon_state,dir)
|
||||
|
||||
var/r = (silicate / 100) + 1
|
||||
var/g = (silicate / 70) + 1
|
||||
var/b = (silicate / 50) + 1
|
||||
I.SetIntensity(r,g,b)
|
||||
icon = I
|
||||
silicateIcon = I
|
||||
|
||||
/obj/structure/window/New(Loc,re=0)
|
||||
..()
|
||||
|
||||
if(re) reinf = re
|
||||
|
||||
src.ini_dir = src.dir
|
||||
if(reinf)
|
||||
icon_state = "rwindow"
|
||||
desc = "A reinforced window."
|
||||
name = "reinforced window"
|
||||
state = 2*anchored
|
||||
health = 40
|
||||
if(opacity)
|
||||
icon_state = "twindow"
|
||||
else
|
||||
icon_state = "window"
|
||||
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
update_nearby_icons()
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/window/Del()
|
||||
density = 0
|
||||
|
||||
update_nearby_tiles()
|
||||
|
||||
playsound(src, "shatter", 70, 1)
|
||||
|
||||
update_nearby_icons()
|
||||
|
||||
..()
|
||||
|
||||
/obj/structure/window/Move()
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
..()
|
||||
|
||||
src.dir = src.ini_dir
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
return
|
||||
|
||||
//This proc has to do with airgroups and atmos, it has nothing to do with smoothwindows, that's update_nearby_tiles().
|
||||
/obj/structure/window/proc/update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
if(!dir in cardinal)
|
||||
var/turf/simulated/source = get_turf(src)
|
||||
if(istype(source))
|
||||
air_master.tiles_to_update |= source
|
||||
for(var/dir in cardinal)
|
||||
var/turf/simulated/target = get_step(source,dir)
|
||||
if(istype(target)) air_master.tiles_to_update |= target
|
||||
return 1
|
||||
|
||||
var/turf/simulated/source = get_turf(src)
|
||||
var/turf/simulated/target = get_step(source,dir)
|
||||
|
||||
if(istype(source)) air_master.tiles_to_update |= source
|
||||
if(istype(target)) air_master.tiles_to_update |= target
|
||||
|
||||
return 1
|
||||
|
||||
//checks if this window is full-tile one
|
||||
/obj/structure/window/proc/is_fulltile()
|
||||
if(dir in list(5,6,9,10))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//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()
|
||||
src.update_icon()
|
||||
for(var/direction in cardinal)
|
||||
for(var/obj/structure/window/W in get_step(src,direction) )
|
||||
W.update_icon()
|
||||
|
||||
//merges adjacent full-tile windows into one (blatant ripoff from game/smoothwall.dm)
|
||||
/obj/structure/window/update_icon()
|
||||
//A little cludge here, since I don't know how it will work with slim windows. Most likely VERY wrong.
|
||||
//this way it will only update full-tile ones
|
||||
//This spawn is here so windows get properly updated when one gets deleted.
|
||||
spawn(2)
|
||||
if(!src) return
|
||||
if (!is_fulltile())
|
||||
return
|
||||
var/junction = 0 //will be used to determine from which side the window is connected to other windows
|
||||
if (src.anchored)
|
||||
for(var/obj/structure/window/W in orange(src,1))
|
||||
if (W.anchored && W.density && W.is_fulltile()) //Only counts anchored, not-destroyed fill-tile windows.
|
||||
if (abs(src.x-W.x)-abs(src.y-W.y) ) //doesn't count windows, placed diagonally to src
|
||||
junction |= get_dir(src,W)
|
||||
if (opacity)
|
||||
src.icon_state = "twindow[junction]"
|
||||
else
|
||||
if (reinf)
|
||||
src.icon_state = "rwindow[junction]"
|
||||
else
|
||||
src.icon_state = "window[junction]"
|
||||
|
||||
return
|
||||
Reference in New Issue
Block a user