client 
Client datum
A datum that is created whenever a user joins a BYOND world, one will exist for every active connected player
when they first connect, this client object is created and [/client/New] is called
When they disconnect, this client object is deleted and [/client/Del] is called
All client topic calls go through [/client/Topic] first, so a lot of our specialised topic handling starts here
Vars | |
| VUAP_selected_mob | This is used to hold the mob of the selected player in case the ckey can't be found (this enables pp'ing soulless mobs) |
|---|---|
| active_keybindings | The client's active keybindings, depending on their active mob. |
| admin_music_volume | Copyright (c) 2020 Aleksej Komarov SPDX-License-Identifier: MIT Admin music volume, from 0 to 1. |
| avgping | Average ping of the client |
| byondacc_age | Days since the client's BYOND account was created |
| byondacc_date | Date the client registered their BYOND account on |
| click_intercept_time | Time when the click was intercepted |
| clicklimiter | Used for limiting the rate of clicks sends by the client to avoid abuse |
| completed_asset_jobs | List of all completed blocking send jobs awaiting acknowledgement by send_asset |
| connection_realtime | world.realtime they connected |
| connection_time | world.time they connected |
| connection_timeofday | world.timeofday they connected |
| current_ambient_sound | Which ambient sound this client is currently being provided. |
| debug_text_overlay | Overlay for showing debug info |
| do_parallax_animations | Do we want to do parallax animations at all? Exists to prevent laptop fires |
| donate_offer_text_shown | Hold flag about shown donate offer |
| dont_animate_parallax | world.time of when we can state animate()ing parallax again |
| geoip | GeoIPdata about a current client |
| holder | Contains admin info. Null if client is not an admin. |
| intended_direction | The direction we WANT to move, based off our keybinds Will be udpated to be the actual direction later on |
| key_combos_held | A buffer for combinations such of modifiers + keys (ex: CtrlD, AltE, ShiftT). Format: "key" -> "combo" (ex: "D" -> "CtrlD") |
| keys_held | A buffer of currently held keys. |
| last_asset_job | The ID of the last asset job |
| last_completed_asset_job | The ID of the last asset job that was properly finished |
| last_discord_pm_time | Last world.time that a PM was send to discord by a player |
| last_message | Contains the last message sent by this client - used to protect against copy-paste spamming. |
| last_message_count | Contains a number of how many times a message identical to last_message was sent. |
| last_message_time | Holds the last time (based on world.time) a message was sent. |
| lastping | Last ping of the client |
| loot_panel | Loot panel for the client |
| mouseParams | Used in MouseDrag to preserve the original mouse click parameters |
| mouse_down_icon | used to make a special mouse cursor, this one for mouse up icon |
| mouse_location_ref | Used in MouseDrag to preserve the last mouse-entered location. Weakref |
| mouse_object_ref | Used in MouseDrag to preserve the last mouse-entered object. Weakref |
| mouse_override_icon | used to override the mouse cursor so it doesnt get reset |
| mouse_up_icon | used to make a special mouse cursor, this one for mouse up icon |
| move_delay | Move delay of controlled mob, any keypresses inside this period will persist until the next proper move |
| movement_keys | custom movement keys for this client |
| movement_locked | Are we locking our movement input? |
| next_mouse_macro_warning | When to next alert admins that mouse macro use was attempted |
| next_move_dir_add | On next move, add this dir to the move that would otherwise be done |
| next_move_dir_sub | On next move, subtract this dir from the move that would otherwise be done |
| panel_tabs | List of all tabs |
| parallax_animate_timers | Timers for the area directional animation, one for each layer |
| parallax_layers_max | How many parallax layers to show our client |
| parallax_movedir | Direction our current area wants to move parallax |
| parent_type | This line makes clients parent type be a datum |
| persistent_client | these persist between logins/logouts during the same round. |
| received_discord_pm | Last world/time that a PM was sent to the player by an admin |
| recent_examines | A lazy list of atoms we've examined in the last RECENT_EXAMINE_MAX_WINDOW (default 2) seconds, so that we will call /atom/proc/examine_more instead of /atom/proc/examine on them when examining |
| screen_maps | Assoc list with all the active maps - when a screen obj is added to a map, it's put in here as well. |
| seen_messages | Messages currently seen by this client |
| selectedPlayerCkey | This is used to hold the ckey of the selected player for moving to and from the player panel and vuap |
| selected_target | Autoclick list of two elements, first being the clicked thing, second being the parameters. |
| sent_assets | List of all asset filenames sent to this client by the asset cache, along with their assoicated md5s |
| show_verb_panel | Hides the byond verb panel as we use our own custom version. |
| spell_tabs | list of tabs containing spells and abilities //TODO vakons actions: remove if not used |
| stat_panel | Stat panel window declaration, we don't usually allow this but tgui windows/panels are exceptions |
| stat_tab | our current tab |
| tgui_cache_reloaded | global |
| tgui_panel | Copyright (c) 2020 Aleksej Komarov SPDX-License-Identifier: MIT |
| tgui_say | Assigned say modal of the client |
| tgui_windows | global |
| topiclimiter | Used for limiting the rate of topic sends by the client to avoid abuse |
| tos_consent | Has the client accepted the TOS about data collection and other stuff |
| version_blocked | If true, client cannot ready up, late join, or observe. Used for players with EXTREMELY old byond versions. |
| view_size | datum wrapper for client view |
| visual_delay | The visual delay to use for the current client.Move(), mostly used for making a client based move look like it came from some other slower source |
| window_scaling | If this client has any windows scaling applied |
Procs | |
| Move | Move a client in a direction |
| Process_Grab | Checks to see if you're being grabbed and if so attempts to break it |
| Process_Incorpmove | Allows mobs to ignore density and phase through objects |
| _Topic | dumb workaround because byond doesnt seem to recognize the Topic() typepath for /datum/proc/Topic() from the client Topic, so we cant queue it without this |
| acquire_dpi | This grabs the DPI of the user per their skin |
| admin_follow | Attempts to make the client orbit the given object, for administrative purposes. If they are not an observer, will try to aghost them. |
| asset_cache_confirm_arrival | Process asset cache client topic calls for "asset_cache_confirm_arrival=[INT]" |
| asset_cache_preload_data | Process asset cache client topic calls for "asset_cache_preload_data=[HTML+JSON_STRING]" |
| asset_cache_update_json | Updates the client side stored json file used to keep track of what assets the client has between restarts/reconnects. |
| browse_queue_flush | Blocks until all currently sending browse and browse_rsc assets have been sent. Due to byond limitations, this proc will sleep for 1 client round trip even if the client has no pending asset sends. This proc will return an untrue value if it had to return before confirming the send, such as timeout or the client going away. |
| browseserverlogs | This proc allows download of past server logs saved within the data/logs/ folder. |
| check_drag_proximity | Handles treating drags as clicks if they're within some conditions Does some other stuff adjacent to trying to figure out what the user actually "wanted" to click Returns TRUE if it caused a click, FALSE otherwise |
| check_tos_consent | Checks if the client has accepted TOS |
| clear_all_maps | Clears all the maps of registered screen objects. |
| clear_map | Clears the map of registered screen objects. |
| clear_screen | Clears the client's screen, aside from ones that opt out |
| client_reset_held_keys | Manually clears any held keys, in case due to lag or other undefined behavior a key gets stuck. |
| close_popup | Closes a popup. |
| create_popup | Creates a popup window with a basic map element in it, without any further initialization. |
| file_spam_check | This proc is a failsafe to prevent spamming of file requests. It is just a timer that only permits a download every FTPDELAY ticks. This can be changed by modifying FTPDELAY's value above. |
| fix_tgui_panel | tgui panel / chat troubleshooting verb |
| fix_title_screen | Reloads the titlescreen if it is bugged for someone. |
| getStealthKey | Returns this client's stealthed ckey |
| get_award_status | Redirect proc that makes it easier to get the status of an achievement. Achievement type is the typepath to the award. |
| get_byond_account_date | Sets the clients BYOND date up properly |
| give_award | Redirect proc that makes it easier to call the unlock achievement proc. Achievement type is the typepath to the award, user is the mob getting the award, and value is an optional variable used for leaderboard value increments |
| handle_popup_close | When the popup closes in any way (player or proc call) it calls this. |
| init_verbs | Compiles a full list of verbs and sends it to the browser |
| is_drag_clickable | Does the logic for checking if a drag counts as a click or not Returns true if it does, false otherwise |
| maxview | Returns the biggest number from client.view so we can do easier maths |
| on_stat_panel_message | Handles incoming messages from the stat-panel TGUI. |
| open_escape_menu | Opens the escape menu. Verb, hardcoded to Escape, set in the client skin. |
| open_particle_editor | opens the particle editor UI for the in_atom object for this client |
| poll_option_parse | Processes topic data from poll option panel. |
| poll_parse | Processes topic data from poll management panel. |
| register_map_obj | Registers screen obj with the client, which makes it visible on the assigned map, and becomes a part of the assigned map's lifecycle. |
| reset_held_keys | Manually clears any held keys, in case due to lag or other undefined behavior a key gets stuck. |
| retrieve_byondacc_data | Retrieves the BYOND accounts data from the BYOND servers |
| send_resources | Send resources to the client. Sends both game resources and browser assets. |
| setup_popup | Create the popup, and get it ready for generic use by giving it a background. |
| tgui_say_create_open_command | Creates a JSON encoded message to open TGUI say modals properly. |
| uiclose | verb |
| view_var_Topic | DO NOT add new branches to view_var_Topic() — this is a legacy dispatcher, kept only for existing handlers. |
| vv_do_basic | Core topics are VV topics which should work even if the code responsible for processing vv topics for that datum is runtiming. They're kept separately from /datum/proc/vv_do_topic for that reason. |
| vv_do_list | Lists are not /datum objects and therefore lack a Topic() proc. All View‑Variables interactions for lists go through this dedicated handler instead. |
| vv_subtype_prompt | Do they want you to include subtypes? |
Var Details
VUAP_selected_mob 
This is used to hold the mob of the selected player in case the ckey can't be found (this enables pp'ing soulless mobs)
active_keybindings 
The client's active keybindings, depending on their active mob.
admin_music_volume 
Copyright (c) 2020 Aleksej Komarov SPDX-License-Identifier: MIT Admin music volume, from 0 to 1.
avgping 
Average ping of the client
byondacc_age 
Days since the client's BYOND account was created
byondacc_date 
Date the client registered their BYOND account on
click_intercept_time 
Time when the click was intercepted
clicklimiter 
Used for limiting the rate of clicks sends by the client to avoid abuse
completed_asset_jobs 
List of all completed blocking send jobs awaiting acknowledgement by send_asset
connection_realtime 
world.realtime they connected
connection_time 
world.time they connected
connection_timeofday 
world.timeofday they connected
current_ambient_sound 
Which ambient sound this client is currently being provided.
debug_text_overlay 
Overlay for showing debug info
do_parallax_animations 
Do we want to do parallax animations at all? Exists to prevent laptop fires
donate_offer_text_shown 
Hold flag about shown donate offer
dont_animate_parallax 
world.time of when we can state animate()ing parallax again
geoip 
GeoIPdata about a current client
holder 
Contains admin info. Null if client is not an admin.
intended_direction 
The direction we WANT to move, based off our keybinds Will be udpated to be the actual direction later on
key_combos_held 
A buffer for combinations such of modifiers + keys (ex: CtrlD, AltE, ShiftT). Format: "key" -> "combo" (ex: "D" -> "CtrlD")
keys_held 
A buffer of currently held keys.
last_asset_job 
The ID of the last asset job
last_completed_asset_job 
The ID of the last asset job that was properly finished
last_discord_pm_time 
Last world.time that a PM was send to discord by a player
last_message 
Contains the last message sent by this client - used to protect against copy-paste spamming.
last_message_count 
Contains a number of how many times a message identical to last_message was sent.
last_message_time 
Holds the last time (based on world.time) a message was sent.
lastping 
Last ping of the client
loot_panel 
Loot panel for the client
mouseParams 
Used in MouseDrag to preserve the original mouse click parameters
mouse_down_icon 
used to make a special mouse cursor, this one for mouse up icon
mouse_location_ref 
Used in MouseDrag to preserve the last mouse-entered location. Weakref
mouse_object_ref 
Used in MouseDrag to preserve the last mouse-entered object. Weakref
mouse_override_icon 
used to override the mouse cursor so it doesnt get reset
mouse_up_icon 
used to make a special mouse cursor, this one for mouse up icon
move_delay 
Move delay of controlled mob, any keypresses inside this period will persist until the next proper move
movement_keys 
custom movement keys for this client
movement_locked 
Are we locking our movement input?
next_mouse_macro_warning 
When to next alert admins that mouse macro use was attempted
next_move_dir_add 
On next move, add this dir to the move that would otherwise be done
next_move_dir_sub 
On next move, subtract this dir from the move that would otherwise be done
panel_tabs 
List of all tabs
parallax_animate_timers 
Timers for the area directional animation, one for each layer
parallax_layers_max 
How many parallax layers to show our client
parallax_movedir 
Direction our current area wants to move parallax
parent_type 
This line makes clients parent type be a datum
By default in byond if you define a proc on datums, that proc will exist on nearly every single type from icons to images to atoms to mobs to objs to turfs to areas, it won't however, appear on client
instead by default they act like their own independent type so while you can do isdatum(icon) and have it return true, you can't do isdatum(client), it will always return false.
This makes writing oo code hard, when you have to consider this extra special case
This line prevents that, and has never appeared to cause any ill effects, while saving us an extra pain to think about
This line is widely considered black fucking magic, and the fact it works is a puzzle to everyone involved, including the current engine developer, lummox
If you are a future developer and the engine source is now available and you can explain why this is the way it is, please do update this comment
persistent_client 
these persist between logins/logouts during the same round.
received_discord_pm 
Last world/time that a PM was sent to the player by an admin
recent_examines 
A lazy list of atoms we've examined in the last RECENT_EXAMINE_MAX_WINDOW (default 2) seconds, so that we will call /atom/proc/examine_more instead of /atom/proc/examine on them when examining
screen_maps 
Assoc list with all the active maps - when a screen obj is added to a map, it's put in here as well.
Format: list(
seen_messages 
Messages currently seen by this client
selectedPlayerCkey 
This is used to hold the ckey of the selected player for moving to and from the player panel and vuap
selected_target 
Autoclick list of two elements, first being the clicked thing, second being the parameters.
sent_assets 
List of all asset filenames sent to this client by the asset cache, along with their assoicated md5s
show_verb_panel 
Hides the byond verb panel as we use our own custom version.
spell_tabs 
list of tabs containing spells and abilities //TODO vakons actions: remove if not used
stat_panel 
Stat panel window declaration, we don't usually allow this but tgui windows/panels are exceptions
stat_tab 
our current tab
tgui_cache_reloaded 
global
TRUE if cache was reloaded by tgui dev server at least once.
tgui_panel 
Copyright (c) 2020 Aleksej Komarov SPDX-License-Identifier: MIT
tgui_say 
Assigned say modal of the client
tgui_windows 
global
Tracks open windows for a user.
topiclimiter 
Used for limiting the rate of topic sends by the client to avoid abuse
tos_consent 
Has the client accepted the TOS about data collection and other stuff
version_blocked 
If true, client cannot ready up, late join, or observe. Used for players with EXTREMELY old byond versions.
view_size 
datum wrapper for client view
visual_delay 
The visual delay to use for the current client.Move(), mostly used for making a client based move look like it came from some other slower source
window_scaling 
If this client has any windows scaling applied
Proc Details
Move
Move a client in a direction
Huge proc, has a lot of functionality
Mostly it will despatch to the mob that you are the owner of to actually move in the physical realm
Things that stop you moving as a mob:
- world time being less than your next move_delay
- not being in a mob, or that mob not having a loc
- missing the new_loc and direct parameters
- having TRAIT_NO_TRANSFORM
- being in remote control of an object (calls Move_object instead)
- being dead (it ghosts you instead)
Things that stop you moving as a mob living (why even have OO if you're just shoving it all in the parent proc with istype checks right?):
- having incorporeal_move set (calls Process_Incorpmove() instead)
- being in remote control of a movable, (calls remote_control() instead)
- being grabbed
- being buckled (relaymove() is called to the buckled atom instead)
- having your loc be some other mob (relaymove() is called on that mob instead)
- Not having MOBILITY_MOVE
- Failing Process_Spacemove() call
At this point, if the mob is is confused, then a random direction and target turf will be calculated for you to travel to instead
Now the parent call is made (to the byond builtin move), which moves you
Some final move delay calculations (doubling if you moved diagonally successfully)
If mob throwing is set I believe it's unset at this point via a call to finalize
Finally if you're pulling an object and it's dense, you are turned 180 after the move (if you ask me, this should be at the top of the move so you don't dance around) // LATER
Process_Grab
Checks to see if you're being grabbed and if so attempts to break it
Called by client/Move()
Process_Incorpmove
Allows mobs to ignore density and phase through objects
Called by client/Move()
The behaviour depends on the incorporeal_move value of the mob
- INCORPOREAL_MOVE_BASIC - forceMoved to the next tile with no stop
- INCORPOREAL_NINJA - the same but leaves a cool effect path
- INCORPOREAL_REVENANT - the same but blocked by holy tiles
You'll note this is another mob living level proc living at the client level
_Topic
dumb workaround because byond doesnt seem to recognize the Topic() typepath for /datum/proc/Topic() from the client Topic, so we cant queue it without this
acquire_dpi
This grabs the DPI of the user per their skin
admin_follow
Attempts to make the client orbit the given object, for administrative purposes. If they are not an observer, will try to aghost them.
asset_cache_confirm_arrival
Process asset cache client topic calls for "asset_cache_confirm_arrival=[INT]"
asset_cache_preload_data
Process asset cache client topic calls for "asset_cache_preload_data=[HTML+JSON_STRING]"
asset_cache_update_json
Updates the client side stored json file used to keep track of what assets the client has between restarts/reconnects.
browse_queue_flush
Blocks until all currently sending browse and browse_rsc assets have been sent. Due to byond limitations, this proc will sleep for 1 client round trip even if the client has no pending asset sends. This proc will return an untrue value if it had to return before confirming the send, such as timeout or the client going away.
browseserverlogs
This proc allows download of past server logs saved within the data/logs/ folder.
check_drag_proximity
Handles treating drags as clicks if they're within some conditions Does some other stuff adjacent to trying to figure out what the user actually "wanted" to click Returns TRUE if it caused a click, FALSE otherwise
check_tos_consent
Checks if the client has accepted TOS
Runs some checks against vars and the DB to see if the client has accepted TOS. Returns TRUE or FALSE if they have or have not
clear_all_maps
Clears all the maps of registered screen objects.
clear_map
Clears the map of registered screen objects.
clear_screen
Clears the client's screen, aside from ones that opt out
client_reset_held_keys
Manually clears any held keys, in case due to lag or other undefined behavior a key gets stuck.
close_popup
Closes a popup.
create_popup
Creates a popup window with a basic map element in it, without any further initialization.
Ratio is how many pixels by how many pixels (keep it simple).
Returns a map name.
file_spam_check
This proc is a failsafe to prevent spamming of file requests. It is just a timer that only permits a download every FTPDELAY ticks. This can be changed by modifying FTPDELAY's value above.
PLEASE USE RESPONSIBLY, Some log files can reach sizes of 4MB!
fix_tgui_panel
tgui panel / chat troubleshooting verb
fix_title_screen
Reloads the titlescreen if it is bugged for someone.
getStealthKey
Returns this client's stealthed ckey
get_award_status
Redirect proc that makes it easier to get the status of an achievement. Achievement type is the typepath to the award.
get_byond_account_date
Sets the clients BYOND date up properly
If the client does not have a saved BYOND account creation date, retrieve it from the website If they do have a saved date, use that from the DB, because this value will never change Arguments:
- notify - Do we notify admins of this new accounts date
give_award
Redirect proc that makes it easier to call the unlock achievement proc. Achievement type is the typepath to the award, user is the mob getting the award, and value is an optional variable used for leaderboard value increments
handle_popup_close
When the popup closes in any way (player or proc call) it calls this.
init_verbs
Compiles a full list of verbs and sends it to the browser
is_drag_clickable
Does the logic for checking if a drag counts as a click or not Returns true if it does, false otherwise
maxview
Returns the biggest number from client.view so we can do easier maths
on_stat_panel_message
Handles incoming messages from the stat-panel TGUI.
open_escape_menu
Opens the escape menu. Verb, hardcoded to Escape, set in the client skin.
open_particle_editor
opens the particle editor UI for the in_atom object for this client
poll_option_parse
Processes topic data from poll option panel.
Reads through returned form data and assigns data to the option datum, creating a new one if required, before passing it to be saved. Also does some simple error checking to ensure the option will be valid before creation.
poll_parse
Processes topic data from poll management panel.
Reads through returned form data and assigns data to the poll datum, creating a new one if required, before passing it to be saved. Also does some simple error checking to ensure the poll will be valid before creation.
register_map_obj
Registers screen obj with the client, which makes it visible on the assigned map, and becomes a part of the assigned map's lifecycle.
reset_held_keys
Manually clears any held keys, in case due to lag or other undefined behavior a key gets stuck.
Hardcoded to the ESC key.
retrieve_byondacc_data
Retrieves the BYOND accounts data from the BYOND servers
Makes a web request to byond.com to retrieve the details for the BYOND account associated with the clients ckey. Returns the data in a parsed, associative list
send_resources
Send resources to the client. Sends both game resources and browser assets.
setup_popup
Create the popup, and get it ready for generic use by giving it a background.
Width and height are multiplied by 64 by default.
tgui_say_create_open_command
Creates a JSON encoded message to open TGUI say modals properly.
Arguments: channel - The channel to open the modal in. Returns: string - A JSON encoded message to open the modal.
uiclose
verb
Called by UIs when they are closed. Must be a verb so winset() can call it.
required uiref ref The UI that was closed.
view_var_Topic
DO NOT add new branches to view_var_Topic() — this is a legacy dispatcher, kept only for existing handlers.
- For new VV actions on a datum, override /datum/proc/vv_do_topic() in the appropriate type.
- For actions on lists, use /client/proc/vv_do_list().
- For basic operations, use /client/proc/vv_do_basic().
vv_do_basic
Core topics are VV topics which should work even if the code responsible for processing vv topics for that datum is runtiming. They're kept separately from /datum/proc/vv_do_topic for that reason.
vv_do_list
Lists are not /datum objects and therefore lack a Topic() proc. All View‑Variables interactions for lists go through this dedicated handler instead.
vv_subtype_prompt
Do they want you to include subtypes?
Type:
- FALSE = no subtypes, strict exact type pathing (or the type doesn't have subtypes)
- TRUE = Yes subtypes
- NULL = User cancelled at the prompt or invalid type given