Goonstation 13 - Modules - TypesVar Details - Proc Details

/datum/player

for client variables and stuff that has to persist between connections

Vars

antag_tokensAntag tokens this person has, null until it's fetched
buildmodebuildmode holder of our client so it doesn't need to get rebuilt every time we reconnect
cached_jobbansCache jobbans here to speed things up massively
ckeythe ckey of the client object that this datum is attached to
claimed_rewardsKeeps track of once-per-round rewards
clientthe client object that this datum is attached to
clients_posposition of client in in global.clients
cloudSavesManager for cloud data and saves
cooldownsa list of cooldowns that has to persist between connections
current_playtimethe total time that this player has been playing the game this round, in 1/10ths of a second
dnrwhether this person set DNR (Do not revive)
idthe ID of the player as provided by the Goonhub API
is_newbeeindicates if this is a player who is new to goonstation
joined_namesreal_names this person has joined as
joined_observerkeep track of whether this player joined round as an observer (blocks them from bank payouts)
keythe key of the client object that this datum is attached to
last_death_timeLast time this person died (used for critter respawns)
last_seentimestamp of when they were last seen
mentorare they a mentor?
perm_adminwhteher this person is a permanent admin
round_join_timethe server time that this player joined the game, in 1/10ths of a second
round_leave_timethe server time that this player left the game, in 1/10ths of a second
rounds_participatedhow many rounds (total) theyve declared ready and joined, null with to differentiate between not set and no participation
rounds_participated_rphow many rounds (rp only) theyve declared ready and joined, null with to differentiate between not set and no participation
rounds_seenhow many rounds (total) theyve joined to at least the lobby in, null to differentiate between not set and not seen
rounds_seen_rphow many rounds (rp only) theyve joined to at least the lobby in, null to differentiate between not set and not seen
see_mentor_pmsdo we want to see mentor pms?
shamecubedto make sure that they cant escape being shamecubed by just reconnecting
tempminwhether this person is a temporary admin (this round only)

Procs

Newsets up vars, caches player stats, adds by_type list entry for this datum
cache_round_statsqueries api to cache stats so its only done once per player per round
cache_round_stats_blockingblocking version of cache_round_stats, queries api to cache stats so its only done once per player per round (please update this proc when adding more player stat vars)
calculate_played_timeadds the calculated playtime (in 1/10ths of a second) to the playtime variable
clear_medalRemoves a medal from this player. Will sleep, make sure the proc calling this is in a spawn etc
disposingremoves by_type list entry for this datum, clears dangling references
get_all_medalsReturns a list of all medals of this player. Will sleep, make sure the proc calling this is in a spawn etc
get_round_statsreturns an assoc list of cached player stats (please update this proc when adding more player stat vars)
get_rounds_participatedreturns the number of rounds that the player has played by joining in at roundstart
get_rounds_seenreturns the number of rounds that the player has at least joined the lobby in
has_medalChecks if this player has a medal. Will sleep, make sure the proc calling this is in a spawn etc
log_join_timesets the join time to the current server time, in 1/10ths of a second
log_leave_timesets the leave time to the current server time, in 1/10ths of a second
record_loginRecord a player login via the API. Sets player ID field for future API use
unlock_medalGives this player a medal. Will not sleep, but does not have a return value. Use unlock_medal_sync if you need to know if it worked
unlock_medal_syncGives this player a medal. Will sleep, make sure the proc calling this is in a spawn etc

Var Details

antag_tokens

Antag tokens this person has, null until it's fetched

buildmode

buildmode holder of our client so it doesn't need to get rebuilt every time we reconnect

cached_jobbans

Cache jobbans here to speed things up massively

ckey

the ckey of the client object that this datum is attached to

claimed_rewards

Keeps track of once-per-round rewards

client

the client object that this datum is attached to

clients_pos

position of client in in global.clients

cloudSaves

Manager for cloud data and saves

cooldowns

a list of cooldowns that has to persist between connections

current_playtime

the total time that this player has been playing the game this round, in 1/10ths of a second

dnr

whether this person set DNR (Do not revive)

id

the ID of the player as provided by the Goonhub API

is_newbee

indicates if this is a player who is new to goonstation

joined_names

real_names this person has joined as

joined_observer

keep track of whether this player joined round as an observer (blocks them from bank payouts)

key

the key of the client object that this datum is attached to

last_death_time

Last time this person died (used for critter respawns)

last_seen

timestamp of when they were last seen

mentor

are they a mentor?

perm_admin

whteher this person is a permanent admin

round_join_time

the server time that this player joined the game, in 1/10ths of a second

round_leave_time

the server time that this player left the game, in 1/10ths of a second

rounds_participated

how many rounds (total) theyve declared ready and joined, null with to differentiate between not set and no participation

rounds_participated_rp

how many rounds (rp only) theyve declared ready and joined, null with to differentiate between not set and no participation

rounds_seen

how many rounds (total) theyve joined to at least the lobby in, null to differentiate between not set and not seen

rounds_seen_rp

how many rounds (rp only) theyve joined to at least the lobby in, null to differentiate between not set and not seen

see_mentor_pms

do we want to see mentor pms?

shamecubed

to make sure that they cant escape being shamecubed by just reconnecting

tempmin

whether this person is a temporary admin (this round only)

Proc Details

New

sets up vars, caches player stats, adds by_type list entry for this datum

cache_round_stats

queries api to cache stats so its only done once per player per round

cache_round_stats_blocking

blocking version of cache_round_stats, queries api to cache stats so its only done once per player per round (please update this proc when adding more player stat vars)

calculate_played_time

adds the calculated playtime (in 1/10ths of a second) to the playtime variable

clear_medal

Removes a medal from this player. Will sleep, make sure the proc calling this is in a spawn etc

disposing

removes by_type list entry for this datum, clears dangling references

get_all_medals

Returns a list of all medals of this player. Will sleep, make sure the proc calling this is in a spawn etc

get_round_stats

returns an assoc list of cached player stats (please update this proc when adding more player stat vars)

get_rounds_participated

returns the number of rounds that the player has played by joining in at roundstart

get_rounds_seen

returns the number of rounds that the player has at least joined the lobby in

has_medal

Checks if this player has a medal. Will sleep, make sure the proc calling this is in a spawn etc

log_join_time

sets the join time to the current server time, in 1/10ths of a second

log_leave_time

sets the leave time to the current server time, in 1/10ths of a second

record_login

Record a player login via the API. Sets player ID field for future API use

unlock_medal

Gives this player a medal. Will not sleep, but does not have a return value. Use unlock_medal_sync if you need to know if it worked

unlock_medal_sync

Gives this player a medal. Will sleep, make sure the proc calling this is in a spawn etc