[MANUAL MIRROR] Refactor /ui_state/new_player_state to what it's designed for (#71959) (#18610)

Refactor /ui_state/new_player_state to what it's designed for (#71959)

`/datum/ui_state/new_player_state` now no longer lets users with R_ADMIN
permission see the UI. Changed `/datum/interview` to return always_state
when an admin watches an interview because it is important there.
`/datum/latejoin_menu` now uses new_player_state instead of its own
solution.

`/datum/ui_state/new_player_state` is designed to let lobby players
interact with the UI, so it does not make sense for it to make a weird
exception for admins too. My theory is that this was an oversight when
this was first implemented, since only `/datum/interview` used this
ui_state. It doesn't and it shouldn't be like this though. Code clarity.

No playerfacing changes.

Co-authored-by: distributivgesetz <distributivgesetz93@gmail.com>
This commit is contained in:
Tastyfish
2023-01-09 13:12:22 -05:00
committed by GitHub
parent 304cd70b39
commit b4d7516657
3 changed files with 7 additions and 10 deletions
+2
View File
@@ -117,6 +117,8 @@
ui.open()
/datum/interview/ui_state(mob/user)
if(check_rights_for(user.client, R_ADMIN))
return GLOB.always_state
return GLOB.new_player_state
/datum/interview/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)