/datum/antagWeighter

Procs | |
calculateWeightings | Queries the goonhub API for hisorical antag rounds for the pool of minds given |
---|---|
choose | Queries the goonhub API for hisorical antag rounds for the pool of minds given Returns a list of minds that haevn't played up to the percentage of antag rounds defined in config |
completeHistory | Get the entire antag selection history for a player (all roles, all modes) |
history | Queries the goonhub API for hisorical antag rounds for a single target NOTE: Currently unused |
record | Records an antag selection for a single player |
recordMultiple | Records multiple antag selections at once, reduces API usage |
simulateHistory | Simulates a history response from the API, so local development doesn't fuck up |
Proc Details
calculateWeightings
Queries the goonhub API for hisorical antag rounds for the pool of minds given
@param string role Name of the antag role we're picking for (e.g. traitor, spy_thief) @param list history List of historical antag data returned by the goonhub API @return list List ckeys sorted by weight (highest weight first)
choose
Queries the goonhub API for hisorical antag rounds for the pool of minds given Returns a list of minds that haevn't played up to the percentage of antag rounds defined in config
@param list pool List of minds under consideration for antag picking @param string role Name of the antag role we're picking for (e.g. traitor, spy_thief) @param int amount Max amount of players to choose for this role @param boolean recordChosen When true, triggers a src.recordMultiple() for the chosen players @return list List of minds chosen
completeHistory
Get the entire antag selection history for a player (all roles, all modes)
@param string ckey Ckey of the person we're looking up @return list List of history details
history
Queries the goonhub API for hisorical antag rounds for a single target NOTE: Currently unused
@param string role Name of the antag role we're looking up (e.g. traitor, spy_thief) @param string ckey Ckey of the person we're looking up @return list List of history details
record
Records an antag selection for a single player
@param string role Name of the antag role we're recording a selection for @param string ckey Ckey of the player @param boolean latejoin Whether this record is a latejoin antag selection @return null
recordMultiple
Records multiple antag selections at once, reduces API usage
@param list players Specially formatted list of players to record selection for. e.g. players = list( "ckeyforadude1" = "traitor", "ckeyforadude2" = "wraith" ) @return null
simulateHistory
Simulates a history response from the API, so local development doesn't fuck up
@param string role Name of the antag role we're looking up (e.g. traitor, spy_thief) @param list ckeyMinds List of minds keyed by ckeys @return list Simulated response