Files
Arrow768 14b6339d5c TGUI Migration (for everything remaining except the hardsuit) (#22404)
```
  - refactor: "Updates the Computer Fabricator to TGUI"
  - refactor: "Updates the Instruments to TGUI"
  - refactor: "Updates the Geo Scanner to TGUI"
  - refactor: "Updates the Stacking Machine to TGUI"
  - refactor: "Updates the Robotics Console to TGUI"
  - refactor: "Updates the Requests Console to TGUI"
  - refactor: "Updates the Synthesizer/Instrument main panel to TGUI"
  - refactor: "Updates the Nuclear Bomb control panel to TGUI"
  - rscadd: "Requests Console messages are now typed (Assistance Request, Supply Request, Information, Reply); the type is shown in the recipient's log, audible alert, and PDA notification."
  - rscadd: "Reconstructs the Synthesizer's Virtual Environment Editor (was broken since added — its NanoUI template never existed). The Custom environment preset that depends on it is gated behind a new musical_config.can_use_custom flag (default off, matching prior behavior)."
  - bugfix: "Fixes the Autolathe UI re-opening after every print job."
  - bugfix: "Fixes the Song Editor's currently-playing line indicator not advancing during playback."
  - bugfix: "Fixes a class of bugs where TGUI windows for the Air Alarm, Portable Turret, Mining Vendor, Mineral Processor, Tank Dispenser, Helm Console, all Chemistry machines, and Suit Cycler would force themselves back open after every action, even when the player had closed them."
  - bugfix: "Fixes the spatial sound system silently dropping every sound that used the 'None' (-1) environment id or a 23-element custom environment list. The validator was rejecting both as invalid, so synthesizer notes played with Custom or None mode produced no audible output at all."
  - admin: "Adds two requests consoles and two fax machines to the bridge on the runtime test map."

```

Claude Opus 4.7 has been used during the creation of this PR

---------

Signed-off-by: Arrow768 <1331699+Arrow768@users.noreply.github.com>
Co-authored-by: Werner <Arrow768@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: Batrachophreno <Batrochophreno@gmail.com>
2026-05-26 17:57:26 +00:00

29 lines
898 B
Plaintext

/datum/instrument_ui/usage_info
name = "Usage Info"
var/datum/sound_player/player
/datum/instrument_ui/usage_info/New(atom/source, datum/sound_player/player)
..()
src.host = source
src.player = player
//This will let you easily monitor when you're going overboard with tempo and sound duration, generally if the bars fill up it is BAD
/datum/instrument_ui/usage_info/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "SongUsageInfo", "Usage Info")
ui.open()
/datum/instrument_ui/usage_info/ui_data(mob/user)
return list(
"channels_left" = GLOB.sound_channels.available_channels.stack.len,
"events_active" = src.player.event_manager.events.len,
"max_channels" = GLOB.sound_channels.channel_ceiling,
"max_events" = GLOB.musical_config.max_events
)
/datum/instrument_ui/usage_info/Destroy()
player = null
return ..()