mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 15:08:34 +01:00
View Variables Update (2) (#17946)
* Begin * Begin 2 * move to tsx * fix that UI * fix gib * bunch of fixes * fix this one * Nicer ahelp bot text formatting * clean up all inputs * . * fix MC tab * fix ore spawn * with rare * More filter stuff * Cleaned up world * Fix * ummm * . * fix that * . * Begin * Begin 2 * move to tsx * fix that UI * fix gib * bunch of fixes * fix this one * clean up all inputs * Nicer ahelp bot text formatting * . * fix MC tab * fix ore spawn * with rare * More filter stuff * Cleaned up world * Fix * Added missing props * useContext fix * . --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
A.PlayerNotesLegacy()
|
||||
|
||||
/datum/tgui_module/player_notes/tgui_state(mob/user)
|
||||
return GLOB.tgui_admin_state
|
||||
return ADMIN_STATE(R_ADMIN|R_EVENT|R_DEBUG)
|
||||
|
||||
/datum/tgui_module/player_notes/tgui_fallback(payload)
|
||||
if(..())
|
||||
@@ -107,7 +107,7 @@
|
||||
var/key = null
|
||||
|
||||
/datum/tgui_module/player_notes_info/tgui_state(mob/user)
|
||||
return GLOB.tgui_admin_state
|
||||
return ADMIN_STATE(R_ADMIN|R_EVENT|R_DEBUG)
|
||||
|
||||
/datum/tgui_module/player_notes_info/tgui_fallback(payload)
|
||||
if(..())
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
return data
|
||||
|
||||
/datum/tgui_module/admin_shuttle_controller/tgui_state(mob/user)
|
||||
return GLOB.tgui_admin_state
|
||||
return ADMIN_STATE(R_ADMIN|R_EVENT|R_DEBUG)
|
||||
|
||||
/datum/tgui_module/admin_shuttle_controller/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state)
|
||||
if(..())
|
||||
|
||||
@@ -221,4 +221,4 @@
|
||||
|
||||
/datum/tgui_module/law_manager/admin
|
||||
/datum/tgui_module/law_manager/admin/tgui_state(mob/user)
|
||||
return GLOB.tgui_admin_state
|
||||
return ADMIN_STATE(R_ADMIN|R_EVENT|R_DEBUG)
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
var/obj/machinery/shipsensors/sensors
|
||||
|
||||
/datum/tgui_module/ship/fullmonty/tgui_state(mob/user)
|
||||
return GLOB.tgui_admin_state
|
||||
return ADMIN_STATE(R_ADMIN|R_EVENT|R_DEBUG)
|
||||
|
||||
/datum/tgui_module/ship/fullmonty/New(host, obj/effect/overmap/visitable/ship/new_linked)
|
||||
. = ..()
|
||||
|
||||
@@ -6,12 +6,26 @@
|
||||
/**
|
||||
* tgui state: admin_state
|
||||
*
|
||||
* Checks that the user is an admin, end-of-story.
|
||||
**/
|
||||
* Checks if the user has specific admin permissions.
|
||||
*/
|
||||
|
||||
GLOBAL_DATUM_INIT(tgui_admin_state, /datum/tgui_state/admin_state, new)
|
||||
GLOBAL_DATUM_INIT(admin_states, /alist, alist())
|
||||
GLOBAL_PROTECT(admin_states)
|
||||
|
||||
/datum/tgui_state/admin_state
|
||||
/// The specific admin permissions required for the UI using this state.
|
||||
VAR_FINAL/required_perms = R_ADMIN
|
||||
|
||||
/datum/tgui_state/admin_state/New(required_perms = R_ADMIN)
|
||||
. = ..()
|
||||
src.required_perms = required_perms
|
||||
|
||||
/datum/tgui_state/admin_state/can_use_topic(src_object, mob/user)
|
||||
if(check_rights_for(user.client, R_ADMIN|R_EVENT|R_DEBUG))
|
||||
if(check_rights_for(user.client, required_perms))
|
||||
return STATUS_INTERACTIVE
|
||||
return STATUS_CLOSE
|
||||
|
||||
/datum/tgui_state/admin_state/vv_edit_var(var_name, var_value)
|
||||
if(var_name == NAMEOF(src, required_perms))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user