Yogstation 13 - Modules - TypesVar Details - Proc Details

/client

Vars

AI_InteractUsed for admin AI interaction
account_ageAge of byond account in days
account_join_dateDate of byond account creation in ISO 8601 format
admin_music_volumeCopyright (c) 2020 Aleksej Komarov SPDX-License-Identifier: MIT Admin music volume, from 0 to 1.
areaCurrent area of the controlled mob
avgpingAverage ping of the client
ban_cacheUsed to cache this client's bans to save on DB queries
char_render_holdersShould only be a key-value list of north/south/east/west = atom/movable/screen.
click_interceptNeeds to implement InterceptClickOn(user,params,atom) proc
click_intercept_timeTime when the click was intercepted
clicklimiterUsed for limiting the rate of clicks sends by the client to avoid abuse
combo_hud_enabledWhether or not this client has the combo HUD enabled
connection_realtimeworld.realtime they connected
connection_timeworld.time they connected
connection_timeofdayworld.timeofday they connected
crew_manifest_delayrate limiting for the crew manifest
do_parallax_animationsDo we want to do parallax animations at all? Exists to prevent laptop fires
dont_animate_parallaxworld.time of when we can state animate()ing parallax again
holderContains admin info. Null if client is not an admin.
hotkeysWhether or not this client has standard hotkeys enabled
ip_intelUsed for ip intel checking to identify evaders, disabled because of issues with traffic
ircreplyamountInternal counter for clients sending irc relay messages via ahelp to prevent spamming. Set to a number every time an admin reply is sent, decremented for every client send.
key_combos_heldA buffer for combinations such of modifiers + keys (ex: CtrlD, AltE, ShiftT). Format: ["key"] -> ["combo"] (ex: ["D"] -> ["CtrlD"])
keys_heldA buffer of currently held keys.
last_messageContains the last message sent by this client - used to protect against copy-paste spamming.
last_message_countcontins a number of how many times a message identical to last_message was sent.
last_turnlast turn of the controlled mob, I think this is only used by mechs?
lastpingLast ping of the client
mouse_down_iconused to make a special mouse cursor, this one for mouse up icon
mouse_location_refUsed in MouseDrag to preserve the last mouse-entered location. Weakref
mouse_object_refUsed in MouseDrag to preserve the last mouse-entered object. Weakref
mouse_override_iconused to override the mouse cursor so it doesnt get reset
mouse_up_iconused to make a special mouse cursor, this one for mouse up icon
move_delayMove delay of controlled mob, related to input handling
movement_keyscustom movement keys for this client
movement_lockedAre we locking our movement input?
movingmobthis is the last recorded client eye by SSparallax/fire()
next_move_dir_addOn next move, add this dir to the move that would otherwise be done
next_move_dir_subOn next move, subtract this dir from the move that would otherwise be done
panel_tabslist of all tabs
parallax_animate_timerTimer for the area directional animation
parallax_layers_maxHow many parallax layers to show our client
parallax_movedirDirection our current area wants to move parallax
pixel_shiftingAre we trying to pixel-shift
player_ageUsed to determine how old the account is - in days.
player_detailslazy list of all credit object bound to this client these persist between logins/logouts during the same round.
player_join_dateDate that this account was first seen in the server
prefsPlayer preferences datum for the client
recent_examinesA 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
related_accounts_cidSo admins know why it isn't working - Used to determine what other accounts previously logged in from this computer id
related_accounts_ipSo admins know why it isn't working - Used to determine what other accounts previously logged in from this ip
say_slowmodeTracks say() usage for ic/dchat while slowmode is enabled
screen_mapsAssoc list with all the active maps - when a screen obj is added to a map, it's put in here as well.
script!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!HEY LISTEN!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
seen_messagesMessages currently seen by this client
show_verb_panelhides the byond verb panel as we use our own custom version
spell_tabslist of tabs containing spells and abilities
stat_panelStat panel window declaration
stat_tabour current tab
statbrowser_readywhether our browser is ready or not yet
tgui_cache_reloadedglobal
tgui_panelCopyright (c) 2020 Aleksej Komarov SPDX-License-Identifier: MIT
tgui_windowsglobal
tooltipsdatum that controls the displaying and hiding of tooltips
topiclimiterUsed for limiting the rate of topic sends by the client to avoid abuse

Procs

MoveMove a client in a direction
Move_objectforce move the control_object of your client mob
Process_GrabChecks to see if you're being grabbed and if so attempts to break it
Process_IncorpmoveAllows mobs to ignore density and phase through objects
add_system_noteMakes the server note a player
asset_cache_confirm_arrivalProcess asset cache client topic calls for "asset_cache_confirm_arrival=[INT]"
asset_cache_preload_dataProcess asset cache client topic calls for "asset_cache_preload_data=[HTML+JSON_STRING]"
asset_cache_update_jsonUpdates the client side stored json file used to keep track of what assets the client has between restarts/reconnects.
body_chestHidden verb to target the chest, bound to 5
body_eyesHidden verb to target the eyes, bound to 7
body_groinHidden verb to target the groin, bound to 2
body_l_armHidden verb to target the left arm, bound to 6
body_l_legHidden verb to target the left leg, bound to 3
body_mouthHidden verb to target the mouth, bound to 9
body_r_armHidden verb to target the right arm, bound to 4
body_r_legHidden verb to target the right leg, bound to 1
body_toggle_headHidden verb to set the target zone of a mob to the head
browse_queue_flushBlocks 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.
check_drag_proximityHandles 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_has_body_selectValidate the client's mob has a valid zone selected
checkachievementsVerb for opening the achievement viewer
clear_all_mapsClears all the maps of registered screen objects.
clear_mapClears the map of registered screen objects.
clear_screenClears the client's screen, aside from ones that opt out
close_popupCloses a popup.
cmd_admin_create_centcom_reportVerb to open the create command report window and send command reports.
cmd_change_command_nameVerb to change the global command name.
create_popupCreates a popup window with a basic map element in it, without any further initialization.
debug_hallucination_weighted_list_per_typeDebug verb for getting the weight of each distinct type within the random_hallucination_weighted_list
debug_spell_requirementsDebug verb for seeing at a glance what all spells have as set requirements
drop_itemIf your mob is conscious, drop the item in the active hand
dsayOur current command name to swap back to after sending the report. The sound we're going to play on report.
fix_tgui_paneltgui panel / chat troubleshooting verb
get_remaining_daysChecks if this client has met the days requirement passed in, or if they are exempt from it. Returns the number of days left, or 0.
handle_popup_closeWhen the popup closes in any way (player or proc call) it calls this.
init_verbscompiles a full list of verbs and sends it to the browser
is_drag_clickableDoes the logic for checking if a drag counts as a click or not Returns true if it does, false otherwise
load_json_admin_eventLoads JSON event
mfa_backup_queryAsks the user for their backup codes, then resets the login and re-enrolls the user on success
mfa_checkChecks the MFA for the client, then logs them in if they succeed Returns true if login successful, false otherwise The argument is TRUE if the user should be promted, false if not, useful for on login when the client may not be prepared for the query
mfa_check_cacheCheck if the login from this location is from an existing session
mfa_enrollEnrolls a user the in MFA system, assigning them a TOTP seed and backup code
mfa_queryAsks the user for their 2FA code
mfa_query_loginQueries the user for their MFA credentials, then logs them in if they are correct
register_map_objRegisters 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_keysManually clears any held keys, in case due to lag or other undefined behavior a key gets stuck.
send_resourcesSend resources to the client. Sends both game resources and browser assets.
set_tabverbs that send information from the browser UI
setup_popupCreate the popup, and get it ready for generic use by giving it a background.
toggle_walk_runVerb to toggle the walk or run status
uicloseverb
update_special_keybindsUpdates the keybinds for special keys
wikiTHE GENESIS CALL

Var Details

AI_Interact

Used for admin AI interaction

account_age

Age of byond account in days

account_join_date

Date of byond account creation in ISO 8601 format

admin_music_volume

Copyright (c) 2020 Aleksej Komarov SPDX-License-Identifier: MIT Admin music volume, from 0 to 1.

area

Current area of the controlled mob

avgping

Average ping of the client

ban_cache

Used to cache this client's bans to save on DB queries

char_render_holders

Should only be a key-value list of north/south/east/west = atom/movable/screen.

click_intercept

Needs to implement InterceptClickOn(user,params,atom) proc

click_intercept_time

Time when the click was intercepted

clicklimiter

Used for limiting the rate of clicks sends by the client to avoid abuse

combo_hud_enabled

Whether or not this client has the combo HUD enabled

connection_realtime

world.realtime they connected

connection_time

world.time they connected

connection_timeofday

world.timeofday they connected

crew_manifest_delay

rate limiting for the crew manifest

do_parallax_animations

Do we want to do parallax animations at all? Exists to prevent laptop fires

dont_animate_parallax

world.time of when we can state animate()ing parallax again

holder

Contains admin info. Null if client is not an admin.

hotkeys

Whether or not this client has standard hotkeys enabled

ip_intel

Used for ip intel checking to identify evaders, disabled because of issues with traffic

ircreplyamount

Internal counter for clients sending irc relay messages via ahelp to prevent spamming. Set to a number every time an admin reply is sent, decremented for every client send.

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_message

Contains the last message sent by this client - used to protect against copy-paste spamming.

last_message_count

contins a number of how many times a message identical to last_message was sent.

last_turn

last turn of the controlled mob, I think this is only used by mechs?

lastping

Last ping of the client

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, related to input handling

movement_keys

custom movement keys for this client

movement_locked

Are we locking our movement input?

movingmob

this is the last recorded client eye by SSparallax/fire()

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_timer

Timer for the area directional animation

parallax_layers_max

How many parallax layers to show our client

parallax_movedir

Direction our current area wants to move parallax

pixel_shifting

Are we trying to pixel-shift

player_age

Used to determine how old the account is - in days.

player_details

lazy list of all credit object bound to this client these persist between logins/logouts during the same round.

player_join_date

Date that this account was first seen in the server

prefs

Player preferences datum for the client

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

related_accounts_cid

So admins know why it isn't working - Used to determine what other accounts previously logged in from this computer id

related_accounts_ip

So admins know why it isn't working - Used to determine what other accounts previously logged in from this ip

say_slowmode

Tracks say() usage for ic/dchat while slowmode is enabled

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( = list(/atom/movable/screen))

script

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!HEY LISTEN!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

seen_messages

Messages currently seen by this client

show_verb_panel

hides the byond verb panel as we use our own custom version

spell_tabs

list of tabs containing spells and abilities

stat_panel

Stat panel window declaration

stat_tab

our current tab

statbrowser_ready

whether our browser is ready or not yet

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_windows

global

Tracks open windows for a user.

tooltips

datum that controls the displaying and hiding of tooltips

topiclimiter

Used for limiting the rate of topic sends by the client to avoid abuse

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:

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?):

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)

Move_object

force move the control_object of your client mob

Used in admin possession and called from the client Move proc ensures the possessed object moves and not the admin mob

Has no sanity other than checking density

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

You'll note this is another mob living level proc living at the client level

add_system_note

Makes the server note a player

Automatically checks that we haven't noted them with the same system_ckey in the last day, and that their last note is not from that ckey either Arguments:

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.

body_chest

Hidden verb to target the chest, bound to 5

body_eyes

Hidden verb to target the eyes, bound to 7

body_groin

Hidden verb to target the groin, bound to 2

body_l_arm

Hidden verb to target the left arm, bound to 6

body_l_leg

Hidden verb to target the left leg, bound to 3

body_mouth

Hidden verb to target the mouth, bound to 9

body_r_arm

Hidden verb to target the right arm, bound to 4

body_r_leg

Hidden verb to target the right leg, bound to 1

body_toggle_head

Hidden verb to set the target zone of a mob to the head

(bound to 8) - repeated presses toggles through head - eyes - mouth Hidden verb to target the head, bound to 8

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.

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_has_body_select

Validate the client's mob has a valid zone selected

checkachievements

Verb for opening the achievement viewer

Opens the achievement browser for the given client, see /datum/achievement_browser

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

close_popup

Closes a popup.

cmd_admin_create_centcom_report

Verb to open the create command report window and send command reports.

cmd_change_command_name

Verb to change the global command name.

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.

debug_hallucination_weighted_list_per_type

Debug verb for getting the weight of each distinct type within the random_hallucination_weighted_list

debug_spell_requirements

Debug verb for seeing at a glance what all spells have as set requirements

drop_item

If your mob is conscious, drop the item in the active hand

This is a hidden verb, likely for binding with winset for hotkeys

dsay

Our current command name to swap back to after sending the report. The sound we're going to play on report.

fix_tgui_panel

tgui panel / chat troubleshooting verb

get_remaining_days

Checks if this client has met the days requirement passed in, or if they are exempt from it. Returns the number of days left, or 0.

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

load_json_admin_event

Loads JSON event

mfa_backup_query

Asks the user for their backup codes, then resets the login and re-enrolls the user on success

mfa_check

Checks the MFA for the client, then logs them in if they succeed Returns true if login successful, false otherwise The argument is TRUE if the user should be promted, false if not, useful for on login when the client may not be prepared for the query

mfa_check_cache

Check if the login from this location is from an existing session

mfa_enroll

Enrolls a user the in MFA system, assigning them a TOTP seed and backup code

mfa_query

Asks the user for their 2FA code

mfa_query_login

Queries the user for their MFA credentials, then logs them in if they are correct

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.

send_resources

Send resources to the client. Sends both game resources and browser assets.

set_tab

verbs that send information from the browser UI

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.

toggle_walk_run

Verb to toggle the walk or run status

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.

update_special_keybinds

Updates the keybinds for special keys

Handles adding macros for the keys that need it And adding movement keys to the clients movement_keys list At the time of writing this, communication(OOC, Say, IC) require macros Arguments:

wiki

THE GENESIS CALL

THE VERY FIRST LINE OF DM CODE TO EXECUTE Ong this must be done after !!!EVERYTHING!!! else NO IFS ANDS OR BUTS it's a hack, not an example of any sort, and DEFINITELY should NOT be emulated IT JUST HAS TO BE LAST!!!!!! If you want to do something in the initialization pipeline FIRST RTFM IN /code/game/world.dm AND THEN NEVER RETURN TO THIS PLACE

If you're still here, here's an explanation: BYOND loves to tell you about its loving spouse /global But it's actually having a sexy an affair with /static Specifically statics in procs Priority is given to these lines of code in REVERSE order of declaration in the .dme Which is why this file has a funky name So this is what we use to call world.Genesis() It's a nameless, no-op function, because it does absolutely nothing It exists to hold a static var which is initialized to null It's on /world to hide it from reflection Painful right? Good, now you share my suffering Please lock the door on your way out