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

sound_token

Vars

cell_trackerCell tracker managing spatial grid cells within range of the source. The wizards say this is the fastest.
falloff_distanceSound falloff distance
falloff_exponentSound falloff
listenersk:v list of mob : sound status
null_soundNull sound for cancelling the sound entirely.
rangeSound maximum range
soundThe master copy of the playing sound.
sound_channelThe channel being used.
sound_durationDuration of the current sound file in deciseconds. Used to wrap offset for looping sounds.
sound_statusStatus of the playing sound
sourceThe atom playing the sound.
start_timeworld.time when the sound started (or when the sound file was last changed). Used to calculate playback offset for new listeners.
volumeSound volume

Procs

add_listenerAdds a listener to the sound.
add_or_update_listenerUpdates the data of a listener, or adds them if they are not present.
calculate_offsetCalculates the offset to give the sound for people who start hearing it mid-play
listener_deafness_updateRespond to TRAIT_DEAF addition/removal
on_cell_client_enteredSignal handler for SPATIAL_GRID_CELL_ENTERED on tracked cells. Adds newly arriving mobs as listeners.
on_cell_client_exitedSignal handler for SPATIAL_GRID_CELL_EXITED on tracked cells. Removes mobs who have left all member cells.
on_enter_areaUpdate env when source is entering new area
player_loginRespond to any mob in the world being logged into. Only adds if the mob is within range.
player_logoutRespond to any cliented mob becoming uncliented
remove_listenerRemove a listener from the sound.
set_listener_statusSet the status of a listener. Does not update the sound.
set_volumeSetter for volume
source_movedIf the sound source moves, update tracked cells then refresh all listener positions.
update_soundLets us update the sound to a new one.
update_tracked_cellsUpdate tracked cells; happens on movement. We need to check if anyone is now out of cell range and kick them out.

Var Details

cell_tracker

Cell tracker managing spatial grid cells within range of the source. The wizards say this is the fastest.

falloff_distance

Sound falloff distance

falloff_exponent

Sound falloff

listeners

k:v list of mob : sound status

null_sound

Null sound for cancelling the sound entirely.

range

Sound maximum range

sound

The master copy of the playing sound.

sound_channel

The channel being used.

sound_duration

Duration of the current sound file in deciseconds. Used to wrap offset for looping sounds.

sound_status

Status of the playing sound

source

The atom playing the sound.

start_time

world.time when the sound started (or when the sound file was last changed). Used to calculate playback offset for new listeners.

volume

Sound volume

Proc Details

add_listener

Adds a listener to the sound.

add_or_update_listener

Updates the data of a listener, or adds them if they are not present.

calculate_offset

Calculates the offset to give the sound for people who start hearing it mid-play

listener_deafness_update

Respond to TRAIT_DEAF addition/removal

on_cell_client_entered

Signal handler for SPATIAL_GRID_CELL_ENTERED on tracked cells. Adds newly arriving mobs as listeners.

on_cell_client_exited

Signal handler for SPATIAL_GRID_CELL_EXITED on tracked cells. Removes mobs who have left all member cells.

on_enter_area

Update env when source is entering new area

player_login

Respond to any mob in the world being logged into. Only adds if the mob is within range.

player_logout

Respond to any cliented mob becoming uncliented

remove_listener

Remove a listener from the sound.

set_listener_status

Set the status of a listener. Does not update the sound.

set_volume

Setter for volume

source_moved

If the sound source moves, update tracked cells then refresh all listener positions.

update_sound

Lets us update the sound to a new one.

update_tracked_cells

Update tracked cells; happens on movement. We need to check if anyone is now out of cell range and kick them out.