mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
Survival Pod
This commit is contained in:
@@ -153,3 +153,104 @@
|
||||
name = "Mining car (not for rails)"
|
||||
icon_crate = "miningcar"
|
||||
icon_state = "miningcar"
|
||||
/*****************************Survival Pod********************************/
|
||||
|
||||
|
||||
/area/survivalpod
|
||||
name = "\improper Emergency Shelter"
|
||||
icon_state = "away"
|
||||
requires_power = 0
|
||||
has_gravity = 1
|
||||
|
||||
/obj/item/weapon/survivalcapsule
|
||||
name = "bluespace shelter capsule"
|
||||
desc = "An emergency shelter stored within a pocket of bluespace."
|
||||
icon_state = "pill3"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
w_class = 1.0
|
||||
var/used = FALSE
|
||||
|
||||
/obj/item/weapon/survivalcapsule/attack_self()
|
||||
if(used == FALSE)
|
||||
src.loc.visible_message("The [src] begins to shake. Stand back!")
|
||||
used = TRUE
|
||||
sleep(50)
|
||||
playsound(get_turf(src), 'sound/effects/phasein.ogg', 100, 1)
|
||||
PoolOrNew(/obj/effect/effect/smoke, src.loc)
|
||||
load()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/survivalcapsule/proc/load()
|
||||
var/turf/start_turf = src.loc
|
||||
var/turf/cur_turf
|
||||
var/x_size = 5
|
||||
var/y_size = 5
|
||||
var/list/walltypes = list(/turf/simulated/wall)
|
||||
var/floor_type = /turf/simulated/floor/wood
|
||||
var/room
|
||||
|
||||
//Center the room/spawn it
|
||||
start_turf = locate(start_turf.x -2, start_turf.y - 2, start_turf.z)
|
||||
|
||||
room = spawn_room(start_turf, x_size, y_size, walltypes, floor_type, "Emergency Shelter")
|
||||
|
||||
start_turf = src.loc
|
||||
|
||||
|
||||
//Fill it
|
||||
cur_turf = locate(start_turf.x, start_turf.y-2, start_turf.z)
|
||||
new /obj/machinery/door/airlock/glass(cur_turf)
|
||||
|
||||
cur_turf = locate(start_turf.x+1, start_turf.y, start_turf.z)
|
||||
new /obj/structure/table/wood(cur_turf)
|
||||
new /obj/item/weapon/storage/pill_bottle/dice(cur_turf)
|
||||
|
||||
cur_turf = locate(start_turf.x+1, start_turf.y-1, start_turf.z)
|
||||
var/obj/structure/stool/bed/chair/comfy/C = new /obj/structure/stool/bed/chair/comfy(cur_turf)
|
||||
C.dir = 1
|
||||
|
||||
cur_turf = locate(start_turf.x+1, start_turf.y+1, start_turf.z)
|
||||
new /obj/structure/stool/bed/chair/comfy(cur_turf)
|
||||
|
||||
cur_turf = locate(start_turf.x-1, start_turf.y-1, start_turf.z)
|
||||
var/obj/machinery/sleeper/S = new /obj/machinery/sleeper(cur_turf)
|
||||
S.dir = 4
|
||||
|
||||
cur_turf = locate(start_turf.x-1, start_turf.y, start_turf.z)
|
||||
new /obj/structure/table/wood(cur_turf)
|
||||
new /obj/item/weapon/storage/box/donkpockets(cur_turf)
|
||||
|
||||
cur_turf = locate(start_turf.x-1, start_turf.y+1, start_turf.z)
|
||||
new /obj/structure/table/wood(cur_turf)
|
||||
new /obj/machinery/microwave(cur_turf)
|
||||
|
||||
var/area/survivalpod/L = new /area/survivalpod
|
||||
|
||||
var/turf/threshhold = locate(start_turf.x, start_turf.y-2, start_turf.z)
|
||||
threshhold.ChangeTurf(/turf/simulated/floor/wood)
|
||||
threshhold.blocks_air = 1 //So the air doesn't leak out
|
||||
threshhold.oxygen = 21
|
||||
threshhold.temperature = 293.15
|
||||
threshhold.nitrogen = 82
|
||||
threshhold.carbon_dioxide = 0
|
||||
threshhold.toxins = 0
|
||||
L.contents += threshhold
|
||||
threshhold.overlays.Cut()
|
||||
|
||||
var/list/turfs = room["floors"]
|
||||
for(var/turf/simulated/floor/A in turfs)
|
||||
SSair.remove_from_active(A)
|
||||
A.oxygen = 21
|
||||
A.temperature = 293.15
|
||||
A.nitrogen = 82
|
||||
A.carbon_dioxide = 0
|
||||
A.toxins = 0
|
||||
A.air.oxygen = 21
|
||||
A.air.carbon_dioxide = 0
|
||||
A.air.nitrogen = 82
|
||||
A.air.toxins = 0
|
||||
A.air.temperature = 293.15
|
||||
SSair.add_to_active(A)
|
||||
A.overlays.Cut()
|
||||
|
||||
L.contents += A
|
||||
|
||||
Reference in New Issue
Block a user