mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-18 05:32:58 +00:00
* Admin Verb Datums MkIII | Now with functional command bar (#82511) * Modular stuffs * Put some admin jump verbs back into the context menu | sorts area jump list again (#82647) ## About The Pull Request See title. ## Why It's Good For The Game Some admins wanted all the jump verbs back, aswell as making them not AGhost you. Also make the Jump To Area verb use a sorted list again * Hey what if admins were allowed to use the player panel (#82682) Re-adds the player panel verb to the verb panel. * Controller Overview UI (#82739) * Fixes a minor spelling mistake on the admin panel/verb list (#82747) ## About The Pull Request Corrects `inisimin` to `invisimin`. This addresses #82728, but only fixes one of the two issues mentioned ## Why It's Good For The Game -1 spelling mistake ## Changelog 🆑 spellcheck: 'inisimin' verb corrected to 'invisimin' /🆑 * Player Panel-age (#82757) * Admin Forced Mob Rename and Preference Update (#82715) --------- Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com> Co-authored-by: Useroth <37159550+Useroth@users.noreply.github.com> Co-authored-by: chel <64568243+iliyaxox@users.noreply.github.com>
81 lines
2.6 KiB
Plaintext
81 lines
2.6 KiB
Plaintext
|
|
ADMIN_VERB(view_all_circuits, R_ADMIN, "View All Circuits", "List all circuits in the game.", ADMIN_CATEGORY_GAME)
|
|
var/static/datum/circuit_admin_panel/circuit_admin_panel = new
|
|
circuit_admin_panel.ui_interact(user.mob)
|
|
|
|
/datum/circuit_admin_panel
|
|
|
|
/datum/circuit_admin_panel/ui_static_data(mob/user)
|
|
var/list/data = list()
|
|
data["circuits"] = list()
|
|
|
|
for (var/obj/item/integrated_circuit/circuit as anything in GLOB.integrated_circuits)
|
|
var/datum/mind/inserter = circuit.inserter_mind?.resolve()
|
|
|
|
data["circuits"] += list(list(
|
|
"ref" = REF(circuit),
|
|
"name" = "[circuit.name] in [loc_name(circuit)]",
|
|
"creator" = circuit.get_creator(),
|
|
"has_inserter" = !isnull(inserter),
|
|
))
|
|
|
|
return data
|
|
|
|
/datum/circuit_admin_panel/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
|
|
. = ..()
|
|
if (.)
|
|
return .
|
|
|
|
switch(action)
|
|
if ("disable_circuit_sound")
|
|
CONFIG_SET(flag/disallow_circuit_sounds, !CONFIG_GET(flag/disallow_circuit_sounds))
|
|
message_admins("[key_name_admin(usr)] has toggled all circuit sounds [CONFIG_GET(flag/disallow_circuit_sounds)? "off" : "on"].")
|
|
log_admin("[key_name(usr)] has toggled all circuit sounds [CONFIG_GET(flag/disallow_circuit_sounds)? "off" : "on"].")
|
|
return TRUE
|
|
|
|
if (!istext(params["circuit"]))
|
|
return FALSE
|
|
|
|
var/obj/item/integrated_circuit/circuit = locate(params["circuit"])
|
|
if (!istype(circuit))
|
|
to_chat(usr, span_warning("That circuit no longer exists."))
|
|
return FALSE
|
|
|
|
switch (action)
|
|
if ("duplicate_circuit")
|
|
if (alert(usr, "This will spawn the new circuit at where you are, are you sure?", "Confirm", "Yes", "No") != "Yes")
|
|
return FALSE
|
|
|
|
var/list/errors = list()
|
|
|
|
var/obj/item/integrated_circuit/loaded/new_circuit = new(usr.drop_location())
|
|
new_circuit.load_circuit_data(circuit.convert_to_json(), errors)
|
|
|
|
if (length(errors))
|
|
to_chat(usr, span_warning("Somehow, duplicating the circuit failed:"))
|
|
for (var/error in errors)
|
|
to_chat(usr, span_warning(error))
|
|
if ("follow_circuit")
|
|
usr.client?.admin_follow(circuit)
|
|
if ("save_circuit")
|
|
circuit.attempt_save_to(usr.client)
|
|
if ("vv_circuit")
|
|
usr.client?.debug_variables(circuit)
|
|
if ("open_circuit")
|
|
circuit.ui_interact(usr)
|
|
|
|
if ("open_player_panel")
|
|
var/datum/mind/inserter = circuit.inserter_mind?.resolve()
|
|
SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/show_player_panel, inserter?.current)
|
|
|
|
return TRUE
|
|
|
|
/datum/circuit_admin_panel/ui_state(mob/user)
|
|
return GLOB.admin_state
|
|
|
|
/datum/circuit_admin_panel/ui_interact(mob/user, datum/tgui/ui)
|
|
ui = SStgui.try_update_ui(user, src, ui)
|
|
if(!ui)
|
|
ui = new(user, src, "CircuitAdminPanel")
|
|
ui.open()
|