mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 22:19: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:
@@ -75,14 +75,7 @@
|
||||
log_admin("[key_name(usr)] spawned [amount] x [chosen] at [AREACOORD(usr)]")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Spawn Atom") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/podspawn_atom(object as text)
|
||||
set category = "Debug"
|
||||
set desc = "(atom path) Spawn an atom via supply drop"
|
||||
set name = "Podspawn"
|
||||
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
|
||||
ADMIN_VERB(debug, podspawn_atom, "Spawn an atom typepath via supply drop", R_SPAWN, object as text)
|
||||
var/chosen = pick_closest_path(object)
|
||||
if(!chosen)
|
||||
return
|
||||
@@ -98,27 +91,22 @@
|
||||
//we need to set the admin spawn flag for the spawned items so we do it outside of the podspawn proc
|
||||
var/atom/A = new chosen(pod)
|
||||
A.flags_1 |= ADMIN_SPAWNED_1
|
||||
|
||||
log_admin("[key_name(usr)] pod-spawned [chosen] at [AREACOORD(usr)]")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Podspawn Atom") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/spawn_cargo(object as text)
|
||||
set category = "Debug"
|
||||
set desc = "(atom path) Spawn a cargo crate"
|
||||
set name = "Spawn Cargo"
|
||||
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
|
||||
ADMIN_VERB(debug, spawn_cargo_crate, "Spawn a cargo crate", R_SPAWN, object as text)
|
||||
var/chosen = pick_closest_path(object, make_types_fancy(subtypesof(/datum/supply_pack)))
|
||||
if(!chosen)
|
||||
return
|
||||
var/datum/supply_pack/S = new chosen
|
||||
S.admin_spawned = TRUE
|
||||
S.generate(get_turf(usr))
|
||||
|
||||
log_admin("[key_name(usr)] spawned cargo pack [chosen] at [AREACOORD(usr)]")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Spawn Cargo") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
ADMIN_VERB(debug, toggle_tinted_welding_helmets, "Reduces view range when wearing welding helmets", R_DEBUG)
|
||||
GLOB.tinted_weldhelh = !GLOB.tinted_weldhelh
|
||||
to_chat(world, span_bold("Welding Helmet tinting has been [(GLOB.tinted_weldhelh ? "enabled" : "disabled")]"))
|
||||
log_admin("[key_name(usr)] toggled tinted_weldhelh.")
|
||||
message_admins("[key_name_admin(usr)] toggled tinted_weldhelh.")
|
||||
|
||||
/datum/admins/proc/dynamic_mode_options(mob/user)
|
||||
var/dat = {"
|
||||
@@ -143,9 +131,7 @@
|
||||
|
||||
user << browse(dat, "window=dyn_mode_options;size=900x650")
|
||||
|
||||
/datum/admins/proc/create_or_modify_area()
|
||||
set category = "Debug"
|
||||
set name = "Create or modify area"
|
||||
ADMIN_VERB(debug, create_or_modify_area, "", R_DEBUG)
|
||||
create_area(usr)
|
||||
|
||||
//Kicks all the clients currently in the lobby. The second parameter (kick_only_afk) determins if an is_afk() check is ran, or if all clients are kicked
|
||||
|
||||
Reference in New Issue
Block a user