mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 17:45:02 +01:00
[MIRROR] Refactors area stuff (#265)
* Refactors area stuff (#52751) -bitfielded a bunch of bools on /area, I left some untouched cus they get called a lot -Unused vars -Fixed a var pretending to be a fake bool -Probably more * Refactors area stuff Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#define ALL (~0) //For convenience.
|
||||
#define NONE 0
|
||||
|
||||
|
||||
GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768))
|
||||
|
||||
// for /datum/var/datum_flags
|
||||
@@ -57,6 +58,30 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
|
||||
/// Blocks ruins spawning on the turf
|
||||
#define NO_RUINS_1 (1<<10)
|
||||
|
||||
////////////////Area flags\\\\\\\\\\\\\\
|
||||
/// If it's a valid territory for cult summoning or the CRAB-17 phone to spawn
|
||||
#define VALID_TERRITORY (1<<0)
|
||||
/// If blobs can spawn there and if it counts towards their score.
|
||||
#define BLOBS_ALLOWED (1<<1)
|
||||
/// If mining tunnel generation is allowed in this area
|
||||
#define TUNNELS_ALLOWED (1<<2)
|
||||
/// If flora are allowed to spawn in this area randomly through tunnel generation
|
||||
#define FLORA_ALLOWED (1<<3)
|
||||
/// If mobs can be spawned by natural random generation
|
||||
#define MOB_SPAWN_ALLOWED (1<<4)
|
||||
/// If megafauna can be spawned by natural random generation
|
||||
#define MEGAFAUNA_SPAWN_ALLOWED (1<<5)
|
||||
/// Are you forbidden from teleporting to the area? (centcom, mobs, wizard, hand teleporter)
|
||||
#define NOTELEPORT (1<<6)
|
||||
/// Hides area from player Teleport function.
|
||||
#define HIDDEN_AREA (1<<7)
|
||||
/// If false, loading multiple maps with this area type will create multiple instances.
|
||||
#define UNIQUE_AREA (1<<8)
|
||||
/// If people are allowed to suicide in it. Mostly for OOC stuff like minigames
|
||||
#define BLOCK_SUICIDE (1<<9)
|
||||
/// Can the Xenobio management console transverse this area by default?
|
||||
#define XENOBIOLOGY_COMPATIBLE (1<<10)
|
||||
|
||||
/*
|
||||
These defines are used specifically with the atom/pass_flags bitmask
|
||||
the atom/checkpass() proc uses them (tables will call movable atom checkpass(PASSTABLE) for example)
|
||||
|
||||
@@ -62,7 +62,7 @@ GLOBAL_LIST_INIT(typecache_powerfailure_safe_areas, typecacheof(/area/engine/eng
|
||||
var/area/place = get_area(turfs[i])
|
||||
if(blacklisted_areas[place.type])
|
||||
continue
|
||||
if(!place.requires_power || place.noteleport || place.hidden)
|
||||
if(!place.requires_power || (place.area_flags & NOTELEPORT) || (place.area_flags & HIDDEN_AREA))
|
||||
continue // No expanding powerless rooms etc
|
||||
areas[place.name] = place
|
||||
var/area_choice = input(creator, "Choose an area to expand or make a new area.", "Area Expansion") as null|anything in areas
|
||||
|
||||
@@ -1006,7 +1006,7 @@ B --><-- A
|
||||
var/I = rand(1, L.len)
|
||||
var/turf/T = L[I]
|
||||
var/area/X = get_area(T)
|
||||
if(!T.density && X.valid_territory)
|
||||
if(!T.density && (X.area_flags & VALID_TERRITORY))
|
||||
var/clear = TRUE
|
||||
for(var/obj/O in T)
|
||||
if(O.density)
|
||||
|
||||
@@ -33,6 +33,19 @@ GLOBAL_LIST_INIT(bitfields, list(
|
||||
"USES_TGUI" = USES_TGUI,
|
||||
"FROZEN" = FROZEN,
|
||||
),
|
||||
"area_flags" = list(
|
||||
"VALID_TERRITORY" = VALID_TERRITORY,
|
||||
"BLOBS_ALLOWED" = BLOBS_ALLOWED,
|
||||
"TUNNELS_ALLOWED" = TUNNELS_ALLOWED,
|
||||
"FLORA_ALLOWED" = FLORA_ALLOWED,
|
||||
"MOB_SPAWN_ALLOWED" = MOB_SPAWN_ALLOWED,
|
||||
"MEGAFAUNA_SPAWN_ALLOWED" = MEGAFAUNA_SPAWN_ALLOWED,
|
||||
"NOTELEPORT" = NOTELEPORT,
|
||||
"HIDDEN_AREA" = HIDDEN_AREA,
|
||||
"UNIQUE_AREA" = UNIQUE_AREA,
|
||||
"BLOCK_SUICIDE" = BLOCK_SUICIDE,
|
||||
"XENOBIOLOGY_COMPATIBLE" = XENOBIOLOGY_COMPATIBLE,
|
||||
),
|
||||
"datum_flags" = list(
|
||||
"DF_USE_TAG" = DF_USE_TAG,
|
||||
"DF_VAR_EDITED" = DF_VAR_EDITED,
|
||||
|
||||
@@ -293,7 +293,7 @@ GLOBAL_LIST_EMPTY(the_station_areas)
|
||||
for(var/area/A in world)
|
||||
if (is_type_in_typecache(A, station_areas_blacklist))
|
||||
continue
|
||||
if (!A.contents.len || !A.unique)
|
||||
if (!A.contents.len || !(A.area_flags & UNIQUE_AREA))
|
||||
continue
|
||||
var/turf/picked = A.contents[1]
|
||||
if (is_station_level(picked.z))
|
||||
|
||||
@@ -336,7 +336,7 @@
|
||||
/datum/action/item_action/vortex_recall/IsAvailable()
|
||||
var/turf/current_location = get_turf(target)
|
||||
var/area/current_area = current_location.loc
|
||||
if(current_area.noteleport)
|
||||
if(current_area.area_flags & NOTELEPORT)
|
||||
to_chat(target, "[src] fizzles uselessly.")
|
||||
return
|
||||
if(istype(target, /obj/item/hierophant_club))
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
var/area/A = get_area(curturf)
|
||||
var/area/B = get_area(destturf)
|
||||
if(!forced && (HAS_TRAIT(teleatom, TRAIT_NO_TELEPORT) || A.noteleport || B.noteleport))
|
||||
if(!forced && (HAS_TRAIT(teleatom, TRAIT_NO_TELEPORT) || (A.area_flags & NOTELEPORT) || (B.area_flags & NOTELEPORT)))
|
||||
return FALSE
|
||||
|
||||
if(SEND_SIGNAL(destturf, COMSIG_ATOM_INTERCEPT_TELEPORT, channel, curturf, destturf))
|
||||
@@ -156,7 +156,7 @@
|
||||
if(T.is_transition_turf())
|
||||
continue // Avoid picking these.
|
||||
var/area/A = T.loc
|
||||
if(!A.noteleport)
|
||||
if(!(A.area_flags & NOTELEPORT))
|
||||
posturfs.Add(T)
|
||||
return posturfs
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
A.apply_mode(usr)
|
||||
if(WIRE_ALARM) // Clear alarms.
|
||||
var/area/AA = get_area(A)
|
||||
if(AA.atmosalert(0, holder))
|
||||
if(AA.atmosalert(FALSE, holder))
|
||||
A.post_alert(0)
|
||||
A.update_icon()
|
||||
|
||||
@@ -69,6 +69,6 @@
|
||||
A.apply_mode(usr)
|
||||
if(WIRE_ALARM) // Post alarm.
|
||||
var/area/AA = get_area(A)
|
||||
if(AA.atmosalert(2, holder))
|
||||
if(AA.atmosalert(TRUE, holder))
|
||||
A.post_alert(2)
|
||||
A.update_icon()
|
||||
|
||||
@@ -28,10 +28,9 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
power_light = FALSE
|
||||
power_equip = FALSE
|
||||
power_environ = FALSE
|
||||
valid_territory = FALSE
|
||||
area_flags = UNIQUE_AREA
|
||||
outdoors = TRUE
|
||||
ambientsounds = SPACE
|
||||
blob_allowed = FALSE //Eating up space doesn't count for victory as a blob.
|
||||
flags_1 = CAN_BE_DIRTY_1
|
||||
|
||||
/area/space/nearstation
|
||||
@@ -58,8 +57,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
icon_state = "asteroid"
|
||||
requires_power = FALSE
|
||||
has_gravity = STANDARD_GRAVITY
|
||||
blob_allowed = FALSE //Nope, no winning on the asteroid as a blob. Gotta eat the station.
|
||||
valid_territory = FALSE
|
||||
area_flags = UNIQUE_AREA
|
||||
ambientsounds = MINING
|
||||
flags_1 = CAN_BE_DIRTY_1
|
||||
|
||||
@@ -68,7 +66,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
ambientsounds = RUINS
|
||||
always_unpowered = FALSE
|
||||
requires_power = TRUE
|
||||
blob_allowed = TRUE
|
||||
area_flags = UNIQUE_AREA | BLOBS_ALLOWED
|
||||
|
||||
/area/asteroid/nearstation/bomb_site
|
||||
name = "Bomb Testing Asteroid"
|
||||
@@ -79,7 +77,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
|
||||
/area/maintenance
|
||||
ambientsounds = MAINTENANCE
|
||||
valid_territory = FALSE
|
||||
area_flags = BLOBS_ALLOWED | UNIQUE_AREA
|
||||
airlock_wires = /datum/wires/airlock/maint
|
||||
|
||||
//Departments
|
||||
@@ -158,7 +156,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
/area/maintenance/department/science/xenobiology
|
||||
name = "Xenobiology Maintenance"
|
||||
icon_state = "xenomaint"
|
||||
xenobiology_compatible = TRUE
|
||||
area_flags = VALID_TERRITORY | BLOBS_ALLOWED | UNIQUE_AREA | XENOBIOLOGY_COMPATIBLE
|
||||
|
||||
|
||||
//Maintenance - Generic
|
||||
@@ -360,7 +358,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
/area/crew_quarters/dorms
|
||||
name = "Dormitories"
|
||||
icon_state = "dorms"
|
||||
safe = TRUE
|
||||
area_flags = VALID_TERRITORY | BLOBS_ALLOWED | UNIQUE_AREA
|
||||
|
||||
/area/crew_quarters/dorms/barracks
|
||||
name = "Sleep Barracks"
|
||||
@@ -547,7 +545,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
/area/engine/atmospherics_engine
|
||||
name = "Atmospherics Engine"
|
||||
icon_state = "atmos_engine"
|
||||
valid_territory = FALSE
|
||||
area_flags = BLOBS_ALLOWED | UNIQUE_AREA
|
||||
|
||||
/area/engine/engine_room //donut station specific
|
||||
name = "Engine Room"
|
||||
@@ -564,7 +562,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
/area/engine/supermatter
|
||||
name = "Supermatter Engine"
|
||||
icon_state = "engine_sm"
|
||||
valid_territory = FALSE
|
||||
area_flags = BLOBS_ALLOWED | UNIQUE_AREA
|
||||
|
||||
/area/engine/break_room
|
||||
name = "Engineering Foyer"
|
||||
@@ -592,8 +590,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
/area/solar
|
||||
requires_power = FALSE
|
||||
dynamic_lighting = DYNAMIC_LIGHTING_IFSTARLIGHT
|
||||
valid_territory = FALSE
|
||||
blob_allowed = FALSE
|
||||
area_flags = UNIQUE_AREA
|
||||
flags_1 = NONE
|
||||
ambientsounds = ENGINEERING
|
||||
airlock_wires = /datum/wires/airlock/engineering
|
||||
@@ -1046,9 +1043,9 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
icon_state = "tox_storage"
|
||||
|
||||
/area/science/test_area
|
||||
valid_territory = FALSE
|
||||
name = "Toxins Test Area"
|
||||
icon_state = "tox_test"
|
||||
area_flags = BLOBS_ALLOWED | UNIQUE_AREA
|
||||
|
||||
/area/science/mixing
|
||||
name = "Toxins Mixing Lab"
|
||||
@@ -1057,7 +1054,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
/area/science/mixing/chamber
|
||||
name = "Toxins Mixing Chamber"
|
||||
icon_state = "tox_mix_chamber"
|
||||
valid_territory = FALSE
|
||||
area_flags = BLOBS_ALLOWED | UNIQUE_AREA
|
||||
|
||||
/area/science/genetics
|
||||
name = "Genetics Lab"
|
||||
@@ -1120,7 +1117,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
/area/storage/tcom
|
||||
name = "Telecomms Storage"
|
||||
icon_state = "tcom"
|
||||
valid_territory = FALSE
|
||||
area_flags = BLOBS_ALLOWED | UNIQUE_AREA
|
||||
|
||||
/area/storage/eva
|
||||
name = "EVA Storage"
|
||||
|
||||
+21
-50
@@ -13,25 +13,10 @@
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
|
||||
/// Set in New(); preserves the name set by the map maker, even if renamed by the Blueprints.
|
||||
var/map_name
|
||||
|
||||
/// If it's a valid territory for cult summoning or the CRAB-17 phone to spawn
|
||||
var/valid_territory = TRUE
|
||||
/// If blobs can spawn there and if it counts towards their score.
|
||||
var/blob_allowed = TRUE
|
||||
|
||||
/// If mining tunnel generation is allowed in this area
|
||||
var/tunnel_allowed = FALSE
|
||||
/// If flora are allowed to spawn in this area randomly through tunnel generation
|
||||
var/flora_allowed = FALSE
|
||||
/// If mobs can be spawned by natural random generation
|
||||
var/mob_spawn_allowed = FALSE
|
||||
/// If megafauna can be spawned by natural random generation
|
||||
var/megafauna_spawn_allowed = FALSE
|
||||
var/area_flags = VALID_TERRITORY | BLOBS_ALLOWED | UNIQUE_AREA
|
||||
|
||||
var/fire = null
|
||||
var/atmos = TRUE
|
||||
///Whether there is an atmos alarm in this area
|
||||
var/atmosalm = FALSE
|
||||
var/poweralm = TRUE
|
||||
var/lightswitch = TRUE
|
||||
@@ -43,11 +28,7 @@
|
||||
/// If a room is too big it doesn't have beauty.
|
||||
var/beauty_threshold = 150
|
||||
|
||||
var/requires_power = TRUE
|
||||
/// This gets overridden to 1 for space in area/Initialize().
|
||||
var/always_unpowered = FALSE
|
||||
|
||||
/// For space, the asteroid, lavaland, etc. Used with blueprints to determine if we are adding a new area (vs editing a station room)
|
||||
/// For space, the asteroid, lavaland, etc. Used with blueprints or with weather to determine if we are adding a new area (vs editing a station room)
|
||||
var/outdoors = FALSE
|
||||
|
||||
/// Size of the area in open turfs, only calculated for indoors areas.
|
||||
@@ -58,23 +39,16 @@
|
||||
/// Mood message for being here, only shows up if mood_bonus != 0
|
||||
var/mood_message = "<span class='nicegreen'>This area is pretty nice!\n</span>"
|
||||
|
||||
///Will objects this area be needing power?
|
||||
var/requires_power = TRUE
|
||||
/// This gets overridden to 1 for space in area/Initialize().
|
||||
var/always_unpowered = FALSE
|
||||
|
||||
var/power_equip = TRUE
|
||||
var/power_light = TRUE
|
||||
var/power_environ = TRUE
|
||||
|
||||
var/has_gravity = 0
|
||||
/// Are you forbidden from teleporting to the area? (centcom, mobs, wizard, hand teleporter)
|
||||
var/noteleport = FALSE
|
||||
/// Hides area from player Teleport function.
|
||||
var/hidden = FALSE
|
||||
/// Is the area teleport-safe: no space / radiation / aggresive mobs / other dangers
|
||||
var/safe = FALSE
|
||||
/// If false, loading multiple maps with this area type will create multiple instances.
|
||||
var/unique = TRUE
|
||||
/// If people are allowed to suicide in it. Mostly for OOC stuff like minigames
|
||||
var/block_suicide = FALSE
|
||||
|
||||
var/no_air = null
|
||||
var/has_gravity = FALSE
|
||||
|
||||
var/parallax_movedir = 0
|
||||
|
||||
@@ -85,8 +59,7 @@
|
||||
var/list/cameras
|
||||
var/list/firealarms
|
||||
var/firedoors_last_closed_on = 0
|
||||
/// Can the Xenobio management console transverse this area by default?
|
||||
var/xenobiology_compatible = FALSE
|
||||
|
||||
///Boolean to limit the areas (subtypes included) that atoms in this area can smooth with. Used for shuttles.
|
||||
var/area_limited_icon_smoothing = FALSE
|
||||
|
||||
@@ -116,7 +89,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
/proc/process_teleport_locs()
|
||||
for(var/V in GLOB.sortedAreas)
|
||||
var/area/AR = V
|
||||
if(istype(AR, /area/shuttle) || AR.noteleport)
|
||||
if(istype(AR, /area/shuttle) || AR.area_flags & NOTELEPORT)
|
||||
continue
|
||||
if(GLOB.teleportlocs[AR.name])
|
||||
continue
|
||||
@@ -136,7 +109,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
/area/New()
|
||||
// This interacts with the map loader, so it needs to be set immediately
|
||||
// rather than waiting for atoms to initialize.
|
||||
if (unique)
|
||||
if (area_flags & UNIQUE_AREA)
|
||||
GLOB.areas_by_type[type] = src
|
||||
power_usage = new /list(AREA_USAGE_LEN) // Some atoms would like to use power in Initialize()
|
||||
return ..()
|
||||
@@ -151,8 +124,6 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
*/
|
||||
/area/Initialize()
|
||||
icon_state = ""
|
||||
layer = AREA_LAYER
|
||||
map_name = name // Save the initial (the name set in the map) name of the area.
|
||||
|
||||
if(requires_power)
|
||||
luminosity = 0
|
||||
@@ -259,9 +230,9 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
*
|
||||
* Sends to all ai players, alert consoles, drones and alarm monitor programs in the world
|
||||
*/
|
||||
/area/proc/atmosalert(danger_level, obj/source)
|
||||
if(danger_level != atmosalm)
|
||||
if (danger_level==2)
|
||||
/area/proc/atmosalert(isdangerous, obj/source)
|
||||
if(isdangerous != atmosalm)
|
||||
if(isdangerous==TRUE)
|
||||
|
||||
for (var/item in GLOB.silicon_mobs)
|
||||
var/mob/living/silicon/aiPlayer = item
|
||||
@@ -276,7 +247,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
var/datum/computer_file/program/alarm_monitor/p = item
|
||||
p.triggerAlarm("Atmosphere", src, cameras, source)
|
||||
|
||||
else if (src.atmosalm == 2)
|
||||
else
|
||||
for (var/item in GLOB.silicon_mobs)
|
||||
var/mob/living/silicon/aiPlayer = item
|
||||
aiPlayer.cancelAlarm("Atmosphere", src, source)
|
||||
@@ -290,9 +261,9 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
var/datum/computer_file/program/alarm_monitor/p = item
|
||||
p.cancelAlarm("Atmosphere", src, source)
|
||||
|
||||
src.atmosalm = danger_level
|
||||
return 1
|
||||
return 0
|
||||
atmosalm = isdangerous
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/**
|
||||
* Try to close all the firedoors in the area
|
||||
@@ -613,8 +584,8 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
power_light = FALSE
|
||||
power_environ = FALSE
|
||||
always_unpowered = FALSE
|
||||
valid_territory = FALSE
|
||||
blob_allowed = FALSE
|
||||
area_flags &= ~VALID_TERRITORY
|
||||
area_flags &= ~BLOBS_ALLOWED
|
||||
addSorted()
|
||||
/**
|
||||
* Set the area size of the area
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
dynamic_lighting = DYNAMIC_LIGHTING_FORCED
|
||||
requires_power = FALSE
|
||||
has_gravity = STANDARD_GRAVITY
|
||||
noteleport = TRUE
|
||||
blob_allowed = FALSE //Should go without saying, no blobs should take over centcom as a win condition.
|
||||
area_flags = VALID_TERRITORY | UNIQUE_AREA | NOTELEPORT
|
||||
flags_1 = NONE
|
||||
|
||||
/area/centcom/control
|
||||
@@ -106,7 +105,7 @@
|
||||
dynamic_lighting = DYNAMIC_LIGHTING_FORCED
|
||||
requires_power = FALSE
|
||||
has_gravity = STANDARD_GRAVITY
|
||||
noteleport = TRUE
|
||||
area_flags = VALID_TERRITORY | UNIQUE_AREA | NOTELEPORT
|
||||
flags_1 = NONE
|
||||
|
||||
//Abductors
|
||||
@@ -114,7 +113,7 @@
|
||||
name = "Abductor Ship"
|
||||
icon_state = "yellow"
|
||||
requires_power = FALSE
|
||||
noteleport = TRUE
|
||||
area_flags = VALID_TERRITORY | UNIQUE_AREA | NOTELEPORT
|
||||
has_gravity = STANDARD_GRAVITY
|
||||
flags_1 = NONE
|
||||
|
||||
@@ -124,8 +123,7 @@
|
||||
icon_state = "syndie-ship"
|
||||
requires_power = FALSE
|
||||
has_gravity = STANDARD_GRAVITY
|
||||
noteleport = TRUE
|
||||
blob_allowed = FALSE //Not... entirely sure this will ever come up... but if the bus makes blobs AND ops, it shouldn't aim for the ops to win.
|
||||
area_flags = VALID_TERRITORY | UNIQUE_AREA | NOTELEPORT
|
||||
flags_1 = NONE
|
||||
ambientsounds = HIGHSEC
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
name = "Holodeck"
|
||||
icon_state = "Holodeck"
|
||||
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
|
||||
flags_1 = 0
|
||||
hidden = TRUE
|
||||
flags_1 = NONE
|
||||
area_flags = VALID_TERRITORY | UNIQUE_AREA | NOTELEPORT | HIDDEN_AREA
|
||||
|
||||
var/obj/machinery/computer/holodeck/linked
|
||||
var/restricted = 0 // if true, program goes on emag list
|
||||
@@ -15,11 +15,11 @@
|
||||
|
||||
/area/holodeck/powered(chan)
|
||||
if(!requires_power)
|
||||
return 1
|
||||
return TRUE
|
||||
if(always_unpowered)
|
||||
return 0
|
||||
return FALSE
|
||||
if(!linked)
|
||||
return 0
|
||||
return FALSE
|
||||
var/area/A = get_area(linked)
|
||||
ASSERT(!istype(A, /area/holodeck))
|
||||
return A.powered(chan)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/area/mine
|
||||
icon_state = "mining"
|
||||
has_gravity = STANDARD_GRAVITY
|
||||
flora_allowed = TRUE
|
||||
area_flags = VALID_TERRITORY | UNIQUE_AREA | FLORA_ALLOWED
|
||||
|
||||
/area/mine/explored
|
||||
name = "Mine"
|
||||
@@ -17,7 +17,7 @@
|
||||
outdoors = TRUE
|
||||
flags_1 = NONE
|
||||
ambientsounds = MINING
|
||||
flora_allowed = FALSE
|
||||
area_flags = VALID_TERRITORY | UNIQUE_AREA
|
||||
|
||||
/area/mine/unexplored
|
||||
name = "Mine"
|
||||
@@ -31,7 +31,7 @@
|
||||
outdoors = TRUE
|
||||
flags_1 = NONE
|
||||
ambientsounds = MINING
|
||||
tunnel_allowed = TRUE
|
||||
area_flags = VALID_TERRITORY | UNIQUE_AREA | FLORA_ALLOWED | TUNNELS_ALLOWED
|
||||
|
||||
/area/mine/lobby
|
||||
name = "Mining Station"
|
||||
@@ -92,8 +92,7 @@
|
||||
icon_state = "mining"
|
||||
has_gravity = STANDARD_GRAVITY
|
||||
flags_1 = NONE
|
||||
flora_allowed = TRUE
|
||||
blob_allowed = FALSE
|
||||
area_flags = VALID_TERRITORY | UNIQUE_AREA | FLORA_ALLOWED
|
||||
|
||||
/area/lavaland/surface
|
||||
name = "Lavaland"
|
||||
@@ -124,16 +123,15 @@
|
||||
|
||||
/area/lavaland/surface/outdoors/unexplored //monsters and ruins spawn here
|
||||
icon_state = "unexplored"
|
||||
tunnel_allowed = TRUE
|
||||
mob_spawn_allowed = TRUE
|
||||
area_flags = VALID_TERRITORY | UNIQUE_AREA | TUNNELS_ALLOWED | FLORA_ALLOWED | MOB_SPAWN_ALLOWED
|
||||
|
||||
/area/lavaland/surface/outdoors/unexplored/danger //megafauna will also spawn here
|
||||
icon_state = "danger"
|
||||
megafauna_spawn_allowed = TRUE
|
||||
area_flags = VALID_TERRITORY | UNIQUE_AREA | TUNNELS_ALLOWED | FLORA_ALLOWED | MOB_SPAWN_ALLOWED | MEGAFAUNA_SPAWN_ALLOWED
|
||||
|
||||
/area/lavaland/surface/outdoors/explored
|
||||
name = "Lavaland Labor Camp"
|
||||
flora_allowed = FALSE
|
||||
area_flags = VALID_TERRITORY | UNIQUE_AREA
|
||||
|
||||
|
||||
|
||||
@@ -143,9 +141,7 @@
|
||||
icon_state = "mining"
|
||||
has_gravity = STANDARD_GRAVITY
|
||||
flags_1 = NONE
|
||||
flora_allowed = TRUE
|
||||
blob_allowed = FALSE
|
||||
valid_territory = FALSE
|
||||
area_flags = UNIQUE_AREA | FLORA_ALLOWED
|
||||
|
||||
/area/icemoon/surface
|
||||
name = "Icemoon"
|
||||
@@ -164,18 +160,17 @@
|
||||
|
||||
/area/icemoon/surface/outdoors/labor_camp
|
||||
name = "Icemoon Labor Camp"
|
||||
flora_allowed = FALSE
|
||||
area_flags = UNIQUE_AREA
|
||||
|
||||
/area/icemoon/surface/outdoors/unexplored //monsters and ruins spawn here
|
||||
icon_state = "unexplored"
|
||||
tunnel_allowed = TRUE
|
||||
mob_spawn_allowed = TRUE
|
||||
area_flags = UNIQUE_AREA | FLORA_ALLOWED | MOB_SPAWN_ALLOWED | TUNNELS_ALLOWED
|
||||
|
||||
/area/icemoon/surface/outdoors/unexplored/rivers // rivers spawn here
|
||||
icon_state = "danger"
|
||||
|
||||
/area/icemoon/surface/outdoors/unexplored/rivers/no_monsters
|
||||
mob_spawn_allowed = FALSE
|
||||
area_flags = UNIQUE_AREA | FLORA_ALLOWED | TUNNELS_ALLOWED
|
||||
|
||||
/area/icemoon/underground
|
||||
name = "Icemoon Caves"
|
||||
@@ -191,13 +186,11 @@
|
||||
/area/icemoon/underground/unexplored // mobs and megafauna and ruins spawn here
|
||||
name = "Icemoon Caves"
|
||||
icon_state = "unexplored"
|
||||
tunnel_allowed = TRUE
|
||||
mob_spawn_allowed = TRUE
|
||||
megafauna_spawn_allowed = TRUE
|
||||
area_flags = UNIQUE_AREA | TUNNELS_ALLOWED | FLORA_ALLOWED | MEGAFAUNA_SPAWN_ALLOWED
|
||||
|
||||
/area/icemoon/underground/unexplored/rivers // rivers spawn here
|
||||
icon_state = "danger"
|
||||
|
||||
/area/icemoon/underground/explored // ruins can't spawn here
|
||||
name = "Icemoon Underground"
|
||||
flora_allowed = FALSE
|
||||
area_flags = UNIQUE_AREA
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
name = "\improper Unexplored Location"
|
||||
icon_state = "away"
|
||||
has_gravity = STANDARD_GRAVITY
|
||||
hidden = TRUE
|
||||
area_flags = HIDDEN_AREA | BLOBS_ALLOWED
|
||||
dynamic_lighting = DYNAMIC_LIGHTING_FORCED
|
||||
ambientsounds = RUINS
|
||||
blob_allowed = FALSE
|
||||
flags_1 = CAN_BE_DIRTY_1
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/area/ruin/space
|
||||
has_gravity = FALSE
|
||||
blob_allowed = FALSE //Nope, no winning in space as a blob. Gotta eat the station.
|
||||
area_flags = UNIQUE_AREA
|
||||
|
||||
/area/ruin/space/has_grav
|
||||
has_gravity = STANDARD_GRAVITY
|
||||
@@ -10,21 +10,6 @@
|
||||
/area/ruin/space/has_grav/powered
|
||||
requires_power = FALSE
|
||||
|
||||
|
||||
/area/ruin/fakespace
|
||||
icon_state = "space"
|
||||
requires_power = TRUE
|
||||
always_unpowered = TRUE
|
||||
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
|
||||
has_gravity = FALSE
|
||||
power_light = FALSE
|
||||
power_equip = FALSE
|
||||
power_environ = FALSE
|
||||
valid_territory = FALSE
|
||||
outdoors = TRUE
|
||||
ambientsounds = SPACE
|
||||
blob_allowed = FALSE
|
||||
|
||||
/////////////
|
||||
|
||||
/area/ruin/space/way_home
|
||||
@@ -428,4 +413,4 @@
|
||||
/area/ruin/space/has_grav/hellfactoryoffice
|
||||
name = "Hell Factory Office"
|
||||
icon_state = "red"
|
||||
noteleport = TRUE
|
||||
area_flags = VALID_TERRITORY | BLOBS_ALLOWED | UNIQUE_AREA | NOTELEPORT
|
||||
|
||||
@@ -8,11 +8,9 @@
|
||||
dynamic_lighting = DYNAMIC_LIGHTING_FORCED
|
||||
has_gravity = STANDARD_GRAVITY
|
||||
always_unpowered = FALSE
|
||||
valid_territory = FALSE
|
||||
icon_state = "shuttle"
|
||||
// Loading the same shuttle map at a different time will produce distinct area instances.
|
||||
unique = FALSE
|
||||
blob_allowed = FALSE
|
||||
area_flags = NONE
|
||||
icon_state = "shuttle"
|
||||
flags_1 = CAN_BE_DIRTY_1
|
||||
area_limited_icon_smoothing = TRUE
|
||||
|
||||
@@ -95,30 +93,25 @@
|
||||
desc = "Weeeeee"
|
||||
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
|
||||
|
||||
/area/shuttle/custom
|
||||
name = "Custom player shuttle"
|
||||
blob_allowed = TRUE
|
||||
flags_1 = CAN_BE_DIRTY_1 | CULT_PERMITTED_1
|
||||
|
||||
/area/shuttle/arrival
|
||||
name = "Arrival Shuttle"
|
||||
unique = TRUE // SSjob refers to this area for latejoiners
|
||||
area_flags = UNIQUE_AREA// SSjob refers to this area for latejoiners
|
||||
|
||||
/area/shuttle/pod_1
|
||||
name = "Escape Pod One"
|
||||
blob_allowed = TRUE
|
||||
area_flags = BLOBS_ALLOWED
|
||||
|
||||
/area/shuttle/pod_2
|
||||
name = "Escape Pod Two"
|
||||
blob_allowed = TRUE
|
||||
area_flags = BLOBS_ALLOWED
|
||||
|
||||
/area/shuttle/pod_3
|
||||
name = "Escape Pod Three"
|
||||
blob_allowed = TRUE
|
||||
area_flags = BLOBS_ALLOWED
|
||||
|
||||
/area/shuttle/pod_4
|
||||
name = "Escape Pod Four"
|
||||
blob_allowed = TRUE
|
||||
area_flags = BLOBS_ALLOWED
|
||||
|
||||
/area/shuttle/mining
|
||||
name = "Mining Shuttle"
|
||||
@@ -132,11 +125,11 @@
|
||||
|
||||
/area/shuttle/supply
|
||||
name = "Supply Shuttle"
|
||||
noteleport = TRUE
|
||||
area_flags = NOTELEPORT
|
||||
|
||||
/area/shuttle/escape
|
||||
name = "Emergency Shuttle"
|
||||
blob_allowed = TRUE
|
||||
area_flags = BLOBS_ALLOWED
|
||||
flags_1 = CAN_BE_DIRTY_1 | CULT_PERMITTED_1
|
||||
|
||||
/area/shuttle/escape/backup
|
||||
@@ -144,11 +137,11 @@
|
||||
|
||||
/area/shuttle/escape/luxury
|
||||
name = "Luxurious Emergency Shuttle"
|
||||
noteleport = TRUE
|
||||
area_flags = NOTELEPORT
|
||||
|
||||
/area/shuttle/escape/arena
|
||||
name = "The Arena"
|
||||
noteleport = TRUE
|
||||
area_flags = NOTELEPORT
|
||||
|
||||
/area/shuttle/escape/meteor
|
||||
name = "\proper a meteor with engines strapped to it"
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
D.adjust_money(-200)
|
||||
if(next_warning < world.time && prob(15))
|
||||
var/area/A = get_area(loc)
|
||||
var/message = "Unauthorized credit withdrawal underway in [A.map_name]!!"
|
||||
var/message = "Unauthorized credit withdrawal underway in [initial(A.name)]!!"
|
||||
radio.talk_into(src, message, radio_channel)
|
||||
next_warning = world.time + minimum_time_between_warnings
|
||||
|
||||
|
||||
@@ -174,6 +174,6 @@
|
||||
if(is_centcom_level(T.z) || is_away_level(T.z))
|
||||
return FALSE
|
||||
var/area/A = get_area(T)
|
||||
if(!A || A.noteleport)
|
||||
if(!A ||(A.area_flags & NOTELEPORT))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
if(in_use)
|
||||
return
|
||||
var/area/A = get_area(usr)
|
||||
if(A.noteleport)
|
||||
if(A.area_flags & NOTELEPORT)
|
||||
to_chat(usr, "<span class='warning'>You cannot edit restricted areas.</span>")
|
||||
return
|
||||
in_use = TRUE
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
C.drunkenness = min(C.drunkenness + 20, 50)
|
||||
var/turf/current_location = get_turf(user)
|
||||
var/area/current_area = current_location.loc //copied from hand tele code
|
||||
if(current_location && current_area && current_area.noteleport)
|
||||
if(current_location && current_area && (current_area.area_flags & NOTELEPORT))
|
||||
to_chat(user, "<span class='notice'>There is no escape. No recall or intervention can work in this place.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There is no escape. Although recall or intervention can work in this place, attempting to flee from [src]'s immense power would be futile.</span>")
|
||||
|
||||
@@ -140,27 +140,27 @@
|
||||
/obj/item/hand_tele/attack_self(mob/user)
|
||||
var/turf/current_location = get_turf(user)//What turf is the user on?
|
||||
var/area/current_area = current_location.loc
|
||||
if(!current_location || current_area.noteleport || is_away_level(current_location.z) || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
|
||||
if(!current_location || (current_area.area_flags & NOTELEPORT) || is_away_level(current_location.z) || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
|
||||
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
|
||||
return
|
||||
var/list/L = list( )
|
||||
var/list/L = list()
|
||||
for(var/obj/machinery/computer/teleporter/com in GLOB.machines)
|
||||
if(com.target)
|
||||
var/area/A = get_area(com.target)
|
||||
if(!A || A.noteleport)
|
||||
if(!A || (A.area_flags & NOTELEPORT))
|
||||
continue
|
||||
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
|
||||
L["[get_area(com.target)] (Active)"] = com.target
|
||||
else
|
||||
L["[get_area(com.target)] (Inactive)"] = com.target
|
||||
var/list/turfs = list( )
|
||||
var/list/turfs = list()
|
||||
for(var/turf/T in urange(10, orange=1))
|
||||
if(T.x>world.maxx-8 || T.x<8)
|
||||
continue //putting them at the edge is dumb
|
||||
if(T.y>world.maxy-8 || T.y<8)
|
||||
continue
|
||||
var/area/A = T.loc
|
||||
if(A.noteleport)
|
||||
if(A.area_flags & NOTELEPORT)
|
||||
continue
|
||||
turfs += T
|
||||
if(turfs.len)
|
||||
@@ -173,12 +173,12 @@
|
||||
return
|
||||
var/atom/T = L[t1]
|
||||
var/area/A = get_area(T)
|
||||
if(A.noteleport)
|
||||
if(A.area_flags & NOTELEPORT)
|
||||
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
|
||||
return
|
||||
current_location = get_turf(user) //Recheck.
|
||||
current_area = current_location.loc
|
||||
if(!current_location || current_area.noteleport || is_away_level(current_location.z) || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
|
||||
if(!current_location || (current_area.area_flags & NOTELEPORT) || is_away_level(current_location.z) || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
|
||||
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
|
||||
return
|
||||
user.show_message("<span class='notice'>Locked In.</span>", MSG_AUDIBLE)
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
return FALSE
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/A = get_area(src)
|
||||
if(!A.blob_allowed)
|
||||
if(!(A.area_flags & BLOBS_ALLOWED))
|
||||
return FALSE
|
||||
if(!A.power_equip)
|
||||
return FALSE
|
||||
|
||||
@@ -159,7 +159,7 @@ GLOBAL_LIST_INIT(megafauna_spawn_list, list(/mob/living/simple_animal/hostile/me
|
||||
/// Terrain that can spawn in the tunnel, weighted list
|
||||
var/list/terrain_spawn_list
|
||||
/// If the tunnel should keep being created
|
||||
var/sanity = 1
|
||||
var/sanity = TRUE
|
||||
/// Cave direction to move
|
||||
var/forward_cave_dir = 1
|
||||
/// Backwards cave direction for tracking
|
||||
@@ -318,8 +318,8 @@ GLOBAL_LIST_INIT(megafauna_spawn_list, list(/mob/living/simple_animal/hostile/me
|
||||
if(i > 3 && prob(20))
|
||||
if(isarea(tunnel.loc))
|
||||
var/area/A = tunnel.loc
|
||||
if(!A.tunnel_allowed)
|
||||
sanity = 0
|
||||
if(!(A.area_flags & TUNNELS_ALLOWED))
|
||||
sanity = FALSE
|
||||
break
|
||||
var/stored_flags = 0
|
||||
if(tunnel.flags_1 & NO_RUINS_1)
|
||||
@@ -347,7 +347,7 @@ GLOBAL_LIST_INIT(megafauna_spawn_list, list(/mob/living/simple_animal/hostile/me
|
||||
return
|
||||
if(isarea(T.loc))
|
||||
var/area/A = T.loc
|
||||
if(!A.tunnel_allowed)
|
||||
if(!(A.area_flags & TUNNELS_ALLOWED))
|
||||
sanity = 0
|
||||
return
|
||||
if(choose_turf_type)
|
||||
@@ -372,13 +372,13 @@ GLOBAL_LIST_INIT(megafauna_spawn_list, list(/mob/living/simple_animal/hostile/me
|
||||
return
|
||||
var/area/A = loc
|
||||
if(prob(30))
|
||||
if(!A.mob_spawn_allowed)
|
||||
if(!(A.area_flags & MOB_SPAWN_ALLOWED))
|
||||
return
|
||||
var/randumb = pickweight(mob_spawn_list)
|
||||
if(!randumb)
|
||||
return
|
||||
while(randumb == SPAWN_MEGAFAUNA)
|
||||
if(A.megafauna_spawn_allowed && megafauna_spawn_list && megafauna_spawn_list.len) //this is danger. it's boss time.
|
||||
if((A.area_flags & MEGAFAUNA_SPAWN_ALLOWED) && megafauna_spawn_list && megafauna_spawn_list.len) //this is danger. it's boss time.
|
||||
var/maybe_boss = pickweight(megafauna_spawn_list)
|
||||
if(megafauna_spawn_list[maybe_boss])
|
||||
randumb = maybe_boss
|
||||
@@ -409,7 +409,7 @@ GLOBAL_LIST_INIT(megafauna_spawn_list, list(/mob/living/simple_animal/hostile/me
|
||||
if(prob(12))
|
||||
if(isarea(loc))
|
||||
var/area/A = loc
|
||||
if(!A.flora_allowed)
|
||||
if(!(A.area_flags & FLORA_ALLOWED))
|
||||
return
|
||||
var/randumb = pickweight(flora_spawn_list)
|
||||
if(!randumb)
|
||||
@@ -425,7 +425,7 @@ GLOBAL_LIST_INIT(megafauna_spawn_list, list(/mob/living/simple_animal/hostile/me
|
||||
if(prob(1))
|
||||
if(isarea(loc))
|
||||
var/area/A = loc
|
||||
if(!A.flora_allowed)
|
||||
if(!(A.area_flags & FLORA_ALLOWED))
|
||||
return
|
||||
var/randumb = pickweight(terrain_spawn_list)
|
||||
if(!randumb)
|
||||
|
||||
@@ -93,7 +93,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
|
||||
/mob/camera/blob/proc/is_valid_turf(turf/T)
|
||||
var/area/A = get_area(T)
|
||||
if((A && !A.blob_allowed) || !T || !is_station_level(T.z) || isspaceturf(T))
|
||||
if((A && !(A.area_flags & BLOBS_ALLOWED)) || !T || !is_station_level(T.z) || isspaceturf(T))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -140,7 +140,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
|
||||
var/area/Ablob = get_area(T)
|
||||
|
||||
if(!Ablob.blob_allowed)
|
||||
if(!(Ablob.area_flags & BLOBS_ALLOWED))
|
||||
continue
|
||||
|
||||
if(!(ROLE_BLOB in L.faction))
|
||||
@@ -153,7 +153,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
for(var/area/A in GLOB.sortedAreas)
|
||||
if(!(A.type in GLOB.the_station_areas))
|
||||
continue
|
||||
if(!A.blob_allowed)
|
||||
if(!(A.area_flags & BLOBS_ALLOWED))
|
||||
continue
|
||||
A.color = blobstrain.color
|
||||
A.name = "blob"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
to_chat(src, "<span class='warning'>This spot is too dense to place a blob core on!</span>")
|
||||
return 0
|
||||
var/area/A = get_area(T)
|
||||
if(isspaceturf(T) || A && !A.blob_allowed)
|
||||
if(isspaceturf(T) || A && !(A.area_flags & BLOBS_ALLOWED))
|
||||
to_chat(src, "<span class='warning'>You cannot place your core here!</span>")
|
||||
return 0
|
||||
for(var/obj/O in T)
|
||||
@@ -93,7 +93,7 @@
|
||||
return
|
||||
if(needsNode)
|
||||
var/area/A = get_area(src)
|
||||
if(!A.blob_allowed) //factory and resource blobs must be legit
|
||||
if(!(A.area_flags & BLOBS_ALLOWED)) //factory and resource blobs must be legit
|
||||
to_chat(src, "<span class='warning'>This type of blob must be placed on the station!</span>")
|
||||
return
|
||||
if(nodes_required && !(locate(/obj/structure/blob/node) in orange(3, T)) && !(locate(/obj/structure/blob/core) in orange(4, T)))
|
||||
@@ -219,7 +219,7 @@
|
||||
to_chat(src, "<span class='userdanger'>You have no core and are about to die! May you rest in peace.</span>")
|
||||
return
|
||||
var/area/A = get_area(T)
|
||||
if(isspaceturf(T) || A && !A.blob_allowed)
|
||||
if(isspaceturf(T) || A && !(A.area_flags & BLOBS_ALLOWED))
|
||||
to_chat(src, "<span class='warning'>You cannot relocate your core here!</span>")
|
||||
return
|
||||
if(!can_buy(80))
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
if(owner_overmind)
|
||||
overmind = owner_overmind
|
||||
var/area/Ablob = get_area(src)
|
||||
if(Ablob.blob_allowed) //Is this area allowed for winning as blob?
|
||||
if(Ablob.area_flags & BLOBS_ALLOWED) //Is this area allowed for winning as blob?
|
||||
overmind.blobs_legit += src
|
||||
GLOB.blobs += src //Keep track of the blob in the normal list either way
|
||||
setDir(pick(GLOB.cardinals))
|
||||
|
||||
@@ -361,9 +361,9 @@
|
||||
..()
|
||||
var/sanity = 0
|
||||
while(summon_spots.len < SUMMON_POSSIBILITIES && sanity < 100)
|
||||
var/area/summon = pick(GLOB.sortedAreas - summon_spots)
|
||||
if(summon && is_station_level(summon.z) && summon.valid_territory)
|
||||
summon_spots += summon
|
||||
var/area/summon_area = pick(GLOB.sortedAreas - summon_spots)
|
||||
if(summon_area && is_station_level(summon_area.z) && (summon_area.area_flags & VALID_TERRITORY))
|
||||
summon_spots += summon_area
|
||||
sanity++
|
||||
update_explanation_text()
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ This file contains the cult dagger and rune list code
|
||||
A = get_area(src)
|
||||
if(!src || QDELETED(src) || !Adjacent(user) || user.incapacitated() || !check_rune_turf(Turf, user))
|
||||
return
|
||||
if(ispath(rune_to_scribe, /obj/effect/rune/summon) && (!is_station_level(Turf.z) || A.map_name == "Space"))
|
||||
if(ispath(rune_to_scribe, /obj/effect/rune/summon) && (!is_station_level(Turf.z) || initial(A.name) == "Space"))
|
||||
to_chat(user, "<span class='cultitalic'><b>The veil is not weak enough here to summon a cultist, you must be on station!</b></span>")
|
||||
return
|
||||
if(ispath(rune_to_scribe, /obj/effect/rune/apocalypse))
|
||||
@@ -113,7 +113,7 @@ This file contains the cult dagger and rune list code
|
||||
if(!(A in summon_objective.summon_spots)) // Check again to make sure they didn't move
|
||||
to_chat(user, "<span class='cultlarge'>The Geometer can only be summoned where the veil is weak - in [english_list(summon_objective.summon_spots)]!</span>")
|
||||
return
|
||||
priority_announce("Figments from an eldritch god are being summoned by [user] into [A.map_name] from an unknown dimension. Disrupt the ritual at all costs!","Central Command Higher Dimensional Affairs", 'sound/ai/spanomalies.ogg')
|
||||
priority_announce("Figments from an eldritch god are being summoned by [user] into [initial(A.name)] from an unknown dimension. Disrupt the ritual at all costs!","Central Command Higher Dimensional Affairs", 'sound/ai/spanomalies.ogg')
|
||||
for(var/B in spiral_range_turfs(1, user, 1))
|
||||
var/obj/structure/emergency_shield/cult/narsie/N = new(B)
|
||||
shields += N
|
||||
|
||||
@@ -417,7 +417,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
actual_selected_rune.handle_portal("lava")
|
||||
else
|
||||
var/area/A = get_area(T)
|
||||
if(A.map_name == "Space")
|
||||
if(initial(A.name) == "Space")
|
||||
actual_selected_rune.handle_portal("space", T)
|
||||
if(movesuccess)
|
||||
target.visible_message("<span class='warning'>There is a boom of outrushing air as something appears above the rune!</span>", null, "<i>You hear a boom.</i>")
|
||||
|
||||
@@ -426,12 +426,12 @@
|
||||
. = TRUE
|
||||
if("alarm")
|
||||
var/area/A = get_area(src)
|
||||
if(A.atmosalert(2, src))
|
||||
if(A.atmosalert(TRUE, src))
|
||||
post_alert(2)
|
||||
. = TRUE
|
||||
if("reset")
|
||||
var/area/A = get_area(src)
|
||||
if(A.atmosalert(0, src))
|
||||
if(A.atmosalert(FALSE, src))
|
||||
post_alert(0)
|
||||
. = TRUE
|
||||
update_icon()
|
||||
@@ -705,7 +705,7 @@
|
||||
var/new_area_danger_level = 0
|
||||
for(var/obj/machinery/airalarm/AA in A)
|
||||
if (!(AA.machine_stat & (NOPOWER|BROKEN)) && !AA.shorted)
|
||||
new_area_danger_level = max(new_area_danger_level,AA.danger_level)
|
||||
new_area_danger_level = clamp(max(new_area_danger_level, AA.danger_level), 0,1)
|
||||
if(A.atmosalert(new_area_danger_level,src)) //if area was in normal state or if area was in alert state
|
||||
post_alert(new_area_danger_level)
|
||||
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
|
||||
/mob/living/proc/canSuicide()
|
||||
var/area/A = get_area(src)
|
||||
if(A.block_suicide)
|
||||
if(A.area_flags & BLOCK_SUICIDE)
|
||||
to_chat(src, "<span class='warning'>You can't commit suicide here! You can ghost if you'd like.</span>")
|
||||
return
|
||||
switch(stat)
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
var/list/head_announce = null
|
||||
|
||||
//Bitflags for the job
|
||||
var/flag = NONE //Deprecated
|
||||
var/department_flag = NONE //Deprecated
|
||||
var/auto_deadmin_role_flags = NONE
|
||||
|
||||
//Players will be allowed to spawn in as jobs that are set to "Station"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
requires_power = FALSE
|
||||
has_gravity = STANDARD_GRAVITY
|
||||
flags_1 = NONE
|
||||
block_suicide = TRUE
|
||||
area_flags = BLOCK_SUICIDE | UNIQUE_AREA
|
||||
|
||||
/datum/map_template/mafia
|
||||
var/description = ""
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
dynamic_lighting = DYNAMIC_LIGHTING_FORCED
|
||||
requires_power = FALSE
|
||||
has_gravity = STANDARD_GRAVITY
|
||||
valid_territory = FALSE
|
||||
area_flags = BLOBS_ALLOWED | UNIQUE_AREA
|
||||
flags_1 = CAN_BE_DIRTY_1
|
||||
|
||||
//Survival Capsule
|
||||
|
||||
@@ -324,7 +324,7 @@
|
||||
/obj/item/warp_cube/attack_self(mob/user)
|
||||
var/turf/current_location = get_turf(user)
|
||||
var/area/current_area = current_location.loc
|
||||
if(!linked || current_area.noteleport)
|
||||
if(!linked || (current_area.area_flags & NOTELEPORT))
|
||||
to_chat(user, "<span class='warning'>[src] fizzles uselessly.</span>")
|
||||
return
|
||||
if(teleporting)
|
||||
|
||||
@@ -409,7 +409,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
var/list/filtered = list()
|
||||
for(var/V in GLOB.sortedAreas)
|
||||
var/area/A = V
|
||||
if(!A.hidden)
|
||||
if(!(A.area_flags & HIDDEN_AREA))
|
||||
filtered += A
|
||||
var/area/thearea = input("Area to jump to", "BOOYEA") as null|anything in filtered
|
||||
|
||||
|
||||
@@ -92,12 +92,8 @@
|
||||
name = "ai_multicam_room"
|
||||
icon_state = "ai_camera_room"
|
||||
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
|
||||
valid_territory = FALSE
|
||||
ambientsounds = list()
|
||||
blob_allowed = FALSE
|
||||
noteleport = TRUE
|
||||
hidden = TRUE
|
||||
safe = TRUE
|
||||
area_flags = NOTELEPORT | HIDDEN_AREA | UNIQUE_AREA
|
||||
ambientsounds = null
|
||||
flags_1 = NONE
|
||||
|
||||
GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room)
|
||||
|
||||
@@ -383,7 +383,7 @@
|
||||
if(S.using_special)
|
||||
return
|
||||
var/area/A = get_area(S)
|
||||
if(!A.valid_territory)
|
||||
if(!(A.area_flags & VALID_TERRITORY))
|
||||
to_chat(S, "<span class='warning'>You can't summon a rift here! Try summoning somewhere secure within the station!</span>")
|
||||
return
|
||||
for(var/obj/structure/carp_rift/rift in S.rift_list)
|
||||
@@ -492,10 +492,10 @@
|
||||
notify_ghosts("The carp rift can summon an additional carp!", source = src, action = NOTIFY_ORBIT, flashwindow = FALSE, header = "Carp Spawn Available")
|
||||
if(time_charged == (max_charge - 120))
|
||||
var/area/A = get_area(src)
|
||||
priority_announce("A rift is causing an unnaturally large energy flux in [A.map_name]. Stop it at all costs!", "Central Command Spatial Corps", 'sound/ai/spanomalies.ogg')
|
||||
priority_announce("A rift is causing an unnaturally large energy flux in [initial(A.name)]. Stop it at all costs!", "Central Command Spatial Corps", 'sound/ai/spanomalies.ogg')
|
||||
if(time_charged == max_charge)
|
||||
var/area/A = get_area(src)
|
||||
priority_announce("Spatial object has reached peak energy charge in [A.map_name], please stand-by.", "Central Command Spatial Corps")
|
||||
priority_announce("Spatial object has reached peak energy charge in [initial(A.name)], please stand-by.", "Central Command Spatial Corps")
|
||||
obj_integrity = INFINITY
|
||||
desc = "A rift akin to the ones space carp use to travel long distances. This one is fully charged, and is capable of bringing many carp to the station's location."
|
||||
icon_state = "carp_rift_charged"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
/mob/camera/ai_eye/remote/xenobio/setLoc(t)
|
||||
var/area/new_area = get_area(t)
|
||||
if(new_area && new_area.name == allowed_area || new_area && new_area.xenobiology_compatible)
|
||||
if(new_area && new_area.name == allowed_area || new_area && (new_area.area_flags & XENOBIOLOGY_COMPATIBLE))
|
||||
return ..()
|
||||
else
|
||||
return
|
||||
@@ -397,7 +397,7 @@
|
||||
var/mob/living/C = user
|
||||
var/mob/camera/ai_eye/remote/xenobio/E = C.remote_control
|
||||
var/area/mobarea = get_area(S.loc)
|
||||
if(mobarea.name == E.allowed_area || mobarea.xenobiology_compatible)
|
||||
if(mobarea.name == E.allowed_area || (mobarea & XENOBIOLOGY_COMPATIBLE))
|
||||
slime_scan(S, C)
|
||||
|
||||
//Feeds a potion to slime
|
||||
@@ -412,7 +412,7 @@
|
||||
if(QDELETED(X.current_potion))
|
||||
to_chat(C, "<span class='warning'>No potion loaded.</span>")
|
||||
return
|
||||
if(mobarea.name == E.allowed_area || mobarea.xenobiology_compatible)
|
||||
if(mobarea.name == E.allowed_area ||(mobarea & XENOBIOLOGY_COMPATIBLE))
|
||||
X.current_potion.attack(S, C)
|
||||
|
||||
//Picks up slime
|
||||
@@ -424,7 +424,7 @@
|
||||
var/mob/camera/ai_eye/remote/xenobio/E = C.remote_control
|
||||
var/obj/machinery/computer/camera_advanced/xenobio/X = E.origin
|
||||
var/area/mobarea = get_area(S.loc)
|
||||
if(mobarea.name == E.allowed_area || mobarea.xenobiology_compatible)
|
||||
if(mobarea.name == E.allowed_area || (mobarea & XENOBIOLOGY_COMPATIBLE))
|
||||
if(X.stored_slimes.len >= X.max_slimes)
|
||||
to_chat(C, "<span class='warning'>Slime storage is full.</span>")
|
||||
return
|
||||
@@ -446,7 +446,7 @@
|
||||
var/mob/camera/ai_eye/remote/xenobio/E = C.remote_control
|
||||
var/obj/machinery/computer/camera_advanced/xenobio/X = E.origin
|
||||
var/area/turfarea = get_area(T)
|
||||
if(turfarea.name == E.allowed_area || turfarea.xenobiology_compatible)
|
||||
if(turfarea.name == E.allowed_area || (turfarea & XENOBIOLOGY_COMPATIBLE))
|
||||
for(var/mob/living/simple_animal/slime/S in X.stored_slimes)
|
||||
S.forceMove(T)
|
||||
S.visible_message("<span class='notice'>[S] warps in!</span>")
|
||||
@@ -461,7 +461,7 @@
|
||||
var/mob/camera/ai_eye/remote/xenobio/E = C.remote_control
|
||||
var/obj/machinery/computer/camera_advanced/xenobio/X = E.origin
|
||||
var/area/turfarea = get_area(T)
|
||||
if(turfarea.name == E.allowed_area || turfarea.xenobiology_compatible)
|
||||
if(turfarea.name == E.allowed_area || (turfarea & XENOBIOLOGY_COMPATIBLE))
|
||||
if(X.monkeys >= 1)
|
||||
var/mob/living/carbon/monkey/food = new /mob/living/carbon/monkey(T, TRUE, C)
|
||||
if (!QDELETED(food))
|
||||
@@ -484,7 +484,7 @@
|
||||
if(!X.connected_recycler)
|
||||
to_chat(C, "<span class='warning'>There is no connected monkey recycler. Use a multitool to link one.</span>")
|
||||
return
|
||||
if(mobarea.name == E.allowed_area || mobarea.xenobiology_compatible)
|
||||
if(mobarea.name == E.allowed_area || (mobarea & XENOBIOLOGY_COMPATIBLE))
|
||||
if(!M.stat)
|
||||
return
|
||||
M.visible_message("<span class='notice'>[M] vanishes as [p_theyre()] reclaimed for recycling!</span>")
|
||||
|
||||
@@ -1072,5 +1072,5 @@
|
||||
for(var/turf/T in A)
|
||||
T.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
|
||||
T.add_atom_colour("#2956B2", FIXED_COLOUR_PRIORITY)
|
||||
A.xenobiology_compatible = TRUE
|
||||
A.area_flags |= XENOBIOLOGY_COMPATIBLE
|
||||
qdel(src)
|
||||
|
||||
@@ -123,7 +123,7 @@ GLOBAL_VAR_INIT(fscpassword, generate_password())
|
||||
name = "Syndicate Forgotten Vault"
|
||||
icon_state = "syndie-ship"
|
||||
ambientsounds = list('sound/ambience/ambitech2.ogg', 'sound/ambience/ambitech3.ogg')
|
||||
noteleport = TRUE
|
||||
area_flags = NOTELEPORT | UNIQUE_AREA
|
||||
|
||||
//Cybersun hardsuit
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
GLOBAL_VAR_INIT(hhStorageTurf, null)
|
||||
GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337)
|
||||
|
||||
// Someone for the love of god kill whoever indented this with spaces
|
||||
/obj/item/hilbertshotel
|
||||
name = "Hilbert's Hotel"
|
||||
desc = "A sphere of what appears to be an intricate network of bluespace. Observing it in detail seems to give you a headache as you try to comprehend the infinite amount of infinitesimally distinct points on its surface."
|
||||
@@ -305,19 +306,17 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337)
|
||||
qdel(src)
|
||||
|
||||
/area/hilbertshotel
|
||||
name = "Hilbert's Hotel Room"
|
||||
icon_state = "hilbertshotel"
|
||||
requires_power = FALSE
|
||||
has_gravity = TRUE
|
||||
noteleport = TRUE
|
||||
hidden = TRUE
|
||||
unique = FALSE
|
||||
dynamic_lighting = DYNAMIC_LIGHTING_FORCED
|
||||
ambientsounds = list('sound/ambience/servicebell.ogg')
|
||||
var/roomnumber = 0
|
||||
var/obj/item/hilbertshotel/parentSphere
|
||||
var/datum/turf_reservation/reservation
|
||||
var/turf/storageTurf
|
||||
name = "Hilbert's Hotel Room"
|
||||
icon_state = "hilbertshotel"
|
||||
requires_power = FALSE
|
||||
has_gravity = TRUE
|
||||
area_flags = NOTELEPORT | HIDDEN_AREA
|
||||
dynamic_lighting = DYNAMIC_LIGHTING_FORCED
|
||||
ambientsounds = list('sound/ambience/servicebell.ogg')
|
||||
var/roomnumber = 0
|
||||
var/obj/item/hilbertshotel/parentSphere
|
||||
var/datum/turf_reservation/reservation
|
||||
var/turf/storageTurf
|
||||
|
||||
/area/hilbertshotel/Entered(atom/movable/AM)
|
||||
. = ..()
|
||||
@@ -386,9 +385,8 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337)
|
||||
name = "Hilbert's Hotel Storage Room"
|
||||
icon_state = "hilbertshotel"
|
||||
requires_power = FALSE
|
||||
area_flags = HIDDEN_AREA | NOTELEPORT | UNIQUE_AREA
|
||||
has_gravity = TRUE
|
||||
noteleport = TRUE
|
||||
hidden = TRUE
|
||||
|
||||
/obj/item/abstracthotelstorage
|
||||
anchored = TRUE
|
||||
|
||||
Reference in New Issue
Block a user