mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
refactor user verb sources (#31411)
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
USER_VERB(aooc, R_ADMIN, "AOOC", "Antagonist OOC", VERB_CATEGORY_OOC, msg as text)
|
||||
msg = sanitize(msg)
|
||||
if(!msg) return
|
||||
|
||||
var/display_name = client.key
|
||||
if(client.holder && client.holder.fakekey)
|
||||
display_name = client.holder.fakekey
|
||||
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if((M.mind && M.mind.special_role && M.client) || (M.client && M.client.holder && (M.client.holder.rights & R_ADMIN)))
|
||||
to_chat(M, "<font color='#960018'>[SPAN_OOC("[SPAN_PREFIX("AOOC:")] <EM>[display_name]:</EM> [SPAN_MESSAGE("[msg]")]")]</font>")
|
||||
|
||||
log_aooc(msg, client)
|
||||
@@ -1,34 +0,0 @@
|
||||
USER_VERB(change_custom_event, R_EVENT, "Change Custom Event", "Set a custom event.", VERB_CATEGORY_EVENT)
|
||||
var/input = input(client, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", GLOB.custom_event_msg) as message|null
|
||||
if(!input || input == "")
|
||||
GLOB.custom_event_msg = null
|
||||
log_admin("[key_name(client)] has cleared the custom event text.")
|
||||
message_admins("[key_name_admin(client)] has cleared the custom event text.")
|
||||
return
|
||||
|
||||
log_admin("[key_name(client)] has changed the custom event text.")
|
||||
message_admins("[key_name_admin(client)] has changed the custom event text.")
|
||||
|
||||
GLOB.custom_event_msg = input
|
||||
|
||||
to_chat(world, "<h1 class='alert'>Custom Event</h1>")
|
||||
to_chat(world, "<h2 class='alert'>A custom event is starting. OOC Info:</h2>")
|
||||
to_chat(world, SPAN_ALERT("[html_encode(GLOB.custom_event_msg)]"))
|
||||
to_chat(world, "<br>")
|
||||
|
||||
// normal verb for players to view info
|
||||
/client/verb/cmd_view_custom_event()
|
||||
set category = "OOC"
|
||||
set name = "Custom Event Info"
|
||||
|
||||
var/list/custom_event_information = list()
|
||||
if(!GLOB.custom_event_msg || GLOB.custom_event_msg == "")
|
||||
custom_event_information += "There currently is no known custom event taking place."
|
||||
custom_event_information += "Keep in mind: it is possible that an admin has not properly set this."
|
||||
to_chat(src, chat_box_regular(custom_event_information.Join("<br>")))
|
||||
return
|
||||
|
||||
custom_event_information += "<h1 class='alert'>Custom Event</h1>"
|
||||
custom_event_information += "<h2 class='alert'>A custom event is taking place. OOC Info:</h2>"
|
||||
custom_event_information += SPAN_ALERT("[html_encode(GLOB.custom_event_msg)]")
|
||||
to_chat(src, chat_box_regular(custom_event_information.Join("<br>")))
|
||||
@@ -216,106 +216,6 @@ USER_VERB(air_status, R_DEBUG, "Air Status in Location", "Print out the local ai
|
||||
usr.show_message(t, 1)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Air Status (Location)") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
USER_VERB(admin_robotize, R_SPAWN, "Make Robot", "Turn the target into a borg.", VERB_CATEGORY_EVENT, mob/M in GLOB.mob_list)
|
||||
if(SSticker.current_state < GAME_STATE_PLAYING)
|
||||
alert(client, "Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
log_admin("[key_name(client)] has robotized [M.key].")
|
||||
spawn(10)
|
||||
M:Robotize()
|
||||
|
||||
else
|
||||
alert(client, "Invalid mob")
|
||||
|
||||
USER_VERB(admin_animalize, R_SPAWN, "Make Simple Animal", "Turn the target into a simple animal.", VERB_CATEGORY_EVENT, mob/M in GLOB.mob_list)
|
||||
if(SSticker.current_state < GAME_STATE_PLAYING)
|
||||
alert(client, "Wait until the game starts")
|
||||
return
|
||||
|
||||
if(!M)
|
||||
alert(client, "That mob doesn't seem to exist, close the panel and try again.")
|
||||
return
|
||||
|
||||
if(isnewplayer(M))
|
||||
alert(client, "The mob must not be a new_player.")
|
||||
return
|
||||
|
||||
log_admin("[key_name(client)] has animalized [M.key].")
|
||||
spawn(10)
|
||||
M.Animalize()
|
||||
|
||||
USER_VERB(admin_make_pai, R_SPAWN, "Make pAI", "Specify a location to spawn a pAI device, then specify a key to play that pAI", VERB_CATEGORY_EVENT, turf/T in GLOB.mob_list)
|
||||
var/list/available = list()
|
||||
for(var/mob/C in GLOB.mob_list)
|
||||
if(C.key)
|
||||
available.Add(C)
|
||||
var/mob/choice = input(client, "Choose a player to play the pAI", "Spawn pAI") in available
|
||||
if(!choice)
|
||||
return 0
|
||||
if(!isobserver(choice))
|
||||
var/confirm = input(client, "[choice.key] isn't ghosting right now. Are you sure you want to yank [choice.p_them()] out of [choice.p_their()] body and place [choice.p_them()] in this pAI?", "Spawn pAI Confirmation", "No") in list("Yes", "No")
|
||||
if(confirm != "Yes")
|
||||
return 0
|
||||
var/obj/item/paicard/card = new(T)
|
||||
var/mob/living/silicon/pai/pai = new(card)
|
||||
var/raw_name = clean_input("Enter your pAI name:", "pAI Name", "Personal AI", choice, user = client)
|
||||
var/new_name = reject_bad_name(raw_name, 1)
|
||||
if(new_name)
|
||||
pai.name = new_name
|
||||
pai.real_name = new_name
|
||||
else
|
||||
to_chat(client, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
|
||||
pai.real_name = pai.name
|
||||
pai.key = choice.key
|
||||
card.setPersonality(pai)
|
||||
for(var/datum/pai_save/candidate in GLOB.paiController.pai_candidates)
|
||||
if(candidate.owner.ckey == choice.ckey)
|
||||
GLOB.paiController.pai_candidates.Remove(candidate)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Make pAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
USER_VERB(admin_alienize, R_SPAWN, "Make Alien", "Turn the target mob into an alien.", VERB_CATEGORY_EVENT, mob/M in GLOB.mob_list)
|
||||
if(SSticker.current_state < GAME_STATE_PLAYING)
|
||||
alert(client, "Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
log_admin("[key_name(client)] has alienized [M.key].")
|
||||
spawn(10)
|
||||
M:Alienize()
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Make Alien") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(client)] made [key_name(M)] into an alien.")
|
||||
message_admins(SPAN_NOTICE("[key_name_admin(client)] made [key_name(M)] into an alien."), 1)
|
||||
else
|
||||
alert(client, "Invalid mob")
|
||||
|
||||
USER_VERB(admin_slimezie, R_SPAWN, "Make slime", "Turn the target mob into a slime.", VERB_CATEGORY_EVENT, mob/M in GLOB.mob_list)
|
||||
if(SSticker.current_state < GAME_STATE_PLAYING)
|
||||
alert(client, "Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
log_admin("[key_name(client)] has slimeized [M.key].")
|
||||
spawn(10)
|
||||
M:slimeize()
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Make Slime") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(client)] made [key_name(M)] into a slime.")
|
||||
message_admins(SPAN_NOTICE("[key_name_admin(client)] made [key_name(M)] into a slime."), 1)
|
||||
else
|
||||
alert(client, "Invalid mob")
|
||||
|
||||
USER_VERB(admin_super, R_SPAWN, "Make Superhero", "Turn the target mob into a superhero.", VERB_CATEGORY_EVENT, mob/M in GLOB.mob_list)
|
||||
if(SSticker.current_state < GAME_STATE_PLAYING)
|
||||
alert(client, "Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
var/type = input(client, "Pick the Superhero","Superhero") as null|anything in GLOB.all_superheroes
|
||||
var/datum/superheroes/S = GLOB.all_superheroes[type]
|
||||
if(S)
|
||||
S.create(M)
|
||||
log_admin("[key_name(client)] has turned [M.key] into a Superhero.")
|
||||
message_admins(SPAN_NOTICE("[key_name_admin(client)] made [key_name(M)] into a Superhero."), 1)
|
||||
else
|
||||
alert(client, "Invalid mob")
|
||||
|
||||
USER_VERB(delete_singulo, R_DEBUG, "Del Singulo / Tesla", "Delete all singularities and tesla balls.", VERB_CATEGORY_DEBUG)
|
||||
//This gets a confirmation check because it's way easier to accidentally hit this and delete things than it is with qdel-all
|
||||
var/confirm = alert(client, "This will delete ALL Singularities and Tesla orbs except for any that are on away mission z-levels or the centcomm z-level. Are you sure you want to delete them?", "Confirm Panic Button", "Yes", "No")
|
||||
@@ -337,35 +237,6 @@ USER_VERB(make_powernets, R_DEBUG, "Make Powernets", "Remake all powernets.", VE
|
||||
message_admins("[key_name_admin(client)] has remade the powernets. makepowernets() called.", 0)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Make Powernets") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
USER_VERB_VISIBILITY(grant_full_access, VERB_VISIBILITY_FLAG_MOREDEBUG)
|
||||
USER_VERB(grant_full_access, R_EVENT, "Grant Full Access", "Gives mob all-access.", VERB_CATEGORY_ADMIN, mob/M in GLOB.mob_list)
|
||||
if(SSticker.current_state < GAME_STATE_PLAYING)
|
||||
alert(client, "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()+get_all_centcom_access()+get_all_syndicate_access()
|
||||
else
|
||||
var/obj/item/card/id/id = new/obj/item/card/id(M)
|
||||
id.icon_state = "gold"
|
||||
id:access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
|
||||
id.registered_name = H.real_name
|
||||
id.assignment = "Captain"
|
||||
id.name = "[id.registered_name]'s ID Card ([id.assignment])"
|
||||
H.equip_to_slot_or_del(id, ITEM_SLOT_ID)
|
||||
H.update_inv_wear_id()
|
||||
else
|
||||
alert(client, "Invalid mob")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Grant Full Access") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(client)] has granted [M.key] full access.")
|
||||
message_admins(SPAN_NOTICE("[key_name_admin(client)] has granted [M.key] full access."), 1)
|
||||
|
||||
USER_VERB_VISIBILITY(assume_direct_control, VERB_VISIBILITY_FLAG_MOREDEBUG)
|
||||
USER_VERB(assume_direct_control, R_ADMIN|R_DEBUG, "Assume direct control", "Direct intervention", VERB_CATEGORY_ADMIN, mob/M in GLOB.mob_list)
|
||||
if(M.ckey)
|
||||
@@ -493,37 +364,6 @@ USER_VERB(mapping_area_test, R_DEBUG, "Test areas", "Run mapping area test", VER
|
||||
for(var/areatype in areas_without_camera)
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
USER_CONTEXT_MENU(select_equipment, R_EVENT, "\[Admin\] Select equipment", mob/living/carbon/human/M in GLOB.human_list)
|
||||
if(!ishuman(M) && !isobserver(M))
|
||||
alert(client, "Invalid mob")
|
||||
return
|
||||
|
||||
var/dresscode = client.robust_dress_shop()
|
||||
|
||||
if(!dresscode)
|
||||
return
|
||||
|
||||
var/delete_pocket
|
||||
var/mob/living/carbon/human/H
|
||||
if(isobserver(M))
|
||||
H = M.change_mob_type(/mob/living/carbon/human, null, null, TRUE)
|
||||
else
|
||||
H = M
|
||||
if(H.l_store || H.r_store || H.s_store) //saves a lot of time for admins and coders alike
|
||||
if(alert(client, "Should the items in their pockets be dropped? Selecting \"No\" will delete them.", "Robust quick dress shop", "Yes", "No") == "No")
|
||||
delete_pocket = TRUE
|
||||
|
||||
for(var/obj/item/I in H.get_equipped_items(delete_pocket))
|
||||
qdel(I)
|
||||
if(dresscode != "Naked")
|
||||
H.equipOutfit(dresscode)
|
||||
|
||||
H.regenerate_icons()
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Select Equipment") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(client)] changed the equipment of [key_name(M)] to [dresscode].")
|
||||
message_admins(SPAN_NOTICE("[key_name_admin(client)] changed the equipment of [key_name_admin(M)] to [dresscode]."), 1)
|
||||
|
||||
/client/proc/robust_dress_shop(list/potential_minds)
|
||||
var/list/special_outfits = list(
|
||||
"Naked",
|
||||
@@ -787,3 +627,93 @@ USER_VERB(view_bug_reports, R_DEBUG|R_VIEWRUNTIMES|R_ADMIN, "View Bug Reports",
|
||||
return
|
||||
form.ui_interact(client.mob)
|
||||
|
||||
USER_VERB(debug_statpanel, R_DEBUG, "Debug Stat Panel", "Toggles local debug of the stat panel", VERB_CATEGORY_DEBUG)
|
||||
client.stat_panel.send_message("create_debug")
|
||||
|
||||
USER_VERB(profile_code, R_DEBUG|R_VIEWRUNTIMES, "Profile Code", "View code profiler", VERB_CATEGORY_DEBUG)
|
||||
winset(client, null, "command=.profile")
|
||||
|
||||
USER_VERB(raw_gas_scan, R_DEBUG|R_VIEWRUNTIMES, "Raw Gas Scan", "Scans your current tile, including LINDA data not normally displayed.", VERB_CATEGORY_DEBUG)
|
||||
atmos_scan(client.mob, get_turf(client.mob), silent = TRUE, milla_turf_details = TRUE)
|
||||
|
||||
USER_VERB(find_interesting_turf, R_DEBUG|R_VIEWRUNTIMES, "Interesting Turf", \
|
||||
"Teleports you to a random Interesting Turf from MILLA", VERB_CATEGORY_DEBUG)
|
||||
if(!isobserver(client.mob))
|
||||
to_chat(client.mob, SPAN_WARNING("You must be an observer to do this!"))
|
||||
return
|
||||
|
||||
var/list/interesting_tile = get_random_interesting_tile()
|
||||
if(!length(interesting_tile))
|
||||
to_chat(client, SPAN_NOTICE("There are no interesting turfs. How interesting!"))
|
||||
return
|
||||
|
||||
var/turf/T = interesting_tile[MILLA_INDEX_TURF]
|
||||
var/mob/dead/observer/O = client.mob
|
||||
admin_forcemove(O, T)
|
||||
O.manual_follow(T)
|
||||
|
||||
USER_VERB(visualize_interesting_turfs, R_DEBUG|R_VIEWRUNTIMES, "Visualize Interesting Turfs", "Shows all the Interesting Turfs from MILLA", VERB_CATEGORY_DEBUG)
|
||||
if(SSair.interesting_tile_count > 500)
|
||||
// This can potentially iterate through a list thats 20k things long. Give ample warning to the user
|
||||
if(tgui_alert(client, "WARNING: There are [SSair.interesting_tile_count] Interesting Turfs. This process will be lag intensive and should only be used if the atmos controller \
|
||||
is screaming bloody murder. Are you sure you with to continue", "WARNING", list("I am sure", "Nope")) != "I am sure")
|
||||
return
|
||||
else
|
||||
if(tgui_alert(client, "Visualizing turfs may cause server to lag. Are you sure?", "Warning", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
|
||||
var/display_turfs_overlay = FALSE
|
||||
if(tgui_alert(client, "Would you like to have all interesting turfs have a client side overlay applied as well?", "Optional", list("Yes", "No")) == "Yes")
|
||||
display_turfs_overlay = TRUE
|
||||
|
||||
message_admins("[key_name_admin(client)] is visualizing interesting atmos turfs. Server may lag.")
|
||||
|
||||
var/list/zlevel_turf_indexes = list()
|
||||
|
||||
var/list/coords = get_interesting_atmos_tiles()
|
||||
if(!length(coords))
|
||||
to_chat(client, SPAN_NOTICE("There are no interesting turfs. How interesting!"))
|
||||
return
|
||||
|
||||
while(length(coords))
|
||||
var/offset = length(coords) - MILLA_INTERESTING_TILE_SIZE
|
||||
var/turf/T = coords[offset + MILLA_INDEX_TURF]
|
||||
coords.len -= MILLA_INTERESTING_TILE_SIZE
|
||||
|
||||
|
||||
// ENSURE YOU USE STRING NUMBERS HERE, THIS IS A DICTIONARY KEY NOT AN INDEX!!!
|
||||
if(!zlevel_turf_indexes["[T.z]"])
|
||||
zlevel_turf_indexes["[T.z]"] = list()
|
||||
zlevel_turf_indexes["[T.z]"] |= T
|
||||
if(display_turfs_overlay)
|
||||
client.images += image('icons/effects/alphacolors.dmi', T, "red")
|
||||
CHECK_TICK
|
||||
|
||||
// Sort the keys
|
||||
zlevel_turf_indexes = sortAssoc(zlevel_turf_indexes)
|
||||
|
||||
for(var/key in zlevel_turf_indexes)
|
||||
to_chat(client, SPAN_NOTICE("Z[key]: <b>[length(zlevel_turf_indexes["[key]"])] Interesting Turfs</b>"))
|
||||
|
||||
var/z_to_view = tgui_input_number(client, "A list of z-levels their ITs has appeared in chat. Please enter a Z to visualize. Enter 0 or close the window to cancel", "Selection", 0)
|
||||
|
||||
if(!z_to_view)
|
||||
return
|
||||
|
||||
// Do not combine these
|
||||
var/list/ui_dat = list()
|
||||
var/list/turf_markers = list()
|
||||
|
||||
var/datum/browser/vis = new(client, "atvis", "Interesting Turfs (Z[z_to_view])", 300, 315)
|
||||
ui_dat += "<center><canvas width=\"255px\" height=\"255px\" id=\"atmos\"></canvas></center>"
|
||||
ui_dat += "<script>e=document.getElementById(\"atmos\");c=e.getContext('2d');c.fillStyle='#ffffff';c.fillRect(0,0,255,255);function s(x,y){var p=c.createImageData(1,1);p.data\[0]=255;p.data\[1]=0;p.data\[2]=0;p.data\[3]=255;c.putImageData(p,(x-1),255-Math.abs(y-1));}</script>"
|
||||
// Now generate the other list
|
||||
for(var/x in zlevel_turf_indexes["[z_to_view]"])
|
||||
var/turf/T = x
|
||||
turf_markers += "s([T.x],[T.y]);"
|
||||
CHECK_TICK
|
||||
|
||||
ui_dat += "<script>[turf_markers.Join("")]</script>"
|
||||
|
||||
vis.set_content(ui_dat.Join(""))
|
||||
vis.open(FALSE)
|
||||
@@ -0,0 +1,43 @@
|
||||
/// Allow admin to add or remove traits of datum
|
||||
/datum/admins/proc/modify_traits(datum/D)
|
||||
if(!D)
|
||||
return
|
||||
|
||||
var/add_or_remove = tgui_input_list(usr, "Add or Remove Trait?", "Modify Trait", list("Add","Remove"))
|
||||
if(!add_or_remove)
|
||||
return
|
||||
var/list/availible_traits = list()
|
||||
|
||||
switch(add_or_remove)
|
||||
if("Add")
|
||||
for(var/key in GLOB.traits_by_type)
|
||||
if(istype(D, key))
|
||||
availible_traits += GLOB.traits_by_type[key]
|
||||
if("Remove")
|
||||
if(!GLOB.trait_name_map)
|
||||
GLOB.trait_name_map = generate_trait_name_map()
|
||||
for(var/trait in D.status_traits)
|
||||
var/name = GLOB.trait_name_map[trait] || trait
|
||||
availible_traits[name] = trait
|
||||
|
||||
var/chosen_trait = tgui_input_list(usr, "Select trait to modify.", "Traits", availible_traits)
|
||||
if(!chosen_trait)
|
||||
return
|
||||
chosen_trait = availible_traits[chosen_trait]
|
||||
|
||||
var/source = "adminabuse"
|
||||
switch(add_or_remove)
|
||||
if("Add") //Not doing source choosing here intentionally to make this bit faster to use, you can always vv it.
|
||||
ADD_TRAIT(D, chosen_trait, source)
|
||||
if("Remove")
|
||||
var/specific = tgui_input_list(usr, "All or from a specific source?", "Add or Remove Trait", list("All","Specific"))
|
||||
if(!specific)
|
||||
return
|
||||
switch(specific)
|
||||
if("All")
|
||||
source = null
|
||||
if("Specific")
|
||||
source = tgui_input_list(usr, "Source to be removed?", "Add or Remove Trait", D.status_traits[chosen_trait])
|
||||
if(!source)
|
||||
return
|
||||
REMOVE_TRAIT(D, chosen_trait, source)
|
||||
@@ -1,7 +1,3 @@
|
||||
USER_VERB(one_click_antag, R_SERVER|R_EVENT, "Create Antagonist", "Auto-create an antagonist of your choice", VERB_CATEGORY_EVENT)
|
||||
if(client.holder)
|
||||
client.holder.one_click_antag()
|
||||
|
||||
/datum/admins/proc/one_click_antag()
|
||||
|
||||
var/dat = {"<B>One-click Antagonist</B><br>
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
USER_VERB(aooc, R_ADMIN, "AOOC", "Antagonist OOC", VERB_CATEGORY_OOC, msg as text)
|
||||
msg = sanitize(msg)
|
||||
if(!msg) return
|
||||
|
||||
var/display_name = client.key
|
||||
if(client.holder && client.holder.fakekey)
|
||||
display_name = client.holder.fakekey
|
||||
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if((M.mind && M.mind.special_role && M.client) || (M.client && M.client.holder && (M.client.holder.rights & R_ADMIN)))
|
||||
to_chat(M, "<font color='#960018'>[SPAN_OOC("[SPAN_PREFIX("AOOC:")] <EM>[display_name]:</EM> [SPAN_MESSAGE("[msg]")]")]</font>")
|
||||
|
||||
log_aooc(msg, client)
|
||||
|
||||
USER_VERB(announce, R_ADMIN, "Announce", "Announce your desires to the world", VERB_CATEGORY_ADMIN)
|
||||
var/message = input(client, "Global message to send:", "Admin Announce", null) as message|null
|
||||
if(message)
|
||||
if(!check_rights_client(R_SERVER, 0, client))
|
||||
message = adminscrub(message,500)
|
||||
message = replacetext(message, "\n", "<br>") // required since we're putting it in a <p> tag
|
||||
to_chat(world, chat_box_notice(SPAN_NOTICE("<b>[client.holder.fakekey ? "Administrator" : client.key] Announces:</b><br><br><p>[message]</p>")))
|
||||
log_admin("Announce: [key_name(client)] : [message]")
|
||||
for(var/client/clients_to_alert in GLOB.clients)
|
||||
window_flash(clients_to_alert)
|
||||
if(clients_to_alert.prefs?.sound & SOUND_ADMINHELP)
|
||||
SEND_SOUND(clients_to_alert, sound('sound/misc/server_alert.ogg'))
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Announce") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
USER_VERB(toggle_ooc, R_ADMIN, "Toggle OOC", "Globally Toggles OOC", VERB_CATEGORY_SERVER)
|
||||
toggle_ooc()
|
||||
log_and_message_admins("toggled OOC.")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle OOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
USER_VERB(toggle_looc, R_ADMIN, "Toggle LOOC", "Globally Toggles LOOC", VERB_CATEGORY_SERVER)
|
||||
GLOB.looc_enabled = !(GLOB.looc_enabled)
|
||||
if(GLOB.looc_enabled)
|
||||
to_chat(world, "<B>The LOOC channel has been globally enabled!</B>")
|
||||
else
|
||||
to_chat(world, "<B>The LOOC channel has been globally disabled!</B>")
|
||||
log_and_message_admins("toggled LOOC.")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle LOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
USER_VERB(toggle_dsay, R_ADMIN, "Toggle DSAY", "Globally Toggles DSAY", VERB_CATEGORY_SERVER)
|
||||
GLOB.dsay_enabled = !(GLOB.dsay_enabled)
|
||||
if(GLOB.dsay_enabled)
|
||||
to_chat(world, "<b>Deadchat has been globally enabled!</b>", MESSAGE_TYPE_DEADCHAT)
|
||||
else
|
||||
to_chat(world, "<b>Deadchat has been globally disabled!</b>", MESSAGE_TYPE_DEADCHAT)
|
||||
log_admin("[key_name(client)] toggled deadchat.")
|
||||
message_admins("[key_name_admin(client)] toggled deadchat.", 1)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Deadchat") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
USER_VERB(toggle_ooc_dead, R_ADMIN, "Toggle Dead OOC", "Toggle Dead OOC.", VERB_CATEGORY_SERVER)
|
||||
GLOB.dooc_enabled = !(GLOB.dooc_enabled)
|
||||
log_admin("[key_name(client)] toggled Dead OOC.")
|
||||
message_admins("[key_name_admin(client)] toggled Dead OOC.", 1)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Dead OOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
USER_VERB(toggle_emoji, R_ADMIN, "Toggle OOC Emoji", "Toggle OOC Emoji", VERB_CATEGORY_SERVER)
|
||||
GLOB.configuration.general.enable_ooc_emoji = !(GLOB.configuration.general.enable_ooc_emoji)
|
||||
log_admin("[key_name(client)] toggled OOC Emoji.")
|
||||
message_admins("[key_name_admin(client)] toggled OOC Emoji.", 1)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle OOC Emoji")
|
||||
@@ -0,0 +1,216 @@
|
||||
USER_CONTEXT_MENU(show_player_panel, R_ADMIN|R_MOD, "\[Admin\] Show Player Panel", mob/M)
|
||||
if(!M)
|
||||
to_chat(client, "You seem to be selecting a mob that doesn't exist anymore.")
|
||||
return
|
||||
|
||||
var/our_key = M.key
|
||||
if(M.client && M.client.holder)
|
||||
if(M.client.holder.fakekey && M.client.holder.big_brother)
|
||||
our_key = M.client.holder.fakekey
|
||||
|
||||
var/mob_uid = M.UID()
|
||||
|
||||
var/body = "<html><meta charset='UTF-8'><head><title>Options for [our_key]</title></head>"
|
||||
body += "<body>Options panel for <b>[M]</b>"
|
||||
if(M.client)
|
||||
body += " played by <b>[M.client]</b> "
|
||||
if(check_rights(R_PERMISSIONS, FALSE))
|
||||
body += "\[<A href='byond://?_src_=holder;editrights=rank;ckey=[M.ckey]'>[M.client.holder ? M.client.holder.rank : "Player"]</A>\] "
|
||||
else if(M.client.holder && M.client.holder.fakekey && M.client.holder.big_brother)
|
||||
body += "\[Player\] "
|
||||
else
|
||||
body += "\[[M.client.holder ? M.client.holder.rank : "Player"]\] "
|
||||
body += "\[<A href='byond://?_src_=holder;getplaytimewindow=[mob_uid]'>" + M.client.get_exp_type(EXP_TYPE_CREW) + " as [EXP_TYPE_CREW]</a>\]"
|
||||
body += "<br>BYOND account registration date: [M.client.byondacc_date || "ERROR"] [M.client.byondacc_age <= GLOB.configuration.general.byond_account_age_threshold ? "<b>" : ""]([M.client.byondacc_age] days old)[M.client.byondacc_age <= GLOB.configuration.general.byond_account_age_threshold ? "</b>" : ""]"
|
||||
body += "<br>BYOND client version: [M.client.byond_version].[M.client.byond_build]"
|
||||
body += "<br>Global Ban DB Lookup: [GLOB.configuration.url.centcom_ban_db_url ? "<a href='byond://?_src_=holder;open_ccbdb=[M.client.ckey]'>Lookup</a>" : "<i>Disabled</i>"]"
|
||||
body += "<br><a href='byond://?_src_=holder;clientmodcheck=[M.client.UID()]'>Check for client modification</a>"
|
||||
|
||||
body += "<br>"
|
||||
|
||||
if(isnewplayer(M))
|
||||
body += " <B>Hasn't Entered Game</B> "
|
||||
else
|
||||
body += " \[<A href='byond://?_src_=holder;revive=[mob_uid]'>Heal</A>\] "
|
||||
|
||||
|
||||
body += "<br><br>\[ "
|
||||
body += "<a href='byond://?_src_=holder;open_logging_view=[mob_uid];'>LOGS</a> - "
|
||||
body += "<a href='byond://?_src_=vars;Vars=[mob_uid]'>VV</a> - "
|
||||
body += "[ADMIN_TP(M,"TP")] - "
|
||||
if(M.client)
|
||||
body += "<a href='byond://?src=[usr.UID()];priv_msg=[M.client.ckey]'>PM</a> - "
|
||||
body += "[ADMIN_SM(M,"SM")] - "
|
||||
if(ishuman(M) && M.mind)
|
||||
body += "<a href='byond://?_src_=holder;HeadsetMessage=[mob_uid]'>HM</a> - "
|
||||
body += "[admin_jump_link(M)] - "
|
||||
body += "<a href='byond://?_src_=holder;adminalert=[mob_uid]'>SEND ALERT</a>\]</b><br>"
|
||||
body += "<b>Mob type:</b> [M.type]<br>"
|
||||
if(M.client)
|
||||
if(length(M.client.related_accounts_cid))
|
||||
body += "<b>Related accounts by CID:</b> [jointext(M.client.related_accounts_cid, " - ")]<br>"
|
||||
if(length(M.client.related_accounts_ip))
|
||||
body += "<b>Related accounts by IP:</b> [jointext(M.client.related_accounts_ip, " - ")]<br><br>"
|
||||
|
||||
if(M.ckey)
|
||||
body += "<b>Enabled AntagHUD</b>: [M.has_ahudded() ? "<b><font color='red'>TRUE</font></b>" : "false"]<br>"
|
||||
body += "<b>Roundstart observer</b>: [M.is_roundstart_observer() ? "<b>true</b>" : "false"]<br>"
|
||||
body += "<A href='byond://?_src_=holder;boot2=[mob_uid]'>Kick</A> | "
|
||||
body += "<A href='byond://?_src_=holder;newban=[mob_uid];dbbanaddckey=[M.ckey]'>Ban</A> | "
|
||||
body += "<A href='byond://?_src_=holder;jobban2=[mob_uid];dbbanaddckey=[M.ckey]'>Jobban</A> | "
|
||||
body += "<A href='byond://?_src_=holder;shownoteckey=[M.ckey]'>Notes</A> | "
|
||||
if(GLOB.configuration.url.forum_playerinfo_url)
|
||||
body += "<A href='byond://?_src_=holder;webtools=[M.ckey]'>WebInfo</A> | "
|
||||
if(M.client)
|
||||
if(M.client.watchlisted)
|
||||
body += "<A href='byond://?_src_=holder;watchremove=[M.ckey]'>Remove from Watchlist</A> | "
|
||||
body += "<A href='byond://?_src_=holder;watchedit=[M.ckey]'>Edit Watchlist Reason</A> "
|
||||
else
|
||||
body += "<A href='byond://?_src_=holder;watchadd=[M.ckey]'>Add to Watchlist</A> "
|
||||
|
||||
body += "| <A href='byond://?_src_=holder;sendtoprison=[mob_uid]'>Prison</A> | "
|
||||
body += "\ <A href='byond://?_src_=holder;sendbacktolobby=[mob_uid]'>Send back to Lobby</A> | "
|
||||
body += "\ <A href='byond://?_src_=holder;eraseflavortext=[mob_uid]'>Erase Flavor Text</A> | "
|
||||
body += "\ <A href='byond://?_src_=holder;userandomname=[mob_uid]'>Use Random Name</A> | "
|
||||
body += {"<br><b>Mute: </b>
|
||||
\[<A href='byond://?_src_=holder;mute=[mob_uid];mute_type=[MUTE_IC]'><font color='[check_mute(M.client.ckey, MUTE_IC) ? "red" : "#6685f5"]'>IC</font></a> |
|
||||
<A href='byond://?_src_=holder;mute=[mob_uid];mute_type=[MUTE_OOC]'><font color='[check_mute(M.client.ckey, MUTE_OOC) ? "red" : "#6685f5"]'>OOC</font></a> |
|
||||
<A href='byond://?_src_=holder;mute=[mob_uid];mute_type=[MUTE_PRAY]'><font color='[check_mute(M.client.ckey, MUTE_PRAY) ? "red" : "#6685f5"]'>PRAY</font></a> |
|
||||
<A href='byond://?_src_=holder;mute=[mob_uid];mute_type=[MUTE_ADMINHELP]'><font color='[check_mute(M.client.ckey, MUTE_ADMINHELP) ? "red" : "#6685f5"]'>ADMINHELP</font></a> |
|
||||
<A href='byond://?_src_=holder;mute=[mob_uid];mute_type=[MUTE_DEADCHAT]'><font color='[check_mute(M.client.ckey, MUTE_DEADCHAT) ?" red" : "#6685f5"]'>DEADCHAT</font></a> |
|
||||
<A href='byond://?_src_=holder;mute=[mob_uid];mute_type=[MUTE_EMOTE]'><font color='[check_mute(M.client.ckey, MUTE_EMOTE) ?" red" : "#6685f5"]'>EMOTE</font></a>]
|
||||
(<A href='byond://?_src_=holder;mute=[mob_uid];mute_type=[MUTE_ALL]'><font color='[check_mute(M.client.ckey, MUTE_ALL) ? "red" : "#6685f5"]'>toggle all</font></a>)
|
||||
"}
|
||||
|
||||
var/jumptoeye = ""
|
||||
if(is_ai(M))
|
||||
var/mob/living/silicon/ai/A = M
|
||||
if(A.client && A.eyeobj) // No point following clientless AI eyes
|
||||
jumptoeye = " <b>(<A href='byond://?_src_=holder;jumpto=[A.eyeobj.UID()]'>Eye</A>)</b>"
|
||||
body += {"<br><br>
|
||||
<A href='byond://?_src_=holder;jumpto=[mob_uid]'><b>Jump to</b></A>[jumptoeye] |
|
||||
<A href='byond://?_src_=holder;getmob=[mob_uid]'>Get</A> |
|
||||
<A href='byond://?_src_=holder;sendmob=[mob_uid]'>Send To</A>
|
||||
<br><br>
|
||||
[check_rights(R_ADMIN,0) ? "[ADMIN_TP(M,"Traitor panel")] | " : "" ]
|
||||
<A href='byond://?_src_=holder;narrateto=[mob_uid]'>Narrate to</A> |
|
||||
[ADMIN_SM(M,"Subtle message")]
|
||||
"}
|
||||
|
||||
if(check_rights(R_EVENT, 0))
|
||||
body += {" | <A href='byond://?_src_=holder;Bless=[mob_uid]'>Bless</A> | <A href='byond://?_src_=holder;Smite=[mob_uid]'>Smite</A>"}
|
||||
|
||||
if(isLivingSSD(M))
|
||||
if(istype(M.loc, /obj/machinery/cryopod))
|
||||
body += {" | <A href='byond://?_src_=holder;cryossd=[mob_uid]'>De-Spawn</A> "}
|
||||
else
|
||||
body += {" | <A href='byond://?_src_=holder;cryossd=[mob_uid]'>Cryo</A> "}
|
||||
|
||||
if(M.client)
|
||||
if(!isnewplayer(M))
|
||||
body += "<br><br>"
|
||||
body += "<b>Transformation:</b>"
|
||||
body += "<br>"
|
||||
|
||||
//Monkey
|
||||
if(issmall(M))
|
||||
body += "<B>Monkeyized</B> | "
|
||||
else
|
||||
body += "<A href='byond://?_src_=holder;monkeyone=[mob_uid]'>Monkeyize</A> | "
|
||||
|
||||
//Corgi
|
||||
if(iscorgi(M))
|
||||
body += "<B>Corgized</B> | "
|
||||
else
|
||||
body += "<A href='byond://?_src_=holder;corgione=[mob_uid]'>Corgize</A> | "
|
||||
|
||||
//AI / Cyborg
|
||||
if(is_ai(M))
|
||||
body += "<B>Is an AI</B> "
|
||||
else if(ishuman(M))
|
||||
body += {"<A href='byond://?_src_=holder;makeai=[mob_uid]'>Make AI</A> |
|
||||
<A href='byond://?_src_=holder;makerobot=[mob_uid]'>Make Robot</A> |
|
||||
<A href='byond://?_src_=holder;makealien=[mob_uid]'>Make Alien</A> |
|
||||
<A href='byond://?_src_=holder;makeslime=[mob_uid]'>Make Slime</A> |
|
||||
<A href='byond://?_src_=holder;makesuper=[mob_uid]'>Make Superhero</A> |
|
||||
"}
|
||||
|
||||
//Simple Animals
|
||||
if(isanimal_or_basicmob(M))
|
||||
body += "<A href='byond://?_src_=holder;makeanimal=[mob_uid]'>Re-Animalize</A> | "
|
||||
else
|
||||
body += "<A href='byond://?_src_=holder;makeanimal=[mob_uid]'>Animalize</A> | "
|
||||
|
||||
if(isobserver(M))
|
||||
body += "<A href='byond://?_src_=holder;incarn_ghost=[mob_uid]'>Re-incarnate</a> | "
|
||||
|
||||
if(ispAI(M))
|
||||
body += "<B>Is a pAI</B> "
|
||||
else
|
||||
body += "<A href='byond://?_src_=holder;makePAI=[mob_uid]'>Make pAI</A> | "
|
||||
|
||||
// DNA2 - Admin Hax
|
||||
if(M.dna && iscarbon(M))
|
||||
body += "<br><br>"
|
||||
body += "<b>DNA Blocks:</b><br><table border='0'><tr><th> </th><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th>"
|
||||
var/bname
|
||||
for(var/block in 1 to DNA_SE_LENGTH)
|
||||
if(((block-1)%5)==0)
|
||||
body += "</tr><tr><th>[block-1]</th>"
|
||||
bname = GLOB.assigned_blocks[block]
|
||||
body += "<td>"
|
||||
if(bname)
|
||||
var/bstate=M.dna.GetSEState(block)
|
||||
var/bcolor="[(bstate)?"#006600":"#ff0000"]"
|
||||
body += "<A href='byond://?_src_=holder;togmutate=[mob_uid];block=[block]' style='color:[bcolor];'>[bname]</A><sub>[block]</sub>"
|
||||
else
|
||||
body += "[block]"
|
||||
body+="</td>"
|
||||
body += "</tr></table>"
|
||||
|
||||
body += {"<br><br>
|
||||
<b>Rudimentary transformation:</b><font size=2><br>These transformations only create a new mob type and copy stuff over. They do not take into account MMIs and similar mob-specific things. The buttons in 'Transformations' are preferred, when possible.</font><br>
|
||||
<A href='byond://?_src_=holder;simplemake=observer;mob=[mob_uid]'>Observer</A> |
|
||||
\[ Alien: <A href='byond://?_src_=holder;simplemake=drone;mob=[mob_uid]'>Drone</A>,
|
||||
<A href='byond://?_src_=holder;simplemake=hunter;mob=[mob_uid]'>Hunter</A>,
|
||||
<A href='byond://?_src_=holder;simplemake=queen;mob=[mob_uid]'>Queen</A>,
|
||||
<A href='byond://?_src_=holder;simplemake=sentinel;mob=[mob_uid]'>Sentinel</A>,
|
||||
<A href='byond://?_src_=holder;simplemake=larva;mob=[mob_uid]'>Larva</A> \]
|
||||
<A href='byond://?_src_=holder;simplemake=human;mob=[mob_uid]'>Human</A>
|
||||
\[ slime: <A href='byond://?_src_=holder;simplemake=slime;mob=[mob_uid]'>Baby</A>,
|
||||
<A href='byond://?_src_=holder;simplemake=adultslime;mob=[mob_uid]'>Adult</A> \]
|
||||
<A href='byond://?_src_=holder;simplemake=monkey;mob=[mob_uid]'>Monkey</A> |
|
||||
<A href='byond://?_src_=holder;simplemake=robot;mob=[mob_uid]'>Cyborg</A> |
|
||||
<A href='byond://?_src_=holder;simplemake=cat;mob=[mob_uid]'>Cat</A> |
|
||||
<A href='byond://?_src_=holder;simplemake=runtime;mob=[mob_uid]'>Runtime</A> |
|
||||
<A href='byond://?_src_=holder;simplemake=corgi;mob=[mob_uid]'>Corgi</A> |
|
||||
<A href='byond://?_src_=holder;simplemake=ian;mob=[mob_uid]'>Ian</A> |
|
||||
<A href='byond://?_src_=holder;simplemake=crab;mob=[mob_uid]'>Crab</A> |
|
||||
<A href='byond://?_src_=holder;simplemake=coffee;mob=[mob_uid]'>Coffee</A> |
|
||||
\[ Construct: <A href='byond://?_src_=holder;simplemake=constructarmoured;mob=[mob_uid]'>Armoured</A> ,
|
||||
<A href='byond://?_src_=holder;simplemake=constructbuilder;mob=[mob_uid]'>Builder</A> ,
|
||||
<A href='byond://?_src_=holder;simplemake=constructwraith;mob=[mob_uid]'>Wraith</A> \]
|
||||
<A href='byond://?_src_=holder;simplemake=shade;mob=[mob_uid]'>Shade</A>
|
||||
"}
|
||||
|
||||
if(M.client)
|
||||
body += {"<br><br>
|
||||
<b>Other actions:</b>
|
||||
<br>
|
||||
<A href='byond://?_src_=holder;forcespeech=[mob_uid]'>Forcesay</A> |
|
||||
<A href='byond://?_src_=holder;aroomwarp=[mob_uid]'>Admin Room</A> |
|
||||
<A href='byond://?_src_=holder;tdome1=[mob_uid]'>Thunderdome 1</A> |
|
||||
<A href='byond://?_src_=holder;tdome2=[mob_uid]'>Thunderdome 2</A> |
|
||||
<A href='byond://?_src_=holder;tdomeadmin=[mob_uid]'>Thunderdome Admin</A> |
|
||||
<A href='byond://?_src_=holder;tdomeobserve=[mob_uid]'>Thunderdome Observer</A> |
|
||||
<A href='byond://?_src_=holder;contractor_stop=[mob_uid]'>Stop Syndicate Jail Timer</A> |
|
||||
<A href='byond://?_src_=holder;contractor_start=[mob_uid]'>Start Syndicate Jail Timer</A> |
|
||||
<A href='byond://?_src_=holder;contractor_release=[mob_uid]'>Release now from Syndicate Jail</A> |
|
||||
"}
|
||||
|
||||
body += {"<br>
|
||||
</body></html>
|
||||
"}
|
||||
|
||||
client << browse(body, "window=adminplayeropts;size=550x615")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Player Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user