mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-27 02:32:20 +00:00
fixed giveruntimelog getruntimelog and getserverlog Any admin with ADMIN rights can give anybody permission to view runtimes simply by typing .giveruntimelog The person given permission can then type .getruntimelog Admins can type .getruntimelog without giving themselves permissions first Moved a lot of the copypasta code into helper procs in __HELPERS/files.dm. There is one which allows a client to browse through folders on the server (in this case to look for logfiles). You can now also return to the directory you started at. Note, for some weird reason, runtimes will no longer show in dreamdeamon. If this is a massive problem I can make it a compile option or something (or you can comment out the line if you're a coder). I know this is a massive pain but it sort of removes much of the effort in getting runtimes from other servers, since they all now have their runtimes saved in a way coders can easily access. It also sort of means we don't have to rely on people remembering to log runtimes and such. And all logs will be organised by month. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5466 316c924e-a436-60f5-8080-3fe189b3f50e
597 lines
24 KiB
Plaintext
597 lines
24 KiB
Plaintext
//admin verb groups - They can overlap if you so wish. Only one of each verb will exist in the verbs list regardless
|
|
var/list/admin_verbs_default = list(
|
|
/datum/admins/proc/show_player_panel, /*shows an interface for individual players, with various links (links require additional flags*/
|
|
/client/proc/game_panel, /*game panel, allows to change game-mode etc*/
|
|
/datum/admins/proc/toggleooc, /*toggles ooc on/off for everyone*/
|
|
/datum/admins/proc/toggleoocdead, /*toggles ooc on/off for everyone who is dead*/
|
|
/client/proc/toggleadminhelpsound, /*toggles whether we hear a sound when adminhelps/PMs are used*/
|
|
/client/proc/deadmin_self, /*destroys our own admin datum so we can play as a regular player*/
|
|
/client/proc/cmd_admin_say, /*admin-only ooc chat*/
|
|
/client/proc/hide_verbs, /*hides all our adminverbs*/
|
|
/client/proc/hide_most_verbs, /*hides all our hideable adminverbs*/
|
|
/client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify*/
|
|
/client/proc/check_ai_laws, /*shows AI and borg laws*/
|
|
/client/proc/check_antagonists, /*shows all antags*/
|
|
/client/proc/admin_memo, /*admin memo system. show/delete/write. +SERVER needed to delete admin memos of others*/
|
|
/client/proc/deadchat, /*toggles deadchat on/off*/
|
|
/client/proc/dsay, /*talk in deadchat using our ckey/fakekey*/
|
|
/client/proc/toggleprayers, /*toggles prayers on/off*/
|
|
/client/proc/toggle_hear_radio, /*toggles whether we hear the radio*/
|
|
/client/proc/investigate_show, /*various admintools for investigation. Such as a singulo grief-log*/
|
|
/client/proc/secrets
|
|
)
|
|
var/list/admin_verbs_admin = list(
|
|
/client/proc/player_panel, /*shows an interface for all players, with links to various panels (old style)*/
|
|
/client/proc/player_panel_new, /*shows an interface for all players, with links to various panels*/
|
|
/client/proc/invisimin, /*allows our mob to go invisible/visible*/
|
|
// /datum/admins/proc/show_traitor_panel, /*interface which shows a mob's mind*/ -Removed due to rare practical use. Moved to debug verbs ~Errorage
|
|
/datum/admins/proc/toggleenter, /*toggles whether people can join the current game*/
|
|
/datum/admins/proc/toggleguests, /*toggles whether guests can join the current game*/
|
|
/datum/admins/proc/announce, /*priority announce something to all clients.*/
|
|
/client/proc/colorooc, /*allows us to set a custom colour for everythign we say in ooc*/
|
|
/client/proc/admin_ghost, /*allows us to ghost/reenter body at will*/
|
|
/client/proc/toggle_view_range, /*changes how far we can see*/
|
|
/datum/admins/proc/view_txt_log, /*shows the server log (diary) for today*/
|
|
/datum/admins/proc/view_atk_log, /*shows the server combat-log, doesn't do anything presently*/
|
|
/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'*/
|
|
/client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/
|
|
/client/proc/cmd_admin_check_contents, /*displays the contents of an instance*/
|
|
/datum/admins/proc/access_news_network, /*allows access of newscasters*/
|
|
/client/proc/giveruntimelog, /*allows us to give access to runtime logs to somebody*/
|
|
/client/proc/getruntimelog, /*allows us to access runtime logs to somebody*/
|
|
/client/proc/getserverlog, /*allows us to fetch server logs (diary) for other days*/
|
|
/client/proc/jumptocoord, /*we ghost and jump to a coordinate*/
|
|
/client/proc/Getmob, /*teleports a mob to our location*/
|
|
/client/proc/Getkey, /*teleports a mob with a certain ckey to our location*/
|
|
// /client/proc/sendmob, /*sends a mob somewhere*/ -Removed due to it needing two sorting procs to work, which were executed every time an admin right-clicked. ~Errorage
|
|
/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/admin_call_shuttle, /*allows us to call the emergency shuttle*/
|
|
/client/proc/admin_cancel_shuttle, /*allows us to cancel the emergency shuttle, sending it back to centcomm*/
|
|
/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/cmd_admin_create_centcom_report,
|
|
/client/proc/check_words /*displays cult-words*/
|
|
)
|
|
var/list/admin_verbs_ban = list(
|
|
/client/proc/unban_panel,
|
|
/client/proc/jobbans,
|
|
/client/proc/unjobban_panel,
|
|
/client/proc/DB_ban_panel
|
|
)
|
|
var/list/admin_verbs_sounds = list(
|
|
/client/proc/play_local_sound,
|
|
/client/proc/play_sound
|
|
)
|
|
var/list/admin_verbs_fun = list(
|
|
/client/proc/object_talk,
|
|
/client/proc/cmd_admin_dress,
|
|
/client/proc/cmd_admin_gib_self,
|
|
/client/proc/drop_bomb,
|
|
/client/proc/cinematic,
|
|
/client/proc/one_click_antag,
|
|
/datum/admins/proc/toggle_aliens,
|
|
/datum/admins/proc/toggle_space_ninja,
|
|
/client/proc/send_space_ninja,
|
|
/client/proc/cmd_admin_add_freeform_ai_law,
|
|
/client/proc/cmd_admin_add_random_ai_law,
|
|
/client/proc/make_sound,
|
|
/client/proc/toggle_random_events,
|
|
/client/proc/set_ooc
|
|
)
|
|
var/list/admin_verbs_spawn = list(
|
|
/datum/admins/proc/spawn_atom, /*allows us to spawn instances*/
|
|
/client/proc/respawn_character
|
|
)
|
|
var/list/admin_verbs_server = list(
|
|
/client/proc/Set_Holiday,
|
|
/client/proc/ToRban,
|
|
/datum/admins/proc/startnow,
|
|
/datum/admins/proc/restart,
|
|
/datum/admins/proc/delay,
|
|
/datum/admins/proc/toggleaban,
|
|
/client/proc/toggle_log_hrefs,
|
|
/datum/admins/proc/immreboot,
|
|
/client/proc/everyone_random,
|
|
/datum/admins/proc/toggleAI,
|
|
/client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/
|
|
/client/proc/cmd_debug_del_all,
|
|
/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/toggle_random_events
|
|
)
|
|
var/list/admin_verbs_debug = list(
|
|
/client/proc/restart_controller,
|
|
/client/proc/cmd_admin_list_open_jobs,
|
|
/client/proc/Debug2,
|
|
/client/proc/kill_air,
|
|
/client/proc/cmd_debug_make_powernets,
|
|
/client/proc/kill_airgroup,
|
|
/client/proc/debug_controller,
|
|
/client/proc/cmd_debug_mob_lists,
|
|
/client/proc/cmd_admin_delete,
|
|
/client/proc/cmd_debug_del_all,
|
|
/client/proc/cmd_debug_tog_aliens,
|
|
/client/proc/air_report,
|
|
/client/proc/reload_admins,
|
|
/client/proc/restart_controller,
|
|
/client/proc/enable_debug_verbs
|
|
)
|
|
var/list/admin_verbs_possess = list(
|
|
/proc/possess,
|
|
/proc/release
|
|
)
|
|
var/list/admin_verbs_permissions = list(
|
|
/client/proc/edit_admin_permissions
|
|
)
|
|
var/list/admin_verbs_rejuv = list(
|
|
/client/proc/respawn_character
|
|
)
|
|
|
|
//verbs which can be hidden - needs work
|
|
var/list/admin_verbs_hideable = list(
|
|
/client/proc/set_ooc,
|
|
/client/proc/deadmin_self,
|
|
/client/proc/deadchat,
|
|
/client/proc/toggleprayers,
|
|
/client/proc/toggle_hear_radio,
|
|
/datum/admins/proc/show_traitor_panel,
|
|
/datum/admins/proc/toggleenter,
|
|
/datum/admins/proc/toggleguests,
|
|
/datum/admins/proc/announce,
|
|
/client/proc/colorooc,
|
|
/client/proc/admin_ghost,
|
|
/client/proc/toggle_view_range,
|
|
/datum/admins/proc/view_txt_log,
|
|
/datum/admins/proc/view_atk_log,
|
|
/client/proc/cmd_admin_subtle_message,
|
|
/client/proc/cmd_admin_check_contents,
|
|
/datum/admins/proc/access_news_network,
|
|
/client/proc/admin_call_shuttle,
|
|
/client/proc/admin_cancel_shuttle,
|
|
/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/object_talk,
|
|
/client/proc/cmd_admin_dress,
|
|
/client/proc/cmd_admin_gib_self,
|
|
/client/proc/drop_bomb,
|
|
/client/proc/cinematic,
|
|
/datum/admins/proc/toggle_aliens,
|
|
/datum/admins/proc/toggle_space_ninja,
|
|
/client/proc/send_space_ninja,
|
|
/client/proc/cmd_admin_add_freeform_ai_law,
|
|
/client/proc/cmd_admin_add_random_ai_law,
|
|
/client/proc/cmd_admin_create_centcom_report,
|
|
/client/proc/make_sound,
|
|
/client/proc/toggle_random_events,
|
|
/client/proc/cmd_admin_add_random_ai_law,
|
|
/client/proc/Set_Holiday,
|
|
/client/proc/ToRban,
|
|
/datum/admins/proc/startnow,
|
|
/datum/admins/proc/restart,
|
|
/datum/admins/proc/delay,
|
|
/datum/admins/proc/toggleaban,
|
|
/client/proc/toggle_log_hrefs,
|
|
/datum/admins/proc/immreboot,
|
|
/client/proc/everyone_random,
|
|
/datum/admins/proc/toggleAI,
|
|
/datum/admins/proc/adrev,
|
|
/datum/admins/proc/adspawn,
|
|
/datum/admins/proc/adjump,
|
|
/client/proc/restart_controller,
|
|
/client/proc/cmd_admin_list_open_jobs,
|
|
/client/proc/callproc,
|
|
/client/proc/Debug2,
|
|
/client/proc/reload_admins,
|
|
/client/proc/kill_air,
|
|
/client/proc/cmd_debug_make_powernets,
|
|
/client/proc/kill_airgroup,
|
|
/client/proc/debug_controller,
|
|
/client/proc/startSinglo,
|
|
/client/proc/cmd_debug_mob_lists,
|
|
/client/proc/cmd_debug_del_all,
|
|
/client/proc/cmd_debug_tog_aliens,
|
|
/client/proc/air_report,
|
|
/client/proc/enable_debug_verbs,
|
|
/proc/possess,
|
|
/proc/release
|
|
)
|
|
|
|
/client/proc/add_admin_verbs()
|
|
if(holder)
|
|
verbs += admin_verbs_default
|
|
if(holder.rights & R_BUILDMODE) verbs += /client/proc/togglebuildmodeself
|
|
if(holder.rights & R_ADMIN) verbs += admin_verbs_admin
|
|
if(holder.rights & R_BAN) verbs += admin_verbs_ban
|
|
if(holder.rights & R_FUN) verbs += admin_verbs_fun
|
|
if(holder.rights & R_SERVER) verbs += admin_verbs_server
|
|
if(holder.rights & R_DEBUG) verbs += admin_verbs_debug
|
|
if(holder.rights & R_POSSESS) verbs += admin_verbs_possess
|
|
if(holder.rights & R_PERMISSIONS) verbs += admin_verbs_permissions
|
|
if(holder.rights & R_STEALTH) verbs += /client/proc/stealth
|
|
if(holder.rights & R_REJUVINATE) verbs += admin_verbs_rejuv
|
|
if(holder.rights & R_SOUNDS) verbs += admin_verbs_sounds
|
|
if(holder.rights & R_SPAWN) verbs += admin_verbs_spawn
|
|
|
|
/client/proc/remove_admin_verbs()
|
|
verbs.Remove(
|
|
admin_verbs_default,
|
|
/client/proc/togglebuildmodeself,
|
|
admin_verbs_admin,
|
|
admin_verbs_ban,
|
|
admin_verbs_fun,
|
|
admin_verbs_server,
|
|
admin_verbs_debug,
|
|
admin_verbs_possess,
|
|
admin_verbs_permissions,
|
|
/client/proc/stealth,
|
|
admin_verbs_rejuv,
|
|
admin_verbs_sounds,
|
|
admin_verbs_spawn,
|
|
/*Debug verbs added by "show debug verbs"*/
|
|
/client/proc/Cell,
|
|
/client/proc/do_not_use_these,
|
|
/client/proc/camera_view,
|
|
/client/proc/sec_camera_report,
|
|
/client/proc/intercom_view,
|
|
/client/proc/air_status,
|
|
/client/proc/atmosscan,
|
|
/client/proc/powerdebug,
|
|
/client/proc/count_objects_on_z_level,
|
|
/client/proc/count_objects_all,
|
|
/client/proc/cmd_assume_direct_control,
|
|
/client/proc/jump_to_dead_group,
|
|
/client/proc/startSinglo,
|
|
/client/proc/ticklag,
|
|
/client/proc/cmd_admin_grantfullaccess,
|
|
/client/proc/kaboom,
|
|
/client/proc/splash,
|
|
/client/proc/cmd_admin_areatest
|
|
)
|
|
|
|
/client/proc/hide_most_verbs()//Allows you to keep some functionality while hiding some verbs
|
|
set name = "Adminverbs - Hide Most"
|
|
set category = "Admin"
|
|
|
|
verbs.Remove(/client/proc/hide_most_verbs, admin_verbs_hideable)
|
|
verbs += /client/proc/show_verbs
|
|
|
|
src << "<span class='interface'>Most of your adminverbs have been hidden.</span>"
|
|
feedback_add_details("admin_verb","HMV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
return
|
|
|
|
/client/proc/hide_verbs()
|
|
set name = "Adminverbs - Hide All"
|
|
set category = "Admin"
|
|
|
|
remove_admin_verbs()
|
|
verbs += /client/proc/show_verbs
|
|
|
|
src << "<span class='interface'>Almost all of your adminverbs have been hidden.</span>"
|
|
feedback_add_details("admin_verb","TAVVH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
return
|
|
|
|
/client/proc/show_verbs()
|
|
set name = "Adminverbs - Show"
|
|
set category = "Admin"
|
|
|
|
verbs -= /client/proc/show_verbs
|
|
add_admin_verbs()
|
|
|
|
src << "<span class='interface'>All of your adminverbs are now visible.</span>"
|
|
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"
|
|
set name = "Aghost"
|
|
if(!holder) return
|
|
if(istype(mob,/mob/dead/observer))
|
|
//re-enter
|
|
var/mob/dead/observer/ghost = mob
|
|
ghost.can_reenter_corpse = 1 //just in-case.
|
|
ghost.reenter_corpse()
|
|
feedback_add_details("admin_verb","P") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
else if(istype(mob,/mob/new_player))
|
|
src << "<font color='red'>Error: Aghost: Can't admin-ghost whilst in the lobby. Join or Observe first.</font>"
|
|
else
|
|
//ghostize
|
|
var/mob/body = mob
|
|
body.ghostize(1)
|
|
if(body && !body.key)
|
|
body.key = "@[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"
|
|
set desc = "Toggles ghost-like invisibility (Don't abuse this)"
|
|
if(holder && mob)
|
|
if(mob.invisibility == INVISIBILITY_OBSERVER)
|
|
mob.invisibility = initial(mob.invisibility)
|
|
mob << "\red <b>Invisimin off. Invisibility reset.</b>"
|
|
else
|
|
mob.invisibility = INVISIBILITY_OBSERVER
|
|
mob << "\blue <b>Invisimin on. You are now as invisible as a ghost.</b>"
|
|
|
|
|
|
/client/proc/player_panel()
|
|
set name = "Player Panel"
|
|
set category = "Admin"
|
|
if(holder)
|
|
holder.player_panel_old()
|
|
feedback_add_details("admin_verb","PP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
return
|
|
|
|
/client/proc/player_panel_new()
|
|
set name = "Player Panel New"
|
|
set category = "Admin"
|
|
if(holder)
|
|
holder.player_panel_new()
|
|
feedback_add_details("admin_verb","PPN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
return
|
|
|
|
/client/proc/check_antagonists()
|
|
set name = "Check Antagonists"
|
|
set category = "Admin"
|
|
if(holder)
|
|
holder.check_antagonists()
|
|
log_admin("[key_name(usr)] checked antagonists.") //for tsar~
|
|
feedback_add_details("admin_verb","CHA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
return
|
|
|
|
/client/proc/jobbans()
|
|
set name = "Display Job bans"
|
|
set category = "Admin"
|
|
if(holder)
|
|
if(config.ban_legacy_system)
|
|
holder.Jobbans()
|
|
else
|
|
holder.DB_ban_panel()
|
|
feedback_add_details("admin_verb","VJB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
return
|
|
|
|
/client/proc/unban_panel()
|
|
set name = "Unban Panel"
|
|
set category = "Admin"
|
|
if(holder)
|
|
if(config.ban_legacy_system)
|
|
holder.unbanpanel()
|
|
else
|
|
holder.DB_ban_panel()
|
|
feedback_add_details("admin_verb","UBP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
return
|
|
|
|
/client/proc/game_panel()
|
|
set name = "Game Panel"
|
|
set category = "Admin"
|
|
if(holder)
|
|
holder.Game()
|
|
feedback_add_details("admin_verb","GP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
return
|
|
|
|
/client/proc/secrets()
|
|
set name = "Secrets"
|
|
set category = "Admin"
|
|
if (holder)
|
|
holder.Secrets()
|
|
feedback_add_details("admin_verb","S") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
return
|
|
|
|
/client/proc/colorooc()
|
|
set category = "Fun"
|
|
set name = "OOC Text Color"
|
|
if(!holder) return
|
|
var/new_ooccolor = input(src, "Please select your OOC colour.", "OOC colour") as color|null
|
|
if(new_ooccolor)
|
|
prefs.ooccolor = new_ooccolor
|
|
prefs.save_preferences()
|
|
feedback_add_details("admin_verb","OC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
return
|
|
|
|
/client/proc/stealth()
|
|
set category = "Admin"
|
|
set name = "Stealth Mode"
|
|
if(holder)
|
|
if(holder.fakekey)
|
|
holder.fakekey = null
|
|
else
|
|
var/new_key = ckeyEx(input("Enter your desired display name.", "Fake Key", key) as text|null)
|
|
if(!new_key) return
|
|
if(length(new_key) >= 26)
|
|
new_key = copytext(new_key, 1, 26)
|
|
holder.fakekey = new_key
|
|
log_admin("[key_name(usr)] has turned stealth mode [holder.fakekey ? "ON" : "OFF"]")
|
|
message_admins("[key_name_admin(usr)] has turned stealth mode [holder.fakekey ? "ON" : "OFF"]", 1)
|
|
feedback_add_details("admin_verb","SM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
#define MAX_WARNS 3
|
|
#define AUTOBANTIME 10
|
|
|
|
/client/proc/warn(warned_ckey)
|
|
if(!check_rights(R_ADMIN)) return
|
|
|
|
if(!warned_ckey || !istext(warned_ckey)) return
|
|
if(warned_ckey in admin_datums)
|
|
usr << "<font color='red'>Error: warn(): You can't warn admins.</font>"
|
|
return
|
|
|
|
var/datum/preferences/D
|
|
var/client/C = directory[warned_ckey]
|
|
if(C) D = C.prefs
|
|
else D = preferences_datums[warned_ckey]
|
|
|
|
if(!D)
|
|
src << "<font color='red'>Error: warn(): No such ckey found.</font>"
|
|
return
|
|
|
|
if(++D.warns >= MAX_WARNS) //uh ohhhh...you'reee iiiiin trouuuubble O:)
|
|
ban_unban_log_save("[ckey] warned [warned_ckey], resulting in a [AUTOBANTIME] minute autoban.")
|
|
if(C)
|
|
message_admins("[key_name_admin(src)] has warned [key_name_admin(C)] resulting in a [AUTOBANTIME] minute ban.")
|
|
C << "<font color='red'><BIG><B>You have been autobanned due to a warning by [ckey].</B></BIG><br>This is a temporary ban, it will be removed in [AUTOBANTIME] minutes."
|
|
del(C)
|
|
else
|
|
message_admins("[key_name_admin(src)] has warned [warned_ckey] resulting in a [AUTOBANTIME] minute ban.")
|
|
AddBan(warned_ckey, D.last_id, "Autobanning due to too many formal warnings", ckey, 1, AUTOBANTIME)
|
|
feedback_inc("ban_warn",1)
|
|
else
|
|
if(C)
|
|
C << "<font color='red'><BIG><B>You have been formally warned by an administrator.</B></BIG><br>Further warnings will result in an autoban.</font>"
|
|
message_admins("[key_name_admin(src)] has warned [key_name_admin(C)]. They have [MAX_WARNS-D.warns] strikes remaining.")
|
|
else
|
|
message_admins("[key_name_admin(src)] has warned [warned_ckey] (DC). They have [MAX_WARNS-D.warns] strikes remaining.")
|
|
|
|
feedback_add_details("admin_verb","WARN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
#undef MAX_WARNS
|
|
#undef AUTOBANTIME
|
|
|
|
/client/proc/drop_bomb() // Some admin dickery that can probably be done better -- TLE
|
|
set category = "Special Verbs"
|
|
set name = "Drop Bomb"
|
|
set desc = "Cause an explosion of varying strength at your location."
|
|
|
|
var/turf/epicenter = mob.loc
|
|
var/list/choices = list("Small Bomb", "Medium Bomb", "Big Bomb", "Custom Bomb")
|
|
var/choice = input("What size explosion would you like to produce?") in choices
|
|
switch(choice)
|
|
if(null)
|
|
return 0
|
|
if("Small Bomb")
|
|
explosion(epicenter, 1, 2, 3, 3)
|
|
if("Medium Bomb")
|
|
explosion(epicenter, 2, 3, 4, 4)
|
|
if("Big Bomb")
|
|
explosion(epicenter, 3, 5, 7, 5)
|
|
if("Custom Bomb")
|
|
var/devastation_range = input("Devastation range (in tiles):") as num
|
|
var/heavy_impact_range = input("Heavy impact range (in tiles):") as num
|
|
var/light_impact_range = input("Light impact range (in tiles):") as num
|
|
var/flash_range = input("Flash range (in tiles):") as num
|
|
explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range)
|
|
message_admins("\blue [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!
|
|
|
|
/client/proc/give_spell(mob/T as mob in mob_list) // -- Urist
|
|
set category = "Fun"
|
|
set name = "Give Spell"
|
|
set desc = "Gives a spell to a mob."
|
|
var/obj/effect/proc_holder/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in spells
|
|
if(!S) return
|
|
T.spell_list += new S
|
|
feedback_add_details("admin_verb","GS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
log_admin("[key_name(usr)] gave [key_name(T)] the spell [S].")
|
|
message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] the spell [S].", 1)
|
|
|
|
/client/proc/give_disease(mob/T as mob in mob_list) // -- Giacom
|
|
set category = "Fun"
|
|
set name = "Give Disease"
|
|
set desc = "Gives a Disease to a mob."
|
|
var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in diseases
|
|
if(!D) return
|
|
T.contract_disease(new D, 1)
|
|
feedback_add_details("admin_verb","GD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
log_admin("[key_name(usr)] gave [key_name(T)] the disease [D].")
|
|
message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] the disease [D].", 1)
|
|
|
|
/client/proc/make_sound(var/obj/O in world) // -- TLE
|
|
set category = "Special Verbs"
|
|
set name = "Make Sound"
|
|
set desc = "Display a message to everyone who can hear the target"
|
|
if(O)
|
|
var/message = input("What do you want the message to be?", "Make Sound") as text|null
|
|
if(!message)
|
|
return
|
|
for (var/mob/V in hearers(O))
|
|
V.show_message(message, 2)
|
|
log_admin("[key_name(usr)] made [O] at [O.x], [O.y], [O.z]. make a sound")
|
|
message_admins("\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!
|
|
|
|
|
|
/client/proc/togglebuildmodeself()
|
|
set name = "Toggle Build Mode Self"
|
|
set category = "Special Verbs"
|
|
if(src.mob)
|
|
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 = "Special Verbs"
|
|
set name = "oSay"
|
|
set desc = "Display a message to everyone who can hear the target"
|
|
if(mob.control_object)
|
|
if(!msg)
|
|
return
|
|
for (var/mob/V in hearers(mob.control_object))
|
|
V.show_message("<b>[mob.control_object.name]</b> 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
|
|
set category = "Debug"
|
|
set name = "Kill Air"
|
|
set desc = "Toggle Air Processing"
|
|
if(kill_air)
|
|
kill_air = 0
|
|
usr << "<b>Enabled air processing.</b>"
|
|
else
|
|
kill_air = 1
|
|
usr << "<b>Disabled air processing.</b>"
|
|
feedback_add_details("admin_verb","KA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
log_admin("[key_name(usr)] used 'kill air'.")
|
|
message_admins("\blue [key_name_admin(usr)] used 'kill air'.", 1)
|
|
|
|
/client/proc/toggle_clickproc() //TODO ERRORAGE (This is a temporary verb here while I test the new clicking proc)
|
|
set name = "Toggle NewClickProc"
|
|
set category = "Debug"
|
|
|
|
if(!holder) return
|
|
using_new_click_proc = !using_new_click_proc
|
|
world << "Testing of new click proc [using_new_click_proc ? "enabled" : "disabled"]"
|
|
feedback_add_details("admin_verb","TNCP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/deadmin_self()
|
|
set name = "De-admin self"
|
|
set category = "Admin"
|
|
|
|
if(holder)
|
|
if(alert("Confirm self-deadmin for the round? You can't re-admin yourself without someont promoting you.",,"Yes","No") == "Yes")
|
|
log_admin("[src] deadmined themself.")
|
|
message_admins("[src] deadmined themself.", 1)
|
|
deadmin()
|
|
src << "<span class='interface'>You are now a normal player.</span>"
|
|
feedback_add_details("admin_verb","DAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/toggle_log_hrefs()
|
|
set name = "Toggle href logging"
|
|
set category = "Server"
|
|
if(!holder) return
|
|
if(config)
|
|
if(config.log_hrefs)
|
|
config.log_hrefs = 0
|
|
src << "<b>Stopped logging hrefs</b>"
|
|
else
|
|
config.log_hrefs = 1
|
|
src << "<b>Started logging hrefs</b>"
|
|
|
|
/client/proc/check_ai_laws()
|
|
set name = "Check AI Laws"
|
|
set category = "Admin"
|
|
if(holder)
|
|
src.holder.output_ai_laws()
|
|
|