Merge branch 'Aurorastation/development' into Map-Development

# Conflicts:
#	code/TriDimension/controller_presets.dm
#	code/game/objects/structures/crates_lockers/closets/secure/security.dm
#	code/game/objects/structures/crates_lockers/closets/wardrobe.dm
#	code/game/objects/structures/signs.dm
#	code/game/turfs/simulated/floor_types.dm
#	code/modules/random_map/mining_distribution.dm
#	code/modules/random_map/random_map.dm
#	code/world.dm
#	icons/obj/barsigns.dmi
#	icons/obj/decals.dmi
#	icons/obj/plants.dmi
#	icons/obj/structures.dmi
#	icons/turf/floors.dmi
#	icons/turf/wall_masks.dmi
#	maps/exodus-2.dmm
This commit is contained in:
LordFowl
2017-01-27 01:57:29 -05:00
2113 changed files with 97032 additions and 69020 deletions
@@ -4,6 +4,7 @@
icon = 'icons/obj/closet.dmi'
icon_state = "closed"
density = 1
w_class = 5
var/icon_closed = "closed"
var/icon_opened = "open"
var/opened = 0
@@ -11,7 +12,8 @@
var/wall_mounted = 0 //never solid (You can always pass over it)
var/health = 100
var/breakout = 0 //if someone is currently breaking out. mutex
var/storage_capacity = 30 //This is so that someone can't pack hundreds of items in a locker/crate
var/storage_capacity = 40 //Tying this to mob sizes was dumb
//This is so that someone can't pack hundreds of items in a locker/crate
//then open it in a populated area to crash clients.
var/open_sound = 'sound/machines/click.ogg'
var/close_sound = 'sound/machines/click.ogg'
@@ -23,6 +25,7 @@
var/const/default_mob_size = 15
/obj/structure/closet/initialize()
..()
if(!opened) // if closed, any item at the crate's loc is put in the contents
var/obj/item/I
for(I in src.loc)
@@ -53,10 +56,12 @@
else
user << "It is full."
/obj/structure/closet/alter_health()
return get_turf(src)
/obj/structure/closet/proc/stored_weight()
var/content_size = 0
for(var/obj/item/I in src.contents)
if(!I.anchored)
content_size += Ceiling(I.w_class/2)
return content_size
/obj/structure/closet/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0 || wall_mounted)) return 1
@@ -150,14 +155,13 @@
for(var/mob/living/M in src.loc)
if(M.buckled || M.pinned.len)
continue
var/current_mob_size = (M.mob_size ? M.mob_size : default_mob_size)
if(stored_units + added_units + current_mob_size > storage_capacity)
if(stored_units + added_units + M.mob_size > storage_capacity)
break
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.forceMove(src)
added_units += current_mob_size
added_units += M.mob_size
return added_units
/obj/structure/closet/proc/toggle(mob/user as mob)
@@ -165,26 +169,23 @@
user << "<span class='notice'>It won't budge!</span>"
return
update_icon()
return 1
// this should probably use dump_contents()
/obj/structure/closet/ex_act(severity)
switch(severity)
if(1)
for(var/atom/movable/A as mob|obj in src)//pulls everything out of the locker and hits it with an explosion
A.forceMove(src.loc)
A.ex_act(severity + 1)
qdel(src)
health -= rand(120, 240)
if(2)
if(prob(50))
for (var/atom/movable/A as mob|obj in src)
A.forceMove(src.loc)
A.ex_act(severity + 1)
qdel(src)
health -= rand(60, 120)
if(3)
if(prob(5))
for(var/atom/movable/A as mob|obj in src)
A.forceMove(src.loc)
qdel(src)
health -= rand(30, 60)
if (health <= 0)
for (var/atom/movable/A as mob|obj in src)
A.forceMove(src.loc)
A.ex_act(severity + 1)
qdel(src)
/obj/structure/closet/proc/damage(var/damage)
health -= damage
@@ -194,28 +195,15 @@
qdel(src)
/obj/structure/closet/bullet_act(var/obj/item/projectile/Proj)
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
var/proj_damage = Proj.get_structure_damage()
if(!proj_damage)
return
..()
damage(Proj.damage)
damage(proj_damage)
return
// this should probably use dump_contents()
/obj/structure/closet/blob_act()
if(prob(75))
for(var/atom/movable/A as mob|obj in src)
A.forceMove(src.loc)
qdel(src)
/obj/structure/closet/meteorhit(obj/O as obj)
if(O.icon_state == "flaming")
for(var/mob/M in src)
M.meteorhit(O)
src.dump_contents()
qdel(src)
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(src.opened)
if(istype(W, /obj/item/weapon/grab))
@@ -227,19 +215,25 @@
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(!WT.remove_fuel(0,user))
if(!WT.isOn())
return
else
if(WT.isOn())
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
new /obj/item/stack/material/steel(src.loc)
for(var/mob/M in viewers(src))
M.show_message("<span class='notice'>\The [src] has been cut apart by [user] with \the [WT].</span>", 3, "You hear welding.", 2)
qdel(src)
else
new /obj/item/stack/material/steel(src.loc)
for(var/mob/M in viewers(src))
M.show_message("<span class='notice'>\The [src] has been cut apart by [user] with \the [WT].</span>", 3, "You hear welding.", 2)
qdel(src)
return
if(istype(W, /obj/item/weapon/storage/laundry_basket) && W.contents.len)
var/obj/item/weapon/storage/laundry_basket/LB = W
var/turf/T = get_turf(src)
for(var/obj/item/I in LB.contents)
LB.remove_from_storage(I, T)
user.visible_message("<span class='notice'>[user] empties \the [LB] into \the [src].</span>", \
"<span class='notice'>You empty \the [LB] into \the [src].</span>", \
"<span class='notice'>You hear rustling of clothes.</span>")
return
if(isrobot(user))
return
if(W.loc != user) // This should stop mounted modules ending up outside the module.
if(!dropsafety(W))
return
usr.drop_item()
if(W)
@@ -296,7 +290,7 @@
/obj/structure/closet/attack_hand(mob/user as mob)
src.add_fingerprint(user)
src.toggle(user)
return src.toggle(user)
// tk grab then use on self
/obj/structure/closet/attack_self_tk(mob/user as mob)
@@ -1,210 +0,0 @@
//I still dont think this should be a closet but whatever
/obj/structure/closet/fireaxecabinet
name = "fire axe cabinet"
desc = "There is small label that reads \"For Emergency use only\" along with details for safe use of the axe. As if."
var/obj/item/weapon/material/twohanded/fireaxe/fireaxe
icon_state = "fireaxe1000"
icon_closed = "fireaxe1000"
icon_opened = "fireaxe1100"
anchored = 1
density = 0
var/localopened = 0 //Setting this to keep it from behaviouring like a normal closet and obstructing movement in the map. -Agouri
opened = 1
var/hitstaken = 0
var/locked = 1
var/smashed = 0
New()
..()
fireaxe = new /obj/item/weapon/material/twohanded/fireaxe(src)
attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
//..() //That's very useful, Erro
var/hasaxe = 0 //gonna come in handy later~
if(fireaxe)
hasaxe = 1
if (isrobot(usr) || src.locked)
if(istype(O, /obj/item/device/multitool))
user << "\red Resetting circuitry..."
playsound(user, 'sound/machines/lockreset.ogg', 50, 1)
if(do_after(user, 20))
src.locked = 0
user << "<span class = 'caution'> You disable the locking modules.</span>"
update_icon()
return
else if(istype(O, /obj/item/weapon))
var/obj/item/weapon/W = O
if(src.smashed || src.localopened)
if(localopened)
localopened = 0
icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
spawn(10) update_icon()
return
else
playsound(user, 'sound/effects/Glasshit.ogg', 100, 1) //We don't want this playing every time
if(W.force < 15)
user << "\blue The cabinet's protective glass glances off the hit."
else
src.hitstaken++
if(src.hitstaken == 4)
playsound(user, 'sound/effects/Glassbr3.ogg', 100, 1) //Break cabinet, receive goodies. Cabinet's fucked for life after that.
src.smashed = 1
src.locked = 0
src.localopened = 1
update_icon()
return
if (istype(O, /obj/item/weapon/material/twohanded/fireaxe) && src.localopened)
if(!fireaxe)
if(O:wielded)
user << "\red Unwield the axe first."
return
fireaxe = O
user.remove_from_mob(O)
src.contents += O
user << "\blue You place the fire axe back in the [src.name]."
update_icon()
else
if(src.smashed)
return
else
localopened = !localopened
if(localopened)
icon_state = text("fireaxe[][][][]opening",hasaxe,src.localopened,src.hitstaken,src.smashed)
spawn(10) update_icon()
else
icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
spawn(10) update_icon()
else
if(src.smashed)
return
if(istype(O, /obj/item/device/multitool))
if(localopened)
localopened = 0
icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
spawn(10) update_icon()
return
else
user << "\red Resetting circuitry..."
sleep(50)
src.locked = 1
user << "\blue You re-enable the locking modules."
playsound(user, 'sound/machines/lockenable.ogg', 50, 1)
if(do_after(user,20))
src.locked = 1
user << "<span class = 'caution'> You re-enable the locking modules.</span>"
return
else
localopened = !localopened
if(localopened)
icon_state = text("fireaxe[][][][]opening",hasaxe,src.localopened,src.hitstaken,src.smashed)
spawn(10) update_icon()
else
icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
spawn(10) update_icon()
attack_hand(mob/user as mob)
var/hasaxe = 0
if(fireaxe)
hasaxe = 1
if(src.locked)
user <<"\red The cabinet won't budge!"
return
if(localopened)
if(fireaxe)
user.put_in_hands(fireaxe)
fireaxe = null
user << "\blue You take the fire axe from the [name]."
src.add_fingerprint(user)
update_icon()
else
if(src.smashed)
return
else
localopened = !localopened
if(localopened)
src.icon_state = text("fireaxe[][][][]opening",hasaxe,src.localopened,src.hitstaken,src.smashed)
spawn(10) update_icon()
else
src.icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
spawn(10) update_icon()
else
localopened = !localopened //I'm pretty sure we don't need an if(src.smashed) in here. In case I'm wrong and it fucks up teh cabinet, **MARKER**. -Agouri
if(localopened)
src.icon_state = text("fireaxe[][][][]opening",hasaxe,src.localopened,src.hitstaken,src.smashed)
spawn(10) update_icon()
else
src.icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
spawn(10) update_icon()
attack_tk(mob/user as mob)
if(localopened && fireaxe)
fireaxe.forceMove(loc)
user << "<span class='notice'>You telekinetically remove the fire axe.</span>"
fireaxe = null
update_icon()
return
attack_hand(user)
verb/toggle_openness() //nice name, huh? HUH?! -Erro //YEAH -Agouri
set name = "Open/Close"
set category = "Object"
if (isrobot(usr) || src.locked || src.smashed)
if(src.locked)
usr << "\red The cabinet won't budge!"
else if(src.smashed)
usr << "\blue The protective glass is broken!"
return
localopened = !localopened
update_icon()
verb/remove_fire_axe()
set name = "Remove Fire Axe"
set category = "Object"
if (isrobot(usr))
return
if (localopened)
if(fireaxe)
usr.put_in_hands(fireaxe)
fireaxe = null
usr << "\blue You take the Fire axe from the [name]."
else
usr << "\blue The [src.name] is empty."
else
usr << "\blue The [src.name] is closed."
update_icon()
attack_ai(mob/user as mob)
if(src.smashed)
user << "\red The security of the cabinet is compromised."
return
else
locked = !locked
if(locked)
user << "\red Cabinet locked."
else
user << "\blue Cabinet unlocked."
return
update_icon() //Template: fireaxe[has fireaxe][is opened][hits taken][is smashed]. If you want the opening or closing animations, add "opening" or "closing" right after the numbers
var/hasaxe = 0
if(fireaxe)
hasaxe = 1
icon_state = text("fireaxe[][][][]",hasaxe,src.localopened,src.hitstaken,src.smashed)
open()
return
close()
return
@@ -4,6 +4,7 @@
icon_state = "cabinet_closed"
icon_closed = "cabinet_closed"
icon_opened = "cabinet_open"
storage_capacity = 45 //such a big closet deserves a little more capacity
/obj/structure/closet/cabinet/update_icon()
if(!opened)
@@ -26,8 +26,8 @@
new /obj/item/clothing/under/rank/bartender(src)
new /obj/item/clothing/under/rank/bartender(src)
new /obj/item/clothing/under/dress/dress_saloon(src)
new /obj/item/clothing/suit/wcoat(src)
new /obj/item/clothing/suit/wcoat(src)
new /obj/item/clothing/accessory/wcoat(src)
new /obj/item/clothing/accessory/wcoat(src)
new /obj/item/clothing/shoes/black(src)
new /obj/item/clothing/shoes/black(src)
@@ -47,7 +47,8 @@
new /obj/item/clothing/under/waiter(src)
new /obj/item/device/radio/headset/headset_service(src)
new /obj/item/device/radio/headset/headset_service(src)
new /obj/item/weapon/storage/box/mousetraps(src)
new /obj/item/clothing/suit/storage/toggle/hoodie(src)
new /obj/item/weapon/storage/box/gloves(src)
new /obj/item/weapon/storage/box/mousetraps(src)
new /obj/item/clothing/under/rank/chef(src)
new /obj/item/clothing/head/chefhat(src)
@@ -68,7 +69,7 @@
new /obj/item/weapon/cartridge/janitor(src)
new /obj/item/clothing/gloves/black(src)
new /obj/item/clothing/head/soft/purple(src)
new /obj/item/clothing/head/beret/jan(src)
new /obj/item/clothing/head/beret/purple(src)
new /obj/item/device/flashlight(src)
new /obj/item/weapon/caution(src)
new /obj/item/weapon/caution(src)
@@ -7,20 +7,21 @@
icon_opened = "cabinetdetective_open"
icon_broken = "cabinetdetective_broken"
icon_off = "cabinetdetective_broken"
storage_capacity = 45 //such a big closet deserves a little more capacity
New()
..()
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
return
/obj/structure/closet/secure_closet/bar/update_icon()
@@ -166,8 +166,8 @@
/obj/structure/closet/secure_closet/chemical
name = "chemical closet"
desc = "Store dangerous chemicals in here."
name = "chemistry equipment closet"
desc = "Contains equipment useful to chemists."
icon_state = "medical1"
icon_closed = "medical"
icon_locked = "medical1"
@@ -181,6 +181,8 @@
..()
new /obj/item/weapon/storage/box/pillbottles(src)
new /obj/item/weapon/storage/box/pillbottles(src)
new /obj/item/weapon/storage/box/spraybottles(src)
new /obj/item/weapon/storage/box/spraybottles(src)
return
/obj/structure/closet/secure_closet/medical_wall
@@ -83,23 +83,27 @@
src.registered_name = I.registered_name
src.desc = "Owned by [I.registered_name]."
else
user << "\red Access Denied"
else if( (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && !src.broken)
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = src.icon_broken
if(istype(W, /obj/item/weapon/melee/energy/blade))
user << "<span class='warning'>Access Denied</span>"
else if(istype(W, /obj/item/weapon/melee/energy/blade))
if(emag_act(INFINITY, user, "The locker has been sliced open by [user] with \an [W]!", "You hear metal being sliced and sparks flying."))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
for(var/mob/O in viewers(user, 3))
O.show_message("\blue The locker has been sliced open by [user] with an energy blade!", 1, "\red You hear metal being sliced and sparks flying.", 2)
else
user << "\red Access Denied"
user << "<span class='warning'>Access Denied</span>"
return
/obj/structure/closet/secure_closet/personal/emag_act(var/remaining_charges, var/mob/user, var/visual_feedback, var/audible_feedback)
if(!broken)
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = src.icon_broken
if(visual_feedback)
visible_message("<span class='warning'>[visual_feedback]</span>", "<span class='warning'>[audible_feedback]</span>")
return 1
/obj/structure/closet/secure_closet/personal/verb/reset()
set src in oview(1) // One square distance
@@ -110,9 +114,9 @@
if(ishuman(usr))
src.add_fingerprint(usr)
if (src.locked || !src.registered_name)
usr << "\red You need to unlock it first."
usr << "<span class='warning'>You need to unlock it first.</span>"
else if (src.broken)
usr << "\red It appears to be broken."
usr << "<span class='warning'>It appears to be broken.</span>"
else
if (src.opened)
if(!src.close())
@@ -41,7 +41,7 @@
open()
else
src.req_access = list()
src.req_access += pick(get_all_accesses())
src.req_access += pick(get_all_station_access())
..()
/obj/structure/closet/secure_closet/proc/togglelock(mob/user as mob)
@@ -78,27 +78,31 @@
user.drop_item()
if(W)
W.forceMove(src.loc)
else if((istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && !src.broken)
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = icon_off
flick(icon_broken, src)
if(istype(W, /obj/item/weapon/melee/energy/blade))
else if(istype(W, /obj/item/weapon/melee/energy/blade))//Attempt to cut open locker if locked
if(emag_act(INFINITY, user, "<span class='danger'>The locker has been sliced open by [user] with \an [W]</span>!", "<span class='danger'>You hear metal being sliced and sparks flying.</span>"))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.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 if(!src.opened)
togglelock(user)//Attempt to lock locker if closed
/obj/structure/closet/secure_closet/emag_act(var/remaining_charges, var/mob/user, var/emag_source, var/visual_feedback = "", var/audible_feedback = "")
if(!broken)
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = icon_off
flick(icon_broken, src)
if(visual_feedback)
visible_message(visual_feedback, audible_feedback)
else if(user && emag_source)
visible_message("<span class='warning'>\The [src] has been broken by \the [user] with \an [emag_source]!</span>", "You hear a faint electrical spark.")
else
for(var/mob/O in viewers(user, 3))
O.show_message("<span class='warning'>The locker has been broken by [user] with an electromagnetic card!</span>", 1, "You hear a faint electrical spark.", 2)
else if(istype(W,/obj/item/weapon/packageWrap) || istype(W,/obj/item/weapon/weldingtool))
return ..(W,user)
else
togglelock(user)
visible_message("<span class='warning'>\The [src] sparks and breaks open!</span>", "You hear a faint electrical spark.")
return 1
/obj/structure/closet/secure_closet/attack_hand(mob/user as mob)
src.add_fingerprint(user)
@@ -16,19 +16,19 @@
new /obj/item/weapon/storage/backpack/satchel_cap(src)
new /obj/item/clothing/suit/captunic(src)
new /obj/item/clothing/suit/captunic/capjacket(src)
new /obj/item/clothing/head/helmet/cap(src)
new /obj/item/clothing/head/caphat/cap(src)
new /obj/item/clothing/under/rank/captain(src)
new /obj/item/clothing/suit/storage/vest(src)
new /obj/item/weapon/cartridge/captain(src)
new /obj/item/clothing/head/helmet/swat(src)
new /obj/item/clothing/head/helmet(src)
new /obj/item/clothing/shoes/brown(src)
new /obj/item/device/radio/headset/heads/captain(src)
new /obj/item/clothing/gloves/captain(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/clothing/suit/armor/captain(src)
new /obj/item/weapon/gun/energy/pistol(src)
new /obj/item/device/flash(src)
new /obj/item/weapon/melee/telebaton(src)
new /obj/item/clothing/under/dress/dress_cap(src)
new /obj/item/clothing/head/helmet/formalcaptain(src)
new /obj/item/clothing/head/caphat/formal(src)
new /obj/item/clothing/under/captainformal(src)
return
@@ -78,7 +78,7 @@
new /obj/item/device/radio/headset/heads/hop(src)
new /obj/item/weapon/storage/box/ids(src)
new /obj/item/weapon/storage/box/ids( src )
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/weapon/gun/energy/pistol(src)
new /obj/item/weapon/gun/projectile/sec/flash(src)
new /obj/item/device/flash(src)
return
@@ -107,8 +107,7 @@
new /obj/item/clothing/shoes/leather(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/under/rank/head_of_personnel_whimsy(src)
new /obj/item/clothing/head/helmet/hop(src)
new /obj/item/device/radio/headset/heads/hop(src)
new /obj/item/clothing/head/caphat/hop(src)
return
@@ -138,15 +137,18 @@
new /obj/item/device/radio/headset/heads/hos(src)
new /obj/item/clothing/glasses/sunglasses/sechud(src)
new /obj/item/taperoll/police(src)
new /obj/item/weapon/shield/riot(src)
new /obj/item/weapon/shield/riot/tact(src)
new /obj/item/weapon/storage/box/flashbangs(src)
new /obj/item/weapon/storage/belt/security(src)
new /obj/item/device/flash(src)
new /obj/item/weapon/melee/baton/loaded(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/weapon/gun/energy/pistol(src)
new /obj/item/clothing/accessory/holster/waist(src)
new /obj/item/weapon/melee/telebaton(src)
new /obj/item/clothing/head/beret/sec/hos(src)
new /obj/item/clothing/accessory/badge/hos(src)
new /obj/item/ammo_magazine/tranq(src)
new /obj/item/device/holowarrant(src)
return
/obj/structure/closet/secure_closet/hos2
@@ -197,18 +199,23 @@
new /obj/item/clothing/under/rank/warden(src)
new /obj/item/clothing/under/rank/warden/corp(src)
new /obj/item/clothing/suit/armor/vest/warden(src)
new /obj/item/clothing/suit/armor/vest/warden/commissar(src)
new /obj/item/clothing/head/helmet/warden(src)
new /obj/item/clothing/head/helmet/warden/commissar(src)
new /obj/item/weapon/cartridge/security(src)
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/clothing/glasses/sunglasses/sechud(src)
new /obj/item/taperoll/police(src)
new /obj/item/weapon/storage/box/flashbangs(src)
new /obj/item/weapon/storage/box/teargas(src)
new /obj/item/weapon/storage/belt/security(src)
new /obj/item/weapon/reagent_containers/spray/pepper(src)
new /obj/item/weapon/melee/baton/loaded(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/weapon/gun/energy/pistol(src)
new /obj/item/weapon/storage/box/holobadge(src)
new /obj/item/clothing/head/beret/sec/warden(src)
new /obj/item/clothing/accessory/badge/warden(src)
new /obj/item/ammo_magazine/c45m/rubber(src)
return
@@ -231,7 +238,6 @@
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/clothing/suit/storage/vest/officer(src)
new /obj/item/clothing/head/helmet(src)
// new /obj/item/weapon/cartridge/security(src)
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/weapon/storage/belt/security(src)
new /obj/item/device/flash(src)
@@ -244,8 +250,9 @@
new /obj/item/clothing/accessory/storage/black_vest(src)
new /obj/item/clothing/head/soft/sec/corp(src)
new /obj/item/clothing/under/rank/security/corp(src)
new /obj/item/ammo_magazine/c45m/rubber(src)
new /obj/item/weapon/gun/energy/taser(src)
new /obj/item/ammo_magazine/c45m/rubber(src)
new /obj/item/device/holowarrant(src)
return
@@ -291,19 +298,20 @@
icon_opened = "cabinetdetective_open"
icon_broken = "cabinetdetective_broken"
icon_off = "cabinetdetective_broken"
storage_capacity = 45 //such a big closet deserves a little more capacity
New()
..()
new /obj/item/clothing/under/det(src)
new /obj/item/clothing/under/det/black(src)
new /obj/item/clothing/under/det/slob(src)
new /obj/item/clothing/suit/storage/det_suit(src)
new /obj/item/clothing/suit/storage/det_suit/black(src)
new /obj/item/clothing/suit/storage/det_trench(src)
new /obj/item/clothing/suit/storage/det_trench/technicolor(src)
new /obj/item/clothing/suit/storage/forensics/blue(src)
new /obj/item/clothing/suit/storage/forensics/red(src)
new /obj/item/clothing/gloves/black(src)
new /obj/item/clothing/head/det_hat(src)
new /obj/item/clothing/head/det_hat/black(src)
new /obj/item/clothing/head/det(src)
new /obj/item/clothing/head/det/technicolor(src)
new /obj/item/clothing/shoes/brown(src)
new /obj/item/weapon/storage/box/evidence(src)
new /obj/item/device/radio/headset/headset_sec(src)
@@ -356,7 +364,7 @@
/obj/structure/closet/secure_closet/courtroom
name = "courtroom locker"
req_access = list(access_court)
req_access = list(access_lawyer)
New()
..()
@@ -80,12 +80,15 @@
/obj/structure/closet/statue/toggle()
return
/obj/structure/closet/statue/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage
/obj/structure/closet/statue/proc/check_health()
if(health <= 0)
for(var/mob/M in src)
shatter(M)
/obj/structure/closet/statue/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.get_structure_damage()
check_health()
return
/obj/structure/closet/statue/attack_generic(var/mob/user, damage, attacktext, environment_smash)
@@ -93,23 +96,17 @@
for(var/mob/M in src)
shatter(M)
/obj/structure/closet/statue/blob_act()
/obj/structure/closet/statue/ex_act(severity)
for(var/mob/M in src)
shatter(M)
/obj/structure/closet/statue/meteorhit(obj/O as obj)
if(O.icon_state == "flaming")
for(var/mob/M in src)
M.meteorhit(O)
shatter(M)
M.ex_act(severity)
health -= 60 / severity
check_health()
/obj/structure/closet/statue/attackby(obj/item/I as obj, mob/user as mob)
health -= I.force
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] strikes [src] with [I].</span>")
if(health <= 0)
for(var/mob/M in src)
shatter(M)
check_health()
/obj/structure/closet/statue/MouseDrop_T()
return
@@ -42,11 +42,11 @@
/obj/structure/closet/syndicate/nuclear/New()
..()
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/ammo_magazine/a10mm(src)
new /obj/item/ammo_magazine/a10mm(src)
new /obj/item/ammo_magazine/a10mm(src)
new /obj/item/ammo_magazine/a10mm(src)
new /obj/item/ammo_magazine/a10mm(src)
new /obj/item/weapon/storage/box/handcuffs(src)
new /obj/item/weapon/storage/box/flashbangs(src)
new /obj/item/weapon/gun/energy/gun(src)
@@ -22,7 +22,7 @@
/obj/structure/closet/emcloset/New()
..()
switch (pickweight(list("small" = 55, "aid" = 25, "tank" = 10, "both" = 10, "nothing" = 0, "delete" = 0)))
switch (pickweight(list("small" = 55, "aid" = 25, "tank" = 10, "both" = 10)))
if ("small")
new /obj/item/weapon/tank/emergency_oxygen(src)
new /obj/item/weapon/tank/emergency_oxygen(src)
@@ -51,17 +51,6 @@
new /obj/item/clothing/suit/space/emergency(src)
new /obj/item/clothing/head/helmet/space/emergency(src)
new /obj/item/clothing/head/helmet/space/emergency(src)
if ("nothing")
// doot
// teehee - Ah, tg coders...
if ("delete")
qdel(src)
//If you want to re-add fire, just add "fire" = 15 to the pick list.
/*if ("fire")
new /obj/structure/closet/firecloset(src.loc)
qdel(src)*/
/obj/structure/closet/emcloset/legacy/New()
..()
@@ -1,13 +1,13 @@
/obj/structure/closet/wardrobe
name = "wardrobe"
desc = "It's a storage unit for standard-issue Nanotrasen attire."
desc = "It's a storage unit for standard-issue attire."
icon_state = "blue"
icon_closed = "blue"
/obj/structure/closet/wardrobe/red
name = "security wardrobe"
icon_state = "red"
icon_closed = "red"
icon_state = "blue"
icon_closed = "blue"
/obj/structure/closet/wardrobe/red/New()
..()
@@ -32,7 +32,6 @@
new /obj/item/device/radio/headset/headset_sec(src)
return
/obj/structure/closet/wardrobe/pink
name = "pink wardrobe"
icon_state = "pink"
@@ -69,7 +68,7 @@
/obj/structure/closet/wardrobe/chaplain_black
name = "chapel wardrobe"
desc = "It's a storage unit for Nanotrasen-approved religious attire."
desc = "It's a storage unit for approved religious attire."
icon_state = "black"
icon_closed = "black"
@@ -86,6 +85,7 @@
new /obj/item/weapon/storage/backpack/cultpack (src)
new /obj/item/weapon/storage/fancy/candle_box(src)
new /obj/item/weapon/storage/fancy/candle_box(src)
new /obj/item/weapon/deck/tarot(src)
return
@@ -121,7 +121,7 @@
/obj/structure/closet/wardrobe/orange
name = "prison wardrobe"
desc = "It's a storage unit for Nanotrasen-regulation prisoner attire."
desc = "It's a storage unit for regulation prisoner attire."
icon_state = "orange"
icon_closed = "orange"
@@ -168,10 +168,9 @@
new /obj/item/clothing/head/hardhat/red(src)
new /obj/item/clothing/head/hardhat/red(src)
new /obj/item/clothing/head/hardhat/red(src)
new /obj/item/clothing/head/beret/eng(src)
new /obj/item/clothing/head/beret/eng(src)
new /obj/item/clothing/head/beret/eng(src)
new /obj/item/device/radio/headset/headset_eng(src)
new /obj/item/clothing/head/beret/engineering(src)
new /obj/item/clothing/head/beret/engineering(src)
new /obj/item/clothing/head/beret/engineering(src)
return
@@ -192,10 +191,9 @@
new /obj/item/clothing/head/hardhat(src)
new /obj/item/clothing/head/hardhat(src)
new /obj/item/clothing/head/hardhat(src)
new /obj/item/clothing/head/beret/eng(src)
new /obj/item/clothing/head/beret/eng(src)
new /obj/item/clothing/head/beret/eng(src)
new /obj/item/device/radio/headset/headset_eng(src)
new /obj/item/clothing/head/beret/engineering(src)
new /obj/item/clothing/head/beret/engineering(src)
new /obj/item/clothing/head/beret/engineering(src)
return
@@ -10,9 +10,14 @@
climbable = 1
// mouse_drag_pointer = MOUSE_ACTIVE_POINTER //???
var/rigged = 0
var/tablestatus = 0
pass_flags = PASSTABLE
/obj/structure/closet/crate/can_open()
return 1
if (tablestatus != -1)//Can't be opened while under a table
return 1
return 0
/obj/structure/closet/crate/can_close()
return 1
@@ -36,11 +41,20 @@
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
for(var/obj/O in src)
O.forceMove(get_turf(src))
icon_state = icon_opened
src.opened = 1
if(climbable)
structure_shaken()
for (var/mob/M in src)
M.forceMove(get_turf(src))
if (M.stat == CONSCIOUS)
M.visible_message(span("danger","\The [M.name] bursts out of the [src]!"), span("danger","You burst out of the [src]!"))
else
M.visible_message(span("danger","\The [M.name] tumbles out of the [src]!"))
icon_state = icon_opened
src.opened = 1
pass_flags = 0
return 1
/obj/structure/closet/crate/close()
@@ -65,24 +79,15 @@
icon_state = icon_closed
src.opened = 0
pass_flags = PASSTABLE//Crates can only slide under tables when closed
return 1
/obj/structure/closet/crate/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(opened)
if(isrobot(user))
return
if(W.loc != user) // This should stop mounted modules ending up outside the module.
return
if(W.abstract) //Prevents 'abstract' items (such as grabs) from creeping into the material realm.
if(istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W
user << "<span class='notice'>[G.affecting] just doesn't fit!</span>"
else
user << "<span class='notice'>[W] does not belong there!</span>"
return
user.drop_item()
if(W)
W.forceMove(src.loc)
return ..()
else if(istype(W, /obj/item/weapon/packageWrap))
return
else if(istype(W, /obj/item/stack/cable_coil))
@@ -110,23 +115,157 @@
/obj/structure/closet/crate/ex_act(severity)
switch(severity)
if(1.0)
for(var/obj/O in src.contents)
qdel(O)
qdel(src)
return
if(2.0)
for(var/obj/O in src.contents)
if(prob(50))
qdel(O)
qdel(src)
return
if(3.0)
if (prob(50))
qdel(src)
return
if(1)
health -= rand(120, 240)
if(2)
health -= rand(60, 120)
if(3)
health -= rand(30, 60)
if (health <= 0)
for (var/atom/movable/A as mob|obj in src)
A.forceMove(src.loc)
if (prob(50) && severity > 1)//Higher chance of breaking contents
A.ex_act(severity-1)
else
A.ex_act(severity)
qdel(src)
/*
==========================
Table interactions
==========================
*/
/obj/structure/closet/crate/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if (istype(mover, /obj/structure/closet/crate))//Handle interaction with other crates
var/obj/structure/closet/crate/C = mover
if (tablestatus == 1 && C.tablestatus != 1 && !C.opened)//Allow the crate to slide under us if we're ontop of a table
return 1
else if (tablestatus == -1 && C.tablestatus == 1)//Allow it to slide over us if we're underneath a table
return 1
else//Otherwise, block it. Don't allow two crates on the same level of a tile
return 0
if(istype(mover,/obj/item/projectile))
if (tablestatus == 1)//They always block shots on a table
return 0
else if (!tablestatus && prob(15))//Usually will not block shots when lying on the floor
return 0
else return 1
else if(istype(mover) && mover.checkpass(PASSTABLE))
return 1
return 0
/obj/structure/closet/crate/Move(var/turf/destination, dir)
if(..())
if (locate(/obj/structure/table) in destination)
if (tablestatus != 1)
set_tablestatus(-1)//Slide under the table
else
return
set_tablestatus(0)
/obj/structure/closet/crate/toggle(var/mob/user)
if (!opened && tablestatus == -1)
user << span("warning", "You can't open that while it's under the table")
return 0
else
return ..()
/obj/structure/closet/crate/proc/set_tablestatus(var/target)
if (tablestatus != target)
tablestatus = target
spawn(3)//Short spawn prevents things popping up where they shouldnt
switch (target)
if (1)
layer = LAYER_ABOVE_TABLE
pixel_y = 8
if (0)
layer = initial(layer)
pixel_y = 0
if (-1)
layer = LAYER_UNDER_TABLE
pixel_y = -4
//For putting on tables
/obj/structure/closet/crate/MouseDrop(atom/over_object)
if (istype(over_object, /obj/structure/table))
put_on_table(over_object, usr)
return 1
else
return ..()
/obj/structure/closet/crate/proc/put_on_table(var/obj/structure/table/table, var/mob/user)
if (!table || !user || (tablestatus == -1))
return
//User must be in reach of the crate
if (!user.Adjacent(src))
user << span("warning", "You need to be closer to the crate!")
return
//One of us has to be near the table
if (!user.Adjacent(table) && !Adjacent(table))
user << span("warning", "Take the crate closer to the table!")
return
for (var/obj/structure/closet/crate/C in get_turf(table))
if (C.tablestatus != -1)
user << span("warning", "There's already a crate on this table!")
return
//Crates are heavy, hauling them onto tables is hard.
//The more stuff thats in it, the longer it takes
//Good place to factor in Strength in future
var/timeneeded = 20
var/success = 0
if (tablestatus == 1 && Adjacent(table))
//Sliding along a tabletop we're already on. Instant and silent
timeneeded = 0
success = 1
else
//Add time based on mass of contents
for (var/obj/O in contents)
timeneeded += 3* O.w_class
for (var/mob/M in contents)
timeneeded += 3* M.mob_size
if (timeneeded > 0)
user.visible_message("[user] starts hoisting [src] onto the [table]", "You start hoisting [src] onto the [table]. This will take about [timeneeded*0.1] seconds")
user.face_atom(src)
if (do_after(user, timeneeded, needhand = 1))
success = 1
if (success == 1)
forceMove(get_turf(table))
set_tablestatus(1)
/*
=====================
Secure Crates
=====================
*/
/obj/structure/closet/crate/secure
desc = "A secure crate."
@@ -140,6 +279,7 @@
var/emag = "securecrateemag"
var/broken = 0
var/locked = 1
health = 200
/obj/structure/closet/crate/secure/New()
..()
@@ -151,7 +291,8 @@
overlays += greenlight
/obj/structure/closet/crate/secure/can_open()
return !locked
if (..())
return !locked
/obj/structure/closet/crate/secure/proc/togglelock(mob/user as mob)
if(src.opened)
@@ -162,6 +303,7 @@
return
if(src.allowed(user))
set_locked(!locked, user)
return 1
else
user << "<span class='notice'>Access Denied</span>"
@@ -192,14 +334,22 @@
/obj/structure/closet/crate/secure/attack_hand(mob/user as mob)
src.add_fingerprint(user)
if(locked)
src.togglelock(user)
return src.togglelock(user)
else
src.toggle(user)
return src.toggle(user)
/obj/structure/closet/crate/secure/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(is_type_in_list(W, list(/obj/item/weapon/packageWrap, /obj/item/stack/cable_coil, /obj/item/device/radio/electropack, /obj/item/weapon/wirecutters)))
return ..()
if(locked && (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)))
if(istype(W, /obj/item/weapon/melee/energy/blade))
emag_act(INFINITY, user)
if(!opened)
src.togglelock(user)
return
return ..()
/obj/structure/closet/crate/secure/emag_act(var/remaining_charges, var/mob/user)
if(!broken)
overlays.Cut()
overlays += emag
overlays += sparks
@@ -208,11 +358,7 @@
src.locked = 0
src.broken = 1
user << "<span class='notice'>You unlock \the [src].</span>"
return
if(!opened)
src.togglelock(user)
return
return ..()
return 1
/obj/structure/closet/crate/secure/emp_act(severity)
for(var/obj/O in src)
@@ -234,7 +380,7 @@
open()
else
src.req_access = list()
src.req_access += pick(get_all_accesses())
src.req_access += pick(get_all_station_access())
..()
/obj/structure/closet/crate/plastic
@@ -430,6 +576,7 @@
icon_state = "largemetal"
icon_opened = "largemetalopen"
icon_closed = "largemetal"
health = 200
/obj/structure/closet/crate/large/close()
. = ..()
@@ -458,6 +605,7 @@
icon_closed = "largemetal"
redlight = "largemetalr"
greenlight = "largemetalg"
health = 400
/obj/structure/closet/crate/secure/large/close()
. = ..()
@@ -504,3 +652,60 @@
// new /obj/item/weapon/pestspray(src)
// new /obj/item/weapon/pestspray(src)
// new /obj/item/weapon/pestspray(src)
//A crate that populates itself with randomly selected loot from randomstock.dm
//Can be passed in a rarity value, which is used as a multiplier on the rare/uncommon chance
//Quantity of spawns is number of discrete selections from the loot lists, default 10
/obj/structure/closet/crate/loot
name = "unusual container"
desc = "A mysterious container of unknown origins. What mysteries lie within?"
var/rarity = 1
var/quantity = 10
var/list/spawntypes
//The crate chooses its icon randomly from a number of noticeable options.
//None of these are the standard grey crate sprite, and a few are currently unused ingame
//This ensures that people stumbling across a lootbox will notice it's different and investigate
var/list/iconchoices = list(
"radiation" = "radiationopen",
"o2crate" = "o2crateopen",
"freezer" = "freezeropen",
"weaponcrate" = "weaponcrateopen",
"largebins" = "largebinsopen",
"phoroncrate" = "phoroncrateopen",
"trashcart" = "trashcartopen",
"critter" = "critteropen",
"largemetal" = "largemetalopen",
"medicalcrate" = "medicalcrateopen")
/obj/structure/closet/crate/loot/New(var/location, var/_rarity = 1, var/_quantity = 10)
rarity = _rarity
quantity = _quantity
..(location)
/obj/structure/closet/crate/loot/initialize()
spawntypes = list("1" = STOCK_RARE_PROB*rarity, "2" = STOCK_UNCOMMON_PROB*rarity, "3" = (100 - ((STOCK_RARE_PROB*rarity) + (STOCK_UNCOMMON_PROB*rarity))))
icon_closed = pick(iconchoices)
icon_opened = iconchoices[icon_closed]
update_icon()
while (quantity > 0)
quantity --
var/newtype = get_spawntype()
spawn_stock(newtype,src)
/obj/structure/closet/crate/loot/proc/get_spawntype()
var/stocktype = pickweight(spawntypes)
switch (stocktype)
if ("1")
return pickweight(random_stock_rare)
if ("2")
return pickweight(random_stock_uncommon)
if ("3")
return pickweight(random_stock_common)
@@ -13,11 +13,14 @@
if(istype(W, /obj/item/weapon/crowbar))
new /obj/item/stack/material/wood(src)
var/turf/T = get_turf(src)
for(var/atom/movable/M in contents)
M.forceMove(T)
for(var/atom/movable/AM in contents)
if(AM.simulated) AM.forceMove(T)
user.visible_message("<span class='notice'>[user] pries \the [src] open.</span>", \
"<span class='notice'>You pry open \the [src].</span>", \
"<span class='notice'>You hear splitting wood.</span>")
for(var/obj/vehicle/V in T.contents)
if(V)
V.unload(user)
qdel(src)
else
return attack_hand(user)