Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
TobleroneSwordfish committed Mar 22, 2024
2 parents 53f6512 + 3e6c9c3 commit ca1f2bf
Show file tree
Hide file tree
Showing 47 changed files with 527 additions and 77 deletions.
6 changes: 0 additions & 6 deletions _std/macros/antag_popups.dm
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,6 @@
M.Browse(html, "window=antagTips;size=700x450;title=[window_title]")


/client/proc/cmd_admin_antag_popups()
set name = "View Special Role Popups"
SET_ADMIN_CAT(ADMIN_CAT_SERVER)
if (src.holder)
get_singleton(/datum/antagPopups).showPanel()

/mob
///Stores the name of the last antag popup shown to the mob

Expand Down
16 changes: 16 additions & 0 deletions _std/macros/client.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,19 @@
#define DENY_TEMPMIN if(!src.holder || src.holder.tempmin) {boutput(src, SPAN_ADMIN("Only administrators may use this command.")); return}
#define MENTOR_ONLY if(!src.mentor) {boutput(src, SPAN_ADMIN("Only mentors may use this command.")); return}
#define USR_ADMIN_ONLY if(usr?.client && !usr.client.holder) {boutput(usr, SPAN_ADMIN("Only administrators may use this command.")); return}

#ifdef SPACEMAN_DMM //spaceman doesn't like ....... syntax, can't think why
#define CURRENT_PROC_PATH null
#elif defined(OPENDREAM) || DM_VERSION >= 515 //OD has a sane version and byond added it too in 515
#define CURRENT_PROC_PATH __PROC__
#else //aaand then there's 514
#define CURRENT_PROC_PATH .......
#endif

#define SHOW_VERB_DESC do {\
var/procpath/this_proc = CURRENT_PROC_PATH;\
if(usr.client.check_key(KEY_EXAMINE)) {\
boutput(usr, "<span class='helpmsg'>[this_proc.desc || "No verb desc found"]</span>");\
return\
}\
} while(FALSE)
19 changes: 7 additions & 12 deletions _std/vox.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ var/global/datum/voxdbg/VoxDebug = new
SET_ADMIN_CAT(ADMIN_CAT_DEBUG)
set name = "Debug VOX"
set desc = "Fuck me."
SHOW_VERB_DESC

VoxDebug.voxtokens = voxtokens
VoxDebug.voxsounds_flag_sorted = voxsounds_flag_sorted
Expand All @@ -79,10 +80,8 @@ var/global/datum/voxdbg/VoxDebug = new
SET_ADMIN_CAT(ADMIN_CAT_FUN)
set name = "Intercom Help"
set desc = "WOOP WOOP ASS DAY"

if(!isadmin(src))
boutput(src, "Only administrators may use this command.")
return
ADMIN_ONLY
SHOW_VERB_DESC

vox_help(usr)

Expand Down Expand Up @@ -136,9 +135,8 @@ proc/vox_help(var/mob/user)
SET_ADMIN_CAT(ADMIN_CAT_FUN)
set name = "Intercom Announcement"
set desc = "ABOUT THAT BEER I OWED YA, GORDON"
if(!isadmin(src))
boutput(src, "Only administrators may use this command.")
return
ADMIN_ONLY
SHOW_VERB_DESC

vox_reinit_check()

Expand All @@ -156,11 +154,8 @@ proc/vox_help(var/mob/user)
SET_ADMIN_CAT(ADMIN_CAT_FUN)
set name = "Intercom Announcement (Pitch Shifted)"
set desc = "ABOUT that BEER I owed YA, NODROG"
if(!isadmin(src))
boutput(src, "Only administrators may use this command.")
return


ADMIN_ONLY
SHOW_VERB_DESC

vox_reinit_check()

Expand Down
2 changes: 2 additions & 0 deletions code/WorkInProgress/WiresStuff.dm
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ var/global/deathConfettiActive = 0
set name = "Toggle Death Confetti"
set desc = "Toggles the fun confetti effect and sound whenever a mob dies"
ADMIN_ONLY
SHOW_VERB_DESC

deathConfettiActive = !deathConfettiActive

Expand Down Expand Up @@ -222,6 +223,7 @@ var/global/deathConfettiActive = 0
set desc = "A hard reboot is when the game instance outright ends, and the backend server reinitialises it"

ADMIN_ONLY
SHOW_VERB_DESC

var/hardRebootFileExists = fexists(hardRebootFilePath)
var/logMessage = ""
Expand Down
9 changes: 7 additions & 2 deletions code/WorkInProgress/actuallyKeelinsStuff.dm
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,8 @@ Returns:
SET_ADMIN_CAT(ADMIN_CAT_DEBUG)
set name = "Test Cinematic camera"
set desc="Test Cinematic camera"

USR_ADMIN_ONLY
SHOW_VERB_DESC
var/mob/M = usr
var/datum/targetable/cincam/R = new()
M.targeting_ability = R
Expand Down Expand Up @@ -1637,6 +1638,8 @@ Returns:
SET_ADMIN_CAT(ADMIN_CAT_FUN)
set name = "Pixel explosion mode"
set desc = "Enter pixel explosion mode."
USR_ADMIN_ONLY
SHOW_VERB_DESC
alert("Clicking on things will now explode them into pixels!")
pixelmagic(mode == "explode")

Expand Down Expand Up @@ -1748,7 +1751,8 @@ Returns:
SET_ADMIN_CAT(ADMIN_CAT_FUN)
set name = "Turn off pixel explosion mode"
set desc = "Turns off pixel explosion mode."

USR_ADMIN_ONLY
SHOW_VERB_DESC
var/mob/M = usr
if (istype(M.targeting_ability, /datum/targetable/pixelpicker))
var/datum/targetable/pixelpicker/pixel_picker = M.targeting_ability
Expand Down Expand Up @@ -2794,6 +2798,7 @@ Returns:
set popup_menu = 0

ADMIN_ONLY
SHOW_VERB_DESC

var/mob/M = src.mob
if (istype(M))
Expand Down
9 changes: 6 additions & 3 deletions code/WorkInProgress/blueprints.dm
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,8 @@
set name = "Blueprint Create"
set desc = "Allows creation of blueprints of any user."
SET_ADMIN_CAT(ADMIN_CAT_FUN)

USR_ADMIN_ONLY
SHOW_VERB_DESC
var/picked = browse_abcu_blueprints(usr, "Admin Share Blueprint", "Choose a blueprint to print and share!", TRUE)
if (!picked) return
var/obj/printed = new /obj/item/abcu_blueprint_reference(usr, picked, usr)
Expand All @@ -410,7 +411,8 @@
set name = "Blueprint Delete"
set desc = "Allows deletion of blueprints of any user."
SET_ADMIN_CAT(ADMIN_CAT_FUN)

USR_ADMIN_ONLY
SHOW_VERB_DESC
var/deleted = delete_abcu_blueprint(usr, TRUE)
if (!deleted) return
logTheThing(LOG_ADMIN, usr, "[usr] deleted blueprint [deleted["file"]], owned by [deleted["ckey"]].")
Expand All @@ -419,7 +421,8 @@
set name = "Blueprint Dump"
set desc = "Dumps readable HTML blueprint, of any user, to your client folder."
SET_ADMIN_CAT(ADMIN_CAT_DEBUG)

USR_ADMIN_ONLY
SHOW_VERB_DESC
var/picked = browse_abcu_blueprints(usr, "Admin Dump Blueprint", "Choose a blueprint to export.", TRUE)
if (!picked) return

Expand Down
2 changes: 2 additions & 0 deletions code/WorkInProgress/customcritter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2108,6 +2108,8 @@ var/global/datum/critterCreatorHolder/critter_creator_controller = new()
set name = "Critter Creator (WIP)"
SET_ADMIN_CAT(ADMIN_CAT_FUN)
set hidden = 0
ADMIN_ONLY
SHOW_VERB_DESC

var/datum/critterCreator/CR = critter_creator_controller.getCreator(src.mob)
if (CR)
Expand Down
4 changes: 4 additions & 0 deletions code/datums/buildmode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ ABSTRACT_TYPE(/datum/buildmode)
set name = "Reset Build Mode"
set desc = "If your build mode save got screwed up use this to reset it!"
SET_ADMIN_CAT(ADMIN_CAT_SELF)
ADMIN_ONLY
SHOW_VERB_DESC

if(src.buildmode?.is_active)
src.togglebuildmode()
Expand All @@ -247,6 +249,8 @@ ABSTRACT_TYPE(/datum/buildmode)
set name = "Build Mode"
set desc = "Toggle build Mode on/off."
SET_ADMIN_CAT(ADMIN_CAT_SELF)
ADMIN_ONLY
SHOW_VERB_DESC

if(!src.buildmode)
src.buildmode = src.player.get_buildmode()
Expand Down
2 changes: 2 additions & 0 deletions code/datums/controllers/job_controls.dm
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,8 @@ var/datum/job_controller/job_controls
/client/proc/cmd_job_controls()
SET_ADMIN_CAT(ADMIN_CAT_DEBUG)
set name = "Job Controls"
ADMIN_ONLY
SHOW_VERB_DESC

if (job_controls == null) boutput(src, "<h3 class='admin'>UH OH! Shit's broken as fuck!</h3>")
else src.debug_variables(job_controls)
1 change: 1 addition & 0 deletions code/datums/ircbot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ var/global/datum/ircbot/ircbot = new /datum/ircbot()
SET_ADMIN_CAT(ADMIN_CAT_SERVER_TOGGLES)

ADMIN_ONLY
SHOW_VERB_DESC

ircbot.toggleDebug(src)
return 1
Expand Down
1 change: 1 addition & 0 deletions code/datums/tooltip.dm
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ var/global/list/atomTooltips = list()
SET_ADMIN_CAT(ADMIN_CAT_DEBUG)

ADMIN_ONLY
SHOW_VERB_DESC

var/holderCount = 0
var/tooltipCount = 0
Expand Down
3 changes: 3 additions & 0 deletions code/datums/viewport.dm
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@
SET_ADMIN_CAT(ADMIN_CAT_SELF)
set name = "Create Viewport"
ADMIN_ONLY
SHOW_VERB_DESC

var/datum/viewport/viewport = src.mob.create_viewport(VIEWPORT_ID_ADMIN, share_planes=TRUE)
viewport.handler.listens = TRUE
Expand All @@ -217,6 +218,7 @@
SET_ADMIN_CAT(ADMIN_CAT_SELF)
set name = "Create Silent Viewport"
ADMIN_ONLY
SHOW_VERB_DESC

src.mob.create_viewport(VIEWPORT_ID_ADMIN_SILENT, share_planes=TRUE)

Expand All @@ -225,6 +227,7 @@
SET_ADMIN_CAT(ADMIN_CAT_SELF)
set name = "Create Viewport Following"
ADMIN_ONLY
SHOW_VERB_DESC

var/atom/target_atom = pick_ref(src.mob)
if(!target_atom || isturf(target_atom))
Expand Down
2 changes: 2 additions & 0 deletions code/error_handling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ var/global/blame_for_runtimes = FALSE
set popup_menu = 0

ADMIN_ONLY
SHOW_VERB_DESC

if (!cdn)
var/list/viewerResources = list(
Expand All @@ -71,6 +72,7 @@ var/global/blame_for_runtimes = FALSE
set popup_menu = 0

ADMIN_ONLY
SHOW_VERB_DESC
if (global.blame_for_runtimes)
global.blame_for_runtimes = FALSE
boutput(src, SPAN_NOTICE("Aggressive debugging disabled"))
Expand Down
1 change: 1 addition & 0 deletions code/mob/living/silicon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ var/global/list/module_editors = list()
SET_ADMIN_CAT(ADMIN_CAT_PLAYERS)
set popup_menu = 0
ADMIN_ONLY
SHOW_VERB_DESC

if (!istype(M))
boutput(src, SPAN_ALERT("That thing has no module!"))
Expand Down
22 changes: 18 additions & 4 deletions code/modules/admin/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3860,6 +3860,8 @@ var/global/noir = 0
SET_ADMIN_CAT(ADMIN_CAT_SERVER)
set name = "Restart"
set desc= "Restarts the world"
USR_ADMIN_ONLY
SHOW_VERB_DESC

var/confirm = alert("Restart the game world?", "Restart", "Yes", "Cancel")
if(confirm == "Cancel")
Expand All @@ -3884,6 +3886,8 @@ var/global/noir = 0
SET_ADMIN_CAT(ADMIN_CAT_FUN)
set name = "Announce"
set desc="Announce your desires to the world"
USR_ADMIN_ONLY
SHOW_VERB_DESC
var/message = input("Global message to send:", "Admin Announce", null, null) as message
if (message)
if(usr.client.holder.rank != "Coder" && usr.client.holder.rank != "Host")
Expand All @@ -3896,6 +3900,8 @@ var/global/noir = 0
SET_ADMIN_CAT(ADMIN_CAT_SERVER)
set desc="Start the round RIGHT NOW"
set name="Start Now"
USR_ADMIN_ONLY
SHOW_VERB_DESC
if(!ticker)
tgui_alert(usr,"Unable to start the game as it is not set up.")
return
Expand All @@ -3914,7 +3920,8 @@ var/global/noir = 0
SET_ADMIN_CAT(ADMIN_CAT_SERVER)
set desc="Delay the game start"
set name="Delay Round Start"

USR_ADMIN_ONLY
SHOW_VERB_DESC
if (current_state > GAME_STATE_PREGAME)
return tgui_alert(usr,"Too late... The game has already started!")
game_start_delayed = !(game_start_delayed)
Expand All @@ -3934,7 +3941,8 @@ var/global/noir = 0
SET_ADMIN_CAT(ADMIN_CAT_SERVER)
set desc="Delay the server restart"
set name="Delay Round End"

USR_ADMIN_ONLY
SHOW_VERB_DESC
// If the game end is delayed AT ALL, confirm removing the delay
// so that mutiple admins don't end up cancelling their own delays
if (game_end_delayed)
Expand Down Expand Up @@ -4222,6 +4230,7 @@ var/global/noir = 0
set desc = "Select a mob to manage its bioeffects."
set popup_menu = 0
ADMIN_ONLY
SHOW_VERB_DESC

if (isnull(holder.bioeffectmanager))
holder.bioeffectmanager = new
Expand All @@ -4234,6 +4243,7 @@ var/global/noir = 0
set desc = "Select a mob to manage its abilities."
set popup_menu = 0
ADMIN_ONLY
SHOW_VERB_DESC

if (isnull(holder.abilitymanager))
holder.abilitymanager = new
Expand All @@ -4246,7 +4256,7 @@ var/global/noir = 0
set desc = "Select a mob to manage its traits."
set popup_menu = 0
ADMIN_ONLY

SHOW_VERB_DESC
var/list/dat = list()
dat += {"
<html>
Expand Down Expand Up @@ -4329,6 +4339,7 @@ var/global/noir = 0
set desc = "Select a mob to manage its mind's objectives."
set popup_menu = 0
ADMIN_ONLY
SHOW_VERB_DESC

var/list/dat = list()
dat += {"
Expand Down Expand Up @@ -4405,6 +4416,8 @@ var/global/noir = 0
SET_ADMIN_CAT(ADMIN_CAT_UNUSED)
set desc = "Respawn a mob"
set popup_menu = 0
ADMIN_ONLY
SHOW_VERB_DESC
if (!M) return

if (!forced && tgui_alert(src, "Respawn [M]?", "Confirmation", list("Yes", "No")) != "Yes")
Expand Down Expand Up @@ -4433,7 +4446,8 @@ var/global/noir = 0
set name = "Respawn Self"
SET_ADMIN_CAT(ADMIN_CAT_SELF)
set desc = "Respawn yourself"

ADMIN_ONLY
SHOW_VERB_DESC
logTheThing(LOG_ADMIN, src, "respawned themselves.")
logTheThing(LOG_DIARY, src, "respawned themselves.", "admin")
message_admins("[key_name(src)] respawned themselves.")
Expand Down
1 change: 1 addition & 0 deletions code/modules/admin/admin_holder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@
SET_ADMIN_CAT(ADMIN_CAT_SELF)
set name = "Change Admin Preferences"
ADMIN_ONLY
SHOW_VERB_DESC

src.holder.show_pref_window(src.mob)

Expand Down
Loading

0 comments on commit ca1f2bf

Please sign in to comment.