Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 1.11 KB

File metadata and controls

26 lines (20 loc) · 1.11 KB

Architecture

Server flow

  1. The server scans the four playlist folders during autorun.
  2. Supported files are added to the client download list with resource.AddSingleFile.
  3. TTTEndRound provides the round result.
  4. The result is mapped to a playlist category.
  5. A random track is selected while avoiding an immediate repeat where possible.
  6. The relative path and display name are sent through frs_play_track.

Client flow

  1. The client receives a relative path and display name.
  2. The file is loaded with sound.PlayFile.
  3. A request identifier prevents older asynchronous callbacks from replacing newer playback.
  4. The persistent frs_volume value is applied to the active channel.
  5. Chat commands expose volume, track information, and stop controls.

Design constraints

  • No networked volume setting is needed; volume is strictly local.
  • Optional TTT2 globals are read defensively through _G.
  • Empty playlists never call math.random with an invalid range.
  • The server file contains server code only, and the client file contains client code only.
  • No external runtime dependency is required.