mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 13:39:16 +01:00
next set of admin verbs (#19260)
* next set of admin verbs * invoke * . * a few more * few more * . * few more * some more * move thos * next * some debug verbs * axe the old mod loading * del * is local for some verbs * few more * . * . * . * Add local narrate. * Fixes this Needed to be user.mob, since user is the client and usr was the old user.mob * fixes * . * . * . * . --------- Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
co-authored by
Cameron Lennox
parent
5cf2876a85
commit
89fb9871e0
@@ -60,7 +60,7 @@ ADMIN_VERB(gib_them, (R_ADMIN|R_FUN), "Gib", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CA
|
||||
victim.gib()
|
||||
feedback_add_details("admin_verb","GIB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
ADMIN_VERB(gib_self, R_HOLDER, "Gibself", "Give yourself the same treatment you give others.", "Fun.Do Not")
|
||||
ADMIN_VERB(gib_self, R_HOLDER, "Gibself", "Give yourself the same treatment you give others.", ADMIN_CATEGORY_FUN_DO_NOT)
|
||||
var/confirm = tgui_alert(user, "You sure?", "Confirm", list("Yes", "No"))
|
||||
if(!confirm)
|
||||
return
|
||||
|
||||
@@ -1,23 +1,13 @@
|
||||
//allows right clicking mobs to send an admin PM to their client, forwards the selected mob's client to cmd_admin_pm
|
||||
/client/proc/cmd_admin_pm_context(mob/M in GLOB.mob_list)
|
||||
set category = null
|
||||
set name = "Admin PM Mob"
|
||||
if(!check_rights(R_ADMIN))
|
||||
to_chat(src, span_admin_pm_warning("Error: Admin-PM-Context: Only administrators may use this command."))
|
||||
ADMIN_VERB_ONLY_CONTEXT_MENU(cmd_admin_pm_context, R_ADMIN|R_MOD|R_SERVER|R_EVENT, "Admin PM Mob", mob/M in GLOB.mob_list)
|
||||
if(!ismob(M) || !M.client)
|
||||
return
|
||||
if( !ismob(M) || !M.client )
|
||||
return
|
||||
cmd_admin_pm(M.client,null)
|
||||
user.cmd_admin_pm(M.client, null)
|
||||
feedback_add_details("admin_verb","Admin PM Mob") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
//shows a list of clients we could send PMs to, then forwards our choice to cmd_admin_pm
|
||||
/client/proc/cmd_admin_pm_panel()
|
||||
set category = "Admin"
|
||||
set name = "Admin PM"
|
||||
if(!check_rights(R_ADMIN))
|
||||
to_chat(src, span_admin_pm_warning("Error: Admin-PM-Panel: Only administrators may use this command."))
|
||||
return
|
||||
var/list/client/targets[0]
|
||||
ADMIN_VERB(cmd_admin_pm_panel, R_ADMIN|R_MOD|R_SERVER|R_EVENT, "Admin PM", "Directly message a player.", ADMIN_CATEGORY_MAIN)
|
||||
var/list/client/targets = list()
|
||||
for(var/client/T)
|
||||
if(T.mob)
|
||||
if(isnewplayer(T.mob))
|
||||
@@ -28,10 +18,10 @@
|
||||
targets["[T.mob.real_name](as [T.mob.name]) - [T]"] = T
|
||||
else
|
||||
targets["(No Mob) - [T]"] = T
|
||||
var/target = tgui_input_list(src,"To whom shall we send a message?","Admin PM", sortList(targets))
|
||||
var/target = tgui_input_list(user, "To whom shall we send a message?", "Admin PM", sortList(targets))
|
||||
if(!target) //Admin canceled
|
||||
return
|
||||
cmd_admin_pm(targets[target],null)
|
||||
user.cmd_admin_pm(targets[target], null)
|
||||
feedback_add_details("admin_verb","Admin PM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_ahelp_reply(whom)
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
set desc = "Antagonist OOC"
|
||||
|
||||
var/is_admin = check_rights(R_ADMIN|R_MOD|R_EVENT, show_msg = 0)
|
||||
var/is_antag = usr.mind && usr.mind.special_role
|
||||
var/is_antag = src.mob.mind && src.mob.mind.special_role
|
||||
|
||||
if(!is_antag && !is_admin) // Non-antagonists and non-admins have no business using this.
|
||||
to_chat(usr, span_warning("Sorry, but only certain antagonists or administrators can use this verb."))
|
||||
to_chat(src, span_warning("Sorry, but only certain antagonists or administrators can use this verb."))
|
||||
return
|
||||
|
||||
else if(is_antag && !is_admin) // Is an antag, and not an admin, meaning we need to check if their antag type allows AOOC.
|
||||
var/datum/antagonist/A = get_antag_data(usr.mind.special_role)
|
||||
var/datum/antagonist/A = get_antag_data(src.mob.mind.special_role)
|
||||
if(!A || !A.can_speak_aooc || !A.can_hear_aooc)
|
||||
to_chat(usr, span_warning("Sorry, but your antagonist type is not allowed to speak in AOOC."))
|
||||
to_chat(src, span_warning("Sorry, but your antagonist type is not allowed to speak in AOOC."))
|
||||
return
|
||||
|
||||
msg = sanitize(msg)
|
||||
@@ -24,14 +24,14 @@
|
||||
var/display_name = src.key
|
||||
if(holder)
|
||||
if(holder.fakekey)
|
||||
display_name = usr.client.holder.fakekey
|
||||
display_name = holder.fakekey
|
||||
|
||||
// Name shown to other players. Admins whom are not also antags have their rank displayed.
|
||||
var/player_display = (is_admin && !is_antag) ? "[display_name]([usr.client.holder.rank_names()])" : display_name
|
||||
var/player_display = (is_admin && !is_antag) ? "[display_name]([holder.rank_names()])" : display_name
|
||||
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if(check_rights_for(M.client, R_ADMIN|R_MOD|R_EVENT)) // Staff can see AOOC unconditionally, and with more details.
|
||||
to_chat(M, span_ooc(span_aooc("[create_text_tag("aooc", "Antag-OOC:", M.client)] <EM>[get_options_bar(src, 0, 1, 1)]([admin_jump_link(usr, check_rights_for(M.client, R_HOLDER))]):</EM> " + span_message("[msg]"))))
|
||||
to_chat(M, span_ooc(span_aooc("[create_text_tag("aooc", "Antag-OOC:", M.client)] <EM>[get_options_bar(src, 0, 1, 1)]([admin_jump_link(src.mob, check_rights_for(M.client, R_HOLDER))]):</EM> " + span_message("[msg]"))))
|
||||
else if(M.client) // Players can only see AOOC if observing, or if they are an antag type allowed to use AOOC.
|
||||
var/datum/antagonist/A = null
|
||||
if(M.mind) // Observers don't have minds, but they should still see AOOC.
|
||||
|
||||
@@ -1,32 +1,29 @@
|
||||
/client/proc/atmosscan()
|
||||
set category = "Mapping"
|
||||
set name = "Check Piping"
|
||||
ADMIN_VERB_VISIBILITY(atmosscan, ADMIN_VERB_VISIBLITY_FLAG_LOCALHOST)
|
||||
ADMIN_VERB(atmosscan, R_DEBUG, "Check Piping", "Check all pipes in game (Only use on a test server).", ADMIN_CATEGORY_MAPPING)
|
||||
set background = 1
|
||||
if(!check_rights_for(src, R_HOLDER))
|
||||
return
|
||||
|
||||
feedback_add_details("admin_verb","CP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
if(tgui_alert(src, "WARNING: This command should not be run on a live server. Do you want to continue?", "Check Piping", list("No", "Yes")) != "Yes")
|
||||
if(tgui_alert(user, "WARNING: This command should not be run on a live server. Do you want to continue?", "Check Piping", list("No", "Yes")) != "Yes")
|
||||
return
|
||||
|
||||
to_chat(src, "Checking for disconnected pipes...")
|
||||
to_chat(user, span_debug_info("Checking for disconnected pipes..."))
|
||||
//all plumbing - yes, some things might get stated twice, doesn't matter.
|
||||
for (var/obj/machinery/atmospherics/plumbing in GLOB.machines)
|
||||
if (plumbing.nodealert)
|
||||
to_chat(src, span_filter_adminlog(span_warning("Unconnected [plumbing.name] located at [plumbing.x],[plumbing.y],[plumbing.z] ([get_area(plumbing.loc)])")))
|
||||
to_chat(user, span_filter_adminlog(span_warning("Unconnected [plumbing.name] located at [plumbing.x],[plumbing.y],[plumbing.z] ([get_area(plumbing.loc)])")))
|
||||
|
||||
//Manifolds
|
||||
for (var/obj/machinery/atmospherics/pipe/manifold/pipe in GLOB.machines)
|
||||
if (!pipe.node1 || !pipe.node2 || !pipe.node3)
|
||||
to_chat(src, span_filter_adminlog(span_warning("Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")))
|
||||
to_chat(user, span_filter_adminlog(span_warning("Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")))
|
||||
|
||||
//Pipes
|
||||
for (var/obj/machinery/atmospherics/pipe/simple/pipe in GLOB.machines)
|
||||
if (!pipe.node1 || !pipe.node2)
|
||||
to_chat(src, span_filter_adminlog(span_warning("Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")))
|
||||
to_chat(user, span_filter_adminlog(span_warning("Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")))
|
||||
|
||||
to_chat(src, "Checking for overlapping pipes...")
|
||||
to_chat(user, span_debug_info("Checking for overlapping pipes..."))
|
||||
next_turf:
|
||||
for(var/turf/T in world)
|
||||
for(var/dir in GLOB.cardinal)
|
||||
@@ -36,25 +33,21 @@
|
||||
for(var/connect_type in pipe.connect_types)
|
||||
connect_types[connect_type] += 1
|
||||
if(connect_types[1] > 1 || connect_types[2] > 1 || connect_types[3] > 1)
|
||||
to_chat(src, span_filter_adminlog(span_warning("Overlapping pipe ([pipe.name]) located at [T.x],[T.y],[T.z] ([get_area(T)])")))
|
||||
to_chat(user, span_filter_adminlog(span_warning("Overlapping pipe ([pipe.name]) located at [T.x],[T.y],[T.z] ([get_area(T)])")))
|
||||
continue next_turf
|
||||
to_chat(src, "Done")
|
||||
|
||||
/client/proc/powerdebug()
|
||||
set category = "Mapping"
|
||||
set name = "Check Power"
|
||||
if(!check_rights_for(src, R_HOLDER))
|
||||
return
|
||||
to_chat(user, span_debug_info("Done"))
|
||||
|
||||
ADMIN_VERB_VISIBILITY(powerdebug, ADMIN_VERB_VISIBLITY_FLAG_LOCALHOST)
|
||||
ADMIN_VERB(powerdebug, R_DEBUG, "Check Power", "Checks all powernets (Only use on a test server).", ADMIN_CATEGORY_MAPPING)
|
||||
feedback_add_details("admin_verb","CPOW") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
for (var/datum/powernet/PN in SSmachines.powernets)
|
||||
if (!PN.nodes || !PN.nodes.len)
|
||||
if(PN.cables && (PN.cables.len > 1))
|
||||
var/obj/structure/cable/C = PN.cables[1]
|
||||
to_chat(usr, span_filter_adminlog("Powernet with no nodes! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]"))
|
||||
to_chat(user, span_filter_adminlog("Powernet with no nodes! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]"))
|
||||
|
||||
if (!PN.cables || (PN.cables.len < 10))
|
||||
if(PN.cables && (PN.cables.len > 1))
|
||||
var/obj/structure/cable/C = PN.cables[1]
|
||||
to_chat(usr, span_filter_adminlog("Powernet with fewer than 10 cables! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]"))
|
||||
to_chat(user, span_filter_adminlog("Powernet with fewer than 10 cables! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]"))
|
||||
|
||||
@@ -1,37 +1,27 @@
|
||||
/client/proc/change_human_appearance_admin()
|
||||
set name = "Change Mob Appearance - Admin"
|
||||
set desc = "Allows you to change the mob appearance"
|
||||
set category = "Admin.Events"
|
||||
ADMIN_VERB(change_human_appearance_admin, R_FUN, "Change Mob Appearance - Admin", "Allows you to change the mob appearance.", ADMIN_CATEGORY_EVENTS)
|
||||
var/mob/living/carbon/human/target_human = tgui_input_list(user, "Select mob.", "Change Mob Appearance - Admin", GLOB.human_mob_list)
|
||||
if(!target_human)
|
||||
return
|
||||
|
||||
if(!check_rights(R_FUN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = tgui_input_list(usr, "Select mob.", "Change Mob Appearance - Admin", GLOB.human_mob_list)
|
||||
if(!H) return
|
||||
|
||||
log_and_message_admins("is altering the appearance of [H].")
|
||||
H.change_appearance(APPEARANCE_ALL, usr, check_species_whitelist = 0, state = ADMIN_STATE(R_FUN))
|
||||
log_and_message_admins("is altering the appearance of [target_human].")
|
||||
target_human.change_appearance(APPEARANCE_ALL, usr, check_species_whitelist = 0, state = ADMIN_STATE(R_FUN))
|
||||
feedback_add_details("admin_verb","CHAA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/change_human_appearance_self()
|
||||
set name = "Change Mob Appearance - Self"
|
||||
set desc = "Allows the mob to change its appearance"
|
||||
set category = "Admin.Events"
|
||||
|
||||
if(!check_rights(R_FUN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = tgui_input_list(usr, "Select mob.", "Change Mob Appearance - Self", GLOB.human_mob_list)
|
||||
if(!H) return
|
||||
|
||||
if(!H.client)
|
||||
to_chat(usr, span_filter_warning(" Only mobs with clients can alter their own appearance."))
|
||||
ADMIN_VERB(change_human_appearance_self, R_FUN, "Change Mob Appearance - Self", "Allows the mob to change its appearance.", ADMIN_CATEGORY_EVENTS)
|
||||
var/mob/living/carbon/human/human_target = tgui_input_list(user, "Select mob.", "Change Mob Appearance - Self", GLOB.human_mob_list)
|
||||
if(!human_target)
|
||||
return
|
||||
switch(tgui_alert(usr, "Do you wish for [H] to be allowed to select non-whitelisted races?","Alter Mob Appearance","Yes","No","Cancel"))
|
||||
|
||||
if(!human_target.client)
|
||||
to_chat(human_target, span_filter_warning("Only mobs with clients can alter their own appearance."))
|
||||
return
|
||||
switch(tgui_alert(user, "Do you wish for [human_target] to be allowed to select non-whitelisted races?","Alter Mob Appearance","Yes","No","Cancel"))
|
||||
if("Yes")
|
||||
log_and_message_admins("has allowed [H] to change [H.p_their()] appearance, without whitelisting of races.")
|
||||
H.change_appearance(APPEARANCE_ALL, H, check_species_whitelist = 0)
|
||||
log_and_message_admins("has allowed [human_target] to change [human_target.p_their()] appearance, without whitelisting of races.")
|
||||
human_target.change_appearance(APPEARANCE_ALL, human_target, check_species_whitelist = 0)
|
||||
if("No")
|
||||
log_and_message_admins("has allowed [H] to change [H.p_their()] appearance, with whitelisting of races.")
|
||||
H.change_appearance(APPEARANCE_ALL, H, check_species_whitelist = 1)
|
||||
log_and_message_admins("has allowed [human_target] to change [human_target.p_their()] appearance, with whitelisting of races.")
|
||||
human_target.change_appearance(APPEARANCE_ALL, human_target, check_species_whitelist = 1)
|
||||
feedback_add_details("admin_verb","CMAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
ADMIN_VERB(editappear, R_FUN, "Edit Appearance", "Edit a human's apperance.", ADMIN_CATEGORY_FUN_EVENT_KIT)
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
GLOBAL_VAR_INIT(checked_for_inactives, FALSE)
|
||||
GLOBAL_VAR_INIT(inactive_keys, "None<br>")
|
||||
|
||||
/client/proc/check_customitem_activity()
|
||||
set category = "Admin.Investigate"
|
||||
set name = "Check activity of players with custom items"
|
||||
|
||||
ADMIN_VERB(check_customitem_activity, R_ADMIN|R_MOD|R_SERVER, "Check activity of players with custom items", "Allows you to investigate custom item activity.", ADMIN_CATEGORY_INVESTIGATE)
|
||||
var/dat = span_bold("Inactive players with custom items") + "<br>"
|
||||
dat += "<br>"
|
||||
dat += "The list below contains players with custom items that have not logged\
|
||||
@@ -19,9 +16,9 @@ GLOBAL_VAR_INIT(inactive_keys, "None<br>")
|
||||
dat += "<hr>"
|
||||
dat += "This system was implemented on March 1 2013, and the database a few days before that. Root server access is required to add or disable access to specific custom items.<br>"
|
||||
else
|
||||
dat += "<a href='byond://?src=\ref[src];_src_=holder;[HrefToken()];populate_inactive_customitems=1'>Populate list (requires an active database connection)</a><br>"
|
||||
dat += "<a href='byond://?src=\ref[user];_src_=holder;[HrefToken()];populate_inactive_customitems=1'>Populate list (requires an active database connection)</a><br>"
|
||||
|
||||
var/datum/browser/popup = new(src, "inactive_customitems", "Inactive Custom Items", 600, 480)
|
||||
var/datum/browser/popup = new(user, "inactive_customitems", "Inactive Custom Items", 600, 480)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
@@ -85,4 +82,4 @@ GLOBAL_VAR_INIT(inactive_keys, "None<br>")
|
||||
|
||||
GLOB.checked_for_inactives = TRUE
|
||||
if(C)
|
||||
C.check_customitem_activity()
|
||||
SSadmin_verbs.dynamic_invoke_verb(C, /datum/admin_verb/check_customitem_activity) //Recursively calling ourselves until cancelled or a unique name is given.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ADMIN_VERB(cinematic, R_FUN, "Cinematic", "Show a cinematic to all players.", "Fun.Do Not")
|
||||
ADMIN_VERB(cinematic, R_FUN, "Cinematic", "Show a cinematic to all players.", ADMIN_CATEGORY_FUN_DO_NOT)
|
||||
var/datum/cinematic/choice = tgui_input_list(
|
||||
user,
|
||||
"Chose a cinematic to play to everyone in the server.",
|
||||
|
||||
@@ -1,28 +1,20 @@
|
||||
/client/proc/dsay(msg as text)
|
||||
set category = "Admin.Chat"
|
||||
set name = "Dsay" //Gave this shit a shorter name so you only have to time out "dsay" rather than "dead say" to use it --NeoFite
|
||||
set hidden = 1
|
||||
if(!check_rights_for(src, R_HOLDER))
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
if(!src.mob)
|
||||
return
|
||||
if(prefs.muted & MUTE_DEADCHAT)
|
||||
to_chat(src, span_warning("You cannot send DSAY messages (muted)."))
|
||||
ADMIN_VERB(dsay, R_HOLDER, "Dsay", "Speak to the dead.", ADMIN_CATEGORY_CHAT, msg as text)
|
||||
if(user.prefs.muted & MUTE_DEADCHAT)
|
||||
to_chat(user, span_warning("You cannot send DSAY messages (muted)."))
|
||||
return
|
||||
|
||||
if(!prefs?.read_preference(/datum/preference/toggle/show_dsay))
|
||||
to_chat(src, span_warning("You have deadchat muted."))
|
||||
if(!user.prefs?.read_preference(/datum/preference/toggle/show_dsay))
|
||||
to_chat(user, span_warning("You have deadchat muted."))
|
||||
return
|
||||
|
||||
var/stafftype = uppertext(holder.rank_names())
|
||||
var/stafftype = uppertext(user.holder.rank_names())
|
||||
|
||||
msg = sanitize(msg)
|
||||
log_admin("DSAY: [key_name(src)] : [msg]")
|
||||
log_admin("DSAY: [key_name(user)] : [msg]")
|
||||
|
||||
if (!msg)
|
||||
return
|
||||
|
||||
say_dead_direct(span_name("[stafftype]([src.holder.fakekey ? src.holder.fakekey : src.key])") + " says, " + span_message("\"[msg]\""))
|
||||
say_dead_direct(span_name("[stafftype]([user.holder.fakekey ? user.holder.fakekey : user.key])") + " says, " + span_message("\"[msg]\""))
|
||||
|
||||
feedback_add_details("admin_verb","D") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
+204
-318
@@ -1,85 +1,73 @@
|
||||
/client/proc/Debug2()
|
||||
set category = "Debug.Investigate"
|
||||
set name = "Debug-Game"
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
ADMIN_VERB(Debug2, R_DEBUG, "Debug-Game", "Toggles debug level 2, might be quite spammy.", ADMIN_CATEGORY_DEBUG_INVESTIGATE)
|
||||
if(GLOB.Debug2)
|
||||
GLOB.Debug2 = FALSE
|
||||
message_admins("[key_name(src)] toggled debugging off.")
|
||||
log_admin("[key_name(src)] toggled debugging off.")
|
||||
message_admins("[key_name(user)] toggled debugging off.")
|
||||
log_admin("[key_name(user)] toggled debugging off.")
|
||||
else
|
||||
GLOB.Debug2 = TRUE
|
||||
message_admins("[key_name(src)] toggled debugging on.")
|
||||
log_admin("[key_name(src)] toggled debugging on.")
|
||||
message_admins("[key_name(user)] toggled debugging on.")
|
||||
log_admin("[key_name(user)] toggled debugging on.")
|
||||
|
||||
feedback_add_details("admin_verb","DG2") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
// callproc moved to code/modules/admin/callproc
|
||||
|
||||
/client/proc/simple_DPS()
|
||||
set name = "Simple DPS"
|
||||
set category = "Debug.Investigate"
|
||||
set desc = "Gives a really basic idea of how much hurt something in-hand does."
|
||||
|
||||
ADMIN_VERB(simple_DPS, R_DEBUG, "Simple DPS", "Gives a really basic idea of how much hurt something in-hand does.", ADMIN_CATEGORY_DEBUG_INVESTIGATE)
|
||||
var/obj/item/I = null
|
||||
var/mob/living/user = null
|
||||
if(isliving(usr))
|
||||
user = usr
|
||||
I = user.get_active_hand()
|
||||
if(!I || !istype(I))
|
||||
to_chat(user, span_warning("You need to have something in your active hand, to use this verb."))
|
||||
return
|
||||
var/weapon_attack_speed = user.get_attack_speed(I) / 10
|
||||
var/weapon_damage = I.force
|
||||
var/modified_damage_percent = 1
|
||||
|
||||
for(var/datum/modifier/M in user.modifiers)
|
||||
if(!isnull(M.outgoing_melee_damage_percent))
|
||||
weapon_damage *= M.outgoing_melee_damage_percent
|
||||
modified_damage_percent *= M.outgoing_melee_damage_percent
|
||||
|
||||
if(istype(I, /obj/item/gun))
|
||||
var/obj/item/gun/G = I
|
||||
var/obj/item/projectile/P
|
||||
|
||||
if(istype(I, /obj/item/gun/energy))
|
||||
var/obj/item/gun/energy/energy_gun = G
|
||||
P = new energy_gun.projectile_type()
|
||||
|
||||
else if(istype(I, /obj/item/gun/projectile))
|
||||
var/obj/item/gun/projectile/projectile_gun = G
|
||||
var/obj/item/ammo_casing/ammo = projectile_gun.chambered
|
||||
P = ammo.BB
|
||||
|
||||
else
|
||||
to_chat(user, span_warning("DPS calculation by this verb is not supported for \the [G]'s type. Energy or Ballistic only, sorry."))
|
||||
|
||||
weapon_damage = P.damage
|
||||
weapon_attack_speed = G.fire_delay / 10
|
||||
qdel(P)
|
||||
|
||||
var/DPS = weapon_damage / weapon_attack_speed
|
||||
to_chat(user, span_notice("Damage: [weapon_damage][modified_damage_percent != 1 ? " (Modified by [modified_damage_percent*100]%)":""]"))
|
||||
to_chat(user, span_notice("Attack Speed: [weapon_attack_speed]/s"))
|
||||
to_chat(user, span_notice("\The [I] does <b>[DPS]</b> damage per second."))
|
||||
if(DPS > 0)
|
||||
to_chat(user, span_notice("At your maximum health ([user.getMaxHealth()]), it would take approximately;"))
|
||||
to_chat(user, span_notice("[(user.getMaxHealth() - CONFIG_GET(number/health_threshold_softcrit)) / DPS] seconds to softcrit you. ([CONFIG_GET(number/health_threshold_softcrit)] health)"))
|
||||
to_chat(user, span_notice("[(user.getMaxHealth() - user.get_crit_point()) / DPS] seconds to hardcrit you. ([user.get_crit_point()] health)"))
|
||||
to_chat(user, span_notice("[(user.getMaxHealth() - (-user.getMaxHealth())) / DPS] seconds to kill you. ([(-user.getMaxHealth())] health)"))
|
||||
|
||||
else
|
||||
var/mob/living/user_mob = user.mob
|
||||
if(!istype(user_mob))
|
||||
to_chat(user, span_warning("You need to be a living mob, with hands, and for an object to be in your active hand, to use this verb."))
|
||||
return
|
||||
|
||||
/client/proc/Cell()
|
||||
set category = "Debug.Investigate"
|
||||
set name = "Cell"
|
||||
if(!mob)
|
||||
I = user_mob.get_active_hand()
|
||||
if(!I || !istype(I))
|
||||
to_chat(user, span_warning("You need to have something in your active hand, to use this verb."))
|
||||
return
|
||||
var/turf/T = mob.loc
|
||||
var/weapon_attack_speed = user_mob.get_attack_speed(I) / 10
|
||||
var/weapon_damage = I.force
|
||||
var/modified_damage_percent = 1
|
||||
|
||||
if (!( istype(T, /turf) ))
|
||||
for(var/datum/modifier/M in user_mob.modifiers)
|
||||
if(!isnull(M.outgoing_melee_damage_percent))
|
||||
weapon_damage *= M.outgoing_melee_damage_percent
|
||||
modified_damage_percent *= M.outgoing_melee_damage_percent
|
||||
|
||||
if(istype(I, /obj/item/gun))
|
||||
var/obj/item/gun/G = I
|
||||
var/obj/item/projectile/P
|
||||
|
||||
if(istype(I, /obj/item/gun/energy))
|
||||
var/obj/item/gun/energy/energy_gun = G
|
||||
P = new energy_gun.projectile_type()
|
||||
|
||||
else if(istype(I, /obj/item/gun/projectile))
|
||||
var/obj/item/gun/projectile/projectile_gun = G
|
||||
var/obj/item/ammo_casing/ammo = projectile_gun.chambered
|
||||
P = ammo.BB
|
||||
|
||||
else
|
||||
to_chat(user, span_warning("DPS calculation by this verb is not supported for \the [G]'s type. Energy or Ballistic only, sorry."))
|
||||
|
||||
weapon_damage = P.damage
|
||||
weapon_attack_speed = G.fire_delay / 10
|
||||
qdel(P)
|
||||
|
||||
var/DPS = weapon_damage / weapon_attack_speed
|
||||
to_chat(user, span_notice("Damage: [weapon_damage][modified_damage_percent != 1 ? " (Modified by [modified_damage_percent*100]%)":""]"))
|
||||
to_chat(user, span_notice("Attack Speed: [weapon_attack_speed]/s"))
|
||||
to_chat(user, span_notice("\The [I] does <b>[DPS]</b> damage per second."))
|
||||
if(DPS > 0)
|
||||
to_chat(user, span_notice("At your maximum health ([user_mob.getMaxHealth()]), it would take approximately;"))
|
||||
to_chat(user, span_notice("[(user_mob.getMaxHealth() - CONFIG_GET(number/health_threshold_softcrit)) / DPS] seconds to softcrit you. ([CONFIG_GET(number/health_threshold_softcrit)] health)"))
|
||||
to_chat(user, span_notice("[(user_mob.getMaxHealth() - user_mob.get_crit_point()) / DPS] seconds to hardcrit you. ([user_mob.get_crit_point()] health)"))
|
||||
to_chat(user, span_notice("[(user_mob.getMaxHealth() - (-user_mob.getMaxHealth())) / DPS] seconds to kill you. ([(-user_mob.getMaxHealth())] health)"))
|
||||
|
||||
|
||||
ADMIN_VERB(Cell, R_DEBUG, "Cell", "Display the atmos information of the current cell.", ADMIN_CATEGORY_DEBUG_INVESTIGATE)
|
||||
var/turf/T = get_turf(user.mob)
|
||||
|
||||
if (!(isturf(T)))
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/env = T.return_air()
|
||||
@@ -90,61 +78,48 @@
|
||||
for(var/g in env.gas)
|
||||
t += span_blue("[g]: [env.gas[g]] / [env.gas[g] * R_IDEAL_GAS_EQUATION * env.temperature / env.volume]kPa\n")
|
||||
|
||||
usr.show_message(t, 1)
|
||||
user.mob.show_message(t, 1)
|
||||
feedback_add_details("admin_verb","ASL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_robotize(var/mob/M in GLOB.mob_list)
|
||||
set category = "Fun.Event Kit"
|
||||
set name = "Make Robot"
|
||||
|
||||
ADMIN_VERB_AND_CONTEXT_MENU(cmd_admin_robotize, R_ADMIN|R_EVENT|R_DEBUG, "Make Robot", "Turns the target into a robot.", ADMIN_CATEGORY_FUN_EVENT_KIT, mob/living/carbon/human/target_human in GLOB.human_mob_list)
|
||||
if(!SSticker)
|
||||
tgui_alert_async(usr, "Wait until the game starts")
|
||||
tgui_alert_async(user, "Wait until the game starts")
|
||||
return
|
||||
if(!ishuman(target_human))
|
||||
tgui_alert_async(user, "Invalid mob")
|
||||
return
|
||||
if(ishuman(M))
|
||||
log_admin("[key_name(src)] has robotized [M.key].")
|
||||
spawn(10)
|
||||
M:Robotize()
|
||||
|
||||
else
|
||||
tgui_alert_async(usr, "Invalid mob")
|
||||
|
||||
/client/proc/cmd_admin_animalize(var/mob/M in GLOB.mob_list)
|
||||
set category = "Fun.Event Kit"
|
||||
set name = "Make Simple Animal"
|
||||
log_admin("[key_name(user)] has robotized [target_human.key].")
|
||||
addtimer(CALLBACK(target_human, TYPE_PROC_REF(/mob/living/carbon/human, Robotize)), 1 SECOND, TIMER_DELETE_ME)
|
||||
|
||||
ADMIN_VERB_AND_CONTEXT_MENU(cmd_admin_animalize, R_ADMIN|R_EVENT|R_DEBUG, "Make Simple Animal", "Spawns a new player directly as animal.", ADMIN_CATEGORY_FUN_EVENT_KIT, mob/target_mob in GLOB.mob_list)
|
||||
if(!SSticker)
|
||||
tgui_alert_async(usr, "Wait until the game starts")
|
||||
tgui_alert_async(user, "Wait until the game starts")
|
||||
return
|
||||
|
||||
if(!M)
|
||||
tgui_alert_async(usr, "That mob doesn't seem to exist, close the panel and try again.")
|
||||
if(!target_mob)
|
||||
tgui_alert_async(user, "That mob doesn't seem to exist, close the panel and try again.")
|
||||
return
|
||||
|
||||
if(isnewplayer(M))
|
||||
tgui_alert_async(usr, "The mob must not be a new_player.")
|
||||
if(isnewplayer(target_mob))
|
||||
tgui_alert_async(user, "The mob must not be a new_player.")
|
||||
return
|
||||
|
||||
log_admin("[key_name(src)] has animalized [M.key].")
|
||||
spawn(10)
|
||||
M.Animalize(usr)
|
||||
log_admin("[key_name(user)] has animalized [target_mob.key].")
|
||||
addtimer(CALLBACK(target_mob, TYPE_PROC_REF(/mob, Animalize)), 1 SECOND, TIMER_DELETE_ME)
|
||||
|
||||
|
||||
/client/proc/makepAI()
|
||||
set category = "Fun.Event Kit"
|
||||
set name = "Make pAI"
|
||||
set desc = "Spawn someone in as a pAI!"
|
||||
if(!check_rights(R_ADMIN|R_EVENT|R_DEBUG))
|
||||
return
|
||||
var/turf/T = get_turf(mob)
|
||||
ADMIN_VERB(makepAI, R_ADMIN|R_EVENT|R_DEBUG, "Make pAI", "Spawn someone in as a pAI!", ADMIN_CATEGORY_FUN_EVENT_KIT)
|
||||
var/turf/target_turf = get_turf(user.mob)
|
||||
|
||||
var/list/available = list()
|
||||
for(var/mob/C in GLOB.mob_list)
|
||||
if(C.key && isobserver(C))
|
||||
available.Add(C)
|
||||
var/mob/choice = tgui_input_list(usr, "Choose a player to play the pAI", "Spawn pAI", available)
|
||||
for(var/mob/current_client in GLOB.mob_list)
|
||||
if(current_client.key && isobserver(current_client))
|
||||
available += current_client
|
||||
var/mob/choice = tgui_input_list(user, "Choose a player to play the pAI", "Spawn pAI", available)
|
||||
if(!choice)
|
||||
return 0
|
||||
var/obj/item/paicard/typeb/card = new(T)
|
||||
return
|
||||
|
||||
var/obj/item/paicard/typeb/card = new(target_turf)
|
||||
var/mob/living/silicon/pai/pai = new(card)
|
||||
pai.real_name = pai.name
|
||||
pai.key = choice.key
|
||||
@@ -152,67 +127,52 @@
|
||||
if(tgui_alert(pai, "Do you want to load your pAI data?", "Load", list("Yes", "No")) == "Yes")
|
||||
pai.apply_preferences(pai.client)
|
||||
else
|
||||
pai.name = sanitizeSafe(tgui_input_text(pai, "Enter your pAI name:", "pAI Name", "Personal AI", encode = FALSE))
|
||||
log_admin("made a pAI with key=[pai.key] at ([T.x],[T.y],[T.z])")
|
||||
var/new_name = sanitizeName(tgui_input_text(pai, "Enter your pAI name:", "pAI Name", "Personal AI", encode = FALSE), allow_numbers = TRUE)
|
||||
if(new_name)
|
||||
pai.name = new_name
|
||||
log_admin("made a pAI with key=[pai.key] at ([target_turf.x],[target_turf.y],[target_turf.z])")
|
||||
feedback_add_details("admin_verb","MPAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_alienize(var/mob/M in GLOB.mob_list)
|
||||
set category = "Fun.Event Kit"
|
||||
set name = "Make Alien"
|
||||
|
||||
ADMIN_VERB_AND_CONTEXT_MENU(cmd_admin_alienize, R_ADMIN|R_EVENT|R_DEBUG, "Make Alien", "Turns the target into an alien.", ADMIN_CATEGORY_FUN_EVENT_KIT, mob/living/carbon/human/target_human in GLOB.human_mob_list)
|
||||
if(!SSticker)
|
||||
tgui_alert_async(usr, "Wait until the game starts")
|
||||
tgui_alert_async(user, "Wait until the game starts")
|
||||
return
|
||||
if(!ishuman(target_human))
|
||||
tgui_alert_async(user, "Invalid mob")
|
||||
return
|
||||
if(ishuman(M))
|
||||
log_admin("[key_name(src)] has alienized [M.key].")
|
||||
spawn(10)
|
||||
M:Alienize()
|
||||
feedback_add_details("admin_verb","MKAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] made [key_name(M)] into an alien.")
|
||||
message_admins(span_notice("[key_name_admin(usr)] made [key_name(M)] into an alien."), 1)
|
||||
else
|
||||
tgui_alert_async(usr, "Invalid mob")
|
||||
|
||||
log_admin("[key_name(user)] has alienized [target_human.key].")
|
||||
addtimer(CALLBACK(target_human, TYPE_PROC_REF(/mob/living/carbon/human, Alienize)), 1 SECOND, TIMER_DELETE_ME)
|
||||
feedback_add_details("admin_verb","MKAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(user)] made [key_name(target_human)] into an alien.")
|
||||
message_admins(span_notice("[key_name_admin(user)] made [key_name(target_human)] into an alien."))
|
||||
|
||||
//TODO: merge the vievars version into this or something maybe mayhaps
|
||||
/client/proc/cmd_debug_del_all()
|
||||
set category = "Debug.Dangerous"
|
||||
set name = "Del-All"
|
||||
|
||||
ADMIN_VERB(cmd_debug_del_all, R_SERVER, "Del-All", "DANGER: Deletes all instances of a type.", ADMIN_CATEGORY_DEBUG_DANGEROUS)
|
||||
// to prevent REALLY stupid deletions
|
||||
var/blocked = list(/obj, /mob, /mob/living, /mob/living/carbon, /mob/living/carbon/human, /mob/observer/dead, /mob/living/silicon, /mob/living/silicon/robot, /mob/living/silicon/ai)
|
||||
var/hsbitem = tgui_input_list(usr, "Choose an object to delete.", "Delete:", typesof(/obj) + typesof(/mob) - blocked)
|
||||
var/hsbitem = tgui_input_list(user, "Choose an object to delete.", "Delete:", typesof(/obj) + typesof(/mob) - blocked)
|
||||
if(hsbitem)
|
||||
for(var/atom/O in world)
|
||||
if(istype(O, hsbitem))
|
||||
qdel(O)
|
||||
log_admin("[key_name(src)] has deleted all instances of [hsbitem].")
|
||||
message_admins("[key_name_admin(src)] has deleted all instances of [hsbitem].", 0)
|
||||
log_admin("[key_name(user)] has deleted all instances of [hsbitem].")
|
||||
message_admins("[key_name_admin(user)] has deleted all instances of [hsbitem].", 0)
|
||||
feedback_add_details("admin_verb","DELA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_debug_make_powernets()
|
||||
set category = "Debug.Dangerous"
|
||||
set name = "Make Powernets"
|
||||
ADMIN_VERB(cmd_debug_make_powernets, R_DEBUG, "Make Powernets", "Rebuild all powernets.", ADMIN_CATEGORY_DEBUG_DANGEROUS)
|
||||
SSmachines.makepowernets()
|
||||
log_admin("[key_name(src)] has remade the powernet. SSmachines.makepowernets() called.")
|
||||
message_admins("[key_name_admin(src)] has remade the powernets. SSmachines.makepowernets() called.", 0)
|
||||
log_admin("[key_name(user)] has remade the powernet. SSmachines.makepowernets() called.")
|
||||
message_admins("[key_name_admin(user)] has remade the powernets. SSmachines.makepowernets() called.")
|
||||
feedback_add_details("admin_verb","MPWN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_debug_tog_aliens()
|
||||
set category = "Server.Game"
|
||||
set name = "Toggle Aliens"
|
||||
|
||||
ADMIN_VERB(cmd_debug_tog_aliens, R_DEBUG, "Toggle Aliens", "Toggle if aliens are allowed.", ADMIN_CATEGORY_SERVER_GAME)
|
||||
CONFIG_SET(flag/aliens_allowed, !CONFIG_GET(flag/aliens_allowed))
|
||||
log_admin("[key_name(src)] has turned aliens [CONFIG_GET(flag/aliens_allowed) ? "on" : "off"].")
|
||||
message_admins("[key_name_admin(src)] has turned aliens [CONFIG_GET(flag/aliens_allowed) ? "on" : "off"].", 0)
|
||||
log_admin("[key_name(user)] has turned aliens [CONFIG_GET(flag/aliens_allowed) ? "on" : "off"].")
|
||||
message_admins("[key_name_admin(user)] has turned aliens [CONFIG_GET(flag/aliens_allowed) ? "on" : "off"].")
|
||||
feedback_add_details("admin_verb","TAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_display_del_log()
|
||||
set category = "Debug.Investigate"
|
||||
set name = "Display del() Log"
|
||||
set desc = "Display del's log of everything that's passed through it."
|
||||
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
ADMIN_VERB(cmd_display_del_log, R_DEBUG, "Display del() Log", "Display del's log of everything that's passed through it.", ADMIN_CATEGORY_DEBUG_INVESTIGATE)
|
||||
var/list/dellog = list(span_bold("List of things that have gone through qdel this round") + "<BR><BR><ol>")
|
||||
sortTim(SSgarbage.items, cmp=/proc/cmp_qdel_item_time, associative = TRUE)
|
||||
for(var/path in SSgarbage.items)
|
||||
@@ -235,26 +195,14 @@
|
||||
|
||||
dellog += "</ol>"
|
||||
|
||||
usr << browse("<html>[dellog.Join()]</html>", "window=dellog")
|
||||
user << browse("<html>[dellog.Join()]</html>", "window=dellog")
|
||||
|
||||
/client/proc/cmd_display_init_log()
|
||||
set category = "Debug.Investigate"
|
||||
set name = "Display Initialize() Log"
|
||||
set desc = "Displays a list of things that didn't handle Initialize() properly"
|
||||
ADMIN_VERB(cmd_display_init_log, R_DEBUG, "Display Initialize() Log", "Displays a list of things that didn't handle Initialize() properly.", ADMIN_CATEGORY_DEBUG_INVESTIGATE)
|
||||
user << browse("<html>[replacetext(SSatoms.InitLog(), "\n", "<br>")]</html>", "window=initlog")
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
src << browse("<html>[replacetext(SSatoms.InitLog(), "\n", "<br>")]</html>", "window=initlog")
|
||||
ADMIN_VERB(cmd_display_overlay_log, R_DEBUG, "Display overlay Log", "Display SSoverlays log of everything that's passed through it.", ADMIN_CATEGORY_DEBUG_INVESTIGATE)
|
||||
render_stats(SSoverlays.stats, user)
|
||||
|
||||
/*
|
||||
/client/proc/cmd_display_overlay_log()
|
||||
set category = "Debug.Investigate"
|
||||
set name = "Display overlay Log"
|
||||
set desc = "Display SSoverlays log of everything that's passed through it."
|
||||
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
render_stats(SSoverlays.stats, src)
|
||||
*/
|
||||
// Render stats list for round-end statistics.
|
||||
/proc/render_stats(list/stats, user, sort = /proc/cmp_generic_stat_item_time)
|
||||
sortTim(stats, sort, TRUE)
|
||||
@@ -269,38 +217,31 @@
|
||||
else
|
||||
. = lines.Join("\n")
|
||||
|
||||
/client/proc/cmd_admin_grantfullaccess(var/mob/M in GLOB.mob_list)
|
||||
set category = "Admin.Events"
|
||||
set name = "Grant Full Access"
|
||||
|
||||
ADMIN_VERB(cmd_admin_grantfullaccess, (R_ADMIN|R_EVENT), "Grant Full Access", "Grants full access to a human.", ADMIN_CATEGORY_EVENTS, mob/living/carbon/human/H in GLOB.human_mob_list)
|
||||
if (!SSticker)
|
||||
tgui_alert_async(usr, "Wait until the game starts")
|
||||
tgui_alert_async(user, "Wait until the game starts")
|
||||
return
|
||||
if (ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if (H.wear_id)
|
||||
var/obj/item/card/id/id = H.wear_id
|
||||
if(istype(H.wear_id, /obj/item/pda))
|
||||
var/obj/item/pda/pda = H.wear_id
|
||||
id = pda.id
|
||||
id.icon_state = "gold"
|
||||
id.access = get_all_accesses().Copy()
|
||||
else
|
||||
var/obj/item/card/id/id = new/obj/item/card/id(M);
|
||||
id.icon_state = "gold"
|
||||
id.access = get_all_accesses().Copy()
|
||||
id.registered_name = H.real_name
|
||||
id.assignment = JOB_SITE_MANAGER
|
||||
id.name = "[id.registered_name]'s ID Card ([id.assignment])"
|
||||
H.equip_to_slot_or_del(id, slot_wear_id)
|
||||
H.update_inv_wear_id()
|
||||
if (H.wear_id)
|
||||
var/obj/item/card/id/id = H.wear_id
|
||||
if(istype(H.wear_id, /obj/item/pda))
|
||||
var/obj/item/pda/pda = H.wear_id
|
||||
id = pda.id
|
||||
id.icon_state = "gold"
|
||||
id.access = get_all_accesses().Copy()
|
||||
else
|
||||
tgui_alert_async(usr, "Invalid mob")
|
||||
var/obj/item/card/id/id = new/obj/item/card/id(H);
|
||||
id.icon_state = "gold"
|
||||
id.access = get_all_accesses().Copy()
|
||||
id.registered_name = H.real_name
|
||||
id.assignment = JOB_SITE_MANAGER
|
||||
id.name = "[id.registered_name]'s ID Card ([id.assignment])"
|
||||
H.equip_to_slot_or_del(id, slot_wear_id)
|
||||
H.update_inv_wear_id()
|
||||
feedback_add_details("admin_verb","GFA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(src)] has granted [M.key] full access.")
|
||||
message_admins(span_blue("[key_name_admin(usr)] has granted [M.key] full access."), 1)
|
||||
log_admin("[key_name(user)] has granted [H.key] full access.")
|
||||
message_admins(span_blue("[key_name_admin(user)] has granted [H.key] full access."))
|
||||
|
||||
ADMIN_VERB(cmd_assume_direct_control, (R_DEBUG|R_ADMIN|R_EVENT), "Assume Direct Control", "Assume direct control of a mob.", "Admin.Game", mob/M)
|
||||
ADMIN_VERB(cmd_assume_direct_control, (R_DEBUG|R_ADMIN|R_EVENT), "Assume Direct Control", "Assume direct control of a mob.", ADMIN_CATEGORY_GAME, mob/M)
|
||||
if(M.ckey)
|
||||
if(tgui_alert(user, "This mob is being controlled by [M.ckey]. Are you sure you wish to assume control of it? [M.ckey] will be made a ghost.","Confirmation",list("Yes","No")) != "Yes")
|
||||
return
|
||||
@@ -311,7 +252,7 @@ ADMIN_VERB(cmd_assume_direct_control, (R_DEBUG|R_ADMIN|R_EVENT), "Assume Direct
|
||||
var/mob/observer/dead/ghost = new/mob/observer/dead(M,1)
|
||||
ghost.ckey = M.ckey
|
||||
|
||||
message_admins(span_blue("[key_name_admin(user)] assumed direct control of [M]."), 1)
|
||||
message_admins(span_blue("[key_name_admin(user)] assumed direct control of [M]."))
|
||||
log_admin("[key_name(user)] assumed direct control of [M].")
|
||||
var/mob/adminmob = user.mob
|
||||
M.ckey = user.ckey
|
||||
@@ -319,20 +260,11 @@ ADMIN_VERB(cmd_assume_direct_control, (R_DEBUG|R_ADMIN|R_EVENT), "Assume Direct
|
||||
qdel(adminmob)
|
||||
feedback_add_details("admin_verb","ADC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/take_picture(var/atom/A in world)
|
||||
set name = "Save PNG"
|
||||
set category = "Debug.Misc"
|
||||
set desc = "Opens a dialog to save a PNG of any object in the game."
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
downloadImage(A)
|
||||
|
||||
/client/proc/cmd_admin_areatest()
|
||||
set category = "Mapping"
|
||||
set name = "Test areas"
|
||||
ADMIN_VERB(take_picture, R_DEBUG, "Save PNG", "Opens a dialog to save a PNG of any object in the game.", ADMIN_CATEGORY_DEBUG_MISC, atom/selected_atom in world)
|
||||
downloadImage(selected_atom)
|
||||
|
||||
ADMIN_VERB_VISIBILITY(cmd_admin_areatest, ADMIN_VERB_VISIBLITY_FLAG_LOCALHOST)
|
||||
ADMIN_VERB(cmd_admin_areatest, R_DEBUG, "Test areas", "Manually tests all areas and prints to world (Only use on a test server).", ADMIN_CATEGORY_MAPPING_TESTS)
|
||||
var/list/areas_all = list()
|
||||
var/list/areas_with_APC = list()
|
||||
var/list/areas_with_air_alarm = list()
|
||||
@@ -445,13 +377,8 @@ ADMIN_VERB(cmd_admin_dress, R_FUN, "elect equipment", "Select equipment for a mo
|
||||
outfit.equip(H)
|
||||
log_and_message_admins("changed the equipment of [key_name(H)] to [outfit.name].")
|
||||
|
||||
/client/proc/startSinglo()
|
||||
|
||||
set category = "Debug.Game"
|
||||
set name = "Start Singularity"
|
||||
set desc = "Sets up the singularity and all machines to get power flowing through the station"
|
||||
|
||||
if(tgui_alert(usr, "Are you sure? This will start up the engine. Should only be used during debug!","Start Singularity",list("Yes","No")) != "Yes")
|
||||
ADMIN_VERB(startSinglo, R_DEBUG|R_ADMIN, "Start Singularity", "Sets up the singularity and all machines to get power flowing through the station.", ADMIN_CATEGORY_DEBUG_GAME)
|
||||
if(tgui_alert(user, "Are you sure? This will start up the engine. Should only be used during debug!","Start Singularity",list("Yes","No")) != "Yes")
|
||||
return
|
||||
|
||||
for(var/obj/machinery/power/emitter/E in GLOB.machines)
|
||||
@@ -490,14 +417,11 @@ ADMIN_VERB(cmd_admin_dress, R_FUN, "elect equipment", "Select equipment for a mo
|
||||
if(!Rad.active)
|
||||
Rad.toggle_power()
|
||||
|
||||
/client/proc/setup_supermatter_engine()
|
||||
set category = "Debug.Game"
|
||||
set name = "Setup supermatter"
|
||||
set desc = "Sets up the supermatter engine"
|
||||
log_admin("[key_name(user)] setup the singulo engine")
|
||||
message_admins(span_blue("[key_name_admin(user)] setup the singulo engine"))
|
||||
|
||||
if(!check_rights(R_DEBUG|R_ADMIN)) return
|
||||
|
||||
var/response = tgui_alert(usr, "Are you sure? This will start up the engine. Should only be used during debug!","Setup Supermatter",list("Setup Completely","Setup except coolant","No"))
|
||||
ADMIN_VERB(setup_supermatter_engine, R_DEBUG|R_ADMIN, "Setup supermatter", "Sets up the supermatter engine.", ADMIN_CATEGORY_DEBUG_GAME)
|
||||
var/response = tgui_alert(user, "Are you sure? This will start up the engine. Should only be used during debug!","Setup Supermatter",list("Setup Completely","Setup except coolant","No"))
|
||||
|
||||
if(!response || response == "No")
|
||||
return
|
||||
@@ -567,44 +491,32 @@ ADMIN_VERB(cmd_admin_dress, R_FUN, "elect equipment", "Select equipment for a mo
|
||||
T.zone.air.update_values()
|
||||
|
||||
|
||||
log_admin("[key_name(usr)] setup the supermatter engine [response == "Setup except coolant" ? "without coolant" : ""]")
|
||||
message_admins(span_blue("[key_name_admin(usr)] setup the supermatter engine [response == "Setup except coolant" ? "without coolant": ""]"), 1)
|
||||
return
|
||||
log_admin("[key_name(user)] setup the supermatter engine [response == "Setup except coolant" ? "without coolant" : ""]")
|
||||
message_admins(span_blue("[key_name_admin(user)] setup the supermatter engine [response == "Setup except coolant" ? "without coolant": ""]"))
|
||||
|
||||
|
||||
|
||||
/client/proc/cmd_debug_mob_lists()
|
||||
set category = "Debug.Investigate"
|
||||
set name = "Debug Mob Lists"
|
||||
set desc = "For when you just gotta know"
|
||||
|
||||
switch(tgui_input_list(usr, "Which list?", "List Choice", list("Players","Admins","Mobs","Living Mobs","Dead Mobs", "Clients")))
|
||||
ADMIN_VERB(cmd_debug_mob_lists, R_DEBUG, "Debug Mob Lists", "For when you just gotta know.", ADMIN_CATEGORY_DEBUG_INVESTIGATE)
|
||||
switch(tgui_input_list(user, "Which list?", "List Choice", list("Players","Admins","Mobs","Living Mobs","Dead Mobs", "Clients")))
|
||||
if("Players")
|
||||
to_chat(usr, span_filter_debuglogs(jointext(GLOB.player_list,",")))
|
||||
to_chat(user, span_filter_debuglogs(jointext(GLOB.player_list,",")))
|
||||
if("Admins")
|
||||
to_chat(usr, span_filter_debuglogs(jointext(GLOB.admins,",")))
|
||||
to_chat(user, span_filter_debuglogs(jointext(GLOB.admins,",")))
|
||||
if("Mobs")
|
||||
to_chat(usr, span_filter_debuglogs(jointext(GLOB.mob_list,",")))
|
||||
to_chat(user, span_filter_debuglogs(jointext(GLOB.mob_list,",")))
|
||||
if("Living Mobs")
|
||||
to_chat(usr, span_filter_debuglogs(jointext(GLOB.living_mob_list,",")))
|
||||
to_chat(user, span_filter_debuglogs(jointext(GLOB.living_mob_list,",")))
|
||||
if("Dead Mobs")
|
||||
to_chat(usr, span_filter_debuglogs(jointext(GLOB.dead_mob_list,",")))
|
||||
to_chat(user, span_filter_debuglogs(jointext(GLOB.dead_mob_list,",")))
|
||||
if("Clients")
|
||||
to_chat(usr, span_filter_debuglogs(jointext(GLOB.clients,",")))
|
||||
to_chat(user, span_filter_debuglogs(jointext(GLOB.clients,",")))
|
||||
|
||||
/client/proc/cmd_debug_using_map()
|
||||
set category = "Debug.Investigate"
|
||||
set name = "Debug Map Datum"
|
||||
set desc = "Debug the map metadata about the currently compiled in map."
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
debug_variables(using_map)
|
||||
ADMIN_VERB(cmd_debug_using_map, R_DEBUG, "Debug Map Datum", "Debug the map metadata about the currently compiled in map.", ADMIN_CATEGORY_DEBUG_INVESTIGATE)
|
||||
user.debug_variables(using_map)
|
||||
|
||||
// DNA2 - Admin Hax
|
||||
/client/proc/cmd_admin_toggle_block(var/mob/M,var/block)
|
||||
if(!SSticker)
|
||||
tgui_alert_async(usr, "Wait until the game starts")
|
||||
tgui_alert_async(src, "Wait until the game starts")
|
||||
return
|
||||
if(istype(M, /mob/living/carbon))
|
||||
M.dna.SetSEState(block,!M.dna.GetSEState(block))
|
||||
@@ -615,7 +527,7 @@ ADMIN_VERB(cmd_admin_dress, R_FUN, "elect equipment", "Select equipment for a mo
|
||||
message_admins("[key_name_admin(src)] has toggled [M.key]'s [blockname] block [state]!")
|
||||
log_admin("[key_name(src)] has toggled [M.key]'s [blockname] block [state]!")
|
||||
else
|
||||
tgui_alert_async(usr, "Invalid mob")
|
||||
tgui_alert_async(src, "Invalid mob")
|
||||
|
||||
ADMIN_VERB(view_runtimes, R_DEBUG, "View Runtimes", "Opens the runtime viewer.", ADMIN_CATEGORY_DEBUG_INVESTIGATE)
|
||||
GLOB.error_cache.show_to(user)
|
||||
@@ -629,110 +541,84 @@ ADMIN_VERB(view_runtimes, R_DEBUG, "View Runtimes", "Opens the runtime viewer.",
|
||||
// Not using TGUI alert, because it's view runtimes, stuff is probably broken
|
||||
tgui_alert(user, "[warning]. Proceed with caution. If you really need to see the runtimes, download the runtime log and view it in a text editor.", "HEED THIS WARNING CAREFULLY MORTAL")
|
||||
|
||||
/datum/admins/proc/change_weather()
|
||||
set category = "Debug.Events"
|
||||
set name = "Change Weather"
|
||||
set desc = "Changes the current weather."
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
ADMIN_VERB(change_weather, R_DEBUG|R_EVENT, "Change Weather", "Changes the current weather.", ADMIN_CATEGORY_DEBUG_EVENTS)
|
||||
var/datum/planet/planet = tgui_input_list(user, "Which planet do you want to modify the weather on?", "Change Weather", SSplanets.planets)
|
||||
if(!istype(planet))
|
||||
return
|
||||
|
||||
var/datum/planet/planet = tgui_input_list(usr, "Which planet do you want to modify the weather on?", "Change Weather", SSplanets.planets)
|
||||
if(istype(planet))
|
||||
var/datum/weather/new_weather = tgui_input_list(usr, "What weather do you want to change to?", "Change Weather", planet.weather_holder.allowed_weather_types)
|
||||
if(new_weather)
|
||||
planet.weather_holder.change_weather(new_weather)
|
||||
planet.weather_holder.rebuild_forecast()
|
||||
var/log = "[key_name(src)] changed [planet.name]'s weather to [new_weather]."
|
||||
message_admins(log)
|
||||
log_admin(log)
|
||||
|
||||
/datum/admins/proc/toggle_firework_override()
|
||||
set category = "Fun.Event Kit"
|
||||
set name = "Toggle Weather Firework Override"
|
||||
set desc = "Toggles ability for weather fireworks to affect weather on planet of choice."
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
var/datum/weather/new_weather = tgui_input_list(user, "What weather do you want to change to?", "Change Weather", planet.weather_holder.allowed_weather_types)
|
||||
if(!new_weather)
|
||||
return
|
||||
planet.weather_holder.change_weather(new_weather)
|
||||
planet.weather_holder.rebuild_forecast()
|
||||
var/log = "[key_name(user)] changed [planet.name]'s weather to [new_weather]."
|
||||
message_admins(log)
|
||||
log_admin(log)
|
||||
|
||||
var/datum/planet/planet = tgui_input_list(usr, "Which planet do you want to toggle firework effects on?", "Change Weather", SSplanets.planets)
|
||||
ADMIN_VERB(toggle_firework_override, R_DEBUG|R_EVENT, "Toggle Weather Firework Override", "Toggles ability for weather fireworks to affect weather on planet of choice.", ADMIN_CATEGORY_DEBUG_EVENTS)
|
||||
var/datum/planet/planet = tgui_input_list(user, "Which planet do you want to toggle firework effects on?", "Change Weather", SSplanets.planets)
|
||||
if(istype(planet) && planet.weather_holder)
|
||||
planet.weather_holder.firework_override = !(planet.weather_holder.firework_override)
|
||||
var/log = "[key_name(src)] toggled [planet.name]'s firework override to [planet.weather_holder.firework_override ? "on" : "off"]."
|
||||
var/log = "[key_name(user)] toggled [planet.name]'s firework override to [planet.weather_holder.firework_override ? "on" : "off"]."
|
||||
message_admins(log)
|
||||
log_admin(log)
|
||||
|
||||
/datum/admins/proc/change_time()
|
||||
set category = "Debug.Events"
|
||||
set name = "Change Planet Time"
|
||||
set desc = "Changes the time of a planet."
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
ADMIN_VERB(change_time, R_DEBUG|R_EVENT, "Change Planet Time", "Changes the time of a planet.", ADMIN_CATEGORY_DEBUG_EVENTS)
|
||||
var/datum/planet/planet = tgui_input_list(user, "Which planet do you want to modify time on?", "Change Time", SSplanets.planets)
|
||||
if(!istype(planet))
|
||||
return
|
||||
var/datum/time/current_time_datum = planet.current_time
|
||||
var/planet_hours = max(round(current_time_datum.seconds_in_day / 36000) - 1, 0)
|
||||
var/new_hour = tgui_input_number(user, "What hour do you want to change to?", "Change Time", text2num(current_time_datum.show_time("hh")), planet_hours)
|
||||
if(isnull(new_hour))
|
||||
return
|
||||
var/planet_minutes = max(round(current_time_datum.seconds_in_hour / 600) - 1, 0)
|
||||
var/new_minute = tgui_input_number(user, "What minute do you want to change to?", "Change Time", text2num(current_time_datum.show_time("mm")), planet_minutes)
|
||||
if(isnull(new_minute))
|
||||
return
|
||||
var/type_needed = current_time_datum.type
|
||||
var/datum/time/new_time = new type_needed()
|
||||
new_time = new_time.add_hours(new_hour)
|
||||
new_time = new_time.add_minutes(new_minute)
|
||||
planet.current_time = new_time
|
||||
spawn(1)
|
||||
planet.update_sun()
|
||||
|
||||
var/datum/planet/planet = tgui_input_list(usr, "Which planet do you want to modify time on?", "Change Time", SSplanets.planets)
|
||||
if(istype(planet))
|
||||
var/datum/time/current_time_datum = planet.current_time
|
||||
var/planet_hours = max(round(current_time_datum.seconds_in_day / 36000) - 1, 0)
|
||||
var/new_hour = tgui_input_number(usr, "What hour do you want to change to?", "Change Time", text2num(current_time_datum.show_time("hh")), planet_hours)
|
||||
if(!isnull(new_hour))
|
||||
var/planet_minutes = max(round(current_time_datum.seconds_in_hour / 600) - 1, 0)
|
||||
var/new_minute = tgui_input_number(usr, "What minute do you want to change to?", "Change Time", text2num(current_time_datum.show_time("mm")), planet_minutes)
|
||||
if(!isnull(new_minute))
|
||||
var/type_needed = current_time_datum.type
|
||||
var/datum/time/new_time = new type_needed()
|
||||
new_time = new_time.add_hours(new_hour)
|
||||
new_time = new_time.add_minutes(new_minute)
|
||||
planet.current_time = new_time
|
||||
spawn(1)
|
||||
planet.update_sun()
|
||||
var/log = "[key_name(user)] changed [planet.name]'s time to [planet.current_time.show_time("hh:mm")]."
|
||||
message_admins(log)
|
||||
log_admin(log)
|
||||
|
||||
var/log = "[key_name(src)] changed [planet.name]'s time to [planet.current_time.show_time("hh:mm")]."
|
||||
message_admins(log)
|
||||
log_admin(log)
|
||||
|
||||
/client/proc/cmd_regenerate_asset_cache()
|
||||
set category = "Debug.Assets"
|
||||
set name = "Regenerate Asset Cache"
|
||||
set desc = "Clears the asset cache and regenerates it immediately."
|
||||
ADMIN_VERB(cmd_regenerate_asset_cache, R_DEBUG|R_SERVER, "Regenerate Asset Cache", "Clears the asset cache and regenerates it immediately.", ADMIN_CATEGORY_DEBUG_ASSETS)
|
||||
if(!CONFIG_GET(flag/cache_assets))
|
||||
to_chat(usr, span_warning("Asset caching is disabled in the config!"))
|
||||
to_chat(user, span_warning("Asset caching is disabled in the config!"))
|
||||
return
|
||||
var/regenerated = 0
|
||||
for(var/datum/asset/A as() in subtypesof(/datum/asset))
|
||||
if(!initial(A.cross_round_cachable))
|
||||
for(var/datum/asset/current_asset as anything in subtypesof(/datum/asset))
|
||||
if(!initial(current_asset.cross_round_cachable))
|
||||
continue
|
||||
if(A == initial(A._abstract))
|
||||
if(current_asset == initial(current_asset._abstract))
|
||||
continue
|
||||
var/datum/asset/asset_datum = GLOB.asset_datums[A]
|
||||
var/datum/asset/asset_datum = GLOB.asset_datums[current_asset]
|
||||
asset_datum.regenerate()
|
||||
regenerated++
|
||||
to_chat(usr, span_notice("Regenerated [regenerated] asset\s."))
|
||||
to_chat(user, span_notice("Regenerated [regenerated] asset\s."))
|
||||
|
||||
/client/proc/cmd_clear_smart_asset_cache()
|
||||
set category = "Debug.Assets"
|
||||
set name = "Clear Smart Asset Cache"
|
||||
set desc = "Clears the smart asset cache."
|
||||
ADMIN_VERB(cmd_clear_smart_asset_cache, R_DEBUG|R_SERVER, "Clear Smart Asset Cache", "Clears the smart asset cache.", ADMIN_CATEGORY_DEBUG_ASSETS)
|
||||
if(!CONFIG_GET(flag/smart_cache_assets))
|
||||
to_chat(usr, span_warning("Smart asset caching is disabled in the config!"))
|
||||
to_chat(user, span_warning("Smart asset caching is disabled in the config!"))
|
||||
return
|
||||
var/cleared = 0
|
||||
for(var/datum/asset/spritesheet_batched/A as() in subtypesof(/datum/asset/spritesheet_batched))
|
||||
if(A == initial(A._abstract))
|
||||
for(var/datum/asset/spritesheet_batched/current_asset as anything in subtypesof(/datum/asset/spritesheet_batched))
|
||||
if(current_asset == initial(current_asset._abstract))
|
||||
continue
|
||||
fdel("[ASSET_CROSS_ROUND_SMART_CACHE_DIRECTORY]/spritesheet_cache.[initial(A.name)].json")
|
||||
fdel("[ASSET_CROSS_ROUND_SMART_CACHE_DIRECTORY]/spritesheet_cache.[initial(current_asset.name)].json")
|
||||
cleared++
|
||||
to_chat(usr, span_notice("Cleared [cleared] asset\s."))
|
||||
to_chat(user, span_notice("Cleared [cleared] asset\s."))
|
||||
|
||||
// For spriters with long world loads, allows to reload test robot sprites
|
||||
/client/proc/cmd_reload_robot_sprite_test()
|
||||
set category = "Debug.Sprites"
|
||||
set name = "Reload Robot Test Sprites"
|
||||
set desc = "Reloads the dmis from the test folder and creates the test datums."
|
||||
|
||||
ADMIN_VERB(cmd_reload_robot_sprite_test, R_DEBUG|R_SERVER, "Reload Robot Test Sprites", "Reloads the dmis from the test folder and creates the test datums.", ADMIN_CATEGORY_DEBUG_SPRITES)
|
||||
SSrobot_sprites.reload_test_sprites()
|
||||
|
||||
ADMIN_VERB(quick_nif, R_ADMIN, "Quick NIF", "Spawns a NIF into someone in quick-implant mode.", "Fun.Add Nif")
|
||||
ADMIN_VERB(quick_nif, R_ADMIN, "Quick NIF", "Spawns a NIF into someone in quick-implant mode.", ADMIN_CATEGORY_FUN_ADD_NIF)
|
||||
var/input_NIF
|
||||
var/mob/living/carbon/human/H = tgui_input_list(user, "Pick a mob with a player","Quick NIF", GLOB.player_list)
|
||||
|
||||
|
||||
@@ -112,80 +112,17 @@
|
||||
load_admins()
|
||||
feedback_add_details("admin_verb","RLDA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/reload_eventMs()
|
||||
set name = "Reload Event Managers"
|
||||
set category = "Debug.Server"
|
||||
|
||||
if(!check_rights(R_SERVER)) return
|
||||
|
||||
message_admins("[usr] manually reloaded Event Managers")
|
||||
world.load_mods()
|
||||
|
||||
|
||||
//todo:
|
||||
/client/proc/jump_to_dead_group()
|
||||
set name = "Jump to dead group"
|
||||
set category = "Debug.Game"
|
||||
/*
|
||||
if(!holder)
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
if(!SSair)
|
||||
to_chat(usr, "Cannot find air_system")
|
||||
return
|
||||
var/datum/air_group/dead_groups = list()
|
||||
for(var/datum/air_group/group in SSair.air_groups)
|
||||
if (!group.group_processing)
|
||||
dead_groups += group
|
||||
var/datum/air_group/dest_group = pick(dead_groups)
|
||||
usr.loc = pick(dest_group.members)
|
||||
feedback_add_details("admin_verb","JDAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
*/
|
||||
|
||||
/client/proc/kill_airgroup()
|
||||
set name = "Kill Local Airgroup"
|
||||
set desc = "Use this to allow manual manupliation of atmospherics."
|
||||
set category = "Debug.Dangerous"
|
||||
/*
|
||||
if(!holder)
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
if(!SSair)
|
||||
to_chat(usr, "Cannot find air_system")
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(usr)
|
||||
if(istype(T, /turf/simulated))
|
||||
var/datum/air_group/AG = T:parent
|
||||
AG.next_check = 30
|
||||
AG.group_processing = 0
|
||||
else
|
||||
to_chat(usr, "Local airgroup is unsimulated!")
|
||||
feedback_add_details("admin_verb","KLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
*/
|
||||
|
||||
/client/proc/print_jobban_old()
|
||||
set name = "Print Jobban Log"
|
||||
set desc = "This spams all the active jobban entries for the current round to standard output."
|
||||
set category = "Debug.Investigate"
|
||||
|
||||
to_chat(usr, span_bold("Jobbans active in this round."))
|
||||
ADMIN_VERB(print_jobban_old, R_ADMIN|R_MOD, "Print Jobban Log", "This spams all the active jobban entries for the current round to standard output.", ADMIN_CATEGORY_DEBUG_INVESTIGATE)
|
||||
to_chat(user, span_debug_info(span_bold("Jobbans active in this round.")))
|
||||
for(var/t in GLOB.jobban_keylist)
|
||||
to_chat(usr, "[t]")
|
||||
to_chat(user, span_debug_info("[t]"))
|
||||
|
||||
/client/proc/print_jobban_old_filter()
|
||||
set name = "Search Jobban Log"
|
||||
set desc = "This searches all the active jobban entries for the current round and outputs the results to standard output."
|
||||
set category = "Debug.Investigate"
|
||||
|
||||
var/job_filter = tgui_input_text(usr, "Contains what?","Job Filter")
|
||||
ADMIN_VERB(print_jobban_old_filter, R_ADMIN|R_MOD, "Search Jobban Log", "This searches all the active jobban entries for the current round and outputs the results to standard output.", ADMIN_CATEGORY_DEBUG_INVESTIGATE)
|
||||
var/job_filter = tgui_input_text(user, "Contains what?","Job Filter")
|
||||
if(!job_filter)
|
||||
return
|
||||
|
||||
to_chat(usr, span_bold("Jobbans active in this round."))
|
||||
to_chat(user, span_debug_info(span_bold("Jobbans active in this round.")))
|
||||
for(var/t in GLOB.jobban_keylist)
|
||||
if(findtext(t, job_filter))
|
||||
to_chat(usr, "[t]")
|
||||
to_chat(user, span_debug_info("[t]"))
|
||||
|
||||
@@ -68,7 +68,7 @@ ADMIN_VERB_AND_CONTEXT_MENU(add_mob_for_narration, R_FUN, "Narrate Entity (Add r
|
||||
log_and_message_admins("added [A.name] for their personal list to narrate", user) //Logging here to avoid spam, while still safeguarding abuse
|
||||
|
||||
//Proc for keeping our ref list relevant, deleting mobs that are no longer relevant for our event
|
||||
ADMIN_VERB(remove_mob_for_narration, R_FUN, "Narrate Entity (Remove ref)", "Remove mobs you're no longer narrating from your list for easier work.", "Fun.Narrate")
|
||||
ADMIN_VERB(remove_mob_for_narration, R_FUN, "Narrate Entity (Remove ref)", "Remove mobs you're no longer narrating from your list for easier work.", ADMIN_CATEGORY_FUN_NARRATE)
|
||||
if(!user.entity_narrate_holder)
|
||||
user.entity_narrate_holder = new /datum/entity_narrate()
|
||||
to_chat(user, "No references were added yet! First add references!")
|
||||
@@ -92,7 +92,7 @@ ADMIN_VERB(remove_mob_for_narration, R_FUN, "Narrate Entity (Remove ref)", "Remo
|
||||
//For now brings up a list of all entities on our reference list and gives us the option to choose what we wanna do
|
||||
//using TGUI/Byond list/alert inputs
|
||||
//Does not actually interact with the game world, it passes user input to narrate_mob_args(name, mode, message) after sanitizing
|
||||
ADMIN_VERB(narrate_mob, R_FUN, "Narrate Entity (Interface)", "Send either a visible or audiable message through your chosen entities using an interface.", "Fun.Narrate")
|
||||
ADMIN_VERB(narrate_mob, R_FUN, "Narrate Entity (Interface)", "Send either a visible or audiable message through your chosen entities using an interface.", ADMIN_CATEGORY_FUN_NARRATE)
|
||||
if(!user.entity_narrate_holder)
|
||||
user.entity_narrate_holder = new /datum/entity_narrate()
|
||||
to_chat(user, "No references were added yet! First add references!")
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
/client/proc/map_template_load()
|
||||
set category = "Debug.Events"
|
||||
set name = "Map template - Place At Loc"
|
||||
|
||||
var/datum/map_template/template
|
||||
|
||||
|
||||
var/map = tgui_input_list(usr, "Choose a Map Template to place at your CURRENT LOCATION","Place Map Template", SSmapping.map_templates)
|
||||
ADMIN_VERB(map_template_load, R_SPAWN, "Map template - Place At Loc", "Spawns a new map template at the current position.", ADMIN_CATEGORY_DEBUG_EVENTS)
|
||||
var/map = tgui_input_list(user, "Choose a Map Template to place at your CURRENT LOCATION","Place Map Template", SSmapping.map_templates)
|
||||
if(!map)
|
||||
return
|
||||
template = SSmapping.map_templates[map]
|
||||
var/datum/map_template/template = SSmapping.map_templates[map]
|
||||
|
||||
var/turf/T = get_turf(mob)
|
||||
var/turf/T = get_turf(user.mob)
|
||||
if(!T)
|
||||
return
|
||||
|
||||
@@ -18,57 +13,48 @@
|
||||
template.preload_size(template.mappath)
|
||||
for(var/S in template.get_affected_turfs(T,centered = TRUE))
|
||||
preview += image('icons/misc/debug_group.dmi',S ,"red")
|
||||
usr.client.images += preview
|
||||
if(tgui_alert(usr,"Confirm location.", "Template Confirm",list("No","Yes")) == "Yes")
|
||||
if(template.annihilate && tgui_alert(usr,"This template is set to annihilate everything in the red square. EVERYTHING IN THE RED SQUARE WILL BE DELETED, ARE YOU ABSOLUTELY SURE?", "Template Confirm", list("No","Yes")) != "Yes")
|
||||
usr.client.images -= preview
|
||||
user.images += preview
|
||||
if(tgui_alert(user, "Confirm location.", "Template Confirm", list("No","Yes")) == "Yes")
|
||||
if(template.annihilate && tgui_alert(user, "This template is set to annihilate everything in the red square. EVERYTHING IN THE RED SQUARE WILL BE DELETED, ARE YOU ABSOLUTELY SURE?", "Template Confirm", list("No","Yes")) != "Yes")
|
||||
user.images -= preview
|
||||
return
|
||||
|
||||
if(template.load(T, centered = TRUE))
|
||||
message_admins(span_adminnotice("[key_name_admin(usr)] has placed a map template ([template.name])."))
|
||||
message_admins(span_adminnotice("[key_name_admin(user)] has placed a map template ([template.name])."))
|
||||
else
|
||||
to_chat(usr, "Failed to place map")
|
||||
if(usr)
|
||||
usr.client.images -= preview
|
||||
to_chat(user, "Failed to place map")
|
||||
if(user)
|
||||
user.images -= preview
|
||||
|
||||
/client/proc/map_template_load_on_new_z()
|
||||
set category = "Debug.Events"
|
||||
set name = "Map template - New Z"
|
||||
|
||||
var/datum/map_template/template
|
||||
|
||||
var/map = tgui_input_list(usr, "Choose a Map Template to place on a new Z-level.","Place Map Template", SSmapping.map_templates)
|
||||
ADMIN_VERB(map_template_load_on_new_z, R_SPAWN, "Map template - New Z", "Spawns a new map template at the selected z level.", ADMIN_CATEGORY_DEBUG_EVENTS)
|
||||
var/map = tgui_input_list(user, "Choose a Map Template to place on a new Z-level.","Place Map Template", SSmapping.map_templates)
|
||||
if(!map)
|
||||
return
|
||||
template = SSmapping.map_templates[map]
|
||||
var/datum/map_template/template = SSmapping.map_templates[map]
|
||||
|
||||
if(template.width > world.maxx || template.height > world.maxx)
|
||||
if(tgui_alert(usr,"This template is larger than the existing z-levels. It will EXPAND ALL Z-LEVELS to match the size of the template. This may cause chaos. Are you sure you want to do this?","DANGER!!!",list("Cancel","Yes")) == "Cancel")
|
||||
to_chat(usr,"Template placement aborted.")
|
||||
if(tgui_alert(user, "This template is larger than the existing z-levels. It will EXPAND ALL Z-LEVELS to match the size of the template. This may cause chaos. Are you sure you want to do this?","DANGER!!!",list("Cancel","Yes")) == "Cancel")
|
||||
to_chat(user,"Template placement aborted.")
|
||||
return
|
||||
|
||||
if(tgui_alert(usr,"Confirm map load.", "Template Confirm",list("No","Yes")) == "Yes")
|
||||
if(tgui_alert(user, "Confirm map load.", "Template Confirm", list("No","Yes")) == "Yes")
|
||||
if(template.load_new_z())
|
||||
message_admins(span_adminnotice("[key_name_admin(usr)] has placed a map template ([template.name]) on Z level [world.maxz]."))
|
||||
message_admins(span_adminnotice("[key_name_admin(user)] has placed a map template ([template.name]) on Z level [world.maxz]."))
|
||||
else
|
||||
to_chat(usr, "Failed to place map")
|
||||
to_chat(user, "Failed to place map")
|
||||
|
||||
|
||||
/client/proc/map_template_upload()
|
||||
set category = "Debug.Events"
|
||||
set name = "Map Template - Upload"
|
||||
|
||||
var/map = input(usr, "Choose a Map Template to upload to template storage","Upload Map Template") as null|file
|
||||
ADMIN_VERB(map_template_upload, R_SPAWN, "Map Template - Upload", "Uploads the selected map template to the template storage.", ADMIN_CATEGORY_DEBUG_EVENTS)
|
||||
var/map = input(user, "Choose a Map Template to upload to template storage","Upload Map Template") as null|file
|
||||
if(!map)
|
||||
return
|
||||
if(copytext("[map]",-4) != ".dmm")
|
||||
to_chat(usr, "Bad map file: [map]")
|
||||
to_chat(user, "Bad map file: [map]")
|
||||
return
|
||||
|
||||
var/datum/map_template/M = new(map, "[map]")
|
||||
if(M.preload_size(map))
|
||||
to_chat(usr, "Map template '[map]' ready to place ([M.width]x[M.height])")
|
||||
to_chat(user, "Map template '[map]' ready to place ([M.width]x[M.height])")
|
||||
SSmapping.map_templates[M.name] = M
|
||||
message_admins(span_adminnotice("[key_name_admin(usr)] has uploaded a map template ([map])"))
|
||||
message_admins(span_adminnotice("[key_name_admin(user)] has uploaded a map template ([map])"))
|
||||
else
|
||||
to_chat(usr, "Map template '[map]' failed to load properly")
|
||||
to_chat(user, "Map template '[map]' failed to load properly")
|
||||
|
||||
@@ -40,21 +40,13 @@ GLOBAL_LIST_BOILERPLATE(all_debugging_effects, /obj/effect/debugging)
|
||||
/obj/effect/debugging/marker/Move()
|
||||
return 0
|
||||
|
||||
/client/proc/do_not_use_these()
|
||||
set category = "Mapping"
|
||||
set name = "-None of these are for ingame use!!"
|
||||
|
||||
/client/proc/camera_view()
|
||||
set category = "Mapping"
|
||||
set name = "Camera Range Display"
|
||||
|
||||
ADMIN_VERB_VISIBILITY(camera_view, ADMIN_VERB_VISIBLITY_FLAG_LOCALHOST)
|
||||
ADMIN_VERB(camera_view, R_DEBUG, "Camera Range Display", "Globally changes the camera view (Only use on a test server).", ADMIN_CATEGORY_MAPPING_TESTS)
|
||||
if(GLOB.camera_range_display_status)
|
||||
GLOB.camera_range_display_status = FALSE
|
||||
else
|
||||
GLOB.camera_range_display_status = TRUE
|
||||
|
||||
|
||||
|
||||
for(var/obj/effect/debugging/camera_range/C in GLOB.all_debugging_effects)
|
||||
qdel(C)
|
||||
|
||||
@@ -63,14 +55,10 @@ GLOBAL_LIST_BOILERPLATE(all_debugging_effects, /obj/effect/debugging)
|
||||
new/obj/effect/debugging/camera_range(C.loc)
|
||||
feedback_add_details("admin_verb","mCRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
|
||||
/client/proc/sec_camera_report()
|
||||
set category = "Mapping"
|
||||
set name = "Camera Report"
|
||||
|
||||
ADMIN_VERB_VISIBILITY(sec_camera_report, ADMIN_VERB_VISIBLITY_FLAG_LOCALHOST)
|
||||
ADMIN_VERB(sec_camera_report, R_DEBUG, "Camera Report", "Gives a report of the camera state (Only use on a test server).", ADMIN_CATEGORY_MAPPING_TESTS)
|
||||
if(!GLOB.master_controller)
|
||||
tgui_alert_async(usr,"Master_controller not found.","Sec Camera Report")
|
||||
tgui_alert_async(user,"Master_controller not found.","Sec Camera Report")
|
||||
return 0
|
||||
|
||||
var/list/obj/machinery/camera/CL = list()
|
||||
@@ -103,15 +91,13 @@ GLOBAL_LIST_BOILERPLATE(all_debugging_effects, /obj/effect/debugging)
|
||||
|
||||
output += "</ul>"
|
||||
|
||||
var/datum/browser/popup = new(src, "airreport", "Airreport", 1000, 500)
|
||||
var/datum/browser/popup = new(user, "airreport", "Airreport", 1000, 500)
|
||||
popup.set_content(output)
|
||||
popup.open()
|
||||
feedback_add_details("admin_verb","mCRP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/intercom_view()
|
||||
set category = "Mapping"
|
||||
set name = "Intercom Range Display"
|
||||
|
||||
ADMIN_VERB_VISIBILITY(intercom_view, ADMIN_VERB_VISIBLITY_FLAG_LOCALHOST)
|
||||
ADMIN_VERB(intercom_view, R_DEBUG, "Intercom Range Display", "Displays the intercom view as effects (Only use on a test server).", ADMIN_CATEGORY_MAPPING_TESTS)
|
||||
if(GLOB.intercom_range_display_status)
|
||||
GLOB.intercom_range_display_status = FALSE
|
||||
else
|
||||
@@ -128,60 +114,6 @@ GLOBAL_LIST_BOILERPLATE(all_debugging_effects, /obj/effect/debugging)
|
||||
qdel(F)
|
||||
feedback_add_details("admin_verb","mIRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
GLOBAL_LIST_INIT(debug_verbs, list(
|
||||
/client/proc/do_not_use_these
|
||||
,/client/proc/camera_view
|
||||
,/client/proc/sec_camera_report
|
||||
,/client/proc/intercom_view
|
||||
,/client/proc/Cell
|
||||
,/client/proc/atmosscan
|
||||
,/client/proc/powerdebug
|
||||
,/client/proc/count_objects_on_z_level
|
||||
,/client/proc/count_objects_all
|
||||
,/client/proc/jump_to_dead_group
|
||||
,/client/proc/startSinglo
|
||||
,/client/proc/cmd_admin_grantfullaccess
|
||||
,/client/proc/kaboom
|
||||
,/client/proc/cmd_admin_areatest
|
||||
,/datum/admins/proc/show_traitor_panel
|
||||
,/client/proc/print_jobban_old
|
||||
,/client/proc/print_jobban_old_filter
|
||||
,/client/proc/forceEvent
|
||||
,/client/proc/Zone_Info
|
||||
,/client/proc/Test_ZAS_Connection
|
||||
,/client/proc/ZoneTick
|
||||
,/client/proc/rebootAirMaster
|
||||
,/client/proc/hide_debug_verbs
|
||||
,/client/proc/testZAScolors
|
||||
,/client/proc/testZAScolors_remove
|
||||
,/datum/admins/proc/setup_supermatter
|
||||
,/client/proc/atmos_toggle_debug
|
||||
,/client/proc/spawn_tanktransferbomb
|
||||
,/client/proc/take_picture
|
||||
))
|
||||
|
||||
|
||||
/client/proc/enable_debug_verbs()
|
||||
set category = "Debug.Misc"
|
||||
set name = "Debug verbs"
|
||||
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
add_verb(src, GLOB.debug_verbs)
|
||||
|
||||
feedback_add_details("admin_verb","mDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/hide_debug_verbs()
|
||||
set category = "Debug.Misc"
|
||||
set name = "Hide Debug verbs"
|
||||
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
remove_verb(src, GLOB.debug_verbs)
|
||||
|
||||
feedback_add_details("admin_verb","hDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/var/list/testZAScolors_turfs = list()
|
||||
/client/var/list/testZAScolors_zones = list()
|
||||
/client/var/usedZAScolors = 0
|
||||
@@ -202,88 +134,84 @@ GLOBAL_LIST_INIT(debug_verbs, list(
|
||||
continue
|
||||
recurse_zone(connected,recurse_level+1)
|
||||
|
||||
ADMIN_VERB_VISIBILITY(testZAScolors, ADMIN_VERB_VISIBLITY_FLAG_LOCALHOST)
|
||||
ADMIN_VERB(testZAScolors, R_DEBUG, "Check ZAS connections", "Displays ZAS connections as effects (Only use on a test server).", ADMIN_CATEGORY_MAPPING_ZAS)
|
||||
SSadmin_verbs.dynamic_invoke_verb(user, /datum/admin_verb/testZAScolors_remove)
|
||||
|
||||
/client/proc/testZAScolors()
|
||||
set category = "Mapping.ZAS"
|
||||
set name = "Check ZAS connections"
|
||||
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
testZAScolors_remove()
|
||||
|
||||
var/turf/simulated/location = get_turf(usr)
|
||||
var/turf/simulated/location = get_turf(user.mob)
|
||||
|
||||
if(!istype(location, /turf/simulated)) // We're in space, let's not cause runtimes.
|
||||
to_chat(usr, span_red("this debug tool cannot be used from space"))
|
||||
to_chat(user, span_red("this debug tool cannot be used from space"))
|
||||
return
|
||||
|
||||
var/icon/red = new('icons/misc/debug_group.dmi', "red") //created here so we don't have to make thousands of these.
|
||||
var/icon/green = new('icons/misc/debug_group.dmi', "green")
|
||||
var/icon/blue = new('icons/misc/debug_group.dmi', "blue")
|
||||
|
||||
if(!usedZAScolors)
|
||||
to_chat(usr, "ZAS Test Colors")
|
||||
to_chat(usr, "[span_green("Green")] = Zone you are standing in")
|
||||
to_chat(usr, "[span_blue("Blue")] = Connected zone to the zone you are standing in")
|
||||
to_chat(usr, "[span_yellow("Yellow")] = A zone that is connected but not one adjacent to your connected zone")
|
||||
to_chat(usr, "[span_red("Red")] = Not connected")
|
||||
usedZAScolors = 1
|
||||
if(!user.usedZAScolors)
|
||||
to_chat(user, "ZAS Test Colors")
|
||||
to_chat(user, "[span_green("Green")] = Zone you are standing in")
|
||||
to_chat(user, "[span_blue("Blue")] = Connected zone to the zone you are standing in")
|
||||
to_chat(user, "[span_yellow("Yellow")] = A zone that is connected but not one adjacent to your connected zone")
|
||||
to_chat(user, "[span_red("Red")] = Not connected")
|
||||
user.usedZAScolors = 1
|
||||
|
||||
testZAScolors_zones += location.zone
|
||||
user.testZAScolors_zones += location.zone
|
||||
for(var/turf/T in location.zone.contents)
|
||||
images += image(green, T,"zasdebug", TURF_LAYER)
|
||||
testZAScolors_turfs += T
|
||||
user.images += image(green, T,"zasdebug", TURF_LAYER)
|
||||
user.testZAScolors_turfs += T
|
||||
for(var/datum/connection_edge/zone/edge in location.zone.edges)
|
||||
var/datum/zone/Z = edge.get_connected_zone(location.zone)
|
||||
testZAScolors_zones += Z
|
||||
user.testZAScolors_zones += Z
|
||||
for(var/turf/T in Z.contents)
|
||||
images += image(blue, T,"zasdebug",TURF_LAYER)
|
||||
testZAScolors_turfs += T
|
||||
user.images += image(blue, T,"zasdebug",TURF_LAYER)
|
||||
user.testZAScolors_turfs += T
|
||||
for(var/datum/connection_edge/zone/z_edge in Z.edges)
|
||||
var/datum/zone/connected = z_edge.get_connected_zone(Z)
|
||||
if(connected in testZAScolors_zones)
|
||||
if(connected in user.testZAScolors_zones)
|
||||
continue
|
||||
recurse_zone(connected,1)
|
||||
user.recurse_zone(connected,1)
|
||||
|
||||
for(var/turf/T in range(25,location))
|
||||
if(!istype(T))
|
||||
continue
|
||||
if(T in testZAScolors_turfs)
|
||||
if(T in user.testZAScolors_turfs)
|
||||
continue
|
||||
images += image(red, T, "zasdebug", TURF_LAYER)
|
||||
testZAScolors_turfs += T
|
||||
user.images += image(red, T, "zasdebug", TURF_LAYER)
|
||||
user.testZAScolors_turfs += T
|
||||
|
||||
/client/proc/testZAScolors_remove()
|
||||
set category = "Mapping.ZAS"
|
||||
set name = "Remove ZAS connection colors"
|
||||
ADMIN_VERB_VISIBILITY(testZAScolors_remove, ADMIN_VERB_VISIBLITY_FLAG_LOCALHOST)
|
||||
ADMIN_VERB(testZAScolors_remove, R_DEBUG, "Remove ZAS connection colors", "Clears displayed ZAS connections (Only use on a test server).", ADMIN_CATEGORY_MAPPING_ZAS)
|
||||
user.testZAScolors_turfs.Cut()
|
||||
user.testZAScolors_zones.Cut()
|
||||
|
||||
testZAScolors_turfs.Cut()
|
||||
testZAScolors_zones.Cut()
|
||||
|
||||
if(images.len)
|
||||
for(var/image/i in images)
|
||||
if(length(user.images))
|
||||
for(var/image/i in user.images)
|
||||
if(i.icon_state == "zasdebug")
|
||||
images.Remove(i)
|
||||
user.images.Remove(i)
|
||||
|
||||
/client/proc/rebootAirMaster()
|
||||
set category = "Mapping.ZAS"
|
||||
set name = "Reboot ZAS"
|
||||
|
||||
if(tgui_alert(usr, "This will destroy and remake all zone geometry on the whole map.","Reboot ZAS",list("Reboot ZAS","Nevermind")) == "Reboot ZAS")
|
||||
ADMIN_VERB_VISIBILITY(rebootAirMaster, ADMIN_VERB_VISIBLITY_FLAG_LOCALHOST)
|
||||
ADMIN_VERB(rebootAirMaster, R_DEBUG, "Reboot ZAS", "Rstarts ZAS (Only use on a test server).", ADMIN_CATEGORY_MAPPING_ZAS)
|
||||
if(tgui_alert(user, "This will destroy and remake all zone geometry on the whole map.","Reboot ZAS",list("Reboot ZAS","Nevermind")) == "Reboot ZAS")
|
||||
SSair.RebootZAS()
|
||||
|
||||
/client/proc/count_objects_on_z_level()
|
||||
set category = "Mapping"
|
||||
set name = "Count Objects On Level"
|
||||
var/level = tgui_input_text(usr, "Which z-level?","Level?")
|
||||
if(!level) return
|
||||
ADMIN_VERB_VISIBILITY(count_objects_on_z_level, ADMIN_VERB_VISIBLITY_FLAG_LOCALHOST)
|
||||
ADMIN_VERB(count_objects_on_z_level, R_DEBUG, "Count Objects On Level", "Counts all objects on a Z level (Only use on a test server).", ADMIN_CATEGORY_MAPPING)
|
||||
var/level = tgui_input_text(user, "Which z-level?","Level?")
|
||||
if(!level)
|
||||
return
|
||||
var/num_level = text2num(level)
|
||||
if(!num_level) return
|
||||
if(!isnum(num_level)) return
|
||||
if(!num_level)
|
||||
return
|
||||
if(!isnum(num_level))
|
||||
return
|
||||
|
||||
var/type_text = tgui_input_text(usr, "Which type path?","Path?")
|
||||
if(!type_text) return
|
||||
var/type_text = tgui_input_text(user, "Which type path?","Path?")
|
||||
if(!type_text)
|
||||
return
|
||||
var/type_path = text2path(type_text)
|
||||
if(!type_path) return
|
||||
if(!type_path)
|
||||
return
|
||||
|
||||
var/count = 1
|
||||
|
||||
@@ -314,14 +242,14 @@ GLOBAL_LIST_INIT(debug_verbs, list(
|
||||
to_chat(world, "There are [count] objects of type [type_path] on z-level [num_level]")
|
||||
feedback_add_details("admin_verb","mOBJZ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/count_objects_all()
|
||||
set category = "Mapping"
|
||||
set name = "Count Objects All"
|
||||
|
||||
var/type_text = tgui_input_text(usr, "Which type path?","")
|
||||
if(!type_text) return
|
||||
ADMIN_VERB_VISIBILITY(count_objects_all, ADMIN_VERB_VISIBLITY_FLAG_LOCALHOST)
|
||||
ADMIN_VERB(count_objects_all, R_DEBUG, "Count Objects All", "Count all objects by type (Only use on a test server).", ADMIN_CATEGORY_MAPPING)
|
||||
var/type_text = tgui_input_text(user, "Which type path?","")
|
||||
if(!type_text)
|
||||
return
|
||||
var/type_path = text2path(type_text)
|
||||
if(!type_path) return
|
||||
if(!type_path)
|
||||
return
|
||||
|
||||
var/count = 0
|
||||
|
||||
@@ -340,3 +268,11 @@ GLOBAL_LIST_INIT(debug_verbs, list(
|
||||
|
||||
to_chat(world, "There are [count] objects of type [type_path] in the game world")
|
||||
feedback_add_details("admin_verb","mOBJ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
ADMIN_VERB(enable_mapping_verbs, R_DEBUG, "Enable Mapping Verbs", "Enable all mapping verbs.", ADMIN_CATEGORY_MAPPING)
|
||||
SSadmin_verbs.update_visibility_flag(user, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG, TRUE)
|
||||
feedback_add_details("admin_verb","mapDB")
|
||||
|
||||
ADMIN_VERB_VISIBILITY(disable_mapping_verbs, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
|
||||
ADMIN_VERB(disable_mapping_verbs, R_DEBUG, "Disable Mapping Verbs", "Disable all mapping verbs.", ADMIN_CATEGORY_MAPPING)
|
||||
SSadmin_verbs.update_visibility_flag(user, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG, FALSE)
|
||||
|
||||
@@ -1,45 +1,27 @@
|
||||
/client/proc/panicbunker()
|
||||
set category = "Server.Config"
|
||||
set name = "Toggle Panic Bunker"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
ADMIN_VERB(panicbunker, R_ADMIN|R_SERVER, "Toggle Panic Bunker", "Locks the server down.", ADMIN_CATEGORY_SERVER_CONFIG)
|
||||
if (!CONFIG_GET(flag/sql_enabled))
|
||||
to_chat(usr, span_adminnotice("The Database is not enabled!"))
|
||||
to_chat(user, span_adminnotice("The Database is not enabled!"))
|
||||
return
|
||||
|
||||
CONFIG_SET(flag/panic_bunker, !CONFIG_GET(flag/panic_bunker))
|
||||
|
||||
log_and_message_admins("has toggled the Panic Bunker, it is now [(CONFIG_GET(flag/panic_bunker) ? "on":"off")].", src)
|
||||
log_and_message_admins("has toggled the Panic Bunker, it is now [(CONFIG_GET(flag/panic_bunker) ? "on":"off")].", user)
|
||||
if (CONFIG_GET(flag/panic_bunker) && (!SSdbcore || !SSdbcore.IsConnected()))
|
||||
message_admins("The database is not connected! Panic bunker will not work until the connection is reestablished.")
|
||||
feedback_add_details("admin_verb","PANIC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/paranoia_logging()
|
||||
set category = "Server.Config"
|
||||
set name = "New Player Warnings"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
ADMIN_VERB(paranoia_logging, R_ADMIN|R_SERVER, "New Player Warnings", "Toggle paranoia logging.", ADMIN_CATEGORY_SERVER_CONFIG)
|
||||
CONFIG_SET(flag/paranoia_logging, !CONFIG_GET(flag/paranoia_logging))
|
||||
|
||||
log_and_message_admins("has toggled Paranoia Logging, it is now [(CONFIG_GET(flag/paranoia_logging) ? "on":"off")].", src)
|
||||
log_and_message_admins("has toggled Paranoia Logging, it is now [(CONFIG_GET(flag/paranoia_logging) ? "on":"off")].", user)
|
||||
if (CONFIG_GET(flag/paranoia_logging) && (!SSdbcore || !SSdbcore.IsConnected()))
|
||||
message_admins("The database is not connected! Paranoia logging will not be able to give 'player age' (time since first connection) warnings, only Byond account warnings.")
|
||||
feedback_add_details("admin_verb","PARLOG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/ip_reputation()
|
||||
set category = "Server.Config"
|
||||
set name = "Toggle IP Rep Checks"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
ADMIN_VERB(ip_reputation, R_ADMIN|R_SERVER, "Toggle IP Rep Checks", "Toggle ip reputation checks.", ADMIN_CATEGORY_SERVER_CONFIG)
|
||||
CONFIG_SET(flag/ip_reputation, !CONFIG_GET(flag/ip_reputation))
|
||||
|
||||
log_and_message_admins("has toggled IP reputation checks, it is now [(CONFIG_GET(flag/ip_reputation) ? "on":"off")].", src)
|
||||
log_and_message_admins("has toggled IP reputation checks, it is now [(CONFIG_GET(flag/ip_reputation) ? "on":"off")].", user)
|
||||
if (CONFIG_GET(flag/ip_reputation) && (!SSdbcore || !SSdbcore.IsConnected()))
|
||||
message_admins("The database is not connected! IP reputation logging will not be able to allow existing players to bypass the reputation checks (if that is enabled).")
|
||||
feedback_add_details("admin_verb","IPREP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -17,42 +17,34 @@ ADMIN_VERB(drop_everything, R_ADMIN, "Drop Everything", ADMIN_VERB_NO_DESCRIPTIO
|
||||
message_admins(msg)
|
||||
feedback_add_details("admin_verb","DEVR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_prison(mob/M as mob in GLOB.mob_list)
|
||||
set category = "Admin.Game"
|
||||
set name = "Prison"
|
||||
if(!check_rights_for(src, R_HOLDER))
|
||||
ADMIN_VERB(cmd_admin_prison, R_ADMIN|R_MOD, "Prison", "Send target to prison.", ADMIN_CATEGORY_GAME, mob/target_mob in GLOB.mob_list)
|
||||
if(!length(GLOB.prisonwarp))
|
||||
return
|
||||
|
||||
if (ismob(M))
|
||||
if(isAI(M))
|
||||
tgui_alert_async(usr, "The AI can't be sent to prison you jerk!")
|
||||
if(ismob(target_mob))
|
||||
if(isAI(target_mob))
|
||||
tgui_alert_async(user, "The AI can't be sent to prison you jerk!")
|
||||
return
|
||||
//strip their stuff before they teleport into a cell :downs:
|
||||
for(var/obj/item/W in M)
|
||||
M.drop_from_inventory(W)
|
||||
for(var/obj/item/content_item in target_mob)
|
||||
target_mob.drop_from_inventory(content_item)
|
||||
//teleport person to cell
|
||||
M.Paralyse(5)
|
||||
M.Sleeping(5)
|
||||
target_mob.Paralyse(5)
|
||||
target_mob.Sleeping(5)
|
||||
sleep(5) //so they black out before warping
|
||||
M.loc = pick(GLOB.prisonwarp)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/prisoner = M
|
||||
target_mob.forceMove(pick(GLOB.prisonwarp))
|
||||
if(ishuman(target_mob))
|
||||
var/mob/living/carbon/human/prisoner = target_mob
|
||||
prisoner.equip_to_slot_or_del(new /obj/item/clothing/under/color/prison(prisoner), slot_w_uniform)
|
||||
prisoner.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(prisoner), slot_shoes)
|
||||
spawn(50)
|
||||
to_chat(M, span_red("You have been sent to the prison station!"))
|
||||
log_admin("[key_name(usr)] sent [key_name(M)] to the prison station.")
|
||||
message_admins(span_blue("[key_name_admin(usr)] sent [key_name_admin(M)] to the prison station."), 1)
|
||||
to_chat(target_mob, span_bolddanger("You have been sent to the prison station!"))
|
||||
log_admin("[key_name(user)] sent [key_name(target_mob)] to the prison station.")
|
||||
message_admins(span_blue("[key_name_admin(user)] sent [key_name_admin(target_mob)] to the prison station."), 1)
|
||||
feedback_add_details("admin_verb","PRISON") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
//Allows staff to determine who the newer players are.
|
||||
/client/proc/cmd_check_new_players()
|
||||
set category = "Admin.Investigate"
|
||||
set name = "Check new Players"
|
||||
if(!check_rights_for(src, R_HOLDER))
|
||||
return
|
||||
|
||||
var/age = tgui_alert(src, "Age check", "Show accounts yonger then _____ days", list("7","30","All"))
|
||||
ADMIN_VERB(cmd_check_new_players, R_HOLDER, "Check new Players", "Check the account age.", ADMIN_CATEGORY_INVESTIGATE)
|
||||
var/age = tgui_alert(user, "Age check", "Show accounts yonger then _____ days", list("7","30","All"))
|
||||
if(!age)
|
||||
return
|
||||
if(age == "All")
|
||||
@@ -65,32 +57,25 @@ ADMIN_VERB(drop_everything, R_ADMIN, "Drop Everything", ADMIN_VERB_NO_DESCRIPTIO
|
||||
|
||||
var/highlight_special_characters = 1
|
||||
|
||||
for(var/client/C in GLOB.clients)
|
||||
if(C.player_age == "Requires database")
|
||||
for(var/client/current_client in GLOB.clients)
|
||||
if(current_client.player_age == "Requires database")
|
||||
missing_ages = 1
|
||||
continue
|
||||
if(C.player_age < age)
|
||||
msg += "[key_name(C, 1, 1, highlight_special_characters)]: account is [C.player_age] days old<br>"
|
||||
if(current_client.player_age < age)
|
||||
msg += "[key_name(current_client, 1, 1, highlight_special_characters)]: account is [current_client.player_age] days old<br>"
|
||||
|
||||
if(missing_ages)
|
||||
to_chat(src, "Some accounts did not have proper ages set in their clients. This function requires database to be present.")
|
||||
to_chat(user, "Some accounts did not have proper ages set in their clients. This function requires database to be present.")
|
||||
|
||||
if(msg != "")
|
||||
var/datum/browser/popup = new(src, "Player_age_check", "Player Age Check")
|
||||
var/datum/browser/popup = new(user, "Player_age_check", "Player Age Check")
|
||||
popup.set_content(msg)
|
||||
popup.open()
|
||||
else
|
||||
to_chat(src, "No matches for that age range found.")
|
||||
|
||||
/client/proc/cmd_admin_subtle_message(mob/M as mob in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Subtle Message"
|
||||
|
||||
if(!ismob(M)) return
|
||||
if (!check_rights_for(src, R_HOLDER))
|
||||
return
|
||||
to_chat(user, "No matches for that age range found.")
|
||||
|
||||
var/msg = tgui_input_text(usr, "Message:", text("Subtle PM to [M.key]"), encode = FALSE)
|
||||
ADMIN_VERB_ONLY_CONTEXT_MENU(cmd_admin_subtle_message, R_HOLDER, "Subtle Message", mob/targat_mob in get_mob_with_client_list())
|
||||
var/msg = tgui_input_text(user, "Message:", text("Subtle PM to [targat_mob.key]"), encode = FALSE)
|
||||
|
||||
if (!msg)
|
||||
return
|
||||
@@ -98,25 +83,16 @@ ADMIN_VERB(drop_everything, R_ADMIN, "Drop Everything", ADMIN_VERB_NO_DESCRIPTIO
|
||||
if(!(msg[1] == "<" && msg[length(msg)] == ">")) //You can use HTML but only if the whole thing is HTML. Tries to prevent admin 'accidents'.
|
||||
msg = sanitize(msg)
|
||||
|
||||
if(usr)
|
||||
if (usr.client)
|
||||
if(check_rights_for(usr.client, R_HOLDER))
|
||||
to_chat(M, span_bold("You hear a voice in your head...") + " " + span_italics("[msg]"))
|
||||
to_chat(targat_mob, span_bold("You hear a voice in your head...") + " " + span_italics("[msg]"))
|
||||
|
||||
log_admin("SubtlePM: [key_name(usr)] -> [key_name(M)] : [msg]")
|
||||
msg = span_admin_pm_notice(span_bold(" SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] :") + " [msg]")
|
||||
log_admin("SubtlePM: [key_name(user)] -> [key_name(targat_mob)] : [msg]")
|
||||
msg = span_admin_pm_notice(span_bold(" SubtleMessage: [key_name_admin(user)] -> [key_name_admin(targat_mob)] :") + " [msg]")
|
||||
message_admins(msg)
|
||||
admin_ticket_log(M, msg)
|
||||
admin_ticket_log(targat_mob, msg)
|
||||
feedback_add_details("admin_verb","SMS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_world_narrate() // Allows administrators to fluff events a little easier -- TLE
|
||||
set category = "Fun.Narrate"
|
||||
set name = "Global Narrate"
|
||||
|
||||
if (!check_rights_for(src, R_HOLDER))
|
||||
return
|
||||
|
||||
var/msg = tgui_input_text(usr, "Message:", text("Enter the text you wish to appear to everyone:"), encode = FALSE)
|
||||
ADMIN_VERB(cmd_admin_world_narrate, R_FUN|R_EVENT, "Global Narrate", "Globally narrate.", ADMIN_CATEGORY_FUN_NARRATE) // Allows administrators to fluff events a little easier -- TLE
|
||||
var/msg = tgui_input_text(user, "Message:", text("Enter the text you wish to appear to everyone:"), encode = FALSE)
|
||||
|
||||
if (!msg)
|
||||
return
|
||||
@@ -126,75 +102,80 @@ ADMIN_VERB(drop_everything, R_ADMIN, "Drop Everything", ADMIN_VERB_NO_DESCRIPTIO
|
||||
return
|
||||
|
||||
to_chat(world, "[msg]")
|
||||
log_admin("GlobalNarrate: [key_name(usr)] : [msg]")
|
||||
message_admins(span_blue(span_bold(" GlobalNarrate: [key_name_admin(usr)] : [msg]<BR>")), 1)
|
||||
log_admin("GlobalNarrate: [key_name(user)] : [msg]")
|
||||
message_admins(span_blue(span_bold("GlobalNarrate: [key_name_admin(user)] : [msg]<BR>")))
|
||||
feedback_add_details("admin_verb","GLN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_direct_narrate(var/mob/M) // Targetted narrate -- TLE
|
||||
set category = "Fun.Narrate"
|
||||
set name = "Direct Narrate"
|
||||
ADMIN_VERB(cmd_admin_local_narrate, R_FUN|R_EVENT, "Local Narrate", "Locally narrate.", ADMIN_CATEGORY_FUN_NARRATE)
|
||||
var/msg = tgui_input_text(user, "Message:", text("Enter the text you wish to appear to everyone within view range:"), encode = FALSE)
|
||||
|
||||
if(!check_rights_for(src, R_HOLDER))
|
||||
if (!msg)
|
||||
return
|
||||
if(!(msg[1] == "<" && msg[length(msg)] == ">")) //You can use HTML but only if the whole thing is HTML. Tries to prevent admin 'accidents'.
|
||||
msg = sanitize(msg)
|
||||
if (!msg) // We check both before and after, just in case sanitization ended us up with empty message.
|
||||
return
|
||||
|
||||
if(!M)
|
||||
M = tgui_input_list(usr, "Direct narrate to who?", "Active Players", get_mob_with_client_list())
|
||||
for(var/mob/mobs in range(user.eye, user.view))
|
||||
to_chat(mobs, span_bold("[msg]"))
|
||||
log_admin("LocalNarrate: [key_name(user)] : [msg]")
|
||||
message_admins(span_blue(span_bold("LocalNarrate: [key_name_admin(user)] : [msg]<BR>")))
|
||||
feedback_add_details("admin_verb","LNR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
if(!M)
|
||||
|
||||
ADMIN_VERB(cmd_admin_direct_narrate, R_FUN|R_EVENT, "Direct Narrate", "Directly narrate the target.", ADMIN_CATEGORY_FUN_NARRATE, mob/target_mob)
|
||||
if(!target_mob)
|
||||
target_mob = tgui_input_list(user, "Direct narrate to who?", "Active Players", get_mob_with_client_list())
|
||||
|
||||
if(!target_mob)
|
||||
return
|
||||
|
||||
var/msg = tgui_input_text(usr, "Message:", text("Enter the text you wish to appear to your target:"), encode = FALSE)
|
||||
var/msg = tgui_input_text(user, "Message:", text("Enter the text you wish to appear to your target:"), encode = FALSE)
|
||||
if(msg && !(msg[1] == "<" && msg[length(msg)] == ">")) //You can use HTML but only if the whole thing is HTML. Tries to prevent admin 'accidents'.
|
||||
msg = sanitize(msg)
|
||||
|
||||
if( !msg )
|
||||
if(!msg)
|
||||
return
|
||||
|
||||
to_chat(M, msg)
|
||||
log_admin("DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]")
|
||||
msg = span_admin_pm_notice(span_bold(" DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]):") + " [msg]<BR>")
|
||||
to_chat(target_mob, msg)
|
||||
log_admin("DirectNarrate: [key_name(user)] to ([target_mob.name]/[target_mob.key]): [msg]")
|
||||
msg = span_admin_pm_notice(span_bold(" DirectNarrate: [key_name(user)] to ([target_mob.name]/[target_mob.key]):") + " [msg]<BR>")
|
||||
message_admins(msg)
|
||||
admin_ticket_log(M, msg)
|
||||
admin_ticket_log(target_mob, msg)
|
||||
feedback_add_details("admin_verb","DIRN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_godmode(mob/M as mob in GLOB.mob_list)
|
||||
set category = "Admin.Game"
|
||||
set name = "Toggle Godmode"
|
||||
ADMIN_VERB_AND_CONTEXT_MENU(cmd_admin_godmode, R_HOLDER, "Toggle Godmode", "Toggle godmode on the target.", ADMIN_CATEGORY_GAME, mob/target_mob in GLOB.mob_list)
|
||||
if(target_mob.status_flags & GODMODE)
|
||||
target_mob.RemoveElement(/datum/element/godmode)
|
||||
|
||||
if(!check_rights_for(src, R_HOLDER))
|
||||
return
|
||||
else if(!(target_mob.status_flags & GODMODE))
|
||||
target_mob.AddElement(/datum/element/godmode)
|
||||
|
||||
if(M.status_flags & GODMODE)
|
||||
M.RemoveElement(/datum/element/godmode)
|
||||
to_chat(user, span_notice("Toggled [(target_mob.status_flags & GODMODE) ? "ON" : "OFF"]"))
|
||||
|
||||
else if(!(M.status_flags & GODMODE))
|
||||
M.AddElement(/datum/element/godmode)
|
||||
|
||||
to_chat(usr, span_blue("Toggled [(M.status_flags & GODMODE) ? "ON" : "OFF"]"))
|
||||
|
||||
log_admin("[key_name(usr)] has toggled [key_name(M)]'s godmode to [(M.status_flags & GODMODE) ? "On" : "Off"]")
|
||||
var/msg = "[key_name_admin(usr)] has toggled [ADMIN_LOOKUPFLW(M)]'s godmode to [(M.status_flags & GODMODE) ? "On" : "Off"]"
|
||||
log_admin("[key_name(user)] has toggled [key_name(target_mob)]'s godmode to [(target_mob.status_flags & GODMODE) ? "On" : "Off"]")
|
||||
var/msg = "[key_name_admin(user)] has toggled [ADMIN_LOOKUPFLW(target_mob)]'s godmode to [(target_mob.status_flags & GODMODE) ? "On" : "Off"]"
|
||||
message_admins(msg)
|
||||
admin_ticket_log(M, msg)
|
||||
admin_ticket_log(target_mob, msg)
|
||||
feedback_add_details("admin_verb","GOD_ENABLE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
|
||||
/proc/cmd_admin_mute(mob/target, mute_type, automute = 0, mob/user)
|
||||
if(automute)
|
||||
if(!CONFIG_GET(flag/automute_on))
|
||||
return
|
||||
else
|
||||
if(!usr || !usr.client)
|
||||
if(!user || !user.client)
|
||||
return
|
||||
if(!check_rights_for(usr.client, R_HOLDER))
|
||||
to_chat(usr, span_red("Error: cmd_admin_mute: You don't have permission to do this."))
|
||||
if(!check_rights_for(user.client, R_HOLDER))
|
||||
to_chat(user, span_red("Error: cmd_admin_mute: You don't have permission to do this."))
|
||||
return
|
||||
if(!M.client)
|
||||
to_chat(usr, span_red("Error: cmd_admin_mute: This mob doesn't have a client tied to it."))
|
||||
if(check_rights_for(M.client, R_HOLDER))
|
||||
to_chat(usr, span_red("Error: cmd_admin_mute: You cannot mute an admin/mod."))
|
||||
if(!M.client)
|
||||
if(!target.client)
|
||||
to_chat(user, span_red("Error: cmd_admin_mute: This mob doesn't have a client tied to it."))
|
||||
if(check_rights_for(target.client, R_HOLDER))
|
||||
to_chat(user, span_red("Error: cmd_admin_mute: You cannot mute an admin/mod."))
|
||||
if(!target.client)
|
||||
return
|
||||
if(check_rights_for(M.client, R_HOLDER))
|
||||
if(check_rights_for(target.client, R_HOLDER))
|
||||
return
|
||||
|
||||
var/muteunmute
|
||||
@@ -212,23 +193,23 @@ ADMIN_VERB(drop_everything, R_ADMIN, "Drop Everything", ADMIN_VERB_NO_DESCRIPTIO
|
||||
|
||||
if(automute)
|
||||
muteunmute = "auto-muted"
|
||||
M.client.prefs.muted |= mute_type
|
||||
log_admin("SPAM AUTOMUTE: [muteunmute] [key_name(M)] from [mute_string]")
|
||||
message_admins("SPAM AUTOMUTE: [muteunmute] [key_name_admin(M)] from [mute_string].", 1)
|
||||
to_chat(M, span_alert("You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin."))
|
||||
target.client.prefs.muted |= mute_type
|
||||
log_admin("SPAM AUTOMUTE: [muteunmute] [key_name(target)] from [mute_string]")
|
||||
message_admins("SPAM AUTOMUTE: [muteunmute] [key_name_admin(target)] from [mute_string].", 1)
|
||||
to_chat(target, span_alert("You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin."))
|
||||
feedback_add_details("admin_verb","AUTOMUTE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
if(M.client.prefs.muted & mute_type)
|
||||
if(target.client.prefs.muted & mute_type)
|
||||
muteunmute = "unmuted"
|
||||
M.client.prefs.muted &= ~mute_type
|
||||
target.client.prefs.muted &= ~mute_type
|
||||
else
|
||||
muteunmute = "muted"
|
||||
M.client.prefs.muted |= mute_type
|
||||
target.client.prefs.muted |= mute_type
|
||||
|
||||
log_admin("[key_name(usr)] has [muteunmute] [key_name(M)] from [mute_string]")
|
||||
message_admins("[key_name_admin(usr)] has [muteunmute] [key_name_admin(M)] from [mute_string].", 1)
|
||||
to_chat(M, span_alert("You have been [muteunmute] from [mute_string]."))
|
||||
log_admin("[key_name(user)] has [muteunmute] [key_name(target)] from [mute_string]")
|
||||
message_admins("[key_name_admin(user)] has [muteunmute] [key_name_admin(target)] from [mute_string].", 1)
|
||||
to_chat(target, span_alert("You have been [muteunmute] from [mute_string]."))
|
||||
feedback_add_details("admin_verb","MUTE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
ADMIN_VERB(cmd_admin_add_random_ai_law, R_ADMIN|R_FUN, "Add Random AI Law", "Adds a random law to the station ai.", ADMIN_CATEGORY_FUN_SILICON)
|
||||
@@ -626,7 +607,7 @@ ADMIN_VERB(cmd_admin_add_freeform_ai_law, R_FUN, "Add Custom AI law", "Adds a cu
|
||||
GLOB.command_announcement.Announce("Ion storm detected near the [station_name()]. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg')
|
||||
feedback_add_details("admin_verb","IONC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
ADMIN_VERB_AND_CONTEXT_MENU(cmd_admin_rejuvenate, R_ADMIN|R_FUN|R_MOD, "Rejuvenate", "Fully restores the target mob.", ADMIN_CATEGORY_GAME, mob/living/target_mob as mob in GLOB.mob_list)
|
||||
ADMIN_VERB_AND_CONTEXT_MENU(cmd_admin_rejuvenate, R_ADMIN|R_FUN|R_MOD, "Rejuvenate", "Fully restores the target mob.", ADMIN_CATEGORY_GAME, mob/living/target_mob in GLOB.mob_list)
|
||||
if(!target_mob)
|
||||
return
|
||||
if(!istype(target_mob))
|
||||
@@ -676,7 +657,7 @@ ADMIN_VERB(cmd_admin_list_open_jobs, R_HOLDER, "List free slots", "Show availabl
|
||||
to_chat(user, "[job.title]: [job.total_positions]")
|
||||
feedback_add_details("admin_verb","LFS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
ADMIN_VERB(cmd_admin_check_contents, R_HOLDER, "Check Contents", "Check the contents of the mob.", ADMIN_CATEGORY_INVESTIGATE, mob/living/living_target as mob in GLOB.mob_list)
|
||||
ADMIN_VERB(cmd_admin_check_contents, R_HOLDER, "Check Contents", "Check the contents of the mob.", ADMIN_CATEGORY_INVESTIGATE, mob/living/living_target in GLOB.mob_list)
|
||||
var/list/content_list = living_target.get_contents()
|
||||
for(var/target in content_list)
|
||||
to_chat(user, "[target]")
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
/client/proc/spawn_character_mob()
|
||||
set category = "Fun.Event Kit"
|
||||
set name = "Spawn Character As Mob"
|
||||
set desc = "Spawn a specified ckey as a chosen mob."
|
||||
|
||||
if(!holder)
|
||||
return
|
||||
|
||||
var/client/picked_client = tgui_input_list(src, "Who are we spawning as a mob?", "Client", GLOB.clients)
|
||||
ADMIN_VERB(spawn_character_mob, R_SPAWN, "Spawn Character As Mob", "Spawn a specified ckey as a chosen mob.", ADMIN_CATEGORY_FUN_EVENT_KIT)
|
||||
var/client/picked_client = tgui_input_list(user, "Who are we spawning as a mob?", "Client", GLOB.clients)
|
||||
if(!picked_client)
|
||||
return
|
||||
var/list/types = typesof(/mob/living)
|
||||
var/mob_type = tgui_input_text(src, "Mob path to spawn as?", "Mob")
|
||||
var/mob_type = tgui_input_text(user, "Mob path to spawn as?", "Mob")
|
||||
if(!mob_type)
|
||||
return
|
||||
var/list/matches = new()
|
||||
@@ -23,17 +17,17 @@
|
||||
if(matches.len==1)
|
||||
chosen = matches[1]
|
||||
else
|
||||
chosen = tgui_input_list(usr, "Select a mob type", "Select Mob", matches)
|
||||
chosen = tgui_input_list(user, "Select a mob type", "Select Mob", matches)
|
||||
if(!chosen)
|
||||
return
|
||||
|
||||
var/char_name = tgui_alert(src, "Spawn mob with their character name?", "Mob name", list("Yes", "No", "Cancel"))
|
||||
var/char_name = tgui_alert(user, "Spawn mob with their character name?", "Mob name", list("Yes", "No", "Cancel"))
|
||||
var/name = 0
|
||||
if(!char_name || char_name == "Cancel")
|
||||
return
|
||||
if(char_name == "Yes")
|
||||
name = 1
|
||||
var/vorgans = tgui_alert(src, "Spawn mob with their character's vore organs and prefs?", "Vore organs", list("Yes", "No", "Cancel"))
|
||||
var/vorgans = tgui_alert(user, "Spawn mob with their character's vore organs and prefs?", "Vore organs", list("Yes", "No", "Cancel"))
|
||||
var/organs
|
||||
if(!vorgans || vorgans == "Cancel")
|
||||
return
|
||||
@@ -42,18 +36,18 @@
|
||||
if(vorgans == "No")
|
||||
organs = 0
|
||||
|
||||
var/flavor = tgui_alert(src, "Spawn mob with their character's flavor text?", "Flavor text", list("General", "Robot", "Cancel"))
|
||||
var/flavor = tgui_alert(user, "Spawn mob with their character's flavor text?", "Flavor text", list("General", "Robot", "Cancel"))
|
||||
|
||||
var/spawnloc
|
||||
if(!src.mob)
|
||||
to_chat(src, "Can't spawn them in unless you're in a valid spawn location!")
|
||||
if(!user.mob)
|
||||
to_chat(user, "Can't spawn them in unless you're in a valid spawn location!")
|
||||
return
|
||||
spawnloc = get_turf(src.mob)
|
||||
spawnloc = get_turf(user.mob)
|
||||
|
||||
var/mob/living/new_mob = new chosen(spawnloc)
|
||||
|
||||
if(!new_mob)
|
||||
to_chat(src, "Spawning failed, try again or bully coders")
|
||||
to_chat(user, "Spawning failed, try again or bully coders")
|
||||
return
|
||||
new_mob.ai_holder_type = /datum/ai_holder/simple_mob/inert //Dont want the mob AI to activate if the client dc's or anything
|
||||
|
||||
@@ -73,12 +67,12 @@
|
||||
if(LAZYLEN(new_mob.vore_organs))
|
||||
new_mob.vore_selected = new_mob.vore_organs[1]
|
||||
if(isanimal(new_mob))
|
||||
var/mob/living/simple_mob/Sm = new_mob
|
||||
if(!Sm.voremob_loaded || !Sm.vore_active)
|
||||
Sm.init_vore(TRUE)
|
||||
var/mob/living/simple_mob/new_simple_mob = new_mob
|
||||
if(!new_simple_mob.voremob_loaded || !new_simple_mob.vore_active)
|
||||
new_simple_mob.init_vore(TRUE)
|
||||
|
||||
log_admin("[key_name_admin(src)] has spawned [new_mob.key] as mob [new_mob.type].")
|
||||
message_admins("[key_name_admin(src)] has spawned [new_mob.key] as mob [new_mob.type].", 1)
|
||||
log_admin("[key_name_admin(user)] has spawned [new_mob.key] as mob [new_mob.type].")
|
||||
message_admins("[key_name_admin(user)] has spawned [new_mob.key] as mob [new_mob.type].", 1)
|
||||
|
||||
to_chat(new_mob, "You've been spawned as a mob! Have fun.")
|
||||
|
||||
@@ -86,8 +80,8 @@
|
||||
|
||||
return new_mob
|
||||
|
||||
ADMIN_VERB(cmd_admin_z_narrate, (R_ADMIN|R_MOD|R_EVENT), "Z Narrate", "Narrates to your Z level.", "Fun.Narrate") // Allows administrators to fluff events a little easier -- TLE
|
||||
var/msg = tgui_input_text(usr, "Message:", text("Enter the text you wish to appear to everyone:"))
|
||||
ADMIN_VERB(cmd_admin_z_narrate, (R_ADMIN|R_MOD|R_EVENT), "Z Narrate", "Narrates to your Z level.", ADMIN_CATEGORY_FUN_NARRATE) // Allows administrators to fluff events a little easier -- TLE
|
||||
var/msg = tgui_input_text(user, "Message:", text("Enter the text you wish to appear to everyone:"))
|
||||
|
||||
if (!msg)
|
||||
return
|
||||
@@ -108,19 +102,15 @@ ADMIN_VERB(cmd_admin_z_narrate, (R_ADMIN|R_MOD|R_EVENT), "Z Narrate", "Narrates
|
||||
message_admins(span_blue(span_bold(" ZNarrate: [key_name_admin(user)] : [msg]<BR>")), 1)
|
||||
feedback_add_details("admin_verb","GLNA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/toggle_vantag_hud(var/mob/target as mob)
|
||||
set category = "Fun.Event Kit"
|
||||
set name = "Give/Remove Event HUD"
|
||||
set desc = "Give a mob the event hud, which shows them other people's event preferences, or remove it from them"
|
||||
|
||||
ADMIN_VERB_AND_CONTEXT_MENU(toggle_vantag_hud, R_EVENT|R_ADMIN|R_SERVER, "Give/Remove Event HUD", "Give a mob the event hud, which shows them other people's event preferences, or remove it from them.", ADMIN_CATEGORY_FUN_EVENT_KIT, mob/target in GLOB.player_list)
|
||||
if(target.vantag_hud)
|
||||
target.vantag_hud = FALSE
|
||||
target.recalculate_vis()
|
||||
to_chat(src, "You removed the event HUD from [key_name(target)].")
|
||||
to_chat(user, "You removed the event HUD from [key_name(target)].")
|
||||
to_chat(target, "You no longer have the event HUD.")
|
||||
else
|
||||
target.vantag_hud = TRUE
|
||||
target.recalculate_vis()
|
||||
to_chat(src, "You gave the event HUD to [key_name(target)].")
|
||||
to_chat(user, "You gave the event HUD to [key_name(target)].")
|
||||
to_chat(target, "You now have the event HUD. Icons will appear next to characters indicating if they prefer to be killed(red crosshairs), devoured(belly), or kidnapped(blue crosshairs) by event characters.")
|
||||
feedback_add_details("admin_verb","GREHud") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -57,16 +57,7 @@ ADMIN_VERB(secrets, R_HOLDER, "Secrets", "Abuse harder than you ever have before
|
||||
browser.set_content(dat)
|
||||
browser.open()
|
||||
if("dialog_log")
|
||||
var/dat = span_bold("Dialog Log<HR>")
|
||||
dat += "<fieldset style='border: 2px solid white; display: inline'>"
|
||||
for(var/l in GLOB.round_text_log)
|
||||
dat += "<li>[l]</li>"
|
||||
dat += "</fieldset>"
|
||||
if(!GLOB.round_text_log)
|
||||
dat += "No-one has said anything this round! (How odd?)"
|
||||
var/datum/browser/browser = new(holder, "dialog_logs", "[src]", 550, 650, src)
|
||||
browser.set_content(jointext(dat,null))
|
||||
browser.open()
|
||||
SSadmin_verbs.dynamic_invoke_verb(ui.user, /datum/admin_verb/persistent_client_logs)
|
||||
if("show_admins")
|
||||
var/dat
|
||||
if(GLOB.admin_datums)
|
||||
@@ -77,7 +68,7 @@ ADMIN_VERB(secrets, R_HOLDER, "Secrets", "Abuse harder than you ever have before
|
||||
browser.set_content(dat)
|
||||
browser.open()
|
||||
if("show_traitors_and_objectives") // Not implemented in the UI
|
||||
holder.holder.check_antagonists()
|
||||
holder.holder.check_antagonists(ui.user.client)
|
||||
if("show_game_mode")
|
||||
if (SSticker.mode) tgui_alert_async(holder, "The game mode is [SSticker.mode.name]")
|
||||
else tgui_alert_async(holder, "For some reason there's a ticker, but not a game mode")
|
||||
|
||||
Reference in New Issue
Block a user