mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
[MIRROR] Refactor /ui_state/new_player_state to what it's designed for [MDB IGNORE] (#18175)
Refactor /ui_state/new_player_state to what it's designed for Co-authored-by: distributivgesetz <distributivgesetz93@gmail.com>
This commit is contained in:
co-authored by
distributivgesetz
parent
dc9294dff2
commit
d12ee8c506
@@ -1,13 +1,10 @@
|
||||
/**
|
||||
* tgui state: new_player_state
|
||||
*
|
||||
* Checks that the user is a new_player, or if user is an admin
|
||||
* Checks that the user is a /mob/dead/new_player
|
||||
*/
|
||||
|
||||
GLOBAL_DATUM_INIT(new_player_state, /datum/ui_state/new_player_state, new)
|
||||
|
||||
/datum/ui_state/new_player_state/can_use_topic(src_object, mob/user)
|
||||
if(isnewplayer(user) || check_rights_for(user.client, R_ADMIN))
|
||||
return UI_INTERACTIVE
|
||||
return UI_CLOSE
|
||||
|
||||
return isnewplayer(user) ? UI_INTERACTIVE : UI_CLOSE
|
||||
|
||||
Reference in New Issue
Block a user