Skip to content

Commit

Permalink
Admin and Debug Tab QOL (#2956)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
I came here to capitalize cinematic and move Spawn Planet/Ruin to
Admin.game...
fixes "Debug verbs - Disable" from stealing a few admin verbs like
regenerate because they were in the "debug-mapping" list as well as
another default list.
The extra debug verbs are enabled by default but I left in the option to
disable them again.
Organized the tabs a bit. Stuff for running events gets its own tab and
admin preferences are put into normal preferences
<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

#### NEW

![image](https://github.com/shiptest-ss13/Shiptest/assets/86381784/ad981169-1d33-4fd6-a52f-e19d790ee7dc)

![image](https://github.com/shiptest-ss13/Shiptest/assets/86381784/3478954c-c200-420e-9521-bc888c96d5d6)

![image](https://github.com/shiptest-ss13/Shiptest/assets/86381784/aabe073e-9cc2-4ee4-b1de-3f4aeb1e4dae)

![image](https://github.com/shiptest-ss13/Shiptest/assets/86381784/e75a9687-3be1-4d89-b709-809aa8a2cc82)

![image](https://github.com/shiptest-ss13/Shiptest/assets/86381784/f010b688-dfb7-4d95-b8cc-87f63a1a39b1)

![image](https://github.com/shiptest-ss13/Shiptest/assets/86381784/7343471f-bc69-4a8c-8a07-6934863bb5f0)
#### OLD

![image](https://github.com/shiptest-ss13/Shiptest/assets/86381784/bf0b5e04-64f8-4162-9d92-508d72548ce9)

![image](https://github.com/shiptest-ss13/Shiptest/assets/86381784/2ed1cdb3-0bfa-4655-b44e-5b1359cfb924)

![image](https://github.com/shiptest-ss13/Shiptest/assets/86381784/b5591fa3-262e-42a5-8ff6-f67e67f57b17)

![image](https://github.com/shiptest-ss13/Shiptest/assets/86381784/1ec2e476-af28-48ad-bbf2-c26b527601d0)

![image](https://github.com/shiptest-ss13/Shiptest/assets/86381784/e2acf174-cb01-4e3c-824e-ea81957352f3)

![image](https://github.com/shiptest-ss13/Shiptest/assets/86381784/6e97fdf9-206a-4f88-bc17-64cbac99b5ec)

![image](https://github.com/shiptest-ss13/Shiptest/assets/86381784/ff50e2e1-551c-41a5-8ec2-ff6b8ca636c3)

## Why It's Good For The Game

<!-- Please add a short description of why you think these changes would
benefit the game. If you can't justify it in words, it might not be
worth adding. -->

## Changelog

:cl:
admin: Improved the silly little menu, HA HA I have messed up your
muscle memory!! u
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
FalloutFalcon authored Jun 2, 2024
1 parent b9d7efd commit 01b89fb
Show file tree
Hide file tree
Showing 21 changed files with 145 additions and 140 deletions.
2 changes: 1 addition & 1 deletion code/controllers/subsystem/events.dm
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ SUBSYSTEM_DEF(events)
// Why the heck is this here! Took me so damn long to find!
/client/proc/forceEvent()
set name = "Trigger Event"
set category = "Admin.Events"
set category = "Event"

if(!holder ||!check_rights(R_FUN))
return
Expand Down
21 changes: 16 additions & 5 deletions code/modules/admin/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@


/datum/admins/proc/access_news_network() //MARKER
set category = "Admin.Events"
set category = "Event"
set name = "Access Newscaster Network"
set desc = "Allows you to view, add and edit news feeds."

Expand Down Expand Up @@ -700,7 +700,7 @@
////////////////////////////////////////////////////////////////////////////////////////////////ADMIN HELPER PROCS

/datum/admins/proc/spawn_atom(object as text)
set category = "Debug"
set category = "Event.Spawning"
set desc = "(atom path) Spawn an atom"
set name = "Spawn"

Expand Down Expand Up @@ -729,9 +729,9 @@
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 category = "Event.Spawning"
set desc = "(atom path) Spawn an atom via supply drop"
set name = "Podspawn"
set name = "Supply drop spawn"

if(!check_rights(R_SPAWN))
return
Expand All @@ -753,7 +753,7 @@
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 category = "Event.Spawning"
set desc = "(atom path) Spawn a cargo crate"
set name = "Spawn Cargo"

Expand Down Expand Up @@ -1018,3 +1018,14 @@
dat += "Disable footsteps: <a href='?_src_=holder;[HrefToken()];change_lag_switch=[DISABLE_FOOTSTEPS]'><b>[SSlag_switch.measures[DISABLE_FOOTSTEPS] ? "On" : "Off"]</b></a> - <span style='font-size:80%'>trait applies to character</span><br />"
dat += "</body></html>"
usr << browse(dat.Join(), "window=lag_switch_panel;size=420x480")

/datum/admins/proc/view_manifest()
set category = "Admin.Game"
set name = "View Manifest"
set desc = "Opens the Manifest UI."

if(!GLOB.crew_manifest_tgui)
GLOB.crew_manifest_tgui = new /datum/crew_manifest(src)

if(ismob(usr))
GLOB.crew_manifest_tgui.ui_interact(usr)
41 changes: 25 additions & 16 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ GLOBAL_PROTECT(admin_verbs_admin)
/client/proc/overmap_datum_token_manager,
/datum/admins/proc/open_borgopanel,
/client/proc/investigate_show, /*various admintools for investigation. Such as a singulo grief-log*/
/datum/admins/proc/view_manifest
)

GLOBAL_LIST_INIT(admin_verbs_ban, list(
Expand Down Expand Up @@ -121,7 +122,6 @@ GLOBAL_LIST_INIT(admin_verbs_fun, list(
/client/proc/polymorph_all,
/client/proc/show_tip,
/client/proc/smite,
/client/proc/spawn_ruin,
))
GLOBAL_PROTECT(admin_verbs_fun)
GLOBAL_LIST_INIT(admin_verbs_spawn, list(
Expand All @@ -130,7 +130,9 @@ GLOBAL_LIST_INIT(admin_verbs_spawn, list(
/datum/admins/proc/spawn_cargo,
/datum/admins/proc/spawn_objasmob,
/datum/admins/proc/beaker_panel,
/datum/admins/proc/gift
/datum/admins/proc/gift,
/client/proc/spawn_ruin,
/client/proc/spawn_outpost /* Allows admins to spawn a new outpost. */
))
GLOBAL_PROTECT(admin_verbs_spawn)
GLOBAL_LIST_INIT(admin_verbs_server, world.AVerbsServer())
Expand Down Expand Up @@ -169,10 +171,13 @@ GLOBAL_PROTECT(admin_verbs_debug)
/client/proc/cmd_display_del_log,
/client/proc/cmd_display_init_log,
/client/proc/cmd_display_overlay_log,
/client/proc/cmd_admin_grantfullaccess,
/client/proc/cmd_assume_direct_control, //-errorage
/client/proc/cmd_give_direct_control,
/client/proc/getserverlogs, /*for accessing server logs*/
/client/proc/getcurrentlogs, /*for accessing server logs for the current round*/
/client/proc/restart_controller,
/client/proc/enable_debug_verbs,
/client/proc/disable_debug_verbs,
/client/proc/callproc,
/client/proc/callproc_datum,
/client/proc/SDQL2_query,
Expand Down Expand Up @@ -205,12 +210,16 @@ GLOBAL_PROTECT(admin_verbs_debug)
#endif
/datum/admins/proc/create_or_modify_area,
/datum/admins/proc/open_shuttlepanel, /* Opens shuttle manipulator UI */
/client/proc/spawn_outpost, /* Allows admins to spawn a new outpost. */
/datum/admins/proc/open_borgopanel,
/datum/admins/proc/overmap_view, /* Opens HTML overmap viewer UI */
/client/proc/toggle_AI_interact, /*toggle admin ability to interact with machines as an AI*/
/client/proc/toggle_cdn,
/client/proc/check_timer_sources
/client/proc/check_timer_sources,
/client/proc/air_status, //Air things
/client/proc/air_status_loc, //More air things
/client/proc/manipulate_organs,
/client/proc/set_server_fps, //allows you to set the ticklag.
/client/proc/start_singlo,
)
GLOBAL_LIST_INIT(admin_verbs_possess, list(/proc/possess, /proc/release))
GLOBAL_PROTECT(admin_verbs_possess)
Expand Down Expand Up @@ -269,10 +278,9 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list(
/client/proc/Debug2,
/client/proc/reload_admins,
/client/proc/cmd_debug_make_powernets,
/client/proc/startSinglo,
/client/proc/cmd_debug_mob_lists,
/client/proc/cmd_debug_del_all,
/client/proc/enable_debug_verbs,
/client/proc/disable_debug_verbs,
/proc/possess,
/proc/release,
/client/proc/reload_admins,
Expand Down Expand Up @@ -305,7 +313,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
if(rights & R_SERVER)
add_verb(src, GLOB.admin_verbs_server)
if(rights & R_DEBUG)
add_verb(src, GLOB.admin_verbs_debug)
add_verb(src, list(GLOB.admin_verbs_debug, GLOB.admin_verbs_debug_extra))
if(rights & R_POSSESS)
add_verb(src, GLOB.admin_verbs_possess)
if(rights & R_PERMISSIONS)
Expand Down Expand Up @@ -338,7 +346,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
/client/proc/play_web_sound,
GLOB.admin_verbs_spawn,
/*Debug verbs added by "show debug verbs"*/
GLOB.admin_verbs_debug_mapping,
GLOB.admin_verbs_debug_extra,
/client/proc/disable_debug_verbs,
/client/proc/readmin
))
Expand Down Expand Up @@ -505,7 +513,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Stealth Mode") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

/client/proc/drop_bomb()
set category = "Fun"
set category = "Event.Fun"
set name = "Drop Bomb"
set desc = "Cause an explosion of varying strength at your location."

Expand Down Expand Up @@ -547,7 +555,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Drop Bomb") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

/client/proc/drop_dynex_bomb()
set category = "Fun"
set category = "Event.Fun"
set name = "Drop DynEx Bomb"
set desc = "Cause an explosion of varying strength at your location."

Expand Down Expand Up @@ -594,7 +602,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
message_admins("[key_name_admin(usr)] has modified Dynamic Explosion Scale: [ex_scale]")

/client/proc/give_spell(mob/T in GLOB.mob_list)
set category = "Fun"
set category = "Event.Fun"
set name = "Give Spell"
set desc = "Gives a spell to a mob."

Expand All @@ -618,7 +626,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
message_admins("<span class='danger'>Spells given to mindless mobs will not be transferred in mindswap or cloning!</span>")

/client/proc/remove_spell(mob/T in GLOB.mob_list)
set category = "Fun"
set category = "Event.Fun"
set name = "Remove Spell"
set desc = "Remove a spell from the selected mob."

Expand All @@ -631,7 +639,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Remove Spell") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

/client/proc/give_disease(mob/living/T in GLOB.mob_living_list)
set category = "Fun"
set category = "Event.Fun"
set name = "Give Disease"
set desc = "Gives a Disease to a mob."
if(!istype(T))
Expand All @@ -646,7 +654,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] gave [key_name_admin(T)] the disease [D].</span>")

/client/proc/object_say(obj/O in world)
set category = "Admin.Events"
set category = "Event"
set name = "OSay"
set desc = "Makes an object say something."
var/message = input(usr, "What do you want the message to be?", "Make Sound") as text | null
Expand All @@ -656,9 +664,10 @@ GLOBAL_PROTECT(admin_verbs_hideable)
log_admin("[key_name(usr)] made [O] at [AREACOORD(O)] say \"[message]\"")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] made [O] at [AREACOORD(O)]. say \"[message]\"</span>")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Object Say") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

/client/proc/togglebuildmodeself()
set name = "Toggle Build Mode Self"
set category = "Admin.Events"
set category = "Event"
if (!(holder.rank.rights & R_BUILD))
return
if(src.mob)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/verbs/anonymousnames.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/client/proc/anon_names()
set category = "Admin.Events"
set category = "Event"
set name = "Setup Anonymous Names"


Expand Down
4 changes: 2 additions & 2 deletions code/modules/admin/verbs/atmosdebug.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
return list(y + 1 - min(bounds[2], bounds[4]), -(x - 1 - max(bounds[1], bounds[3])))

/client/proc/check_atmos()
set category = "Mapping"
set category = "Debug.Mapping"
set name = "Check Atmospherics Piping"
if(!check_rights_for(src, R_DEBUG))
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
Expand Down Expand Up @@ -54,7 +54,7 @@
return results

/client/proc/check_wiring()
set category = "Mapping"
set category = "Debug.Mapping"
set name = "Check Power"
if(!check_rights_for(src, R_DEBUG))
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/verbs/beakerpanel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
return container

/datum/admins/proc/beaker_panel()
set category = "Admin.Events"
set category = "Event.Spawning"
set name = "Spawn reagent container"
if(!check_rights())
return
Expand Down
4 changes: 2 additions & 2 deletions code/modules/admin/verbs/cinematic.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/client/proc/cinematic()
set name = "cinematic"
set category = "Fun"
set name = "Cinematic"
set category = "Event.Fun"
set desc = "Shows a cinematic." // Intended for testing but I thought it might be nice for events on the rare occasion Feel free to comment it out if it's not wanted.
set hidden = TRUE
if(!SSticker)
Expand Down
Loading

0 comments on commit 01b89fb

Please sign in to comment.