mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-06-16 11:44:08 +01:00
1718c70f2f
## About The Pull Request So in a recent round I noticed the newscaster UI was acting kind of funky, where two channels seemed to overlap and weirdly pick between the two in unpredictable ways. Looking into it, it seemed that somehow the channels had managed to get their unique IDs to overlap- Oh. https://github.com/tgstation/tgstation/blob/5d3353e7af2b88ab9379d5fb567b24afd8776acd/code/game/machinery/newscaster/newscaster_data.dm#L109-L131 I see. ...I think that code speaks for itself, in how this could've gone wrong. Anyhow, in this pr we entirely ditch this system, and instead make it use an incremental and thus guaranteed to be unique ID. This fixes our issues. While we're here, we also remove the unused `channel_IDs` list, and replace it with the associative lists `network_channels_by_id` and `network_channels_by_name`. This allows us to also stop iterating over every network channel until we find the one with the right name or ID. We also rename some confusing, wrong, or non-standard vars while we're here.