area
A grouping of tiles into a logical space, mostly used by map editors
Vars | |
active_alarms | Alarm type to count of sources. Not usable for ^ because we handle fires differently |
---|---|
active_firelocks | A list of firelocks currently active. Used by fire alarms when setting their icons. |
air_scrubbers | List of all air scrubbers in the area |
air_vents | List of all air vents in the area |
airlock_wires | Wire assignment for airlocks in this area |
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. Fire alarms and fire locks will set and clear alarms. |
always_unpowered | This gets overridden to 1 for space in area/. |
ambient_buzz | The background droning loop that plays 24/7 |
ambient_buzz_vol | The volume of the ambient buzz |
ambientsounds | A list of sounds to pick from every so often to play to clients. |
area_has_base_lighting | Whether this area has a currently active base lighting, bool |
area_limited_icon_smoothing | Typepath to limit the areas (subtypes included) that atoms in this area can smooth with. Used for shuttles. |
areasize | Size of the area in open turfs, only calculated for indoors areas. |
base_lighting_alpha | alpha 0-255 of lighting_effect and thus baselighting intensity |
base_lighting_color | The colour of the light acting on this area |
beauty | Beauty average per open turf in the area |
beauty_threshold | If a room is too big it doesn't have beauty. |
default_gravity | The default gravity for the area |
energy_usage | The energy usage of the area in the last machines SS tick. |
fault_location | The source machinery for the area's fault status |
fault_status | The current alarm fault status |
fire | Do we have an active fire alarm? |
fire_detect | A var for whether the area allows for detecting fires/etc. Disabled or enabled at a fire alarm, checked by fire locks. |
firealarms | A list of all fire alarms in this area. Used by firelocks and burglar alarms to change icon state. |
firedoors | A list of all fire locks in this area. Used by fire alarm panels when resetting fire locks or activating all in an area |
forced_ambience | Does this area immediately play an ambience track upon enter? |
lighting_effects | List of mutable appearances we underlay to show light In the form plane offset + 1 -> appearance to use |
lights | List of all lights in our area |
map_generator | This datum, if set, allows terrain generation behavior to be ran on Initialize() |
max_ambience_cooldown | Used to decide what the maximum time between ambience is |
min_ambience_cooldown | Used to decide what the minimum time between ambience is |
mood_bonus | Bonus mood for being in this area |
mood_message | Mood message for being here, only shows up if mood_bonus != 0 |
mood_trait | Does the mood bonus require a trait? |
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) |
requires_power | Will objects this area be needing power? |
sound_environment | Used to decide what kind of reverb the area makes sound have |
static_lighting | Whether this area allows static lighting and thus loads the lighting objects |
totalbeauty | All beauty in this area combined, only includes indoor area. |
turfs_by_zlevel | List of all turfs currently inside this area as nested lists indexed by zlevel. Acts as a filtered version of area.contents For faster lookup (area.contents is actually a filtered loop over world) Semi fragile, but it prevents stupid so I think it's worth it |
turfs_to_uncontain_by_zlevel | turfs_by_z_level can hold MASSIVE lists, so rather then adding/removing from it each time we have a problem turf We should instead store a list of turfs to REMOVE from it, then hook into a getter for it There is a risk of this and contained_turfs leaking, so a subsystem will run it down to 0 incrementally if it gets too large This uses the same nested list format as turfs_by_zlevel |
Procs | |
AllowDrop | Causes a runtime error |
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 |
LateInitialize | Sets machine power levels in the area |
New | Called when an area loads |
PlaceOnTopReact | A hook so areas can modify the incoming args (of what??) |
RunTerrainGeneration | Generate turfs, including cool cave wall gen |
RunTerrainPopulation | Populate the previously generated terrain with mobs and objects |
addStaticPower | Add a static amount of power load to an area. The value is assumed as the watt. |
burglaralert | Raise a burglar alert for this area |
cannonize_contained_turfs | Ensures that the contained_turfs list properly represents the turfs actually inside us |
cannonize_contained_turfs_by_zlevel | Ensures that the contained_turfs list properly represents the turfs actually inside us |
clear_usage | Clear all non-static power usage in area |
close_and_lock_door | Close and lock a door passed into this proc |
create_area_lighting_objects | regenerates lighting objects for turfs in this area, primary use is VV changes |
drop_location | Causes a runtime error |
get_highest_zlevel | Returns the highest zlevel that this area contains turfs for |
get_original_area_name | Returns the name of an area, with the original name if the area name has been changed. |
get_turfs_by_zlevel | Returns a list with all turfs in this zlevel. |
get_turfs_from_all_zlevels | Merges a list containing all of the turfs zlevel lists from get_zlevel_turf_lists inside one list. Use get_zlevel_turf_lists() or get_turfs_by_zlevel() unless you need all the turfs in one list to avoid generating large lists |
get_zlevel_turf_lists | Returns a nested list of lists with all turfs split by zlevel. only zlevels with turfs are returned. The order of the list is not guaranteed. |
has_contained_turfs | Returns TRUE if we have contained turfs, FALSE otherwise |
on_joining_game | Called when a living mob that spawned here, joining the round, receives the player client. |
play_ambience | Attempts to play an ambient sound to a mob, returning the cooldown in deciseconds |
power_change | Called when the area power status changes |
powered | Returns int 1 or 0 if the area has power for the given channel |
reg_in_areas_in_z | Register this area as belonging to a z level |
removeStaticPower | Remove a static amount of power load to an area. The value is assumed as the watt. |
remove_area_lighting_objects | Removes lighting objects from turfs in this area if we have them, primary use is VV changes |
set_fire_effect | Set the fire alarm visual affects in an area |
setup | Setup an area (with the given name) |
update_areasize | Set the area size of the area |
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 |
use_energy | Add a power value amount to the stored used_x variables |
Var Details
active_alarms
Alarm type to count of sources. Not usable for ^ because we handle fires differently
active_firelocks
A list of firelocks currently active. Used by fire alarms when setting their icons.
air_scrubbers
List of all air scrubbers in the area
air_vents
List of all air vents in the area
airlock_wires
Wire assignment for airlocks in this area
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. Fire alarms and fire locks will set and clear alarms.
always_unpowered
This gets overridden to 1 for space in area/.
ambient_buzz
The background droning loop that plays 24/7
ambient_buzz_vol
The volume of the ambient buzz
ambientsounds
A list of sounds to pick from every so often to play to clients.
area_has_base_lighting
Whether this area has a currently active base lighting, bool
area_limited_icon_smoothing
Typepath to limit the areas (subtypes included) that atoms in this area can smooth with. Used for shuttles.
areasize
Size of the area in open turfs, only calculated for indoors areas.
base_lighting_alpha
alpha 0-255 of lighting_effect and thus baselighting intensity
base_lighting_color
The colour of the light acting on this area
beauty
Beauty average per open turf in the area
beauty_threshold
If a room is too big it doesn't have beauty.
default_gravity
The default gravity for the area
energy_usage
The energy usage of the area in the last machines SS tick.
fault_location
The source machinery for the area's fault status
fault_status
The current alarm fault status
fire
Do we have an active fire alarm?
fire_detect
A var for whether the area allows for detecting fires/etc. Disabled or enabled at a fire alarm, checked by fire locks.
firealarms
A list of all fire alarms in this area. Used by firelocks and burglar alarms to change icon state.
firedoors
A list of all fire locks in this area. Used by fire alarm panels when resetting fire locks or activating all in an area
forced_ambience
Does this area immediately play an ambience track upon enter?
lighting_effects
List of mutable appearances we underlay to show light In the form plane offset + 1 -> appearance to use
lights
List of all lights in our area
map_generator
This datum, if set, allows terrain generation behavior to be ran on Initialize()
max_ambience_cooldown
Used to decide what the maximum time between ambience is
min_ambience_cooldown
Used to decide what the minimum time between ambience is
mood_bonus
Bonus mood for being in this area
mood_message
Mood message for being here, only shows up if mood_bonus != 0
mood_trait
Does the mood bonus require a trait?
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)
requires_power
Will objects this area be needing power?
sound_environment
Used to decide what kind of reverb the area makes sound have
static_lighting
Whether this area allows static lighting and thus loads the lighting objects
totalbeauty
All beauty in this area combined, only includes indoor area.
turfs_by_zlevel
List of all turfs currently inside this area as nested lists indexed by zlevel. Acts as a filtered version of area.contents For faster lookup (area.contents is actually a filtered loop over world) Semi fragile, but it prevents stupid so I think it's worth it
turfs_to_uncontain_by_zlevel
turfs_by_z_level can hold MASSIVE lists, so rather then adding/removing from it each time we have a problem turf We should instead store a list of turfs to REMOVE from it, then hook into a getter for it There is a risk of this and contained_turfs leaking, so a subsystem will run it down to 0 incrementally if it gets too large This uses the same nested list format as turfs_by_zlevel
Proc Details
AllowDrop
Causes a runtime error
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 a list of atoms)
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 a list of atoms)
LateInitialize
Sets machine power levels in the area
New
Called when an area loads
Adds the item to the GLOB.areas_by_type list based on area type
PlaceOnTopReact
A hook so areas can modify the incoming args (of what??)
RunTerrainGeneration
Generate turfs, including cool cave wall gen
RunTerrainPopulation
Populate the previously generated terrain with mobs and objects
addStaticPower
Add a static amount of power load to an area. The value is assumed as the watt.
Possible channels *AREA_USAGE_STATIC_EQUIP *AREA_USAGE_STATIC_LIGHT *AREA_USAGE_STATIC_ENVIRON
burglaralert
Raise a burglar alert for this area
Close and locks all doors in the area and alerts silicon mobs of a break in
Alarm auto resets after 600 ticks
cannonize_contained_turfs
Ensures that the contained_turfs list properly represents the turfs actually inside us
cannonize_contained_turfs_by_zlevel
Ensures that the contained_turfs list properly represents the turfs actually inside us
clear_usage
Clear all non-static power usage in area
Clears all power used for the dynamic equipment, light and environment channels
close_and_lock_door
Close and lock a door passed into this proc
Does this need to exist on area? probably not
create_area_lighting_objects
regenerates lighting objects for turfs in this area, primary use is VV changes
drop_location
Causes a runtime error
get_highest_zlevel
Returns the highest zlevel that this area contains turfs for
get_original_area_name
Returns the name of an area, with the original name if the area name has been changed.
If an area has not been renamed, returns the area name. If it has been modified (by blueprints or other means) returns the current name, as well as the initial value, in the format of [Current Location Name (Original Name)]
get_turfs_by_zlevel
Returns a list with all turfs in this zlevel.
get_turfs_from_all_zlevels
Merges a list containing all of the turfs zlevel lists from get_zlevel_turf_lists inside one list. Use get_zlevel_turf_lists() or get_turfs_by_zlevel() unless you need all the turfs in one list to avoid generating large lists
get_zlevel_turf_lists
Returns a nested list of lists with all turfs split by zlevel. only zlevels with turfs are returned. The order of the list is not guaranteed.
has_contained_turfs
Returns TRUE if we have contained turfs, FALSE otherwise
on_joining_game
Called when a living mob that spawned here, joining the round, receives the player client.
play_ambience
Attempts to play an ambient sound to a mob, returning the cooldown in deciseconds
power_change
Called when the area power status changes
Updates the area icon, calls power change on all machinees in the area, and sends the COMSIG_AREA_POWER_CHANGE
signal.
powered
Returns int 1 or 0 if the area has power for the given channel
evaluates a mixture of variables mappers can set, requires_power, always_unpowered and then per channel power_equip, power_light, power_environ
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
removeStaticPower
Remove a static amount of power load to an area. The value is assumed as the watt.
Possible channels *AREA_USAGE_STATIC_EQUIP *AREA_USAGE_STATIC_LIGHT *AREA_USAGE_STATIC_ENVIRON
remove_area_lighting_objects
Removes lighting objects from turfs in this area if we have them, primary use is VV changes
set_fire_effect
Set the fire alarm visual affects in an area
Allows interested parties (lights and fire alarms) to react
setup
Setup an area (with the given name)
Sets the area name, sets all status var's to false and adds the area to the sorted area list
update_areasize
Set the area size of the area
This is the number of open turfs in the area contents, or FALSE if the outdoors var is set
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
I'm not sure what the heck this does, something to do with weather being able to set icon states on areas?? where the heck would that even display?
use_energy
Add a power value amount to the stored used_x variables