/tg/ Station 13 - Modules - Types — Var Details - Proc Details

new_player

Vars

ineligible_for_rolesUsed to make sure someone doesn't get spammed with messages if they're ineligible for roles.
jobs_menu_mountedUsed to track if the player's jobs menu sent a message saying it successfully mounted.
new_characterFor instant transfer once the round is set up
readyString Values tied to Defines that state whether the new_player is ready to play or not. Do try your best to compare this value directly against the defines for certainty but helper procs do exist in bulkier situations.
spawningReferenced when you want to delete the new_player later on in the code.

Procs

auto_deadmin_on_ready_or_latejoinAuto deadmins an admin when they click to toggle the ready button or join game button in the menu
create_characterCreates, assigns and returns the new_character to spawn as. Assumes a valid mind.assigned_role exists.
handle_player_pollingShows a list of currently running polls a player can vote/has voted on
hide_title_screenRemoves the lobby menu entirely from a mob.
is_ready_to_playQuickly gets a boolean of whether the new_player is ready to play or not in places where we would like the boolean logic. The assertion is that readiness must be an opted in TRUE, while all other states (e.g. not ready, broken, etc) are FALSE. We organize it this way to ensure the system is extensible for other possible ready states.
poll_playerRedirects a player to the correct poll window based on poll type.
poll_player_irvShows voting window for an IRV type poll, listing its options and relevant details.
poll_player_multiShows voting window for a multiple choice type poll, listing its options and relevant details.
poll_player_optionShows voting window for an option type poll, listing its options and relevant details.
poll_player_ratingShows voting window for a rating type poll, listing its options and relevant details.
poll_player_textShows voting window for a text response type poll, listing its relevant details.
readyReadies up for the round
register_for_interviewPrepares a client for the interview system, and provides them with a new interview
server_swapAllows the player to select a server to join from any loaded servers.
show_title_screenShows the lobby menu to a new player. the lobby menu itself already knows how to show/hide based on the client's mob type (see /datum/lobby_menu/proc/update_visibility).
symphony_blocks_playReturn whether the whitelist gate prevents this player from entering the round.
symphony_blocks_play_cachedNon-sleeping admission check: TRUE blocks play, FALSE permits it, and null means uncached. Keeping unknown separate from denied prevents a rejection flash when the cache expires.
symphony_gate_stateResolve admission as open, blocked, or unavailable, preserving the reason for a denial. Uses the whitelist cache and may sleep on a miss. Never call from process().
symphony_validate_readyValidate pending admission before job selection and again immediately before character creation.
symphony_validate_roundstart_transferEquipment and manifest setup can yield after creation; revalidate at the final roundstart transfer.
unreadyUnreadies for the round
update_ready_reportKeeps the job estimation in step with tg's ready report, which runs on every ready toggle, job pref change, character load and logout
vote_on_poll_handlerRuns some poll validation before a vote is processed.
vote_on_poll_irvProcesses vote form data and saves results to the database for an IRV type poll.
vote_on_poll_multiProcesses vote form data and saves results to the database for a multiple choice type poll.
vote_on_poll_optionProcesses vote form data and saves results to the database for an option type poll.
vote_on_poll_ratingProcesses vote form data and saves results to the database for a rating type poll.
vote_on_poll_textProcesses response form data and saves results to the database for a text response type poll.

Var Details

ineligible_for_roles

Used to make sure someone doesn't get spammed with messages if they're ineligible for roles.

jobs_menu_mounted

Used to track if the player's jobs menu sent a message saying it successfully mounted.

new_character

For instant transfer once the round is set up

ready

String Values tied to Defines that state whether the new_player is ready to play or not. Do try your best to compare this value directly against the defines for certainty but helper procs do exist in bulkier situations.

spawning

Referenced when you want to delete the new_player later on in the code.

Proc Details

auto_deadmin_on_ready_or_latejoin

Auto deadmins an admin when they click to toggle the ready button or join game button in the menu

create_character

Creates, assigns and returns the new_character to spawn as. Assumes a valid mind.assigned_role exists.

handle_player_polling

Shows a list of currently running polls a player can vote/has voted on

hide_title_screen

Removes the lobby menu entirely from a mob.

is_ready_to_play

Quickly gets a boolean of whether the new_player is ready to play or not in places where we would like the boolean logic. The assertion is that readiness must be an opted in TRUE, while all other states (e.g. not ready, broken, etc) are FALSE. We organize it this way to ensure the system is extensible for other possible ready states.

poll_player

Redirects a player to the correct poll window based on poll type.

poll_player_irv

Shows voting window for an IRV type poll, listing its options and relevant details.

If already voted on, the options are sorted how a player voted for them, otherwise they are randomly shuffled.

poll_player_multi

Shows voting window for a multiple choice type poll, listing its options and relevant details.

If already voted on, the options a player voted for are pre-selected.

poll_player_option

Shows voting window for an option type poll, listing its options and relevant details.

If already voted on, the option a player voted for is pre-selected.

poll_player_rating

Shows voting window for a rating type poll, listing its options and relevant details.

If already voted on, the options a player voted for are pre-selected.

poll_player_text

Shows voting window for a text response type poll, listing its relevant details.

If already responded to, the saved response of a player is shown.

ready

Readies up for the round

register_for_interview

Prepares a client for the interview system, and provides them with a new interview

This proc will both prepare the user by removing all verbs from them, as well as giving them the interview form and forcing it to appear.

server_swap

Allows the player to select a server to join from any loaded servers.

show_title_screen

Shows the lobby menu to a new player. the lobby menu itself already knows how to show/hide based on the client's mob type (see /datum/lobby_menu/proc/update_visibility).

symphony_blocks_play

Return whether the whitelist gate prevents this player from entering the round.

symphony_blocks_play_cached

Non-sleeping admission check: TRUE blocks play, FALSE permits it, and null means uncached. Keeping unknown separate from denied prevents a rejection flash when the cache expires.

symphony_gate_state

Resolve admission as open, blocked, or unavailable, preserving the reason for a denial. Uses the whitelist cache and may sleep on a miss. Never call from process().

symphony_validate_ready

Validate pending admission before job selection and again immediately before character creation.

symphony_validate_roundstart_transfer

Equipment and manifest setup can yield after creation; revalidate at the final roundstart transfer.

unready

Unreadies for the round

update_ready_report

Keeps the job estimation in step with tg's ready report, which runs on every ready toggle, job pref change, character load and logout

vote_on_poll_handler

Runs some poll validation before a vote is processed.

Checks a player is who they claim to be and that a poll is actually still running. Also loads the vote_id to pass onto single-option and text polls. Increments the vote count when successful.

vote_on_poll_irv

Processes vote form data and saves results to the database for an IRV type poll.

vote_on_poll_multi

Processes vote form data and saves results to the database for a multiple choice type poll.

vote_on_poll_option

Processes vote form data and saves results to the database for an option type poll.

vote_on_poll_rating

Processes vote form data and saves results to the database for a rating type poll.

vote_on_poll_text

Processes response form data and saves results to the database for a text response type poll.