mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-06-06 14:03:20 +01:00
210f8badf4
* Handlers converted, now to fix 3532 compile errors * 3532 compile fixes later, got runtimes on startup * Well the server loads now atleast * Take 2 * Oops
353 lines
11 KiB
Plaintext
353 lines
11 KiB
Plaintext
/area/survivalpod
|
|
name = "\improper Emergency Shelter"
|
|
icon_state = "away"
|
|
requires_power = FALSE
|
|
has_gravity = TRUE
|
|
dynamic_lighting = DYNAMIC_LIGHTING_FORCED
|
|
|
|
/obj/item/survivalcapsule
|
|
name = "bluespace shelter capsule"
|
|
desc = "An emergency shelter stored within a pocket of bluespace."
|
|
icon_state = "capsule"
|
|
icon = 'icons/obj/mining.dmi'
|
|
w_class = WEIGHT_CLASS_TINY
|
|
origin_tech = "engineering=3;bluespace=3"
|
|
var/template_id = "shelter_alpha"
|
|
var/datum/map_template/shelter/template
|
|
var/used = FALSE
|
|
|
|
/obj/item/survivalcapsule/proc/get_template()
|
|
if(template)
|
|
return
|
|
template = GLOB.shelter_templates[template_id]
|
|
if(!template)
|
|
log_runtime("Shelter template ([template_id]) not found!", src)
|
|
qdel(src)
|
|
|
|
/obj/item/survivalcapsule/examine(mob/user)
|
|
. = ..()
|
|
get_template()
|
|
. += "This capsule has the [template.name] stored."
|
|
. += template.description
|
|
|
|
/obj/item/survivalcapsule/attack_self()
|
|
// Can't grab when capsule is New() because templates aren't loaded then
|
|
get_template()
|
|
if(used == FALSE)
|
|
loc.visible_message("<span class='warning'>[src] begins to shake. Stand back!</span>")
|
|
used = TRUE
|
|
sleep(50)
|
|
var/turf/deploy_location = get_turf(src)
|
|
var/status = template.check_deploy(deploy_location)
|
|
switch(status)
|
|
if(SHELTER_DEPLOY_BAD_AREA)
|
|
loc.visible_message("<span class='warning'>[src] will not function in this area.</span>")
|
|
if(SHELTER_DEPLOY_BAD_TURFS, SHELTER_DEPLOY_ANCHORED_OBJECTS)
|
|
var/width = template.width
|
|
var/height = template.height
|
|
loc.visible_message("<span class='warning'>[src] doesn't have room to deploy! You need to clear a [width]x[height] area!</span>")
|
|
|
|
if(status != SHELTER_DEPLOY_ALLOWED)
|
|
used = FALSE
|
|
return
|
|
|
|
playsound(get_turf(src), 'sound/effects/phasein.ogg', 100, 1)
|
|
|
|
var/turf/T = deploy_location
|
|
if(!is_mining_level(T.z))//only report capsules away from the mining/lavaland level
|
|
message_admins("[key_name_admin(usr)] ([ADMIN_QUE(usr,"?")]) ([ADMIN_FLW(usr,"FLW")]) activated a bluespace capsule away from the mining level! (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>)")
|
|
log_admin("[key_name(usr)] activated a bluespace capsule away from the mining level at [T.x], [T.y], [T.z]")
|
|
template.load(deploy_location, centered = TRUE)
|
|
new /obj/effect/particle_effect/smoke(get_turf(src))
|
|
qdel(src)
|
|
|
|
/obj/item/survivalcapsule/luxury
|
|
name = "luxury bluespace shelter capsule"
|
|
desc = "An exorbitantly expensive luxury suite stored within a pocket of bluespace."
|
|
origin_tech = "engineering=3;bluespace=4"
|
|
template_id = "shelter_beta"
|
|
|
|
//Pod turfs and objects
|
|
|
|
//Window
|
|
/obj/structure/window/shuttle/survival_pod
|
|
name = "pod window"
|
|
icon = 'icons/obj/smooth_structures/pod_window.dmi'
|
|
icon_state = "smooth"
|
|
dir = FULLTILE_WINDOW_DIR
|
|
max_integrity = 100
|
|
fulltile = TRUE
|
|
flags = PREVENT_CLICK_UNDER
|
|
reinf = TRUE
|
|
heat_resistance = 1600
|
|
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100)
|
|
smooth = SMOOTH_MORE
|
|
canSmoothWith = list(/turf/simulated/wall/mineral/titanium/survival, /obj/machinery/door/airlock/survival_pod, /obj/structure/window/shuttle/survival_pod)
|
|
explosion_block = 3
|
|
level = 3
|
|
glass_type = /obj/item/stack/sheet/titaniumglass
|
|
glass_amount = 2
|
|
|
|
/obj/structure/window/reinforced/survival_pod
|
|
name = "pod window"
|
|
icon = 'icons/obj/lavaland/survival_pod.dmi'
|
|
icon_state = "pwindow"
|
|
|
|
//Floors
|
|
/turf/simulated/floor/pod
|
|
name = "pod floor"
|
|
icon_state = "podfloor"
|
|
icon_regular_floor = "podfloor"
|
|
floor_tile = /obj/item/stack/tile/pod
|
|
|
|
/turf/simulated/floor/pod/light
|
|
icon_state = "podfloor_light"
|
|
icon_regular_floor = "podfloor_light"
|
|
floor_tile = /obj/item/stack/tile/pod/light
|
|
|
|
/turf/simulated/floor/pod/dark
|
|
icon_state = "podfloor_dark"
|
|
icon_regular_floor = "podfloor_dark"
|
|
floor_tile = /obj/item/stack/tile/pod/dark
|
|
|
|
//Door
|
|
/obj/machinery/door/airlock/survival_pod
|
|
icon = 'icons/obj/doors/airlocks/survival/survival.dmi'
|
|
overlays_file = 'icons/obj/doors/airlocks/survival/survival_overlays.dmi'
|
|
assemblytype = /obj/structure/door_assembly/door_assembly_pod
|
|
|
|
/obj/machinery/door/airlock/survival_pod/glass
|
|
opacity = FALSE
|
|
glass = TRUE
|
|
|
|
/obj/structure/door_assembly/door_assembly_pod
|
|
name = "pod airlock assembly"
|
|
icon = 'icons/obj/doors/airlocks/survival/survival.dmi'
|
|
base_name = "pod airlock"
|
|
overlays_file = 'icons/obj/doors/airlocks/survival/survival_overlays.dmi'
|
|
airlock_type = /obj/machinery/door/airlock/survival_pod
|
|
glass_type = /obj/machinery/door/airlock/survival_pod/glass
|
|
|
|
//Windoor
|
|
/obj/machinery/door/window/survival_pod
|
|
icon = 'icons/obj/lavaland/survival_pod.dmi'
|
|
icon_state = "windoor"
|
|
base_state = "windoor"
|
|
|
|
//Table
|
|
/obj/structure/table/survival_pod
|
|
icon = 'icons/obj/lavaland/survival_pod.dmi'
|
|
icon_state = "table"
|
|
smooth = SMOOTH_FALSE
|
|
|
|
//Sleeper
|
|
/obj/machinery/sleeper/survival_pod
|
|
icon = 'icons/obj/lavaland/survival_pod.dmi'
|
|
icon_state = "sleeper-open"
|
|
density = FALSE
|
|
|
|
/obj/machinery/sleeper/survival_pod/New()
|
|
..()
|
|
component_parts = list()
|
|
component_parts += new /obj/item/circuitboard/sleeper/survival(null)
|
|
var/obj/item/stock_parts/matter_bin/B = new(null)
|
|
B.rating = initial_bin_rating
|
|
component_parts += B
|
|
component_parts += new /obj/item/stock_parts/manipulator(null)
|
|
component_parts += new /obj/item/stack/sheet/glass(null)
|
|
component_parts += new /obj/item/stack/sheet/glass(null)
|
|
component_parts += new /obj/item/stack/cable_coil(null, 1)
|
|
RefreshParts()
|
|
|
|
//NanoMed
|
|
/obj/machinery/vending/wallmed/survival_pod
|
|
name = "survival pod medical supply"
|
|
desc = "Wall-mounted Medical Equipment dispenser. This one seems just a tiny bit smaller."
|
|
req_access = list()
|
|
|
|
products = list(/obj/item/stack/medical/splint = 2)
|
|
contraband = list()
|
|
|
|
//Computer
|
|
/obj/item/gps/computer
|
|
name = "pod computer"
|
|
icon_state = "pod_computer"
|
|
icon = 'icons/obj/lavaland/pod_computer.dmi'
|
|
anchored = 1
|
|
density = 1
|
|
pixel_y = -32
|
|
|
|
/obj/item/gps/computer/attackby(obj/item/W, mob/user, params)
|
|
if(istype(W, /obj/item/wrench))
|
|
playsound(loc, W.usesound, 50, 1)
|
|
user.visible_message("<span class='warning'>[user] disassembles the gps.</span>", \
|
|
"<span class='notice'>You start to disassemble the gps...</span>", "You hear clanking and banging noises.")
|
|
if(do_after(user, 20 * W.toolspeed, target = src))
|
|
new /obj/item/gps(loc)
|
|
qdel(src)
|
|
return ..()
|
|
|
|
/obj/item/gps/computer/attack_hand(mob/user)
|
|
attack_self(user)
|
|
|
|
//Bed
|
|
/obj/structure/bed/pod
|
|
icon = 'icons/obj/lavaland/survival_pod.dmi'
|
|
icon_state = "bed"
|
|
|
|
//Survival Storage Unit
|
|
/obj/machinery/smartfridge/survival_pod
|
|
name = "survival pod storage"
|
|
desc = "A heated storage unit."
|
|
icon_state = "donkvendor"
|
|
icon = 'icons/obj/lavaland/donkvendor.dmi'
|
|
light_range = 8
|
|
light_power = 1.2
|
|
light_color = "#DDFFD3"
|
|
max_n_of_items = 10
|
|
pixel_y = -4
|
|
flags = NODECONSTRUCT
|
|
var/empty = FALSE
|
|
|
|
/obj/machinery/smartfridge/survival_pod/Initialize(mapload)
|
|
. = ..()
|
|
|
|
if(empty)
|
|
return
|
|
|
|
for(var/i in 1 to 5)
|
|
var/obj/item/reagent_containers/food/snacks/warmdonkpocket_weak/W = new(src)
|
|
load(W)
|
|
if(prob(50))
|
|
var/obj/item/storage/pill_bottle/dice/D = new(src)
|
|
load(D)
|
|
else
|
|
var/obj/item/instrument/guitar/G = new(src)
|
|
load(G)
|
|
|
|
/obj/machinery/smartfridge/survival_pod/update_icon()
|
|
return
|
|
|
|
/obj/machinery/smartfridge/survival_pod/accept_check(obj/item/O)
|
|
return isitem(O)
|
|
|
|
/obj/machinery/smartfridge/survival_pod/default_unfasten_wrench()
|
|
return FALSE
|
|
|
|
/obj/machinery/smartfridge/survival_pod/empty
|
|
name = "dusty survival pod storage"
|
|
desc = "A heated storage unit. This one's seen better days."
|
|
empty = TRUE
|
|
|
|
//Fans
|
|
/obj/structure/fans
|
|
icon = 'icons/obj/lavaland/survival_pod.dmi'
|
|
icon_state = "fans"
|
|
name = "environmental regulation system"
|
|
desc = "A large machine releasing a constant gust of air."
|
|
anchored = 1
|
|
density = 1
|
|
var/arbitraryatmosblockingvar = 1
|
|
var/buildstacktype = /obj/item/stack/sheet/metal
|
|
var/buildstackamount = 5
|
|
|
|
/obj/structure/fans/Initialize(loc)
|
|
..()
|
|
air_update_turf(1)
|
|
|
|
/obj/structure/fans/Destroy()
|
|
arbitraryatmosblockingvar = 0
|
|
air_update_turf(1)
|
|
return ..()
|
|
|
|
/obj/structure/fans/CanAtmosPass(turf/T)
|
|
return !arbitraryatmosblockingvar
|
|
|
|
/obj/structure/fans/deconstruct()
|
|
if(!(flags & NODECONSTRUCT))
|
|
if(buildstacktype)
|
|
new buildstacktype(loc, buildstackamount)
|
|
qdel(src)
|
|
|
|
/obj/structure/fans/attackby(obj/item/W, mob/user, params)
|
|
if(istype(W, /obj/item/wrench))
|
|
playsound(loc, W.usesound, 50, 1)
|
|
user.visible_message("<span class='warning'>[user] disassembles the fan.</span>", \
|
|
"<span class='notice'>You start to disassemble the fan...</span>", "You hear clanking and banging noises.")
|
|
if(do_after(user, 20 * W.toolspeed, target = src))
|
|
deconstruct()
|
|
return ..()
|
|
|
|
/obj/structure/fans/tiny
|
|
name = "tiny fan"
|
|
desc = "A tiny fan, releasing a thin gust of air."
|
|
layer = TURF_LAYER+0.1
|
|
density = 0
|
|
icon_state = "fan_tiny"
|
|
buildstackamount = 2
|
|
|
|
/obj/structure/fans/tiny/invisible
|
|
name = "air flow blocker"
|
|
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
|
invisibility = INVISIBILITY_ABSTRACT
|
|
//Signs
|
|
/obj/structure/sign/mining
|
|
name = "nanotrasen mining corps sign"
|
|
desc = "A sign of relief for weary miners, and a warning for would-be competitors to Nanotrasen's mining claims."
|
|
icon = 'icons/turf/walls/survival_pod_walls.dmi'
|
|
icon_state = "ntpod"
|
|
|
|
/obj/structure/sign/mining/survival
|
|
name = "shelter sign"
|
|
desc = "A high visibility sign designating a safe shelter."
|
|
icon = 'icons/turf/walls/survival_pod_walls.dmi'
|
|
icon_state = "survival"
|
|
|
|
//Fluff
|
|
/obj/structure/tubes
|
|
icon_state = "tubes"
|
|
icon = 'icons/obj/lavaland/survival_pod.dmi'
|
|
name = "tubes"
|
|
anchored = 1
|
|
layer = MOB_LAYER - 0.2
|
|
density = 0
|
|
|
|
/obj/structure/tubes/attackby(obj/item/W, mob/user, params)
|
|
if(istype(W, /obj/item/wrench))
|
|
playsound(loc, W.usesound, 50, 1)
|
|
user.visible_message("<span class='warning'>[user] disassembles [src].</span>", \
|
|
"<span class='notice'>You start to disassemble [src]...</span>", "You hear clanking and banging noises.")
|
|
if(do_after(user, 20 * W.toolspeed, target = src))
|
|
new /obj/item/stack/rods(loc)
|
|
qdel(src)
|
|
return ..()
|
|
|
|
/obj/item/fakeartefact
|
|
name = "expensive forgery"
|
|
icon = 'icons/mob/screen_gen.dmi'
|
|
icon_state = "x2"
|
|
var/possible = list(/obj/item/ship_in_a_bottle,
|
|
/obj/item/gun/energy/pulse,
|
|
/obj/item/sleeping_carp_scroll,
|
|
/obj/item/shield/changeling,
|
|
/obj/item/lava_staff,
|
|
/obj/item/katana/energy,
|
|
/obj/item/hierophant_club,
|
|
/obj/item/storage/toolbox/green/memetic,
|
|
/obj/item/gun/projectile/automatic/l6_saw,
|
|
/obj/item/gun/magic/staff/chaos,
|
|
/obj/item/gun/magic/staff/spellblade,
|
|
/obj/item/gun/magic/wand/death,
|
|
/obj/item/gun/magic/wand/fireball,
|
|
/obj/item/stack/telecrystal/twenty,
|
|
/obj/item/banhammer)
|
|
|
|
/obj/item/fakeartefact/New()
|
|
. = ..()
|
|
var/obj/item/I = pick(possible)
|
|
name = initial(I.name)
|
|
icon = initial(I.icon)
|
|
desc = initial(I.desc)
|
|
icon_state = initial(I.icon_state)
|
|
item_state = initial(I.item_state)
|