mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 04:57:57 +01:00
Merge branch 'master' of https://github.com/tgstation/-tg-station into MeteorsSuck
Conflicts: code/game/turfs/simulated/walls.dm
This commit is contained in:
@@ -190,7 +190,9 @@ LINEN BINS
|
||||
user << "<span class='notice'>You put [I] in [src].</span>"
|
||||
update_icon()
|
||||
else if(amount && !hidden && I.w_class < 4) //make sure there's sheets to hide it among, make sure nothing else is hidden in there.
|
||||
user.drop_item()
|
||||
if(!user.drop_item())
|
||||
user << "<span class='notice'>\The [I] is stuck to your hand, you cannot hide it among the sheets!</span>"
|
||||
return
|
||||
I.loc = src
|
||||
hidden = I
|
||||
user << "<span class='notice'>You hide [I] among the sheets.</span>"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//I still dont think this should be a closet but whatever
|
||||
/obj/structure/closet/fireaxecabinet
|
||||
name = "Fire Axe Cabinet"
|
||||
name = "fire axe cabinet"
|
||||
desc = "There is small label that reads \"For Emergency use only\" along with details for safe use of the axe. As if."
|
||||
var/obj/item/weapon/twohanded/fireaxe/fireaxe = new/obj/item/weapon/twohanded/fireaxe
|
||||
icon_state = "fireaxe1000"
|
||||
|
||||
@@ -29,14 +29,14 @@
|
||||
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/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
|
||||
/*
|
||||
* Chef
|
||||
*/
|
||||
/obj/structure/closet/chefcloset
|
||||
name = "chef's closet"
|
||||
name = "\proper chef's closet"
|
||||
desc = "It's a storage unit for foodservice garments."
|
||||
icon_state = "black"
|
||||
icon_closed = "black"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/structure/closet/secure_closet/bar
|
||||
name = "Booze"
|
||||
name = "booze storage"
|
||||
req_access = list(access_bar)
|
||||
icon_state = "cabinetdetective_locked"
|
||||
icon_closed = "cabinetdetective"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/structure/closet/secure_closet/cargotech
|
||||
name = "Cargo Technician's Locker"
|
||||
name = "cargo technician's locker"
|
||||
req_access = list(access_cargo)
|
||||
icon_state = "securecargo1"
|
||||
icon_closed = "securecargo"
|
||||
@@ -12,7 +12,7 @@
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/under/rank/cargotech(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
new /obj/item/device/radio/headset/headset_cargo(src)
|
||||
new /obj/item/clothing/gloves/black(src)
|
||||
new /obj/item/clothing/head/soft(src)
|
||||
@@ -20,7 +20,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/closet/secure_closet/quartermaster
|
||||
name = "Quartermaster's Locker"
|
||||
name = "\proper quartermaster's locker"
|
||||
req_access = list(access_qm)
|
||||
icon_state = "secureqm1"
|
||||
icon_closed = "secureqm"
|
||||
@@ -33,7 +33,7 @@
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/under/rank/cargo(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/sneakers/brown(src)
|
||||
new /obj/item/device/radio/headset/headset_cargo(src)
|
||||
new /obj/item/clothing/gloves/black(src)
|
||||
// new /obj/item/weapon/cartridge/quartermaster(src)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/structure/closet/secure_closet/engineering_chief
|
||||
name = "Chief Engineer's Locker"
|
||||
name = "\proper chief engineer's locker"
|
||||
req_access = list(access_ce)
|
||||
icon_state = "securece1"
|
||||
icon_closed = "securece"
|
||||
@@ -21,7 +21,7 @@
|
||||
new /obj/item/clothing/head/hardhat/white(src)
|
||||
new /obj/item/clothing/head/welding(src)
|
||||
new /obj/item/clothing/gloves/yellow(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/sneakers/brown(src)
|
||||
new /obj/item/weapon/cartridge/ce(src)
|
||||
new /obj/item/device/radio/headset/heads/ce(src)
|
||||
new /obj/item/weapon/storage/toolbox/mechanical(src)
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_electrical
|
||||
name = "Electrical Supplies"
|
||||
name = "electrical supplies locker"
|
||||
req_access = list(access_engine_equip)
|
||||
icon_state = "secureengelec1"
|
||||
icon_closed = "secureengelec"
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_welding
|
||||
name = "Welding Supplies"
|
||||
name = "welding supplies locker"
|
||||
req_access = list(access_engine_equip)
|
||||
icon_state = "secureengweld1"
|
||||
icon_closed = "secureengweld"
|
||||
@@ -88,7 +88,7 @@
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_personal
|
||||
name = "Engineer's Locker"
|
||||
name = "engineer's locker"
|
||||
req_access = list(access_engine_equip)
|
||||
icon_state = "secureeng1"
|
||||
icon_closed = "secureeng"
|
||||
@@ -106,7 +106,7 @@
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_eng(src)
|
||||
new /obj/item/clothing/under/rank/engineer(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/sneakers/orange(src)
|
||||
new /obj/item/weapon/storage/toolbox/mechanical(src)
|
||||
// new /obj/item/weapon/cartridge/engineering(src)
|
||||
new /obj/item/device/radio/headset/headset_eng(src)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/kitchen
|
||||
name = "Kitchen Cabinet"
|
||||
name = "kitchen Cabinet"
|
||||
req_access = list(access_kitchen)
|
||||
|
||||
New()
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/meat
|
||||
name = "Meat Fridge"
|
||||
name = "meat fridge"
|
||||
icon_state = "fridge1"
|
||||
icon_closed = "fridge"
|
||||
icon_locked = "fridge1"
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/fridge
|
||||
name = "Refrigerator"
|
||||
name = "refrigerator"
|
||||
icon_state = "fridge1"
|
||||
icon_closed = "fridge"
|
||||
icon_locked = "fridge1"
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/money
|
||||
name = "Freezer"
|
||||
name = "freezer"
|
||||
icon_state = "fridge1"
|
||||
icon_closed = "fridge"
|
||||
icon_locked = "fridge1"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/structure/closet/secure_closet/hydroponics
|
||||
name = "Botanist's locker"
|
||||
name = "botanist's locker"
|
||||
req_access = list(access_hydroponics)
|
||||
icon_state = "hydrosecure1"
|
||||
icon_closed = "hydrosecure"
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
new /obj/item/clothing/under/rank/medical/purple(src)
|
||||
new /obj/item/clothing/under/rank/medical(src)
|
||||
new /obj/item/clothing/suit/labcoat(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/sneakers/white(src)
|
||||
// new /obj/item/weapon/cartridge/medical(src)
|
||||
new /obj/item/device/radio/headset/headset_med(src)
|
||||
new /obj/item/weapon/storage/belt/medical(src)
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/CMO
|
||||
name = "chief medical officer's locker"
|
||||
name = "\proper chief medical officer's locker"
|
||||
req_access = list(access_cmo)
|
||||
icon_state = "cmosecure1"
|
||||
icon_closed = "cmosecure"
|
||||
@@ -117,7 +117,7 @@
|
||||
new /obj/item/clothing/suit/labcoat/cmo(src)
|
||||
new /obj/item/weapon/cartridge/cmo(src)
|
||||
new /obj/item/clothing/gloves/latex(src)
|
||||
new /obj/item/clothing/shoes/brown (src)
|
||||
new /obj/item/clothing/shoes/sneakers/brown (src)
|
||||
new /obj/item/device/radio/headset/heads/cmo(src)
|
||||
new /obj/item/weapon/storage/belt/medical(src)
|
||||
new /obj/item/device/flash(src)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
..()
|
||||
contents.Cut()
|
||||
new /obj/item/clothing/under/color/white( src )
|
||||
new /obj/item/clothing/shoes/white( src )
|
||||
new /obj/item/clothing/shoes/sneakers/white( src )
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/structure/closet/secure_closet/scientist
|
||||
name = "Scientist's Locker"
|
||||
name = "scientist's locker"
|
||||
req_access = list(access_tox_storage)
|
||||
icon_state = "secureres1"
|
||||
icon_closed = "secureres"
|
||||
@@ -13,7 +13,7 @@
|
||||
sleep(2)
|
||||
new /obj/item/clothing/under/rank/scientist(src)
|
||||
new /obj/item/clothing/suit/labcoat/science(src)
|
||||
new /obj/item/clothing/shoes/white(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)
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/RD
|
||||
name = "Research Director's Locker"
|
||||
name = "\proper research director's locker"
|
||||
req_access = list(access_rd)
|
||||
icon_state = "rdsecure1"
|
||||
icon_closed = "rdsecure"
|
||||
@@ -40,7 +40,7 @@
|
||||
new /obj/item/clothing/under/rank/research_director(src)
|
||||
new /obj/item/clothing/suit/labcoat(src)
|
||||
new /obj/item/weapon/cartridge/rd(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/sneakers/white(src)
|
||||
new /obj/item/clothing/gloves/latex(src)
|
||||
new /obj/item/device/radio/headset/heads/rd(src)
|
||||
new /obj/item/weapon/tank/air(src)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/structure/closet/secure_closet/captains
|
||||
name = "captain's locker"
|
||||
name = "\proper captain's locker"
|
||||
req_access = list(access_captain)
|
||||
icon_state = "capsecure1"
|
||||
icon_closed = "capsecure"
|
||||
@@ -22,7 +22,7 @@
|
||||
new /obj/item/clothing/suit/armor/vest/capcarapace(src)
|
||||
new /obj/item/weapon/cartridge/captain(src)
|
||||
new /obj/item/clothing/head/helmet/swat(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/sneakers/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)
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/hop
|
||||
name = "head of personnel's locker"
|
||||
name = "\proper head of personnel's locker"
|
||||
req_access = list(access_hop)
|
||||
icon_state = "hopsecure1"
|
||||
icon_closed = "hopsecure"
|
||||
@@ -47,7 +47,7 @@
|
||||
new /obj/item/clothing/head/hopcap(src)
|
||||
new /obj/item/weapon/cartridge/hop(src)
|
||||
new /obj/item/device/radio/headset/heads/hop(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/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)
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/hos
|
||||
name = "head of security's locker"
|
||||
name = "\proper head of security's locker"
|
||||
req_access = list(access_hos)
|
||||
icon_state = "hossecure1"
|
||||
icon_closed = "hossecure"
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/warden
|
||||
name = "warden's locker"
|
||||
name = "\proper warden's locker"
|
||||
req_access = list(access_armory)
|
||||
icon_state = "wardensecure1"
|
||||
icon_closed = "wardensecure"
|
||||
@@ -187,7 +187,7 @@
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/detective
|
||||
name = "detective's cabinet"
|
||||
name = "\proper detective's cabinet"
|
||||
req_access = list(access_forensics_lockers)
|
||||
icon_state = "cabinetdetective_locked"
|
||||
icon_closed = "cabinetdetective"
|
||||
@@ -203,7 +203,7 @@
|
||||
new /obj/item/clothing/suit/det_suit(src)
|
||||
new /obj/item/clothing/gloves/black(src)
|
||||
new /obj/item/clothing/head/det_hat(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/sneakers/brown(src)
|
||||
new /obj/item/weapon/storage/box/evidence(src)
|
||||
new /obj/item/weapon/clipboard(src)
|
||||
new /obj/item/device/radio/headset/headset_sec(src)
|
||||
@@ -248,7 +248,7 @@
|
||||
|
||||
New()
|
||||
new /obj/item/clothing/under/color/orange( src )
|
||||
new /obj/item/clothing/shoes/orange( src )
|
||||
new /obj/item/clothing/shoes/sneakers/orange( src )
|
||||
return
|
||||
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/sneakers/brown(src)
|
||||
new /obj/item/weapon/paper/Court (src)
|
||||
new /obj/item/weapon/paper/Court (src)
|
||||
new /obj/item/weapon/paper/Court (src)
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
//Sad trombone
|
||||
if(pickednum == 1)
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src)
|
||||
P.name = "IOU"
|
||||
P.name = "\improper IOU"
|
||||
P.info = "Sorry man, we needed the money so we sold your stash. It's ok, we'll double our money for sure this time!"
|
||||
|
||||
//Metal (common ore)
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
sleep(2)
|
||||
new /obj/item/clothing/suit/bomb_suit( src )
|
||||
new /obj/item/clothing/under/color/black( src )
|
||||
new /obj/item/clothing/shoes/black( src )
|
||||
new /obj/item/clothing/shoes/sneakers/black( src )
|
||||
new /obj/item/clothing/head/bomb_hood( src )
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
sleep(2)
|
||||
new /obj/item/clothing/suit/bomb_suit/security( src )
|
||||
new /obj/item/clothing/under/rank/security( src )
|
||||
new /obj/item/clothing/shoes/brown( src )
|
||||
new /obj/item/clothing/shoes/sneakers/brown( src )
|
||||
new /obj/item/clothing/head/bomb_hood/security( src )
|
||||
|
||||
/*
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
new /obj/item/clothing/under/color/blue(src)
|
||||
new /obj/item/clothing/under/color/blue(src)
|
||||
new /obj/item/clothing/under/color/blue(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/sneakers/brown(src)
|
||||
new /obj/item/clothing/shoes/sneakers/brown(src)
|
||||
new /obj/item/clothing/shoes/sneakers/brown(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/hos
|
||||
name = "head of security wardrobe"
|
||||
name = "\proper head of security's wardrobe"
|
||||
icon_state = "red"
|
||||
icon_closed = "red"
|
||||
|
||||
@@ -58,9 +58,9 @@
|
||||
new /obj/item/clothing/under/color/pink(src)
|
||||
new /obj/item/clothing/under/color/pink(src)
|
||||
new /obj/item/clothing/under/color/pink(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/sneakers/brown(src)
|
||||
new /obj/item/clothing/shoes/sneakers/brown(src)
|
||||
new /obj/item/clothing/shoes/sneakers/brown(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/black
|
||||
@@ -72,9 +72,9 @@
|
||||
new /obj/item/clothing/under/color/black(src)
|
||||
new /obj/item/clothing/under/color/black(src)
|
||||
new /obj/item/clothing/under/color/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/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/that(src)
|
||||
new /obj/item/clothing/head/that(src)
|
||||
new /obj/item/clothing/head/that(src)
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
/obj/structure/closet/wardrobe/chaplain_black/New()
|
||||
new /obj/item/clothing/under/rank/chaplain(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/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)
|
||||
@@ -113,9 +113,9 @@
|
||||
new /obj/item/clothing/under/color/green(src)
|
||||
new /obj/item/clothing/under/color/green(src)
|
||||
new /obj/item/clothing/under/color/green(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -129,9 +129,9 @@
|
||||
new /obj/item/clothing/under/color/orange(src)
|
||||
new /obj/item/clothing/under/color/orange(src)
|
||||
new /obj/item/clothing/under/color/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/sneakers/orange(src)
|
||||
new /obj/item/clothing/shoes/sneakers/orange(src)
|
||||
new /obj/item/clothing/shoes/sneakers/orange(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -144,9 +144,9 @@
|
||||
new /obj/item/clothing/under/color/yellow(src)
|
||||
new /obj/item/clothing/under/color/yellow(src)
|
||||
new /obj/item/clothing/under/color/yellow(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/sneakers/orange(src)
|
||||
new /obj/item/clothing/shoes/sneakers/orange(src)
|
||||
new /obj/item/clothing/shoes/sneakers/orange(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -162,9 +162,9 @@
|
||||
new /obj/item/device/analyzer(src)
|
||||
new /obj/item/device/analyzer(src)
|
||||
new /obj/item/device/analyzer(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -178,9 +178,9 @@
|
||||
new /obj/item/clothing/under/rank/engineer(src)
|
||||
new /obj/item/clothing/under/rank/engineer(src)
|
||||
new /obj/item/clothing/under/rank/engineer(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/sneakers/orange(src)
|
||||
new /obj/item/clothing/shoes/sneakers/orange(src)
|
||||
new /obj/item/clothing/shoes/sneakers/orange(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -193,14 +193,14 @@
|
||||
new /obj/item/clothing/under/color/white(src)
|
||||
new /obj/item/clothing/under/color/white(src)
|
||||
new /obj/item/clothing/under/color/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/sneakers/white(src)
|
||||
new /obj/item/clothing/shoes/sneakers/white(src)
|
||||
new /obj/item/clothing/shoes/sneakers/white(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/pjs
|
||||
name = "Pajama wardrobe"
|
||||
name = "pajama wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
@@ -209,10 +209,10 @@
|
||||
new /obj/item/clothing/under/pj/red(src)
|
||||
new /obj/item/clothing/under/pj/blue(src)
|
||||
new /obj/item/clothing/under/pj/blue(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/sneakers/white(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)
|
||||
return
|
||||
|
||||
|
||||
@@ -228,9 +228,9 @@
|
||||
new /obj/item/clothing/suit/labcoat(src)
|
||||
new /obj/item/clothing/suit/labcoat(src)
|
||||
new /obj/item/clothing/suit/labcoat(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/sneakers/white(src)
|
||||
new /obj/item/clothing/shoes/sneakers/white(src)
|
||||
new /obj/item/clothing/shoes/sneakers/white(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -244,8 +244,8 @@
|
||||
new /obj/item/clothing/under/rank/roboticist(src)
|
||||
new /obj/item/clothing/suit/labcoat(src)
|
||||
new /obj/item/clothing/suit/labcoat(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
new /obj/item/clothing/gloves/black(src)
|
||||
new /obj/item/clothing/gloves/black(src)
|
||||
new /obj/item/clothing/head/soft/black(src)
|
||||
@@ -261,8 +261,8 @@
|
||||
/obj/structure/closet/wardrobe/chemistry_white/New()
|
||||
new /obj/item/clothing/under/rank/chemist(src)
|
||||
new /obj/item/clothing/under/rank/chemist(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/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)
|
||||
return
|
||||
@@ -276,8 +276,8 @@
|
||||
/obj/structure/closet/wardrobe/genetics_white/New()
|
||||
new /obj/item/clothing/under/rank/geneticist(src)
|
||||
new /obj/item/clothing/under/rank/geneticist(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/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)
|
||||
return
|
||||
@@ -291,8 +291,8 @@
|
||||
/obj/structure/closet/wardrobe/virology_white/New()
|
||||
new /obj/item/clothing/under/rank/virologist(src)
|
||||
new /obj/item/clothing/under/rank/virologist(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/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/mask/surgical(src)
|
||||
@@ -309,9 +309,9 @@
|
||||
new /obj/item/clothing/under/color/grey(src)
|
||||
new /obj/item/clothing/under/color/grey(src)
|
||||
new /obj/item/clothing/under/color/grey(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/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/grey(src)
|
||||
new /obj/item/clothing/head/soft/grey(src)
|
||||
new /obj/item/clothing/head/soft/grey(src)
|
||||
@@ -334,7 +334,7 @@
|
||||
new /obj/item/clothing/under/color/green(src)
|
||||
new /obj/item/clothing/under/color/orange(src)
|
||||
new /obj/item/clothing/under/color/pink(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
new /obj/item/clothing/shoes/sneakers/brown(src)
|
||||
new /obj/item/clothing/shoes/sneakers/white(src)
|
||||
return
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
/obj/structure/closet/crate/internals
|
||||
desc = "A internals crate."
|
||||
name = "Internals crate"
|
||||
name = "internals crate"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "o2crate"
|
||||
density = 1
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
/obj/structure/closet/crate/trashcart
|
||||
desc = "A heavy, metal trashcart with wheels."
|
||||
name = "Trash Cart"
|
||||
name = "trash cart"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "trashcart"
|
||||
density = 1
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
/obj/structure/closet/crate/medical
|
||||
desc = "A medical crate."
|
||||
name = "Medical crate"
|
||||
name = "medical crate"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "medicalcrate"
|
||||
density = 1
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
/obj/structure/closet/crate/rcd
|
||||
desc = "A crate for the storage of the RCD."
|
||||
name = "RCD crate"
|
||||
name = "\improper RCD crate"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "crate"
|
||||
density = 1
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
/obj/structure/closet/crate/freezer
|
||||
desc = "A freezer."
|
||||
name = "Freezer"
|
||||
name = "freezer"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "freezer"
|
||||
density = 1
|
||||
@@ -103,7 +103,7 @@
|
||||
|
||||
/obj/structure/closet/crate/radiation
|
||||
desc = "A crate with a radiation sign on it."
|
||||
name = "Radioactive gear crate"
|
||||
name = "radioactive gear crate"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "radiation"
|
||||
density = 1
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
/obj/structure/closet/crate/secure/weapon
|
||||
desc = "A secure weapons crate."
|
||||
name = "Weapons crate"
|
||||
name = "weapons crate"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "weaponcrate"
|
||||
density = 1
|
||||
@@ -121,7 +121,7 @@
|
||||
|
||||
/obj/structure/closet/crate/secure/plasma
|
||||
desc = "A secure plasma crate."
|
||||
name = "Plasma crate"
|
||||
name = "plasma crate"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "plasmacrate"
|
||||
density = 1
|
||||
@@ -130,7 +130,7 @@
|
||||
|
||||
/obj/structure/closet/crate/secure/gear
|
||||
desc = "A secure gear crate."
|
||||
name = "Gear crate"
|
||||
name = "gear crate"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "secgearcrate"
|
||||
density = 1
|
||||
@@ -148,7 +148,7 @@
|
||||
|
||||
/obj/structure/closet/crate/secure/bin
|
||||
desc = "A secure bin."
|
||||
name = "Secure bin"
|
||||
name = "secure bin"
|
||||
icon_state = "largebins"
|
||||
icon_opened = "largebinsopen"
|
||||
icon_closed = "largebins"
|
||||
@@ -159,7 +159,7 @@
|
||||
|
||||
/obj/structure/closet/crate/secure
|
||||
desc = "A secure crate."
|
||||
name = "Secure crate"
|
||||
name = "secure crate"
|
||||
icon_state = "securecrate"
|
||||
icon_opened = "securecrateopen"
|
||||
icon_closed = "securecrate"
|
||||
@@ -172,7 +172,7 @@
|
||||
health = 1000
|
||||
|
||||
/obj/structure/closet/crate/hydroponics
|
||||
name = "Hydroponics crate"
|
||||
name = "hydroponics crate"
|
||||
desc = "All you need to destroy those pesky weeds and pests."
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "hydrocrate"
|
||||
@@ -250,7 +250,6 @@
|
||||
|
||||
if(contents.len >= storage_capacity)
|
||||
return -1
|
||||
|
||||
if(include_mobs && isliving(AM))
|
||||
var/mob/living/L = AM
|
||||
if(L.buckled)
|
||||
@@ -325,7 +324,9 @@
|
||||
if(opened)
|
||||
if(isrobot(user))
|
||||
return
|
||||
user.drop_item()
|
||||
if(!user.drop_item()) //couldn't drop the item
|
||||
user << "<span class='notice'>\The [W] is stuck to your hand, you cannot put it in \the [src]!</span>"
|
||||
return
|
||||
if(W)
|
||||
W.loc = src.loc
|
||||
else if(istype(W, /obj/item/weapon/packageWrap))
|
||||
|
||||
@@ -60,7 +60,7 @@ obj/structure/door_assembly
|
||||
icon_state = "door_as_gsec1"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_eng
|
||||
name = "Engineering Airlock Assembly"
|
||||
name = "engineering airlock assembly"
|
||||
icon_state = "door_as_eng1"
|
||||
glass_base_icon_state = "door_as_geng"
|
||||
typetext = "engineering"
|
||||
@@ -76,7 +76,7 @@ obj/structure/door_assembly
|
||||
icon_state = "door_as_geng1"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_min
|
||||
name = "Mining Airlock Assembly"
|
||||
name = "mining airlock assembly"
|
||||
icon_state = "door_as_min1"
|
||||
glass_base_icon_state = "door_as_gmin"
|
||||
typetext = "mining"
|
||||
@@ -92,7 +92,7 @@ obj/structure/door_assembly
|
||||
icon_state = "door_as_gmin1"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_atmo
|
||||
name = "Atmospherics Airlock Assembly"
|
||||
name = "atmospherics airlock assembly"
|
||||
icon_state = "door_as_atmo1"
|
||||
glass_base_icon_state = "door_as_gatmo"
|
||||
typetext = "atmos"
|
||||
@@ -108,7 +108,7 @@ obj/structure/door_assembly
|
||||
icon_state = "door_as_gatmo1"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_research
|
||||
name = "Research Airlock Assembly"
|
||||
name = "research airlock assembly"
|
||||
icon_state = "door_as_res1"
|
||||
glass_base_icon_state = "door_as_gres"
|
||||
typetext = "research"
|
||||
@@ -124,7 +124,7 @@ obj/structure/door_assembly
|
||||
icon_state = "door_as_gres1"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_science
|
||||
name = "Science Airlock Assembly"
|
||||
name = "science airlock assembly"
|
||||
icon_state = "door_as_sci1"
|
||||
glass_base_icon_state = "door_as_gsci"
|
||||
typetext = "science"
|
||||
@@ -140,7 +140,7 @@ obj/structure/door_assembly
|
||||
icon_state = "door_as_gsci1"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_med
|
||||
name = "Medical Airlock Assembly"
|
||||
name = "medical airlock assembly"
|
||||
icon_state = "door_as_med1"
|
||||
typetext = "medical"
|
||||
icontext = "med"
|
||||
@@ -154,7 +154,7 @@ obj/structure/door_assembly
|
||||
icon_state = "door_as_gmed1"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_mai
|
||||
name = "Maintenance Airlock Assembly"
|
||||
name = "maintenance airlock assembly"
|
||||
icon_state = "door_as_mai1"
|
||||
typetext = "maintenance"
|
||||
icontext = "mai"
|
||||
@@ -164,7 +164,7 @@ obj/structure/door_assembly
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_ext
|
||||
name = "External Airlock Assembly"
|
||||
name = "external airlock assembly"
|
||||
icon_state = "door_as_ext1"
|
||||
typetext = "external"
|
||||
icontext = "ext"
|
||||
@@ -174,7 +174,7 @@ obj/structure/door_assembly
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_fre
|
||||
name = "Freezer Airlock Assembly"
|
||||
name = "freezer airlock assembly"
|
||||
icon_state = "door_as_fre1"
|
||||
typetext = "freezer"
|
||||
icontext = "fre"
|
||||
@@ -184,7 +184,7 @@ obj/structure/door_assembly
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_hatch
|
||||
name = "Airtight Hatch Assembly"
|
||||
name = "airtight hatch assembly"
|
||||
icon_state = "door_as_hatch1"
|
||||
typetext = "hatch"
|
||||
icontext = "hatch"
|
||||
@@ -194,7 +194,7 @@ obj/structure/door_assembly
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_mhatch
|
||||
name = "Maintenance Hatch Assembly"
|
||||
name = "maintenance hatch assembly"
|
||||
icon_state = "door_as_mhatch1"
|
||||
typetext = "maintenance_hatch"
|
||||
icontext = "mhatch"
|
||||
@@ -204,7 +204,7 @@ obj/structure/door_assembly
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_glass
|
||||
name = "Glass Airlock Assembly"
|
||||
name = "glass airlock assembly"
|
||||
icon_state = "door_as_g1"
|
||||
airlock_type = /obj/machinery/door/airlock/glass
|
||||
anchored = 1
|
||||
@@ -213,7 +213,7 @@ obj/structure/door_assembly
|
||||
mineral = "glass"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_gold
|
||||
name = "Gold Airlock Assembly"
|
||||
name = "gold airlock assembly"
|
||||
icon_state = "door_as_gold1"
|
||||
airlock_type = /obj/machinery/door/airlock/gold
|
||||
anchored = 1
|
||||
@@ -222,7 +222,7 @@ obj/structure/door_assembly
|
||||
mineral = "gold"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_silver
|
||||
name = "Silver Airlock Assembly"
|
||||
name = "silver airlock assembly"
|
||||
icon_state = "door_as_silver1"
|
||||
airlock_type = /obj/machinery/door/airlock/silver
|
||||
anchored = 1
|
||||
@@ -231,7 +231,7 @@ obj/structure/door_assembly
|
||||
mineral = "silver"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_diamond
|
||||
name = "Diamond Airlock Assembly"
|
||||
name = "diamond airlock assembly"
|
||||
icon_state = "door_as_diamond1"
|
||||
airlock_type = /obj/machinery/door/airlock/diamond
|
||||
anchored = 1
|
||||
@@ -240,7 +240,7 @@ obj/structure/door_assembly
|
||||
mineral = "diamond"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_uranium
|
||||
name = "Uranium Airlock Assembly"
|
||||
name = "uranium airlock assembly"
|
||||
icon_state = "door_as_uranium1"
|
||||
airlock_type = /obj/machinery/door/airlock/uranium
|
||||
anchored = 1
|
||||
@@ -249,7 +249,7 @@ obj/structure/door_assembly
|
||||
mineral = "uranium"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_plasma
|
||||
name = "Plasma Airlock Assembly"
|
||||
name = "plasma airlock assembly"
|
||||
icon_state = "door_as_plasma1"
|
||||
airlock_type = /obj/machinery/door/airlock/plasma
|
||||
anchored = 1
|
||||
@@ -258,7 +258,7 @@ obj/structure/door_assembly
|
||||
mineral = "plasma"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_clown
|
||||
name = "Bananium Airlock Assembly"
|
||||
name = "bananium airlock assembly"
|
||||
desc = "Honk"
|
||||
icon_state = "door_as_clown1"
|
||||
airlock_type = /obj/machinery/door/airlock/clown
|
||||
@@ -268,7 +268,7 @@ obj/structure/door_assembly
|
||||
mineral = "clown"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_sandstone
|
||||
name = "Sandstone Airlock Assembly"
|
||||
name = "sandstone airlock assembly"
|
||||
icon_state = "door_as_sandstone1"
|
||||
airlock_type = /obj/machinery/door/airlock/sandstone
|
||||
anchored = 1
|
||||
@@ -277,7 +277,7 @@ obj/structure/door_assembly
|
||||
mineral = "sandstone"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_highsecurity // Borrowing this until WJohnston makes sprites for the assembly
|
||||
name = "High Tech Security Assembly"
|
||||
name = "high security airlock assembly"
|
||||
icon_state = "door_as_highsec1"
|
||||
typetext = "highsecurity"
|
||||
icontext = "highsec"
|
||||
@@ -287,7 +287,7 @@ obj/structure/door_assembly
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_vault
|
||||
name = "Vault Door Assembly"
|
||||
name = "vault door assembly"
|
||||
icon_state = "door_as_vault1"
|
||||
typetext = "vault"
|
||||
icontext = "vault"
|
||||
@@ -297,7 +297,7 @@ obj/structure/door_assembly
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_shuttle
|
||||
name = "Shuttle Airlock Assembly"
|
||||
name = "shuttle airlock assembly"
|
||||
icon_state = "door_as_shuttle1"
|
||||
typetext = "shuttle"
|
||||
icontext = "shuttle"
|
||||
@@ -307,7 +307,7 @@ obj/structure/door_assembly
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_wood
|
||||
name = "Wooden Airlock Assembly"
|
||||
name = "wooden airlock assembly"
|
||||
icon_state = "door_as_wood1"
|
||||
airlock_type = /obj/machinery/door/airlock/wood
|
||||
anchored = 1
|
||||
@@ -445,7 +445,7 @@ obj/structure/door_assembly
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You've secured the airlock assembly."
|
||||
src.name = "Secured Airlock Assembly"
|
||||
src.name = "secured airlock assembly"
|
||||
src.anchored = 1
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench) && anchored )
|
||||
@@ -454,7 +454,7 @@ obj/structure/door_assembly
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You've unsecured the airlock assembly."
|
||||
src.name = "Airlock Assembly"
|
||||
src.name = "airlock assembly"
|
||||
src.anchored = 0
|
||||
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && state == 0 && anchored )
|
||||
@@ -465,7 +465,7 @@ obj/structure/door_assembly
|
||||
coil.use(1)
|
||||
src.state = 1
|
||||
user << "\blue You've wired the airlock assembly."
|
||||
src.name = "Wired Airlock Assembly"
|
||||
src.name = "wired airlock assembly"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1 )
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
@@ -476,7 +476,7 @@ obj/structure/door_assembly
|
||||
user << "\blue You've cut the wires from the airlock assembly."
|
||||
new/obj/item/stack/cable_coil(get_turf(user), 1)
|
||||
src.state = 0
|
||||
src.name = "Secured Airlock Assembly"
|
||||
src.name = "secured airlock assembly"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/airlock_electronics) && state == 1 )
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
@@ -488,7 +488,7 @@ obj/structure/door_assembly
|
||||
if(!src) return
|
||||
user << "\blue You've installed the airlock electronics."
|
||||
src.state = 2
|
||||
src.name = "Near finished Airlock Assembly"
|
||||
src.name = "near finished airlock assembly"
|
||||
src.electronics = W
|
||||
else
|
||||
W.loc = src.loc
|
||||
@@ -503,7 +503,7 @@ obj/structure/door_assembly
|
||||
if(!src) return
|
||||
user << "\blue You've removed the airlock electronics."
|
||||
src.state = 1
|
||||
src.name = "Wired Airlock Assembly"
|
||||
src.name = "wired airlock assembly"
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
if (!electronics)
|
||||
ae = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
@@ -522,7 +522,7 @@ obj/structure/door_assembly
|
||||
user << "\blue You've installed reinforced glass windows into the airlock assembly."
|
||||
G.use(1)
|
||||
mineral = "glass"
|
||||
name = "Near finished Window Airlock Assembly"
|
||||
name = "near finished window airlock assembly"
|
||||
//This list contains the airlock paintjobs that have a glass version:
|
||||
if(icontext in list("eng", "atmo", "sec", "com", "med", "res", "min"))
|
||||
src.airlock_type = text2path("/obj/machinery/door/airlock/[typetext]")
|
||||
@@ -544,7 +544,7 @@ obj/structure/door_assembly
|
||||
user << "\blue You've installed [M] plating into the airlock assembly."
|
||||
G.use(2)
|
||||
mineral = "[M]"
|
||||
name = "Near finished [M] Airlock Assembly"
|
||||
name = "near finished [M] airlock assembly"
|
||||
airlock_type = text2path ("/obj/machinery/door/airlock/[M]")
|
||||
base_icon_state = "door_as_[M]"
|
||||
glass_base_icon_state = "door_as_g"
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
name = "grass"
|
||||
icon = 'icons/obj/flora/snowflora.dmi'
|
||||
anchored = 1
|
||||
gender = PLURAL //"this is grass" not "this is a grass"
|
||||
|
||||
/obj/structure/flora/grass/brown
|
||||
icon_state = "snowgrass1bb"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//////Kitchen Spike
|
||||
|
||||
/obj/structure/kitchenspike
|
||||
name = "a meat spike"
|
||||
name = "meat spike"
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "spike"
|
||||
desc = "A spike for collecting meat from animals"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/structure/lamarr
|
||||
name = "Lab Cage"
|
||||
name = "lab cage"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "labcage1"
|
||||
desc = "A glass lab container for storing interesting creatures."
|
||||
|
||||
@@ -268,3 +268,6 @@
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
..()
|
||||
|
||||
/obj/structure/mineral_door/resin/BlockSuperconductivity()
|
||||
if(opacity)
|
||||
return 1
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
/obj/structure/morgue
|
||||
name = "morgue"
|
||||
name = "Morgue"
|
||||
desc = "Used to keep bodies in until someone fetches them."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "morgue1"
|
||||
|
||||
@@ -146,7 +146,9 @@ FLOOR SAFES
|
||||
if(open)
|
||||
if(I.w_class + space <= maxspace)
|
||||
space += I.w_class
|
||||
user.drop_item()
|
||||
if(!user.drop_item())
|
||||
user << "<span class='notice'>\The [I] is stuck to your hand, you cannot put it in the safe!</span>"
|
||||
return
|
||||
I.loc = src
|
||||
user << "<span class='notice'>You put [I] in [src].</span>"
|
||||
updateUsrDialog()
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
icon_state = "shock"
|
||||
|
||||
/obj/structure/sign/examroom
|
||||
name = "\improper EXAM"
|
||||
name = "\improper EXAM ROOM"
|
||||
desc = "A guidance sign which reads 'EXAM ROOM'"
|
||||
icon_state = "examroom"
|
||||
|
||||
@@ -61,8 +61,8 @@
|
||||
icon_state = "space"
|
||||
|
||||
/obj/structure/sign/deathsposal
|
||||
name = "\improper DISPOSAL LEADS TO SPACE"
|
||||
desc = "A warning sign which reads 'DISPOSAL LEADS TO SPACE'"
|
||||
name = "\improper DISPOSAL: LEADS TO SPACE"
|
||||
desc = "A warning sign which reads 'DISPOSAL: LEADS TO SPACE'"
|
||||
icon_state = "deathsposal"
|
||||
|
||||
/obj/structure/sign/pods
|
||||
|
||||
@@ -708,7 +708,9 @@ Destroy type values:
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
user.drop_item()
|
||||
if(!user.drop_item())
|
||||
user << "<span class='notice'>\The [O] is stuck to your hand, you cannot put it in the rack!</span>"
|
||||
return
|
||||
if (O.loc != src.loc)
|
||||
step(O, get_dir(O, src))
|
||||
return
|
||||
@@ -722,7 +724,9 @@ Destroy type values:
|
||||
|
||||
if(isrobot(user))
|
||||
return
|
||||
user.drop_item()
|
||||
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
|
||||
return 1
|
||||
|
||||
|
||||
@@ -1,658 +0,0 @@
|
||||
|
||||
// Basic transit tubes. Straight pieces, curved sections,
|
||||
// and basic splits/joins (no routing logic).
|
||||
// Mappers: you can use "Generate Instances from Icon-states"
|
||||
// to get the different pieces.
|
||||
/obj/structure/transit_tube
|
||||
icon = 'icons/obj/pipes/transit_tube.dmi'
|
||||
icon_state = "E-W"
|
||||
density = 1
|
||||
layer = 3.1
|
||||
anchored = 1.0
|
||||
var/list/tube_dirs = null
|
||||
var/exit_delay = 2
|
||||
var/enter_delay = 1
|
||||
|
||||
// alldirs in global.dm is the same list of directions, but since
|
||||
// the specific order matters to get a usable icon_state, it is
|
||||
// copied here so that, in the unlikely case that alldirs is changed,
|
||||
// this continues to work.
|
||||
var/global/list/tube_dir_list = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
|
||||
|
||||
|
||||
// A place where tube pods stop, and people can get in or out.
|
||||
// Mappers: use "Generate Instances from Directions" for this
|
||||
// one.
|
||||
/obj/structure/transit_tube/station
|
||||
name = "station tube station"
|
||||
icon = 'icons/obj/pipes/transit_tube_station.dmi'
|
||||
icon_state = "closed"
|
||||
exit_delay = 2
|
||||
enter_delay = 3
|
||||
var/pod_moving = 0
|
||||
var/automatic_launch_time = 100
|
||||
var/cooldown_delay = 30
|
||||
var/launch_cooldown = 0
|
||||
var/reverse_launch = 0
|
||||
|
||||
var/const/OPEN_DURATION = 6
|
||||
var/const/CLOSE_DURATION = 6
|
||||
|
||||
// Stations which will send the tube in the opposite direction after their stop.
|
||||
/obj/structure/transit_tube/station/reverse
|
||||
reverse_launch = 1
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube_pod
|
||||
icon = 'icons/obj/pipes/transit_tube_pod.dmi'
|
||||
icon_state = "pod"
|
||||
animate_movement = FORWARD_STEPS
|
||||
anchored = 1.0
|
||||
density = 1
|
||||
var/moving = 0
|
||||
var/datum/gas_mixture/air_contents = new()
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube_pod/Destroy()
|
||||
for(var/atom/movable/AM in contents)
|
||||
AM.loc = loc
|
||||
|
||||
..()
|
||||
|
||||
|
||||
|
||||
// When destroyed by explosions, properly handle contents.
|
||||
obj/structure/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_pod/New(loc)
|
||||
..(loc)
|
||||
|
||||
air_contents.oxygen = MOLES_O2STANDARD * 2
|
||||
air_contents.nitrogen = MOLES_N2STANDARD
|
||||
air_contents.temperature = T20C
|
||||
|
||||
// Give auto tubes time to align before trying to start moving
|
||||
spawn(5)
|
||||
follow_tube()
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/New(loc)
|
||||
..(loc)
|
||||
|
||||
if(tube_dirs == null)
|
||||
init_dirs()
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/New(loc)
|
||||
..(loc)
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/Bumped(mob/AM as mob|obj)
|
||||
if(!pod_moving && icon_state == "open" && istype(AM, /mob))
|
||||
for(var/obj/structure/transit_tube_pod/pod in loc)
|
||||
if(!pod.moving && pod.dir in directions())
|
||||
AM.loc = pod
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/attack_hand(mob/user as mob)
|
||||
if(!pod_moving)
|
||||
for(var/obj/structure/transit_tube_pod/pod in loc)
|
||||
if(!pod.moving && pod.dir in directions())
|
||||
if(icon_state == "closed")
|
||||
open_animation()
|
||||
|
||||
else if(icon_state == "open")
|
||||
if(pod.contents.len && user.loc != pod)
|
||||
user.visible_message("<span class='warning'>[user] starts emptying [pod]'s contents onto the floor!</span>")
|
||||
if(do_after(user, 40)) //So it doesn't default to close_animation() on fail
|
||||
if(pod.loc == loc)
|
||||
for(var/atom/movable/AM in pod)
|
||||
AM.loc = get_turf(user)
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
M.Weaken(5)
|
||||
|
||||
else
|
||||
close_animation()
|
||||
break
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/weapon/grab) && icon_state == "open")
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if(ismob(G.affecting) && G.state >= GRAB_AGGRESSIVE)
|
||||
var/mob/GM = G.affecting
|
||||
for(var/obj/structure/transit_tube_pod/pod in loc)
|
||||
pod.visible_message("<span class='warning'>[user] starts putting [GM] into the [pod]!</span>")
|
||||
if(do_after(user, 60) && GM && G && G.affecting == GM)
|
||||
GM.Weaken(5)
|
||||
src.Bumped(GM)
|
||||
qdel(G)
|
||||
break
|
||||
|
||||
/obj/structure/transit_tube/station/proc/open_animation()
|
||||
if(icon_state == "closed")
|
||||
icon_state = "opening"
|
||||
spawn(OPEN_DURATION)
|
||||
if(icon_state == "opening")
|
||||
icon_state = "open"
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/proc/close_animation()
|
||||
if(icon_state == "open")
|
||||
icon_state = "closing"
|
||||
spawn(CLOSE_DURATION)
|
||||
if(icon_state == "closing")
|
||||
icon_state = "closed"
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/proc/launch_pod()
|
||||
for(var/obj/structure/transit_tube_pod/pod in loc)
|
||||
if(!pod.moving && turn(pod.dir, (reverse_launch ? 180 : 0)) in directions())
|
||||
spawn(5)
|
||||
pod_moving = 1
|
||||
close_animation()
|
||||
sleep(CLOSE_DURATION + 2)
|
||||
if(icon_state == "closed" && pod && launch_cooldown < world.time)
|
||||
pod.follow_tube(reverse_launch)
|
||||
|
||||
pod_moving = 0
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
// Called to check if a pod should stop upon entering this tube.
|
||||
/obj/structure/transit_tube/proc/should_stop_pod(pod, from_dir)
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/should_stop_pod(pod, from_dir)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
// Called when a pod stops in this tube section.
|
||||
/obj/structure/transit_tube/proc/pod_stopped(pod, from_dir)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/pod_stopped(obj/structure/transit_tube_pod/pod, from_dir)
|
||||
pod_moving = 1
|
||||
spawn(5)
|
||||
launch_cooldown = world.time + min(cooldown_delay, automatic_launch_time)
|
||||
open_animation()
|
||||
sleep(OPEN_DURATION + 2)
|
||||
pod_moving = 0
|
||||
pod.mix_air()
|
||||
|
||||
if(automatic_launch_time)
|
||||
var/const/wait_step = 5
|
||||
var/i = 0
|
||||
while(i < automatic_launch_time)
|
||||
sleep(wait_step)
|
||||
i += wait_step
|
||||
|
||||
if(pod_moving || icon_state != "open")
|
||||
return
|
||||
|
||||
launch_pod()
|
||||
|
||||
|
||||
|
||||
// Returns a /list of directions this tube section can connect to.
|
||||
// Tubes that have some sort of logic or changing direction might
|
||||
// override it with additional logic.
|
||||
/obj/structure/transit_tube/proc/directions()
|
||||
return tube_dirs
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/proc/has_entrance(from_dir)
|
||||
from_dir = turn(from_dir, 180)
|
||||
|
||||
for(var/direction in directions())
|
||||
if(direction == from_dir)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/proc/has_exit(in_dir)
|
||||
for(var/direction in directions())
|
||||
if(direction == in_dir)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
// Searches for an exit direction within 45 degrees of the
|
||||
// specified dir. Returns that direction, or 0 if none match.
|
||||
/obj/structure/transit_tube/proc/get_exit(in_dir)
|
||||
var/near_dir = 0
|
||||
var/in_dir_cw = turn(in_dir, -45)
|
||||
var/in_dir_ccw = turn(in_dir, 45)
|
||||
|
||||
for(var/direction in directions())
|
||||
if(direction == in_dir)
|
||||
return direction
|
||||
|
||||
else if(direction == in_dir_cw)
|
||||
near_dir = direction
|
||||
|
||||
else if(direction == in_dir_ccw)
|
||||
near_dir = direction
|
||||
|
||||
return near_dir
|
||||
|
||||
|
||||
|
||||
// Return how many BYOND ticks to wait before entering/exiting
|
||||
// the tube section. Default action is to return the value of
|
||||
// a var, which wouldn't need a proc, but it makes it possible
|
||||
// for later tube types to interact in more interesting ways
|
||||
// such as being very fast in one direction, but slow in others
|
||||
/obj/structure/transit_tube/proc/exit_delay(pod, to_dir)
|
||||
return exit_delay
|
||||
|
||||
/obj/structure/transit_tube/proc/enter_delay(pod, to_dir)
|
||||
return enter_delay
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube_pod/proc/follow_tube(var/reverse_launch)
|
||||
if(moving)
|
||||
return
|
||||
|
||||
moving = 1
|
||||
|
||||
spawn()
|
||||
var/obj/structure/transit_tube/current_tube = null
|
||||
var/next_dir
|
||||
var/next_loc
|
||||
var/last_delay = 0
|
||||
var/exit_delay
|
||||
|
||||
if(reverse_launch)
|
||||
dir = turn(dir, 180) // Back it up
|
||||
|
||||
for(var/obj/structure/transit_tube/tube in loc)
|
||||
if(tube.has_exit(dir))
|
||||
current_tube = tube
|
||||
break
|
||||
|
||||
while(current_tube)
|
||||
next_dir = current_tube.get_exit(dir)
|
||||
|
||||
if(!next_dir)
|
||||
break
|
||||
|
||||
exit_delay = current_tube.exit_delay(src, dir)
|
||||
last_delay += exit_delay
|
||||
|
||||
sleep(exit_delay)
|
||||
|
||||
next_loc = get_step(loc, next_dir)
|
||||
|
||||
current_tube = null
|
||||
for(var/obj/structure/transit_tube/tube in next_loc)
|
||||
if(tube.has_entrance(next_dir))
|
||||
current_tube = tube
|
||||
break
|
||||
|
||||
if(current_tube == null)
|
||||
dir = next_dir
|
||||
Move(get_step(loc, dir)) // Allow collisions when leaving the tubes.
|
||||
break
|
||||
|
||||
last_delay = current_tube.enter_delay(src, next_dir)
|
||||
sleep(last_delay)
|
||||
dir = next_dir
|
||||
loc = next_loc // When moving from one tube to another, skip collision and such.
|
||||
density = current_tube.density
|
||||
|
||||
if(current_tube && current_tube.should_stop_pod(src, next_dir))
|
||||
current_tube.pod_stopped(src, dir)
|
||||
break
|
||||
|
||||
density = 1
|
||||
|
||||
// If the pod is no longer in a tube, move in a line until stopped or slowed to a halt.
|
||||
// /turf/inertial_drift appears to only work on mobs, and re-implementing some of the
|
||||
// logic allows a gradual slowdown and eventual stop when passing over non-space turfs.
|
||||
if(!current_tube && last_delay <= 10)
|
||||
do
|
||||
sleep(last_delay)
|
||||
|
||||
if(!istype(loc, /turf/space))
|
||||
last_delay++
|
||||
|
||||
if(last_delay > 10)
|
||||
break
|
||||
|
||||
while(isturf(loc) && Move(get_step(loc, dir)))
|
||||
|
||||
moving = 0
|
||||
|
||||
|
||||
// Should I return a copy here? If the caller edits or del()s the returned
|
||||
// datum, there might be problems if I don't...
|
||||
/obj/structure/transit_tube_pod/return_air()
|
||||
var/datum/gas_mixture/GM = new()
|
||||
GM.oxygen = air_contents.oxygen
|
||||
GM.carbon_dioxide = air_contents.carbon_dioxide
|
||||
GM.nitrogen = air_contents.nitrogen
|
||||
GM.toxins = air_contents.toxins
|
||||
GM.temperature = air_contents.temperature
|
||||
return GM
|
||||
|
||||
// For now, copying what I found in an unused FEA file (and almost identical in a
|
||||
// used ZAS file). Means that assume_air and remove_air don't actually alter the
|
||||
// air contents.
|
||||
/obj/structure/transit_tube_pod/assume_air(datum/gas_mixture/giver)
|
||||
return air_contents.merge(giver)
|
||||
|
||||
/obj/structure/transit_tube_pod/remove_air(amount)
|
||||
return air_contents.remove(amount)
|
||||
|
||||
|
||||
|
||||
// Called when a pod arrives at, and before a pod departs from a station,
|
||||
// giving it a chance to mix its internal air supply with the turf it is
|
||||
// currently on.
|
||||
/obj/structure/transit_tube_pod/proc/mix_air()
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
var/env_pressure = environment.return_pressure()
|
||||
var/int_pressure = air_contents.return_pressure()
|
||||
var/total_pressure = env_pressure + int_pressure
|
||||
|
||||
if(total_pressure == 0)
|
||||
return
|
||||
|
||||
// Math here: Completely made up, not based on realistic equasions.
|
||||
// Goal is to balance towards equal pressure, but ensure some gas
|
||||
// transfer in both directions regardless.
|
||||
// Feel free to rip this out and replace it with something better,
|
||||
// I don't really know muhch about how gas transfer rates work in
|
||||
// SS13.
|
||||
var/transfer_in = max(0.1, 0.5 * (env_pressure - int_pressure) / total_pressure)
|
||||
var/transfer_out = max(0.1, 0.3 * (int_pressure - env_pressure) / total_pressure)
|
||||
|
||||
var/datum/gas_mixture/from_env = loc.remove_air(environment.total_moles() * transfer_in)
|
||||
var/datum/gas_mixture/from_int = air_contents.remove(air_contents.total_moles() * transfer_out)
|
||||
|
||||
loc.assume_air(from_int)
|
||||
air_contents.merge(from_env)
|
||||
|
||||
|
||||
|
||||
// When the player moves, check if the pos is currently stopped at a station.
|
||||
// if it is, check the direction. If the direction matches the direction of
|
||||
// the station, try to exit. If the direction matches one of the station's
|
||||
// tube directions, launch the pod in that direction.
|
||||
/obj/structure/transit_tube_pod/relaymove(mob/mob, direction)
|
||||
if(istype(mob, /mob) && mob.client)
|
||||
// If the pod is not in a tube at all, you can get out at any time.
|
||||
if(!(locate(/obj/structure/transit_tube) in loc))
|
||||
mob.loc = loc
|
||||
mob.client.Move(get_step(loc, direction), direction)
|
||||
mob.reset_view(null)
|
||||
|
||||
//if(moving && istype(loc, /turf/space))
|
||||
// Todo: If you get out of a moving pod in space, you should move as well.
|
||||
// Same direction as pod? Direcion you moved? Halfway between?
|
||||
|
||||
if(!moving)
|
||||
for(var/obj/structure/transit_tube/station/station in loc)
|
||||
if(dir in station.directions())
|
||||
if(!station.pod_moving)
|
||||
if(direction == station.dir)
|
||||
if(station.icon_state == "open")
|
||||
mob.loc = loc
|
||||
mob.client.Move(get_step(loc, direction), direction)
|
||||
mob.reset_view(null)
|
||||
|
||||
else
|
||||
station.open_animation()
|
||||
|
||||
else if(direction in station.directions())
|
||||
dir = direction
|
||||
station.launch_pod()
|
||||
return
|
||||
|
||||
for(var/obj/structure/transit_tube/tube in loc)
|
||||
if(dir in tube.directions())
|
||||
if(tube.has_exit(direction))
|
||||
dir = direction
|
||||
return
|
||||
|
||||
|
||||
// Parse the icon_state into a list of directions.
|
||||
// This means that mappers can use Dream Maker's built in
|
||||
// "Generate Instances from Icon-states" option to get all
|
||||
// variations. Additionally, as a separate proc, sub-types
|
||||
// can handle it more intelligently.
|
||||
/obj/structure/transit_tube/proc/init_dirs()
|
||||
if(icon_state == "auto")
|
||||
// Additional delay, for map loading.
|
||||
spawn(1)
|
||||
init_dirs_automatic()
|
||||
|
||||
else
|
||||
tube_dirs = parse_dirs(icon_state)
|
||||
|
||||
if(copytext(icon_state, 1, 3) == "D-" || findtextEx(icon_state, "Pass"))
|
||||
density = 0
|
||||
|
||||
|
||||
|
||||
// Tube station directions are simply 90 to either side of
|
||||
// the exit.
|
||||
/obj/structure/transit_tube/station/init_dirs()
|
||||
tube_dirs = list(turn(dir, 90), turn(dir, -90))
|
||||
|
||||
|
||||
|
||||
// Initialize dirs by searching for tubes that do/might connect
|
||||
// on nearby turfs. Create corner pieces if nessecary.
|
||||
// Pick two directions, preferring tubes that already connect
|
||||
// to loc, or other auto tubes if there aren't enough connections.
|
||||
/obj/structure/transit_tube/proc/init_dirs_automatic()
|
||||
var/list/connected = list()
|
||||
var/list/connected_auto = list()
|
||||
|
||||
for(var/direction in tube_dir_list)
|
||||
var/location = get_step(loc, direction)
|
||||
for(var/obj/structure/transit_tube/tube in location)
|
||||
if(tube.directions() == null && tube.icon_state == "auto")
|
||||
connected_auto += direction
|
||||
break
|
||||
|
||||
else if(turn(direction, 180) in tube.directions())
|
||||
connected += direction
|
||||
break
|
||||
|
||||
connected += connected_auto
|
||||
|
||||
tube_dirs = select_automatic_dirs(connected)
|
||||
|
||||
if(length(tube_dirs) == 2 && tube_dir_list.Find(tube_dirs[1]) > tube_dir_list.Find(tube_dirs[2]))
|
||||
tube_dirs.Swap(1, 2)
|
||||
|
||||
generate_automatic_corners(tube_dirs)
|
||||
select_automatic_icon_state(tube_dirs)
|
||||
|
||||
|
||||
|
||||
// Given a list of directions, look a pair that forms a 180 or
|
||||
// 135 degree angle, and return a list containing the pair.
|
||||
// If none exist, return list(connected[1], turn(connected[1], 180)
|
||||
/obj/structure/transit_tube/proc/select_automatic_dirs(connected)
|
||||
if(length(connected) < 1)
|
||||
return list()
|
||||
|
||||
for(var/i = 1, i <= length(connected), i++)
|
||||
for(var/j = i + 1, j <= length(connected), j++)
|
||||
var/d1 = connected[i]
|
||||
var/d2 = connected[j]
|
||||
|
||||
if(d1 == turn(d2, 135) || d1 == turn(d2, 180) || d1 == turn(d2, 225))
|
||||
return list(d1, d2)
|
||||
|
||||
return list(connected[1], turn(connected[1], 180))
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/proc/select_automatic_icon_state(directions)
|
||||
if(length(directions) == 2)
|
||||
icon_state = "[dir2text_short(directions[1])]-[dir2text_short(directions[2])]"
|
||||
|
||||
|
||||
|
||||
// Look for diagonal directions, generate the decorative corners in each.
|
||||
/obj/structure/transit_tube/proc/generate_automatic_corners(directions)
|
||||
for(var/direction in directions)
|
||||
if(direction == 5 || direction == 6 || direction == 9 || direction == 10)
|
||||
if(direction & NORTH)
|
||||
create_automatic_decorative_corner(get_step(loc, NORTH), direction ^ 3)
|
||||
|
||||
else
|
||||
create_automatic_decorative_corner(get_step(loc, SOUTH), direction ^ 3)
|
||||
|
||||
if(direction & EAST)
|
||||
create_automatic_decorative_corner(get_step(loc, EAST), direction ^ 12)
|
||||
|
||||
else
|
||||
create_automatic_decorative_corner(get_step(loc, WEST), direction ^ 12)
|
||||
|
||||
|
||||
|
||||
// Generate a corner, if one doesn't exist for the direction on the turf.
|
||||
/obj/structure/transit_tube/proc/create_automatic_decorative_corner(location, direction)
|
||||
var/state = "D-[dir2text_short(direction)]"
|
||||
|
||||
for(var/obj/structure/transit_tube/tube in location)
|
||||
if(tube.icon_state == state)
|
||||
return
|
||||
|
||||
var/obj/structure/transit_tube/tube = new(location)
|
||||
tube.icon_state = state
|
||||
tube.init_dirs()
|
||||
|
||||
|
||||
|
||||
// Uses a list() to cache return values. Since they should
|
||||
// never be edited directly, all tubes with a certain
|
||||
// icon_state can just reference the same list. In theory,
|
||||
// reduces memory usage, and improves CPU cache usage.
|
||||
// In reality, I don't know if that is quite how BYOND works,
|
||||
// but it is probably safer to assume the existence of, and
|
||||
// rely on, a sufficiently smart compiler/optimizer.
|
||||
/obj/structure/transit_tube/proc/parse_dirs(text)
|
||||
var/global/list/direction_table = list()
|
||||
|
||||
if(text in direction_table)
|
||||
return direction_table[text]
|
||||
|
||||
var/list/split_text = text2list(text, "-")
|
||||
|
||||
// If the first token is D, the icon_state represents
|
||||
// a purely decorative tube, and doesn't actually
|
||||
// connect to anything.
|
||||
if(split_text[1] == "D")
|
||||
direction_table[text] = list()
|
||||
return null
|
||||
|
||||
var/list/directions = list()
|
||||
|
||||
for(var/text_part in split_text)
|
||||
var/direction = text2dir_extended(text_part)
|
||||
|
||||
if(direction > 0)
|
||||
directions += direction
|
||||
|
||||
direction_table[text] = directions
|
||||
return directions
|
||||
|
||||
|
||||
|
||||
// A copy of text2dir, extended to accept one and two letter
|
||||
// directions, and to clearly return 0 otherwise.
|
||||
/obj/structure/transit_tube/proc/text2dir_extended(direction)
|
||||
switch(uppertext(direction))
|
||||
if("NORTH", "N")
|
||||
return 1
|
||||
if("SOUTH", "S")
|
||||
return 2
|
||||
if("EAST", "E")
|
||||
return 4
|
||||
if("WEST", "W")
|
||||
return 8
|
||||
if("NORTHEAST", "NE")
|
||||
return 5
|
||||
if("NORTHWEST", "NW")
|
||||
return 9
|
||||
if("SOUTHEAST", "SE")
|
||||
return 6
|
||||
if("SOUTHWEST", "SW")
|
||||
return 10
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
// A copy of dir2text, which returns the short one or two letter
|
||||
// directions used in tube icon states.
|
||||
/obj/structure/transit_tube/proc/dir2text_short(direction)
|
||||
switch(direction)
|
||||
if(1)
|
||||
return "N"
|
||||
if(2)
|
||||
return "S"
|
||||
if(4)
|
||||
return "E"
|
||||
if(8)
|
||||
return "W"
|
||||
if(5)
|
||||
return "NE"
|
||||
if(6)
|
||||
return "SE"
|
||||
if(9)
|
||||
return "NW"
|
||||
if(10)
|
||||
return "SW"
|
||||
else
|
||||
return
|
||||
@@ -0,0 +1,129 @@
|
||||
|
||||
// A place where tube pods stop, and people can get in or out.
|
||||
// Mappers: use "Generate Instances from Directions" for this
|
||||
// one.
|
||||
/obj/structure/transit_tube/station
|
||||
name = "station tube station"
|
||||
icon = 'icons/obj/pipes/transit_tube_station.dmi'
|
||||
icon_state = "closed"
|
||||
exit_delay = 2
|
||||
enter_delay = 3
|
||||
var/pod_moving = 0
|
||||
var/automatic_launch_time = 100
|
||||
var/cooldown_delay = 200
|
||||
var/launch_cooldown = 0
|
||||
var/reverse_launch = 0
|
||||
|
||||
var/const/OPEN_DURATION = 6
|
||||
var/const/CLOSE_DURATION = 6
|
||||
|
||||
/obj/structure/transit_tube/station/New()
|
||||
..()
|
||||
processing_objects += src
|
||||
|
||||
/obj/structure/transit_tube/station/Destroy()
|
||||
processing_objects -= src
|
||||
..()
|
||||
|
||||
// Stations which will send the tube in the opposite direction after their stop.
|
||||
/obj/structure/transit_tube/station/reverse
|
||||
reverse_launch = 1
|
||||
|
||||
/obj/structure/transit_tube/station/should_stop_pod(pod, from_dir)
|
||||
return 1
|
||||
|
||||
/obj/structure/transit_tube/station/Bumped(mob/AM as mob|obj)
|
||||
if(!pod_moving && icon_state == "open" && istype(AM, /mob))
|
||||
for(var/obj/structure/transit_tube_pod/pod in loc)
|
||||
if(!pod.moving && pod.dir in directions())
|
||||
AM.loc = pod
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/attack_hand(mob/user as mob)
|
||||
if(!pod_moving)
|
||||
for(var/obj/structure/transit_tube_pod/pod in loc)
|
||||
if(!pod.moving && pod.dir in directions())
|
||||
if(icon_state == "closed")
|
||||
open_animation()
|
||||
|
||||
else if(icon_state == "open")
|
||||
if(pod.contents.len && user.loc != pod)
|
||||
user.visible_message("<span class='warning'>[user] starts emptying [pod]'s contents onto the floor!</span>")
|
||||
if(do_after(user, 40)) //So it doesn't default to close_animation() on fail
|
||||
if(pod.loc == loc)
|
||||
for(var/atom/movable/AM in pod)
|
||||
AM.loc = get_turf(user)
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
M.Weaken(5)
|
||||
|
||||
else
|
||||
close_animation()
|
||||
break
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/weapon/grab) && icon_state == "open")
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if(ismob(G.affecting) && G.state >= GRAB_AGGRESSIVE)
|
||||
var/mob/GM = G.affecting
|
||||
for(var/obj/structure/transit_tube_pod/pod in loc)
|
||||
pod.visible_message("<span class='warning'>[user] starts putting [GM] into the [pod]!</span>")
|
||||
if(do_after(user, 60) && GM && G && G.affecting == GM)
|
||||
GM.Weaken(5)
|
||||
src.Bumped(GM)
|
||||
qdel(G)
|
||||
break
|
||||
|
||||
/obj/structure/transit_tube/station/proc/open_animation()
|
||||
if(icon_state == "closed")
|
||||
icon_state = "opening"
|
||||
spawn(OPEN_DURATION)
|
||||
if(icon_state == "opening")
|
||||
icon_state = "open"
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/proc/close_animation()
|
||||
if(icon_state == "open")
|
||||
icon_state = "closing"
|
||||
spawn(CLOSE_DURATION)
|
||||
if(icon_state == "closing")
|
||||
icon_state = "closed"
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/proc/launch_pod()
|
||||
if(launch_cooldown >= world.time)
|
||||
return
|
||||
for(var/obj/structure/transit_tube_pod/pod in loc)
|
||||
if(!pod.moving && turn(pod.dir, (reverse_launch ? 180 : 0)) in directions())
|
||||
spawn(0)
|
||||
pod_moving = 1
|
||||
close_animation()
|
||||
sleep(CLOSE_DURATION + 2)
|
||||
if(icon_state == "closed" && pod)
|
||||
pod.follow_tube(reverse_launch)
|
||||
pod_moving = 0
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/structure/transit_tube/station/process()
|
||||
if(!pod_moving)
|
||||
launch_pod()
|
||||
|
||||
/obj/structure/transit_tube/station/pod_stopped(obj/structure/transit_tube_pod/pod, from_dir)
|
||||
pod_moving = 1
|
||||
spawn(5)
|
||||
launch_cooldown = world.time + cooldown_delay
|
||||
open_animation()
|
||||
sleep(OPEN_DURATION + 2)
|
||||
pod_moving = 0
|
||||
pod.mix_air()
|
||||
|
||||
// Tube station directions are simply 90 to either side of
|
||||
// the exit.
|
||||
/obj/structure/transit_tube/station/init_dirs()
|
||||
tube_dirs = list(turn(dir, 90), turn(dir, -90))
|
||||
@@ -0,0 +1,310 @@
|
||||
|
||||
// Basic transit tubes. Straight pieces, curved sections,
|
||||
// and basic splits/joins (no routing logic).
|
||||
// Mappers: you can use "Generate Instances from Icon-states"
|
||||
// to get the different pieces.
|
||||
/obj/structure/transit_tube
|
||||
icon = 'icons/obj/pipes/transit_tube.dmi'
|
||||
icon_state = "E-W"
|
||||
density = 1
|
||||
layer = 3.1
|
||||
anchored = 1.0
|
||||
var/list/tube_dirs = null
|
||||
var/exit_delay = 2
|
||||
var/enter_delay = 1
|
||||
|
||||
// alldirs in global.dm is the same list of directions, but since
|
||||
// the specific order matters to get a usable icon_state, it is
|
||||
// copied here so that, in the unlikely case that alldirs is changed,
|
||||
// this continues to work.
|
||||
var/global/list/tube_dir_list = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
|
||||
|
||||
|
||||
// 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/New(loc)
|
||||
..(loc)
|
||||
|
||||
if(tube_dirs == null)
|
||||
init_dirs()
|
||||
|
||||
|
||||
// Called to check if a pod should stop upon entering this tube.
|
||||
/obj/structure/transit_tube/proc/should_stop_pod(pod, from_dir)
|
||||
return 0
|
||||
|
||||
// Called when a pod stops in this tube section.
|
||||
/obj/structure/transit_tube/proc/pod_stopped(pod, from_dir)
|
||||
return
|
||||
|
||||
|
||||
// Returns a /list of directions this tube section can connect to.
|
||||
// Tubes that have some sort of logic or changing direction might
|
||||
// override it with additional logic.
|
||||
/obj/structure/transit_tube/proc/directions()
|
||||
return tube_dirs
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/proc/has_entrance(from_dir)
|
||||
from_dir = turn(from_dir, 180)
|
||||
|
||||
for(var/direction in directions())
|
||||
if(direction == from_dir)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/proc/has_exit(in_dir)
|
||||
for(var/direction in directions())
|
||||
if(direction == in_dir)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
// Searches for an exit direction within 45 degrees of the
|
||||
// specified dir. Returns that direction, or 0 if none match.
|
||||
/obj/structure/transit_tube/proc/get_exit(in_dir)
|
||||
var/near_dir = 0
|
||||
var/in_dir_cw = turn(in_dir, -45)
|
||||
var/in_dir_ccw = turn(in_dir, 45)
|
||||
|
||||
for(var/direction in directions())
|
||||
if(direction == in_dir)
|
||||
return direction
|
||||
|
||||
else if(direction == in_dir_cw)
|
||||
near_dir = direction
|
||||
|
||||
else if(direction == in_dir_ccw)
|
||||
near_dir = direction
|
||||
|
||||
return near_dir
|
||||
|
||||
|
||||
// Return how many BYOND ticks to wait before entering/exiting
|
||||
// the tube section. Default action is to return the value of
|
||||
// a var, which wouldn't need a proc, but it makes it possible
|
||||
// for later tube types to interact in more interesting ways
|
||||
// such as being very fast in one direction, but slow in others
|
||||
/obj/structure/transit_tube/proc/exit_delay(pod, to_dir)
|
||||
return exit_delay
|
||||
|
||||
/obj/structure/transit_tube/proc/enter_delay(pod, to_dir)
|
||||
return enter_delay
|
||||
|
||||
|
||||
// Parse the icon_state into a list of directions.
|
||||
// This means that mappers can use Dream Maker's built in
|
||||
// "Generate Instances from Icon-states" option to get all
|
||||
// variations. Additionally, as a separate proc, sub-types
|
||||
// can handle it more intelligently.
|
||||
/obj/structure/transit_tube/proc/init_dirs()
|
||||
if(icon_state == "auto")
|
||||
// Additional delay, for map loading.
|
||||
spawn(1)
|
||||
init_dirs_automatic()
|
||||
|
||||
else
|
||||
tube_dirs = parse_dirs(icon_state)
|
||||
|
||||
if(copytext(icon_state, 1, 3) == "D-" || findtextEx(icon_state, "Pass"))
|
||||
density = 0
|
||||
|
||||
|
||||
|
||||
|
||||
// Initialize dirs by searching for tubes that do/might connect
|
||||
// on nearby turfs. Create corner pieces if nessecary.
|
||||
// Pick two directions, preferring tubes that already connect
|
||||
// to loc, or other auto tubes if there aren't enough connections.
|
||||
/obj/structure/transit_tube/proc/init_dirs_automatic()
|
||||
var/list/connected = list()
|
||||
var/list/connected_auto = list()
|
||||
|
||||
for(var/direction in tube_dir_list)
|
||||
var/location = get_step(loc, direction)
|
||||
for(var/obj/structure/transit_tube/tube in location)
|
||||
if(tube.directions() == null && tube.icon_state == "auto")
|
||||
connected_auto += direction
|
||||
break
|
||||
|
||||
else if(turn(direction, 180) in tube.directions())
|
||||
connected += direction
|
||||
break
|
||||
|
||||
connected += connected_auto
|
||||
|
||||
tube_dirs = select_automatic_dirs(connected)
|
||||
|
||||
if(length(tube_dirs) == 2 && tube_dir_list.Find(tube_dirs[1]) > tube_dir_list.Find(tube_dirs[2]))
|
||||
tube_dirs.Swap(1, 2)
|
||||
|
||||
generate_automatic_corners(tube_dirs)
|
||||
select_automatic_icon_state(tube_dirs)
|
||||
|
||||
|
||||
|
||||
// Given a list of directions, look a pair that forms a 180 or
|
||||
// 135 degree angle, and return a list containing the pair.
|
||||
// If none exist, return list(connected[1], turn(connected[1], 180)
|
||||
/obj/structure/transit_tube/proc/select_automatic_dirs(connected)
|
||||
if(length(connected) < 1)
|
||||
return list()
|
||||
|
||||
for(var/i = 1, i <= length(connected), i++)
|
||||
for(var/j = i + 1, j <= length(connected), j++)
|
||||
var/d1 = connected[i]
|
||||
var/d2 = connected[j]
|
||||
|
||||
if(d1 == turn(d2, 135) || d1 == turn(d2, 180) || d1 == turn(d2, 225))
|
||||
return list(d1, d2)
|
||||
|
||||
return list(connected[1], turn(connected[1], 180))
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/proc/select_automatic_icon_state(directions)
|
||||
if(length(directions) == 2)
|
||||
icon_state = "[dir2text_short(directions[1])]-[dir2text_short(directions[2])]"
|
||||
|
||||
|
||||
|
||||
// Look for diagonal directions, generate the decorative corners in each.
|
||||
/obj/structure/transit_tube/proc/generate_automatic_corners(directions)
|
||||
for(var/direction in directions)
|
||||
if(direction == 5 || direction == 6 || direction == 9 || direction == 10)
|
||||
if(direction & NORTH)
|
||||
create_automatic_decorative_corner(get_step(loc, NORTH), direction ^ 3)
|
||||
|
||||
else
|
||||
create_automatic_decorative_corner(get_step(loc, SOUTH), direction ^ 3)
|
||||
|
||||
if(direction & EAST)
|
||||
create_automatic_decorative_corner(get_step(loc, EAST), direction ^ 12)
|
||||
|
||||
else
|
||||
create_automatic_decorative_corner(get_step(loc, WEST), direction ^ 12)
|
||||
|
||||
|
||||
|
||||
// Generate a corner, if one doesn't exist for the direction on the turf.
|
||||
/obj/structure/transit_tube/proc/create_automatic_decorative_corner(location, direction)
|
||||
var/state = "D-[dir2text_short(direction)]"
|
||||
|
||||
for(var/obj/structure/transit_tube/tube in location)
|
||||
if(tube.icon_state == state)
|
||||
return
|
||||
|
||||
var/obj/structure/transit_tube/tube = new(location)
|
||||
tube.icon_state = state
|
||||
tube.init_dirs()
|
||||
|
||||
|
||||
|
||||
// Uses a list() to cache return values. Since they should
|
||||
// never be edited directly, all tubes with a certain
|
||||
// icon_state can just reference the same list. In theory,
|
||||
// reduces memory usage, and improves CPU cache usage.
|
||||
// In reality, I don't know if that is quite how BYOND works,
|
||||
// but it is probably safer to assume the existence of, and
|
||||
// rely on, a sufficiently smart compiler/optimizer.
|
||||
/obj/structure/transit_tube/proc/parse_dirs(text)
|
||||
var/global/list/direction_table = list()
|
||||
|
||||
if(text in direction_table)
|
||||
return direction_table[text]
|
||||
|
||||
var/list/split_text = text2list(text, "-")
|
||||
|
||||
// If the first token is D, the icon_state represents
|
||||
// a purely decorative tube, and doesn't actually
|
||||
// connect to anything.
|
||||
if(split_text[1] == "D")
|
||||
direction_table[text] = list()
|
||||
return null
|
||||
|
||||
var/list/directions = list()
|
||||
|
||||
for(var/text_part in split_text)
|
||||
var/direction = text2dir_extended(text_part)
|
||||
|
||||
if(direction > 0)
|
||||
directions += direction
|
||||
|
||||
direction_table[text] = directions
|
||||
return directions
|
||||
|
||||
|
||||
|
||||
// A copy of text2dir, extended to accept one and two letter
|
||||
// directions, and to clearly return 0 otherwise.
|
||||
/obj/structure/transit_tube/proc/text2dir_extended(direction)
|
||||
switch(uppertext(direction))
|
||||
if("NORTH", "N")
|
||||
return 1
|
||||
if("SOUTH", "S")
|
||||
return 2
|
||||
if("EAST", "E")
|
||||
return 4
|
||||
if("WEST", "W")
|
||||
return 8
|
||||
if("NORTHEAST", "NE")
|
||||
return 5
|
||||
if("NORTHWEST", "NW")
|
||||
return 9
|
||||
if("SOUTHEAST", "SE")
|
||||
return 6
|
||||
if("SOUTHWEST", "SW")
|
||||
return 10
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
// A copy of dir2text, which returns the short one or two letter
|
||||
// directions used in tube icon states.
|
||||
/obj/structure/transit_tube/proc/dir2text_short(direction)
|
||||
switch(direction)
|
||||
if(1)
|
||||
return "N"
|
||||
if(2)
|
||||
return "S"
|
||||
if(4)
|
||||
return "E"
|
||||
if(8)
|
||||
return "W"
|
||||
if(5)
|
||||
return "NE"
|
||||
if(6)
|
||||
return "SE"
|
||||
if(9)
|
||||
return "NW"
|
||||
if(10)
|
||||
return "SW"
|
||||
else
|
||||
return
|
||||
@@ -0,0 +1,192 @@
|
||||
/obj/structure/transit_tube_pod
|
||||
icon = 'icons/obj/pipes/transit_tube_pod.dmi'
|
||||
icon_state = "pod"
|
||||
animate_movement = FORWARD_STEPS
|
||||
anchored = 1.0
|
||||
density = 1
|
||||
var/moving = 0
|
||||
var/datum/gas_mixture/air_contents = new()
|
||||
|
||||
|
||||
/obj/structure/transit_tube_pod/New(loc)
|
||||
..(loc)
|
||||
|
||||
air_contents.oxygen = MOLES_O2STANDARD * 2
|
||||
air_contents.nitrogen = MOLES_N2STANDARD
|
||||
air_contents.temperature = T20C
|
||||
|
||||
// Give auto tubes time to align before trying to start moving
|
||||
spawn(5)
|
||||
follow_tube()
|
||||
|
||||
/obj/structure/transit_tube_pod/Destroy()
|
||||
for(var/atom/movable/AM in contents)
|
||||
AM.loc = loc
|
||||
|
||||
..()
|
||||
|
||||
/obj/structure/transit_tube_pod/proc/follow_tube(var/reverse_launch)
|
||||
if(moving)
|
||||
return
|
||||
|
||||
moving = 1
|
||||
|
||||
spawn()
|
||||
var/obj/structure/transit_tube/current_tube = null
|
||||
var/next_dir
|
||||
var/next_loc
|
||||
var/last_delay = 0
|
||||
var/exit_delay
|
||||
|
||||
if(reverse_launch)
|
||||
dir = turn(dir, 180) // Back it up
|
||||
|
||||
for(var/obj/structure/transit_tube/tube in loc)
|
||||
if(tube.has_exit(dir))
|
||||
current_tube = tube
|
||||
break
|
||||
|
||||
while(current_tube)
|
||||
next_dir = current_tube.get_exit(dir)
|
||||
|
||||
if(!next_dir)
|
||||
break
|
||||
|
||||
exit_delay = current_tube.exit_delay(src, dir)
|
||||
last_delay += exit_delay
|
||||
|
||||
sleep(exit_delay)
|
||||
|
||||
next_loc = get_step(loc, next_dir)
|
||||
|
||||
current_tube = null
|
||||
for(var/obj/structure/transit_tube/tube in next_loc)
|
||||
if(tube.has_entrance(next_dir))
|
||||
current_tube = tube
|
||||
break
|
||||
|
||||
if(current_tube == null)
|
||||
dir = next_dir
|
||||
Move(get_step(loc, dir)) // Allow collisions when leaving the tubes.
|
||||
break
|
||||
|
||||
last_delay = current_tube.enter_delay(src, next_dir)
|
||||
sleep(last_delay)
|
||||
dir = next_dir
|
||||
loc = next_loc // When moving from one tube to another, skip collision and such.
|
||||
density = current_tube.density
|
||||
|
||||
if(current_tube && current_tube.should_stop_pod(src, next_dir))
|
||||
current_tube.pod_stopped(src, dir)
|
||||
break
|
||||
|
||||
density = 1
|
||||
|
||||
// If the pod is no longer in a tube, move in a line until stopped or slowed to a halt.
|
||||
// /turf/inertial_drift appears to only work on mobs, and re-implementing some of the
|
||||
// logic allows a gradual slowdown and eventual stop when passing over non-space turfs.
|
||||
if(!current_tube && last_delay <= 10)
|
||||
do
|
||||
sleep(last_delay)
|
||||
|
||||
if(!istype(loc, /turf/space))
|
||||
last_delay++
|
||||
|
||||
if(last_delay > 10)
|
||||
break
|
||||
|
||||
while(isturf(loc) && Move(get_step(loc, dir)))
|
||||
|
||||
moving = 0
|
||||
|
||||
|
||||
// Should I return a copy here? If the caller edits or del()s the returned
|
||||
// datum, there might be problems if I don't...
|
||||
/obj/structure/transit_tube_pod/return_air()
|
||||
var/datum/gas_mixture/GM = new()
|
||||
GM.oxygen = air_contents.oxygen
|
||||
GM.carbon_dioxide = air_contents.carbon_dioxide
|
||||
GM.nitrogen = air_contents.nitrogen
|
||||
GM.toxins = air_contents.toxins
|
||||
GM.temperature = air_contents.temperature
|
||||
return GM
|
||||
|
||||
// For now, copying what I found in an unused FEA file (and almost identical in a
|
||||
// used ZAS file). Means that assume_air and remove_air don't actually alter the
|
||||
// air contents.
|
||||
/obj/structure/transit_tube_pod/assume_air(datum/gas_mixture/giver)
|
||||
return air_contents.merge(giver)
|
||||
|
||||
/obj/structure/transit_tube_pod/remove_air(amount)
|
||||
return air_contents.remove(amount)
|
||||
|
||||
|
||||
|
||||
// Called when a pod arrives at, and before a pod departs from a station,
|
||||
// giving it a chance to mix its internal air supply with the turf it is
|
||||
// currently on.
|
||||
/obj/structure/transit_tube_pod/proc/mix_air()
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
var/env_pressure = environment.return_pressure()
|
||||
var/int_pressure = air_contents.return_pressure()
|
||||
var/total_pressure = env_pressure + int_pressure
|
||||
|
||||
if(total_pressure == 0)
|
||||
return
|
||||
|
||||
// Math here: Completely made up, not based on realistic equasions.
|
||||
// Goal is to balance towards equal pressure, but ensure some gas
|
||||
// transfer in both directions regardless.
|
||||
// Feel free to rip this out and replace it with something better,
|
||||
// I don't really know muhch about how gas transfer rates work in
|
||||
// SS13.
|
||||
var/transfer_in = max(0.1, 0.5 * (env_pressure - int_pressure) / total_pressure)
|
||||
var/transfer_out = max(0.1, 0.3 * (int_pressure - env_pressure) / total_pressure)
|
||||
|
||||
var/datum/gas_mixture/from_env = loc.remove_air(environment.total_moles() * transfer_in)
|
||||
var/datum/gas_mixture/from_int = air_contents.remove(air_contents.total_moles() * transfer_out)
|
||||
|
||||
loc.assume_air(from_int)
|
||||
air_contents.merge(from_env)
|
||||
|
||||
|
||||
|
||||
// When the player moves, check if the pos is currently stopped at a station.
|
||||
// if it is, check the direction. If the direction matches the direction of
|
||||
// the station, try to exit. If the direction matches one of the station's
|
||||
// tube directions, launch the pod in that direction.
|
||||
/obj/structure/transit_tube_pod/relaymove(mob/mob, direction)
|
||||
if(istype(mob, /mob) && mob.client)
|
||||
// If the pod is not in a tube at all, you can get out at any time.
|
||||
if(!(locate(/obj/structure/transit_tube) in loc))
|
||||
mob.loc = loc
|
||||
mob.client.Move(get_step(loc, direction), direction)
|
||||
mob.reset_view(null)
|
||||
|
||||
//if(moving && istype(loc, /turf/space))
|
||||
// Todo: If you get out of a moving pod in space, you should move as well.
|
||||
// Same direction as pod? Direcion you moved? Halfway between?
|
||||
|
||||
if(!moving)
|
||||
for(var/obj/structure/transit_tube/station/station in loc)
|
||||
if(dir in station.directions())
|
||||
if(!station.pod_moving)
|
||||
if(direction == station.dir)
|
||||
if(station.icon_state == "open")
|
||||
mob.loc = loc
|
||||
mob.client.Move(get_step(loc, direction), direction)
|
||||
mob.reset_view(null)
|
||||
|
||||
else
|
||||
station.open_animation()
|
||||
|
||||
else if(direction in station.directions())
|
||||
dir = direction
|
||||
station.launch_pod()
|
||||
return
|
||||
|
||||
for(var/obj/structure/transit_tube/tube in loc)
|
||||
if(dir in tube.directions())
|
||||
if(tube.has_exit(direction))
|
||||
dir = direction
|
||||
return
|
||||
@@ -89,7 +89,9 @@
|
||||
if(w_items + I.w_class > 5)
|
||||
user << "<span class='notice'>The cistern is full.</span>"
|
||||
return
|
||||
user.drop_item()
|
||||
if(!user.drop_item())
|
||||
user << "<span class='notice'>\The [I] is stuck to your hand, you cannot put it in the cistern!</span>"
|
||||
return
|
||||
I.loc = src
|
||||
w_items += I.w_class
|
||||
user << "<span class='notice'>You carefully place [I] into the cistern.</span>"
|
||||
@@ -152,11 +154,8 @@
|
||||
on = !on
|
||||
update_icon()
|
||||
if(on)
|
||||
if (M.loc == loc)
|
||||
wash(M)
|
||||
check_heat(M)
|
||||
for (var/atom/movable/G in loc)
|
||||
G.clean_blood()
|
||||
Crossed(G)
|
||||
|
||||
|
||||
/obj/machinery/shower/attackby(obj/item/I, mob/user)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
obj/structure/windoor_assembly
|
||||
icon = 'icons/obj/doors/windoor.dmi'
|
||||
|
||||
name = "Windoor Assembly"
|
||||
name = "windoor Assembly"
|
||||
icon_state = "l_windoor_assembly01"
|
||||
anchored = 0
|
||||
density = 0
|
||||
@@ -102,9 +102,9 @@ obj/structure/windoor_assembly/Destroy()
|
||||
user << "\blue You've secured the windoor assembly!"
|
||||
src.anchored = 1
|
||||
if(src.secure)
|
||||
src.name = "Secure Anchored Windoor Assembly"
|
||||
src.name = "secure anchored windoor assembly"
|
||||
else
|
||||
src.name = "Anchored Windoor Assembly"
|
||||
src.name = "anchored windoor assembly"
|
||||
|
||||
//Unwrenching an unsecure assembly un-anchors it. Step 4 undone
|
||||
else if(istype(W, /obj/item/weapon/wrench) && anchored)
|
||||
@@ -116,9 +116,9 @@ obj/structure/windoor_assembly/Destroy()
|
||||
user << "\blue You've unsecured the windoor assembly!"
|
||||
src.anchored = 0
|
||||
if(src.secure)
|
||||
src.name = "Secure Windoor Assembly"
|
||||
src.name = "secure windoor assembly"
|
||||
else
|
||||
src.name = "Windoor Assembly"
|
||||
src.name = "windoor assembly"
|
||||
|
||||
//Adding plasteel makes the assembly a secure windoor assembly. Step 2 (optional) complete.
|
||||
else if(istype(W, /obj/item/stack/sheet/plasteel) && !secure)
|
||||
@@ -135,9 +135,9 @@ obj/structure/windoor_assembly/Destroy()
|
||||
user << "\blue You reinforce the windoor."
|
||||
src.secure = "secure_"
|
||||
if(src.anchored)
|
||||
src.name = "Secure Anchored Windoor Assembly"
|
||||
src.name = "secure anchored windoor assembly"
|
||||
else
|
||||
src.name = "Secure Windoor Assembly"
|
||||
src.name = "secure windoor assembly"
|
||||
|
||||
//Adding cable to the assembly. Step 5 complete.
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && anchored)
|
||||
@@ -150,9 +150,9 @@ obj/structure/windoor_assembly/Destroy()
|
||||
user << "\blue You wire the windoor!"
|
||||
src.state = "02"
|
||||
if(src.secure)
|
||||
src.name = "Secure Wired Windoor Assembly"
|
||||
src.name = "secure wired windoor assembly"
|
||||
else
|
||||
src.name = "Wired Windoor Assembly"
|
||||
src.name = "wired windoor assembly"
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -170,9 +170,9 @@ obj/structure/windoor_assembly/Destroy()
|
||||
new/obj/item/stack/cable_coil(get_turf(user), 1)
|
||||
src.state = "01"
|
||||
if(src.secure)
|
||||
src.name = "Secure Wired Windoor Assembly"
|
||||
src.name = "secure wired windoor assembly"
|
||||
else
|
||||
src.name = "Wired Windoor Assembly"
|
||||
src.name = "wired windoor assembly"
|
||||
|
||||
//Adding airlock electronics for access. Step 6 complete.
|
||||
else if(istype(W, /obj/item/weapon/airlock_electronics))
|
||||
@@ -185,7 +185,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
user << "\blue You've installed the airlock electronics!"
|
||||
src.name = "Near finished Windoor Assembly"
|
||||
src.name = "near finished windoor assembly"
|
||||
src.electronics = W
|
||||
else
|
||||
W.loc = src.loc
|
||||
@@ -201,7 +201,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You've removed the airlock electronics!"
|
||||
src.name = "Wired Windoor Assembly"
|
||||
src.name = "wired windoor assembly"
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
if (!electronics) //This shouldnt happen, but if it does, lets not crash and runtime.
|
||||
ae = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
|
||||
@@ -304,7 +304,7 @@
|
||||
/obj/structure/window/Destroy()
|
||||
density = 0
|
||||
air_update_turf(1)
|
||||
if(anchored)playsound(src, "shatter", 70, 1)
|
||||
playsound(src, "shatter", 70, 1)
|
||||
update_nearby_icons()
|
||||
..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user