mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-23 05:07:51 +01:00
[MIRROR] some more admin verbs (#12480)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
co-authored by
Kashargul
parent
2cb976153e
commit
df328ef354
+16
-22
@@ -862,7 +862,7 @@ ADMIN_VERB(cancel_reboot, R_SERVER, "Cancel Reboot", "Cancels a pending world re
|
||||
else
|
||||
to_chat(world, span_world("Deadchat has been globally disabled!"))
|
||||
log_admin("[key_name(usr)] toggled deadchat.")
|
||||
message_admins("[key_name_admin(usr)] toggled deadchat.", 1)
|
||||
message_admins("[key_name_admin(usr)] toggled deadchat.")
|
||||
feedback_add_details("admin_verb","TDSAY") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc
|
||||
|
||||
/datum/admins/proc/toggleoocdead()
|
||||
@@ -875,7 +875,7 @@ ADMIN_VERB(cancel_reboot, R_SERVER, "Cancel Reboot", "Cancels a pending world re
|
||||
|
||||
CONFIG_SET(flag/dooc_allowed, !CONFIG_GET(flag/dooc_allowed))
|
||||
log_admin("[key_name(usr)] toggled Dead OOC.")
|
||||
message_admins("[key_name_admin(usr)] toggled Dead OOC.", 1)
|
||||
message_admins("[key_name_admin(usr)] toggled Dead OOC.")
|
||||
feedback_add_details("admin_verb","TDOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/togglehubvisibility()
|
||||
@@ -888,7 +888,7 @@ ADMIN_VERB(cancel_reboot, R_SERVER, "Cancel Reboot", "Cancels a pending world re
|
||||
|
||||
world.visibility = !(world.visibility)
|
||||
log_admin("[key_name(usr)] toggled hub visibility.")
|
||||
message_admins("[key_name_admin(usr)] toggled hub visibility. The server is now [world.visibility ? "visible" : "invisible"] ([world.visibility]).", 1)
|
||||
message_admins("[key_name_admin(usr)] toggled hub visibility. The server is now [world.visibility ? "visible" : "invisible"] ([world.visibility]).")
|
||||
feedback_add_details("admin_verb","THUB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc
|
||||
|
||||
/datum/admins/proc/toggletraitorscaling()
|
||||
@@ -897,7 +897,7 @@ ADMIN_VERB(cancel_reboot, R_SERVER, "Cancel Reboot", "Cancels a pending world re
|
||||
set name="Toggle Traitor Scaling"
|
||||
CONFIG_SET(flag/traitor_scaling, !CONFIG_GET(flag/traitor_scaling))
|
||||
log_admin("[key_name(usr)] toggled Traitor Scaling to [CONFIG_GET(flag/traitor_scaling)].")
|
||||
message_admins("[key_name_admin(usr)] toggled Traitor Scaling [CONFIG_GET(flag/traitor_scaling) ? "on" : "off"].", 1)
|
||||
message_admins("[key_name_admin(usr)] toggled Traitor Scaling [CONFIG_GET(flag/traitor_scaling) ? "on" : "off"].")
|
||||
feedback_add_details("admin_verb","TTS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/startnow()
|
||||
@@ -933,7 +933,7 @@ ADMIN_VERB(cancel_reboot, R_SERVER, "Cancel Reboot", "Cancels a pending world re
|
||||
else
|
||||
to_chat(world, span_world("New players may now enter the game."))
|
||||
log_admin("[key_name(usr)] toggled new player game entering.")
|
||||
message_admins(span_blue("[key_name_admin(usr)] toggled new player game entering."), 1)
|
||||
message_admins(span_blue("[key_name_admin(usr)] toggled new player game entering."))
|
||||
world.update_status()
|
||||
feedback_add_details("admin_verb","TE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -959,7 +959,7 @@ ADMIN_VERB(cancel_reboot, R_SERVER, "Cancel Reboot", "Cancels a pending world re
|
||||
to_chat(world, span_world("You may now respawn."))
|
||||
else
|
||||
to_chat(world, span_world("You may no longer respawn :("))
|
||||
message_admins(span_blue("[key_name_admin(usr)] toggled respawn to [CONFIG_GET(flag/abandon_allowed) ? "On" : "Off"]."), 1)
|
||||
message_admins(span_blue("[key_name_admin(usr)] toggled respawn to [CONFIG_GET(flag/abandon_allowed) ? "On" : "Off"]."))
|
||||
log_admin("[key_name(usr)] toggled respawn to [CONFIG_GET(flag/abandon_allowed) ? "On" : "Off"].")
|
||||
world.update_status()
|
||||
feedback_add_details("admin_verb","TR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -969,7 +969,7 @@ ADMIN_VERB(cancel_reboot, R_SERVER, "Cancel Reboot", "Cancels a pending world re
|
||||
set desc="Whether persistent data will be saved from now on."
|
||||
set name="Toggle Persistent Data"
|
||||
CONFIG_SET(flag/persistence_disabled, !CONFIG_GET(flag/persistence_disabled))
|
||||
message_admins(span_blue("[key_name_admin(usr)] toggled persistence to [CONFIG_GET(flag/persistence_disabled) ? "Off" : "On"]."), 1)
|
||||
message_admins(span_blue("[key_name_admin(usr)] toggled persistence to [CONFIG_GET(flag/persistence_disabled) ? "Off" : "On"]."))
|
||||
log_admin("[key_name(usr)] toggled persistence to [CONFIG_GET(flag/persistence_disabled) ? "Off" : "On"].")
|
||||
world.update_status()
|
||||
feedback_add_details("admin_verb","TPD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -983,27 +983,21 @@ ADMIN_VERB(cancel_reboot, R_SERVER, "Cancel Reboot", "Cancels a pending world re
|
||||
to_chat(world, span_world("Persistence is now enabled."))
|
||||
else
|
||||
to_chat(world, span_world("Persistence is no longer enabled."))
|
||||
message_admins(span_blue("[key_name_admin(usr)] toggled persistence to [CONFIG_GET(flag/persistence_ignore_mapload) ? "Off" : "On"]."), 1)
|
||||
message_admins(span_blue("[key_name_admin(usr)] toggled persistence to [CONFIG_GET(flag/persistence_ignore_mapload) ? "Off" : "On"]."))
|
||||
log_admin("[key_name(usr)] toggled persistence to [CONFIG_GET(flag/persistence_ignore_mapload) ? "Off" : "On"].")
|
||||
world.update_status()
|
||||
feedback_add_details("admin_verb","TMPD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/toggle_aliens()
|
||||
set category = "Server.Game"
|
||||
set desc="Toggle alien mobs"
|
||||
set name="Toggle Aliens"
|
||||
ADMIN_VERB(toggle_aliens, R_FUN|R_SERVER, "Toggle Aliens", "Toggle alien mobs.", ADMIN_CATEGORY_SERVER_GAME)
|
||||
CONFIG_SET(flag/aliens_allowed, !CONFIG_GET(flag/aliens_allowed))
|
||||
log_admin("[key_name(usr)] toggled Aliens to [CONFIG_GET(flag/aliens_allowed)].")
|
||||
message_admins("[key_name_admin(usr)] toggled Aliens [CONFIG_GET(flag/aliens_allowed) ? "on" : "off"].", 1)
|
||||
log_admin("[key_name(user)] toggled Aliens to [CONFIG_GET(flag/aliens_allowed)].")
|
||||
message_admins("[key_name_admin(user)] toggled Aliens [CONFIG_GET(flag/aliens_allowed) ? "on" : "off"].")
|
||||
feedback_add_details("admin_verb","TA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/toggle_space_ninja()
|
||||
set category = "Server.Game"
|
||||
set desc="Toggle space ninjas spawning."
|
||||
set name="Toggle Space Ninjas"
|
||||
ADMIN_VERB(toggle_space_ninja, R_FUN|R_SERVER, "Toggle Space Ninjas", "Toggle space ninjas spawning.", ADMIN_CATEGORY_SERVER_GAME)
|
||||
CONFIG_SET(flag/ninjas_allowed, !CONFIG_GET(flag/ninjas_allowed))
|
||||
log_admin("[key_name(usr)] toggled Space Ninjas to [CONFIG_GET(flag/ninjas_allowed)].")
|
||||
message_admins("[key_name_admin(usr)] toggled Space Ninjas [CONFIG_GET(flag/ninjas_allowed) ? "on" : "off"].", 1)
|
||||
log_admin("[key_name(user)] toggled Space Ninjas to [CONFIG_GET(flag/ninjas_allowed)].")
|
||||
message_admins("[key_name_admin(user)] toggled Space Ninjas [CONFIG_GET(flag/ninjas_allowed) ? "on" : "off"].")
|
||||
feedback_add_details("admin_verb","TSN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/delay()
|
||||
@@ -1017,7 +1011,7 @@ ADMIN_VERB(cancel_reboot, R_SERVER, "Cancel Reboot", "Cancels a pending world re
|
||||
SSticker.toggle_delay()
|
||||
|
||||
log_admin("[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].")
|
||||
message_admins(span_blue("[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"]."), 1)
|
||||
message_admins(span_blue("[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"]."))
|
||||
return
|
||||
GLOB.round_progressing = !GLOB.round_progressing
|
||||
if (!GLOB.round_progressing)
|
||||
@@ -1308,7 +1302,7 @@ ADMIN_VERB(cancel_reboot, R_SERVER, "Cancel Reboot", "Cancels a pending world re
|
||||
else
|
||||
to_chat(world, span_world("Guests may now enter the game."))
|
||||
log_admin("[key_name(usr)] toggled guests game entering [CONFIG_GET(flag/guests_allowed)?"":"dis"]allowed.")
|
||||
message_admins(span_blue("[key_name_admin(usr)] toggled guests game entering [CONFIG_GET(flag/guests_allowed)?"":"dis"]allowed."), 1)
|
||||
message_admins(span_blue("[key_name_admin(usr)] toggled guests game entering [CONFIG_GET(flag/guests_allowed)?"":"dis"]allowed."))
|
||||
feedback_add_details("admin_verb","TGU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/update_mob_sprite(mob/living/carbon/human/H as mob)
|
||||
|
||||
@@ -26,27 +26,28 @@
|
||||
to_file(F, span_filter_adminlog("<small>[time2text(world.timeofday,"hh:mm")] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"))
|
||||
|
||||
//ADMINVERBS
|
||||
/client/proc/investigate_show( subject in list("hrefs","notes","singulo","telesci") )
|
||||
set name = "Investigate"
|
||||
set category = "Admin.Investigate"
|
||||
if(!check_rights_for(src, R_HOLDER)) return
|
||||
ADMIN_VERB(investigate_show, R_ADMIN|R_MOD|R_SERVER, "Investigate", "Check hrefs, notes or singulo and telesci logs.", ADMIN_CATEGORY_INVESTIGATE)
|
||||
var/subject = tgui_input_list(user, "Select Subject", "Select the subject to investigate.", list("hrefs","notes","singulo","telesci"))
|
||||
if(!subject)
|
||||
return
|
||||
|
||||
switch(subject)
|
||||
if("singulo", "telesci") //general one-round-only stuff
|
||||
var/F = investigate_subject2file(subject)
|
||||
if(!F)
|
||||
to_chat(src, span_filter_adminlog(span_warning("Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.")))
|
||||
to_chat(user, span_filter_adminlog(span_warning("Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.")))
|
||||
return
|
||||
src << browse("<html>[F]</html>","window=investigate[subject];size=800x300")
|
||||
user << browse("<html>[F]</html>","window=investigate[subject];size=800x300")
|
||||
|
||||
if("hrefs") //persistant logs and stuff
|
||||
if(config && CONFIG_GET(flag/log_hrefs))
|
||||
if(GLOB.href_logfile)
|
||||
src << browse("<html>[GLOB.href_logfile]</html>","window=investigate[subject];size=800x300")
|
||||
user << browse("<html>[GLOB.href_logfile]</html>","window=investigate[subject];size=800x300")
|
||||
else
|
||||
to_chat(src, span_filter_adminlog(span_warning("Error: admin_investigate: No href logfile found.")))
|
||||
to_chat(user, span_filter_adminlog(span_warning("Error: admin_investigate: No href logfile found.")))
|
||||
return
|
||||
else
|
||||
to_chat(src, span_filter_adminlog(span_warning("Error: admin_investigate: Href Logging is not on.")))
|
||||
to_chat(user, span_filter_adminlog(span_warning("Error: admin_investigate: Href Logging is not on.")))
|
||||
return
|
||||
|
||||
#undef INVESTIGATE_DIR
|
||||
|
||||
@@ -2,17 +2,22 @@
|
||||
#define ENABLE_MEMOS // this is so stupid
|
||||
|
||||
//switch verb so we don't spam up the verb lists with like, 3 verbs for this feature.
|
||||
/client/proc/admin_memo(task in list("write","show","delete"))
|
||||
set name = "Memo"
|
||||
set category = "Server.Admin"
|
||||
ADMIN_VERB(admin_memo, R_ADMIN|R_MOD|R_EVENT, "Memo", "Manage admin memos.", ADMIN_CATEGORY_SERVER_ADMIN)
|
||||
#ifndef ENABLE_MEMOS
|
||||
return
|
||||
#endif
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/task = tgui_input_list(user, "Select Action", "Select the Memo Action.", list("write","show","delete"))
|
||||
if(!task)
|
||||
return
|
||||
|
||||
switch(task)
|
||||
if("write") admin_memo_write()
|
||||
if("show") admin_memo_show()
|
||||
if("delete") admin_memo_delete()
|
||||
if("write")
|
||||
user.admin_memo_write()
|
||||
if("show")
|
||||
user.admin_memo_show()
|
||||
if("delete")
|
||||
user.admin_memo_delete()
|
||||
|
||||
//write a message
|
||||
/client/proc/admin_memo_write()
|
||||
|
||||
@@ -3,7 +3,6 @@ GLOBAL_LIST_INIT(admin_verbs_admin, list(
|
||||
/client/proc/toggle_vantag_hud,
|
||||
/datum/admins/proc/set_tcrystals,
|
||||
/datum/admins/proc/add_tcrystals,
|
||||
/client/proc/invisimin, //allows our mob to go invisible/visible,
|
||||
/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,
|
||||
@@ -13,7 +12,6 @@ GLOBAL_LIST_INIT(admin_verbs_admin, list(
|
||||
/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/admin_ghost, //allows us to ghost/reenter body at will,
|
||||
/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,
|
||||
@@ -31,18 +29,14 @@ GLOBAL_LIST_INIT(admin_verbs_admin, list(
|
||||
/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/jumptoturf, //allows us to jump to a specific turf,
|
||||
/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_words, //displays cult-words,
|
||||
/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/admin_memo, //admin memo system. show/delete/write. +SERVER needed to delete admin memos of others,
|
||||
/client/proc/dsay, //talk in deadchat using our ckey/fakekey,
|
||||
/client/proc/investigate_show, //various admintools for investigation. Such as a singulo grief-log,
|
||||
/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,
|
||||
@@ -80,34 +74,6 @@ GLOBAL_LIST_INIT(admin_verbs_admin, list(
|
||||
/client/proc/reload_alienwhitelist //ChompADD
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(admin_verbs_sounds, list(
|
||||
/client/proc/play_local_sound,
|
||||
/client/proc/play_sound,
|
||||
/client/proc/play_server_sound,
|
||||
/client/proc/play_web_sound,
|
||||
/client/proc/play_z_sound
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(admin_verbs_fun, list(
|
||||
/client/proc/object_talk,
|
||||
/datum/admins/proc/cmd_admin_dress,
|
||||
/client/proc/drop_bomb,
|
||||
/datum/admins/proc/toggle_aliens,
|
||||
/datum/admins/proc/toggle_space_ninja,
|
||||
/client/proc/make_sound,
|
||||
/client/proc/editappear,
|
||||
/client/proc/roll_dices,
|
||||
/datum/admins/proc/call_supply_drop,
|
||||
/datum/admins/proc/call_drop_pod,
|
||||
/client/proc/player_effects,
|
||||
/client/proc/admin_lightning_strike,
|
||||
/client/proc/tgui_admin_lists, //CHOMPStation Add
|
||||
/client/proc/adminorbit,
|
||||
/client/proc/getPlayerStatus,
|
||||
/client/proc/manage_event_triggers,
|
||||
/client/proc/fake_pdaconvos
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(admin_verbs_spawn, list(
|
||||
/datum/admins/proc/spawn_fruit,
|
||||
/datum/admins/proc/spawn_custom_item,
|
||||
@@ -144,8 +110,6 @@ GLOBAL_LIST_INIT(admin_verbs_server, list(
|
||||
/datum/admins/proc/adrev,
|
||||
/datum/admins/proc/adspawn,
|
||||
/datum/admins/proc/adjump,
|
||||
/datum/admins/proc/toggle_aliens,
|
||||
/datum/admins/proc/toggle_space_ninja,
|
||||
/client/proc/check_customitem_activity,
|
||||
/client/proc/modify_server_news,
|
||||
/client/proc/recipe_dump,
|
||||
@@ -181,7 +145,6 @@ GLOBAL_LIST_INIT(admin_verbs_debug, list(
|
||||
/client/proc/jumptomob,
|
||||
/client/proc/jumptocoord,
|
||||
/client/proc/dsay,
|
||||
/client/proc/admin_ghost, //allows us to ghost/reenter body at will,
|
||||
/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,
|
||||
@@ -210,24 +173,12 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list(
|
||||
/datum/admins/proc/toggleenter,
|
||||
/datum/admins/proc/toggleguests,
|
||||
/datum/admins/proc/announce,
|
||||
/client/proc/admin_ghost,
|
||||
/client/proc/cmd_admin_subtle_message,
|
||||
/client/proc/cmd_admin_check_player_logs,
|
||||
/client/proc/cmd_admin_check_dialogue_logs,
|
||||
/datum/admins/proc/access_news_network,
|
||||
/client/proc/cmd_admin_direct_narrate,
|
||||
/client/proc/cmd_admin_world_narrate,
|
||||
/client/proc/check_words,
|
||||
/client/proc/play_local_sound,
|
||||
/client/proc/play_sound,
|
||||
/client/proc/play_server_sound,
|
||||
/client/proc/play_web_sound,
|
||||
/client/proc/object_talk,
|
||||
/datum/admins/proc/cmd_admin_dress,
|
||||
/client/proc/drop_bomb,
|
||||
/datum/admins/proc/toggle_aliens,
|
||||
/datum/admins/proc/toggle_space_ninja,
|
||||
/client/proc/make_sound,
|
||||
/client/proc/Set_Holiday,
|
||||
/client/proc/ToRban,
|
||||
/datum/admins/proc/startnow,
|
||||
@@ -252,7 +203,6 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list(
|
||||
/client/proc/cmd_display_del_log,
|
||||
/client/proc/air_report,
|
||||
/client/proc/enable_debug_verbs,
|
||||
/client/proc/roll_dices,
|
||||
/datum/admins/proc/set_uplink,
|
||||
/datum/admins/proc/set_tcrystals,
|
||||
/client/proc/stop_sounds
|
||||
@@ -262,7 +212,6 @@ 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/admin_ghost, //allows us to ghost/reenter body at will,
|
||||
/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,
|
||||
@@ -287,7 +236,6 @@ 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/admin_ghost,
|
||||
/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,
|
||||
@@ -311,24 +259,14 @@ GLOBAL_LIST_INIT(admin_verbs_event_manager, list(
|
||||
/client/proc/jumptocoord,
|
||||
/datum/admins/proc/delay,
|
||||
/client/proc/Set_Holiday,
|
||||
/client/proc/make_sound,
|
||||
/datum/admins/proc/cmd_admin_dress,
|
||||
/client/proc/drop_bomb,
|
||||
/client/proc/make_sound,
|
||||
/client/proc/editappear,
|
||||
/client/proc/roll_dices,
|
||||
/datum/admins/proc/call_supply_drop,
|
||||
/datum/admins/proc/call_drop_pod,
|
||||
/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/cmd_admin_dress,
|
||||
/datum/admins/proc/set_tcrystals,
|
||||
/datum/admins/proc/add_tcrystals,
|
||||
/client/proc/invisimin, //allows our mob to go invisible/visible,
|
||||
/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,
|
||||
@@ -336,7 +274,6 @@ GLOBAL_LIST_INIT(admin_verbs_event_manager, list(
|
||||
/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/admin_ghost, //allows us to ghost/reenter body at will,
|
||||
/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',
|
||||
@@ -349,16 +286,13 @@ GLOBAL_LIST_INIT(admin_verbs_event_manager, list(
|
||||
/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/jumptoturf, //allows us to jump to a specific turf,
|
||||
/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_words, //displays cult-words,
|
||||
/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/admin_memo, //admin memo system. show/delete/write. +SERVER needed to delete admin memos of others,
|
||||
/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,
|
||||
|
||||
@@ -4,10 +4,8 @@
|
||||
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_FUN) add_verb(src, GLOB.admin_verbs_fun)
|
||||
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_SOUNDS) add_verb(src, GLOB.admin_verbs_sounds)
|
||||
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)
|
||||
@@ -20,10 +18,8 @@
|
||||
remove_verb(src, list(
|
||||
/client/proc/togglebuildmodeself,
|
||||
GLOB.admin_verbs_admin,
|
||||
GLOB.admin_verbs_fun,
|
||||
GLOB.admin_verbs_server,
|
||||
GLOB.admin_verbs_debug,
|
||||
GLOB.admin_verbs_sounds,
|
||||
GLOB.admin_verbs_spawn,
|
||||
GLOB.debug_verbs
|
||||
))
|
||||
@@ -64,17 +60,14 @@
|
||||
feedback_add_details("admin_verb","TAVVS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/proc/admin_ghost()
|
||||
set category = "Admin.Game"
|
||||
set name = "Aghost"
|
||||
if(!check_rights_for(src, R_HOLDER)) return
|
||||
|
||||
ADMIN_VERB(admin_ghost, R_HOLDER, "Aghost", "Ghost out of your body with the option to return at any time.", ADMIN_CATEGORY_GAME)
|
||||
var/build_mode
|
||||
if(src.buildmode)
|
||||
build_mode = tgui_alert(src, "You appear to be currently in buildmode. Do you want to re-enter buildmode after aghosting?", "Buildmode", list("Yes", "No"))
|
||||
if(user.buildmode)
|
||||
build_mode = tgui_alert(user, "You appear to be currently in buildmode. Do you want to re-enter buildmode after aghosting?", "Buildmode", list("Yes", "No"))
|
||||
if(build_mode != "Yes")
|
||||
to_chat(src, "Will not re-enter buildmode after switch.")
|
||||
to_chat(user, "Will not re-enter buildmode after switch.")
|
||||
|
||||
var/mob/mob = user.mob
|
||||
if(isobserver(mob))
|
||||
//re-enter
|
||||
var/mob/observer/dead/ghost = mob
|
||||
@@ -93,7 +86,7 @@
|
||||
feedback_add_details("admin_verb","P") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
else if(isnewplayer(mob))
|
||||
to_chat(src, span_filter_system(span_warning("Error: Aghost: Can't admin-ghost whilst in the lobby. Join or Observe first.")))
|
||||
to_chat(user, span_filter_system(span_warning("Error: Aghost: Can't admin-ghost whilst in the lobby. Join or Observe first.")))
|
||||
else
|
||||
//ghostize
|
||||
var/mob/body = mob
|
||||
@@ -101,38 +94,34 @@
|
||||
if(build_mode)
|
||||
togglebuildmode(body)
|
||||
ghost = body.ghostize(1, TRUE)
|
||||
log_and_message_admins("[key_name(src)] admin-ghosted.") // CHOMPEdit - Add logging.
|
||||
log_and_message_admins("[key_name(user)] admin-ghosted.") // CHOMPEdit - Add logging.
|
||||
if(build_mode == "Yes")
|
||||
togglebuildmode(ghost)
|
||||
else
|
||||
ghost = body.ghostize(1, TRUE)
|
||||
log_and_message_admins("[key_name(src)] admin-ghosted.") // CHOMPEdit - Add logging.
|
||||
init_verbs()
|
||||
log_and_message_admins("[key_name(user)] admin-ghosted.") // CHOMPEdit - Add logging.
|
||||
user.init_verbs()
|
||||
if(body)
|
||||
body.teleop = ghost
|
||||
if(!body.key)
|
||||
body.key = "@[key]" //Haaaaaaaack. But the people have spoken. If it breaks; blame adminbus
|
||||
body.key = "@[user.key]" //Haaaaaaaack. But the people have spoken. If it breaks; blame adminbus
|
||||
feedback_add_details("admin_verb","O") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/invisimin()
|
||||
set name = "Invisimin"
|
||||
set category = "Admin.Game"
|
||||
set desc = "Toggles ghost-like invisibility (Don't abuse this)"
|
||||
ADMIN_VERB(invisimin, R_ADMIN|R_MOD|R_EVENT, "Invisimin", "Toggles ghost-like invisibility (Don't abuse this).", ADMIN_CATEGORY_GAME)
|
||||
var/mob/mob = user.mob
|
||||
if(mob.invisibility > INVISIBILITY_OBSERVER)
|
||||
to_chat(user, span_warning("You can't use this, your current invisibility level ([mob.invisibility]) is above the observer level ([INVISIBILITY_OBSERVER])."))
|
||||
return
|
||||
|
||||
if(check_rights(R_HOLDER) && mob)
|
||||
if(mob.invisibility > INVISIBILITY_OBSERVER)
|
||||
to_chat(mob, span_warning("You can't use this, your current invisibility level ([mob.invisibility]) is above the observer level ([INVISIBILITY_OBSERVER])."))
|
||||
return
|
||||
if(mob.invisibility == INVISIBILITY_OBSERVER)
|
||||
mob.invisibility = initial(mob.invisibility)
|
||||
to_chat(mob, span_filter_system(span_danger("Invisimin off. Invisibility reset.")))
|
||||
mob.alpha = max(mob.alpha + 100, 255)
|
||||
return
|
||||
|
||||
if(mob.invisibility == INVISIBILITY_OBSERVER)
|
||||
mob.invisibility = initial(mob.invisibility)
|
||||
to_chat(mob, span_filter_system(span_danger("Invisimin off. Invisibility reset.")))
|
||||
mob.alpha = max(mob.alpha + 100, 255)
|
||||
return
|
||||
|
||||
mob.invisibility = INVISIBILITY_OBSERVER
|
||||
to_chat(mob, span_filter_system(span_boldnotice("Invisimin on. You are now as invisible as a ghost.")))
|
||||
mob.alpha = max(mob.alpha - 100, 0)
|
||||
mob.invisibility = INVISIBILITY_OBSERVER
|
||||
to_chat(mob, span_filter_system(span_boldnotice("Invisimin on. You are now as invisible as a ghost.")))
|
||||
mob.alpha = max(mob.alpha - 100, 0)
|
||||
|
||||
ADMIN_VERB(list_bombers, R_ADMIN, "List Bombers", "Look at all bombs and their likely culprit.", ADMIN_CATEGORY_GAME)
|
||||
user.holder.list_bombers()
|
||||
@@ -276,19 +265,15 @@ ADMIN_VERB(stealth, R_STEALTH, "Stealth Mode", "Toggle stealth.", "Admin.Game")
|
||||
#undef MAX_WARNS
|
||||
#undef AUTOBANTIME
|
||||
|
||||
/client/proc/drop_bomb() // Some admin dickery that can probably be done better -- TLE
|
||||
set category = "Fun.Do Not"
|
||||
set name = "Drop Bomb"
|
||||
set desc = "Cause an explosion of varying strength at your location."
|
||||
|
||||
var/turf/epicenter = mob.loc
|
||||
ADMIN_VERB(drop_bomb, R_FUN, "Drop Bomb", "Cause an explosion of varying strength at your location.", ADMIN_CATEGORY_FUN_DO_NOT) // Some admin dickery that can probably be done better -- TLE
|
||||
var/turf/epicenter = user.mob.loc
|
||||
var/list/choices = list("Small Bomb", "Medium Bomb", "Big Bomb", "Maxcap Bomb", "SM Blast", "Custom Bomb", "Cancel")
|
||||
var/choice = tgui_input_list(usr, "What size explosion would you like to produce?", "Explosion Choice", choices)
|
||||
var/choice = tgui_input_list(user, "What size explosion would you like to produce?", "Explosion Choice", choices)
|
||||
switch(choice)
|
||||
if(null)
|
||||
return 0
|
||||
return FALSE
|
||||
if("Cancel")
|
||||
return 0
|
||||
return FALSE
|
||||
if("Small Bomb")
|
||||
explosion(epicenter, 1, 2, 3, 3)
|
||||
if("Medium Bomb")
|
||||
@@ -300,15 +285,14 @@ ADMIN_VERB(stealth, R_STEALTH, "Stealth Mode", "Toggle stealth.", "Admin.Game")
|
||||
if("SM Blast")
|
||||
explosion(epicenter, 8, 16, 24, 32)
|
||||
if("Custom Bomb")
|
||||
var/devastation_range = tgui_input_number(usr, "Devastation range (in tiles):")
|
||||
var/heavy_impact_range = tgui_input_number(usr, "Heavy impact range (in tiles):")
|
||||
var/light_impact_range = tgui_input_number(usr, "Light impact range (in tiles):")
|
||||
var/flash_range = tgui_input_number(usr, "Flash range (in tiles):")
|
||||
var/devastation_range = tgui_input_number(user, "Devastation range (in tiles):")
|
||||
var/heavy_impact_range = tgui_input_number(user, "Heavy impact range (in tiles):")
|
||||
var/light_impact_range = tgui_input_number(user, "Light impact range (in tiles):")
|
||||
var/flash_range = tgui_input_number(user, "Flash range (in tiles):")
|
||||
explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range)
|
||||
message_admins(span_blue("[ckey] creating an admin explosion at [epicenter.loc]."))
|
||||
message_admins(span_blue("[user.ckey] creating an admin explosion at [epicenter.loc]."))
|
||||
feedback_add_details("admin_verb","DB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
ADMIN_VERB(admin_give_modifier, R_EVENT, "Give Modifier", "Makes a mob weaker or stronger by adding a specific modifier to them.", ADMIN_CATEGORY_DEBUG_GAME, mob/living/living_target)
|
||||
if(!living_target)
|
||||
to_chat(user, span_warning("Looks like you didn't select a mob."))
|
||||
@@ -328,19 +312,17 @@ ADMIN_VERB(admin_give_modifier, R_EVENT, "Give Modifier", "Makes a mob weaker or
|
||||
living_target.add_modifier(new_modifier_type, duration)
|
||||
log_and_message_admins("has given [key_name(living_target)] the modifer [new_modifier_type], with a duration of [duration ? "[duration / 600] minutes" : "forever"].", user)
|
||||
|
||||
/client/proc/make_sound(var/obj/O in world) // -- TLE
|
||||
set category = "Fun.Sounds"
|
||||
set name = "Make Sound"
|
||||
set desc = "Display a message to everyone who can hear the target"
|
||||
if(O)
|
||||
var/message = tgui_input_text(usr, "What do you want the message to be?", "Make Sound", "", MAX_MESSAGE_LEN)
|
||||
if(!message)
|
||||
return
|
||||
O.audible_message(message)
|
||||
log_admin("[key_name(usr)] made [O] at [O.x], [O.y], [O.z]. make a sound")
|
||||
message_admins(span_blue("[key_name_admin(usr)] made [O] at [O.x], [O.y], [O.z]. make a sound."), 1)
|
||||
feedback_add_details("admin_verb","MS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
ADMIN_VERB(make_sound, R_FUN, "Make Sound", "Display a message to everyone who can hear the target.", ADMIN_CATEGORY_FUN_SOUNDS, obj/target_object in world)
|
||||
if(!target_object)
|
||||
return
|
||||
|
||||
var/message = tgui_input_text(user, "What do you want the message to be?", "Make Sound", "", MAX_MESSAGE_LEN)
|
||||
if(!message)
|
||||
return
|
||||
target_object.audible_message(message)
|
||||
log_admin("[key_name(user)] made [target_object] at [target_object.x], [target_object.y], [target_object.z]. make a sound")
|
||||
message_admins(span_blue("[key_name_admin(user)] made [target_object] at [target_object.x], [target_object.y], [target_object.z]. make a sound."))
|
||||
feedback_add_details("admin_verb","MS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/togglebuildmodeself()
|
||||
set name = "Toggle Build Mode Self"
|
||||
@@ -349,15 +331,18 @@ ADMIN_VERB(admin_give_modifier, R_EVENT, "Give Modifier", "Makes a mob weaker or
|
||||
togglebuildmode(src.mob)
|
||||
feedback_add_details("admin_verb","TBMS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/object_talk(var/msg as text) // -- TLE
|
||||
set category = "Fun.Narrate"
|
||||
set name = "oSay"
|
||||
set desc = "Display a message to everyone who can hear the target"
|
||||
if(mob.control_object)
|
||||
|
||||
ADMIN_VERB(object_talk, R_FUN, "oSay", "Display a message to everyone who can hear the target.", ADMIN_CATEGORY_FUN_NARRATE, msg)
|
||||
var/mob/user_mob = user.mob
|
||||
if(!user_mob.control_object)
|
||||
return
|
||||
|
||||
if(!msg)
|
||||
msg = tgui_input_text(user, "oSay", "Object text to say.", "")
|
||||
if(!msg)
|
||||
return
|
||||
for (var/mob/V in hearers(mob.control_object))
|
||||
V.show_message(span_filter_say(span_bold("[mob.control_object.name]") + " says: \"[msg]\""), 2)
|
||||
for(var/mob/V in hearers(user_mob.control_object))
|
||||
V.show_message(span_filter_say(span_bold("[user_mob.control_object.name]") + " says: \"[msg]\""), 2)
|
||||
feedback_add_details("admin_verb","OT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/kill_air() // -- TLE
|
||||
@@ -618,50 +603,43 @@ ADMIN_VERB(debug_statpanel, R_DEBUG, "Debug Stat Panel", "Toggles local debug of
|
||||
SSmotiontracker.hide_all = !SSmotiontracker.hide_all
|
||||
log_admin("[key_name(usr)] changed the motion echo visibility to [SSmotiontracker.hide_all ? "hidden" : "visible"].")
|
||||
|
||||
/client/proc/adminorbit()
|
||||
set category = "Fun.Event Kit"
|
||||
set name = "Orbit Things"
|
||||
set desc = "Makes something orbit around something else."
|
||||
set popup_menu = FALSE
|
||||
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
ADMIN_VERB(adminorbit, R_FUN, "Orbit Things", "Makes something orbit around something else.", ADMIN_CATEGORY_FUN_EVENT_KIT)
|
||||
var/center
|
||||
var/atom/movable/orbiter
|
||||
var/input
|
||||
|
||||
if(check_rights(R_HOLDER) && holder.marked_datum)
|
||||
input = tgui_alert(usr, "You have \n[holder.marked_datum] marked, should this be the center of the orbit, or the orbiter?", "Orbit", list("Center", "Orbiter", "Neither"))
|
||||
var/datum/marked_datum = user.holder.marked_datum
|
||||
if(marked_datum)
|
||||
input = tgui_alert(user, "You have \n[marked_datum] marked, should this be the center of the orbit, or the orbiter?", "Orbit", list("Center", "Orbiter", "Neither"))
|
||||
switch(input)
|
||||
if("Center")
|
||||
center = holder.marked_datum
|
||||
center = marked_datum
|
||||
if("Orbiter")
|
||||
orbiter = holder.marked_datum
|
||||
orbiter = marked_datum
|
||||
var/list/possible_things = list()
|
||||
for(var/T as mob in view(view)) //Let's do mobs before objects
|
||||
for(var/T as mob in view(user.view)) //Let's do mobs before objects
|
||||
if(ismob(T))
|
||||
possible_things |= T
|
||||
for(var/T as obj in view(view))
|
||||
for(var/T as obj in view(user.view))
|
||||
if(isobj(T))
|
||||
possible_things |= T
|
||||
if(!center)
|
||||
center = tgui_input_list(src, "What should act as the center of the orbit?", "Center", possible_things)
|
||||
center = tgui_input_list(user, "What should act as the center of the orbit?", "Center", possible_things)
|
||||
possible_things -= center
|
||||
if(!orbiter)
|
||||
orbiter = tgui_input_list(src, "What should act as the orbiter of the orbit?", "Orbiter", possible_things)
|
||||
orbiter = tgui_input_list(user, "What should act as the orbiter of the orbit?", "Orbiter", possible_things)
|
||||
if(!center || !orbiter)
|
||||
to_chat(usr, span_warning("A center of orbit and an orbiter must be configured. You can also do this by marking a target."))
|
||||
to_chat(user, span_warning("A center of orbit and an orbiter must be configured. You can also do this by marking a target."))
|
||||
return
|
||||
if(center == orbiter)
|
||||
to_chat(usr, span_warning("The center of the orbit cannot also be the orbiter."))
|
||||
to_chat(user, span_warning("The center of the orbit cannot also be the orbiter."))
|
||||
return
|
||||
if(isturf(orbiter))
|
||||
to_chat(usr, span_warning("The orbiter cannot be a turf. It can only be used as a center."))
|
||||
to_chat(user, span_warning("The orbiter cannot be a turf. It can only be used as a center."))
|
||||
return
|
||||
var/distance = tgui_input_number(usr, "How large will their orbit radius be? (In pixels. 32 is 'near around a character)", "Orbit Radius", 32)
|
||||
var/speed = tgui_input_number(usr, "How fast will they orbit (negative numbers spin clockwise)", "Orbit Speed", 20)
|
||||
var/segments = tgui_input_number(usr, "How many segments will they have in their orbit? (3 is a triangle, 36 is a circle, etc)", "Orbit Segments", 36)
|
||||
var/distance = tgui_input_number(user, "How large will their orbit radius be? (In pixels. 32 is 'near around a character)", "Orbit Radius", 32)
|
||||
var/speed = tgui_input_number(user, "How fast will they orbit (negative numbers spin clockwise)", "Orbit Speed", 20)
|
||||
var/segments = tgui_input_number(user, "How many segments will they have in their orbit? (3 is a triangle, 36 is a circle, etc)", "Orbit Segments", 36)
|
||||
var/clock = FALSE
|
||||
if(!distance)
|
||||
distance = 32
|
||||
@@ -672,7 +650,7 @@ ADMIN_VERB(debug_statpanel, R_DEBUG, "Debug Stat Panel", "Toggles local debug of
|
||||
speed *= -1
|
||||
if(!segments)
|
||||
segments = 36
|
||||
if(tgui_alert(usr, "\The [orbiter] will orbit around [center]. Is this okay?", "Confirm Orbit", list("Yes", "No")) == "Yes")
|
||||
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")
|
||||
|
||||
@@ -1,18 +1,11 @@
|
||||
/client/proc/player_effects(var/mob/target in GLOB.mob_list)
|
||||
set name = "Player Effects"
|
||||
set desc = "Modify a player character with various 'special treatments' from a list."
|
||||
set category = "Fun.Event Kit"
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
ADMIN_VERB(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)
|
||||
var/datum/eventkit/player_effects/spawner = new()
|
||||
spawner.target = target
|
||||
spawner.user = src.mob
|
||||
spawner.tgui_interact(src.mob)
|
||||
spawner.tgui_interact(user.mob)
|
||||
|
||||
/datum/eventkit/player_effects
|
||||
var/mob/target //The target of the effects
|
||||
var/mob/user
|
||||
|
||||
/datum/eventkit/player_effects/New()
|
||||
. = ..()
|
||||
@@ -24,6 +17,7 @@
|
||||
ui.open()
|
||||
|
||||
/datum/eventkit/player_effects/Destroy()
|
||||
target = null
|
||||
. = ..()
|
||||
|
||||
/datum/eventkit/player_effects/tgui_static_data(mob/user)
|
||||
@@ -46,7 +40,7 @@
|
||||
if(!check_rights_for(ui.user.client, R_SPAWN))
|
||||
return
|
||||
|
||||
log_and_message_admins("used player effect: [action] on [target.ckey] playing [target.name]", user)
|
||||
log_and_message_admins("used player effect: [action] on [target.ckey] playing [target.name]", ui.user)
|
||||
|
||||
switch(action)
|
||||
|
||||
@@ -63,7 +57,7 @@
|
||||
if(right_leg && right_leg.fracture())
|
||||
broken_legs++
|
||||
if(!broken_legs)
|
||||
to_chat(user,"[target] didn't have any breakable legs, sorry.")
|
||||
to_chat(ui.user,"[target] didn't have any breakable legs, sorry.")
|
||||
|
||||
if("bluespace_artillery")
|
||||
bluespace_artillery(target, ui.user)
|
||||
@@ -225,11 +219,11 @@
|
||||
Tar.fear = 200
|
||||
|
||||
if("spin")
|
||||
var/speed = tgui_input_number(user, "Spin speed (minimum 0.1):", "Speed")
|
||||
var/speed = tgui_input_number(ui.user, "Spin speed (minimum 0.1):", "Speed")
|
||||
if(speed < 0.1)
|
||||
return
|
||||
var/loops = tgui_input_number(user, "Number of loops (-1 for infinite):", "Loops")
|
||||
var/direction_ask = tgui_alert(user, "Clockwise or Anti-Clockwise", "Direction", list("Clockwise", "Anti-Clockwise", "Cancel"))
|
||||
var/loops = tgui_input_number(ui.user, "Number of loops (-1 for infinite):", "Loops")
|
||||
var/direction_ask = tgui_alert(ui.user, "Clockwise or Anti-Clockwise", "Direction", list("Clockwise", "Anti-Clockwise", "Cancel"))
|
||||
var/direction
|
||||
if(direction_ask == "Clockwise")
|
||||
direction = 1
|
||||
@@ -288,7 +282,7 @@
|
||||
return
|
||||
|
||||
var/list/types = typesof(/mob/living)
|
||||
var/chosen_beast = tgui_input_list(user, "Which form would you like to take?", "Choose Beast Form", types)
|
||||
var/chosen_beast = tgui_input_list(ui.user, "Which form would you like to take?", "Choose Beast Form", types)
|
||||
|
||||
if(!chosen_beast)
|
||||
return
|
||||
@@ -306,12 +300,12 @@
|
||||
if(!M.ckey)
|
||||
return
|
||||
|
||||
var/obj/item/spawning = user.client.get_path_from_partial_text()
|
||||
var/obj/item/spawning = ui.user.client.get_path_from_partial_text()
|
||||
|
||||
to_chat(user,span_warning("spawning is: [spawning]"))
|
||||
to_chat(ui.user,span_warning("spawning is: [spawning]"))
|
||||
|
||||
if(!ispath(spawning, /obj/item/))
|
||||
to_chat(user,span_warning("Can only spawn items."))
|
||||
to_chat(ui.user,span_warning("Can only spawn items."))
|
||||
return
|
||||
|
||||
var/obj/item/spawned_obj = new spawning(M.loc)
|
||||
@@ -327,7 +321,7 @@
|
||||
|
||||
if("wet_floors")
|
||||
var/chem
|
||||
var/reagent_choice = tgui_alert(user, "Which reagent do you want to place on the floors around them?", "Reagent", list("Water", "Space Lube", "Other", "Cancel"))
|
||||
var/reagent_choice = tgui_alert(ui.user, "Which reagent do you want to place on the floors around them?", "Reagent", list("Water", "Space Lube", "Other", "Cancel"))
|
||||
if(!reagent_choice || (reagent_choice == "Cancel"))
|
||||
return
|
||||
if(reagent_choice == "Water")
|
||||
@@ -336,7 +330,7 @@
|
||||
chem = REAGENT_ID_LUBE
|
||||
if(reagent_choice == "Other")
|
||||
var/list/chem_list = typesof(/datum/reagent)
|
||||
var/datum/reagent/chemical = tgui_input_list(user, "Which chemical would you like to use?", "Chemicals", chem_list)
|
||||
var/datum/reagent/chemical = tgui_input_list(ui.user, "Which chemical would you like to use?", "Chemicals", chem_list)
|
||||
if(!chemical)
|
||||
return
|
||||
chem = chemical.id
|
||||
@@ -359,7 +353,7 @@
|
||||
var/mob/living/Tar = target
|
||||
if(!istype(Tar))
|
||||
return
|
||||
Tar.scan_mob(user)
|
||||
Tar.scan_mob(ui.user)
|
||||
|
||||
if("appendicitis")
|
||||
var/mob/living/carbon/human/Tar = target
|
||||
@@ -375,14 +369,14 @@
|
||||
organs |= I
|
||||
for(var/obj/item/organ/I in Tar.internal_organs)
|
||||
organs |= I
|
||||
var/obj/item/organ/our_organ = tgui_input_list(user, "Choose an organ to damage:", "Organs", organs)
|
||||
var/obj/item/organ/our_organ = tgui_input_list(ui.user, "Choose an organ to damage:", "Organs", organs)
|
||||
if(!our_organ)
|
||||
return
|
||||
var/effect = tgui_alert(user, "What do you want to do to the Organ", "Effect", list("Damage", "Kill", "Bruise", "Cancel"))
|
||||
var/effect = tgui_alert(ui.user, "What do you want to do to the Organ", "Effect", list("Damage", "Kill", "Bruise", "Cancel"))
|
||||
if(effect == "Cancel")
|
||||
return
|
||||
if(effect == "Damage")
|
||||
var/organ_damage = tgui_input_number(user, "Add how much damage? It is currently at [our_organ.damage].", "Damage")
|
||||
var/organ_damage = tgui_input_number(ui.user, "Add how much damage? It is currently at [our_organ.damage].", "Damage")
|
||||
our_organ.damage = max((our_organ.damage - organ_damage), 0)
|
||||
if(effect == "Kill")
|
||||
our_organ.die()
|
||||
@@ -398,7 +392,7 @@
|
||||
organs |= I
|
||||
for(var/obj/item/organ/I in Tar.internal_organs)
|
||||
organs |= I
|
||||
var/obj/item/organ/our_organ = tgui_input_list(user, "Choose an organ to become assisted:", "Organs", organs)
|
||||
var/obj/item/organ/our_organ = tgui_input_list(ui.user, "Choose an organ to become assisted:", "Organs", organs)
|
||||
if(!our_organ)
|
||||
return
|
||||
our_organ.mechassist()
|
||||
@@ -412,7 +406,7 @@
|
||||
organs |= I
|
||||
for(var/obj/item/organ/I in Tar.internal_organs)
|
||||
organs |= I
|
||||
var/obj/item/organ/our_organ = tgui_input_list(user, "Choose an organ to become robotic:", "Organs", organs)
|
||||
var/obj/item/organ/our_organ = tgui_input_list(ui.user, "Choose an organ to become robotic:", "Organs", organs)
|
||||
if(!our_organ)
|
||||
return
|
||||
our_organ.robotize()
|
||||
@@ -426,14 +420,14 @@
|
||||
organs |= I
|
||||
for(var/obj/item/organ/I in Tar.internal_organs)
|
||||
organs |= I
|
||||
var/obj/item/organ/our_organ = tgui_input_list(user, "Choose an organ to heal:", "Organs", organs)
|
||||
var/obj/item/organ/our_organ = tgui_input_list(ui.user, "Choose an organ to heal:", "Organs", organs)
|
||||
if(!our_organ)
|
||||
return
|
||||
var/effect = tgui_alert(user, "What do you want to do to the Organ", "Effect", list("Heal", "Rejuvenate", "Cancel"))
|
||||
var/effect = tgui_alert(ui.user, "What do you want to do to the Organ", "Effect", list("Heal", "Rejuvenate", "Cancel"))
|
||||
if(effect == "Cancel")
|
||||
return
|
||||
if(effect == "Heal")
|
||||
var/organ_damage = tgui_input_number(user, "Add how much damage? It is currently at [our_organ.damage].", "Damage")
|
||||
var/organ_damage = tgui_input_number(ui.user, "Add how much damage? It is currently at [our_organ.damage].", "Damage")
|
||||
our_organ.damage = max((our_organ.damage - organ_damage), 0)
|
||||
if(effect == "Rejuvenate")
|
||||
our_organ.rejuvenate()
|
||||
@@ -447,7 +441,7 @@
|
||||
organs |= I
|
||||
for(var/obj/item/organ/I in Tar.internal_organs)
|
||||
organs |= I
|
||||
var/obj/item/organ/our_organ = tgui_input_list(user, "Choose an organ to damage:", "Organs", organs)
|
||||
var/obj/item/organ/our_organ = tgui_input_list(ui.user, "Choose an organ to damage:", "Organs", organs)
|
||||
if(!our_organ)
|
||||
return
|
||||
our_organ.removed()
|
||||
@@ -459,7 +453,7 @@
|
||||
var/list/organs = list()
|
||||
for(var/obj/item/organ/external/E in Tar.organs)
|
||||
organs |= E
|
||||
var/obj/item/organ/external/our_organ = tgui_input_list(user, "Choose an bone to break:", "Organs", organs)
|
||||
var/obj/item/organ/external/our_organ = tgui_input_list(ui.user, "Choose an bone to break:", "Organs", organs)
|
||||
if(!our_organ)
|
||||
return
|
||||
our_organ.fracture()
|
||||
@@ -478,18 +472,18 @@
|
||||
if(!istype(Tar))
|
||||
return
|
||||
var/list/chem_list = typesof(/datum/reagent)
|
||||
var/datum/reagent/chemical = tgui_input_list(user, "Which chemical would you like to add?", "Chemicals", chem_list)
|
||||
var/datum/reagent/chemical = tgui_input_list(ui.user, "Which chemical would you like to add?", "Chemicals", chem_list)
|
||||
|
||||
if(!chemical)
|
||||
return
|
||||
|
||||
var/chem = chemical.id
|
||||
|
||||
var/amount = tgui_input_number(user, "How much of the chemical would you like to add?", "Amount", 5)
|
||||
var/amount = tgui_input_number(ui.user, "How much of the chemical would you like to add?", "Amount", 5)
|
||||
if(!amount)
|
||||
return
|
||||
|
||||
var/location = tgui_alert(user, "Where do you want to add the chemical?", "Location", list("Blood", "Stomach", "Skin", "Cancel"))
|
||||
var/location = tgui_alert(ui.user, "Where do you want to add the chemical?", "Location", list("Blood", "Stomach", "Skin", "Cancel"))
|
||||
|
||||
if(!location || location == "Cancel")
|
||||
return
|
||||
@@ -512,13 +506,13 @@
|
||||
var/mob/living/carbon/human/Tar = target
|
||||
if(!istype(Tar))
|
||||
return
|
||||
Tar.custom_medical_issue(user)
|
||||
Tar.custom_medical_issue(ui.user)
|
||||
|
||||
if("clear_issue")
|
||||
var/mob/living/carbon/human/Tar = target
|
||||
if(!istype(Tar))
|
||||
return
|
||||
Tar.clear_medical_issue(user)
|
||||
Tar.clear_medical_issue(ui.user)
|
||||
|
||||
////////ABILITIES//////////////
|
||||
|
||||
@@ -533,7 +527,7 @@
|
||||
if(!istype(Tar))
|
||||
return
|
||||
var/current_darksight = Tar.species.darksight
|
||||
var/change_sight = tgui_input_number(user, "What level do you wish to set their darksight to? It is currently [current_darksight].", "Darksight")
|
||||
var/change_sight = tgui_input_number(ui.user, "What level do you wish to set their darksight to? It is currently [current_darksight].", "Darksight")
|
||||
if(change_sight)
|
||||
Tar.species.darksight = change_sight
|
||||
|
||||
@@ -566,9 +560,9 @@
|
||||
var/mob/living/carbon/human/Tar = target
|
||||
if(!istype(Tar))
|
||||
return
|
||||
var/energy_max = tgui_input_number(user, "What should their max lleill energy be set to? It is currently [Tar.species.lleill_energy_max].", "Max energy")
|
||||
var/energy_max = tgui_input_number(ui.user, "What should their max lleill energy be set to? It is currently [Tar.species.lleill_energy_max].", "Max energy")
|
||||
Tar.species.lleill_energy_max = energy_max
|
||||
var/energy_new = tgui_input_number(user, "What should their current lleill energy be set to? It is currently [Tar.species.lleill_energy].", "Max energy")
|
||||
var/energy_new = tgui_input_number(ui.user, "What should their current lleill energy be set to? It is currently [Tar.species.lleill_energy].", "Max energy")
|
||||
Tar.species.lleill_energy = energy_new
|
||||
|
||||
if("lleill_invisibility")
|
||||
@@ -657,7 +651,7 @@
|
||||
var/mob/living/carbon/human/Tar = target
|
||||
if(!istype(Tar))
|
||||
return
|
||||
var/confirm = tgui_alert(user, "Make [Tar] drop everything?", "Message", list("Yes", "No"))
|
||||
var/confirm = tgui_alert(ui.user, "Make [Tar] drop everything?", "Message", list("Yes", "No"))
|
||||
if(confirm != "Yes")
|
||||
return
|
||||
|
||||
@@ -672,7 +666,7 @@
|
||||
return
|
||||
|
||||
var/list/items = Tar.get_equipped_items()
|
||||
var/item_to_drop = tgui_input_list(user, "Choose item to force drop:", "Drop Specific Item", items)
|
||||
var/item_to_drop = tgui_input_list(ui.user, "Choose item to force drop:", "Drop Specific Item", items)
|
||||
if(item_to_drop)
|
||||
Tar.drop_from_inventory(item_to_drop)
|
||||
|
||||
@@ -693,9 +687,9 @@
|
||||
var/mob/living/carbon/human/Tar = target
|
||||
if(!istype(Tar))
|
||||
return
|
||||
if(!check_rights_for(user.client, R_HOLDER))
|
||||
if(!check_rights_for(ui.user.client, R_HOLDER))
|
||||
return
|
||||
var/obj/item/X = user.client.holder.marked_datum
|
||||
var/obj/item/X = ui.user.client.holder.marked_datum
|
||||
if(!istype(X))
|
||||
return
|
||||
Tar.put_in_hands(X)
|
||||
@@ -704,9 +698,9 @@
|
||||
var/mob/living/carbon/human/Tar = target
|
||||
if(!istype(Tar))
|
||||
return
|
||||
if(!check_rights_for(user.client, R_HOLDER))
|
||||
if(!check_rights_for(ui.user.client, R_HOLDER))
|
||||
return
|
||||
var/obj/item/X = user.client.holder.marked_datum
|
||||
var/obj/item/X = ui.user.client.holder.marked_datum
|
||||
if(!istype(X))
|
||||
return
|
||||
if(Tar.equip_to_appropriate_slot(X))
|
||||
@@ -722,10 +716,10 @@
|
||||
return
|
||||
var/input_NIF
|
||||
if(!Tar.get_organ(BP_HEAD))
|
||||
to_chat(user,span_warning("Target is unsuitable."))
|
||||
to_chat(ui.user,span_warning("Target is unsuitable."))
|
||||
return
|
||||
if(Tar.nif)
|
||||
to_chat(user,span_warning("Target already has a NIF."))
|
||||
to_chat(ui.user,span_warning("Target already has a NIF."))
|
||||
return
|
||||
if(Tar.species.flags & NO_DNA)
|
||||
var/obj/item/nif/S = /obj/item/nif/bioadap
|
||||
@@ -741,43 +735,43 @@
|
||||
|
||||
var/list/show_NIFs = sortList(NIFs) // the list that will be shown to the user to pick from
|
||||
|
||||
input_NIF = tgui_input_list(user, "Pick the NIF type","Quick NIF", show_NIFs)
|
||||
input_NIF = tgui_input_list(ui.user, "Pick the NIF type","Quick NIF", show_NIFs)
|
||||
var/chosen_NIF = NIFs[capitalize(input_NIF)]
|
||||
|
||||
if(chosen_NIF)
|
||||
new chosen_NIF(Tar)
|
||||
else
|
||||
new /obj/item/nif(Tar)
|
||||
log_and_message_admins("Quick NIF'd [Tar.real_name] with a [input_NIF].", user)
|
||||
log_and_message_admins("Quick NIF'd [Tar.real_name] with a [input_NIF].", ui.user)
|
||||
|
||||
if("resize")
|
||||
SSadmin_verbs.dynamic_invoke_verb(user.client, /datum/admin_verb/resize, target)
|
||||
SSadmin_verbs.dynamic_invoke_verb(ui.user.client, /datum/admin_verb/resize, target)
|
||||
|
||||
if("teleport")
|
||||
var/where = tgui_alert(user, "Where to teleport?", "Where?", list("To Me", "To Mob", "To Area", "Cancel"))
|
||||
var/where = tgui_alert(ui.user, "Where to teleport?", "Where?", list("To Me", "To Mob", "To Area", "Cancel"))
|
||||
if(where == "Cancel")
|
||||
return
|
||||
if(where == "To Me")
|
||||
user.client.Getmob(target)
|
||||
ui.user.client.Getmob(target)
|
||||
if(where == "To Mob")
|
||||
var/mob/selection = tgui_input_list(ui.user, "Select a mob to jump [target] to:", "Jump to mob", GLOB.mob_list)
|
||||
target.on_mob_jump()
|
||||
target.forceMove(get_turf(selection))
|
||||
log_admin("[key_name(user)] jumped [target] to [selection]")
|
||||
log_admin("[key_name(ui.user)] jumped [target] to [selection]")
|
||||
if(where == "To Area")
|
||||
var/area/A
|
||||
A = tgui_input_list(user, "Pick an area to teleport [target] to:", "Jump to Area", return_sorted_areas())
|
||||
A = tgui_input_list(ui.user, "Pick an area to teleport [target] to:", "Jump to Area", return_sorted_areas())
|
||||
target.on_mob_jump()
|
||||
target.forceMove(pick(get_area_turfs(A)))
|
||||
log_admin("[key_name(user)] jumped [target] to [A]")
|
||||
log_admin("[key_name(ui.user)] jumped [target] to [A]")
|
||||
|
||||
if("gib")
|
||||
var/death = tgui_alert(user, "Are you sure you want to destroy [target]?", "Gib?", list("KILL", "Cancel"))
|
||||
var/death = tgui_alert(ui.user, "Are you sure you want to destroy [target]?", "Gib?", list("KILL", "Cancel"))
|
||||
if(death == "KILL")
|
||||
target.gib()
|
||||
|
||||
if("dust")
|
||||
var/death = tgui_alert(user, "Are you sure you want to destroy [target]?", "Dust?", list("KILL", "Cancel"))
|
||||
var/death = tgui_alert(ui.user, "Are you sure you want to destroy [target]?", "Dust?", list("KILL", "Cancel"))
|
||||
if(death == "KILL")
|
||||
target.dust()
|
||||
|
||||
@@ -785,24 +779,24 @@
|
||||
var/mob/living/Tar = target
|
||||
if(!istype(Tar))
|
||||
return
|
||||
user.client.holder.paralyze_mob(Tar)
|
||||
ui.user.client.holder.paralyze_mob(Tar)
|
||||
|
||||
if("subtle_message")
|
||||
user.client.cmd_admin_subtle_message(target)
|
||||
ui.user.client.cmd_admin_subtle_message(target)
|
||||
|
||||
if("direct_narrate")
|
||||
user.client.cmd_admin_direct_narrate(target)
|
||||
ui.user.client.cmd_admin_direct_narrate(target)
|
||||
|
||||
if("player_panel")
|
||||
SSadmin_verbs.dynamic_invoke_verb(user, /datum/admin_verb/show_player_panel, target)
|
||||
SSadmin_verbs.dynamic_invoke_verb(ui.user, /datum/admin_verb/show_player_panel, target)
|
||||
|
||||
if("view_variables")
|
||||
user.client.debug_variables(target)
|
||||
ui.user.client.debug_variables(target)
|
||||
|
||||
if("orbit")
|
||||
if(!user.client.holder.marked_datum)
|
||||
if(!ui.user.client.holder.marked_datum)
|
||||
return
|
||||
var/atom/movable/X = user.client.holder.marked_datum
|
||||
var/atom/movable/X = ui.user.client.holder.marked_datum
|
||||
X.orbit(target)
|
||||
|
||||
if("ai")
|
||||
@@ -834,11 +828,11 @@
|
||||
if("give_quest")
|
||||
if(!target)
|
||||
return
|
||||
var/admin_quest = tgui_alert(user, "Do you want to give a random quest or a personalised one?", "Quest!", list("Random", "Personalised", "Cancel"))
|
||||
var/admin_quest = tgui_alert(ui.user, "Do you want to give a random quest or a personalised one?", "Quest!", list("Random", "Personalised", "Cancel"))
|
||||
if(!admin_quest || (admin_quest == "Cancel"))
|
||||
return
|
||||
if(admin_quest == "Personalised")
|
||||
var/specific_quest = tgui_input_text(user, "What is their quest?", "Quest!!!")
|
||||
var/specific_quest = tgui_input_text(ui.user, "What is their quest?", "Quest!!!")
|
||||
if(!specific_quest)
|
||||
return
|
||||
target.quest_from_above(specific_quest)
|
||||
@@ -855,14 +849,14 @@
|
||||
Tar.rejuvenate()
|
||||
|
||||
if("popup-box")
|
||||
var/message = tgui_input_text(user, "Write a message to send to the user with a space for them to reply without using the text box:", "Message")
|
||||
var/message = tgui_input_text(ui.user, "Write a message to send to the user with a space for them to reply without using the text box:", "Message")
|
||||
if(!message)
|
||||
return
|
||||
log_admin("[key_name(user)] sent message to [target]: [message]")
|
||||
log_admin("[key_name(ui.user)] sent message to [target]: [message]")
|
||||
var/reply = tgui_input_text(target, "An admin has sent you a message: [message]", "Reply")
|
||||
if(!reply)
|
||||
return
|
||||
log_and_message_admins("replied to [user]'s message: [reply].", target)
|
||||
log_and_message_admins("replied to [ui.user]'s message: [reply].", target)
|
||||
|
||||
if("stop-orbits")
|
||||
if(target.orbiters)
|
||||
|
||||
@@ -1188,8 +1188,8 @@
|
||||
var/mob/M = locate(href_list["adminplayerobservejump"])
|
||||
|
||||
var/client/C = usr.client
|
||||
if(!isobserver(usr)) C.admin_ghost()
|
||||
sleep(2)
|
||||
if(!isobserver(usr))
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/admin_ghost)
|
||||
C.do_jumptomob(M)
|
||||
|
||||
else if(href_list["adminplayerobservefollow"])
|
||||
@@ -1199,9 +1199,9 @@
|
||||
var/mob/M = locate(href_list["adminplayerobservefollow"])
|
||||
|
||||
var/client/C = usr.client
|
||||
if(!isobserver(usr)) C.admin_ghost()
|
||||
if(!isobserver(usr))
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/admin_ghost)
|
||||
var/mob/observer/dead/G = C.mob
|
||||
sleep(2)
|
||||
G.ManualFollow(M)
|
||||
|
||||
else if(href_list["check_antagonist"])
|
||||
@@ -1234,8 +1234,8 @@
|
||||
var/z = text2num(href_list["Z"])
|
||||
|
||||
var/client/C = usr.client
|
||||
if(!isobserver(usr)) C.admin_ghost()
|
||||
sleep(2)
|
||||
if(!isobserver(usr))
|
||||
SSadmin_verbs.dynamic_invoke_verb(usr.client, /datum/admin_verb/admin_ghost)
|
||||
C.jumptocoord(x,y,z)
|
||||
|
||||
else if(href_list["viewruntime"])
|
||||
|
||||
@@ -36,21 +36,16 @@
|
||||
message_admins("[key_name_admin(src)] jumped to [target_area]")
|
||||
feedback_add_details("admin_verb","JA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/jumptoturf(var/turf/T in world)
|
||||
set name = "Jump to Turf"
|
||||
set category = "Admin.Game"
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
|
||||
return
|
||||
ADMIN_VERB(jumptoturf, R_ADMIN|R_MOD|R_DEBUG|R_EVENT, "Jump to Turf", "Jump to a specific turf in the game.", ADMIN_CATEGORY_GAME, turf/T in world)
|
||||
if(CONFIG_GET(flag/allow_admin_jump))
|
||||
log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
|
||||
message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
|
||||
usr.on_mob_jump()
|
||||
usr.reset_perspective(usr)
|
||||
usr.forceMove(T)
|
||||
log_admin("[key_name(user)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
|
||||
message_admins("[key_name_admin(user)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
|
||||
user.mob.on_mob_jump()
|
||||
user.mob.reset_perspective(user)
|
||||
user.mob.forceMove(T)
|
||||
feedback_add_details("admin_verb","JT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
else
|
||||
tgui_alert_async(usr, "Admin jumping disabled")
|
||||
return
|
||||
return
|
||||
tgui_alert_async(user, "Admin jumping disabled")
|
||||
|
||||
/// Verb wrapper around do_jumptomob()
|
||||
/client/proc/jumptomob(mob as null|anything in GLOB.mob_list)
|
||||
|
||||
@@ -34,64 +34,59 @@
|
||||
H.change_appearance(APPEARANCE_ALL, H, 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!
|
||||
|
||||
/client/proc/editappear()
|
||||
set name = "Edit Appearance"
|
||||
set category = "Fun.Event Kit"
|
||||
ADMIN_VERB(editappear, R_FUN, "Edit Appearance", "Edit a human's apperance.", ADMIN_CATEGORY_FUN_EVENT_KIT)
|
||||
var/mob/living/carbon/human/target_human = tgui_input_list(user, "Select mob.", "Edit Appearance", GLOB.human_mob_list)
|
||||
|
||||
if(!check_rights(R_FUN)) return
|
||||
|
||||
var/mob/living/carbon/human/M = tgui_input_list(usr, "Select mob.", "Edit Appearance", GLOB.human_mob_list)
|
||||
|
||||
if(!ishuman(M))
|
||||
to_chat(usr, span_warning("You can only do this to humans!"))
|
||||
if(!ishuman(target_human))
|
||||
to_chat(user, span_warning("You can only do this to humans!"))
|
||||
return
|
||||
if(tgui_alert(usr, "Are you sure you wish to edit this mob's appearance? Skrell, Unathi, Tajaran can result in unintended consequences.","Danger!",list("Yes","No")) != "Yes")
|
||||
if(tgui_alert(user, "Are you sure you wish to edit this mob's appearance? Skrell, Unathi, Tajaran can result in unintended consequences.","Danger!",list("Yes","No")) != "Yes")
|
||||
return
|
||||
var/new_facial = tgui_color_picker(usr, "Please select facial hair color.", "Character Generation")
|
||||
var/new_facial = tgui_color_picker(user, "Please select facial hair color.", "Character Generation")
|
||||
if(new_facial)
|
||||
M.r_facial = hex2num(copytext(new_facial, 2, 4))
|
||||
M.g_facial = hex2num(copytext(new_facial, 4, 6))
|
||||
M.b_facial = hex2num(copytext(new_facial, 6, 8))
|
||||
target_human.r_facial = hex2num(copytext(new_facial, 2, 4))
|
||||
target_human.g_facial = hex2num(copytext(new_facial, 4, 6))
|
||||
target_human.b_facial = hex2num(copytext(new_facial, 6, 8))
|
||||
|
||||
var/new_hair = tgui_color_picker(usr, "Please select hair color.", "Character Generation")
|
||||
var/new_hair = tgui_color_picker(user, "Please select hair color.", "Character Generation")
|
||||
if(new_facial)
|
||||
M.r_hair = hex2num(copytext(new_hair, 2, 4))
|
||||
M.g_hair = hex2num(copytext(new_hair, 4, 6))
|
||||
M.b_hair = hex2num(copytext(new_hair, 6, 8))
|
||||
target_human.r_hair = hex2num(copytext(new_hair, 2, 4))
|
||||
target_human.g_hair = hex2num(copytext(new_hair, 4, 6))
|
||||
target_human.b_hair = hex2num(copytext(new_hair, 6, 8))
|
||||
|
||||
var/new_eyes = tgui_color_picker(usr, "Please select eye color.", "Character Generation")
|
||||
var/new_eyes = tgui_color_picker(user, "Please select eye color.", "Character Generation")
|
||||
if(new_eyes)
|
||||
M.r_eyes = hex2num(copytext(new_eyes, 2, 4))
|
||||
M.g_eyes = hex2num(copytext(new_eyes, 4, 6))
|
||||
M.b_eyes = hex2num(copytext(new_eyes, 6, 8))
|
||||
M.update_eyes()
|
||||
target_human.r_eyes = hex2num(copytext(new_eyes, 2, 4))
|
||||
target_human.g_eyes = hex2num(copytext(new_eyes, 4, 6))
|
||||
target_human.b_eyes = hex2num(copytext(new_eyes, 6, 8))
|
||||
target_human.update_eyes()
|
||||
|
||||
var/new_skin = tgui_color_picker(usr, "Please select body color. This is for Tajaran, Unathi, and Skrell only!", "Character Generation")
|
||||
var/new_skin = tgui_color_picker(user, "Please select body color. This is for Tajaran, Unathi, and Skrell only!", "Character Generation")
|
||||
if(new_skin)
|
||||
M.r_skin = hex2num(copytext(new_skin, 2, 4))
|
||||
M.g_skin = hex2num(copytext(new_skin, 4, 6))
|
||||
M.b_skin = hex2num(copytext(new_skin, 6, 8))
|
||||
target_human.r_skin = hex2num(copytext(new_skin, 2, 4))
|
||||
target_human.g_skin = hex2num(copytext(new_skin, 4, 6))
|
||||
target_human.b_skin = hex2num(copytext(new_skin, 6, 8))
|
||||
|
||||
var/new_tone = tgui_input_number(usr, "Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation", null, 220, 1)
|
||||
var/new_tone = tgui_input_number(user, "Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation", null, 220, 1)
|
||||
|
||||
if (new_tone)
|
||||
M.s_tone = max(min(round(text2num(new_tone)), 220), 1)
|
||||
M.s_tone = -M.s_tone + 35
|
||||
target_human.s_tone = max(min(round(text2num(new_tone)), 220), 1)
|
||||
target_human.s_tone = -target_human.s_tone + 35
|
||||
|
||||
// hair
|
||||
var/new_hstyle = tgui_input_list(usr, "Select a hair style", "Grooming", GLOB.hair_styles_list)
|
||||
var/new_hstyle = tgui_input_list(user, "Select a hair style", "Grooming", GLOB.hair_styles_list)
|
||||
if(new_hstyle)
|
||||
M.h_style = new_hstyle
|
||||
target_human.h_style = new_hstyle
|
||||
|
||||
// facial hair
|
||||
var/new_fstyle = tgui_input_list(usr, "Select a facial hair style", "Grooming", GLOB.facial_hair_styles_list)
|
||||
var/new_fstyle = tgui_input_list(user, "Select a facial hair style", "Grooming", GLOB.facial_hair_styles_list)
|
||||
if(new_fstyle)
|
||||
M.f_style = new_fstyle
|
||||
target_human.f_style = new_fstyle
|
||||
|
||||
var/new_gender = tgui_alert(usr, "Please select gender.", "Character Generation", list("Male", "Female", "Neuter"))
|
||||
var/new_gender = tgui_alert(user, "Please select gender.", "Character Generation", list("Male", "Female", "Neuter"))
|
||||
if (new_gender)
|
||||
M.set_gender(new_gender)
|
||||
target_human.set_gender(new_gender)
|
||||
|
||||
M.update_dna(M)
|
||||
M.update_hair(FALSE)
|
||||
M.update_icons_body()
|
||||
target_human.update_dna(target_human)
|
||||
target_human.update_hair(FALSE)
|
||||
target_human.update_icons_body()
|
||||
|
||||
@@ -421,28 +421,25 @@ ADMIN_VERB(cmd_assume_direct_control, (R_DEBUG|R_ADMIN|R_EVENT), "Assume Direct
|
||||
for(var/areatype in areas_without_camera)
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
/datum/admins/proc/cmd_admin_dress(input in getmobs())
|
||||
set category = "Fun.Event Kit"
|
||||
set name = "Select equipment"
|
||||
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
ADMIN_VERB(cmd_admin_dress, R_FUN, "elect equipment", "Select equipment for a mob.", ADMIN_CATEGORY_FUN_EVENT_KIT, input)
|
||||
if(!input)
|
||||
input = tgui_input_list(user, "Pick Target", "Select the target to dress.", getmobs())
|
||||
if(!input)
|
||||
return
|
||||
|
||||
var/target = getmobs()[input]
|
||||
if(!target)
|
||||
return
|
||||
|
||||
if(!ishuman(target))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = target
|
||||
var/mob/living/carbon/human/target_human = target
|
||||
|
||||
var/datum/decl/hierarchy/outfit/outfit = tgui_input_list(usr, "Select outfit.", "Select equipment.", outfits())
|
||||
var/datum/decl/hierarchy/outfit/outfit = tgui_input_list(user, "Select outfit.", "Select equipment.", outfits())
|
||||
if(!outfit)
|
||||
return
|
||||
|
||||
feedback_add_details("admin_verb","SEQ")
|
||||
dressup_human(H, outfit, 1)
|
||||
dressup_human(target_human, outfit, 1)
|
||||
|
||||
/proc/dressup_human(var/mob/living/carbon/human/H, var/datum/decl/hierarchy/outfit/outfit)
|
||||
if(!H || !outfit)
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
/client/proc/roll_dices()
|
||||
set category = "Fun.Event Kit"
|
||||
set name = "Roll Dice"
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
var/sum = tgui_input_number(usr, "How many times should we throw?")
|
||||
var/side = tgui_input_number(usr, "Select the number of sides.")
|
||||
ADMIN_VERB(roll_dices, R_FUN, "Roll Dice", "Allows to roll a dice.", ADMIN_CATEGORY_FUN_EVENT_KIT)
|
||||
var/sum = tgui_input_number(user, "How many times should we throw?")
|
||||
var/side = tgui_input_number(user, "Select the number of sides.")
|
||||
if(!side)
|
||||
side = 6
|
||||
if(!sum)
|
||||
@@ -13,12 +9,12 @@
|
||||
|
||||
var/dice = num2text(sum) + "d" + num2text(side)
|
||||
|
||||
if(tgui_alert(usr, "Do you want to inform the world about your game?","Show world?",list("Yes", "No")) == "Yes")
|
||||
if(tgui_alert(user, "Do you want to inform the world about your game?","Show world?",list("Yes", "No")) == "Yes")
|
||||
to_chat(world, "<h2 style=\"color:#A50400\">The dice have been rolled by Gods!</h2>")
|
||||
|
||||
var/result = roll(dice)
|
||||
|
||||
if(tgui_alert(usr, "Do you want to inform the world about the result?","Show world?",list("Yes", "No")) == "Yes")
|
||||
if(tgui_alert(user, "Do you want to inform the world about the result?","Show world?",list("Yes", "No")) == "Yes")
|
||||
to_chat(world, "<h2 style=\"color:#A50400\">Gods rolled [dice], result is [result]</h2>")
|
||||
|
||||
message_admins("[key_name_admin(src)] rolled dice [dice], result is [result]", 1)
|
||||
message_admins("[key_name_admin(user)] rolled dice [dice], result is [result]", 1)
|
||||
|
||||
@@ -1,16 +1,8 @@
|
||||
/*
|
||||
Eventkit verb to be used to spawn the obj/effect/landmarks defined under code\game\objects\effects\landmarks_events.dm
|
||||
*/
|
||||
/client/proc/manage_event_triggers()
|
||||
set name = "Manage Event Triggers"
|
||||
set desc = "Open dialogue to create or delete narration/notification triggers"
|
||||
set category = "Fun.Event Kit"
|
||||
|
||||
if(!check_rights(R_FUN)) return
|
||||
|
||||
|
||||
|
||||
var/mode = tgui_input_list(src, "What do you wish to do?", "Manage Event Triggers", \
|
||||
ADMIN_VERB(manage_event_triggers, R_FUN, "Manage Event Triggers", "Open dialogue to create or delete narration/notification triggers", ADMIN_CATEGORY_FUN_EVENT_KIT)
|
||||
var/mode = tgui_input_list(user, "What do you wish to do?", "Manage Event Triggers", \
|
||||
list(
|
||||
"Create Notification Trigger",
|
||||
"Create Narration Trigger",
|
||||
@@ -24,26 +16,26 @@ Eventkit verb to be used to spawn the obj/effect/landmarks defined under code\ga
|
||||
switch(mode)
|
||||
|
||||
if("Create Notification Trigger")
|
||||
var/obj/effect/landmark/event_trigger/ET = new /obj/effect/landmark/event_trigger(usr.loc)
|
||||
ET.set_vars(src)
|
||||
var/obj/effect/landmark/event_trigger/ET = new /obj/effect/landmark/event_trigger(user.mob.loc)
|
||||
ET.set_vars(user)
|
||||
|
||||
if("Create Narration Trigger")
|
||||
|
||||
var/obj/effect/landmark/event_trigger/auto_narrate/AN = new /obj/effect/landmark/event_trigger/auto_narrate(usr.loc)
|
||||
AN.set_vars(src)
|
||||
var/obj/effect/landmark/event_trigger/auto_narrate/AN = new /obj/effect/landmark/event_trigger/auto_narrate(user.mob.loc)
|
||||
AN.set_vars(user)
|
||||
|
||||
if("Manage Personal Triggers")
|
||||
var/personal_list = GLOB.event_triggers[src.ckey]
|
||||
var/personal_list = GLOB.event_triggers[user.ckey]
|
||||
if(!LAZYLEN(personal_list))
|
||||
to_chat(src, span_notice("You don't have any landmarks to manage!"))
|
||||
to_chat(user, span_notice("You don't have any landmarks to manage!"))
|
||||
return
|
||||
personal_list |= list("Cancel", "Delete All")
|
||||
var/choice = tgui_input_list(src, "Select a landmark to choose between teleporting to it or deleting it, select delete all to clear them.", \
|
||||
var/choice = tgui_input_list(user, "Select a landmark to choose between teleporting to it or deleting it, select delete all to clear them.", \
|
||||
"Manage Personal Triggers", personal_list)
|
||||
if(!choice || choice == "Cancel")
|
||||
return
|
||||
if(choice == "Delete All")
|
||||
var/confirm = tgui_alert(src, "ARE YOU SURE? THERE IS NO GOING BACK", "CONFIRM", list("Go Back", "Delete all my event triggers"), autofocus = FALSE)
|
||||
var/confirm = tgui_alert(user, "ARE YOU SURE? THERE IS NO GOING BACK", "CONFIRM", list("Go Back", "Delete all my event triggers"), autofocus = FALSE)
|
||||
if(!confirm || confirm == "Go Back")
|
||||
return
|
||||
for(var/obj/effect/landmark/event_trigger/ET in personal_list)
|
||||
@@ -51,78 +43,78 @@ Eventkit verb to be used to spawn the obj/effect/landmarks defined under code\ga
|
||||
qdel(ET)
|
||||
else if(istype(choice, /obj/effect/landmark/event_trigger))
|
||||
var/obj/effect/landmark/event_trigger/ET = choice
|
||||
var/decision = tgui_alert(src, "Teleport to Landmark or Delete it?", "Manage [ET.name]", list("Teleport", "Delete"), autofocus = FALSE)
|
||||
var/decision = tgui_alert(user, "Teleport to Landmark or Delete it?", "Manage [ET.name]", list("Teleport", "Delete"), autofocus = FALSE)
|
||||
if(decision == "Teleport")
|
||||
var/mob/M = usr
|
||||
if(isobserver(M))
|
||||
var/confirm_teleport = tgui_alert(src, "You're not a ghost! Admin-ghost?", "You're not a ghost", \
|
||||
var/mob/user_mob = user.mob
|
||||
if(isobserver(user_mob))
|
||||
var/confirm_teleport = tgui_alert(user, "You're not a ghost! Admin-ghost?", "You're not a ghost", \
|
||||
list("Cancel", "Teleport me with my character"))
|
||||
if(confirm_teleport == "Cancel")
|
||||
return
|
||||
M.forceMove(get_turf(ET))
|
||||
user_mob.forceMove(get_turf(ET))
|
||||
if(decision == "Delete")
|
||||
var/confirm = tgui_alert(src, "ARE YOU SURE? THERE IS NO GOING BACK FROM DELETING [ET.name]", "CONFIRM", list("Go Back", "Delete it!"), autofocus = FALSE)
|
||||
var/confirm = tgui_alert(user, "ARE YOU SURE? THERE IS NO GOING BACK FROM DELETING [ET.name]", "CONFIRM", list("Go Back", "Delete it!"), autofocus = FALSE)
|
||||
if(!confirm || confirm == "Go Back")
|
||||
return
|
||||
ET.delete_me = TRUE
|
||||
qdel(ET)
|
||||
if("Manage Other's Triggers")
|
||||
var/other_ckey = tgui_input_text(src, "input trigger owner's ckey", "CKEY", "", MAX_MESSAGE_LEN)
|
||||
var/other_ckey = tgui_input_text(user, "input trigger owner's ckey", "CKEY", "", MAX_MESSAGE_LEN)
|
||||
var/others_list = GLOB.event_triggers[other_ckey]
|
||||
if(!LAZYLEN(others_list))
|
||||
to_chat(src, span_notice("[other_ckey] doesn't have any landmarks to manage!"))
|
||||
to_chat(user, span_notice("[other_ckey] doesn't have any landmarks to manage!"))
|
||||
return
|
||||
others_list |= list("Cancel", "Delete All")
|
||||
var/choice = tgui_input_list(src, "Select a landmark to choose between teleporting to it or deleting it, select delete all to clear them.", \
|
||||
var/choice = tgui_input_list(user, "Select a landmark to choose between teleporting to it or deleting it, select delete all to clear them.", \
|
||||
"Manage Personal Triggers", others_list)
|
||||
if(!choice || choice == "Cancel")
|
||||
return
|
||||
if(choice == "Delete All")
|
||||
if(other_ckey && GLOB.directory[other_ckey])
|
||||
var/client/C = GLOB.directory[other_ckey]
|
||||
var/mob/M = C.statobj
|
||||
if(M.client && M.client.inactivity < 30 MINUTES)
|
||||
if(tgui_alert(src, "[M] has only been inactive for [M.client.inactivity / (1 MINUTE)] minutes.\n \
|
||||
var/mob/stat_mob = C.statobj
|
||||
if(stat_mob.client?.inactivity < 30 MINUTES)
|
||||
if(tgui_alert(user, "[stat_mob] has only been inactive for [stat_mob.client.inactivity / (1 MINUTE)] minutes.\n \
|
||||
If you want to delete their event triggers, ask them in asay or discord to do it themselves or wait 30 minutes. \n \
|
||||
Only proceed if you are absolutely certain.", "Force Delete", list("Confirm", "Cancel")) == "Confirm")
|
||||
for(var/obj/effect/landmark/event_trigger/ET in others_list)
|
||||
ET.delete_me = TRUE
|
||||
qdel(ET)
|
||||
log_and_message_admins("[src.ckey] deleted all of [other_ckey]'s event triggers while [other_ckey] was active", src)
|
||||
log_and_message_admins("[user.ckey] deleted all of [other_ckey]'s event triggers while [other_ckey] was active", user)
|
||||
return
|
||||
var/confirm = tgui_alert(src, "ARE YOU SURE? THERE IS NO GOING BACK", "CONFIRM", list("Go Back", "Delete all my event triggers"), autofocus = FALSE)
|
||||
var/confirm = tgui_alert(user, "ARE YOU SURE? THERE IS NO GOING BACK", "CONFIRM", list("Go Back", "Delete all my event triggers"), autofocus = FALSE)
|
||||
if(!confirm || confirm == "Go Back")
|
||||
return
|
||||
for(var/obj/effect/landmark/event_trigger/ET in others_list)
|
||||
ET.delete_me = TRUE
|
||||
qdel(ET)
|
||||
log_and_message_admins("[src.ckey] deleted all of [other_ckey]'s event triggers. [other_ckey] was either inactive or disconnected at this time.", src)
|
||||
log_and_message_admins("[user.ckey] deleted all of [other_ckey]'s event triggers. [other_ckey] was either inactive or disconnected at this time.", user)
|
||||
else if(istype(choice, /obj/effect/landmark/event_trigger))
|
||||
var/obj/effect/landmark/event_trigger/ET = choice
|
||||
var/decision = tgui_alert(src, "Teleport to Landmark or Delete it?", "Manage [ET]", list("Teleport", "Delete"), autofocus = FALSE)
|
||||
var/decision = tgui_alert(user, "Teleport to Landmark or Delete it?", "Manage [ET]", list("Teleport", "Delete"), autofocus = FALSE)
|
||||
if(decision == "Teleport")
|
||||
var/mob/M = usr
|
||||
if(isobserver(M))
|
||||
var/confirm_teleport = tgui_alert(src, "You're not a ghost! Admin-ghost?", "You're not a ghost", \
|
||||
var/mob/user_mob = user.mob
|
||||
if(isobserver(user_mob))
|
||||
var/confirm_teleport = tgui_alert(user, "You're not a ghost! Admin-ghost?", "You're not a ghost", \
|
||||
list("Cancel", "Teleport me with my character"))
|
||||
if(!confirm_teleport || confirm_teleport == "Cancel")
|
||||
return
|
||||
M.forceMove(get_turf(ET))
|
||||
user_mob.forceMove(get_turf(ET))
|
||||
if(decision == "Delete")
|
||||
if(other_ckey && GLOB.directory[other_ckey])
|
||||
var/client/C = GLOB.directory[other_ckey]
|
||||
var/mob/M = C.statobj
|
||||
if(M.client && M.client.inactivity < 30 MINUTES)
|
||||
if(tgui_alert(src, "[M] has only been inactive for [M.client.inactivity / (1 MINUTE)] minutes.\n \
|
||||
var/mob/stat_mob = C.statobj
|
||||
if(stat_mob?.client.inactivity < 30 MINUTES)
|
||||
if(tgui_alert(user, "[stat_mob] has only been inactive for [stat_mob.client.inactivity / (1 MINUTE)] minutes.\n \
|
||||
If you want to delete their event triggers, ask them in asay or discord to do it themselves or wait 30 minutes. \n \
|
||||
Only proceed if you are absolutely certain.", "Force Delete", list("Confirm", "Cancel")) == "Confirm")
|
||||
ET.delete_me = TRUE
|
||||
qdel(ET)
|
||||
log_and_message_admins("[src.ckey] tried to delete event trigger [ET.name] while [other_ckey] is active.", src)
|
||||
log_and_message_admins("[user.ckey] tried to delete event trigger [ET.name] while [other_ckey] is active.", user)
|
||||
return
|
||||
var/confirm = tgui_alert(src, "ARE YOU SURE? THERE IS NO GOING BACK FROM DELETING [ET.name]", "CONFIRM", list("Go Back", "Delete it!"), autofocus = FALSE)
|
||||
var/confirm = tgui_alert(user, "ARE YOU SURE? THERE IS NO GOING BACK FROM DELETING [ET.name]", "CONFIRM", list("Go Back", "Delete it!"), autofocus = FALSE)
|
||||
if(!confirm || confirm == "Go Back")
|
||||
return
|
||||
ET.delete_me = TRUE
|
||||
qdel(ET)
|
||||
log_and_message_admins("[src.ckey] tried to deleted event trigger [ET.name], [other_ckey] is either disconnected or inactive.", src)
|
||||
log_and_message_admins("[user.ckey] tried to deleted event trigger [ET.name], [other_ckey] is either disconnected or inactive.", user)
|
||||
|
||||
@@ -3,32 +3,22 @@
|
||||
|
||||
//TGUI functionality planned for easier readability, so creating a new file for this
|
||||
//TGUI functionality will call a datum to handle things separately
|
||||
/client/proc/getPlayerStatus()
|
||||
set name = "Report Player Status"
|
||||
set desc = "Get information on all active players in-game."
|
||||
set category = "Fun.Event Kit"
|
||||
|
||||
if(!check_rights(R_FUN)) return
|
||||
|
||||
var/player_list_local = GLOB.player_list //Copying player list so we don't touch a global var all the time
|
||||
ADMIN_VERB(getPlayerStatus, R_FUN, "Report Player Status", "Get information on all active players in-game.", ADMIN_CATEGORY_FUN_EVENT_KIT)
|
||||
var/list/area_list = list() //An associative list, where key is area name, value is a list of mob references
|
||||
var/inactives = 0
|
||||
var/players = 0
|
||||
|
||||
//Initializing our working list
|
||||
for(var/player in player_list_local)
|
||||
|
||||
if(!isliving(player)) continue //We only care for living players
|
||||
var/mob/living/L = player
|
||||
for(var/mob/living/player in GLOB.player_list)
|
||||
players += 1
|
||||
if(L.client.inactivity > INACTIVITY_CAP)
|
||||
if(player.client.inactivity > INACTIVITY_CAP)
|
||||
inactives += 1
|
||||
continue //Anyone who hasn't done anything in 15 minutes is likely too busy
|
||||
var/area_name = get_area_name(L)
|
||||
var/area_name = get_area_name(player)
|
||||
if(area_name in area_list)
|
||||
area_list[area_name] += L // area_name:list(A,B,C); we add L to (A,B,C)
|
||||
area_list[area_name] += player // area_name:list(A,B,C); we add player to (A,B,C)
|
||||
else
|
||||
area_list[area_name] = list(L)
|
||||
area_list[area_name] = list(player)
|
||||
|
||||
var/message = "#### The Following Players Are Likely Available #### \n"
|
||||
for(var/cur_area in area_list)
|
||||
@@ -36,11 +26,11 @@
|
||||
message += "**** There are currently [LAZYLEN(area_players)] in [cur_area] **** \n"
|
||||
|
||||
|
||||
for(var/mob/living/L in area_players)
|
||||
message += "[L.name] ([L.key]) at ([L.x];[L.y]) has been inactive for [round(L.client.inactivity / (60 SECONDS))] minutes. \n"
|
||||
for(var/mob/living/player in area_players)
|
||||
message += "[player.name] ([player.key]) at ([player.x];[player.y]) has been inactive for [round(player.client.inactivity / (60 SECONDS))] minutes. \n"
|
||||
|
||||
|
||||
message += "#### Over all, there are [players] eligible players, of which [inactives] were hidden due to inactivity. ####"
|
||||
to_chat(usr, span_notice(message))
|
||||
to_chat(user, span_notice(message))
|
||||
|
||||
#undef INACTIVITY_CAP
|
||||
|
||||
@@ -1,20 +1,14 @@
|
||||
/client/proc/admin_lightning_strike()
|
||||
set name = "Lightning Strike"
|
||||
set desc = "Causes lightning to strike on your tile. This can be made to hurt things on or nearby it severely."
|
||||
set category = "Fun.Do Not"
|
||||
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
var/result = tgui_alert(src, "Really strike your tile with lightning?", "Confirm Badmin" , list("No", "Yes (Cosmetic)", "Yes (Real)"))
|
||||
ADMIN_VERB(admin_lightning_strike, R_FUN, "Lightning Strike", "Causes lightning to strike on your tile. This can be made to hurt things on or nearby it severely.", ADMIN_CATEGORY_FUN_DO_NOT)
|
||||
var/result = tgui_alert(user, "Really strike your tile with lightning?", "Confirm Badmin" , list("No", "Yes (Cosmetic)", "Yes (Real)"))
|
||||
|
||||
if(!result || result == "No")
|
||||
return
|
||||
var/fake_lightning = result == "Yes (Cosmetic)"
|
||||
|
||||
lightning_strike(get_turf(usr), fake_lightning)
|
||||
log_and_message_admins("has caused [fake_lightning ? "cosmetic":"harmful"] lightning to strike at their position ([src.mob.x], [src.mob.y], [src.mob.z]). \
|
||||
(<A href='byond://?_src_=holder;[HrefToken()];adminplayerobservecoodjump=1;X=[src.mob.x];Y=[src.mob.y];Z=[src.mob.z]'>JMP</a>)", src)
|
||||
var/mob/user_mob = user.mob
|
||||
lightning_strike(get_turf(user_mob), fake_lightning)
|
||||
log_and_message_admins("has caused [fake_lightning ? "cosmetic":"harmful"] lightning to strike at their position ([user_mob.x], [user_mob.y], [user_mob.z]). \
|
||||
(<A href='byond://?_src_=holder;[HrefToken()];adminplayerobservecoodjump=1;X=[user_mob.x];Y=[user_mob.y];Z=[user_mob.z]'>JMP</a>)", user)
|
||||
|
||||
#define LIGHTNING_REDIRECT_RANGE 28 // How far in tiles certain things draw lightning from.
|
||||
#define LIGHTNING_ZAP_RANGE 1 // How far the tesla effect zaps, as well as the bad effects from a direct strike.
|
||||
|
||||
@@ -5,14 +5,9 @@
|
||||
|
||||
var/list/sounds_cache = list()
|
||||
|
||||
/client/proc/play_sound(S as sound)
|
||||
set category = "Fun.Sounds"
|
||||
set name = "Play Global Sound"
|
||||
if(!check_rights(R_SOUNDS))
|
||||
return
|
||||
|
||||
ADMIN_VERB(play_sound, R_SOUNDS, "Play Global Sound", "Plays a sound to all players.", ADMIN_CATEGORY_FUN_SOUNDS, S as sound)
|
||||
var/freq = 1
|
||||
var/vol = tgui_input_number(usr, "What volume would you like the sound to play at?",, 100, 100, 1)
|
||||
var/vol = tgui_input_number(user, "What volume would you like the sound to play at?",, 100, 100, 1)
|
||||
if(!vol)
|
||||
return
|
||||
vol = clamp(vol, 1, 100)
|
||||
@@ -29,7 +24,7 @@ var/list/sounds_cache = list()
|
||||
|
||||
sounds_cache += S
|
||||
|
||||
var/res = tgui_alert(usr, "Show the title of this song ([S]) to the players?\nOptions 'Yes' and 'No' will play the sound.",, list("Yes", "No", "Cancel"))
|
||||
var/res = tgui_alert(user, "Show the title of this song ([S]) to the players?\nOptions 'Yes' and 'No' will play the sound.",, list("Yes", "No", "Cancel"))
|
||||
if(!res)
|
||||
return
|
||||
switch(res)
|
||||
@@ -38,8 +33,8 @@ var/list/sounds_cache = list()
|
||||
if("Cancel")
|
||||
return
|
||||
|
||||
log_admin("[key_name(src)] played sound [S]")
|
||||
message_admins("[key_name_admin(src)] played sound [S]", 1)
|
||||
log_admin("[key_name(user)] played sound [S]")
|
||||
message_admins("[key_name_admin(user)] played sound [S]", 1)
|
||||
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.read_preference(/datum/preference/toggle/play_admin_midis))
|
||||
@@ -49,70 +44,50 @@ var/list/sounds_cache = list()
|
||||
|
||||
feedback_add_details("admin_verb", "Play Global Sound")
|
||||
|
||||
/client/proc/play_local_sound(S as sound)
|
||||
set category = "Fun.Sounds"
|
||||
set name = "Play Local Sound"
|
||||
if(!check_rights(R_SOUNDS))
|
||||
return
|
||||
|
||||
log_admin("[key_name(src)] played a local sound [S]")
|
||||
message_admins("[key_name_admin(src)] played a local sound [S]", 1)
|
||||
playsound(src.mob, S, 50, 0, 0)
|
||||
ADMIN_VERB(play_local_sound, R_SOUNDS, "Play Local Sound", "Plays a sound around your own mob.", ADMIN_CATEGORY_FUN_SOUNDS, S as sound)
|
||||
log_admin("[key_name(user)] played a local sound [S]")
|
||||
message_admins("[key_name_admin(user)] played a local sound [S]", 1)
|
||||
playsound(user.mob, S, 50, 0, 0)
|
||||
feedback_add_details("admin_verb", "Play Local Sound")
|
||||
|
||||
/client/proc/play_direct_mob_sound(S as sound, mob/M)
|
||||
set category = "Fun.Sounds"
|
||||
set name = "Play Direct Mob Sound"
|
||||
if(!check_rights(R_SOUNDS))
|
||||
ADMIN_VERB(play_direct_mob_sound, R_SOUNDS, "Play Direct Mob Sound", "Plays a sound to a single mob.", ADMIN_CATEGORY_FUN_SOUNDS, S as sound)
|
||||
var/mob/target_mob = tgui_input_list(user, "Choose a mob to play the sound to. Only they will hear it.", "Play Mob Sound", sortNames(GLOB.player_list))
|
||||
if(QDELETED(target_mob))
|
||||
return
|
||||
|
||||
if(!M)
|
||||
M = tgui_input_list(usr, "Choose a mob to play the sound to. Only they will hear it.", "Play Mob Sound", sortNames(GLOB.player_list))
|
||||
if(!M || QDELETED(M))
|
||||
return
|
||||
log_admin("[key_name(src)] played a direct mob sound [S] to [M].")
|
||||
message_admins("[key_name_admin(src)] played a direct mob sound [S] to [ADMIN_LOOKUPFLW(M)].")
|
||||
SEND_SOUND(M, S)
|
||||
log_admin("[key_name(user)] played a direct mob sound [S] to [target_mob].")
|
||||
message_admins("[key_name_admin(user)] played a direct mob sound [S] to [ADMIN_LOOKUPFLW(target_mob)].")
|
||||
SEND_SOUND(target_mob, S)
|
||||
feedback_add_details("admin_verb", "Play Direct Mob Sound")
|
||||
|
||||
/client/proc/play_z_sound(S as sound)
|
||||
set category = "Fun.Sounds"
|
||||
set name = "Play Z Sound"
|
||||
if(!check_rights(R_SOUNDS)) return
|
||||
var/target_z = mob.z
|
||||
ADMIN_VERB(play_z_sound, R_SOUNDS, "Play Z Sound", "Plays a sound to a single z-level.", ADMIN_CATEGORY_FUN_SOUNDS, S as sound)
|
||||
var/target_z = user.mob.z
|
||||
var/sound/uploaded_sound = sound(S, repeat = 0, wait = 1, channel = 777)
|
||||
uploaded_sound.priority = 250
|
||||
|
||||
sounds_cache += S
|
||||
|
||||
if(tgui_alert(usr, "Do you ready?\nSong: [S]\nNow you can also play this sound using \"Play Server Sound\".", "Confirmation request", list("Play","Cancel")) != "Play")
|
||||
if(tgui_alert(user, "Do you ready?\nSong: [S]\nNow you can also play this sound using \"Play Server Sound\".", "Confirmation request", list("Play","Cancel")) != "Play")
|
||||
return
|
||||
|
||||
log_admin("[key_name(src)] played sound [S] on Z[target_z]")
|
||||
message_admins("[key_name_admin(src)] played sound [S] on Z[target_z]", 1)
|
||||
log_admin("[key_name(user)] played sound [S] on Z[target_z]")
|
||||
message_admins("[key_name_admin(user)] played sound [S] on Z[target_z]", 1)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.read_preference(/datum/preference/toggle/play_admin_midis) && M.z == target_z)
|
||||
M << uploaded_sound
|
||||
|
||||
feedback_add_details("admin_verb", "Play Z Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/proc/play_server_sound()
|
||||
set category = "Fun.Sounds"
|
||||
set name = "Play Server Sound"
|
||||
if(!check_rights(R_SOUNDS))
|
||||
return
|
||||
|
||||
ADMIN_VERB(play_server_sound, R_SOUNDS, "Play Server Sound", "Plays a sound from the server to play.", ADMIN_CATEGORY_FUN_SOUNDS, S as sound)
|
||||
var/list/sounds = world.file2list("sound/serversound_list.txt");
|
||||
sounds += "--CANCEL--"
|
||||
sounds += sounds_cache
|
||||
|
||||
var/melody = tgui_input_list(usr, "Select a sound from the server to play", "Server sound list", sounds, "--CANCEL--")
|
||||
var/melody = tgui_input_list(user, "Select a sound from the server to play", "Server sound list", sounds, "--CANCEL--")
|
||||
|
||||
if(melody == "--CANCEL--")
|
||||
if(!melody || melody == "--CANCEL--")
|
||||
return
|
||||
|
||||
play_sound(melody)
|
||||
SSadmin_verbs.dynamic_invoke_verb(user, /datum/admin_verb/play_sound, melody)
|
||||
feedback_add_details("admin_verb", "Play Server Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
///Takes an input from either proc/play_web_sound or the request manager and runs it through youtube-dl and prompts the user before playing it to the server.
|
||||
@@ -214,33 +189,28 @@ var/list/sounds_cache = list()
|
||||
|
||||
feedback_add_details("admin_verb", "Play Internet Sound")
|
||||
|
||||
/client/proc/play_web_sound()
|
||||
set category = "Fun.Sounds"
|
||||
set name = "Play Internet Sound"
|
||||
if(!check_rights(R_SOUNDS))
|
||||
return
|
||||
|
||||
ADMIN_VERB(play_web_sound, R_SOUNDS, "Play Internet Sound", "Plays a sound from the internet to all players.", ADMIN_CATEGORY_FUN_SOUNDS)
|
||||
var/ytdl = CONFIG_GET(string/invoke_youtubedl)
|
||||
if(!ytdl)
|
||||
to_chat(src, span_boldwarning("Youtube-dl was not configured, action unavailable"), confidential = TRUE) //Check config.txt for the INVOKE_YOUTUBEDL value
|
||||
to_chat(user, span_boldwarning("Youtube-dl was not configured, action unavailable"), confidential = TRUE) //Check config.txt for the INVOKE_YOUTUBEDL value
|
||||
return
|
||||
|
||||
if(S_TIMER_COOLDOWN_TIMELEFT(SStimer, COOLDOWN_INTERNET_SOUND))
|
||||
if(tgui_alert(usr, "Someone else is already playing an Internet sound! It has [DisplayTimeText(S_TIMER_COOLDOWN_TIMELEFT(SStimer, COOLDOWN_INTERNET_SOUND), 1)] remaining. \
|
||||
if(tgui_alert(user, "Someone else is already playing an Internet sound! It has [DisplayTimeText(S_TIMER_COOLDOWN_TIMELEFT(SStimer, COOLDOWN_INTERNET_SOUND), 1)] remaining. \
|
||||
Would you like to override?", "Musicalis Interruptus", list("No","Yes")) != "Yes")
|
||||
return
|
||||
|
||||
var/web_sound_input = tgui_input_text(usr, "Enter content URL (supported sites only, leave blank to stop playing)", "Play Internet Sound", null)
|
||||
var/web_sound_input = tgui_input_text(user, "Enter content URL (supported sites only, leave blank to stop playing)", "Play Internet Sound", null)
|
||||
|
||||
if(length(web_sound_input))
|
||||
web_sound_input = trim(web_sound_input)
|
||||
if(findtext(web_sound_input, ":") && !findtext(web_sound_input, GLOB.is_http_protocol))
|
||||
to_chat(src, span_boldwarning("Non-http(s) URIs are not allowed."), confidential = TRUE)
|
||||
to_chat(src, span_warning("For youtube-dl shortcuts like ytsearch: please use the appropriate full URL from the website."), confidential = TRUE)
|
||||
to_chat(user, span_boldwarning("Non-http(s) URIs are not allowed."), confidential = TRUE)
|
||||
to_chat(user, span_warning("For youtube-dl shortcuts like ytsearch: please use the appropriate full URL from the website."), confidential = TRUE)
|
||||
return
|
||||
web_sound(usr, web_sound_input)
|
||||
web_sound(user.mob, web_sound_input)
|
||||
else
|
||||
web_sound(usr, null)
|
||||
web_sound(user.mob, null)
|
||||
|
||||
/client/proc/stop_sounds()
|
||||
set category = "Debug.Dangerous"
|
||||
|
||||
Reference in New Issue
Block a user