mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-11 07:04:01 +01:00
Anomaly fixes (#18934)
* Automatic changelog compile [ci skip] * Fixes * Makes the compiler happy * get_station_areas makes me go crazy --------- Co-authored-by: vorestation-ci[bot] <199609141+vorestation-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -225,6 +225,7 @@
|
||||
replace_objs = list(
|
||||
/obj/structure/bed/chair = list(/obj/structure/bed/chair/wood = 3, /obj/structure/bed/chair/wood/wings = 1),
|
||||
/obj/machinery/door/airlock = list(/obj/structure/simple_door/wood = 1),
|
||||
/obj/structure/table = list(/obj/structure/table/woodentable = 1)
|
||||
)
|
||||
random_spawns = list(
|
||||
/obj/structure/flora/grass/green = 3,
|
||||
@@ -257,8 +258,19 @@
|
||||
/datum/dimension_theme/snow
|
||||
name = "Snow"
|
||||
icon_state = "sheet-snow_2"
|
||||
material = /datum/material/snow
|
||||
material = /datum/material/snowbrick
|
||||
replace_floors = list(/turf/simulated/floor/snow = 10, /turf/simulated/floor/outdoors/ice = 1)
|
||||
replace_objs = list(
|
||||
/obj/machinery/door/airlock = list(/obj/structure/simple_door/)
|
||||
/obj/machinery/door/airlock = list(/obj/structure/simple_door/snowbrick = 1),
|
||||
)
|
||||
replace_walls = /turf/simulated/wall/snowbrick
|
||||
|
||||
/datum/dimension_theme/diamond
|
||||
name = "Diamond"
|
||||
icon_state = "sheet-diamond"
|
||||
material = /datum/material/diamond
|
||||
replace_floors = list(/turf/simulated/floor/tiled/material/diamond = 1)
|
||||
replace_objs = list(
|
||||
/obj/machinery/door/airlock = list(/obj/machinery/door/airlock/diamond = 1)
|
||||
)
|
||||
replace_walls = /turf/simulated/wall/diamond
|
||||
|
||||
@@ -5,11 +5,10 @@
|
||||
if(!allowed_areas)
|
||||
generate_allowed_areas()
|
||||
|
||||
var/list/possible_areas = typecache_filter_list(GLOB.areas_by_type, allowed_areas)
|
||||
if(!length(possible_areas))
|
||||
if(!length(allowed_areas))
|
||||
CRASH("No valid areas for anomaly found.")
|
||||
|
||||
var/area/landing_area = pick(possible_areas)
|
||||
var/area/landing_area = pick(allowed_areas)
|
||||
var/list/turf_test = get_area_turfs(landing_area)
|
||||
if(!turf_test.len)
|
||||
CRASH("Anomaly : No valid turfs found for [landing_area] - [landing_area.type]")
|
||||
@@ -38,17 +37,21 @@
|
||||
return TRUE
|
||||
|
||||
/datum/anomaly_placer/proc/generate_allowed_areas()
|
||||
var/static/list/safe_area_types = typecacheof(list(
|
||||
var/static/list/safe_area_types = list(
|
||||
/area/crew_quarters,
|
||||
/area/shuttle,
|
||||
/area/space,
|
||||
/area/solar,
|
||||
/area/engineering,
|
||||
/area/engineering/engine_room,
|
||||
/area/maintenance,
|
||||
/area/holodeck,
|
||||
/area/ai
|
||||
))
|
||||
/area/ai,
|
||||
/area/tcommsat
|
||||
)
|
||||
|
||||
var/static/list/unsafe_area_subtypes = typecacheof(list(/area/engineering/break_room))
|
||||
allowed_areas = get_station_areas(safe_area_types)
|
||||
|
||||
allowed_areas = GLOB.areas_by_type - safe_area_types + unsafe_area_subtypes
|
||||
for(var/area/check_area in allowed_areas)
|
||||
if((check_area.z in using_map.station_levels) || !check_area.flag_check(AREA_FORBID_EVENTS))
|
||||
continue
|
||||
allowed_areas.Remove(check_area)
|
||||
|
||||
@@ -304,6 +304,10 @@
|
||||
/obj/structure/simple_door/glamour/Initialize(mapload,var/material_name)
|
||||
. = ..(mapload, material_name || MAT_GLAMOUR)
|
||||
|
||||
/obj/structure/simple_door/snowbrick/Initialize(mapload, var/material_name)
|
||||
. = ..(mapload, material_name || MAT_SNOWBRICK)
|
||||
|
||||
|
||||
/obj/structure/simple_door/cult/TryToSwitchState(atom/user)
|
||||
if(isliving(user))
|
||||
var/mob/living/L = user
|
||||
|
||||
@@ -305,3 +305,4 @@
|
||||
category = list(
|
||||
RND_CATEGORY_EQUIPMENT + RND_SUBCATEGORY_EQUIPMENT_SCIENCE
|
||||
)
|
||||
departmental_flags = DEPARTMENT_BITFLAG_SCIENCE
|
||||
|
||||
Reference in New Issue
Block a user