Merge branch 'master' of https://github.com/tgstation/-tg-station into newhosjumpsuit

Conflicts:
	code/game/objects/structures/crates_lockers/closets/secure/security.dm
	code/modules/clothing/under/jobs/security.dm
	code/modules/clothing/under/miscellaneous.dm
	code/modules/clothing/under/ties.dm
	icons/mob/head.dmi
	icons/mob/uniform.dmi
	icons/obj/clothing/hats.dmi
	icons/obj/clothing/uniforms.dmi
This commit is contained in:
Miauw
2015-01-07 14:59:24 +01:00
1091 changed files with 57356 additions and 80658 deletions
+1 -1
View File
@@ -37,7 +37,7 @@
var/mob/M = G.affecting
M.resting = 1
M.loc = loc
visible_message("<span class='notice'>[M] has been laid on [src] by [user].</span>")
visible_message("<span class='notice'>[user] has laid [M] on [src].</span>")
patient = M
check_patient()
qdel(W)
@@ -51,15 +51,15 @@
. = ..(O, user, 0, 0, 0)
if(.)
if(O != user)
user.visible_message("<span class='danger'>[user] tries to stuff [O] into the [src].</span>", \
"<span class='danger'>You try to stuff [O] into the [src].</span>", \
user.visible_message("<span class='danger'>[user] tries to stuff [O] into [src].</span>", \
"<span class='danger'>You try to stuff [O] into [src].</span>", \
"<span class='danger'>You hear clanging.</span>")
if (!do_after(user, 40))
return
if(!..(O, user, 0, 0))
return
user.visible_message("<span class='notice'>[user] stuffs [O] into the [src].</span>", \
"<span class='notice'>You stuff [O] into the [src].</span>", \
user.visible_message("<span class='notice'>[user] stuffs [O] into[src].</span>", \
"<span class='notice'>You stuff [O] into [src].</span>", \
"<span class='notice'>You hear a loud metal bang.</span>")
insert(O, 1, !opened)
if(opened)
@@ -127,49 +127,30 @@
return src.open()
// this should probably use dump_contents()
/obj/structure/closet/ex_act(severity)
switch(severity)
if(1)
for(var/atom/movable/A as mob|obj in src)//pulls everything out of the locker and hits it with an explosion
A.loc = src.loc
A.ex_act(severity++)
qdel(src)
if(2)
if(prob(50))
for (var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.ex_act(severity++)
qdel(src)
if(3)
if(prob(5))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.ex_act(severity++)
qdel(src)
/obj/structure/closet/ex_act(severity, target)
contents_explosion(severity, target)
open()
..()
/obj/structure/closet/bullet_act(var/obj/item/projectile/Proj)
..()
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
health -= Proj.damage
if(health <= 0)
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
dump_contents()
qdel(src)
return
/obj/structure/closet/attack_animal(mob/living/simple_animal/user as mob)
if(user.environment_smash)
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] destroys the [src].</span>")
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
visible_message("<span class='danger'>[user] destroys \the [src].</span>")
dump_contents()
qdel(src)
// this should probably use dump_contents()
/obj/structure/closet/blob_act()
if(prob(75))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
dump_contents()
qdel(src)
@@ -189,14 +170,14 @@
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 begin cutting the [src] apart...</span>"
user << "<span class='notice'>You begin cutting \the [src] apart...</span>"
playsound(loc, 'sound/items/Welder.ogg', 40, 1)
if(do_after(user,40,5,1))
if( !src.opened || !istype(src, /obj/structure/closet) || !user || !WT || !WT.isOn() || !user.loc )
return
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
new /obj/item/stack/sheet/metal(src.loc)
visible_message("<span class='notice'>\The [src] has been cut apart by [user] with \the [WT].</span>", "You hear welding.")
visible_message("<span class='notice'>[user] has cut \the [src] apart with \the [WT].</span>", "You hear welding.")
qdel(src)
return
@@ -211,16 +192,16 @@
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 begin [welded ? "unwelding":"welding"] the [src]...</span>"
user << "<span class='notice'>You begin [welded ? "unwelding":"welding"] \the [src]...</span>"
playsound(loc, 'sound/items/Welder2.ogg', 40, 1)
if(do_after(user,40,5,1))
if(src.opened || !istype(src, /obj/structure/closet) || !user || !WT || !WT.isOn() || !user.loc )
return
playsound(loc, 'sound/items/welder.ogg', 50, 1)
welded = !welded
user << "<span class='notice'>You [welded ? "welded the [src] shut":"unwelded the [src]"]</span>"
user << "<span class='notice'>You [welded ? "welded [src] shut":"unwelded [src]"].</span>"
update_icon()
user.visible_message("<span class='warning'>[src] has been [welded? "welded shut":"unwelded"] by [user.name].</span>")
user.visible_message("<span class='warning'>[user.name] has [welded ? "welded [src] shut":"unwelded [src]"].</span>")
return
else if(!place(user, W))
src.attack_hand(user)
@@ -317,8 +298,8 @@
if(istype(user.loc, /obj/structure/closet/critter) && !welded)
breakout_time = 0.75 //45 seconds if it's an unwelded critter crate
if(opened || (!welded && !locked))
return //Door's open, not locked or welded, no point in resisting.
if( opened || (!welded && !locked && !istype(src.loc, /obj/mecha)) )
return //Door's open, not locked or welded or inside a mech, no point in resisting.
//okay, so the closet is either welded or locked... resist!!!
user.changeNext_move(CLICK_CD_BREAKOUT)
@@ -326,9 +307,8 @@
user << "<span class='notice'>You lean on the back of [src] and start pushing the door open. (this will take about [breakout_time] minutes.)</span>"
for(var/mob/O in viewers(src))
O << "<span class='warning'>[src] begins to shake violently!</span>"
var/turf/T = get_turf(src) //Check for moved locker
if(do_after(user,(breakout_time*60*10))) //minutes * 60seconds * 10deciseconds
if(!user || user.stat != CONSCIOUS || user.loc != src || opened || (!locked && !welded) || T != get_turf(src))
if(!user || user.stat != CONSCIOUS || user.loc != src || opened || (!locked && !welded && !istype(src.loc, /obj/mecha)) )
return
//we check after a while whether there is a point of resisting anymore and whether the user is capable of resisting
@@ -337,6 +317,11 @@
broken = 1 //applies to secure lockers only
visible_message("<span class='danger'>[user] successfully broke out of [src]!</span>")
user << "<span class='notice'>You successfully break out of [src]!</span>"
if(istype( src.loc, /obj/structure/bigDelivery))
var/obj/structure/bigDelivery/D = src.loc
qdel(D)
else if(istype( src.loc, /obj/mecha))
src.loc = get_turf(src.loc)
open()
else
user << "<span class='warning'>You fail to break out of [src]!</span>"
@@ -37,7 +37,7 @@
if(src.smashed || src.localopened)
if(localopened)
localopened = 0
icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
icon_state = "fireaxe[hasaxe][src.localopened][src.hitstaken][src.smashed]closing"
spawn(10) update_icon()
return
else
@@ -70,10 +70,10 @@
else
localopened = !localopened
if(localopened)
icon_state = text("fireaxe[][][][]opening",hasaxe,src.localopened,src.hitstaken,src.smashed)
icon_state = "fireaxe[hasaxe][src.localopened][src.hitstaken][src.smashed]opening"
spawn(10) update_icon()
else
icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
icon_state = "fireaxe[hasaxe][src.localopened][src.hitstaken][src.smashed]closing"
spawn(10) update_icon()
else
if(src.smashed)
@@ -81,7 +81,7 @@
if(istype(O, /obj/item/device/multitool))
if(localopened)
localopened = 0
icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
icon_state = "fireaxe[hasaxe][src.localopened][src.hitstaken][src.smashed]closing"
spawn(10) update_icon()
return
else
@@ -94,17 +94,52 @@
else
localopened = !localopened
if(localopened)
icon_state = text("fireaxe[][][][]opening",hasaxe,src.localopened,src.hitstaken,src.smashed)
icon_state = "fireaxe[hasaxe][src.localopened][src.hitstaken][src.smashed]opening"
spawn(10) update_icon()
else
icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
icon_state = "fireaxe[hasaxe][src.localopened][src.hitstaken][src.smashed]closing"
spawn(10) update_icon()
/obj/structure/closet/fireaxecabinet/ex_act(severity, target)
switch(severity)
if(1.0)
qdel(src)
return
if(2.0)
if(prob(50))
if(fireaxe)
fireaxe.loc = src.loc
qdel(src)
return
if(3.0)
return
/obj/structure/closet/fireaxecabinet/bullet_act(var/obj/item/projectile/Proj)
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
health -= Proj.damage
if(Proj.damage >= 15 && !smashed && !localopened)
hitstaken++
if(health <= 0)
if(fireaxe)
fireaxe.loc = src.loc
qdel(src)
return
if(hitstaken >= 4)
playsound(src, 'sound/effects/Glassbr3.ogg', 100, 1)
smashed = 1
locked = 0
localopened = 1
update_icon()
/obj/structure/closet/fireaxecabinet/blob_act()
if(prob(75))
if(fireaxe)
fireaxe.loc = src.loc
qdel(src)
/obj/structure/closet/fireaxecabinet/attack_hand(mob/user as mob)
var/hasaxe = 0
if(fireaxe)
hasaxe = 1
@@ -125,19 +160,19 @@
else
localopened = !localopened
if(localopened)
src.icon_state = text("fireaxe[][][][]opening",hasaxe,src.localopened,src.hitstaken,src.smashed)
src.icon_state = "fireaxe[hasaxe][src.localopened][src.hitstaken][src.smashed]opening"
spawn(10) update_icon()
else
src.icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
src.icon_state = "fireaxe[hasaxe][src.localopened][src.hitstaken][src.smashed]closing"
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)
src.icon_state = "fireaxe[hasaxe][src.localopened][src.hitstaken][src.smashed]opening"
spawn(10) update_icon()
else
src.icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
src.icon_state = "fireaxe[hasaxe][src.localopened][src.hitstaken][src.smashed]closing"
spawn(10) update_icon()
/obj/structure/closet/fireaxecabinet/attack_tk(mob/user as mob)
@@ -201,7 +236,7 @@
var/hasaxe = 0
if(fireaxe)
hasaxe = 1
icon_state = text("fireaxe[][][][]",hasaxe,src.localopened,src.hitstaken,src.smashed)
icon_state = "fireaxe[hasaxe][src.localopened][src.hitstaken][src.smashed]"
/obj/structure/closet/fireaxecabinet/open()
return
@@ -6,7 +6,6 @@
/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)
@@ -20,7 +19,6 @@
/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)
@@ -33,7 +31,6 @@
/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)
@@ -47,7 +44,6 @@
/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/weapon/gun/energy/laser/redtag(src)
@@ -65,7 +61,6 @@
/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/weapon/gun/energy/laser/bluetag(src)
@@ -36,7 +36,6 @@
/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)
@@ -58,17 +57,16 @@
/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/combat(src)
new /obj/item/clothing/gloves/combat(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/mask/gas/sechailer/swat(src)
new /obj/item/clothing/mask/gas/sechailer/swat(src)
new /obj/item/clothing/shoes/combat/swat(src)
new /obj/item/clothing/shoes/combat/swat(src)
new /obj/item/clothing/suit/space/deathsquad(src)
new /obj/item/clothing/suit/space/deathsquad(src)
new /obj/item/clothing/under/syndicate/tacticool(src)
@@ -85,14 +83,12 @@
/obj/structure/closet/thunderdome/New()
..()
sleep(2)
/obj/structure/closet/thunderdome/tdred
name = "red-team Thunderdome closet"
/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)
@@ -120,7 +116,6 @@
/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)
@@ -16,7 +16,6 @@
/obj/structure/closet/gmcloset/New()
..()
sleep(2)
new /obj/item/clothing/head/that(src)
new /obj/item/device/radio/headset/headset_srv(src)
new /obj/item/device/radio/headset/headset_srv(src)
@@ -37,23 +36,26 @@
*/
/obj/structure/closet/chefcloset
name = "\proper chef's closet"
desc = "It's a storage unit for foodservice garments."
desc = "It's a storage unit for foodservice garments and mouse traps."
icon_state = "black"
icon_closed = "black"
/obj/structure/closet/chefcloset/New()
..()
sleep(2)
new /obj/item/clothing/under/waiter(src)
new /obj/item/clothing/under/waiter(src)
new /obj/item/device/radio/headset/headset_srv(src)
new /obj/item/device/radio/headset/headset_srv(src)
new /obj/item/clothing/tie/waistcoat(src)
new /obj/item/clothing/tie/waistcoat(src)
new /obj/item/clothing/head/soft/black(src)
new /obj/item/clothing/head/soft/black(src)
new /obj/item/clothing/suit/apron/chef(src)
new /obj/item/clothing/suit/apron/chef(src)
new /obj/item/clothing/suit/apron/chef(src)
new /obj/item/clothing/head/soft/mime(src)
new /obj/item/clothing/head/soft/mime(src)
new /obj/item/weapon/storage/box/mousetraps(src)
new /obj/item/weapon/storage/box/mousetraps(src)
new /obj/item/clothing/suit/toggle/chef(src)
new /obj/item/clothing/under/rank/chef(src)
new /obj/item/clothing/head/chefhat(src)
@@ -68,10 +70,9 @@
/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/clothing/gloves/black(src)
new /obj/item/clothing/gloves/color/black(src)
new /obj/item/clothing/head/soft/purple(src)
new /obj/item/device/flashlight(src)
new /obj/item/weapon/caution(src)
@@ -98,10 +99,10 @@
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/suit/toggle/lawyer(src)
new /obj/item/clothing/under/lawyer/purpsuit(src)
new /obj/item/clothing/suit/lawyer/purpjacket(src)
new /obj/item/clothing/suit/toggle/lawyer/purple(src)
new /obj/item/clothing/under/lawyer/blacksuit(src)
new /obj/item/clothing/suit/lawyer/blackjacket(src)
new /obj/item/clothing/suit/toggle/lawyer/black(src)
new /obj/item/clothing/shoes/laceup(src)
new /obj/item/clothing/shoes/laceup(src)
@@ -7,7 +7,6 @@
/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 )
@@ -19,7 +18,6 @@
/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 )
@@ -32,7 +30,6 @@
/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 )
@@ -45,7 +42,6 @@
/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 )
@@ -58,7 +54,6 @@
/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 )
@@ -71,7 +66,6 @@
/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 )
@@ -7,7 +7,6 @@
/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)
@@ -11,7 +11,6 @@
/obj/structure/closet/secure_closet/bar/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 )
@@ -10,13 +10,13 @@
/obj/structure/closet/secure_closet/cargotech/New()
..()
sleep(2)
new /obj/item/clothing/under/rank/cargotech(src)
new /obj/item/clothing/shoes/sneakers/black(src)
new /obj/item/device/radio/headset/headset_cargo(src)
new /obj/item/clothing/gloves/fingerless(src)
new /obj/item/clothing/head/soft(src)
// new /obj/item/weapon/cartridge/quartermaster(src)
new /obj/item/clothing/suit/toggle/wintercoat/cargo(src)
return
/obj/structure/closet/secure_closet/quartermaster
@@ -31,7 +31,6 @@
/obj/structure/closet/secure_closet/quartermaster/New()
..()
sleep(2)
new /obj/item/clothing/under/rank/cargo(src)
new /obj/item/clothing/shoes/sneakers/brown(src)
new /obj/item/device/radio/headset/headset_cargo(src)
@@ -42,4 +41,5 @@
new /obj/item/clothing/mask/gas(src)
new /obj/item/clothing/glasses/meson(src)
new /obj/item/clothing/head/soft(src)
new /obj/item/clothing/suit/toggle/wintercoat/cargo(src)
return
@@ -11,7 +11,6 @@
/obj/structure/closet/secure_closet/engineering_chief/New()
..()
sleep(2)
if(prob(50))
new /obj/item/weapon/storage/backpack/industrial(src)
else
@@ -21,7 +20,7 @@
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/gloves/color/yellow(src)
new /obj/item/clothing/shoes/sneakers/brown(src)
new /obj/item/weapon/cartridge/ce(src)
new /obj/item/device/radio/headset/heads/ce(src)
@@ -31,6 +30,7 @@
new /obj/item/clothing/mask/gas(src)
new /obj/item/device/multitool(src)
new /obj/item/device/flash/handheld(src)
new /obj/item/clothing/suit/toggle/wintercoat/engineering(src)
return
/obj/structure/closet/secure_closet/engineering_electrical
@@ -46,9 +46,8 @@
/obj/structure/closet/secure_closet/engineering_electrical/New()
..()
sleep(2)
new /obj/item/clothing/gloves/yellow(src)
new /obj/item/clothing/gloves/yellow(src)
new /obj/item/clothing/gloves/color/yellow(src)
new /obj/item/clothing/gloves/color/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)
@@ -75,7 +74,6 @@
/obj/structure/closet/secure_closet/engineering_welding/New()
..()
sleep(2)
new /obj/item/clothing/head/welding(src)
new /obj/item/clothing/head/welding(src)
new /obj/item/clothing/head/welding(src)
@@ -99,7 +97,6 @@
/obj/structure/closet/secure_closet/engineering_personal/New()
..()
sleep(2)
if(prob(50))
new /obj/item/weapon/storage/backpack/industrial(src)
else
@@ -112,4 +109,29 @@
new /obj/item/clothing/suit/hazardvest(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/clothing/glasses/meson(src)
new /obj/item/clothing/suit/toggle/wintercoat/engineering(src)
return
/obj/structure/closet/secure_closet/atmospherics
name = "\proper atmospheric technician's locker"
req_access = list(access_atmospherics)
icon_state = "secureatmos1"
icon_closed = "secureatmos"
icon_locked = "secureatmos1"
icon_opened = "secureatmosopen"
icon_broken = "secureatmosbroken"
icon_off = "secureatmosoff"
/obj/structure/closet/secure_closet/atmospherics/New()
..()
new /obj/item/device/radio/headset/headset_eng(src)
new /obj/item/weapon/pipe_dispenser(src)
new /obj/item/weapon/storage/toolbox/mechanical(src)
new /obj/item/weapon/storage/backpack/satchel_norm(src)
new /obj/item/weapon/tank/emergency_oxygen/engi(src)
new /obj/item/weapon/watertank/atmos(src)
new /obj/item/clothing/suit/fire/atmos(src)
new /obj/item/clothing/head/hardhat/atmos(src)
new /obj/item/clothing/suit/toggle/wintercoat/engineering/atmos(src)
return
@@ -18,7 +18,6 @@
/obj/structure/closet/secure_closet/freezer/kitchen/New()
..()
sleep(2)
for(var/i = 0, i < 3, i++)
new /obj/item/weapon/reagent_containers/food/drinks/flour(src)
new /obj/item/weapon/reagent_containers/food/condiment/sugar(src)
@@ -42,7 +41,6 @@
/obj/structure/closet/secure_closet/freezer/meat/New()
..()
sleep(2)
for(var/i = 0, i < 4, i++)
new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey(src)
return
@@ -61,7 +59,6 @@
/obj/structure/closet/secure_closet/freezer/fridge/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++)
@@ -86,7 +83,6 @@
/obj/structure/closet/secure_closet/freezer/money/New()
..()
sleep(2)
for(var/i = 0, i < 3, i++)
new /obj/item/weapon/spacecash/c1000(src)
for(var/i = 0, i < 5, i++)
@@ -11,7 +11,6 @@
New()
..()
sleep(2)
switch(rand(1,2))
if(1)
new /obj/item/clothing/suit/apron(src)
@@ -24,4 +23,5 @@
new /obj/item/clothing/head/greenbandana(src)
new /obj/item/weapon/minihoe(src)
new /obj/item/weapon/hatchet(src)
new /obj/item/clothing/suit/toggle/wintercoat/hydro(src)
return
@@ -12,7 +12,6 @@
/obj/structure/closet/secure_closet/medical1/New()
..()
sleep(2)
new /obj/item/weapon/storage/box/syringes(src)
new /obj/item/weapon/reagent_containers/dropper(src)
new /obj/item/weapon/reagent_containers/dropper(src)
@@ -40,7 +39,6 @@
/obj/structure/closet/secure_closet/medical2/New()
..()
sleep(2)
new /obj/item/weapon/tank/anesthetic(src)
new /obj/item/weapon/tank/anesthetic(src)
new /obj/item/weapon/tank/anesthetic(src)
@@ -63,19 +61,19 @@
/obj/structure/closet/secure_closet/medical3/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/medical(src)
new /obj/item/clothing/suit/labcoat(src)
new /obj/item/clothing/suit/toggle/labcoat(src)
new /obj/item/clothing/shoes/sneakers/white(src)
new /obj/item/device/radio/headset/headset_med(src)
new /obj/item/clothing/gloves/latex(src)
new /obj/item/weapon/defibrillator/loaded(src)
new /obj/item/clothing/gloves/color/latex/nitrile(src)
new /obj/item/weapon/storage/belt/medical(src)
new /obj/item/clothing/glasses/hud/health(src)
new /obj/item/clothing/suit/toggle/wintercoat/medical(src)
return
@@ -92,22 +90,22 @@
/obj/structure/closet/secure_closet/CMO/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/suit/labcoat/cmo(src)
new /obj/item/clothing/suit/toggle/labcoat/cmo(src)
new /obj/item/clothing/under/rank/chief_medical_officer(src)
new /obj/item/clothing/shoes/sneakers/brown (src)
new /obj/item/weapon/cartridge/cmo(src)
new /obj/item/device/radio/headset/heads/cmo(src)
new /obj/item/clothing/gloves/latex(src)
new /obj/item/weapon/defibrillator/loaded(src)
new /obj/item/clothing/gloves/color/latex/nitrile(src)
new /obj/item/weapon/storage/belt/medical(src)
new /obj/item/device/flash/handheld(src)
new /obj/item/clothing/suit/toggle/wintercoat/medical(src)
new /obj/item/weapon/reagent_containers/hypospray/CMO(src)
return
@@ -120,7 +118,6 @@
/obj/structure/closet/secure_closet/animal/New()
..()
sleep(2)
new /obj/item/device/assembly/signaler(src)
new /obj/item/device/electropack(src)
new /obj/item/device/electropack(src)
@@ -132,18 +129,17 @@
/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_state = "chemical1"
icon_closed = "chemical"
icon_locked = "chemical1"
icon_opened = "medicalopen"
icon_broken = "medicalbroken"
icon_off = "medicaloff"
icon_broken = "chemicalbroken"
icon_off = "chemicaloff"
req_access = list(access_chemistry)
/obj/structure/closet/secure_closet/chemical/New()
..()
sleep(2)
new /obj/item/weapon/storage/box/pillbottles(src)
new /obj/item/weapon/storage/box/pillbottles(src)
return
@@ -51,6 +51,8 @@
contents = list()
new /obj/item/weapon/storage/backpack/satchel/withwallet( src )
new /obj/item/device/radio/headset( src )
new /obj/item/clothing/suit/toggle/wintercoat(src)
new /obj/item/clothing/head/santa(src)
return
/obj/structure/closet/secure_closet/personal/attackby(obj/item/W as obj, mob/user as mob)
@@ -10,14 +10,14 @@
/obj/structure/closet/secure_closet/scientist/New()
..()
sleep(2)
new /obj/item/clothing/under/rank/scientist(src)
new /obj/item/clothing/suit/labcoat/science(src)
new /obj/item/clothing/suit/toggle/labcoat/science(src)
new /obj/item/clothing/shoes/sneakers/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)
new /obj/item/clothing/suit/toggle/wintercoat/science(src)
return
@@ -34,20 +34,20 @@
/obj/structure/closet/secure_closet/RD/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/suit/labcoat(src)
new /obj/item/clothing/suit/toggle/labcoat(src)
new /obj/item/clothing/under/rank/research_director(src)
new /obj/item/clothing/under/rank/research_director/alt(src)
new /obj/item/clothing/under/rank/research_director/turtleneck(src)
new /obj/item/weapon/cartridge/rd(src)
new /obj/item/clothing/shoes/sneakers/white(src)
new /obj/item/clothing/gloves/latex(src)
new /obj/item/clothing/gloves/color/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/clothing/suit/armor/reactive(src)
new /obj/item/device/flash/handheld(src)
new /obj/item/device/laser_pointer(src)
new /obj/item/clothing/suit/toggle/wintercoat/science(src)
return
@@ -45,8 +45,8 @@
src.locked = !src.locked
add_fingerprint(user)
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((O.client && !( O.eye_blind )))
O << "<span class='notice'>[user] has [locked ? null : "un"]locked the locker.</span>"
if(src.locked)
src.icon_state = src.icon_locked
else
@@ -65,26 +65,31 @@
if(!src.opened && 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)
else if(istype(W, /obj/item/weapon/melee/energy/blade) && !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)
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)
visible_message("<span class='warning'>[user] has sliced the locker open with an energy blade!</span>", "You hear metal being sliced and sparks flying.")
else
..(W, user)
/obj/structure/closet/secure_closet/emag_act(mob/user as mob)
if(!broken)
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = icon_off
flick(icon_broken, src)
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)
/obj/structure/closet/secure_closet/relaymove(mob/user as mob)
if(user.stat || !isturf(src.loc))
return
@@ -10,20 +10,21 @@
/obj/structure/closet/secure_closet/captains/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/under/captainformal(src)
new /obj/item/clothing/under/captainparade(src)
new /obj/item/clothing/head/caphat/parade(src)
new /obj/item/clothing/under/rank/captain(src)
new /obj/item/clothing/suit/armor/vest/capcarapace(src)
new /obj/item/weapon/cartridge/captain(src)
new /obj/item/clothing/shoes/sneakers/brown(src)
new /obj/item/device/radio/headset/heads/captain/alt(src)
new /obj/item/clothing/gloves/captain(src)
new /obj/item/clothing/gloves/color/captain(src)
new /obj/item/clothing/suit/toggle/wintercoat/captain(src)
new /obj/item/clothing/head/santa(src)
new /obj/item/weapon/gun/energy/gun(src)
return
@@ -39,7 +40,6 @@
/obj/structure/closet/secure_closet/hop/New()
..()
sleep(2)
new /obj/item/clothing/under/rank/head_of_personnel(src)
new /obj/item/clothing/head/hopcap(src)
new /obj/item/weapon/cartridge/hop(src)
@@ -47,11 +47,13 @@
new /obj/item/clothing/shoes/sneakers/brown(src)
new /obj/item/weapon/storage/box/ids(src)
new /obj/item/weapon/storage/box/ids(src)
new /obj/item/clothing/suit/armor/vest(src)
new /obj/item/clothing/suit/armor/vest/alt(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/device/flash/handheld(src)
new /obj/item/clothing/glasses/sunglasses(src)
new /obj/item/weapon/mining_voucher(src)
new /obj/item/clothing/suit/toggle/wintercoat/cargo(src)
new /obj/item/clothing/head/hardhat/reindeer()
return
@@ -68,24 +70,22 @@
/obj/structure/closet/secure_closet/hos/New()
..()
sleep(2)
new /obj/item/clothing/suit/armor/vest(src)
new /obj/item/clothing/under/hosformalfem(src)
new /obj/item/clothing/under/hosformalmale(src)
new /obj/item/clothing/suit/armor/hos/trenchcoat(src)
new /obj/item/clothing/head/HoS/drill(src)
new /obj/item/clothing/head/HoS/formal(src)
new /obj/item/weapon/cartridge/hos(src)
new /obj/item/device/radio/headset/heads/hos/alt(src)
new /obj/item/device/radio/headset/heads/hos(src)
new /obj/item/clothing/under/hosparadefem(src)
new /obj/item/clothing/under/hosparademale(src)
new /obj/item/clothing/suit/armor/hos(src)
new /obj/item/clothing/head/HoS(src)
new /obj/item/clothing/head/HoS/formal(src)
new /obj/item/clothing/glasses/hud/security/eyepatch(src)
new /obj/item/weapon/storage/lockbox/loyalty(src)
new /obj/item/weapon/shield/riot/tele(src)
new /obj/item/clothing/mask/gas/sechailer/hos(src)
new /obj/item/weapon/storage/box/flashbangs(src)
new /obj/item/device/flash/handheld(src)
new /obj/item/clothing/mask/gas/sechailer/swat(src)
new /obj/item/weapon/shield/riot/tele(src)
new /obj/item/weapon/melee/baton/loaded(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/weapon/gun/energy/gun/advtaser(src)
new /obj/item/weapon/storage/belt/security(src)
new /obj/item/clothing/suit/toggle/wintercoat/security(src)
return
@@ -102,20 +102,20 @@
/obj/structure/closet/secure_closet/warden/New()
..()
sleep(2)
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/device/radio/headset/headset_sec(src)
new /obj/item/clothing/suit/armor/vest/warden/(src)
new /obj/item/clothing/head/warden(src)
new /obj/item/device/radio/headset/headset_sec/alt(src)
new /obj/item/clothing/suit/armor/vest/warden/alt(src)
new /obj/item/clothing/head/beret/sec/navywarden(src)
new /obj/item/clothing/glasses/hud/security/sunglasses(src)
new /obj/item/clothing/mask/gas/sechailer/warden(src)
new /obj/item/clothing/mask/gas/sechailer(src)
new /obj/item/weapon/storage/box/flashbangs(src)
new /obj/item/weapon/storage/box/zipties(src)
new /obj/item/weapon/reagent_containers/spray/pepper(src)
new /obj/item/weapon/melee/baton/loaded(src)
new /obj/item/weapon/gun/energy/taser(src)
new /obj/item/weapon/gun/energy/gun/advtaser(src)
new /obj/item/weapon/storage/belt/security(src)
new /obj/item/clothing/suit/toggle/wintercoat/security(src)
return
@@ -132,17 +132,15 @@
/obj/structure/closet/secure_closet/security/New()
..()
sleep(2)
new /obj/item/clothing/suit/armor/vest(src)
new /obj/item/clothing/head/helmet(src)
new /obj/item/device/radio/headset/headset_sec/alt(src)
new /obj/item/clothing/mask/gas/sechailer(src)
new /obj/item/device/flash/handheld(src)
new /obj/item/clothing/head/soft/sec(src)
new /obj/item/weapon/reagent_containers/spray/pepper(src)
new /obj/item/device/flash/handheld(src)
new /obj/item/weapon/grenade/flashbang(src)
new /obj/item/weapon/gun/energy/taser(src)
new /obj/item/weapon/storage/belt/security(src)
new /obj/item/clothing/glasses/hud/security/sunglasses(src)
new /obj/item/clothing/suit/toggle/wintercoat/security(src)
return
@@ -198,20 +196,21 @@
/obj/structure/closet/secure_closet/detective/New()
..()
sleep(2)
new /obj/item/clothing/under/rank/det(src)
new /obj/item/clothing/suit/det_suit(src)
new /obj/item/clothing/head/det_hat(src)
new /obj/item/clothing/gloves/black(src)
new /obj/item/clothing/under/det/grey(src)
new /obj/item/clothing/gloves/color/black(src)
new /obj/item/clothing/under/rank/det/grey(src)
new /obj/item/clothing/tie/waistcoat(src)
new /obj/item/clothing/suit/det_suit/grey(src)
new /obj/item/clothing/head/fedora(src)
new /obj/item/clothing/shoes/laceup(src)
new /obj/item/weapon/storage/box/evidence(src)
new /obj/item/weapon/clipboard(src)
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/device/radio/headset/headset_sec/alt(src)
new /obj/item/device/detective_scanner(src)
new /obj/item/clothing/suit/armor/vest/det_suit(src)
new /obj/item/clothing/suit/toggle/wintercoat(src)
new /obj/item/ammo_box/c38(src)
new /obj/item/ammo_box/c38(src)
new /obj/item/weapon/gun/projectile/revolver/detective(src)
@@ -235,7 +234,6 @@
/obj/structure/closet/secure_closet/injection/New()
..()
sleep(2)
new /obj/item/weapon/reagent_containers/syringe/lethal/choral(src)
new /obj/item/weapon/reagent_containers/syringe/lethal/choral(src)
new /obj/item/weapon/reagent_containers/syringe/lethal/choral(src)
@@ -262,7 +260,6 @@
/obj/structure/closet/secure_closet/courtroom/New()
..()
sleep(2)
new /obj/item/clothing/shoes/sneakers/brown(src)
new /obj/item/weapon/paper/Court (src)
new /obj/item/weapon/paper/Court (src)
@@ -298,4 +295,3 @@
icon_state = icon_closed
else
icon_state = icon_opened
@@ -22,7 +22,7 @@
L.client.perspective = EYE_PERSPECTIVE
L.client.eye = src
L.loc = src
L.sdisabilities += MUTE
L.disabilities += MUTE
L.faction += "mimic" //Stops mimics from instaqdeling people in statues
health = L.health + 100 //stoning damaged mobs will result in easier to shatter statues
@@ -46,7 +46,7 @@
qdel(src)
return
processing_objects.Add(src)
SSobj.processing.Add(src)
..()
/obj/structure/closet/statue/process()
@@ -58,7 +58,7 @@
M.setOxyLoss(intialOxy)
if (timer <= 0)
dump_contents()
processing_objects.Remove(src)
SSobj.processing.Remove(src)
qdel(src)
/obj/structure/closet/statue/dump_contents()
@@ -79,7 +79,7 @@
for(var/mob/living/M in src)
M.loc = src.loc
M.sdisabilities -= MUTE
M.disabilities -= MUTE
M.take_overall_damage((M.health - health - 100),0) //any new damage the statue incurred is transfered to the mob
M.faction -= "mimic"
if(M.client)
@@ -11,10 +11,9 @@
/obj/structure/closet/syndicate/personal/New()
..()
sleep(2)
new /obj/item/clothing/under/syndicate(src)
new /obj/item/clothing/suit/armor/vest(src)
new /obj/item/clothing/head/helmet/swat/syndicate(src)
new /obj/item/clothing/shoes/sneakers/black(src)
new /obj/item/device/radio/headset/syndicate(src)
new /obj/item/ammo_box/magazine/m10mm(src)
new /obj/item/weapon/storage/belt/military(src)
new /obj/item/weapon/crowbar/red(src)
@@ -26,7 +25,6 @@
/obj/structure/closet/syndicate/nuclear/New()
..()
sleep(2)
new /obj/item/ammo_box/magazine/m10mm(src)
new /obj/item/ammo_box/magazine/m10mm(src)
new /obj/item/ammo_box/magazine/m10mm(src)
@@ -34,11 +32,11 @@
new /obj/item/ammo_box/magazine/m10mm(src)
new /obj/item/weapon/storage/box/flashbangs(src)
new /obj/item/weapon/storage/box/teargas(src)
new /obj/item/weapon/gun/projectile/automatic/bulldog(src)
new /obj/item/weapon/gun/projectile/automatic/bulldog(src)
new /obj/item/weapon/gun/projectile/automatic/bulldog(src)
new /obj/item/weapon/gun/projectile/automatic/bulldog(src)
new /obj/item/weapon/gun/projectile/automatic/bulldog(src)
new /obj/item/weapon/gun/projectile/automatic/shotgun/bulldog(src)
new /obj/item/weapon/gun/projectile/automatic/shotgun/bulldog(src)
new /obj/item/weapon/gun/projectile/automatic/shotgun/bulldog(src)
new /obj/item/weapon/gun/projectile/automatic/shotgun/bulldog(src)
new /obj/item/weapon/gun/projectile/automatic/shotgun/bulldog(src)
new /obj/item/weapon/pinpointer/nukeop(src)
new /obj/item/weapon/pinpointer/nukeop(src)
new /obj/item/weapon/pinpointer/nukeop(src)
@@ -58,8 +56,6 @@
var/rare_max = 20 //Maximum HONK HONK HONK in the HONK for HONK rare HONK
sleep(2)
var/pickednum = rand(1, 50)
//Sad trombone
@@ -123,8 +119,6 @@
/obj/item/stack/rods
)
sleep(2)
for(var/i = 0, i<2, i++)
for(var/res in resources)
var/obj/item/stack/R = new res(src)
@@ -78,7 +78,6 @@
/obj/structure/closet/firecloset/full/New()
..()
sleep(4)
contents = list()
new /obj/item/clothing/suit/fire/firefighter(src)
@@ -133,7 +132,7 @@
if(prob(20))
new /obj/item/device/multitool(src)
if(prob(5))
new /obj/item/clothing/gloves/yellow(src)
new /obj/item/clothing/gloves/color/yellow(src)
if(prob(40))
new /obj/item/clothing/head/hardhat(src)
@@ -165,7 +164,6 @@
/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/sneakers/black( src )
@@ -181,7 +179,6 @@
/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/sneakers/brown( src )
@@ -21,8 +21,6 @@
/obj/structure/closet/wardrobe/red/New()
new /obj/item/weapon/storage/backpack/security(src)
new /obj/item/weapon/storage/backpack/security(src)
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/clothing/under/rank/security(src)
new /obj/item/clothing/under/rank/security(src)
@@ -30,12 +28,15 @@
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)
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/santa(src)
new /obj/item/clothing/head/santa(src)
new /obj/item/clothing/head/santa(src)
return
/obj/structure/closet/wardrobe/pink
@@ -86,8 +87,7 @@
new /obj/item/clothing/shoes/sneakers/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/toggle/chaplain_hoodie(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)
@@ -129,7 +129,7 @@
/obj/structure/closet/wardrobe/yellow
name = "yellow wardrobe"
icon_state = "yellow"
icon_closed = "yeloww"
icon_closed = "yellow"
/obj/structure/closet/wardrobe/yellow/New()
new /obj/item/clothing/under/color/yellow(src)
@@ -195,15 +195,18 @@
/obj/structure/closet/wardrobe/white/medical/New()
new /obj/item/clothing/under/rank/nursesuit (src)
new /obj/item/clothing/head/nursehat (src)
new /obj/item/clothing/suit/labcoat/emt(src)
new /obj/item/clothing/suit/labcoat/emt(src)
new /obj/item/clothing/suit/labcoat/emt(src)
new /obj/item/clothing/under/rank/medical/blue(src)
new /obj/item/clothing/under/rank/medical/green(src)
new /obj/item/clothing/under/rank/medical/purple(src)
new /obj/item/clothing/suit/toggle/labcoat/emt(src)
new /obj/item/clothing/suit/toggle/labcoat/emt(src)
new /obj/item/clothing/suit/toggle/labcoat/emt(src)
new /obj/item/clothing/shoes/sneakers/black(src)
new /obj/item/clothing/shoes/sneakers/black(src)
new /obj/item/clothing/shoes/sneakers/black(src)
new /obj/item/clothing/head/soft/emt(src)
new /obj/item/clothing/head/soft/emt(src)
new /obj/item/clothing/head/soft/emt(src)
return
/obj/structure/closet/wardrobe/pjs
@@ -232,9 +235,9 @@
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/suit/toggle/labcoat(src)
new /obj/item/clothing/suit/toggle/labcoat(src)
new /obj/item/clothing/suit/toggle/labcoat(src)
new /obj/item/clothing/shoes/sneakers/white(src)
new /obj/item/clothing/shoes/sneakers/white(src)
new /obj/item/clothing/shoes/sneakers/white(src)
@@ -249,14 +252,15 @@
/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/suit/toggle/labcoat(src)
new /obj/item/clothing/suit/toggle/labcoat(src)
new /obj/item/clothing/shoes/sneakers/black(src)
new /obj/item/clothing/shoes/sneakers/black(src)
new /obj/item/clothing/gloves/fingerless(src)
new /obj/item/clothing/gloves/fingerless(src)
new /obj/item/clothing/head/soft/black(src)
new /obj/item/clothing/head/soft/black(src)
new /obj/item/clothing/suit/toggle/wintercoat/science(src)
return
@@ -270,8 +274,9 @@
new /obj/item/clothing/under/rank/chemist(src)
new /obj/item/clothing/shoes/sneakers/white(src)
new /obj/item/clothing/shoes/sneakers/white(src)
new /obj/item/clothing/suit/labcoat/chemist(src)
new /obj/item/clothing/suit/labcoat/chemist(src)
new /obj/item/clothing/suit/toggle/labcoat/chemist(src)
new /obj/item/clothing/suit/toggle/labcoat/chemist(src)
new /obj/item/clothing/suit/toggle/wintercoat/medical(src)
return
@@ -285,8 +290,9 @@
new /obj/item/clothing/under/rank/geneticist(src)
new /obj/item/clothing/shoes/sneakers/white(src)
new /obj/item/clothing/shoes/sneakers/white(src)
new /obj/item/clothing/suit/labcoat/genetics(src)
new /obj/item/clothing/suit/labcoat/genetics(src)
new /obj/item/clothing/suit/toggle/labcoat/genetics(src)
new /obj/item/clothing/suit/toggle/labcoat/genetics(src)
new /obj/item/clothing/suit/toggle/wintercoat/medical(src)
return
@@ -300,10 +306,11 @@
new /obj/item/clothing/under/rank/virologist(src)
new /obj/item/clothing/shoes/sneakers/white(src)
new /obj/item/clothing/shoes/sneakers/white(src)
new /obj/item/clothing/suit/labcoat/virologist(src)
new /obj/item/clothing/suit/labcoat/virologist(src)
new /obj/item/clothing/suit/toggle/labcoat/virologist(src)
new /obj/item/clothing/suit/toggle/labcoat/virologist(src)
new /obj/item/clothing/mask/surgical(src)
new /obj/item/clothing/mask/surgical(src)
new /obj/item/clothing/suit/toggle/wintercoat/medical(src)
return
@@ -326,6 +333,10 @@
new /obj/item/clothing/under/assistantformal(src)
if(prob(40))
new /obj/item/clothing/under/assistantformal(src)
if(prob(50))
new /obj/item/clothing/suit/toggle/wintercoat(src)
new /obj/item/clothing/shoes/winterboots(src)
new /obj/item/clothing/head/santa(src)
return
@@ -335,9 +346,9 @@
icon_closed = "mixed"
/obj/structure/closet/wardrobe/mixed/New()
if(prob(25))
if(prob(40))
new /obj/item/clothing/suit/jacket(src)
if(prob(25))
if(prob(40))
new /obj/item/clothing/suit/jacket(src)
new /obj/item/clothing/under/color/white(src)
new /obj/item/clothing/under/color/blue(src)
@@ -348,4 +359,8 @@
new /obj/item/clothing/shoes/sneakers/black(src)
new /obj/item/clothing/shoes/sneakers/brown(src)
new /obj/item/clothing/shoes/sneakers/white(src)
if(prob(50))
new /obj/item/clothing/suit/toggle/wintercoat(src)
new /obj/item/clothing/shoes/winterboots(src)
new /obj/item/clothing/head/santa(src)
return
@@ -307,7 +307,7 @@
overlays += redlight
add_fingerprint(user)
return
else if ( (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && locked &&!broken)
else if (istype(W, /obj/item/weapon/melee/energy/blade) && locked && !broken)
overlays.Cut()
overlays += emag
overlays += sparks
@@ -321,6 +321,18 @@
return ..()
/obj/structure/closet/crate/secure/emag_act(mob/user as mob)
if(locked && !broken)
overlays.Cut()
overlays += emag
overlays += sparks
spawn(6) overlays -= sparks //Tried lots of stuff but nothing works right. so i have to use this *sadface*
playsound(src.loc, "sparks", 60, 1)
src.locked = 0
src.broken = 1
user << "<span class='notice'>You unlock \the [src].</span>"
add_fingerprint(user)
/obj/structure/closet/crate/attack_paw(mob/user as mob)
return attack_hand(user)
+1 -1
View File
@@ -10,7 +10,7 @@
var/occupied = 1
var/destroyed = 0
/obj/structure/displaycase/ex_act(severity)
/obj/structure/displaycase/ex_act(severity, target)
switch(severity)
if (1)
new /obj/item/weapon/shard( src.loc )
+20 -11
View File
@@ -461,17 +461,26 @@ obj/structure/door_assembly/New()
return
else if(istype(W, /obj/item/weapon/wrench) && !anchored )
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user.visible_message("<span class='warning'>[user] secures the airlock assembly to the floor.</span>", \
"You start to secure the airlock assembly to the floor.", \
"You hear wrenching")
var/door_check = 1
for(var/obj/machinery/door/D in loc)
if(!D.sub_door)
door_check = 0
break
if(door_check)
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user.visible_message("<span class='warning'>[user] secures the airlock assembly to the floor.</span>", \
"You start to secure the airlock assembly to the floor.", \
"You hear wrenching")
if(do_after(user, 40))
if( src.anchored )
return
user << "<span class='notice'> You've secured the airlock assembly.</span>"
src.name = "secured airlock assembly"
src.anchored = 1
if(do_after(user, 40))
if( src.anchored )
return
user << "<span class='notice'> You've secured the airlock assembly.</span>"
src.name = "secured airlock assembly"
src.anchored = 1
else
user << "There is another door here!"
else if(istype(W, /obj/item/weapon/wrench) && anchored )
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
@@ -599,7 +608,7 @@ obj/structure/door_assembly/New()
"You start finishing the airlock.")
if(do_after(user, 40))
if(state == 2)
if(src.loc && state == 2)
user << "<span class='notice'> You've finished the airlock.</span>"
var/obj/machinery/door/airlock/door
if(mineral == "glass")
+5 -1
View File
@@ -12,7 +12,7 @@
if(ishuman(user))
var/mob/living/carbon/human/H = user
var/choice = input(user, "Underwear or Undershirt?", "Changing") as null|anything in list("Underwear","Undershirt")
var/choice = input(user, "Underwear, Undershirt, or Socks?", "Changing") as null|anything in list("Underwear","Undershirt","Socks")
if(!Adjacent(user))
return
@@ -26,6 +26,10 @@
var/new_undershirt = input(user, "Select your undershirt", "Changing") as null|anything in undershirt_list
if(new_undershirt)
H.undershirt = new_undershirt
if("Socks")
var/new_socks = input(user, "Select your socks", "Changing") as null|anything in socks_list
if(new_socks)
H.socks= new_socks
add_fingerprint(H)
H.update_body()
@@ -9,6 +9,21 @@
var/opened = 0
/obj/structure/extinguisher_cabinet/ex_act(severity, target)
switch(severity)
if(1.0)
qdel(src)
return
if(2.0)
if(prob(50))
if(has_extinguisher)
has_extinguisher.loc = src.loc
qdel(src)
return
if(3.0)
return
/obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user)
if(isrobot(user) || isalien(user))
return
+4 -3
View File
@@ -118,7 +118,7 @@
else
user << "<span class='warning'>You can't reach, close it first!</span>"
if(istype(W, /obj/item/weapon/pickaxe/plasmacutter) || istype(W, /obj/item/weapon/pickaxe/diamonddrill) || istype(W, /obj/item/weapon/melee/energy/blade))
if(istype(W, /obj/item/weapon/pickaxe/plasmacutter) || istype(W, /obj/item/weapon/pickaxe/drill/diamonddrill) || istype(W, /obj/item/weapon/melee/energy/blade))
dismantle(user)
/obj/structure/falsewall/proc/dismantle(mob/user)
@@ -275,7 +275,8 @@
desc = "A wall with bananium plating. Honk!"
icon_state = ""
mineral = "bananium"
walltype = "clown"
walltype = "bananium"
/obj/structure/falsewall/sandstone
name = "sandstone wall"
@@ -290,4 +291,4 @@
desc = "A wall with wooden plating."
icon_state = ""
mineral = "wood"
walltype = "wood"
walltype = "wood"
+2 -1
View File
@@ -89,7 +89,8 @@
anchored = 1
/obj/structure/flora/ausbushes/New()
icon_state = "firstbush_[rand(1, 4)]"
if(icon_state == "firstbush_1")
icon_state = "firstbush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/reedbush
+6 -6
View File
@@ -39,7 +39,7 @@
new /obj/item/stack/sheet/metal(get_turf(src))
qdel(src)
else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill))
else if(istype(W, /obj/item/weapon/pickaxe/drill/diamonddrill))
user << "<span class='notice'>You drill through the girder!</span>"
new /obj/item/stack/sheet/metal(get_turf(src))
qdel(src)
@@ -177,7 +177,7 @@
if (P.pipe_type in list(0, 1, 5)) //simple pipes, simple bends, and simple manifolds.
user.drop_item()
P.loc = src.loc
user << "<span class='notice'>You fit the pipe into the [src]!</span>"
user << "<span class='notice'>You fit the pipe into \the [src]!</span>"
else
..()
@@ -198,7 +198,7 @@
qdel(src)
/obj/structure/girder/ex_act(severity)
/obj/structure/girder/ex_act(severity, target)
switch(severity)
if(1.0)
qdel(src)
@@ -229,7 +229,7 @@
state = 2
girderpasschance = 0
/obj/structure/girder/reinforced/ex_act(severity)
/obj/structure/girder/reinforced/ex_act(severity, target)
switch(severity)
if(1.0)
qdel(src)
@@ -273,7 +273,7 @@
transfer_fingerprints_to(R)
qdel(src)
else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill))
else if(istype(W, /obj/item/weapon/pickaxe/drill/diamonddrill))
user << "<span class='notice'>You drill through the girder!</span>"
if(do_after(user, 5))
var/obj/effect/decal/remains/human/R = new (get_turf(src))
@@ -285,7 +285,7 @@
qdel(src)
/obj/structure/cultgirder/ex_act(severity)
/obj/structure/cultgirder/ex_act(severity, target)
switch(severity)
if(1.0)
qdel(src)
+46 -39
View File
@@ -8,7 +8,6 @@
flags = CONDUCT
pressure_resistance = 5*ONE_ATMOSPHERE
layer = 2.9
explosion_resistance = 5
var/health = 10
var/destroyed = 0
var/obj/item/stack/rods/stored
@@ -17,7 +16,7 @@
stored = new/obj/item/stack/rods(src)
stored.amount = 2
/obj/structure/grille/ex_act(severity)
/obj/structure/grille/ex_act(severity, target)
qdel(src)
/obj/structure/grille/blob_act()
@@ -30,6 +29,12 @@
/obj/structure/grille/attack_paw(mob/user as mob)
attack_hand(user)
/obj/structure/grille/attack_hulk(mob/living/carbon/human/user)
..(user, 1)
shock(user, 70)
health -= 5
healthcheck()
/obj/structure/grille/attack_hand(mob/living/user as mob)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
@@ -40,8 +45,6 @@
if(shock(user, 70))
return
if(HULK in user.mutations)
health -= 5
else
health -= rand(1,2)
healthcheck()
@@ -88,6 +91,13 @@
return
/obj/structure/grille/mech_melee_attack(obj/mecha/M)
if(..())
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
health -= M.force * 0.5
healthcheck()
/obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0) return 1
if(istype(mover) && mover.checkpass(PASSGRILLE))
@@ -132,57 +142,52 @@
if(!shock(user, 90))
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
anchored = !anchored
user.visible_message("<span class='notice'>[user] [anchored ? "fastens" : "unfastens"] the [src].</span>", \
"<span class='notice'>You have [anchored ? "fastened the [src] to" : "unfastened the [src] from"] the floor.</span>")
user.visible_message("<span class='notice'>[user] [anchored ? "fastens" : "unfastens"] [src].</span>", \
"<span class='notice'>You have [anchored ? "fastened [src] to" : "unfastened [src] from"] the floor.</span>")
return
else if(istype(W, /obj/item/stack/rods) && destroyed)
var/obj/item/stack/rods/R = W
if(!shock(user, 90))
user.visible_message("<span class='notice'>[user] rebuilds the broken grille.</span>", \
"<span class='notice'>You rebuild the broken grille.</span>")
health = 10
density = 1
destroyed = 0
icon_state = "grille"
R.use(1)
return
//window placing begin
else if(istype(W, /obj/item/stack/sheet/rglass) || istype(W, /obj/item/stack/sheet/glass))
if (!destroyed)
var/obj/item/stack/ST = W
if (ST.get_amount() < 1)
user << "<span class='warning'>You need at least one sheet of glass for that.</span>"
if (ST.get_amount() < 2)
user << "<span class='warning'>You need at least two sheets of glass for that.</span>"
return
var/dir_to_set = SOUTHWEST
if(!anchored)
user << "<span class='warning'>[src] needs to be fastened to the floor first.</span>"
return
var/dir_to_set = 1
if(loc == user.loc)
dir_to_set = user.dir
else
if( ( x == user.x ) || (y == user.y) ) //Only supposed to work for cardinal directions.
if( x == user.x )
if( y > user.y )
dir_to_set = 2
else
dir_to_set = 1
else if( y == user.y )
if( x > user.x )
dir_to_set = 8
else
dir_to_set = 4
else
user << "<span class='notice'>You can't reach.</span>"
return //Only works for cardinal direcitons, diagonals aren't supposed to work like this.
for(var/obj/structure/window/WINDOW in loc)
if(WINDOW.dir == dir_to_set)
user << "<span class='notice'>There is already a window facing this way there.</span>"
return
user << "<span class='warning'>There is already a window there.</span>"
return
user << "<span class='notice'>You start placing the window.</span>"
if(do_after(user,20))
if(!src) return //Grille destroyed while waiting
for(var/obj/structure/window/WINDOW in loc)
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
user << "<span class='notice'>There is already a window facing this way there.</span>"
return
if(!src.loc || !anchored) //Grille destroyed or unanchored while waiting
return
for(var/obj/structure/window/WINDOW in loc) //Another window already installed on grille
return
var/obj/structure/window/WD
if(istype(W, /obj/item/stack/sheet/rglass))
WD = new/obj/structure/window(loc,1) //reinforced window
WD = new/obj/structure/window/reinforced/fulltile(loc) //reinforced window
else
WD = new/obj/structure/window(loc,0) //normal window
WD = new/obj/structure/window/fulltile(loc) //normal window
WD.dir = dir_to_set
WD.ini_dir = dir_to_set
WD.anchored = 0
WD.state = 0
ST.use(1)
user << "<span class='notice'>You place the [WD] on [src].</span>"
ST.use(2)
user << "<span class='notice'>You place [WD] on [src].</span>"
return
//window placing end
@@ -191,6 +196,8 @@
health -= W.force * 0.1
else if(!shock(user, 70))
switch(W.damtype)
if(STAMINA)
return
if(BURN)
playsound(loc, 'sound/items/welder.ogg', 80, 1)
else
@@ -248,7 +255,7 @@
tforce = 5
else if(isobj(AM))
var/obj/item/I = AM
tforce = I.throwforce - 5
tforce = max(0, I.throwforce * 0.5)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
health = max(0, health - tforce)
healthcheck()
+1 -1
View File
@@ -10,7 +10,7 @@
var/occupied = 1
var/destroyed = 0
/obj/structure/lamarr/ex_act(severity)
/obj/structure/lamarr/ex_act(severity, target)
switch(severity)
if (1)
new /obj/item/weapon/shard( src.loc )
+56 -10
View File
@@ -1,6 +1,6 @@
/obj/structure/lattice
desc = "A lightweight support lattice."
name = "lattice"
desc = "A lightweight support lattice."
icon = 'icons/obj/structures.dmi'
icon_state = "latticefull"
density = 0
@@ -18,7 +18,6 @@
qdel(LAT)
stored = new/obj/item/stack/rods(src)
icon = 'icons/obj/smoothlattice.dmi'
icon_state = "latticeblank"
updateOverlays()
for (var/dir in cardinal)
var/obj/structure/lattice/L
@@ -38,7 +37,7 @@
qdel(src)
return
/obj/structure/lattice/ex_act(severity)
/obj/structure/lattice/ex_act(severity, target)
switch(severity)
if(1.0)
qdel(src)
@@ -52,15 +51,15 @@
return
/obj/structure/lattice/attackby(obj/item/C as obj, mob/user as mob)
var/turf/T = get_turf(src)
if (istype(C, /obj/item/stack/tile/plasteel))
var/turf/T = get_turf(src)
T.attackby(C, user) //BubbleWrap - hand this off to the underlying turf instead
return
T.attackby(C, user) //BubbleWrap - hand this off to the underlying turf instead (for building plating)
if(istype(C, /obj/item/stack/rods))
T.attackby(C, user) //see above, for building catwalks
if (istype(C, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = C
if(WT.remove_fuel(0, user))
user << "<span class='notice'>Slicing lattice joints ...</span>"
user << "<span class='notice'>Slicing [name] joints ...</span>"
Deconstruct()
return
@@ -78,14 +77,61 @@
if(!(istype(get_step(src, direction), /turf/space)))
dir_sum += direction
icon_state = "lattice[dir_sum]"
icon_state = "[name][dir_sum]"
return
/obj/structure/lattice/Deconstruct()
var/turf/T = loc
stored.loc = T
updateOverlays()
..()
/obj/structure/lattice/singularity_pull(S, current_size)
if(current_size >= STAGE_FOUR)
Deconstruct()
Deconstruct()
/obj/structure/lattice/catwalk
name = "catwalk"
desc = "A catwalk for easier EVA manuevering and cable placement."
icon_state = "catwalkfull"
/obj/structure/lattice/catwalk/New()
var/turf/T = loc
T.cancable = 1
..()
/obj/structure/lattice/catwalk/Destroy()
var/turf/T = loc
T.cancable = 0
for(var/obj/structure/cable/C in T)
C.Destroy()
..()
/obj/structure/lattice/catwalk/Deconstruct()
var/turf/T = loc
T.cancable = 0
for(var/obj/structure/cable/C in T)
C.Deconstruct()
..()
/obj/structure/lattice/catwalk/attackby(obj/item/C as obj, mob/user as mob)
..()
if(istype(C, /obj/item/stack/cable_coil))
var/turf/T = get_turf(src)
T.attackby(C, user) //catwalks 'enable' coil laying on space tiles, not the catwalks themselves
return
/obj/structure/lattice/catwalk/updateOverlays()
overlays.Cut()
var/dir_sum = 0
for (var/direction in cardinal)
if(locate(/obj/structure/lattice/catwalk, get_step(src, direction)))
dir_sum += direction
else
if(!(istype(get_step(src, direction), /turf/space)))
dir_sum += direction
icon_state = "[name][dir_sum]"
return
+2
View File
@@ -58,6 +58,8 @@
/obj/structure/mirror/attackby(obj/item/I as obj, mob/living/user as mob)
user.do_attack_animation(src)
if(I.damtype == STAMINA)
return
if(shattered)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
+145 -204
View File
@@ -1,40 +1,108 @@
/* Morgue stuff
* Contains:
* Morgue
* Morgue trays
* Creamatorium
* Creamatorium trays
* Morgue tray
* Crematorium
* Crematorium tray
* Crematorium button
*/
/*
* Morgue
* Bodycontainer
* Parent class for morgue and crematorium
* For overriding only
*/
/obj/structure/morgue
name = "Morgue"
desc = "Used to keep bodies in until someone fetches them."
/obj/structure/bodycontainer
icon = 'icons/obj/stationobjs.dmi'
icon_state = "morgue1"
density = 1
var/obj/structure/m_tray/connected = null
anchored = 1.0
/obj/structure/morgue/New()
connected = new(src)
connected.connected = src
var/obj/structure/tray/connected = null
var/locked = 0
var/opendir = SOUTH
/obj/structure/bodycontainer/New()
..()
/obj/structure/morgue/Destroy()
/obj/structure/bodycontainer/Destroy()
open()
if(connected)
qdel(connected)
connected = null
..()
/obj/structure/morgue/on_log()
/obj/structure/bodycontainer/on_log()
update_icon()
/obj/structure/morgue/update_icon()
/obj/structure/bodycontainer/update_icon()
return
/obj/structure/bodycontainer/alter_health()
return src.loc
/obj/structure/bodycontainer/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/structure/bodycontainer/attack_hand(mob/user as mob)
if(locked)
user << "<span class='danger'>It's locked.</span>"
return
if(!connected)
user << "That doesn't appear to have a tray."
return
if(connected.loc == src)
open()
else
close()
add_fingerprint(user)
/obj/structure/bodycontainer/attackby(P as obj, mob/user as mob)
if (istype(P, /obj/item/weapon/pen))
var/t = input(user, "What would you like the label to be?", text("[]", name), null) as text
if (user.get_active_hand() != P)
return
if ((!in_range(src, usr) && src.loc != user))
return
t = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
if (t)
name = text("[]- '[]'", initial(name), t)
else
name = initial(name)
add_fingerprint(user)
/obj/structure/bodycontainer/container_resist()
open()
/obj/structure/bodycontainer/proc/open()
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
var/turf/T = get_step(src, opendir)
for(var/atom/movable/A in src)
A.loc = T
update_icon()
/obj/structure/bodycontainer/proc/close()
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
for(var/atom/movable/A in connected.loc)
if(!A.anchored || A == connected)
A.loc = src
update_icon()
/*
* Morgue
*/
/obj/structure/bodycontainer/morgue
name = "morgue"
desc = "Used to keep bodies in until someone fetches them."
icon_state = "morgue1"
opendir = EAST
/obj/structure/bodycontainer/morgue/New()
connected = new/obj/structure/tray/m_tray(src)
connected.connected = src
..()
/obj/structure/bodycontainer/morgue/update_icon()
if (!connected || connected.loc != src) //open or the tray broke off somehow
src.icon_state = "morgue0"
else
@@ -55,128 +123,29 @@
src.icon_state = "morgue4"//clone that mofo
break
/obj/structure/morgue/alter_health()
return src.loc
/obj/structure/morgue/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/structure/morgue/attack_hand(mob/user as mob)
if(!connected)
user << "That doesn't appear to have a tray."
return
if(connected.loc == src)
open()
else
close()
add_fingerprint(user)
/obj/structure/morgue/attackby(P as obj, mob/user as mob)
if (istype(P, /obj/item/weapon/pen))
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
if (user.get_active_hand() != P)
return
if ((!in_range(src, usr) && src.loc != user))
return
t = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
if (t)
src.name = text("Morgue- '[]'", t)
else
src.name = "Morgue"
add_fingerprint(user)
/obj/structure/morgue/container_resist()
open()
/obj/structure/morgue/proc/open()
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
var/turf/T = get_step(src, EAST)
for(var/atom/movable/A in src)
A.loc = T
update_icon()
/obj/structure/morgue/proc/close()
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
for(var/atom/movable/A in connected.loc)
if(!A.anchored || A == connected)
A.loc = src
update_icon()
/*
* Morgue tray
*/
/obj/structure/m_tray
name = "morgue tray"
desc = "Apply corpse before closing."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "morguet"
density = 1
layer = 2.0
var/obj/structure/morgue/connected = null
anchored = 1.0
throwpass = 1
/obj/structure/m_tray/Destroy()
if(connected)
connected.connected = null
connected.update_icon()
connected = null
..()
/obj/structure/m_tray/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/structure/m_tray/attack_hand(mob/user as mob)
if (src.connected)
connected.close()
add_fingerprint(user)
else
user << "That's not connected to anything."
/obj/structure/m_tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
if ((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src) || user.contents.Find(O)))
return
if (!ismob(O) && !istype(O, /obj/structure/closet/body_bag))
return
if (!ismob(user) || user.stat || user.lying || user.stunned)
return
O.loc = src.loc
if (user != O)
for(var/mob/B in viewers(user, 3))
B.show_message("<span class='danger'>[user] stuffs [O] into [src]!</span>", 1)
return
/*
* Crematorium
*/
/obj/structure/crematorium
var/global/list/crematoriums = new/list()
/obj/structure/bodycontainer/crematorium
name = "crematorium"
desc = "A human incinerator. Works well on barbeque nights."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "crema1"
density = 1
var/obj/structure/c_tray/connected = null
anchored = 1.0
var/cremating = 0
opendir = SOUTH
var/id = 1
var/locked = 0
/obj/structure/crematorium/New()
connected = new(src)
/obj/structure/bodycontainer/crematorium/Destroy()
crematoriums.Remove(src)
..()
/obj/structure/bodycontainer/crematorium/New()
connected = new/obj/structure/tray/c_tray(src)
connected.connected = src
crematoriums.Add(src)
..()
/obj/structure/crematorium/Destroy()
open()
if(connected)
qdel(connected)
connected = null
..()
/obj/structure/crematorium/update_icon()
/obj/structure/bodycontainer/crematorium/update_icon()
if(!connected || connected.loc != src)
icon_state = "crema0"
else
@@ -186,51 +155,13 @@
else
src.icon_state = "crema1"
if(cremating)
if(locked)
src.icon_state = "crema_active"
return
/obj/structure/crematorium/alter_health()
return src.loc
/obj/structure/crematorium/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/structure/crematorium/attack_hand(mob/user as mob)
if (cremating || locked)
user << "<span class='danger'>It's locked.</span>"
return
if (!connected)
user << "That doesn't appear to have a tray."
return
if(connected.loc == src)
open()
else
close()
add_fingerprint(user)
/obj/structure/crematorium/attackby(P as obj, mob/user as mob)
if (istype(P, /obj/item/weapon/pen))
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
if (user.get_active_hand() != P)
return
if ((!in_range(src, usr) > 1 && src.loc != user))
return
t = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
if (t)
src.name = text("Crematorium- '[]'", t)
else
src.name = "Crematorium"
src.add_fingerprint(user)
return
/obj/structure/crematorium/container_resist()
open()
/obj/structure/crematorium/proc/cremate(mob/user as mob)
if(cremating)
/obj/structure/bodycontainer/crematorium/proc/cremate(mob/user as mob)
if(locked)
return //don't let you cremate something twice or w/e
if(contents.len <= 1)
@@ -240,7 +171,6 @@
else
audible_message("<span class='danger'>You hear a roar as the crematorium activates.</span>")
cremating = 1
locked = 1
update_icon()
@@ -261,57 +191,62 @@
new /obj/effect/decal/cleanable/ash(src)
sleep(30)
cremating = 0
locked = 0
update_icon()
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
/obj/structure/crematorium/proc/open()
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
var/turf/T = get_step(src, SOUTH)
for(var/atom/movable/A in src)
A.loc = T
update_icon()
/obj/structure/crematorium/proc/close()
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
for(var/atom/movable/A in connected.loc)
if(!A.anchored || A == connected)
A.loc = src
update_icon()
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) //you horrible people
/*
* Crematorium tray
Crematorium Switch
*/
/obj/machinery/crema_switch/attack_hand(mob/user as mob)
if(src.allowed(usr))
for (var/obj/structure/bodycontainer/crematorium/C in crematoriums)
if (C.id != id)
continue
C.cremate(user)
else
usr << "<span class='danger'>Access denied.</span>"
return
/obj/machinery/crema_switch/attackby(obj/item/W as obj, mob/user as mob)
if(W.GetID())
attack_hand(user)
else
return ..()
/*
* Generic Tray
* Parent class for morguetray and crematoriumtray
* For overriding only
*/
/obj/structure/c_tray
name = "crematorium tray"
desc = "Apply body before burning."
/obj/structure/tray
icon = 'icons/obj/stationobjs.dmi'
icon_state = "cremat"
density = 1
layer = 2.0
var/obj/structure/crematorium/connected = null
layer = 2.9
var/obj/structure/bodycontainer/connected = null
anchored = 1.0
throwpass = 1
/obj/structure/c_tray/Destroy()
/obj/structure/tray/Destroy()
if(connected)
connected.connected = null
connected.update_icon()
connected = null
..()
/obj/structure/c_tray/attack_paw(mob/user as mob)
/obj/structure/tray/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/structure/c_tray/attack_hand(mob/user as mob)
/obj/structure/tray/attack_hand(mob/user as mob)
if (src.connected)
connected.close()
add_fingerprint(user)
else
user << "That's not connected to anything."
/obj/structure/c_tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
/obj/structure/tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
if ((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src) || user.contents.Find(O)))
return
if (!ismob(O) && !istype(O, /obj/structure/closet/body_bag))
@@ -325,13 +260,19 @@
//Foreach goto(99)
return
/obj/machinery/crema_switch/attack_hand(mob/user as mob)
if(src.allowed(usr))
for (var/obj/structure/crematorium/C in world)
if (C.id == id)
if (!C.cremating)
C.cremate(user)
else
usr << "<span class='danger'>Access denied.</span>"
return
/*
* Crematorium tray
*/
/obj/structure/tray/c_tray
name = "crematorium tray"
desc = "Apply body before burning."
icon_state = "cremat"
/*
* Morgue tray
*/
/obj/structure/tray/m_tray
name = "morgue tray"
desc = "Apply corpse before closing."
icon_state = "morguet"
+1 -1
View File
@@ -165,7 +165,7 @@ FLOOR SAFES
obj/structure/safe/blob_act()
return
obj/structure/safe/ex_act(severity)
obj/structure/safe/ex_act(severity, target)
return
+2 -14
View File
@@ -5,20 +5,8 @@
density = 0
layer = 3.5
/obj/structure/sign/ex_act(severity)
switch(severity)
if(1.0)
qdel(src)
return
if(2.0)
qdel(src)
return
if(3.0)
qdel(src)
return
else
return
/obj/structure/sign/ex_act(severity, target)
qdel(src)
/obj/structure/sign/blob_act()
qdel(src)
+74 -11
View File
@@ -7,25 +7,81 @@
icon = 'icons/obj/statue.dmi'
icon_state = ""
density = 1
anchored = 1
anchored = 0
var/hardness = 1
var/oreAmount = 7
var/mineralType = "metal"
var/last_event = 0
var/active = null
var/spam_flag = 0
/obj/structure/statue/Destroy()
density = 0
..()
/obj/structure/statue/attackby(obj/item/weapon/W, mob/user)
hardness -= W.force/100
user << "You hit the [name] with your [W.name]!"
CheckHardness()
/obj/structure/statue/attackby(obj/item/weapon/W, mob/living/user as mob)
add_fingerprint(user)
user.changeNext_move(CLICK_CD_MELEE)
if(istype(W, /obj/item/weapon/wrench))
if(anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user.visible_message("<span class='notice'>[user] is loosening the [name]'s bolts...</span>", \
"<span class='notice'>You are loosening the [name]'s bolts...</span>")
if(do_after(user,40))
if(!src) return
if(!anchored) return
user.visible_message("<span class='notice'>[user] loosened the [name]'s bolts!</span>", \
"<span class='notice'>You loosened the [name]'s bolts!</span>")
anchored = 0
else if(!anchored)
if (!istype(src.loc, /turf/simulated/floor))
user.visible_message("<span class='danger'>A floor must be present to secure the [name]!</span>")
return
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user.visible_message("<span class='notice'>[user] is securing the [name]'s bolts...</span>", \
"<span class='notice'>You are securing the [name]'s bolts...</span>")
if(do_after(user, 40))
if(!src) return
if(anchored) return
user.visible_message("<span class='notice'>[user] has secured the [name]'s bolts!</span>", \
"<span class='notice'>You have secured the [name]'s bolts!</span>")
anchored = 1
/obj/structure/statue/attack_hand(mob/user)
visible_message("<span class='notice'>[user] rubs some dust off from the [name]'s surface.</span>")
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
user.visible_message("<span class='notice'>[user] is slicing apart the [name]...</span>", \
"<span class='notice'>You are slicing apart the [name]...</span>")
if(do_after(user,30))
if(!src.loc) return
user.visible_message("<span class='notice'>[user] slices apart the [name]!</span>", \
"<span class='notice'>You slice apart the [name]!</span>")
Dismantle(1)
else if(istype(W, /obj/item/weapon/pickaxe/drill/diamonddrill))
user.visible_message("<span class='notice'>[user] begins to drill apart the [name]!</span>", \
"<span class='notice'>You begin to drill apart the [name]!</span>")
if(do_after(user,5))
if(!src.loc) return
user.visible_message("<span class='notice'>[user] destroys the [name]!</span>", \
"<span class='notice'>You destroy the [name]!</span>")
qdel(src)
else if(istype(W, /obj/item/weapon/weldingtool))
if(!anchored)
user.visible_message("<span class='notice'>[user] is slicing apart the [name]...</span>", \
"<span class='notice'>You are slicing apart the [name]...</span>")
if(do_after(user, 40))
if(!src.loc) return
user.visible_message("<span class='notice'>[user] slices apart the [name]!</span>", \
"<span class='notice'>You slice apart the [name]!</span>")
Dismantle(1)
else
hardness -= W.force/100
..()
CheckHardness()
/obj/structure/statue/attack_hand(mob/living/user as mob)
user.changeNext_move(CLICK_CD_MELEE)
add_fingerprint(user)
user.visible_message("<span class='notice'>[user] rubs some dust off from the [name]'s surface.</span>", \
"<span class='notice'>You rub some dust off from the [name]'s surface.</span>")
/obj/structure/statue/CanAtmosPass()
return !density
@@ -83,6 +139,8 @@
hardness = 3
luminosity = 2
mineralType = "uranium"
var/last_event = 0
var/active = null
/obj/structure/statue/uranium/nuke
name = "Statue of a Nuclear Fission Explosive"
@@ -100,6 +158,7 @@
/obj/structure/statue/uranium/Bumped(atom/user)
radiate()
..()
/obj/structure/statue/uranium/attack_hand(mob/user)
radiate()
@@ -107,6 +166,7 @@
/obj/structure/statue/uranium/attack_paw(mob/user)
radiate()
..()
/obj/structure/statue/uranium/proc/radiate()
if(!active)
@@ -238,6 +298,7 @@
hardness = 3
mineralType = "bananium"
desc = "A bananium statue with a small engraving:'HOOOOOOONK'."
var/spam_flag = 0
/obj/structure/statue/bananium/clown
name = "Statue of a clown"
@@ -245,6 +306,7 @@
/obj/structure/statue/bananium/Bumped(atom/user)
honk()
..()
/obj/structure/statue/bananium/attackby(obj/item/weapon/W, mob/user)
honk()
@@ -256,9 +318,10 @@
/obj/structure/statue/bananium/attack_paw(mob/user)
honk()
..()
/obj/structure/statue/bananium/proc/honk()
if(spam_flag == 0)
if(!spam_flag)
spam_flag = 1
playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1)
spawn(20)
@@ -39,7 +39,7 @@
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='warning'>[user.name] drenches you in a foul-smelling resin, trapping you in [src]!</span>",\
"<span class='notice'>You hear squelching...</span>")
M.buckled = src
M.loc = src.loc
@@ -55,6 +55,8 @@
if(M.environment_smash)
new /obj/item/stack/sheet/metal(src.loc)
qdel(src)
return
manual_unbuckle(M)
/obj/structure/stool/bed/MouseDrop_T(mob/M as mob, mob/user as mob)
if(!istype(M)) return
@@ -101,7 +103,7 @@
/obj/structure/stool/bed/proc/unbuckle_myself(mob/user as mob)
buckled_mob.visible_message(\
"<span class='notice'>[buckled_mob.name] unbuckled \himself!</span>",\
"<span class='notice'>[buckled_mob.name] unbuckled!</span>",\
"You unbuckle yourself from [src].",\
"You hear metal clanking.")
unbuckle()
@@ -112,8 +114,8 @@
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) || M.anchored)
return
if (istype(M, /mob/living/carbon/slime))
user << "The [M] is too squishy to buckle in."
if (istype(M, /mob/living/carbon/slime) || istype(M, /mob/living/simple_animal/slime))
user << "\The [M] is too squishy to buckle in."
return
unbuckle()
@@ -64,7 +64,7 @@
else
if(!usr || !isturf(usr.loc))
return
if(usr.stat || usr.restrained() || !usr.canmove)
if(usr.stat || usr.restrained())
return
spin()
@@ -6,7 +6,7 @@
anchored = 1.0
pressure_resistance = 15
/obj/structure/stool/ex_act(severity)
/obj/structure/stool/ex_act(severity, target)
switch(severity)
if(1.0)
qdel(src)
@@ -0,0 +1,88 @@
/* Table Frames
* Contains:
* Frames
* Wooden Frames
*/
/*
* Normal Frames
*/
/obj/structure/table_frame
name = "table frame"
desc = "Four metal legs with four framing rods for a table. You could easily pass through this."
icon = 'icons/obj/structures.dmi'
icon_state = "table_frame"
density = 0
anchored = 0
layer = 2.8
/obj/structure/table_frame/attackby(var/obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/wrench))
user << "<span class='notice'>Now disassembling [src].</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 30))
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
new /obj/item/stack/rods(src.loc)
qdel(src)
return
if(istype(I, /obj/item/stack/sheet/plasteel))
var/obj/item/stack/sheet/plasteel/P = I
user << "<span class='notice'>Now adding [P] to [src].</span>"
if(do_after(user, 50))
new /obj/structure/table/reinforced(src.loc)
qdel(src)
P.use(1)
return
if(istype(I, /obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/M = I
user << "<span class='notice'>Now adding [M] to [src].</span>"
if(do_after(user, 20))
new /obj/structure/table(src.loc)
qdel(src)
M.use(1)
return
if(istype(I, /obj/item/stack/sheet/glass))
var/obj/item/stack/sheet/glass/G = I
user << "<span class='notice'>Now adding [G] to [src].</span>"
if(do_after(user, 20))
new /obj/structure/table/glass(src.loc)
qdel(src)
G.use(1)
return
/*
* Wooden Frames
*/
/obj/structure/table_frame/wood
name = "wooden table frame"
desc = "Four wooden legs with four framing wooden rods for a wooden table. You could easily pass through this."
icon_state = "wood_frame"
/obj/structure/table_frame/wood/attackby(var/obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/wrench))
user << "<span class='notice'>Now disassembling [src].</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 30))
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
new /obj/item/stack/sheet/mineral/wood(src.loc)
qdel(src)
return
if(istype(I, /obj/item/stack/sheet/mineral/wood))
var/obj/item/stack/sheet/mineral/wood/W = I
user << "<span class='notice'>Now adding [W] to [src].</span>"
if(do_after(user, 20))
new /obj/structure/table/wood(src.loc)
qdel(src)
W.use(1)
return
if(istype(I, /obj/item/stack/tile/carpet))
var/obj/item/stack/tile/carpet/C = I
user << "<span class='notice'>Now adding [C] to [src].</span>"
if(do_after(user, 20))
new /obj/structure/table/wood/poker(src.loc)
qdel(src)
C.use(1)
return
+225 -161
View File
@@ -1,12 +1,13 @@
/* Tables and Racks
* Contains:
* Tables
* Wooden tables
* Reinforced tables
* Glass Tables
* Wooden Tables
* Reinforced Tables
* Racks
* Rack Parts
*/
/*
* Tables
*/
@@ -20,7 +21,9 @@
anchored = 1.0
layer = 2.8
throwpass = 1 //You can throw objects over this, despite it's density.")
var/parts = /obj/item/weapon/table_parts
var/frame = /obj/structure/table_frame
var/framestack = /obj/item/stack/rods
var/buildstack = /obj/item/stack/sheet/metal
var/busy = 0
/obj/structure/table/New()
@@ -177,91 +180,43 @@
else
dir = 2
/obj/structure/table/ex_act(severity)
switch(severity)
if(1.0)
qdel(src)
return
if(2.0)
if (prob(50))
qdel(src)
return
if(3.0)
if (prob(25))
src.density = 0
else
return
/obj/structure/table/ex_act(severity, target)
..()
if(severity == 3)
if(prob(25))
table_destroy(1)
/obj/structure/table/blob_act()
if(prob(75))
if(istype(src, /obj/structure/table/woodentable))
new /obj/item/weapon/table_parts/wood( src.loc )
qdel(src)
return
new /obj/item/weapon/table_parts( src.loc )
qdel(src)
table_destroy(1)
return
/obj/structure/table/attack_paw(mob/living/user)
if(HULK in user.mutations)
user.do_attack_animation(src)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
visible_message("<span class='danger'>[user] smashes the table apart!</span>")
if(istype(src, /obj/structure/table/reinforced))
new /obj/item/weapon/table_parts/reinforced(loc)
else if(istype(src, /obj/structure/table/woodentable))
new/obj/item/weapon/table_parts/wood(loc)
else
new /obj/item/weapon/table_parts(loc)
density = 0
qdel(src)
/obj/structure/table/attack_alien(mob/living/user)
user.do_attack_animation(src)
playsound(src.loc, 'sound/weapons/bladeslice.ogg', 50, 1)
visible_message("<span class='danger'>[user] slices [src] apart!</span>")
if(istype(src, /obj/structure/table/reinforced))
new /obj/item/weapon/table_parts/reinforced(loc)
else if(istype(src, /obj/structure/table/woodentable))
new/obj/item/weapon/table_parts/wood(loc)
else
new /obj/item/weapon/table_parts(loc)
density = 0
qdel(src)
table_destroy(1)
/obj/structure/table/attack_animal(mob/living/simple_animal/user)
if(user.environment_smash)
user.do_attack_animation(src)
playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1)
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
if(istype(src, /obj/structure/table/reinforced))
new /obj/item/weapon/table_parts/reinforced(loc)
else if(istype(src, /obj/structure/table/woodentable))
new/obj/item/weapon/table_parts/wood(loc)
else
new /obj/item/weapon/table_parts(loc)
density = 0
qdel(src)
table_destroy(1)
/obj/structure/table/attack_paw(mob/user)
attack_hand(user)
/obj/structure/table/attack_hulk(mob/living/carbon/human/user)
..(user, 1)
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
playsound(src.loc, 'sound/effects/bang.ogg', 50, 1)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
table_destroy(1)
return 1
/obj/structure/table/attack_hand(mob/living/user)
if(HULK in user.mutations)
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
if(istype(src, /obj/structure/table/reinforced))
new /obj/item/weapon/table_parts/reinforced(loc)
else if(istype(src, /obj/structure/table/woodentable))
new/obj/item/weapon/table_parts/wood(loc)
else
new /obj/item/weapon/table_parts(loc)
density = 0
qdel(src)
else
..()
user.changeNext_move(CLICK_CD_MELEE)
/obj/structure/table/attack_tk() // no telehulk sorry
return
@@ -276,8 +231,11 @@
else
return 0
/obj/structure/table/MouseDrop_T(obj/O, mob/user)
/obj/structure/table/MouseDrop_T(atom/movable/O, mob/user)
if(ismob(O) && user == O && ishuman(user))
if(user.canmove)
climb_table(user)
return
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
return
if(isrobot(user))
@@ -288,27 +246,32 @@
step(O, get_dir(O, src))
return
/obj/structure/table/proc/tablepush(obj/item/I, mob/user)
if(get_dist(src, user) < 2)
var/obj/item/weapon/grab/G = I
if(G.affecting.buckled)
user << "<span class='warning'>[G.affecting] is buckled to [G.affecting.buckled]!</span>"
return 0
if(G.state < GRAB_AGGRESSIVE)
user << "<span class='warning'>You need a better grip to do that!</span>"
return 0
if(!G.confirm())
return 0
G.affecting.loc = src.loc
G.affecting.Weaken(5)
G.affecting.visible_message("<span class='danger'>[G.assailant] pushes [G.affecting] onto [src].</span>", \
"<span class='userdanger'>[G.assailant] pushes [G.affecting] onto [src].</span>")
add_logs(G.assailant, G.affecting, "pushed")
qdel(I)
return 1
qdel(I)
/obj/structure/table/attackby(obj/item/I, mob/user)
if (istype(I, /obj/item/weapon/grab))
if(get_dist(src, user) < 2)
var/obj/item/weapon/grab/G = I
if(G.affecting.buckled)
user << "<span class='notice'>[G.affecting] is buckled to [G.affecting.buckled]!</span>"
return
if(G.state < GRAB_AGGRESSIVE)
user << "<span class='notice'>You need a better grip to do that!</span>"
return
if(!G.confirm())
return
G.affecting.loc = src.loc
G.affecting.Weaken(5)
G.affecting.visible_message("<span class='danger'>[G.assailant] pushes [G.affecting] onto [src].</span>", \
"<span class='userdanger'>[G.assailant] pushes [G.affecting] onto [src].</span>")
qdel(I)
tablepush(I, user)
return
if (istype(I, /obj/item/weapon/wrench))
if (istype(I, /obj/item/weapon/screwdriver))
if(istype(src, /obj/structure/table/reinforced))
var/obj/structure/table/reinforced/RT = src
if(RT.status == 1)
@@ -318,6 +281,16 @@
table_destroy(2, user)
return
if (istype(I, /obj/item/weapon/wrench))
if(istype(src, /obj/structure/table/reinforced))
var/obj/structure/table/reinforced/RT = src
if(RT.status == 1)
table_destroy(3, user)
return
else
table_destroy(3, user)
return
if (istype(I, /obj/item/weapon/storage/bag/tray))
var/obj/item/weapon/storage/bag/tray/T = I
if(T.contents.len > 0) // If the tray isn't empty
@@ -340,64 +313,129 @@
SS.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
table_destroy(1, user)
user.visible_message("<span class='notice'>The [src.name] was sliced apart by [user]!</span>")
table_destroy(1)
return
if(!(I.flags & ABSTRACT)) //rip more parems rip in peace ;_;
if(user.drop_item())
I.Move(loc)
/obj/structure/table/proc/table_destroy(var/destroy_type, var/mob/user as mob)
/*
Destroy type values:
1 = Destruction, Actually destroyed
2 = Deconstruction.
*/
* TABLE DESTRUCTION/DECONSTRUCTION
*/
if(destroy_type == 1)
user.visible_message("<span class='notice'>The table was sliced apart by [user]!</span>")
new parts( src.loc )
#define TBL_DESTROY 1
#define TBL_DISASSEMBLE 2
#define TBL_DECONSTRUCT 3
/obj/structure/table/proc/table_destroy(var/destroy_type, var/mob/user)
if(destroy_type == TBL_DESTROY)
new framestack(src.loc)
new buildstack(src.loc)
qdel(src)
return
if(destroy_type == 2)
user << "<span class='notice'>Now disassembling the [src.name]</span>"
if(destroy_type == TBL_DISASSEMBLE)
user << "<span class='notice'>Now disassembling [src].</span>"
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
new frame(src.loc)
new buildstack(src.loc)
qdel(src)
return
if(destroy_type == TBL_DECONSTRUCT)
user << "<span class='notice'>Now deconstructing [src].</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if (do_after(user, 50))
new parts( src.loc )
if(do_after(user, 40))
new framestack(src.loc)
new buildstack(src.loc)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
qdel(src)
return
return
/*
* TABLE CLIMBING
*/
/obj/structure/table/proc/climb_table(mob/user)
src.add_fingerprint(user)
user.visible_message("<span class='warning'>[user] starts climbing onto [src].</span>", \
"<span class='notice'>You start climbing onto [src].</span>")
var/climb_time = 20
if(user.restrained()) //Table climbing takes twice as long when restrained.
climb_time *= 2
if(do_mob(user, user, climb_time))
if(src.loc) //Checking if table has been destroyed
user.pass_flags += PASSTABLE
step(user,get_dir(user,src.loc))
user.pass_flags -= PASSTABLE
user.visible_message("<span class='warning'>[user] climbs onto [src].</span>", \
"<span class='notice'>You climb onto [src].</span>")
add_logs(user, src, "climbed onto")
user.Stun(2)
return 1
return 0
/*
* Glass tables
*/
/obj/structure/table/glass
name = "glass table"
desc = "What did I say about leaning on the glass tables? Now you need surgery."
icon_state = "glass_table"
buildstack = /obj/item/stack/sheet/glass
/obj/structure/table/glass/tablepush(obj/item/I, mob/user)
if(..())
visible_message("<span class='warning'>[src] breaks!</span>")
playsound(src.loc, "shatter", 50, 1)
new frame(src.loc)
new /obj/item/weapon/shard(src.loc)
qdel(src)
/obj/structure/table/glass/climb_table(mob/user)
if(..())
visible_message("<span class='warning'>[src] breaks!</span>")
playsound(src.loc, "shatter", 50, 1)
new frame(src.loc)
new /obj/item/weapon/shard(src.loc)
qdel(src)
user.Weaken(5)
/*
* Wooden tables
*/
/obj/structure/table/woodentable
/obj/structure/table/wood
name = "wooden table"
desc = "Do not apply fire to this. Rumour says it burns easily."
icon_state = "woodtable"
parts = /obj/item/weapon/table_parts/wood
frame = /obj/structure/table_frame/wood
framestack = /obj/item/stack/sheet/mineral/wood
buildstack = /obj/item/stack/sheet/mineral/wood
/obj/structure/table/woodentable/poker //No specialties, Just a mapping object.
/obj/structure/table/wood/poker //No specialties, Just a mapping object.
name = "gambling table"
desc = "A seedy table for seedy dealings in seedy places."
icon_state = "pokertable"
parts = /obj/item/weapon/table_parts/wood/poker
buildstack = /obj/item/stack/tile/carpet
/*
* Reinforced tables
*/
/obj/structure/table/reinforced
name = "reinforced table"
desc = "A version of the four legged table. It is stronger."
desc = "A reinforced version of the four legged table, much harder to simply deconstruct."
icon_state = "reinftable"
parts = /obj/item/weapon/table_parts/reinforced
var/status = 2
buildstack = /obj/item/stack/sheet/plasteel
/obj/structure/table/reinforced/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/weldingtool))
@@ -420,23 +458,20 @@ Destroy type values:
return
..()
/obj/structure/table/MouseDrop_T(mob/target, mob/living/carbon/human/user)
if(istype(target) && user == target && istype(user))
if(user.canmove)
climb_table(user)
/obj/structure/table/reinforced/attack_paw(mob/user)
attack_hand(user)
/obj/structure/table/proc/climb_table(mob/user)
src.add_fingerprint(user)
user.visible_message("<span class='warning'>[user] starts climbing onto [src].</span>", \
"<span class='notice'>[user] starts climbing onto [src].</span>")
if(do_mob(user, user, 20))
user.pass_flags += PASSTABLE
step(user,get_dir(user,src.loc))
user.pass_flags -= PASSTABLE
user.visible_message("<span class='warning'>[user] climbs onto [src].</span>", \
"<span class='notice'>[user] climbs onto [src].</span>")
add_logs(user, src, "climbed onto")
user.Stun(2)
/obj/structure/table/reinforced/attack_hulk(mob/living/carbon/human/user)
..(user, 1)
if(prob(75))
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
user << text("<span class='notice'>You kick [src] into pieces.</span>")
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
table_destroy(1)
else
playsound(src, 'sound/effects/bang.ogg', 50, 1)
user << text("<span class='notice'>You kick [src].</span>")
return 1
/*
* Racks
@@ -449,27 +484,27 @@ Destroy type values:
density = 1
anchored = 1.0
throwpass = 1 //You can throw objects over this, despite it's density.
var/health = 5
/obj/structure/rack/ex_act(severity)
/obj/structure/rack/ex_act(severity, target)
switch(severity)
if(1.0)
qdel(src)
if(2.0)
qdel(src)
if(prob(50))
new /obj/item/weapon/rack_parts(src.loc)
rack_destroy()
else
qdel(src)
if(3.0)
if(prob(25))
qdel(src)
new /obj/item/weapon/rack_parts(src.loc)
rack_destroy()
/obj/structure/rack/blob_act()
if(prob(75))
qdel(src)
return
else if(prob(50))
new /obj/item/weapon/rack_parts(src.loc)
qdel(src)
rack_destroy()
return
/obj/structure/rack/CanPass(atom/movable/mover, turf/target, height=0)
@@ -495,9 +530,8 @@ Destroy type values:
/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)
qdel(src)
rack_destroy()
return
if(isrobot(user))
@@ -505,44 +539,74 @@ Destroy type values:
if(!user.drop_item())
user << "<span class='notice'>\The [W] is stuck to your hand, you cannot put it in the rack!</span>"
return
if(W && W.loc) W.loc = src.loc
W.Move(loc)
return 1
/obj/structure/rack/attack_hand(mob/living/user)
if(HULK in user.mutations)
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
new /obj/item/weapon/rack_parts(loc)
density = 0
qdel(src)
/obj/structure/rack/attack_paw(mob/living/user)
if(HULK in user.mutations)
user.do_attack_animation(src)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
new /obj/item/weapon/rack_parts(loc)
density = 0
qdel(src)
attack_hand(user)
/obj/structure/rack/attack_hulk(mob/living/carbon/human/user)
..(user, 1)
rack_destroy()
return 1
/obj/structure/rack/attack_hand(mob/living/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
playsound(loc, 'sound/items/dodgeball.ogg', 80, 1)
user.visible_message("<span class='warning'>[user] kicks [src].</span>", \
"<span class='warning'>You kick [src].</span>")
health -= rand(1,2)
healthcheck()
/obj/structure/rack/attack_alien(mob/living/user)
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] slices [src] apart!</span>")
new /obj/item/weapon/rack_parts(loc)
density = 0
qdel(src)
rack_destroy()
/obj/structure/rack/attack_animal(mob/living/simple_animal/user)
if(user.environment_smash)
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
new /obj/item/weapon/rack_parts(loc)
density = 0
qdel(src)
rack_destroy()
/obj/structure/rack/attack_tk() // no telehulk sorry
return
/obj/structure/rack/proc/healthcheck()
if(health <= 0)
rack_destroy()
return
/*
* Rack destruction
*/
/obj/structure/rack/proc/rack_destroy()
density = 0
var/obj/item/weapon/rack_parts/newparts = new(loc)
transfer_fingerprints_to(newparts)
qdel(src)
/*
* Rack Parts
*/
/obj/item/weapon/rack_parts/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/metal( user.loc )
qdel(src)
return
return
/obj/item/weapon/rack_parts/attack_self(mob/user as mob)
user << "<span class='notice'>Constructing rack...</span>"
if (do_after(user, 50))
var/obj/structure/rack/R = new /obj/structure/rack( user.loc )
R.add_fingerprint(user)
user.drop_item()
qdel(src)
return
@@ -19,10 +19,10 @@
/obj/structure/transit_tube/station/New()
..()
processing_objects += src
SSobj.processing += src
/obj/structure/transit_tube/station/Destroy()
processing_objects -= src
SSobj.processing -= src
..()
// Stations which will send the tube in the opposite direction after their stop.
@@ -19,28 +19,18 @@
// this continues to work.
var/global/list/tube_dir_list = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
/obj/structure/transit_tube/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSGLASS))
return 1
return !density
// When destroyed by explosions, properly handle contents.
obj/structure/transit_tube/ex_act(severity)
switch(severity)
if(1.0)
for(var/atom/movable/AM in contents)
AM.loc = loc
AM.ex_act(severity++)
qdel(src)
return
if(2.0)
if(prob(50))
for(var/atom/movable/AM in contents)
AM.loc = loc
AM.ex_act(severity++)
qdel(src)
return
if(3.0)
return
obj/structure/transit_tube/ex_act(severity, target)
if(3 - severity >= 0)
var/oldloc = loc
..(severity + 1)
for(var/atom/movable/AM in contents)
AM.loc = oldloc
/obj/structure/transit_tube/New(loc)
..(loc)
@@ -54,7 +44,7 @@ obj/structure/transit_tube/ex_act(severity)
for(var/obj/structure/transit_tube_pod/pod in src.loc)
user << "<span class='notice'>Remove the pod first.</span>"
return
user.visible_message("<span class='warning'>[user] starts to deattach the [src]!</span>", "<span class='notice'>You start deattaching the [name]...</span>")
user.visible_message("<span class='warning'>[user] starts to deattach \the [src]!</span>", "<span class='notice'>You start deattaching the [name]...</span>")
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 35))
user << "<span class='notice'>You deattach the [name]!</span>"
@@ -31,11 +31,11 @@
for(var/obj/structure/transit_tube/station/T in loc)
return
if(src.contents.len)
user.visible_message("<span class='notice'>[user] empties the [src].</span>", "<span class='notice'>You empty the [src].</span>")
user.visible_message("<span class='notice'>[user] empties \the [src].</span>", "<span class='notice'>You empty \the [src].</span>")
src.empty()
return
else
user << "<span class='notice'>You free the [src].</span>"
user << "<span class='notice'>You free \the [src].</span>"
var/obj/structure/c_transit_tube_pod/R = new/obj/structure/c_transit_tube_pod(src.loc)
src.transfer_fingerprints_to(R)
R.add_fingerprint(user)
+24 -19
View File
@@ -18,8 +18,10 @@
/obj/structure/toilet/attack_hand(mob/living/user)
if(swirlie)
user.visible_message("<span class='danger'>[user] slams the toilet seat onto [swirlie]'s head!</span>", "<span class='notice'>You slam the toilet seat onto [swirlie]'s head!</span>", "You hear reverberating porcelain.")
swirlie.adjustBruteLoss(8)
user.changeNext_move(CLICK_CD_MELEE)
playsound(src.loc, "swing_hit", 25, 1)
swirlie.visible_message("<span class='danger'>[user] slams the toilet seat onto [swirlie]'s head!</span>", "<span class='userdanger'>[user] slams the toilet seat onto [swirlie]'s head!</span>", "You hear reverberating porcelain.")
swirlie.adjustBruteLoss(5)
return
if(cistern && !open)
@@ -55,6 +57,7 @@
return
if(istype(I, /obj/item/weapon/grab))
user.changeNext_move(CLICK_CD_MELEE)
var/obj/item/weapon/grab/G = I
if(!G.confirm())
return
@@ -64,21 +67,23 @@
if(GM.loc != get_turf(src))
user << "<span class='notice'>[GM] needs to be on [src].</span>"
return
if(open && !swirlie)
user.visible_message("<span class='danger'>[user] starts to give [GM] a swirlie!</span>", "<span class='notice'>You start to give [GM] a swirlie!</span>")
swirlie = GM
if(do_after(user, 30, 5, 0))
user.visible_message("<span class='danger'>[user] gives [GM] a swirlie!</span>", "<span class='notice'>You give [GM] a swirlie!</span>", "You hear a toilet flushing.")
if(iscarbon(GM))
var/mob/living/carbon/C = GM
if(!C.internal)
C.adjustOxyLoss(5)
else
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] into [src]!</span>")
GM.adjustBruteLoss(8)
if(!swirlie)
if(open)
GM.visible_message("<span class='danger'>[user] starts to give [GM] a swirlie!</span>", "<span class='userdanger'>[user] starts to give [GM] a swirlie!</span>")
swirlie = GM
if(do_after(user, 30, 5, 0))
GM.visible_message("<span class='danger'>[user] gives [GM] a swirlie!</span>", "<span class='userdanger'>[user] gives [GM] a swirlie!</span>", "You hear a toilet flushing.")
if(iscarbon(GM))
var/mob/living/carbon/C = GM
if(!C.internal)
C.adjustOxyLoss(5)
else
GM.adjustOxyLoss(5)
swirlie = null
else
playsound(src.loc, 'sound/effects/bang.ogg', 25, 1)
GM.visible_message("<span class='danger'>[user] slams [GM.name] into [src]!</span>", "<span class='userdanger'>[user] slams [GM.name] into [src]!</span>")
GM.adjustBruteLoss(5)
else
user << "<span class='notice'>You need a tighter grip.</span>"
@@ -167,7 +172,7 @@
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>"
user << "<span class='notice'>You begin to adjust the temperature valve with \the [I].</span>"
if(do_after(user, 50))
switch(watertemp)
if("normal")
@@ -176,7 +181,7 @@
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] to [watertemp] temperature.</span>")
user.visible_message("<span class='notice'>[user] adjusts the shower with \the [I].</span>", "<span class='notice'>You adjust the shower with \the [I] to [watertemp] temperature.</span>")
log_game("[key_name(user)] has wrenched a shower to [watertemp] at ([x],[y],[z])")
add_hiddenprint(user)
@@ -267,6 +267,7 @@ obj/structure/windoor_assembly/Destroy()
src.electronics.loc = windoor
if(created_name)
windoor.name = created_name
qdel(src)
windoor.close()
@@ -286,12 +287,10 @@ obj/structure/windoor_assembly/Destroy()
src.electronics.loc = windoor
if(created_name)
windoor.name = created_name
qdel(src)
windoor.close()
qdel(src)
else
..()
+168 -101
View File
@@ -2,32 +2,51 @@
name = "window"
desc = "A window."
icon = 'icons/obj/structures.dmi'
icon_state = "window"
density = 1
layer = 3.2//Just above doors
pressure_resistance = 4*ONE_ATMOSPHERE
anchored = 1.0
flags = ON_BORDER
var/health = 14.0
var/maxhealth = 25
var/health = 0
var/ini_dir = null
var/state = 0
var/reinf = 0
var/disassembled = 0
var/wtype = "glass"
var/fulltile = 0
var/obj/item/stack/rods/storedrods
var/obj/item/weapon/shard/storedshard
// var/silicate = 0 // number of units of silicate
// var/icon/silicateIcon = null // the silicated icon
/obj/structure/window/New(Loc,re=0)
..()
health = maxhealth
if(re) reinf = re
storedshard = new/obj/item/weapon/shard(src)
ini_dir = dir
if(reinf)
state = 2*anchored
storedrods = new/obj/item/stack/rods(src)
air_update_turf(1)
update_nearby_icons()
return
/obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
health -= Proj.damage
update_nearby_icons()
..()
if(health <= 0)
spawnfragments()
return
/obj/structure/window/ex_act(severity)
/obj/structure/window/ex_act(severity, target)
switch(severity)
if(1.0)
qdel(src)
@@ -73,40 +92,49 @@
var/tforce = 0
if(ismob(AM))
tforce = 40
else if(isobj(AM))
var/obj/item/I = AM
tforce = I.throwforce
if(reinf) tforce *= 0.25
if(reinf)
tforce *= 0.25
playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
health = max(0, health - tforce)
if(health <= 7 && !reinf)
anchored = 0
update_nearby_icons()
step(src, get_dir(AM, src))
if(health <= 0)
spawnfragments()
update_nearby_icons()
/obj/structure/window/attack_tk(mob/user as mob)
user.visible_message("<span class='notice'>Something knocks on [src].</span>")
add_fingerprint(user)
playsound(loc, 'sound/effects/Glassknock.ogg', 50, 1)
/obj/structure/window/attack_hulk(mob/living/carbon/human/user)
if(!can_be_reached(user))
return
..(user, 1)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!"))
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
storedshard.add_fingerprint(user)
if(storedrods)
storedrods.add_fingerprint(user)
hit(50)
return 1
/obj/structure/window/attack_hand(mob/user as mob)
if(!can_be_reached(user))
return
if(HULK in user.mutations)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!"))
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
storedshard.add_fingerprint(user)
if(storedrods)
storedrods.add_fingerprint(user)
spawnfragments()
else
user.changeNext_move(CLICK_CD_MELEE)
user.visible_message("<span class='notice'>[user] knocks on [src].</span>")
add_fingerprint(user)
playsound(loc, 'sound/effects/Glassknock.ogg', 50, 1)
user.changeNext_move(CLICK_CD_MELEE)
user.visible_message("<span class='notice'>[user] knocks on [src].</span>")
add_fingerprint(user)
playsound(loc, 'sound/effects/Glassknock.ogg', 50, 1)
/obj/structure/window/attack_paw(mob/user as mob)
return attack_hand(user)
@@ -129,75 +157,120 @@
user.do_attack_animation(src)
if(islarva(user)) return
attack_generic(user, 15)
update_nearby_icons()
/obj/structure/window/attack_animal(mob/living/user as mob)
if(!isanimal(user)) return
if(!isanimal(user))
return
var/mob/living/simple_animal/M = user
M.do_attack_animation(src)
if(M.melee_damage_upper <= 0) return
attack_generic(M, M.melee_damage_upper)
if(M.melee_damage_upper <= 0)
return
attack_generic(M, M.melee_damage_upper)
update_nearby_icons()
/obj/structure/window/attack_slime(mob/living/carbon/slime/user as mob)
user.do_attack_animation(src)
if(!user.is_adult) return
attack_generic(user, rand(10, 15))
if(!user.is_adult)
return
attack_generic(user, rand(10, 15))
update_nearby_icons()
/obj/structure/window/attackby(obj/item/I, mob/living/user)
if(!can_be_reached(user))
return 1 //returning 1 will skip the afterattack()
return 1 //skip the afterattack
add_fingerprint(user)
if(istype(I, /obj/item/weapon/screwdriver))
if(reinf && state >= 1)
state = 3 - state
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
user << (state == 1 ? "<span class='notice'>You have unfastened the window from the frame.</span>" : "<span class='notice'>You have fastened the window to the frame.</span>")
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
if(reinf && (state == 2 || state == 1))
user << (state == 2 ? "<span class='notice'>You begin to unscrew the window from the frame.</span>" : "<span class='notice'>You begin to screw the window to the frame.</span>")
else if(reinf && state == 0)
anchored = !anchored
update_nearby_icons()
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
user << (anchored ? "<span class='notice'>You have fastened the frame to the floor.</span>" : "<span class='notice'>You have unfastened the frame from the floor.</span>")
user << (anchored ? "<span class='notice'>You begin to unscrew the frame from the floor.</span>" : "<span class='notice'>You begin to screw the frame to the floor.</span>")
else if(!reinf)
anchored = !anchored
update_nearby_icons()
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
user << (anchored ? "<span class='notice'>You have fastened the window to the floor.</span>" : "<span class='notice'>You have unfastened the window.</span>")
else if(istype(I, /obj/item/weapon/crowbar) && reinf && state <= 1)
state = 1 - state
user << (anchored ? "<span class='notice'>You begin to unscrew the window from the floor.</span>" : "<span class='notice'>You begin to screw the window to the floor.</span>")
if(do_after(user, 40))
if(reinf && (state == 1 || state == 2))
//If state was unfastened, fasten it, else do the reverse
state = (state == 1 ? 2 : 1)
user << (state == 1 ? "<span class='notice'>You have unfastened the window from the frame.</span>" : "<span class='notice'>You have fastened the window to the frame.</span>")
else if(reinf && state == 0)
anchored = !anchored
update_nearby_icons()
user << (anchored ? "<span class='notice'>You have fastened the frame to the floor.</span>" : "<span class='notice'>You have unfastened the frame from the floor.</span>")
else if(!reinf)
anchored = !anchored
update_nearby_icons()
user << (anchored ? "<span class='notice'>You have fastened the window to the floor.</span>" : "<span class='notice'>You have unfastened the window.</span>")
else if (istype(I, /obj/item/weapon/crowbar) && reinf && (state == 0 || state == 1))
user << (state == 0 ? "<span class='notice'>You begin to lever the window into the frame.</span>" : "<span class='notice'>You begin to lever the window out of the frame.</span>")
playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
user << (state ? "<span class='notice'>You have pried the window into the frame.</span>" : "<span class='notice'>You have pried the window out of the frame.</span>")
if(do_after(user, 40))
//If state was out of frame, put into frame, else do the reverse
state = (state == 0 ? 1 : 0)
user << (state == 1 ? "<span class='notice'>You have pried the window into the frame.</span>" : "<span class='notice'>You have pried the window out of the frame.</span>")
else if(istype(I, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = I
if(user.a_intent == "help") //so you can still break windows with welding tools
if(health < maxhealth)
if(WT.remove_fuel(0,user))
user << "<span class='notice'>You begin repairing [src].</span>"
playsound(loc, 'sound/items/Welder.ogg', 40, 1)
if(do_after(user, 40))
health = maxhealth
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
else
user << "<span class='notice'>[src] is already in good condition.</span>"
update_nearby_icons()
else if(istype(I, /obj/item/weapon/wrench) && !anchored)
if(reinf)
var/obj/item/stack/sheet/rglass/RG = new (user.loc)
RG.add_fingerprint(user)
if(is_fulltile()) //fulltiles drop two panes
RG = new (user.loc)
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
user << "<span class='notice'> You begin to disassemble [src].</span>"
if(do_after(user, 40))
if(disassembled)
return //Prevents multiple deconstruction attempts
if(reinf)
var/obj/item/stack/sheet/rglass/RG = new (user.loc)
RG.add_fingerprint(user)
else
var/obj/item/stack/sheet/glass/G = new (user.loc)
G.add_fingerprint(user)
if(is_fulltile())
G = new (user.loc)
if(fulltile) //fulltiles drop two panes
RG = new (user.loc)
RG.add_fingerprint(user)
else
var/obj/item/stack/sheet/glass/G = new (user.loc)
G.add_fingerprint(user)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
disassembled = 1
qdel(src)
if(fulltile)
G = new (user.loc)
G.add_fingerprint(user)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
disassembled = 1
user << "<span class='notice'> You successfully disassemble [src].</span>"
qdel(src)
else
if(I.damtype == BRUTE || I.damtype == BURN)
user.changeNext_move(CLICK_CD_MELEE)
hit(I.force)
if(health <= 7)
anchored = 0
update_nearby_icons()
step(src, get_dir(user, src))
else
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
..()
return
/obj/structure/window/mech_melee_attack(obj/mecha/M)
if(..())
hit(M.force, 1)
/obj/structure/window/proc/can_be_reached(mob/user)
if(!is_fulltile())
if(!fulltile)
if(get_dir(user,src) & dir)
for(var/obj/O in loc)
if(!O.CanPass(user, user.loc, 1))
@@ -207,6 +280,7 @@
/obj/structure/window/proc/hit(var/damage, var/sound_effect = 1)
if(reinf) damage *= 0.5
health = max(0, health - damage)
update_nearby_icons()
if(sound_effect)
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
if(health <= 0)
@@ -228,6 +302,7 @@
storedrods.loc = T
transfer_fingerprints_to(storedrods)
qdel(src)
update_nearby_icons()
/obj/structure/window/verb/rotate()
set name = "Rotate Window Counter-Clockwise"
@@ -284,31 +359,6 @@
silicateIcon = I
*/
/obj/structure/window/New(Loc,re=0)
..()
if(re) reinf = re
storedshard = new/obj/item/weapon/shard(src)
ini_dir = dir
if(reinf)
icon_state = "rwindow"
desc = "A reinforced window."
name = "reinforced window"
state = 2*anchored
health = 40
if(opacity)
icon_state = "twindow"
storedrods = new/obj/item/stack/rods(src)
else
icon_state = "window"
air_update_turf(1)
update_nearby_icons()
return
/obj/structure/window/Destroy()
density = 0
air_update_turf(1)
@@ -331,12 +381,6 @@
return !density
return 1
//checks if this window is full-tile one
/obj/structure/window/proc/is_fulltile()
if(dir in list(5,6,9,10))
return 1
return 0
//This proc is used to update the icons of nearby windows.
/obj/structure/window/proc/update_nearby_icons()
update_icon()
@@ -351,22 +395,21 @@
//This spawn is here so windows get properly updated when one gets deleted.
spawn(2)
if(!src) return
if(!is_fulltile())
if(!fulltile)
return
var/junction = 0 //will be used to determine from which side the window is connected to other windows
if(anchored)
for(var/obj/structure/window/W in orange(src,1))
if(W.anchored && W.density && W.is_fulltile()) //Only counts anchored, not-destroyed fill-tile windows.
if(abs(x-W.x)-abs(y-W.y) ) //doesn't count windows, placed diagonally to src
junction |= get_dir(src,W)
if(opacity)
icon_state = "twindow[junction]"
else
if(reinf)
icon_state = "rwindow[junction]"
else
icon_state = "window[junction]"
if(W.anchored && W.density && W.fulltile) //Only counts anchored, not-destroyed fill-tile windows.
if(src.wtype == W.wtype)
if(abs(x-W.x)-abs(y-W.y) ) //doesn't count windows, placed diagonally to src
junction |= get_dir(src,W)
icon_state = "[initial(icon_state)][junction]"
overlays.Cut()
var/ratio = health / maxhealth
ratio = Ceiling(ratio*4) * 25
overlays += "damage[ratio]"
return
/obj/structure/window/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
@@ -375,14 +418,11 @@
..()
/obj/structure/window/basic
icon_state = "window"
/obj/structure/window/reinforced
name = "reinforced window"
icon_state = "rwindow"
reinf = 1
maxhealth = 50
/obj/structure/window/reinforced/tinted
name = "tinted window"
@@ -392,3 +432,30 @@
/obj/structure/window/reinforced/tinted/frosted
name = "frosted window"
icon_state = "fwindow"
/* Full Tile Windows (more health) */
/obj/structure/window/fulltile
dir = 5
maxhealth = 50
fulltile = 1
/obj/structure/window/reinforced/fulltile
dir = 5
maxhealth = 100
fulltile = 1
/obj/structure/window/reinforced/tinted/fulltile
dir = 5
fulltile = 1
/obj/structure/window/shuttle
name = "shuttle window"
desc = "A reinforced, air-locked pod window."
icon_state = "swindow"
dir = 5
maxhealth = 100
wtype = "shuttle"
fulltile = 1
reinf = 1