mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
port ADMIN_VERB and friends (#30646)
* port ADMIN_VERB and friends * some renaming * dumb * one more rename * never search and replace this codebase * fix TM issues, more renaming * add a static analysis to shore up user verbs * fix double message on roundstart * remove macro we're not using yet * convert remaining playsounds verbs * convert more verbs i missed somehow * why is this a completely different signature than everything else * fix ui_interact arg * fix logging view and others * buncha issues caught in TM * fix mentor tickets ui * fix bug report viewing * moron
This commit is contained in:
@@ -47,16 +47,10 @@
|
||||
log_admin("[key_name(usr)] has rotated \the [src]")
|
||||
href_list["datumrefresh"] = UID()
|
||||
if(href_list[VV_HK_EXPLODE])
|
||||
if(!check_rights(R_DEBUG|R_EVENT))
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_explosion(src)
|
||||
SSuser_verbs.invoke_verb(usr.client, /datum/user_verb/admin_explosion, src)
|
||||
href_list["datumrefresh"] = UID()
|
||||
if(href_list[VV_HK_EMP])
|
||||
if(!check_rights(R_DEBUG|R_EVENT))
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_emp(src)
|
||||
SSuser_verbs.invoke_verb(usr.client, /datum/user_verb/admin_emp, src)
|
||||
href_list["datumrefresh"] = UID()
|
||||
if(href_list[VV_HK_ADDREAGENT]) /* Made on /TG/, credit to them. */
|
||||
if(!check_rights(R_DEBUG|R_ADMIN))
|
||||
|
||||
@@ -33,12 +33,8 @@ GLOBAL_LIST_INIT(role_playtime_requirements, list(
|
||||
))
|
||||
|
||||
// Admin Verbs
|
||||
|
||||
/client/proc/cmd_mentor_check_player_exp() //Allows admins to determine who the newer players are.
|
||||
set category = "Admin"
|
||||
set name = "Check Player Playtime"
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_MENTOR))
|
||||
return
|
||||
/// Allows admins to determine who the newer players are.
|
||||
USER_VERB(check_player_exp, R_ADMIN|R_MOD|R_MENTOR, "Check Player Playtime", "Return a playtime report.", VERB_CATEGORY_ADMIN)
|
||||
var/list/msg = list()
|
||||
msg += "<html><meta charset='utf-8'><head><title>Playtime Report</title></head><body>"
|
||||
var/datum/job/theirjob
|
||||
@@ -69,8 +65,7 @@ GLOBAL_LIST_INIT(role_playtime_requirements, list(
|
||||
msg += "</TR>"
|
||||
|
||||
msg += "</TABLE></BODY></HTML>"
|
||||
src << browse(msg.Join(""), "window=Player_playtime_check")
|
||||
|
||||
client << browse(msg.Join(""), "window=Player_playtime_check")
|
||||
|
||||
/datum/admins/proc/cmd_mentor_show_exp_panel(client/C)
|
||||
if(!C)
|
||||
|
||||
@@ -267,18 +267,15 @@
|
||||
GLOB.empty_playable_ai_cores -= src
|
||||
return ..()
|
||||
|
||||
/client/proc/empty_ai_core_toggle_latejoin()
|
||||
set name = "Toggle AI Core Latejoin"
|
||||
set category = "Admin"
|
||||
|
||||
USER_VERB(empty_ai_core_toggle_latejoin, R_ADMIN, "Toggle AI Core Latejoin", "Toggle AI Core Latejoin", VERB_CATEGORY_ADMIN)
|
||||
var/list/cores = list()
|
||||
for(var/obj/structure/ai_core/deactivated/D in world)
|
||||
cores["[D] ([D.loc.loc])"] = D
|
||||
|
||||
if(!length(cores))
|
||||
to_chat(src, "No deactivated AI cores were found.")
|
||||
to_chat(client, "No deactivated AI cores were found.")
|
||||
|
||||
var/id = input("Which core?", "Toggle AI Core Latejoin", null) as null|anything in cores
|
||||
var/id = input(client, "Which core?", "Toggle AI Core Latejoin", null) as null|anything in cores
|
||||
if(!id) return
|
||||
|
||||
var/obj/structure/ai_core/deactivated/D = cores[id]
|
||||
@@ -286,11 +283,10 @@
|
||||
|
||||
if(D in GLOB.empty_playable_ai_cores)
|
||||
GLOB.empty_playable_ai_cores -= D
|
||||
to_chat(src, "\The [id] is now <font color=\"#ff0000\">not available</font> for latejoining AIs.")
|
||||
to_chat(client, "\The [id] is now <font color=\"#ff0000\">not available</font> for latejoining AIs.")
|
||||
else
|
||||
GLOB.empty_playable_ai_cores += D
|
||||
to_chat(src, "\The [id] is now <font color=\"#008000\">available</font> for latejoining AIs.")
|
||||
|
||||
to_chat(client, "\The [id] is now <font color=\"#008000\">available</font> for latejoining AIs.")
|
||||
|
||||
/*
|
||||
This is a good place for AI-related object verbs so I'm sticking it here.
|
||||
|
||||
@@ -308,14 +308,10 @@
|
||||
setMenuState(ui.user, COMM_SCREEN_ANNOUNCER)
|
||||
|
||||
if("make_other_announcement")
|
||||
if(!ADMIN_CHECK(ui.user))
|
||||
return
|
||||
ui.user.client.cmd_admin_create_centcom_report()
|
||||
SSuser_verbs.invoke_verb(ui.user, /datum/user_verb/create_centcom_report)
|
||||
|
||||
if("dispatch_ert")
|
||||
if(!ADMIN_CHECK(ui.user))
|
||||
return
|
||||
ui.user.client.response_team() // check_rights is handled on the other side, if someone does get ahold of this
|
||||
SSuser_verbs.invoke_verb(ui.user, /datum/user_verb/dispatch_ert)
|
||||
|
||||
if("send_nuke_codes")
|
||||
if(!ADMIN_CHECK(ui.user))
|
||||
@@ -335,19 +331,13 @@
|
||||
SEND_SOUND(ui.user, sound(cc_announcement_sounds[params["sound"]]))
|
||||
|
||||
if("toggle_ert_allowed")
|
||||
if(!ADMIN_CHECK(ui.user))
|
||||
return
|
||||
ui.user.client.toggle_ert_calling()
|
||||
SSuser_verbs.invoke_verb(ui.user, /datum/user_verb/toggle_ert_calling)
|
||||
|
||||
if("view_econ")
|
||||
if(!ADMIN_CHECK(ui.user))
|
||||
return
|
||||
ui.user.client.economy_manager()
|
||||
SSuser_verbs.invoke_verb(ui.user, /datum/user_verb/economy_panel)
|
||||
|
||||
if("view_fax")
|
||||
if(!ADMIN_CHECK(ui.user))
|
||||
return
|
||||
ui.user.client.fax_panel()
|
||||
SSuser_verbs.invoke_verb(ui.user, /datum/user_verb/fax_panel)
|
||||
|
||||
if("make_cc_announcement")
|
||||
if(!ADMIN_CHECK(ui.user))
|
||||
|
||||
@@ -212,12 +212,9 @@
|
||||
for(var/turf/tile in spiral_range_turfs(range, epicenter))
|
||||
tile.ex_act(EXPLODE_HEAVY)
|
||||
|
||||
/client/proc/check_bomb_impacts()
|
||||
set name = "Check Bomb Impact"
|
||||
set category = "Debug"
|
||||
|
||||
var/newmode = alert("Use reactionary explosions?","Check Bomb Impact", "Yes", "No")
|
||||
var/turf/epicenter = get_turf(mob)
|
||||
USER_VERB(check_bomb_impact, R_DEBUG, "Check Bomb Impact", "Test bomb impact ranges.", VERB_CATEGORY_DEBUG)
|
||||
var/newmode = alert(client, "Use reactionary explosions?","Check Bomb Impact", "Yes", "No")
|
||||
var/turf/epicenter = get_turf(client.mob)
|
||||
if(!epicenter)
|
||||
return
|
||||
|
||||
@@ -225,7 +222,7 @@
|
||||
var/heavy = 0
|
||||
var/light = 0
|
||||
var/list/choices = list("Small Bomb","Medium Bomb","Big Bomb","Custom Bomb")
|
||||
var/choice = input("Bomb Size?") in choices
|
||||
var/choice = input(client, "Bomb Size?") in choices
|
||||
switch(choice)
|
||||
if(null)
|
||||
return 0
|
||||
@@ -242,9 +239,9 @@
|
||||
heavy = 5
|
||||
light = 7
|
||||
if("Custom Bomb")
|
||||
dev = input("Devastation range (Tiles):") as num
|
||||
heavy = input("Heavy impact range (Tiles):") as num
|
||||
light = input("Light impact range (Tiles):") as num
|
||||
dev = input(client, "Devastation range (Tiles):") as num
|
||||
heavy = input(client, "Heavy impact range (Tiles):") as num
|
||||
light = input(client, "Light impact range (Tiles):") as num
|
||||
|
||||
var/max_range = max(dev, heavy, light)
|
||||
var/x0 = epicenter.x
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
to_chat(src, msg.Join("<br>"))
|
||||
|
||||
/client/verb/adminwho()
|
||||
set category = "Admin"
|
||||
set category = VERB_CATEGORY_ADMIN
|
||||
set name = "Adminwho"
|
||||
|
||||
var/list/adminmsg = list()
|
||||
|
||||
Reference in New Issue
Block a user