sound_token 
Vars | |
| 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 |
Procs | |
| 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. |
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.