mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 03:26:37 +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:
@@ -43,10 +43,8 @@
|
||||
log_world("ToR data update aborted: no data.")
|
||||
return
|
||||
|
||||
/client/proc/ToRban(task in list("update","toggle","show","remove","remove all","find"))
|
||||
set name = "ToRban"
|
||||
set category = "Server.Config"
|
||||
if(!check_rights_for(src, R_HOLDER)) return
|
||||
ADMIN_VERB(ToRban, R_ADMIN|R_SERVER, "ToRban", "Modifies the TorBan settings.", ADMIN_CATEGORY_SERVER_CONFIG)
|
||||
var/task = tgui_input_list(user, "What do you want to do?", "Select Option", list("update","toggle","show","remove","remove all","find"))
|
||||
switch(task)
|
||||
if("update")
|
||||
ToRban_update()
|
||||
@@ -61,32 +59,32 @@
|
||||
if("show")
|
||||
var/savefile/F = new(TORFILE)
|
||||
var/dat
|
||||
if( length(F.dir) )
|
||||
for( var/i=1, i<=length(F.dir), i++ )
|
||||
if(length(F.dir))
|
||||
for(var/i=1, i<=length(F.dir), i++)
|
||||
dat += "<tr><td>#[i]</td><td> [F.dir[i]]</td></tr>"
|
||||
dat = "<table width='100%'>[dat]</table>"
|
||||
else
|
||||
dat = "No addresses in list."
|
||||
|
||||
var/datum/browser/popup = new(src, "ToRban_show", "Torban")
|
||||
var/datum/browser/popup = new(user, "ToRban_show", "Torban")
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
if("remove")
|
||||
var/savefile/F = new(TORFILE)
|
||||
var/choice = tgui_input_list(src,"Please select an IP address to remove from the ToR banlist:","Remove ToR ban", F.dir)
|
||||
var/choice = tgui_input_list(user,"Please select an IP address to remove from the ToR banlist:","Remove ToR ban", F.dir)
|
||||
if(choice)
|
||||
F.dir.Remove(choice)
|
||||
to_chat(src, span_filter_adminlog(span_bold("Address removed")))
|
||||
to_chat(user, span_filter_adminlog(span_bold("Address removed")))
|
||||
if("remove all")
|
||||
to_chat(src, span_filter_adminlog(span_bold("[TORFILE] was [fdel(TORFILE)?"":"not "]removed.")))
|
||||
to_chat(user, span_filter_adminlog(span_bold("[TORFILE] was [fdel(TORFILE)?"":"not "]removed.")))
|
||||
if("find")
|
||||
var/input = tgui_input_text(src,"Please input an IP address to search for:","Find ToR ban",null)
|
||||
var/input = tgui_input_text(user,"Please input an IP address to search for:","Find ToR ban",null)
|
||||
if(input)
|
||||
if(ToRban_isbanned(input))
|
||||
to_chat(src, span_filter_adminlog("[span_orange(span_bold("Address is a known ToR address"))]"))
|
||||
to_chat(user, span_filter_adminlog("[span_orange(span_bold("Address is a known ToR address"))]"))
|
||||
else
|
||||
to_chat(src, span_filter_adminlog(span_danger("Address is not a known ToR address")))
|
||||
to_chat(user, span_filter_adminlog(span_danger("Address is not a known ToR address")))
|
||||
return
|
||||
|
||||
#undef TORFILE
|
||||
|
||||
+223
-424
File diff suppressed because it is too large
Load Diff
@@ -1,288 +1,86 @@
|
||||
//admin verb groups - They can overlap if you so wish. Only one of each verb will exist in the verbs list regardless
|
||||
GLOBAL_LIST_INIT(admin_verbs_admin, list(
|
||||
/client/proc/toggle_vantag_hud,
|
||||
/datum/admins/proc/set_tcrystals,
|
||||
/datum/admins/proc/add_tcrystals,
|
||||
/datum/admins/proc/show_traitor_panel, //interface which shows a mob's mind.,
|
||||
/datum/admins/proc/show_game_mode, //Configuration window for the current game mode.,
|
||||
/datum/admins/proc/force_mode_latespawn, //Force the mode to try a latespawn proc,
|
||||
/datum/admins/proc/force_antag_latespawn, //Force a specific template to try a latespawn proc,
|
||||
/datum/admins/proc/toggleenter, //toggles whether people can join the current game,
|
||||
/datum/admins/proc/toggleguests, //toggles whether guests can join the current game,
|
||||
/datum/admins/proc/announce, //priority announce something to all clients.,
|
||||
/datum/admins/proc/intercom, //send a fake intercom message, like an arrivals announcement,
|
||||
/datum/admins/proc/intercom_convo, //send a fake intercom conversation, like an ATC exchange,
|
||||
/client/proc/player_panel_new, //shows an interface for all players, with links to various panels,
|
||||
/client/proc/player_panel,
|
||||
/client/proc/hide_verbs, //hides all our adminverbs,
|
||||
/client/proc/hide_most_verbs, //hides all our hideable adminverbs,
|
||||
/client/proc/cmd_check_new_players, //allows us to see every new player,
|
||||
/client/proc/cmd_admin_pm_context, //right-click adminPM interface,
|
||||
/client/proc/cmd_admin_pm_panel, //admin-pm list,
|
||||
/client/proc/cmd_admin_subtle_message, //send an message to somebody as a 'voice in their head',
|
||||
/datum/admins/proc/access_news_network, //allows access of newscasters,
|
||||
/client/proc/jumptocoord, //we ghost and jump to a coordinate,
|
||||
/client/proc/Getmob, //teleports a mob to our location,
|
||||
/client/proc/Getkey, //teleports a mob with a certain ckey to our location,
|
||||
/client/proc/Jump,
|
||||
/client/proc/jumptokey, //allows us to jump to the location of a mob with a certain ckey,
|
||||
/client/proc/jumptomob, //allows us to jump to a specific mob,
|
||||
/client/proc/cmd_admin_direct_narrate, //send text directly to a player with no padding. Useful for narratives and fluff-text,
|
||||
/client/proc/cmd_admin_world_narrate, //sends text to all players with no padding,
|
||||
/client/proc/check_ai_laws, //shows AI and borg laws,
|
||||
/client/proc/rename_silicon, //properly renames silicons,
|
||||
/client/proc/manage_silicon_laws, // Allows viewing and editing silicon laws. ,
|
||||
/client/proc/modify_robot,
|
||||
/client/proc/check_antagonists,
|
||||
/client/proc/dsay, //talk in deadchat using our ckey/fakekey,
|
||||
/datum/admins/proc/toggleooc, //toggles ooc on/off for everyone,
|
||||
/datum/admins/proc/togglelooc, //toggles looc on/off for everyone,
|
||||
/datum/admins/proc/toggleoocdead, //toggles ooc on/off for everyone who is dead,
|
||||
/datum/admins/proc/togglehubvisibility, //toggles visibility on the BYOND Hub.,
|
||||
/datum/admins/proc/toggledsay, //toggles dsay on/off for everyone,
|
||||
/datum/admins/proc/PlayerNotes,
|
||||
/datum/admins/proc/show_player_info,
|
||||
/client/proc/free_slot, //frees slot for chosen job,
|
||||
/client/proc/cmd_admin_change_custom_event,
|
||||
/client/proc/toggleghostwriters,
|
||||
/client/proc/toggledrones,
|
||||
/client/proc/check_customitem_activity,
|
||||
/client/proc/man_up,
|
||||
/client/proc/global_man_up,
|
||||
/client/proc/response_team, // Response Teams admin verb,
|
||||
/client/proc/trader_ship, // Trader ship admin verb,
|
||||
/client/proc/event_manager_panel,
|
||||
/client/proc/empty_ai_core_toggle_latejoin,
|
||||
/client/proc/empty_ai_core_toggle_latejoin,
|
||||
/client/proc/aooc,
|
||||
/client/proc/change_human_appearance_admin, // Allows an admin to change the basic appearance of human-based mobs ,
|
||||
/client/proc/change_human_appearance_self, // Allows the human-based mob itself change its basic appearance ,
|
||||
/client/proc/change_security_level,
|
||||
/client/proc/view_chemical_reaction_logs,
|
||||
/client/proc/makepAI,
|
||||
/datum/admins/proc/paralyze_mob,
|
||||
/datum/admins/proc/set_uplink,
|
||||
/datum/admins/proc/sendFax,
|
||||
/datum/admins/proc/view_feedback,
|
||||
/client/proc/delbook,
|
||||
/client/proc/toggle_spawning_with_recolour,
|
||||
/client/proc/start_vote,
|
||||
/client/proc/hide_motion_tracker_feedback
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(admin_verbs_spawn, list(
|
||||
/datum/admins/proc/spawn_fruit,
|
||||
/datum/admins/proc/spawn_custom_item,
|
||||
/datum/admins/proc/check_custom_items,
|
||||
/datum/admins/proc/spawn_plant,
|
||||
/datum/admins/proc/spawn_atom, //allows us to spawn instances,
|
||||
/datum/admins/proc/spawn_mail,
|
||||
/client/proc/spawn_character_mob,
|
||||
/client/proc/spawn_chemdisp_cartridge,
|
||||
/client/proc/map_template_load,
|
||||
/client/proc/map_template_upload,
|
||||
/client/proc/map_template_load_on_new_z,
|
||||
/client/proc/eventkit_open_mob_spawner,
|
||||
/client/proc/generic_structure,
|
||||
/client/proc/generic_item,
|
||||
/client/proc/create_gm_message,
|
||||
/client/proc/remove_gm_message,
|
||||
/client/proc/AdminCreateVirus,
|
||||
/client/proc/ReleaseVirus,
|
||||
/client/proc/spawn_reagent
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(admin_verbs_server, list(
|
||||
/datum/admins/proc/capture_map,
|
||||
/client/proc/Set_Holiday,
|
||||
/client/proc/ToRban,
|
||||
/datum/admins/proc/startnow,
|
||||
/datum/admins/proc/delay,
|
||||
/datum/admins/proc/toggleaban,
|
||||
/datum/admins/proc/togglepersistence,
|
||||
/client/proc/toggle_log_hrefs,
|
||||
/datum/admins/proc/toggleAI,
|
||||
/client/proc/cmd_debug_del_all,
|
||||
/datum/admins/proc/adrev,
|
||||
/datum/admins/proc/adspawn,
|
||||
/datum/admins/proc/adjump,
|
||||
/client/proc/check_customitem_activity,
|
||||
/client/proc/modify_server_news,
|
||||
/client/proc/recipe_dump,
|
||||
/client/proc/panicbunker,
|
||||
/client/proc/paranoia_logging,
|
||||
/client/proc/ip_reputation
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(admin_verbs_debug, list(
|
||||
/client/proc/Debug2,
|
||||
/client/proc/kill_air,
|
||||
/client/proc/ZASSettings,
|
||||
/client/proc/cmd_debug_make_powernets,
|
||||
/client/proc/kill_airgroup,
|
||||
/client/proc/cmd_debug_mob_lists,
|
||||
/client/proc/cmd_debug_using_map,
|
||||
/client/proc/cmd_debug_del_all,
|
||||
/client/proc/cmd_debug_tog_aliens,
|
||||
/client/proc/cmd_display_del_log,
|
||||
/client/proc/cmd_display_init_log,
|
||||
// /client/proc/cmd_display_overlay_log,
|
||||
/client/proc/air_report,
|
||||
/client/proc/reload_admins,
|
||||
/client/proc/reload_eventMs,
|
||||
/client/proc/print_random_map,
|
||||
/client/proc/create_random_map,
|
||||
/client/proc/apply_random_map,
|
||||
/client/proc/overlay_random_map,
|
||||
/client/proc/delete_random_map,
|
||||
/client/proc/show_plant_genes,
|
||||
/client/proc/enable_debug_verbs,
|
||||
/client/proc/Jump,
|
||||
/client/proc/jumptomob,
|
||||
/client/proc/jumptocoord,
|
||||
/client/proc/dsay,
|
||||
/client/proc/player_panel_new, //shows an interface for all players, with links to various panels,
|
||||
/client/proc/player_panel,
|
||||
/client/proc/hide_verbs, //hides all our adminverbs,
|
||||
/client/proc/hide_most_verbs, //hides all our hideable adminverbs,
|
||||
/client/proc/cmd_check_new_players, //allows us to see every new player,
|
||||
// /client/proc/show_gm_status, //We don't use SSgame_master yet.
|
||||
/datum/admins/proc/set_uplink,
|
||||
/datum/admins/proc/change_weather,
|
||||
/datum/admins/proc/change_time,
|
||||
/client/proc/cmd_regenerate_asset_cache,
|
||||
/client/proc/cmd_clear_smart_asset_cache,
|
||||
/client/proc/cmd_reload_robot_sprite_test,
|
||||
/client/proc/simple_DPS,
|
||||
/datum/admins/proc/view_feedback,
|
||||
/client/proc/stop_sounds,
|
||||
/client/proc/spawn_reagent
|
||||
))
|
||||
|
||||
//verbs which can be hidden - needs work
|
||||
GLOBAL_LIST_INIT(admin_verbs_hideable, list(
|
||||
// /client/proc/deadchat,
|
||||
/datum/admins/proc/show_traitor_panel,
|
||||
/datum/admins/proc/toggleenter,
|
||||
/datum/admins/proc/toggleguests,
|
||||
/datum/admins/proc/announce,
|
||||
/client/proc/cmd_admin_subtle_message,
|
||||
/datum/admins/proc/access_news_network,
|
||||
/client/proc/cmd_admin_direct_narrate,
|
||||
/client/proc/cmd_admin_world_narrate,
|
||||
/client/proc/Set_Holiday,
|
||||
/client/proc/ToRban,
|
||||
/datum/admins/proc/startnow,
|
||||
/datum/admins/proc/delay,
|
||||
/datum/admins/proc/toggleaban,
|
||||
/client/proc/toggle_log_hrefs,
|
||||
/datum/admins/proc/toggleAI,
|
||||
/datum/admins/proc/adrev,
|
||||
/datum/admins/proc/adspawn,
|
||||
/datum/admins/proc/adjump,
|
||||
/client/proc/Debug2,
|
||||
/client/proc/reload_admins,
|
||||
/client/proc/kill_air,
|
||||
/client/proc/cmd_debug_make_powernets,
|
||||
/client/proc/kill_airgroup,
|
||||
/client/proc/startSinglo,
|
||||
/client/proc/simple_DPS,
|
||||
/client/proc/cmd_debug_mob_lists,
|
||||
/client/proc/cmd_debug_using_map,
|
||||
/client/proc/cmd_debug_del_all,
|
||||
/client/proc/cmd_debug_tog_aliens,
|
||||
/client/proc/cmd_display_del_log,
|
||||
/client/proc/air_report,
|
||||
/client/proc/enable_debug_verbs,
|
||||
/datum/admins/proc/set_uplink,
|
||||
/datum/admins/proc/set_tcrystals,
|
||||
/client/proc/stop_sounds
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(admin_verbs_mod, list(
|
||||
/client/proc/cmd_admin_pm_context, //right-click adminPM interface,
|
||||
/client/proc/cmd_admin_pm_panel, //admin-pm list,
|
||||
/datum/admins/proc/PlayerNotes,
|
||||
/client/proc/player_panel_new, //shows an interface for all players, with links to various panels,
|
||||
/client/proc/player_panel,
|
||||
/client/proc/hide_verbs, //hides all our adminverbs,
|
||||
/client/proc/hide_most_verbs, //hides all our hideable adminverbs,
|
||||
/client/proc/cmd_check_new_players, //allows us to see every new player,
|
||||
/datum/admins/proc/show_player_info,
|
||||
/datum/admins/proc/show_traitor_panel,
|
||||
/client/proc/player_panel_new,
|
||||
/client/proc/dsay,
|
||||
/client/proc/check_antagonists,
|
||||
/client/proc/aooc,
|
||||
/client/proc/cmd_admin_subtle_message, //send an message to somebody as a 'voice in their head',
|
||||
/datum/admins/proc/paralyze_mob,
|
||||
/client/proc/cmd_admin_direct_narrate,
|
||||
/datum/admins/proc/sendFax,
|
||||
/datum/admins/proc/view_persistent_data,
|
||||
/client/proc/start_vote
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(admin_verbs_event_manager, list(
|
||||
/client/proc/toggle_vantag_hud,
|
||||
/client/proc/cmd_admin_pm_context,
|
||||
/client/proc/cmd_admin_pm_panel,
|
||||
/client/proc/player_panel_new, //shows an interface for all players, with links to various panels,
|
||||
/client/proc/player_panel,
|
||||
/client/proc/hide_verbs, //hides all our adminverbs,
|
||||
/client/proc/hide_most_verbs, //hides all our hideable adminverbs,
|
||||
/client/proc/cmd_check_new_players, //allows us to see every new player,
|
||||
/datum/admins/proc/show_player_info,
|
||||
/client/proc/dsay,
|
||||
/client/proc/cmd_admin_subtle_message,
|
||||
/client/proc/check_antagonists,
|
||||
/client/proc/aooc,
|
||||
/datum/admins/proc/paralyze_mob,
|
||||
/client/proc/cmd_admin_direct_narrate,
|
||||
/datum/admins/proc/sendFax,
|
||||
/datum/admins/proc/change_weather,
|
||||
/datum/admins/proc/change_time,
|
||||
/client/proc/cmd_regenerate_asset_cache,
|
||||
/client/proc/cmd_clear_smart_asset_cache,
|
||||
/client/proc/cmd_reload_robot_sprite_test,
|
||||
/client/proc/Jump,
|
||||
/client/proc/jumptomob,
|
||||
/client/proc/jumptocoord,
|
||||
/datum/admins/proc/delay,
|
||||
/client/proc/Set_Holiday,
|
||||
/datum/admins/proc/PlayerNotes,
|
||||
/datum/admins/proc/change_weather,
|
||||
/datum/admins/proc/change_time,
|
||||
/client/proc/cmd_regenerate_asset_cache,
|
||||
/client/proc/cmd_clear_smart_asset_cache,
|
||||
/client/proc/cmd_reload_robot_sprite_test,
|
||||
/datum/admins/proc/set_tcrystals,
|
||||
/datum/admins/proc/add_tcrystals,
|
||||
/datum/admins/proc/show_traitor_panel, //interface which shows a mob's mind.,
|
||||
/datum/admins/proc/show_game_mode, //Configuration window for the current game mode.,
|
||||
/datum/admins/proc/force_mode_latespawn, //Force the mode to try a latespawn proc,
|
||||
/datum/admins/proc/force_antag_latespawn, //Force a specific template to try a latespawn proc,
|
||||
/datum/admins/proc/announce, //priority announce something to all clients.,
|
||||
/datum/admins/proc/intercom, //send a fake intercom message, like an arrivals announcement,
|
||||
/datum/admins/proc/intercom_convo, //send a fake intercom conversation, like an ATC exchange,
|
||||
/client/proc/cmd_admin_pm_context, //right-click adminPM interface,
|
||||
/client/proc/cmd_admin_pm_panel, //admin-pm list,
|
||||
/client/proc/cmd_admin_subtle_message, //send an message to somebody as a 'voice in their head',
|
||||
/datum/admins/proc/access_news_network, //allows access of newscasters,
|
||||
/client/proc/jumptocoord, //we ghost and jump to a coordinate,
|
||||
/client/proc/Getmob, //teleports a mob to our location,
|
||||
/client/proc/Getkey, //teleports a mob with a certain ckey to our location,
|
||||
/client/proc/Jump,
|
||||
/client/proc/jumptokey, //allows us to jump to the location of a mob with a certain ckey,
|
||||
/client/proc/jumptomob, //allows us to jump to a specific mob,
|
||||
/client/proc/cmd_admin_direct_narrate, //send text directly to a player with no padding. Useful for narratives and fluff-text,
|
||||
/client/proc/cmd_admin_world_narrate, //sends text to all players with no padding,
|
||||
/client/proc/check_ai_laws, //shows AI and borg laws,
|
||||
/client/proc/rename_silicon, //properly renames silicons,
|
||||
/client/proc/manage_silicon_laws, // Allows viewing and editing silicon laws. ,
|
||||
/client/proc/modify_robot,
|
||||
/client/proc/check_antagonists,
|
||||
/client/proc/dsay, //talk in deadchat using our ckey/fakekey,
|
||||
/datum/admins/proc/show_player_info,
|
||||
/client/proc/free_slot, //frees slot for chosen job,
|
||||
/client/proc/cmd_admin_change_custom_event,
|
||||
/client/proc/toggleghostwriters,
|
||||
@@ -290,28 +88,9 @@ GLOBAL_LIST_INIT(admin_verbs_event_manager, list(
|
||||
/client/proc/global_man_up,
|
||||
/client/proc/response_team, // Response Teams admin verb,
|
||||
/client/proc/trader_ship, // Trader ship admin verb,
|
||||
/client/proc/event_manager_panel,
|
||||
/client/proc/aooc,
|
||||
/client/proc/change_human_appearance_admin, // Allows an admin to change the basic appearance of human-based mobs ,
|
||||
/client/proc/change_human_appearance_self, // Allows the human-based mob itself change its basic appearance ,
|
||||
/client/proc/change_security_level,
|
||||
/client/proc/makepAI,
|
||||
/datum/admins/proc/paralyze_mob,
|
||||
/datum/admins/proc/sendFax,
|
||||
/datum/admins/proc/view_feedback,
|
||||
/datum/admins/proc/capture_map,
|
||||
/client/proc/Set_Holiday,
|
||||
/datum/admins/proc/startnow,
|
||||
/datum/admins/proc/delay,
|
||||
/client/proc/cmd_debug_del_all,
|
||||
/client/proc/modify_server_news,
|
||||
/client/proc/toggle_spawning_with_recolour,
|
||||
/client/proc/start_vote,
|
||||
/client/proc/AdminCreateVirus,
|
||||
/client/proc/ReleaseVirus,
|
||||
/client/proc/add_hidden_area,
|
||||
/client/proc/remove_hidden_area,
|
||||
/client/proc/hide_motion_tracker_feedback,
|
||||
/client/proc/modify_event_collector,
|
||||
/client/proc/induce_malfunction
|
||||
))
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
if(rights & R_HOLDER)
|
||||
if(rights & R_BUILDMODE) add_verb(src, /client/proc/togglebuildmodeself)
|
||||
if(rights & R_ADMIN) add_verb(src, GLOB.admin_verbs_admin)
|
||||
if(rights & R_SERVER) add_verb(src, GLOB.admin_verbs_server)
|
||||
if(rights & R_DEBUG) add_verb(src, GLOB.admin_verbs_debug)
|
||||
if(rights & R_SPAWN) add_verb(src, GLOB.admin_verbs_spawn)
|
||||
if(rights & R_MOD) add_verb(src, GLOB.admin_verbs_mod)
|
||||
if(rights & R_EVENT) add_verb(src, GLOB.admin_verbs_event_manager)
|
||||
|
||||
@@ -18,10 +16,7 @@
|
||||
remove_verb(src, list(
|
||||
/client/proc/togglebuildmodeself,
|
||||
GLOB.admin_verbs_admin,
|
||||
GLOB.admin_verbs_server,
|
||||
GLOB.admin_verbs_debug,
|
||||
GLOB.admin_verbs_spawn,
|
||||
GLOB.debug_verbs
|
||||
))
|
||||
|
||||
// NEW ADMIN VERBS SYSTEM
|
||||
@@ -137,32 +132,20 @@ ADMIN_VERB(show_manifest, R_ADMIN, "Show Manifest", "View the shift's Manifest."
|
||||
user.holder.show_manifest()
|
||||
//BLACKBOX_LOG_ADMIN_VERB("Show Manifest")
|
||||
|
||||
/client/proc/player_panel()
|
||||
set name = "Player Panel"
|
||||
set category = "Admin.Game"
|
||||
if(check_rights(R_HOLDER))
|
||||
holder.player_panel_old()
|
||||
ADMIN_VERB(player_panel, R_HOLDER, "Player Panel", "Open the player panel.", ADMIN_CATEGORY_GAME)
|
||||
user.holder.player_panel_old(user)
|
||||
feedback_add_details("admin_verb","PP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
/client/proc/player_panel_new()
|
||||
set name = "Player Panel New"
|
||||
set category = "Admin.Game"
|
||||
if(check_rights(R_HOLDER))
|
||||
holder.player_panel_new()
|
||||
ADMIN_VERB(player_panel_new, R_HOLDER, "Player Panel New", "Open the player panel.", ADMIN_CATEGORY_GAME)
|
||||
user.holder.player_panel_new(user)
|
||||
feedback_add_details("admin_verb","PPN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
/client/proc/check_antagonists()
|
||||
set name = "Check Antagonists"
|
||||
set category = "Admin.Investigate"
|
||||
if(check_rights(R_HOLDER))
|
||||
holder.check_antagonists()
|
||||
log_admin("[key_name(usr)] checked antagonists.") //for tsar~
|
||||
ADMIN_VERB(check_antagonists, R_HOLDER, "Check Antagonists", "Open the antagonist panel.", ADMIN_CATEGORY_INVESTIGATE)
|
||||
user.holder.check_antagonists(user)
|
||||
log_admin("[key_name(user)] checked antagonists.") //for tsar~
|
||||
feedback_add_details("admin_verb","CHA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
ADMIN_VERB(jobbans, R_BAN, "Display Job bans", "View job bans here.", "Admin.Investigate")
|
||||
ADMIN_VERB(jobbans, R_BAN, "Display Job bans", "View job bans here.", ADMIN_CATEGORY_INVESTIGATE)
|
||||
if(CONFIG_GET(flag/ban_legacy_system))
|
||||
user.holder.Jobbans()
|
||||
else
|
||||
@@ -203,7 +186,7 @@ ADMIN_VERB(game_panel, R_ADMIN|R_SERVER|R_FUN, "Game Panel", "Look at the state
|
||||
i = 0
|
||||
GLOB.stealthminID["[ckey]"] = "@[num2text(num)]"
|
||||
|
||||
ADMIN_VERB(stealth, R_STEALTH, "Stealth Mode", "Toggle stealth.", "Admin.Game")
|
||||
ADMIN_VERB(stealth, R_STEALTH, "Stealth Mode", "Toggle stealth.", ADMIN_CATEGORY_GAME)
|
||||
if(user.holder.fakekey)
|
||||
user.holder.fakekey = null
|
||||
if(isnewplayer(user.mob))
|
||||
@@ -363,13 +346,11 @@ ADMIN_VERB(deadmin, R_NONE, "DeAdmin", "Shed your admin powers.", ADMIN_CATEGORY
|
||||
var/mob/observer/dead/our_mob = user.mob
|
||||
our_mob.visualnet?.removeVisibility(our_mob, user)
|
||||
|
||||
/client/proc/toggle_log_hrefs()
|
||||
set name = "Toggle href logging"
|
||||
set category = "Server.Config"
|
||||
if(!holder) return
|
||||
if(config)
|
||||
CONFIG_SET(flag/log_hrefs, !CONFIG_GET(flag/log_hrefs))
|
||||
message_admins(span_bold("[key_name_admin(usr)] [CONFIG_GET(flag/log_hrefs) ? "started" : "stopped"] logging hrefs"))
|
||||
ADMIN_VERB(toggle_log_hrefs, R_SERVER, "Toggle href logging", "Allows to toggle the logging of used hrefs.", ADMIN_CATEGORY_SERVER_CONFIG)
|
||||
if(!config)
|
||||
return
|
||||
CONFIG_SET(flag/log_hrefs, !CONFIG_GET(flag/log_hrefs))
|
||||
message_admins(span_bold("[key_name_admin(user)] [CONFIG_GET(flag/log_hrefs) ? "started" : "stopped"] logging hrefs"))
|
||||
|
||||
/client/proc/check_ai_laws()
|
||||
set name = "Check AI Laws"
|
||||
@@ -392,18 +373,14 @@ ADMIN_VERB(deadmin, R_NONE, "DeAdmin", "Shed your admin powers.", ADMIN_CATEGORY
|
||||
S.SetName(new_name)
|
||||
feedback_add_details("admin_verb","RAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/manage_silicon_laws()
|
||||
set name = "Manage Silicon Laws"
|
||||
set category = "Admin.Silicon"
|
||||
ADMIN_VERB(manage_silicon_laws, R_ADMIN|R_EVENT, "Manage Silicon Laws", "Allows to modify silicon laws.", ADMIN_CATEGORY_SILICON)
|
||||
var/mob/living/silicon/selected_silicon = tgui_input_list(user, "Select silicon.", "Manage Silicon Laws", GLOB.silicon_mob_list)
|
||||
if(!selected_silicon)
|
||||
return
|
||||
|
||||
if(!check_rights(R_ADMIN|R_EVENT)) return
|
||||
|
||||
var/mob/living/silicon/S = tgui_input_list(usr, "Select silicon.", "Manage Silicon Laws", GLOB.silicon_mob_list)
|
||||
if(!S) return
|
||||
|
||||
var/datum/tgui_module/law_manager/admin/L = new(S)
|
||||
L.tgui_interact(usr)
|
||||
log_and_message_admins("has opened [S]'s law manager.")
|
||||
var/datum/tgui_module/law_manager/admin/law_interface = new(selected_silicon)
|
||||
law_interface.tgui_interact(user.mob)
|
||||
log_and_message_admins("has opened [selected_silicon]'s law manager.")
|
||||
feedback_add_details("admin_verb","MSL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/change_security_level()
|
||||
@@ -441,13 +418,6 @@ ADMIN_VERB(deadmin, R_NONE, "DeAdmin", "Shed your admin powers.", ADMIN_CATEGORY
|
||||
// feedback_add_details("admin_verb","MP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
/client/proc/playernotes()
|
||||
set name = "Show Player Info"
|
||||
set category = "Admin.Moderation"
|
||||
if(check_rights(R_HOLDER))
|
||||
holder.PlayerNotes()
|
||||
return
|
||||
|
||||
/client/proc/free_slot()
|
||||
set name = "Free Job Slot"
|
||||
set category = "Admin.Game"
|
||||
@@ -539,23 +509,20 @@ ADMIN_VERB(remove_spell, R_FUN, "Remove Spell", ADMIN_VERB_NO_DESCRIPTION, ADMIN
|
||||
feedback_add_details("admin_verb","RS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
//BLACKBOX_LOG_ADMIN_VERB("Remove Spell")
|
||||
|
||||
ADMIN_VERB(debug_statpanel, R_DEBUG, "Debug Stat Panel", "Toggles local debug of the stat panel", "Debug.Misc")
|
||||
ADMIN_VERB(debug_statpanel, R_DEBUG, "Debug Stat Panel", "Toggles local debug of the stat panel.", ADMIN_CATEGORY_DEBUG_MISC)
|
||||
user.stat_panel.send_message("create_debug")
|
||||
|
||||
/client/proc/spawn_reagent()
|
||||
set name = "Spawn Reagent"
|
||||
set category = "Debug.Game"
|
||||
|
||||
if(!check_rights(R_ADMIN|R_EVENT)) return
|
||||
var/datum/reagent/R = tgui_input_list(usr, "Select a reagent to spawn", "Reagent Spawner", subtypesof(/datum/reagent))
|
||||
if(!R)
|
||||
ADMIN_VERB(spawn_reagent, R_DEBUG|R_EVENT, "Spawn Reagent", "Spawn any reagent.", ADMIN_CATEGORY_DEBUG_GAME)
|
||||
var/datum/reagent/new_reagent = tgui_input_list(user, "Select a reagent to spawn", "Reagent Spawner", subtypesof(/datum/reagent))
|
||||
if(!new_reagent)
|
||||
return
|
||||
|
||||
var/obj/item/reagent_containers/glass/bottle/B = new(usr.loc)
|
||||
var/mob/user_mob = user.mob
|
||||
var/obj/item/reagent_containers/glass/bottle/new_bottle = new(user_mob.loc)
|
||||
|
||||
B.icon_state = "bottle-1"
|
||||
B.reagents.add_reagent(R.id, 60)
|
||||
B.name = "[B.name] of [R.name]"
|
||||
new_bottle.icon_state = "bottle-1"
|
||||
new_bottle.reagents.add_reagent(new_reagent.id, 60)
|
||||
new_bottle.name = "[new_bottle.name] of [new_reagent.name]"
|
||||
|
||||
/client/proc/add_hidden_area()
|
||||
set name = "Add Ghostsight Block Area"
|
||||
@@ -589,15 +556,9 @@ ADMIN_VERB(debug_statpanel, R_DEBUG, "Debug Stat Panel", "Toggles local debug of
|
||||
A.flags &= ~(AREA_BLOCK_GHOST_SIGHT)
|
||||
GLOB.ghostnet.removeArea(A)
|
||||
|
||||
/client/proc/hide_motion_tracker_feedback()
|
||||
set name = "Toggle Motion Echos"
|
||||
set desc = "Hides or reveals motion tracker echos globally."
|
||||
set category = "Admin.Events"
|
||||
|
||||
if(!check_rights(R_ADMIN|R_EVENT))
|
||||
return
|
||||
ADMIN_VERB(hide_motion_tracker_feedback, R_ADMIN|R_EVENT, "Toggle Motion Echos", "Hides or reveals motion tracker echos globally.", ADMIN_CATEGORY_EVENTS)
|
||||
SSmotiontracker.hide_all = !SSmotiontracker.hide_all
|
||||
log_admin("[key_name(usr)] changed the motion echo visibility to [SSmotiontracker.hide_all ? "hidden" : "visible"].")
|
||||
log_admin("[key_name(user)] changed the motion echo visibility to [SSmotiontracker.hide_all ? "hidden" : "visible"].")
|
||||
|
||||
ADMIN_VERB(adminorbit, R_FUN, "Orbit Things", "Makes something orbit around something else.", ADMIN_CATEGORY_FUN_EVENT_KIT)
|
||||
var/center
|
||||
@@ -649,7 +610,7 @@ ADMIN_VERB(adminorbit, R_FUN, "Orbit Things", "Makes something orbit around some
|
||||
if(tgui_alert(user, "\The [orbiter] will orbit around [center]. Is this okay?", "Confirm Orbit", list("Yes", "No")) == "Yes")
|
||||
orbiter.orbit(center, distance, clock, speed, segments)
|
||||
|
||||
ADMIN_VERB(removetickets, R_ADMIN, "Security Tickets", "Allows one to remove tickets from the global list.", "Admin.Investigate")
|
||||
ADMIN_VERB(removetickets, R_ADMIN, "Security Tickets", "Allows one to remove tickets from the global list.", ADMIN_CATEGORY_INVESTIGATE)
|
||||
if(GLOB.security_printer_tickets.len >= 1)
|
||||
var/input = tgui_input_list(user, "Which message?", "Security Tickets", GLOB.security_printer_tickets)
|
||||
if(!input)
|
||||
@@ -710,22 +671,15 @@ ADMIN_VERB(removetickets, R_ADMIN, "Security Tickets", "Allows one to remove tic
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
/client/proc/toggle_spawning_with_recolour()
|
||||
set name = "Toggle Simple/Robot recolour verb"
|
||||
set desc = "Makes it so new robots/simple_mobs spawn with a verb to recolour themselves for this round. You must set them separately."
|
||||
set category = "Server.Game"
|
||||
|
||||
if(!check_rights(R_ADMIN|R_EVENT|R_FUN))
|
||||
return
|
||||
|
||||
var/which = tgui_alert(usr, "Which do you want to toggle?", "Choose Recolour Toggle", list("Robot", "Simple Mob"))
|
||||
ADMIN_VERB(toggle_spawning_with_recolour, R_ADMIN|R_EVENT|R_FUN, "Toggle Simple/Robot recolour verb", "Makes it so new robots/simple_mobs spawn with a verb to recolour themselves for this round. You must set them separately.", ADMIN_CATEGORY_SERVER_GAME)
|
||||
var/which = tgui_alert(user, "Which do you want to toggle?", "Choose Recolour Toggle", list("Robot", "Simple Mob"))
|
||||
switch(which)
|
||||
if("Robot")
|
||||
CONFIG_SET(flag/allow_robot_recolor, !CONFIG_GET(flag/allow_robot_recolor))
|
||||
to_chat(usr, "You have [CONFIG_GET(flag/allow_robot_recolor) ? "enabled" : "disabled"] newly spawned cyborgs to spawn with the recolour verb")
|
||||
to_chat(user, "You have [CONFIG_GET(flag/allow_robot_recolor) ? "enabled" : "disabled"] newly spawned cyborgs to spawn with the recolour verb")
|
||||
if("Simple Mob")
|
||||
CONFIG_SET(flag/allow_simple_mob_recolor, !CONFIG_GET(flag/allow_simple_mob_recolor))
|
||||
to_chat(usr, "You have [CONFIG_GET(flag/allow_simple_mob_recolor) ? "enabled" : "disabled"] newly spawned simple mobs to spawn with the recolour verb")
|
||||
to_chat(user, "You have [CONFIG_GET(flag/allow_simple_mob_recolor) ? "enabled" : "disabled"] newly spawned simple mobs to spawn with the recolour verb")
|
||||
|
||||
ADMIN_VERB(modify_shift_end, (R_ADMIN|R_EVENT|R_SERVER), "Modify Shift End", "Modifies the hard shift end time.", "Server.Game")
|
||||
ADMIN_VERB(modify_shift_end, (R_ADMIN|R_EVENT|R_SERVER), "Modify Shift End", "Modifies the hard shift end time.", ADMIN_CATEGORY_SERVER_GAME)
|
||||
GLOB.transfer_controller.modify_hard_end(user)
|
||||
|
||||
@@ -65,6 +65,8 @@ GLOBAL_PROTECT(href_token)
|
||||
if(IsAdminAdvancedProcCall())
|
||||
alert_to_permissions_elevation_attempt(usr)
|
||||
return QDEL_HINT_LETMELIVE
|
||||
if(faxreply)
|
||||
qdel(faxreply)
|
||||
. = ..()
|
||||
|
||||
/datum/admins/proc/activate()
|
||||
|
||||
@@ -1,24 +1,37 @@
|
||||
/datum/admins/proc/capture_map(tx as null|num, ty as null|num, tz as null|num, range as null|num)
|
||||
set category = "Server.Game"
|
||||
set name = "Capture Map Part"
|
||||
set desc = "Usage: Capture-Map-Part target_x_cord target_y_cord target_z_cord range (captures part of a map originating from bottom left corner)"
|
||||
|
||||
if(!check_rights(R_ADMIN|R_DEBUG|R_SERVER))
|
||||
ADMIN_VERB(capture_map, R_ADMIN, "Capture Map Part", "Usage: Capture-Map-Part target_x_cord target_y_cord target_z_cord range (captures part of a map originating from bottom left corner).", ADMIN_CATEGORY_SERVER_GAME)
|
||||
|
||||
var/pos_type = tgui_alert(user, "Do you want to use your current loc or a manual number input?", "Where?", list("Manual", "Location", "Cancel"))
|
||||
if(!pos_type || pos_type == "Cancel")
|
||||
return
|
||||
|
||||
var/tx
|
||||
var/ty
|
||||
var/tz
|
||||
if(pos_type == "Location")
|
||||
tx = user.mob.x
|
||||
ty = user.mob.y
|
||||
tz = user.mob.z
|
||||
else
|
||||
tx = tgui_input_number(user, "Select X location", "X Loc", 1, world.maxx, 1)
|
||||
ty = tgui_input_number(user, "Select Y location", "Y Loc", 1, world.maxy, 1)
|
||||
tz = tgui_input_number(user, "Select Z location", "Z Loc", 1, world.maxz, 1)
|
||||
|
||||
var/range = tgui_input_number(user, "Select Range", "Range", 1, 32, 1)
|
||||
|
||||
if(isnull(tx) || isnull(ty) || isnull(tz) || isnull(range))
|
||||
to_chat(usr, span_filter_notice("Capture Map Part, captures part of a map using camara like rendering."))
|
||||
to_chat(usr, span_filter_notice("Usage: Capture-Map-Part target_x_cord target_y_cord target_z_cord range."))
|
||||
to_chat(usr, span_filter_notice("Target coordinates specify bottom left corner of the capture, range defines render distance to opposite corner."))
|
||||
to_chat(user, span_filter_notice("Capture Map Part, captures part of a map using camara like rendering."))
|
||||
to_chat(user, span_filter_notice("Usage: Capture-Map-Part target_x_cord target_y_cord target_z_cord range."))
|
||||
to_chat(user, span_filter_notice("Target coordinates specify bottom left corner of the capture, range defines render distance to opposite corner."))
|
||||
return
|
||||
|
||||
if(range > 32 || range <= 0)
|
||||
to_chat(usr, span_filter_notice("Capturing range is incorrect, it must be within 1-32."))
|
||||
to_chat(user, span_filter_notice("Capturing range is incorrect, it must be within 1-32."))
|
||||
return
|
||||
|
||||
if(locate(tx,ty,tz))
|
||||
var/list/turfstocapture = list()
|
||||
var/hasasked = 0
|
||||
var/hasasked = FALSE
|
||||
for(var/xoff = 0 to range)
|
||||
for(var/yoff = 0 to range)
|
||||
var/turf/T = locate(tx + xoff,ty + yoff,tz)
|
||||
@@ -26,8 +39,8 @@
|
||||
turfstocapture.Add(T)
|
||||
else
|
||||
if(!hasasked)
|
||||
var/answer = tgui_alert(usr, "Capture includes non existant turf, Continue capture?","Continue capture?", list("No", "Yes"))
|
||||
hasasked = 1
|
||||
var/answer = tgui_alert(user, "Capture includes non existant turf, Continue capture?","Continue capture?", list("No", "Yes"))
|
||||
hasasked = TRUE
|
||||
if(answer != "Yes")
|
||||
return
|
||||
|
||||
@@ -53,7 +66,7 @@
|
||||
cap.Blend(img, blendMode2iconMode(A.blend_mode), A.pixel_x + xoff, A.pixel_y + yoff)
|
||||
|
||||
var/file_name = "map_capture_x[tx]_y[ty]_z[tz]_r[range].png"
|
||||
to_chat(usr, span_filter_notice("Saved capture in cache as [file_name]."))
|
||||
usr << browse_rsc(cap, file_name)
|
||||
to_chat(user, span_filter_notice("Saved capture in cache as [file_name]."))
|
||||
DIRECT_OUTPUT(user, browse_rsc(cap, file_name))
|
||||
else
|
||||
to_chat(usr, span_filter_notice("Target coordinates are incorrect."))
|
||||
to_chat(user, span_filter_notice("Target coordinates are incorrect."))
|
||||
|
||||
@@ -11,21 +11,15 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/client/proc/modify_server_news()
|
||||
set name = "Modify Public News"
|
||||
set category = "Server.Game"
|
||||
|
||||
if(!check_rights(0))
|
||||
return
|
||||
|
||||
ADMIN_VERB(modify_server_news, R_SERVER|R_EVENT, "Modify Public News", "Modify the public news message.", ADMIN_CATEGORY_SERVER_GAME)
|
||||
var/savefile/F = new(NEWSFILE)
|
||||
if(F)
|
||||
var/title = F["title"]
|
||||
var/body = html2paper_markup(F["body"])
|
||||
var/new_title = tgui_input_text(src,"Write a good title for the news update. Note: HTML is NOT supported.","Write News", title, MAX_MESSAGE_LEN)
|
||||
var/new_title = tgui_input_text(user, "Write a good title for the news update. Note: HTML is NOT supported.", "Write News", title, MAX_MESSAGE_LEN)
|
||||
if(!new_title)
|
||||
return
|
||||
var/new_body = tgui_input_text(src,"Write the body of the news update here. Note: HTML is NOT supported, however paper markup is supported. \n\
|
||||
var/new_body = tgui_input_text(user, "Write the body of the news update here. Note: HTML is NOT supported, however paper markup is supported. \n\
|
||||
Hitting enter will automatically add a line break. \n\
|
||||
Valid markup includes: \[b\], \[i\], \[u\], \[large\], \[h1\], \[h2\], \[h3\]\ \[*\], \[hr\], \[small\], \[list\], \[table\], \[grid\], \
|
||||
\[row\], \[cell\], \[logo\], \[talogo\], \[sglogo\].","Write News", body, MAX_MESSAGE_LEN, TRUE, prevent_enter = TRUE)
|
||||
@@ -36,9 +30,9 @@
|
||||
return
|
||||
F["title"] << new_title
|
||||
F["body"] << new_body
|
||||
F["author"] << key
|
||||
F["author"] << user.key
|
||||
F["timestamp"] << time2text(world.realtime, "DDD, MMM DD YYYY")
|
||||
message_admins("[key] modified the news to read:<br>[new_title]<br>[new_body]")
|
||||
message_admins("[user.key] modified the news to read:<br>[new_title]<br>[new_body]")
|
||||
|
||||
/proc/get_server_news()
|
||||
var/savefile/F = new(NEWSFILE)
|
||||
|
||||
@@ -1,6 +1,2 @@
|
||||
/datum/admins/proc/view_persistent_data()
|
||||
set category = "Admin.Game"
|
||||
set name = "View Persistent Data"
|
||||
set desc = "Shows a list of persistent data for this round. Allows modification by admins."
|
||||
|
||||
SSpersistence.show_info(usr)
|
||||
ADMIN_VERB(view_persistent_data, R_MOD|R_ADMIN, "View Persistent Data", "Shows a list of persistent data for this round. Allows modification by admins.", ADMIN_CATEGORY_GAME)
|
||||
SSpersistence.show_info(user)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
ADMIN_VERB_AND_CONTEXT_MENU(player_effects, R_FUN, "Player Effects", "Modify a player character with various 'special treatments' from a list.", ADMIN_CATEGORY_FUN_EVENT_KIT, mob/target in GLOB.mob_list)
|
||||
ADMIN_VERB_AND_CONTEXT_MENU(player_effects, R_FUN, "Player Effects", "Modify a player character with various 'special treatments' from a list.", ADMIN_CATEGORY_FUN_EVENT_KIT, mob/target in get_mob_with_client_list())
|
||||
var/datum/eventkit/player_effects/spawner = new()
|
||||
spawner.target = target
|
||||
spawner.tgui_interact(user.mob)
|
||||
@@ -776,19 +776,18 @@ ADMIN_VERB_AND_CONTEXT_MENU(player_effects, R_FUN, "Player Effects", "Modify a p
|
||||
target.dust()
|
||||
|
||||
if("paralyse")
|
||||
var/mob/living/Tar = target
|
||||
if(!istype(Tar))
|
||||
if(!isliving(target))
|
||||
return
|
||||
ui.user.client.holder.paralyze_mob(Tar)
|
||||
SSadmin_verbs.dynamic_invoke_verb(ui.user.client, /datum/admin_verb/paralyze_mob, target)
|
||||
|
||||
if("subtle_message")
|
||||
ui.user.client.cmd_admin_subtle_message(target)
|
||||
SSadmin_verbs.dynamic_invoke_verb(ui.user.client, /datum/admin_verb/cmd_admin_subtle_message, target)
|
||||
|
||||
if("direct_narrate")
|
||||
ui.user.client.cmd_admin_direct_narrate(target)
|
||||
SSadmin_verbs.dynamic_invoke_verb(ui.user.client, /datum/admin_verb/cmd_admin_direct_narrate, target)
|
||||
|
||||
if("player_panel")
|
||||
SSadmin_verbs.dynamic_invoke_verb(ui.user, /datum/admin_verb/show_player_panel, target)
|
||||
SSadmin_verbs.dynamic_invoke_verb(ui.user.client, /datum/admin_verb/show_player_panel, target)
|
||||
|
||||
if("view_variables")
|
||||
ui.user.client.debug_variables(target)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
/datum/admins/proc/player_panel_new()//The new one
|
||||
if (!check_rights_for(usr.client, R_HOLDER))
|
||||
/datum/admins/proc/player_panel_new(client/user)//The new one
|
||||
if (!check_rights_for(user, R_HOLDER))
|
||||
return
|
||||
var/ui_scale = owner.prefs.read_preference(/datum/preference/toggle/ui_scale)
|
||||
var/dat = "<html><head><title>Admin Player Panel</title></head>"
|
||||
@@ -320,11 +320,11 @@
|
||||
var/window_size = "size=600x480"
|
||||
if(owner.window_scaling && ui_scale)
|
||||
window_size = "size=[600 * owner.window_scaling]x[400 * owner.window_scaling]"
|
||||
usr << browse(dat, "window=players;[window_size]")
|
||||
user << browse(dat, "window=players;[window_size]")
|
||||
|
||||
//The old one
|
||||
/datum/admins/proc/player_panel_old()
|
||||
if (!check_rights_for(usr.client, R_HOLDER))
|
||||
/datum/admins/proc/player_panel_old(client/user)
|
||||
if (!check_rights_for(user, R_HOLDER))
|
||||
return
|
||||
|
||||
var/dat = "<html><head><title>Player Menu</title></head>"
|
||||
@@ -367,10 +367,10 @@
|
||||
|
||||
dat += {"<td>[M.key ? (M.client ? M.key : "[M.key] (DC)") : "No key"]</td>
|
||||
<td align=center><A href='byond://?src=\ref[src];[HrefToken()];adminplayeropts=\ref[M]'>X</A></td>
|
||||
<td align=center><A href='byond://?src=\ref[usr];[HrefToken()];priv_msg=\ref[M]'>PM</A></td>
|
||||
<td align=center><A href='byond://?src=\ref[user];[HrefToken()];priv_msg=\ref[M]'>PM</A></td>
|
||||
"}
|
||||
|
||||
if(usr.client)
|
||||
if(user)
|
||||
switch(is_special_character(M))
|
||||
if(0)
|
||||
dat += {"<td align=center><A href='byond://?src=\ref[src];[HrefToken()];traitor=\ref[M]'>Traitor?</A></td>"}
|
||||
@@ -385,11 +385,11 @@
|
||||
|
||||
dat += "</table></body></html>"
|
||||
|
||||
usr << browse(dat, "window=players;size=640x480")
|
||||
user << browse(dat, "window=players;size=640x480")
|
||||
|
||||
|
||||
|
||||
/datum/admins/proc/check_antagonists()
|
||||
/datum/admins/proc/check_antagonists(client/user)
|
||||
if (SSticker && SSticker.current_state >= GAME_STATE_PLAYING)
|
||||
var/dat = "<html><head><title>Round Status</title></head><body><h1>" + span_bold("Round Status") + "</h1>"
|
||||
dat += "Current Game Mode: " + span_bold("[SSticker.mode.name]") + "<BR>"
|
||||
@@ -416,6 +416,6 @@
|
||||
var/datum/antagonist/A = GLOB.all_antag_types[antag_type]
|
||||
dat += A.get_check_antag_output(src)
|
||||
dat += "</body></html>"
|
||||
usr << browse(dat, "window=roundstatus;size=400x500")
|
||||
user << browse(dat, "window=roundstatus;size=400x500")
|
||||
else
|
||||
tgui_alert_async(usr, "The game hasn't started yet!")
|
||||
tgui_alert_async(user, "The game hasn't started yet!")
|
||||
|
||||
+48
-70
@@ -28,7 +28,7 @@
|
||||
return
|
||||
|
||||
if(SSticker.mode && SSticker.mode.check_antagonists_topic(href, href_list))
|
||||
check_antagonists()
|
||||
check_antagonists(usr.client)
|
||||
return
|
||||
|
||||
if(href_list["ticket"])
|
||||
@@ -840,7 +840,7 @@
|
||||
if(istext(mute_type)) mute_type = text2num(mute_type)
|
||||
if(!isnum(mute_type)) return
|
||||
|
||||
cmd_admin_mute(M, mute_type)
|
||||
cmd_admin_mute(M, mute_type, usr)
|
||||
|
||||
else if(href_list["c_mode"])
|
||||
if(!check_rights(R_ADMIN|R_EVENT)) return
|
||||
@@ -876,7 +876,7 @@
|
||||
return tgui_alert_async(usr, "The game has already started.")
|
||||
GLOB.master_mode = href_list["c_mode2"]
|
||||
log_admin("[key_name(usr)] set the mode as [config.mode_names[GLOB.master_mode]].")
|
||||
message_admins(span_blue("[key_name_admin(usr)] set the mode as [config.mode_names[GLOB.master_mode]]."), 1)
|
||||
message_admins(span_blue("[key_name_admin(usr)] set the mode as [config.mode_names[GLOB.master_mode]]."))
|
||||
to_chat(world, span_world(span_blue("The mode is now: [config.mode_names[GLOB.master_mode]]")))
|
||||
Game() // updates the main game menu
|
||||
world.save_mode(GLOB.master_mode)
|
||||
@@ -891,7 +891,7 @@
|
||||
return tgui_alert_async(usr, "The game mode has to be secret!")
|
||||
GLOB.secret_force_mode = href_list["f_secret2"]
|
||||
log_admin("[key_name(usr)] set the forced secret mode as [GLOB.secret_force_mode].")
|
||||
message_admins(span_blue("[key_name_admin(usr)] set the forced secret mode as [GLOB.secret_force_mode]."), 1)
|
||||
message_admins(span_blue("[key_name_admin(usr)] set the forced secret mode as [GLOB.secret_force_mode]."))
|
||||
Game() // updates the main game menu
|
||||
.(href, list("f_secret"=1))
|
||||
|
||||
@@ -904,7 +904,7 @@
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] attempting to monkeyize [key_name(H)]")
|
||||
message_admins(span_blue("[key_name_admin(usr)] attempting to monkeyize [key_name_admin(H)]"), 1)
|
||||
message_admins(span_blue("[key_name_admin(usr)] attempting to monkeyize [key_name_admin(H)]"))
|
||||
H.monkeyize()
|
||||
|
||||
else if(href_list["corgione"])
|
||||
@@ -916,7 +916,7 @@
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] attempting to corgize [key_name(H)]")
|
||||
message_admins(span_blue("[key_name_admin(usr)] attempting to corgize [key_name_admin(H)]"), 1)
|
||||
message_admins(span_blue("[key_name_admin(usr)] attempting to corgize [key_name_admin(H)]"))
|
||||
H.corgize()
|
||||
|
||||
else if(href_list["forcespeech"])
|
||||
@@ -972,7 +972,7 @@
|
||||
|
||||
to_chat(M, span_filter_system(span_warning("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)
|
||||
message_admins(span_blue("[key_name_admin(usr)] sent [key_name_admin(M)] to the prison station."))
|
||||
|
||||
else if(href_list["sendbacktolobby"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
@@ -1021,7 +1021,7 @@
|
||||
spawn(50)
|
||||
to_chat(M, span_filter_system(span_notice("You have been sent to the Thunderdome.")))
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 1)")
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 1)", 1)
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 1)")
|
||||
|
||||
else if(href_list["tdome2"])
|
||||
if(!check_rights(R_FUN)) return
|
||||
@@ -1047,7 +1047,7 @@
|
||||
spawn(50)
|
||||
to_chat(M, span_filter_system(span_notice("You have been sent to the Thunderdome.")))
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 2)")
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 2)", 1)
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 2)")
|
||||
|
||||
else if(href_list["tdomeadmin"])
|
||||
if(!check_rights(R_FUN)) return
|
||||
@@ -1070,7 +1070,7 @@
|
||||
spawn(50)
|
||||
to_chat(M, span_filter_system(span_notice("You have been sent to the Thunderdome.")))
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Admin.)")
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Admin.)", 1)
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Admin.)")
|
||||
|
||||
else if(href_list["tdomeobserve"])
|
||||
if(!check_rights(R_FUN)) return
|
||||
@@ -1100,7 +1100,7 @@
|
||||
spawn(50)
|
||||
to_chat(M, span_filter_system(span_notice("You have been sent to the Thunderdome.")))
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Observer.)")
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Observer.)", 1)
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Observer.)")
|
||||
|
||||
else if(href_list["revive"])
|
||||
if(!check_rights(R_REJUVINATE)) return
|
||||
@@ -1112,7 +1112,7 @@
|
||||
|
||||
if(CONFIG_GET(flag/allow_admin_rev))
|
||||
L.revive()
|
||||
message_admins(span_red("Admin [key_name_admin(usr)] healed / revived [key_name_admin(L)]!"), 1)
|
||||
message_admins(span_red("Admin [key_name_admin(usr)] healed / revived [key_name_admin(L)]!"))
|
||||
log_admin("[key_name(usr)] healed / Rrvived [key_name(L)]")
|
||||
else
|
||||
to_chat(usr, span_filter_adminlog(span_filter_warning("Admin Rejuvinates have been disabled")))
|
||||
@@ -1125,7 +1125,7 @@
|
||||
to_chat(usr, span_filter_adminlog("This can only be used on instances of type /mob/living/carbon/human"))
|
||||
return
|
||||
|
||||
message_admins(span_red("Admin [key_name_admin(usr)] AIized [key_name_admin(H)]!"), 1)
|
||||
message_admins(span_red("Admin [key_name_admin(usr)] AIized [key_name_admin(H)]!"))
|
||||
log_admin("[key_name(usr)] AIized [key_name(H)]")
|
||||
H.AIize()
|
||||
|
||||
@@ -1137,7 +1137,7 @@
|
||||
to_chat(usr, span_filter_adminlog("This can only be used on instances of type /mob/living/carbon/human"))
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_alienize(H)
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/cmd_admin_alienize, H)
|
||||
|
||||
else if(href_list[VK_HK_TURN_ROBOT])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
@@ -1147,7 +1147,7 @@
|
||||
to_chat(usr, span_filter_adminlog("This can only be used on instances of type /mob/living/carbon/human"))
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_robotize(H)
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/cmd_admin_robotize, H)
|
||||
|
||||
else if(href_list["makeanimal"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
@@ -1157,7 +1157,7 @@
|
||||
to_chat(usr, span_filter_adminlog("This cannot be used on instances of type /mob/new_player"))
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_animalize(M)
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/cmd_admin_animalize, M)
|
||||
|
||||
else if(href_list["respawn"])
|
||||
if(!check_rights(R_SPAWN))
|
||||
@@ -1206,7 +1206,7 @@
|
||||
G.ManualFollow(M)
|
||||
|
||||
else if(href_list["check_antagonist"])
|
||||
check_antagonists()
|
||||
check_antagonists(usr.client)
|
||||
|
||||
else if(href_list["take_question"])
|
||||
|
||||
@@ -1513,13 +1513,13 @@
|
||||
if(!check_rights(R_ADMIN|R_EVENT|R_FUN)) return
|
||||
|
||||
var/mob/M = locate(href_list["narrateto"])
|
||||
usr.client.cmd_admin_direct_narrate(M)
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/cmd_admin_direct_narrate, M)
|
||||
|
||||
else if(href_list["subtlemessage"])
|
||||
if(!check_rights(R_MOD|R_ADMIN|R_EVENT|R_FUN,0)) return
|
||||
|
||||
var/mob/M = locate(href_list["subtlemessage"])
|
||||
usr.client.cmd_admin_subtle_message(M)
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/cmd_admin_subtle_message, M)
|
||||
|
||||
else if(href_list["traitor"])
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_EVENT)) return
|
||||
@@ -1532,7 +1532,7 @@
|
||||
if(!ismob(M))
|
||||
to_chat(usr, span_filter_adminlog("This can only be used on instances of type /mob."))
|
||||
return
|
||||
show_traitor_panel(M)
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/show_traitor_panel, M)
|
||||
|
||||
else if(href_list["create_object"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
@@ -1677,15 +1677,15 @@
|
||||
|
||||
else if(href_list["ac_view_wanted"]) //Admin newscaster Topic() stuff be here
|
||||
src.admincaster_screen = 18 //The ac_ prefix before the hrefs stands for AdminCaster.
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_set_channel_name"])
|
||||
src.admincaster_feed_channel.channel_name = sanitizeSafe(tgui_input_text(usr, "Provide a Feed Channel Name", "Network Channel Handler", "", encode = FALSE))
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_set_channel_lock"])
|
||||
src.admincaster_feed_channel.locked = !src.admincaster_feed_channel.locked
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_submit_new_channel"])
|
||||
var/check = 0
|
||||
@@ -1702,22 +1702,22 @@
|
||||
feedback_inc("newscaster_channels",1) //Adding channel to the global network
|
||||
log_admin("[key_name_admin(usr)] created command feed channel: [src.admincaster_feed_channel.channel_name]!")
|
||||
src.admincaster_screen=5
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_set_channel_receiving"])
|
||||
var/list/available_channels = list()
|
||||
for(var/datum/feed_channel/F in GLOB.news_network.network_channels)
|
||||
available_channels += F.channel_name
|
||||
src.admincaster_feed_channel.channel_name = tgui_input_list(usr, "Choose receiving Feed Channel", "Network Channel Handler", available_channels)
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_set_new_title"])
|
||||
src.admincaster_feed_message.title = tgui_input_text(usr, "Enter the Feed title", "Network Channel Handler", "", MAX_MESSAGE_LEN)
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_set_new_message"])
|
||||
src.admincaster_feed_message.body = tgui_input_text(usr, "Write your Feed story", "Network Channel Handler", "", MAX_MESSAGE_LEN, TRUE, prevent_enter = TRUE)
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_submit_new_message"])
|
||||
if(src.admincaster_feed_message.body =="" || admincaster_feed_message.title == "" || admincaster_feed_message.body =="\[REDACTED\]" || admincaster_feed_channel.channel_name == "" )
|
||||
@@ -1728,23 +1728,23 @@
|
||||
src.admincaster_screen=4
|
||||
|
||||
log_admin("[key_name_admin(usr)] submitted a feed story to channel: [src.admincaster_feed_channel.channel_name]!")
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_create_channel"])
|
||||
src.admincaster_screen=2
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_create_feed_story"])
|
||||
src.admincaster_screen=3
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_menu_censor_story"])
|
||||
src.admincaster_screen=10
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_menu_censor_channel"])
|
||||
src.admincaster_screen=11
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_menu_wanted"])
|
||||
var/already_wanted = 0
|
||||
@@ -1755,15 +1755,15 @@
|
||||
src.admincaster_feed_message.author = GLOB.news_network.wanted_issue.author
|
||||
src.admincaster_feed_message.body = GLOB.news_network.wanted_issue.body
|
||||
src.admincaster_screen = 14
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_set_wanted_name"])
|
||||
src.admincaster_feed_message.author = tgui_input_text(usr, "Provide the name of the Wanted person", "Network Security Handler", "", MAX_MESSAGE_LEN)
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_set_wanted_desc"])
|
||||
src.admincaster_feed_message.body = tgui_input_text(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler", "", MAX_MESSAGE_LEN)
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_submit_wanted"])
|
||||
var/input_param = text2num(href_list["ac_submit_wanted"])
|
||||
@@ -1789,7 +1789,7 @@
|
||||
GLOB.news_network.wanted_issue.backup_author = src.admincaster_feed_message.backup_author
|
||||
src.admincaster_screen = 19
|
||||
log_admin("[key_name_admin(usr)] issued a Station-wide Wanted Notification for [src.admincaster_feed_message.author]!")
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_cancel_wanted"])
|
||||
var/choice = tgui_alert(usr, "Please confirm Wanted Issue removal","Network Security Handler",list("Confirm","Cancel"))
|
||||
@@ -1798,7 +1798,7 @@
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in GLOB.allCasters)
|
||||
NEWSCASTER.update_icon()
|
||||
src.admincaster_screen=17
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_censor_channel_author"])
|
||||
var/datum/feed_channel/FC = locate(href_list["ac_censor_channel_author"])
|
||||
@@ -1807,7 +1807,7 @@
|
||||
FC.author = span_bold("\[REDACTED\]")
|
||||
else
|
||||
FC.author = FC.backup_author
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_censor_channel_story_author"])
|
||||
var/datum/feed_message/MSG = locate(href_list["ac_censor_channel_story_author"])
|
||||
@@ -1816,7 +1816,7 @@
|
||||
MSG.author = span_bold("\[REDACTED\]")
|
||||
else
|
||||
MSG.author = MSG.backup_author
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_censor_channel_story_body"])
|
||||
var/datum/feed_message/MSG = locate(href_list["ac_censor_channel_story_body"])
|
||||
@@ -1825,22 +1825,22 @@
|
||||
MSG.body = span_bold("\[REDACTED\]")
|
||||
else
|
||||
MSG.body = MSG.backup_body
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_pick_d_notice"])
|
||||
var/datum/feed_channel/FC = locate(href_list["ac_pick_d_notice"])
|
||||
src.admincaster_feed_channel = FC
|
||||
src.admincaster_screen=13
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_toggle_d_notice"])
|
||||
var/datum/feed_channel/FC = locate(href_list["ac_toggle_d_notice"])
|
||||
FC.censored = !FC.censored
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_view"])
|
||||
src.admincaster_screen=1
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_setScreen"]) //Brings us to the main menu and resets all fields~
|
||||
src.admincaster_screen = text2num(href_list["ac_setScreen"])
|
||||
@@ -1849,26 +1849,26 @@
|
||||
src.admincaster_feed_channel = new /datum/feed_channel
|
||||
if(src.admincaster_feed_message)
|
||||
src.admincaster_feed_message = new /datum/feed_message
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_show_channel"])
|
||||
var/datum/feed_channel/FC = locate(href_list["ac_show_channel"])
|
||||
src.admincaster_feed_channel = FC
|
||||
src.admincaster_screen = 9
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_pick_censor_channel"])
|
||||
var/datum/feed_channel/FC = locate(href_list["ac_pick_censor_channel"])
|
||||
src.admincaster_feed_channel = FC
|
||||
src.admincaster_screen = 12
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_refresh"])
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["ac_set_signature"])
|
||||
src.admincaster_signature = tgui_input_text(usr, "Provide your desired signature", "Network Identity Handler", "", MAX_MESSAGE_LEN)
|
||||
src.access_news_network()
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/access_news_network)
|
||||
|
||||
else if(href_list["populate_inactive_customitems"])
|
||||
if(check_rights(R_ADMIN|R_SERVER))
|
||||
@@ -1910,28 +1910,6 @@
|
||||
return
|
||||
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/despawn_player, carbon_target)
|
||||
|
||||
// player info stuff
|
||||
|
||||
if(href_list["notes"])
|
||||
var/ckey = href_list["ckey"]
|
||||
if(!ckey)
|
||||
var/mob/M = locate(href_list["mob"])
|
||||
if(ismob(M))
|
||||
ckey = M.ckey
|
||||
|
||||
switch(href_list["notes"])
|
||||
if("show")
|
||||
var/datum/tgui_module/player_notes_info/A = new(src)
|
||||
A.key = ckey
|
||||
A.tgui_interact(usr)
|
||||
if("list")
|
||||
var/filter
|
||||
if(href_list["filter"] && href_list["filter"] != "0")
|
||||
filter = url_decode(href_list["filter"])
|
||||
PlayerNotesPage(text2num(href_list["index"]), filter)
|
||||
if("filter")
|
||||
PlayerNotesFilter()
|
||||
return
|
||||
|
||||
/mob/living/proc/can_centcom_reply()
|
||||
|
||||
@@ -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