byond - Modules - TypesVar Details - Proc Details

CMTV

Vars

camera_mobFor convenience, a reference to their camera mob
camera_operatorOur perspective, based on a specific ckey, either found in init or post-join via DCS
current_perspectiveA hardref to the person we are currently watching, with a bunch of signals subscribed.
future_perspectiveA weakref of who we will be switching to after the delay to ensure they can cancel, if they want to.
minimum_screentimeHow long until we should start polling to change perspective excluding mobs dying or other factors that make a mob ineligible based on DCS
next_show_timeHow long our next contestant will be shown for
opted_out_ckeysCkeys that have opted out -> when they opted outs. If within the last 5 minutes, they're excluded
priority_listThe cached list of priority groups for observing. This is used so we can ensure we're only switching perspective if there is someone more interesting to watch instead.
subscribersList of subscriber IDs, retrieved from the cmtv_api endpoint
switch_atThe time that we should switch to our new perspective
temporarily_observing_turfWhile we're currently checking out a different turf, the time remaining till we switch back
to_switch_toWho we should check out when we're finished observing turfs. Can be null, or a hardref to a mob

Procs

change_observed_mobTakes a new mob to observe. If there is already a queued up mob, or a current perspective, they will be notified and dropped. This will become the new perspective in 10 seconds. If set to instant, we immediately switch to observe nothing. If set_showtime is set, the camera will stay on the new perspective for at least this long, unless they die or something.
do_init_chatTo ensure the chat is fully initialised after we nuke it, we wait a bit before sending it an action
get_active_playerFrom the cached priority list, pulls an active player in priority order
get_active_priority_player_listReturns a list of weakrefs of mobs in certain priority groups. Priority 1 are active combatants, Priority 2 are mobs that are active and on the groundmap (except in hijack, where they must just be active) and Priority 3 are mobs that are, at least, active.
get_most_active_listReturns the mob list with the greatest priority. If there are priority 1 mobs, it will return that list, even if there is only one.
handle_new_cameraSets up the camera client, including assigning a new mob, making it widescreen, winsetting() for clarity
handle_new_clientSignal handler for if the client disconnects/rejoins midround
handle_reset_signalGeneric reset handler, will keep the perspective on the old mob till the new one accepts
handle_reset_signal_immediateReset handler that immediately switches perspective to something generic while we wait
handle_roundstartFor events we want to occur at the beginning of the round - eg, when the map becomes actually visible
handle_z_changeSignal handler - it might be dull if a player wanders off to medical on the ship.
is_activeIf a player is still categorised as being active
is_combatantChecks if the latest /datum/cause_data was generated within the given delay_time
reset_perspectiveGeneric signal handler for deaths, nestings, logouts, etc. Immediately queues up a new perspective to be switched to

Var Details

camera_mob

For convenience, a reference to their camera mob

camera_operator

Our perspective, based on a specific ckey, either found in init or post-join via DCS

current_perspective

A hardref to the person we are currently watching, with a bunch of signals subscribed.

future_perspective

A weakref of who we will be switching to after the delay to ensure they can cancel, if they want to.

minimum_screentime

How long until we should start polling to change perspective excluding mobs dying or other factors that make a mob ineligible based on DCS

next_show_time

How long our next contestant will be shown for

opted_out_ckeys

Ckeys that have opted out -> when they opted outs. If within the last 5 minutes, they're excluded

priority_list

The cached list of priority groups for observing. This is used so we can ensure we're only switching perspective if there is someone more interesting to watch instead.

subscribers

List of subscriber IDs, retrieved from the cmtv_api endpoint

switch_at

The time that we should switch to our new perspective

temporarily_observing_turf

While we're currently checking out a different turf, the time remaining till we switch back

to_switch_to

Who we should check out when we're finished observing turfs. Can be null, or a hardref to a mob

Proc Details

change_observed_mob

Takes a new mob to observe. If there is already a queued up mob, or a current perspective, they will be notified and dropped. This will become the new perspective in 10 seconds. If set to instant, we immediately switch to observe nothing. If set_showtime is set, the camera will stay on the new perspective for at least this long, unless they die or something.

do_init_chat

To ensure the chat is fully initialised after we nuke it, we wait a bit before sending it an action

get_active_player

From the cached priority list, pulls an active player in priority order

get_active_priority_player_list

Returns a list of weakrefs of mobs in certain priority groups. Priority 1 are active combatants, Priority 2 are mobs that are active and on the groundmap (except in hijack, where they must just be active) and Priority 3 are mobs that are, at least, active.

get_most_active_list

Returns the mob list with the greatest priority. If there are priority 1 mobs, it will return that list, even if there is only one.

handle_new_camera

Sets up the camera client, including assigning a new mob, making it widescreen, winsetting() for clarity

handle_new_client

Signal handler for if the client disconnects/rejoins midround

handle_reset_signal

Generic reset handler, will keep the perspective on the old mob till the new one accepts

handle_reset_signal_immediate

Reset handler that immediately switches perspective to something generic while we wait

handle_roundstart

For events we want to occur at the beginning of the round - eg, when the map becomes actually visible

handle_z_change

Signal handler - it might be dull if a player wanders off to medical on the ship.

is_active

If a player is still categorised as being active

is_combatant

Checks if the latest /datum/cause_data was generated within the given delay_time

reset_perspective

Generic signal handler for deaths, nestings, logouts, etc. Immediately queues up a new perspective to be switched to