/
githubmirror
/
vgstation13
Обзор
Документация
Войти
/
githubmirror
/
vgstation13
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
Bleeding-Edge
code/modules/admin/admin_verbs.dm
1 456 строк
56 KB
spess-empyrean
Robust Tournament Admin Tools and Stuff (#39418)
20 июн 2026, 15:06
Не верифицирован
20 июн 2026, 15:06
3f869ee
Код
Авторство
О чём код?
//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( // Everyone has +ADMIN so we don't actually need anything in here. // Downside: The observers no longer have msay if we lack defaults. /client/proc/deadmin_self, /*destroys our own admin datum so we can play as a regular player*/ ) var/list/admin_verbs_admin = list( /datum/admins/proc/show_player_panel, /*shows an interface for individual players, with various links (links require additional flags*/ /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_antagonists, /*shows all antags*/ /client/proc/advwho, /*in addition to listing connected ckeys, shows character name and living/dead/antag status for each*/ /datum/admins/proc/checkCID, /datum/admins/proc/checkCKEY, // /client/proc/deadchat /*toggles deadchat on/off*/ /client/proc/set_base_turf, /datum/admins/proc/delay, /client/proc/SendCentcommFax, /*sends a fax to all fax machines*/ /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_role_panel, /*interface which shows a mob's mind*/ /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/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/jumptomapelement, /*allows us to jump to a specific vault*/ /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_local_narrate, /*send text locally to all players in view, similar to direct narrate*/ /client/proc/cmd_admin_world_narrate, /*sends text to all players with no padding*/ /client/proc/cmd_admin_create_centcom_report, /client/proc/check_ai_laws, /*shows AI and borg laws*/ /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*/ /client/proc/secrets, /client/proc/shuttle_magic, /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*/ /client/proc/game_panel, /*game panel, allows to change game-mode etc*/ /client/proc/cmd_admin_say, /*admin-only ooc chat*/ /datum/admins/proc/PlayerNotes, /client/proc/cmd_mod_say, /client/proc/cmd_mod_window, /datum/admins/proc/show_player_info, /client/proc/free_slot, /*frees slot for chosen job*/ /client/proc/cmd_admin_change_custom_event, /client/proc/cmd_admin_rejuvenate, /client/proc/check_customitem_activity, // /client/proc/man_up, // /client/proc/global_man_up, /client/proc/toggle_antagHUD_use, /client/proc/toggle_antagHUD_restrictions, /client/proc/allow_character_respawn, /* Allows a ghost to respawn */ /client/proc/watchdog_force_restart, /*forces restart using watchdog feature*/ /client/proc/manage_religions, /client/proc/credits_panel, /*allows you to customize the roundend credits before they happen*/ /client/proc/persistence_panel, /*lets you check out the kind of shit that will persist to the next round and say "holy fuck no"*/ /client/proc/diseases_panel, /client/proc/artifacts_panel, /client/proc/body_archive_panel, /client/proc/climate_panel, /client/proc/admin_arena_panel, /client/proc/level_manager, /datum/admins/proc/ashInvokedEmotions, /*Ashes all paper from the invoke emotion spell. An emergency purge.*/ /client/proc/toggle_admin_examine, /client/proc/beasts_panel, /* Lists all forgotten beasts generated, along with their characteristics */ /client/proc/show_heatmaps, /datum/admins/proc/procedural_generation_panel ) 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( /datum/admins/proc/media_stop_all, /client/proc/object_talk, /client/proc/cmd_admin_gib_self, /client/proc/drop_bomb, /client/proc/drop_emp, /client/proc/cinematic, /client/proc/one_click_antag, //client/proc/antag_madness, /datum/admins/proc/toggle_aliens, // FUUUUCKED /client/proc/zombie_event, // ZOMBB-B-BIES /client/proc/cmd_admin_add_freeform_ai_law, /client/proc/cmd_admin_add_random_ai_law, /client/proc/toggle_random_events, /client/proc/set_ooc, /client/proc/editappear, /client/proc/commandname, /client/proc/delete_all_adminbus, /client/proc/delete_all_bomberman, /client/proc/create_bomberman_arena, /client/proc/control_bomberman_arena, /client/proc/gib_money, // /vg/ /client/proc/smissmas, /client/proc/achievement, /client/proc/makepAI, /client/proc/set_blob_looks, /client/proc/set_teleport_pref, /client/proc/deadchat_singularity, /client/proc/view_all_rods, /client/proc/add_centcomm_order, /client/proc/apes, /client/proc/force_next_map, /client/proc/rig_crew_score, ) var/list/admin_verbs_spawn = list( /datum/admins/proc/spawn_atom, // Allows us to spawn instances /client/proc/spawn_datum, //Allows us to spawn datums to the marked datum buffer /client/proc/respawn_character, //Allows us to re-spawn someone /client/proc/debug_reagents, //Allows us to spawn reagents in mobs/containers /client/proc/create_awaymission, //Allows us to summon away missions /client/proc/create_map_element, /client/proc/cmd_admin_equip_loadout //Allows us to equip sets of items to mobs ) var/list/admin_verbs_server = list( /client/proc/Set_Holiday, /datum/admins/proc/startnow, /datum/admins/proc/restart, /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, /client/proc/toggle_random_events, /client/proc/check_customitem_activity, /client/proc/dump_chemreactions, /client/proc/save_coordinates, /datum/admins/proc/mass_delete_in_zone, /client/proc/hub_panel, ) var/list/admin_verbs_debug = list( /client/proc/gc_dump_hdl, /client/proc/cmd_admin_list_open_jobs, /proc/getbrokeninhands, /client/proc/Debug2, /client/proc/cmd_debug_make_powernets, /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/reload_admins, /client/proc/restart_controller, /client/proc/enable_debug_verbs, /client/proc/callproc, /client/proc/cmd_admin_dump_machine_type_list, // /vg/ /client/proc/disable_bloodvirii, // /vg /client/proc/reload_style_sheet, /client/proc/reset_style_sheet, /client/proc/test_movable_UI, /client/proc/test_snap_UI, /client/proc/configFood, ///client/proc/configThermDiss, /client/proc/configHat, /client/proc/cmd_dectalk, /client/proc/debug_reagents, /client/proc/create_awaymission, /client/proc/make_invulnerable, /client/proc/send_to_heck, /client/proc/cmd_admin_dump_delprofile, /client/proc/mob_list, /client/proc/cure_disease, /client/proc/check_bomb, /client/proc/check_convertables, /client/proc/toggle_convertibles, /client/proc/check_spiral, /client/proc/check_multi_z_spiral, /client/proc/check_striketeams, /client/proc/cmd_admin_find_bad_blood_tracks, /client/proc/debugNatureMapGenerator, /client/proc/callatomproc, /client/proc/view_runtimes, /client/proc/cmd_mass_modify_object_variables, /client/proc/emergency_shuttle_panel, /client/proc/bee_count, /client/proc/set_procizine_call, /client/proc/set_procizine_properties, /client/proc/check_for_unconnected_atmos, #if UNIT_TESTS_ENABLED /client/proc/unit_test_panel, #endif /client/proc/update_all_open_spaces, /client/proc/update_all_area_portals, /client/proc/spam_blend_calls, /client/proc/edit_motd, ) var/list/admin_verbs_possess = list( /client/proc/possess ) var/list/admin_verbs_permissions = list( /client/proc/edit_admin_permissions ) var/list/admin_verbs_rejuv = list( /client/proc/respawn_character ) var/list/admin_verbs_polling = list( /client/proc/create_poll ) //verbs which can be hidden - needs work var/list/admin_verbs_hideable = list( /client/proc/set_ooc, /client/proc/deadmin_self, /datum/admins/proc/show_role_panel, /datum/admins/proc/toggleenter, /datum/admins/proc/toggleguests, /datum/admins/proc/announce, /client/proc/colorooc, /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/play_local_sound, /client/proc/play_sound, /client/proc/object_talk, /client/proc/cmd_admin_gib_self, /client/proc/drop_bomb, /client/proc/drop_emp, /client/proc/cinematic, /datum/admins/proc/toggle_aliens, /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/toggle_random_events, /client/proc/cmd_admin_add_random_ai_law, /client/proc/Set_Holiday, /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, /client/proc/shuttle_magic, /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/cmd_debug_make_powernets, /client/proc/debug_controller, /client/proc/startSinglo, /client/proc/cheat_power, /client/proc/setup_atmos, /client/proc/cmd_debug_mob_lists, /client/proc/cmd_debug_del_all, /client/proc/cmd_debug_tog_aliens, /client/proc/enable_debug_verbs, /client/proc/mob_list, /client/proc/possess, /client/proc/gc_dump_hdl, /client/proc/create_map_element ) var/list/admin_verbs_mod = list( /client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/ /client/proc/cmd_admin_pm_panel, /*admin-pm list*/ /client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game.*/ /datum/admins/proc/PlayerNotes, /client/proc/cmd_mod_say, /client/proc/cmd_mod_window, /datum/admins/proc/show_player_info, /client/proc/player_panel_new, /client/proc/vv_marked_datum, /datum/admins/proc/view_mob_attack_log /* Allow you to view attack logs since doing it in VV sucks */ ) /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_POLLING) verbs += admin_verbs_polling if(holder.rights & R_STEALTH) verbs += /client/proc/stealth if(holder.rights & R_REJUVENATE) verbs += admin_verbs_rejuv if(holder.rights & R_SOUNDS) verbs += admin_verbs_sounds if(holder.rights & R_SPAWN) verbs += admin_verbs_spawn if(holder.rights & R_MOD) verbs += admin_verbs_mod if(holder.rights & R_ADMINBUS) verbs += /client/proc/secrets if (isobserver(mob)) mob.verbs |= /mob/dead/observer/verb/toggle_antagHUD /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, admin_verbs_polling, /client/proc/stealth, admin_verbs_rejuv, admin_verbs_sounds, admin_verbs_spawn, admin_verbs_mod, /*Debug verbs added by "show debug verbs"*/ /client/proc/Cell, /client/proc/pdiff, /client/proc/camera_view, /client/proc/sec_camera_report, /client/proc/intercom_view, /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/startSinglo, /client/proc/cheat_power, /client/proc/setup_atmos, /client/proc/ticklag, /client/proc/cmd_admin_grantfullaccess, /client/proc/splash, /client/proc/cmd_admin_areatest, /client/proc/readmin, ///proc/generateMiniMaps, /client/proc/maprender, /client/proc/cmd_admin_rejuvenate, /datum/admins/proc/show_role_panel, /client/proc/print_jobban_old, /client/proc/print_jobban_old_filter, /client/proc/forceEvent, ///client/proc/break_all_air_groups, ///client/proc/regroup_all_air_groups, ///client/proc/kill_pipe_processing, ///client/proc/kill_air_processing, ///client/proc/disable_communication, ///client/proc/disable_movement, /client/proc/Zone_Info, /client/proc/Test_ZAS_Connection, /client/proc/SDQL2_query, /client/proc/check_sim_unsim, /client/proc/start_line_profiling, /client/proc/stop_line_profiling, /client/proc/show_line_profiling, /client/proc/check_wires, #if UNIT_TESTS_ENABLED /client/proc/unit_test_panel, #endif /client/proc/check_pipes ) if (isobserver(mob)) mob.verbs -= /mob/dead/observer/verb/toggle_antagHUD /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 to_chat(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 to_chat(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() to_chat(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/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) to_chat(mob, "<span class='danger'>Invisimin off. Invisibility reset.</span>") mob.icon_state = "ghost" mob.icon = 'icons/mob/human.dmi' mob.update_icons() else mob.invisibility = INVISIBILITY_OBSERVER to_chat(mob, "<span class='notice'><b>Invisimin on. You are now as invisible as a ghost.</b></span>") mob.icon_state = "ghost" mob.icon = 'icons/mob/mob.dmi' /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) var/datum/preference_setting/ooc_color = prefs.get_pref_datum(/datum/preference_setting/string/ooc_color) ooc_color.setting = new_ooccolor prefs.save_preferences_sqlite(src, ckey) 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 90 /client/proc/warn(warned_ckey) var/reason = "Autobanning due to too many formal warnings" if(!check_rights(R_ADMIN)) return if(!warned_ckey || !istext(warned_ckey)) return var/datum/preferences/D var/client/C = directory[warned_ckey] if(C) D = C.prefs else D = preferences_datums[warned_ckey] if(!D) to_chat(src, "<span class='red'>Error: warn(): No such ckey found.</span>") return var/warn_reason = input("Reason for warning?", "Admin abuuuuuuuse") as null|text if(!warn_reason) return holder.notes_add(warned_ckey, warn_reason) var/datum/preference_setting/warns = D.get_pref_datum(/datum/preference_setting/numerical/warns) if(++warns.setting >= MAX_WARNS) //uh ohhhh...you'reee iiiiin trouuuubble O:) var/bantime = AUTOBANTIME//= (++D.warnbans * AUTOBANTIME) warns.setting = 0 var/datum/preference_setting/warnbans = D.get_pref_datum(/datum/preference_setting/numerical/warnbans) ++warnbans.setting for(var/i = 1; i < warnbans.setting; i++) bantime *= 2 ban_unban_log_save("[ckey] warned [warned_ckey] - [warn_reason], resulting in a [bantime] minute autoban.") if(C) message_admins("[key_name_admin(src)] has warned [key_name_admin(C)] - [warn_reason], resulting in a [bantime] minute ban.") to_chat(C, "<span class='danger'><BIG>You have been autobanned due to a warning by [ckey] - Reason: [warn_reason].</BIG></span><br>This is a temporary ban, it will be removed in [bantime] minutes.") else message_admins("[key_name_admin(src)] has warned [warned_ckey] - [warn_reason], resulting in a [bantime] minute ban.") AddBan(warned_ckey, D.last_id, "Autobanning due to too many formal warnings - [warn_reason]", ckey, 1, bantime) holder.DB_ban_record(BANTYPE_TEMP, null, bantime, "[reason] - [warn_reason]", , ,warned_ckey) feedback_inc("ban_warn",1) D.save_preferences_sqlite(C, C.ckey) del(C) else var/warnbans = D.get_pref(/datum/preference_setting/numerical/warnbans) if(C) to_chat(C, "<span class='danger'><BIG>You have been formally warned by an administrator - Reason: [warn_reason].</span></BIG><br>Further warnings will result in an autoban.</font>") message_admins("[key_name_admin(src)] has warned [key_name_admin(C)] - [warn_reason]. They have [MAX_WARNS-warnbans] strikes remaining. And have been warn banned [warnbans] [warnbans == 1 ? "time" : "times"]") else message_admins("[key_name_admin(src)] has warned [warned_ckey] (DC) - [warn_reason]. They have [MAX_WARNS-warnbans] strikes remaining. And have been warn banned [warnbans] [warnbans == 1 ? "time" : "times"]") var/datum/preference_setting/show_warning_next_time = D.get_pref_datum(/datum/preference_setting/toggle/show_warning_next_time) show_warning_next_time.setting = 1 var/datum/preference_setting/last_warned_message = D.get_pref_datum(/datum/preference_setting/string/last_warned_message) last_warned_message.setting = warn_reason var/datum/preference_setting/warning_admin = D.get_pref_datum(/datum/preference_setting/string/last_warned_message) warning_admin.setting = ckey D.save_preferences_sqlite(C, warned_ckey) feedback_add_details("admin_verb","WARN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/unwarn(warned_ckey) if(!check_rights(R_ADMIN)) return if(!warned_ckey || !istext(warned_ckey)) return /*if(warned_ckey in admin_datums) to_chat(usr, "<span class='red'>Error: warn(): You can't warn admins.</span>") return*/ var/datum/preferences/D var/client/C = directory[warned_ckey] if(C) D = C.prefs else D = preferences_datums[warned_ckey] if(!D) to_chat(src, "<span class='red'>Error: unwarn(): No such ckey found.</span>") return if(D.get_pref(/datum/preference_setting/numerical/warns) == 0) to_chat(src, "<span class='red'>Error: unwarn(): You can't unwarn someone with 0 warnings, you big dummy.</span>") return var/datum/preference_setting/warns = D.get_pref_datum(/datum/preference_setting/numerical/warns) warns.setting-=1 var/strikesleft = MAX_WARNS-warns.setting if(C) to_chat(C, "<span class='red'><BIG><B>One of your warnings has been removed.</B></BIG><br>You currently have [strikesleft] strike\s left</span>") message_admins("[key_name_admin(src)] has unwarned [key_name_admin(C)]. They have [strikesleft] strike(s) remaining, and have been warn banned [D.get_pref(/datum/preference_setting/numerical/warnbans)] [D.get_pref(/datum/preference_setting/numerical/warnbans) == 1 ? "time" : "times"]") else message_admins("[key_name_admin(src)] has unwarned [warned_ckey] (DC). They have [strikesleft] strike(s) remaining, and have been warn banned [D.get_pref(/datum/preference_setting/numerical/warnbans)] [D.get_pref(/datum/preference_setting/numerical/warnbans) == 1 ? "time" : "times"]") D.save_preferences_sqlite(C, C.ckey) feedback_add_details("admin_verb","UNWARN") //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 (1,3,4)", "Medium Bomb (3,7,14)", "Big Bomb (7,14,28)", "Custom Bomb") var/choice = input("What size explosion would you like to produce?") as null|anything in choices switch(choice) if(null) return 0 if("Small Bomb (1,3,4)") explosion(epicenter, 1, 3, 4, 4, whodunnit = usr) if("Medium Bomb (3,7,14)") explosion(epicenter, 3, 7, 14, 14, whodunnit = usr) if("Big Bomb (7,14,28)") explosion(epicenter, 7, 14, 28, 28, whodunnit = usr) 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 if(devastation_range > 299 || heavy_impact_range > 299 || light_impact_range > 299) if(alert(usr, "THIS EXPLOSION MAY CRASH THE SERVER, ARE YOU REALLY SURE?", "DANGER ZONE", "Yes", "No") == "No") return 0; log_admin("[key_name_admin(src)] decided to set off a potentially server-crashing bomb despite the warning.") message_admins("<span class='warning'>[key_name_admin(src)] decided to set off a potentially server-crashing bomb despite the warning.</span>") else if (devastation_range > 149 || heavy_impact_range > 149 || light_impact_range > 149) if(alert(usr, "This explosion is likely to cause significant server lag, continue anyway?", "Lag Warning", "Yes", "No") == "No") return 0; log_admin("[key_name_admin(src)] decided to set off a potentially server-lagging bomb despite the warning.") message_admins("<span class='warning'>[key_name_admin(src)] decided to set off a potentially server-lagging bomb despite the warning.</span>") explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, whodunnit = usr) log_admin("[key_name(usr)] creating an admin explosion at [epicenter.loc] ([epicenter.x],[epicenter.y],[epicenter.z]).") message_admins("<span class='notice'>[key_name_admin(src)] creating an admin explosion at [epicenter.loc] ([epicenter.x],[epicenter.y],[epicenter.z]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[epicenter.x];Y=[epicenter.y];Z=[epicenter.z]'>JMP</A>).</span>") feedback_add_details("admin_verb","DB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/drop_emp() set category = "Special Verbs" set name = "Drop EMP" set desc = "Cause an EMP of varying strength at your location." var/turf/epicenter = mob.loc var/list/choices = list("Small EMP (1,2)", "Medium EMP (2,4)", "Big EMP (4,8)", "Custom EMP") var/choice = input("What size EMP would you like to produce?") as null|anything in choices switch(choice) if(null) return 0 if("Small EMP (1,2)") empulse(epicenter, 1, 2) if("Medium EMP (2,4)") empulse(epicenter, 2, 4) if("Big EMP (4,8)") empulse(epicenter, 4, 8) if("Custom EMP") var/heavy_impact_range = input("Heavy impact range (in tiles):") as num var/light_impact_range = input("Light impact range (in tiles):") as num empulse(epicenter, heavy_impact_range, light_impact_range) log_admin("[key_name(usr)] creating an admin EMP at [epicenter.loc] ([epicenter.x],[epicenter.y],[epicenter.z]).") message_admins("<span class='notice'>[key_name_admin(src)] creating an admin EMP at [epicenter.loc] ([epicenter.x],[epicenter.y],[epicenter.z]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[epicenter.x];Y=[epicenter.y];Z=[epicenter.z]'>JMP</A>).</span>") feedback_add_details("admin_verb","DE") //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/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in spells if(!S) return T.add_spell(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("<span class='notice'>[key_name_admin(usr)] gave [key_name(T)] the spell [S].</span>", 1) /client/proc/toggle_invisible(mob/T as mob in mob_list) set category = "Fun" set name = "Toggle invisiblity" set desc = "Make a mob completely invisible." if (T.alphas["admin_invis"] == 0) T.forced_density = 0 T.alphas -= "admin_invis" else T.alphas["admin_invis"] = 0 T.density = 0 T.forced_density = 1 to_chat(T, "<span class='notice'>Admin [key_name_admin(usr)] toggled your invisiblity.</span>") feedback_add_details("admin_verb","MI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! log_admin("[key_name(usr)] toggled [key_name(T)] invisibility.") message_admins("<span class='notice'>[key_name_admin(usr)] toggled [key_name(T)] invisibility.</span>", 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("<span class='notice'>[key_name_admin(usr)] gave [key_name(T)] the disease [D].</span>", 1) /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/obj/O in world) // -- TLE set category = "Special Verbs" set name = "OSay" set desc = "Make an object say something" var/message = input(usr, "What do you want the message to be?", "Make Sound") as text | null if(!message) return var/mob/living/M var/olduniv if(ismob(O)) M = O olduniv = M.universal_speak M.universal_speak = 1 O.say(message) if(M) M.universal_speak = olduniv log_admin("[key_name(usr)] made [O] at [O.x], [O.y], [O.z] say \"[message]\"") message_admins("<span class='adminnotice'>[key_name_admin(usr)] made [O] at [O.x], [O.y], [O.z]. say \"[message]\"</span>", 1) feedback_add_details("admin_verb","OT") //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("Are you sure you want to deadmin?","Deadmin","Yes","No")=="No") return log_admin("[src] deadminned themself.") message_admins("[src] deadminned themself.") if (ticker && ticker.current_state == GAME_STATE_PLAYING) //Only report this stuff if we are currently playing. var/admins_number = admins.len var/admin_number_afk = get_afk_admins() var/available_admins = admins_number - admin_number_afk if(available_admins == 0) // Apparently the admin logging out is no longer an admin at this point, so we have to check this towards 0 and not towards 1. Awell. send2adminirc("[key_name(src, showantag = FALSE)] deadminned themself - no more non-AFK admins online. - [admin_number_afk] AFK.") send2admindiscord("[key_name(src, showantag = FALSE)] deadminned themself. **No more non-AFK admins online.** - **[admin_number_afk]** AFK", TRUE) deadmin() winset(src, null, list("browser-options"="-devtools")) verbs += /client/proc/readmin deadmins += ckey to_chat(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 to_chat(src, "<b>Stopped logging hrefs</b>") else config.log_hrefs = 1 to_chat(src, "<b>Started logging hrefs</b>") /client/proc/hub_panel() set name = "Hub Panel" set category = "Server" if(holder) holder.HubPanel() feedback_add_details("admin_verb","HP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return /client/proc/check_ai_laws() set name = "Check AI Laws" set category = "Admin" if(holder) log_admin("[key_name(usr)] checked silicon laws.") src.holder.output_ai_laws() /client/proc/editappear(mob/living/carbon/human/M as mob in mob_list) set name = "Edit Appearance" set category = "Fun" if(!check_rights(R_FUN)) return if(!istype(M, /mob/living/carbon/human)) to_chat(usr, "<span class='warning'>You can only do this to humans!</span>") return switch(alert("Are you sure you wish to edit this mob's appearance? Skrell, Unathi, Vox and Tajaran can result in unintended consequences.",,"Yes","No")) if("No") return M.pick_gender(usr) M.pick_appearance(usr) /client/proc/playernotes() set name = "Show Player Notes" set category = "Admin" if(holder) holder.PlayerNotes() return /client/proc/free_slot() set name = "Free Job Slot" set category = "Admin" if(holder) var/list/jobs = list() for (var/datum/job/J in job_master.occupations) if (J.current_positions >= J.get_total_positions()) jobs += J.title if (!jobs.len) to_chat(usr, "There are no fully staffed jobs.") return var/job = input("Please select job slot to free", "Free job slot") as null|anything in jobs if (job) job_master.FreeRole(job, usr) return /client/proc/commandname() set name = "Set Command Name" set category = "Fun" var/text = input(usr,"Please select a new Central Command name.", null)as text|null if(text) change_command_name(text) /client/proc/man_up(mob/T as mob in mob_list) set category = "Fun" set name = "Man Up" set desc = "Tells mob to man up and deal with it." to_chat(T, "<span class='notice'><b><font size=3>Man up and deal with it.</font></b></span>") to_chat(T, "<span class='notice'>Move on.</span>") log_admin("[key_name(usr)] told [key_name(T)] to man up and deal with it.") message_admins("<span class='notice'>[key_name_admin(usr)] told [key_name(T)] to man up and deal with it.</span>", 1) /client/proc/readmin() set name = "Re-admin self" set category = "Admin" set desc = "Regain your admin powers." var/datum/admins/D = admin_datums[ckey] if(config.admin_legacy_system) var/list/lines = file2list("config/admins.txt") for(var/line in lines) // if the line doesn't begin with our ckey we don't care if(findtext(ckey(line), ckey) != 1) continue //Split the line at every "-" var/list/List = splittext(line, "-") if(!List.len) continue //rank follows the first "-" var/rank = "" if(List.len >= 2) rank = ckeyEx(List[2]) //load permissions associated with this rank var/rights = admin_ranks[rank] //create the admin datum and store it for later use D = new /datum/admins(rank, rights, ckey) //associate them with the new admin datum D.associate(src) if(D.rights & (R_DEBUG|R_SERVER)) // Grant profile/reboot access world.SetConfig("APP/admin", ckey, "role=admin") else if(!SSdbcore.IsConnected()) message_admins("Warning, mysql database is not connected.") to_chat(src, "Warning, mysql database is not connected.") return if(D) to_chat(src, "You are already an admin.") verbs -= /client/proc/readmin return var/datum/DBQuery/query = SSdbcore.NewQuery("SELECT `ckey`, `rank`, `level`, `flags` FROM erro_admin WHERE `ckey` = :ckey", list("ckey" = ckey)) if(!query.Execute()) log_sql("Error: [query.ErrorMsg()]") qdel(query) return while(query.NextRow()) var/dckey = query.item[1] var/rank = query.item[2] if(rank == "Removed") continue //This person was de-adminned. They are only in the admin list for archive purposes. var/rights = query.item[4] if(istext(rights)) rights = text2num(rights) D = new /datum/admins(rank, rights, dckey) //find the client for a ckey if they are connected and associate them with the new admin datum D.associate(src) message_admins("[src] re-adminned themselves.") log_admin("[src] re-adminned themselves.") feedback_add_details("admin_verb","RAS") verbs -= /client/proc/readmin qdel(query) return /client/proc/achievement() set name = "Give Achievement" set category = "Fun" if(!check_rights(R_FUN)) return var/achoice = "Cancel" if(!player_list.len) to_chat(usr, "player list is empty!") return var/list/winners = list() for (var/mob/M in player_list) winners["[M.real_name] ([M.key])"] = M var/choice = input("Who's a winner?", "Achievement Winner", null) as null|anything in winners if(!choice) return var/mob/winner = winners[choice] var/name = input("What will you call your achievement?", "Achievement Winner", "New Achievement", null) as null|text if(!name) return var/desc = input("What description will you give it?", "Achievement Description", "You Win", null) as null|text if(!desc) return if(istype(winner, /mob/living)) achoice = alert("Are you sure you want to give them an award?","Achievement award", "Confirm", "Cancel") if(achoice == "Cancel") return var/glob = alert("Announce the achievement globally? (Beware! Ruins immersion!)", "Announce To All Players", "No!","Yes!") var/obj/item/award achoice = alert("What award should they be given?","Award choice","Gold medal","Gold cup","Dunce cap") if(achoice == "Gold cup") award = /obj/item/weapon/reagent_containers/food/drinks/golden_cup if(achoice == "Gold medal") award = /obj/item/clothing/accessory/medal/gold if(achoice == "Dunce cap") award = /obj/item/clothing/head/dunce_cap give_award(winner, award, name, desc, glob == "No!" ? FALSE : TRUE) message_admins("[key_name_admin(usr)] has awarded <b>[winner.key]</b>([winner.name]) with the achievement \"<b>[name]</b>\"! \"[desc]\".", 1) // winner can be a mob or a ckey /proc/give_award(mob_or_ckey, award_path, name, desc, announce = TRUE) ASSERT(!isnull(mob_or_ckey)) var/mob/living/carbon/winner = istext(mob_or_ckey) ? get_mob_by_key(mob_or_ckey) : mob_or_ckey if(!winner) log_debug("Something tried to give an award to a non existing player!") return var/obj/award if(!award_path) award = new /obj/item/weapon/reagent_containers/food/drinks/golden_cup() else award = new award_path() award.name = name award.desc = desc if(iscarbon(winner) && (winner.stat == CONSCIOUS)) winner.put_in_hands(award) if(!announce) winner.client << sound('sound/misc/achievement.ogg', volume=35) for(var/mob/dead/observer/O in player_list) to_chat(O, "<span class='danger'>[bicon(award)] Attention all ghosts, <b>[winner.name]</b> wins \"<b>[name]</b>\"!</span>") else world << sound('sound/misc/achievement.ogg', volume=35) to_chat(world, "<span class='danger'>[bicon(award)] <b>[winner.name]</b> wins \"<b>[name]</b>\"!</span>") to_chat(winner, "<span class='danger'>[bicon(award)] Congratulations to you, <b>[winner.name]</b>! You have won \"<b>[name]</b>\"!</span>") var/datum/achievement = new /datum/achievement(award, winner.key, winner.name, name, desc) ticker.achievements.Add(achievement) /client/proc/shuttle_magic() set name = "Shuttle Magic" set desc = "Open a menu with magic" set category = "Admin" if(!holder || !config) return holder.shuttle_magic() /client/proc/set_blob_looks() set name = "Set Blob Looks" set category = "Fun" var/to_choose_from = list("ADMINBUS (custom DMI upload)") to_choose_from += blob_looks_admin var/chosen = input("This will change the looks of every blob currently in the world.", "Blob Looks", blob_looks_admin[1]) as null|anything in to_choose_from if(!chosen) return if(chosen == "ADMINBUS (custom DMI upload)") adminblob_icon = input("Pick Icon:","Icon") as icon if(!adminblob_icon) return adminblob_size = text2num(alert("Which size are those icons?","","64","32")) if((adminblob_size == 64) && (alert("Do you want to use a custom Pulse soundfile?","","Yes","No") == "Yes")) adminblob_beat = input("Pick Soundfile (DO NOT USE AN OVERLY LONG SOUNDFILE UNLESS YOU ARE READY TO FACE THE CONSEQUENCES):","(DO NOT USE AN OVERLY LONG SOUNDFILE UNLESS YOU ARE READY TO FACE THE CONSEQUENCES)") as file else adminblob_beat = 'sound/effects/blob_pulse.ogg' blob_looks_admin["adminbus"] = adminblob_size chosen = "adminbus" else adminblob_icon = null for(var/obj/effect/blob/B in blobs) B.looks = chosen B.update_looks(1) log_admin("[key_name(src)] set all blobs to use the \"[chosen]\" look.") message_admins("<span class='notice'>[key_name_admin(src)] set all blobs to use the \"[chosen]\" look.</span>") /datum/admins/proc/media_stop_all() set name = "Stop all Media" set desc = "Stops all music, video and admin sounds." set category = "Fun" if(!check_rights(R_FUN)) return message_admins("[key_name_admin(usr)] has stopped all media.", 1) stop_all_media() var/list/fax_presets = list( "Centcomm" = {"<!DOCTYPE html> <html> <body style="background-color:darkblue;"> <h1><center><font color="white">NANOTRASEN CENTRAL COMMAND</font></center></h1> <center><img src="http://ss13.moe/wiki/images/1/17/NanoTrasen_Logo.png"></center> <p><center><font color="white">\[MESSAGE BODY GOES HERE\]</center></font></p> <p><center><font color="white">\[MESSAGE BODY GOES HERE\]</center></font></p> </body> </html>"}, "Internal Affairs" = {"<html><style>body {color: #000000; background: #ccffff;} h1 {color: #000000; font-size:30px;} fieldset {width:140px;} </style><body><center><img src="http://ss13.moe/wiki/images/1/17/NanoTrasen_Logo.png"> <h1>ATTN: Internal Affairs</h1></center><BR> \[MESSAGE BODY GOES HERE\] <BR><BR><I>Central Command</I> </body></html>"}, "Blank" = "" ) /client/proc/SendCentcommFax() set category = "Fun" set name = "Send Fax" set desc = "Sends a fax to all fax machines." var/preset = input(src,"Which preset to use?","Preset formatting") as null|anything in fax_presets var/sent = input(src, "Please enter a message send via secure connection. NOTE: BBCode does not work, but HTML tags do! Use <br> for line breaks.", "Outgoing message from Centcomm", fax_presets[preset]) as message|null if(!sent) return var/sentname = input(src, "Pick a title for the report", "Title") as text|null SendFax(sent, sentname, centcomm = 1) log_admin("[key_name(src)] sent a fax to all machines.: [sent]") message_admins("[key_name_admin(src)] sent a fax to all machines.", 1) /client/proc/create_map_element() set category = "Admin" set name = "Load Map Element" set desc = "Loads a map element - a vault, an away mission or something else." if(!check_rights(R_SPAWN)) return var/datum/map_element/ME var/mission_to_load = alert(usr, "How do you want to select the map element?", "Map element loading", "Choose a /datum/map_element object", "Load external .dmm file", "Cancel") switch(mission_to_load) if("Choose a /datum/map_element object") var/element_type = input("Specify a map element type. Periods exclude subtypes.", "Map element type") as text var/new_map_element = filter_typelist_input("Please select the map element object.", "Map element loading", get_matching_types(element_type,/datum/map_element)) if(!new_map_element) return ME = new new_map_element log_admin("[key_name(src)] is trying to load [ME.file_path].") if("Load external .dmm file") to_chat(src, "<span class='danger'>Do not load very large maps or files that aren't BYOND maps. If you want to be sure that your map won't hang up the game, try loading it on a local server first.</span>") ME = new /datum/map_element log_admin("[key_name(src)] is trying to load an external map file.") var/new_file_path = input(usr, "Select a .dmm file. WARNING: Very large map files WILL crash the server. Loading them is punishable by death.", "Map element loading") as null|file if(!new_file_path) return log_admin("[key_name(src)] has selected [new_file_path] for loading.") ME.file_path = new_file_path else return var/x_coord var/y_coord var/z_coord #define ML_CURRENT_LOC "Use my current location" #define ML_INPUT_COORDS "Input coordinates" #define ML_LOAD_TO_NEWV "Create a new Virtual Z-level" var/static/list/choices = list( ML_CURRENT_LOC, ML_INPUT_COORDS, ML_LOAD_TO_NEWV ) var/dungeoning = FALSE var/using_vz = FALSE switch(input(usr, "Select a location for the new map element", "Map element loading") as null|anything in choices) if(ML_CURRENT_LOC) var/turf/new_location = get_turf(usr) if(!new_location) return x_coord = new_location.x y_coord = new_location.y z_coord = new_location.z if(ML_INPUT_COORDS) x_coord = input(usr, "Input the X coordinate: ", "Map element loading") as null|num if(x_coord == null) return y_coord = input(usr, "Input the Y coordinate (X = [x_coord]): ", "Map element loading") as null|num if(y_coord == null) return z_coord = input(usr, "Input the Z coordinate. If it's higher than [world.maxz], a new Z-level will be created (X = [x_coord], Y = [y_coord]): ", "Map element loading") as null|num if(z_coord == null) return x_coord = clamp(x_coord, 1, world.maxx) y_coord = clamp(y_coord, 1, world.maxy) if(ML_LOAD_TO_NEWV) dungeoning = TRUE var/rotate = input(usr, "Set the rotation offset: (0, 90, 180 or 270) ", "Map element loading", "0") as null|num if(rotate == null) return var/overwrite = FALSE if(!dungeoning) overwrite = alert("Overwrite original objects in area?","Map element loading","Yes","No") == "Yes" var/clipmin_x = 0 var/clipmax_x = INFINITY var/clipmin_y = 0 var/clipmax_y = INFINITY var/clipmin_z = 0 var/clipmax_z = INFINITY var/rotatetext = rotate ? " rotated by [rotate] degrees" : "" if(!using_vz) if(alert("Clip map to bounds?","Map element loading","Yes","No") == "Yes") clipmin_x = input(usr, "Minimum X to clip at", "Map element loading", "1") as null|num if(clipmin_x == null) return clipmax_x = input(usr, "Maximum X to clip at", "Map element loading", "[world.maxx]") as null|num if(clipmax_x == null) return clipmin_y = input(usr, "Minimum Y to clip at", "Map element loading", "1") as null|num if(clipmin_y == null) return clipmax_y = input(usr, "Maximum Y to clip at", "Map element loading", "[world.maxy]") as null|num if(clipmax_y == null) return clipmin_z = input(usr, "Minimum Z to clip at", "Map element loading", "1") as null|num if(clipmin_z == null) return clipmax_z = input(usr, "Maximum Z to clip at", "Map element loading", "[world.maxz]") as null|num if(clipmax_z == null) return log_admin("[key_name(src)] is loading [ME.file_path] at [x_coord], [y_coord], [z_coord][rotatetext].") message_admins("[key_name_admin(src)] is loading [ME.file_path] at [x_coord], [y_coord], [z_coord][rotatetext].") if(dungeoning) load_dungeon(ME, rotate) else //Reduce X and Y by 1 because these arguments are actually offsets, and they're added to 1;1 in the map loader. Without this, spawning something at 1;1 would result in it getting spawned at 2;2 ME.load(x_coord - 1, y_coord - 1, z_coord, rotate, overwrite, TRUE, clipmin_x, clipmax_x, clipmin_y, clipmax_y, clipmin_z, clipmax_z) message_admins("[ME.file_path] loaded at [ME.location ? formatJumpTo(ME.location) : "[x_coord], [y_coord], [z_coord]"][rotatetext].") else var/datum/virtual_z/vz = map.addMapElementVLevel(ME, buffer_size = 0) message_admins("[ME.file_path] loaded at [ME.location ? formatJumpTo(ME.location) : "virtual z-level [vz.id], "][rotatetext].") /client/proc/create_awaymission() set category = "Admin" set name = "Create Away Mission" set desc = "Creates an away mission and links it to the station's gateway." //Check admin rights if(!check_rights(R_SPAWN)) return var/list/L = getRandomZlevels(1) var/list/choices = list() if(!L.len) to_chat(src, "No away missions found.") return to_chat(src, "<span class='danger'>WARNING: Loading large away missions may temporarily hang up the server. Usually the lag will last for less than a minute.</span><hr>") for(var/datum/map_element/away_mission/AM in L) if(AM.name) choices[AM.name] = AM else choices[AM.file_path] = AM to_chat(src, "<b>[(AM.name ? AM.name : AM.file_path)]</b> - <span class='info'>[(AM.desc ? AM.desc : "No description")]</span>") var/choice = input(src, "Select an away mission to load. See chat for descriptions!", "AWAY MISSIONS") as null|anything in choices if(!choice) return log_admin("[key_name(src)] is loading an away mission: [choice]") message_admins("[key_name_admin(src)] is loading an away mission: [choice]", 1) var/datum/map_element/away_mission/AM = choices[choice] var/override = 0 if(existing_away_missions.len) var/continue_loading = alert(src, "There is already an away mission loaded. Do you want to load [AM.name] anyway? If there are more than two away mission gateways, the station gateway will be able to teleport its users to both of them.", "AWAY MISSIONS", "Yes", "No") if(!continue_loading) return if(continue_loading == "Yes") override = 1 to_chat(src, "Attempting to load [AM.name] ([AM.file_path])...") var/datum/virtual_z/vz = createRandomZlevel(override, AM, usr) to_chat(src, "The away mission has been generated on v-level [vz.id] [AM.location ? "([formatJumpTo(AM.location)])" : ""]") /client/proc/send_to_heck(var/mob/dead/observer/O in dead_mob_list) set name = "Send to hell" set desc = "Eternally damn this ghost for their sins." set category = "Fun" if(alert(usr, "Are you sure you want to do this?", "Confirm judgement", "Yes", "No") != "Yes") return var/mob/newmob = send_to_hedoublehockeysticks(O) if(newmob) log_admin("[ckey(key)]/([mob]) has damned [newmob] to HELL") message_admins("[ckey(key)]/([mob]) has damned [newmob] [formatJumpTo(newmob,"(JMP)")] to HELL") /proc/send_to_hedoublehockeysticks(mob/O) if(!O || !O.key) return if(!(/datum/map_element/dungeon/hell in existing_dungeons)) load_dungeon(/datum/map_element/dungeon/hell, 0, TRUE) var/datum/map_element/dungeon/hell/H = locate(/datum/map_element/dungeon/hell) in existing_dungeons var/list/turf/turfs = list() for(var/turf/T in H.spawned_atoms) if(!T.density) turfs += T if(!turfs.len) warning("No hell turfs to send a mob to!") return for(var/datum/body_archive/archive in body_archives) if(archive.key == O.key) var/mob/living/tempM = new archive.mob_type if(!istype(tempM)) warning("Body archive to send to hell was not a living mob!") break var/mob/living/M = tempM.actually_reset_body(archive = archive, our_mind = get_mind_by_key(O.key)) if(!istype(M)) warning("Body archive to send to hell was not a living mob!") break M.status_flags ^= BUDDHAMODE M.forceMove(pick(turfs)) qdel(tempM) qdel(O) return M var/datum/mind/mind = get_mind_by_key(O.key) if (mind) var/mob/living/carbon/human/prefM = new(pick(turfs)) prefM.status_flags ^= BUDDHAMODE prefM.quick_copy_prefs() mind.transfer_to(prefM) qdel(O) return prefM /client/proc/cmd_dectalk() set name = "Dectalk" set category = "Special Verbs" set desc = "Sends a message as voice to all players" set popup_menu = 0 if(!check_rights(R_DEBUG)) return 0 var/msg if (args && args.len > 0) msg = args[1] msg = input(src, "Sends a message as voice to all players", "Dectalk", msg) as null|message if (!msg) return 0 var/audio = dectalk(msg) if (audio && audio["audio"]) message_admins("[key_name(src)] has used the dectalk verb with message: [audio["message"]]") log_admin("[key_name(src)] has used the dectalk verb with message: [audio["message"]]") for (var/client/C in clients) var/trigger = src.key chatOutput.ehjax_send(C, "browseroutput", list("dectalk" = audio["audio"], "decTalkTrigger" = trigger)) return 1 else if (audio && audio["cooldown"]) alert(src, "There is a [nextDecTalkDelay] second global cooldown between uses of this verb. Please wait [((world.timeofday + nextDecTalkDelay * 10) - world.timeofday)/10] seconds.") src.cmd_dectalk(msg) return 0 else alert(src, "An external server error has occurred. Please report this.") return 0 /client/proc/credits_panel() set name = "Credits Panel" set category = "Admin" if(holder) holder.CreditsPanel() feedback_add_details("admin_verb","CP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return /client/proc/persistence_panel() set name = "Persistence Panel" set category = "Admin" if(holder) holder.PersistencePanel() feedback_add_details("admin_verb","PEP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return /client/proc/view_all_rods() set name = "VIEW-ALL-RODS" set category = "Fun" if(holder) holder.ViewAllRods() feedback_add_details("admin_verb","V-ROD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return /client/proc/toggle_admin_examine() set name = "Toggle Admin-only Descriptions" set category = "Admin" set desc = "See admin-only text for certain objects." if(holder) holder.admin_examine = !(holder.admin_examine) to_chat(usr, "<span class='notice'>You toggle [holder.admin_examine ? "on" : "off"] admin examining.") feedback_add_details("admin_verb","admin_examine") return /client/proc/beasts_panel() set name = "Megabeast Panel" set category = "Admin" if(holder) holder.beasts_panel() log_admin("[key_name(usr)] checked the Megabeast Panel.") feedback_add_details("admin_verb","BST") /client/proc/show_heatmaps() set name = "Show station heatmaps" set category = "Admin" var/dat = "" for(var/zrender in 1 to world.maxz) dat += string_heatmap(zrender) var/datum/browser/B = new /datum/browser/clean(usr, "heatmap", "Station heatmaps") B.set_content(dat) B.open() feedback_add_details("admin_verb","HMP")