/tg/ Station 13 - Modules - TypesVar Details - Proc Details

basketball_controller

The basketball controller handles the basketball minigame in progress. It is first created when the first ghost signs up to play.

Vars

away_hoopThe basketball hoop used by away team
away_team_landmarksSpawn points for away team players
away_team_playersList of away team players ckeys
current_mapTemplate picked when the game starts. used for the name and desc reading
game_durationTotal amount of time basketball is played for
home_hoopThe basketball hoop used by home team
home_team_landmarksSpawn points for home team players
home_team_playersList of home team players ckeys
map_deleterMap generation tool that deletes the current map after the game finishes
minigame_playersList of all players ckeys involved in the minigame
referee_landmarkSpawn point for referee (there should only be one spot on minigame map)

Procs

basic_setupCalled when enough players have signed up to fill a setup. DOESN'T NECESSARILY MEAN THE GAME WILL START.
check_signupsFilters inactive player into a different list until they reconnect, and removes players who are no longer ghosts.
create_bodiesCalled when the game is setting up, AFTER map is loaded but BEFORE the game start. Creates and places each body and gives the correct player key
end_gameCleans up the game, resetting variables back to the beginning and removing the map with the generator.
prepare_gameTriggers at beginning of the game when there is a confirmed list of valid, ready players. Creates a 100% ready game that has NOT started (no players in bodies) Followed by start game
start_gameThe game by this point is now all set up, and so we can put people in their bodies.
try_autostartCalled when someone signs up, and sees if there are enough people in the signup list to begin.
victoryCalled after the game is finished. Sends end game notifications to teams and dusts the losers.

Var Details

away_hoop

The basketball hoop used by away team

away_team_landmarks

Spawn points for away team players

away_team_players

List of away team players ckeys

current_map

Template picked when the game starts. used for the name and desc reading

game_duration

Total amount of time basketball is played for

home_hoop

The basketball hoop used by home team

home_team_landmarks

Spawn points for home team players

home_team_players

List of home team players ckeys

map_deleter

Map generation tool that deletes the current map after the game finishes

minigame_players

List of all players ckeys involved in the minigame

referee_landmark

Spawn point for referee (there should only be one spot on minigame map)

Proc Details

basic_setup

Called when enough players have signed up to fill a setup. DOESN'T NECESSARILY MEAN THE GAME WILL START.

Checks for a custom setup, if so gets the required players from that and if not it sets the player requirement to BASKETBALL_MAX_PLAYER_COUNT and generates one IF basic setup starts a game. Checks if everyone signed up is an observer, and is still connected. If people aren't, they're removed from the list. If there aren't enough players post sanity, it aborts. otherwise, it selects enough people for the game and starts preparing the game for real.

check_signups

Filters inactive player into a different list until they reconnect, and removes players who are no longer ghosts.

create_bodies

Called when the game is setting up, AFTER map is loaded but BEFORE the game start. Creates and places each body and gives the correct player key

end_game

Cleans up the game, resetting variables back to the beginning and removing the map with the generator.

prepare_game

Triggers at beginning of the game when there is a confirmed list of valid, ready players. Creates a 100% ready game that has NOT started (no players in bodies) Followed by start game

Does the following:

start_game

The game by this point is now all set up, and so we can put people in their bodies.

try_autostart

Called when someone signs up, and sees if there are enough people in the signup list to begin.

Only checks if everyone is actually valid to start (still connected and an observer) if there are enough players (basic_setup)

victory

Called after the game is finished. Sends end game notifications to teams and dusts the losers.