mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-16 17:42:32 +01:00
Merge pull request #3691 from VOREStation/aro-shelterquol
Capsule shelter QOL
This commit is contained in:
@@ -15,12 +15,14 @@
|
||||
w_class = ITEMSIZE_TINY
|
||||
var/template_id = "shelter_alpha"
|
||||
var/datum/map_template/shelter/template
|
||||
var/datum/map_template/shelter/template_roof
|
||||
var/used = FALSE
|
||||
|
||||
/obj/item/device/survivalcapsule/proc/get_template()
|
||||
if(template)
|
||||
return
|
||||
template = SSmapping.shelter_templates[template_id]
|
||||
template_roof = SSmapping.shelter_templates[template.roof]
|
||||
if(!template)
|
||||
throw EXCEPTION("Shelter template ([template_id]) not found!")
|
||||
qdel(src)
|
||||
@@ -46,9 +48,16 @@
|
||||
|
||||
var/turf/deploy_location = get_turf(src)
|
||||
var/status = template.check_deploy(deploy_location)
|
||||
var/turf/above_location = GetAbove(deploy_location)
|
||||
if(above_location && status == SHELTER_DEPLOY_ALLOWED)
|
||||
status = template.check_deploy(above_location)
|
||||
|
||||
switch(status)
|
||||
//Not allowed due to /area technical reasons
|
||||
if(SHELTER_DEPLOY_BAD_AREA)
|
||||
src.loc.visible_message("<span class='warning'>\The [src] will not function in this area.</span>")
|
||||
|
||||
//Anchored objects or no space
|
||||
if(SHELTER_DEPLOY_BAD_TURFS, SHELTER_DEPLOY_ANCHORED_OBJECTS)
|
||||
var/width = template.width
|
||||
var/height = template.height
|
||||
@@ -68,6 +77,8 @@
|
||||
playsound(get_turf(src), 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
log_and_message_admins("[key_name_admin(usr)] activated a bluespace capsule at [get_area(T)]!")
|
||||
if(above_location && template_roof)
|
||||
template_roof.load(above_location, centered = TRUE)
|
||||
template.load(deploy_location, centered = TRUE)
|
||||
qdel(src)
|
||||
|
||||
@@ -87,6 +98,22 @@
|
||||
name = "survival airlock"
|
||||
block_air_zones = 1
|
||||
|
||||
//Door access setter button
|
||||
/obj/machinery/button/remote/airlock/survival_pod
|
||||
name = "shelter privacy control"
|
||||
desc = "You can secure yourself inside the shelter here."
|
||||
specialfunctions = 4 // 4 is bolts
|
||||
var/obj/machinery/door/airlock/voidcraft/survival_pod/door
|
||||
|
||||
/obj/machinery/button/remote/airlock/survival_pod/attack_hand(obj/item/weapon/W, mob/user as mob)
|
||||
if(..()) return 1 //1 is failure on machines (for whatever reason)
|
||||
if(!door)
|
||||
var/turf/dT = get_step(src,dir)
|
||||
door = locate() in dT
|
||||
if(door)
|
||||
door.glass = !door.glass
|
||||
door.opacity = !door.opacity
|
||||
|
||||
//Windows
|
||||
/obj/structure/window/reinforced/survival_pod
|
||||
name = "pod window"
|
||||
@@ -191,6 +218,9 @@
|
||||
for(var/i in 1 to 5)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/liquidfood/W = new(src)
|
||||
stock(W)
|
||||
for(var/i in 1 to 2)
|
||||
var/obj/item/device/fbp_backup_cell/W = new(src)
|
||||
stock(W)
|
||||
if(prob(50))
|
||||
var/obj/item/weapon/storage/pill_bottle/dice/D = new(src)
|
||||
stock(D)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
var/whitelisted_turfs
|
||||
var/banned_areas
|
||||
var/banned_objects
|
||||
var/roof
|
||||
|
||||
/datum/map_template/shelter/New()
|
||||
. = ..()
|
||||
@@ -38,6 +39,11 @@
|
||||
sleeping area! Order now, and we'll throw in a TINY FAN, \
|
||||
absolutely free!"
|
||||
mappath = "maps/submaps/shelters/shelter_1.dmm"
|
||||
roof = "roof_alpha"
|
||||
|
||||
/datum/map_template/shelter/alpha_roof
|
||||
shelter_id = "roof_alpha"
|
||||
mappath = "maps/submaps/shelters/shelter_1_roof.dmm"
|
||||
|
||||
/datum/map_template/shelter/alpha/New()
|
||||
. = ..()
|
||||
@@ -53,8 +59,14 @@
|
||||
and a deluxe companion to keep you from getting lonely during \
|
||||
an ash storm."
|
||||
mappath = "maps/submaps/shelters/shelter_2.dmm"
|
||||
roof = "roof_beta"
|
||||
|
||||
/datum/map_template/shelter/beta_roof
|
||||
shelter_id = "roof_beta"
|
||||
mappath = "maps/submaps/shelters/shelter_2_roof.dmm"
|
||||
|
||||
/datum/map_template/shelter/beta/New()
|
||||
. = ..()
|
||||
whitelisted_turfs = typecacheof(/turf/simulated/mineral)
|
||||
banned_objects = list()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user