mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 09:08:30 +01:00
Refactors admin verbs from giant ass lists into datums (#72407)
## About The Pull Request See title. ## Why It's Good For The Game Makes it easier for people to add new admin buttons, and also removes the giant ass ugly lists that are an affront to my eyes. Yes you are still able to call them manually via the verb bar   ## Changelog 🆑 refactor: Admin verbs are now datums with a dedicated panel handler admin: Admin verbs now come with a handy description when you hover over them! /🆑 --------- Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
@@ -63,12 +63,12 @@
|
||||
if ("save_circuit")
|
||||
circuit.attempt_save_to(usr.client)
|
||||
if ("vv_circuit")
|
||||
usr.client?.debug_variables(circuit)
|
||||
SSadmin_verbs.dynamic_invoke_admin_verb(usr.client, /mob/admin_module_holder/debug/view_variables, circuit)
|
||||
if ("open_circuit")
|
||||
circuit.ui_interact(usr)
|
||||
if ("open_player_panel")
|
||||
var/datum/mind/inserter = circuit.inserter_mind?.resolve()
|
||||
usr.client?.holder?.show_player_panel(inserter?.current)
|
||||
usr.client?.admin_context_wrapper_context_player_panel(inserter?.current)
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -217,13 +217,7 @@ GLOBAL_LIST_INIT(circuit_dupe_whitelisted_types, list(
|
||||
rel_x = component_data["rel_x"]
|
||||
rel_y = component_data["rel_y"]
|
||||
|
||||
/client/proc/load_circuit()
|
||||
set name = "Load Circuit"
|
||||
set category = "Admin.Fun"
|
||||
|
||||
if(!check_rights(R_VAREDIT))
|
||||
return
|
||||
|
||||
ADMIN_VERB(fun, load_circuit, "", R_VAREDIT)
|
||||
var/list/errors = list()
|
||||
|
||||
var/option = alert(usr, "Load by file or direct input?", "Load by file or string", "File", "Direct Input")
|
||||
@@ -237,10 +231,10 @@ GLOBAL_LIST_INIT(circuit_dupe_whitelisted_types, list(
|
||||
if(!txt)
|
||||
return
|
||||
|
||||
var/obj/item/integrated_circuit/loaded/circuit = new(mob.drop_location())
|
||||
var/obj/item/integrated_circuit/loaded/circuit = new(usr.drop_location())
|
||||
circuit.load_circuit_data(txt, errors)
|
||||
|
||||
if(length(errors))
|
||||
to_chat(src, span_warning("The following errors were found whilst compiling the circuit data:"))
|
||||
to_chat(usr, span_warning("The following errors were found whilst compiling the circuit data:"))
|
||||
for(var/error in errors)
|
||||
to_chat(src, span_warning(error))
|
||||
to_chat(usr, span_warning(error))
|
||||
|
||||
Reference in New Issue
Block a user