Another small chunk of reorganizing objects.

I've cleared out most of the .dm files in code/game/objects/ and put it into appropriate files/folders. The stuff I've left is stuff I believe may conflict with carn's work and some code for stuff that does not have a home yet.

TODO:
- Files that were left in code/game/objects that may conflict with carns work
- Go through all the files in all the subfolders of code/game/objects.
- Move all the defines from /defines/ to their proper spots

Not much right?

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4520 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
johnsonmt88@gmail.com
2012-08-22 21:55:46 +00:00
parent 71d3c7e353
commit 1a8fb7c09e
60 changed files with 1032 additions and 1063 deletions
@@ -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,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,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"
+214
View File
@@ -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
+73
View File
@@ -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,321 @@
//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(need_rebuild)
if(istype(source)) //Rebuild/update nearby group geometry
if(source.parent)
air_master.groups_to_rebuild += source.parent
else
air_master.tiles_to_update += source
if(istype(north))
if(north.parent)
air_master.groups_to_rebuild += north.parent
else
air_master.tiles_to_update += north
if(istype(south))
if(south.parent)
air_master.groups_to_rebuild += south.parent
else
air_master.tiles_to_update += south
if(istype(east))
if(east.parent)
air_master.groups_to_rebuild += east.parent
else
air_master.tiles_to_update += east
if(istype(west))
if(west.parent)
air_master.groups_to_rebuild += west.parent
else
air_master.tiles_to_update += west
else
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)
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,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,193 @@
/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/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] unbuckled himself!",\
"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
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/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
@@ -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
+365
View File
@@ -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"