area ![code/game/area/areas.dm 6](git.png)
A grouping of tiles into a logical space, mostly used by map editors
This module sets airlocks in certain areas to be able to have an Engineer Override on orange alert. Crew with ID cards with the engineering flag will be able to access these areas during those times.
Vars | |
active_alarms | Alarm type to count of sources. Not usable for ^ because we handle fires differently |
---|---|
alarm_manager | We use this just for fire alarms, because they're area based right now so one alarm going poof shouldn't prevent you from clearing your alarms listing |
always_unpowered | This gets overridden to 1 for space in area/Initialize(mapload). |
areasize | Size of the area in open turfs, only calculated for indoors areas. |
beauty | Beauty average per open turf in the area |
beauty_threshold | If a room is too big it doesn't have beauty. |
clockwork_warp_allowed | whether servants can warp into this area from Reebe |
clockwork_warp_fail | Message to display when the clockwork warp fails |
considered_hull_exterior | Considered space for hull shielding |
dirt_buildup_allowed | Dirty flooring allowed |
engineering_override_eligible | Is this area eligible for engineer override? |
fire | Do we have an active fire alarm? |
flora_allowed | If flora are allowed to spawn in this area randomly through tunnel generation |
forced_ambience | Does this area immediately play an ambience track upon enter? |
hidden | Hides area from player Teleport function. |
map_generator | This datum, if set, allows terrain generation behavior to be ran on Initialize() |
map_name | CIT SPECIFIC VARS Set in New(); preserves the name set by the map maker, even if renamed by the Blueprints. |
max_ambience_cooldown | Used to decide what the maximum time between ambience is |
megafauna_spawn_allowed | If megafauna can be spawned by natural random generation |
min_ambience_cooldown | Used to decide what the minimum time between ambience is |
minimap_color | Color on minimaps, if it's null (which is default) it makes one at random. |
mob_spawn_allowed | if mobs can be spawned by natural random generation |
mood_bonus | Bonus mood for being in this area |
mood_message | Mood message for being here, only shows up if mood_bonus != 0 |
outdoors | 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) |
parallax_move_angle | Parallax move dir - degrees clockwise from north |
parallax_move_speed | Parallax move speed - 0 to disable |
parallax_moving | Parallax moving? |
persistent_debris_allowed | Persistent debris alowed |
requires_power | Will objects this area be needing power? |
safe | Is the area teleport-safe: no space / radiation / aggresive mobs / other dangers |
shipambience | Used to define constant (loop) area ambience |
sound_environment | Used to decide what kind of reverb the area makes sound have |
sub_areas | These two vars allow for multiple unique areas to be linked to a master area and share some functionalities such as APC powernet nodes, fire alarms etc, without sacrificing their own flags, statuses, variables and more snowflakes. Friendly reminder: no map edited areas. |
totalbeauty | All beauty in this area combined, only includes indoor area. |
triggered_firealarms | How many fire alarm sources do we have? |
tunnel_allowed | If mining tunnel generation is allowed in this area |
valid_malf_hack | malf ais can hack this |
Procs | |
Destroy | Destroy an area and clean it up |
Entered | Call back when an atom enters an area |
Exited | Called when an atom exits an area |
Initialize | Initalize this area |
LateInitialize | Sets machine power levels in the area |
ModifyFiredoors | Try to close all the firedoors in the area |
New | Called when an area loads |
play_ambience | Attempts to play an ambient sound to a mob, returning the cooldown in deciseconds |
reg_in_areas_in_z | Register this area as belonging to a z level |
update_beauty | Divides total beauty in the room by roomsize to allow us to get an average beauty per tile. |
update_icon_state | Update the icon state of the area |
Var Details
active_alarms ![code/game/area/areas.dm 23](git.png)
Alarm type to count of sources. Not usable for ^ because we handle fires differently
alarm_manager ![code/game/area/areas.dm 25](git.png)
We use this just for fire alarms, because they're area based right now so one alarm going poof shouldn't prevent you from clearing your alarms listing
always_unpowered ![code/game/area/areas.dm 50](git.png)
This gets overridden to 1 for space in area/Initialize(mapload).
areasize ![code/game/area/areas.dm 40](git.png)
Size of the area in open turfs, only calculated for indoors areas.
beauty ![code/game/area/areas.dm 32](git.png)
Beauty average per open turf in the area
beauty_threshold ![code/game/area/areas.dm 34](git.png)
If a room is too big it doesn't have beauty.
clockwork_warp_allowed ![code/game/area/areas.dm 100](git.png)
whether servants can warp into this area from Reebe
clockwork_warp_fail ![code/game/area/areas.dm 102](git.png)
Message to display when the clockwork warp fails
considered_hull_exterior ![code/game/area/areas.dm 118](git.png)
Considered space for hull shielding
dirt_buildup_allowed ![code/game/area/areas.dm 106](git.png)
Dirty flooring allowed
engineering_override_eligible ![code/game/machinery/doors/airlock_override.dm 8](git.png)
Is this area eligible for engineer override?
fire ![code/game/area/areas.dm 19](git.png)
Do we have an active fire alarm?
flora_allowed ![code/game/area/areas.dm 111](git.png)
If flora are allowed to spawn in this area randomly through tunnel generation
forced_ambience ![code/game/area/areas.dm 78](git.png)
Does this area immediately play an ambience track upon enter?
hidden ![code/game/area/areas.dm 131](git.png)
Hides area from player Teleport function.
map_generator ![code/game/area/areas.dm 87](git.png)
This datum, if set, allows terrain generation behavior to be ran on Initialize()
map_name ![code/game/area/areas.dm 95](git.png)
CIT SPECIFIC VARS Set in New(); preserves the name set by the map maker, even if renamed by the Blueprints.
max_ambience_cooldown ![code/game/area/areas.dm 75](git.png)
Used to decide what the maximum time between ambience is
megafauna_spawn_allowed ![code/game/area/areas.dm 115](git.png)
If megafauna can be spawned by natural random generation
min_ambience_cooldown ![code/game/area/areas.dm 73](git.png)
Used to decide what the minimum time between ambience is
minimap_color ![code/game/area/areas.dm 142](git.png)
Color on minimaps, if it's null (which is default) it makes one at random.
mob_spawn_allowed ![code/game/area/areas.dm 113](git.png)
if mobs can be spawned by natural random generation
mood_bonus ![code/game/area/areas.dm 43](git.png)
Bonus mood for being in this area
mood_message ![code/game/area/areas.dm 45](git.png)
Mood message for being here, only shows up if mood_bonus != 0
outdoors ![code/game/area/areas.dm 37](git.png)
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)
parallax_move_angle ![code/game/area/areas.dm 63](git.png)
Parallax move dir - degrees clockwise from north
parallax_move_speed ![code/game/area/areas.dm 61](git.png)
Parallax move speed - 0 to disable
parallax_moving ![code/game/area/areas.dm 59](git.png)
Parallax moving?
persistent_debris_allowed ![code/game/area/areas.dm 104](git.png)
Persistent debris alowed
requires_power ![code/game/area/areas.dm 48](git.png)
Will objects this area be needing power?
safe ![code/game/area/areas.dm 133](git.png)
Is the area teleport-safe: no space / radiation / aggresive mobs / other dangers
shipambience ![code/game/area/areas.dm 70](git.png)
Used to define constant (loop) area ambience
sound_environment ![code/game/area/areas.dm 90](git.png)
Used to decide what kind of reverb the area makes sound have
sub_areas ![code/game/area/areas.dm 154](git.png)
These two vars allow for multiple unique areas to be linked to a master area and share some functionalities such as APC powernet nodes, fire alarms etc, without sacrificing their own flags, statuses, variables and more snowflakes. Friendly reminder: no map edited areas.
totalbeauty ![code/game/area/areas.dm 30](git.png)
All beauty in this area combined, only includes indoor area.
triggered_firealarms ![code/game/area/areas.dm 21](git.png)
How many fire alarm sources do we have?
tunnel_allowed ![code/game/area/areas.dm 109](git.png)
If mining tunnel generation is allowed in this area
valid_malf_hack ![code/game/area/areas.dm 98](git.png)
malf ais can hack this
Proc Details
Destroy
Destroy an area and clean it up
Removes the area from GLOB.areas_by_type and also stops it processing on SSobj
This is despite the fact that no code appears to put it on SSobj, but who am I to argue with old coders
Entered
Call back when an atom enters an area
Sends signals COMSIG_AREA_ENTERED and COMSIG_ENTER_AREA (to the atom)
If the area has ambience, then it plays some ambience music to the ambience channel
Exited
Called when an atom exits an area
Sends signals COMSIG_AREA_EXITED and COMSIG_EXIT_AREA (to the atom)
Initialize
Initalize this area
intializes the dynamic area lighting and also registers the area with the z level via reg_in_areas_in_z
returns INITIALIZE_HINT_LATELOAD
LateInitialize
Sets machine power levels in the area
ModifyFiredoors
Try to close all the firedoors in the area
New
Called when an area loads
Adds the item to the GLOB.areas_by_type list based on area type
play_ambience
Attempts to play an ambient sound to a mob, returning the cooldown in deciseconds
reg_in_areas_in_z
Register this area as belonging to a z level
Ensures the item is added to the SSmapping.areas_in_z list for this z
update_beauty
Divides total beauty in the room by roomsize to allow us to get an average beauty per tile.
update_icon_state
Update the icon state of the area
Im not sure what the heck this does, somethign to do with weather being able to set icon states on areas?? where the heck would that even display?