Further logging/right check updates

This commit is contained in:
Markolie
2015-09-24 04:01:47 +02:00
parent fa0efbf983
commit fccac25c99
3 changed files with 225 additions and 233 deletions
+61 -62
View File
@@ -33,12 +33,9 @@ var/global/nologevent = 0
if(!M)
usr << "You seem to be selecting a mob that doesn't exist anymore."
return
if (!istype(src,/datum/admins))
src = usr.client.holder
if (!istype(src,/datum/admins))
usr << "Error: you are not an admin!"
if(!check_rights(R_ADMIN|R_MOD))
return
if(!check_rights(R_ADMIN|R_MOD)) return
var/body = "<html><head><title>Options for [M.key]</title></head>"
body += "<body>Options panel for <b>[M]</b>"
@@ -216,7 +213,7 @@ var/global/nologevent = 0
set category = "Admin"
set name = "Player Notes"
if(!check_rights(R_MOD))
if(!check_rights(R_MOD|R_ADMIN))
return
show_note()
@@ -225,7 +222,7 @@ var/global/nologevent = 0
set category = "Admin"
set name = "Show Player Notes"
if(!check_rights(R_MOD))
if(!check_rights(R_MOD|R_ADMIN))
return
show_note(key)
@@ -472,10 +469,9 @@ var/global/nologevent = 0
usr << browse(dat, "window=admincaster_main;size=400x600")
onclose(usr, "admincaster_main")
/datum/admins/proc/Jobbans()
if(!check_rights(R_BAN)) return
if(!check_rights(R_BAN))
return
var/dat = "<B>Job Bans!</B><HR><table>"
for(var/t in jobban_keylist)
@@ -487,7 +483,8 @@ var/global/nologevent = 0
usr << browse(dat, "window=ban;size=400x400")
/datum/admins/proc/Game()
if(!check_rights(0)) return
if(!check_rights(R_ADMIN))
return
var/dat = {"
<center><B>Game Panel</B></center><hr>\n
@@ -516,7 +513,8 @@ var/global/nologevent = 0
set name = "Restart"
set desc = "Restarts the world."
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_SERVER))
return
var/confirm = alert("Restart the game world?", "Restart", "Yes", "Cancel")
if(confirm == "Cancel")
@@ -539,7 +537,8 @@ var/global/nologevent = 0
set name = "Announce"
set desc="Announce your desires to the world"
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
var/message = input("Global message to send:", "Admin Announce", null, null) as message|null
if(message)
@@ -608,26 +607,21 @@ var/global/nologevent = 0
message_admins("[key_name_admin(usr)] toggled Dead OOC.", 1)
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/toggletraitorscaling()
set category = "Server"
set desc="Toggle traitor scaling"
set name="Toggle Traitor Scaling"
traitor_scaling = !traitor_scaling
log_admin("[key_name(usr)] toggled Traitor Scaling to [traitor_scaling].")
message_admins("[key_name_admin(usr)] toggled Traitor Scaling [traitor_scaling ? "on" : "off"].", 1)
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()
set category = "Server"
set desc="Start the round RIGHT NOW"
set name="Start Now"
if(!check_rights(R_SERVER))
return
if(!ticker)
alert("Unable to start the game as it is not set up.")
return
if(ticker.current_state == GAME_STATE_PREGAME)
ticker.current_state = GAME_STATE_SETTING_UP
log_admin("[usr.key] has started the game.")
message_admins("<font color='blue'>[usr.key] has started the game.</font>")
log_admin("[key_name(usr)] has started the game.")
message_admins("[key_name_admin(usr)] has started the game.")
feedback_add_details("admin_verb","SN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return 1
else
@@ -638,13 +632,17 @@ var/global/nologevent = 0
set category = "Server"
set desc="People can't enter"
set name="Toggle Entering"
if(!check_rights(R_SERVER))
return
enter_allowed = !( enter_allowed )
if (!( enter_allowed ))
world << "<B>New players may no longer enter the game.</B>"
else
world << "<B>New players may now enter the game.</B>"
log_admin("[key_name(usr)] toggled new player game entering.")
message_admins("\blue [key_name_admin(usr)] toggled new player game entering.", 1)
message_admins("[key_name_admin(usr)] toggled new player game entering.", 1)
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!
@@ -652,25 +650,34 @@ var/global/nologevent = 0
set category = "Event"
set desc="People can't be AI"
set name="Toggle AI"
if(!check_rights(R_EVENT))
return
config.allow_ai = !( config.allow_ai )
if (!( config.allow_ai ))
world << "<B>The AI job is no longer chooseable.</B>"
else
world << "<B>The AI job is chooseable now.</B>"
message_admins("[key_name_admin(usr)] toggled AI allowed.")
log_admin("[key_name(usr)] toggled AI allowed.")
world.update_status()
feedback_add_details("admin_verb","TAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/toggleaban()
set category = "Server"
set desc="Respawn basically"
set desc="Toggle the ability for players to respawn."
set name="Toggle Respawn"
if(!check_rights(R_SERVER))
return
abandon_allowed = !( abandon_allowed )
if (abandon_allowed)
world << "<B>You may now respawn.</B>"
else
world << "<B>You may no longer respawn :(</B>"
message_admins("\blue [key_name_admin(usr)] toggled respawn to [abandon_allowed ? "On" : "Off"].", 1)
message_admins("[key_name_admin(usr)] toggled respawn to [abandon_allowed ? "On" : "Off"].", 1)
log_admin("[key_name(usr)] toggled respawn to [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!
@@ -679,9 +686,13 @@ var/global/nologevent = 0
set category = "Event"
set desc="Toggle alien mobs"
set name="Toggle Aliens"
if(!check_rights(R_EVENT))
return
aliens_allowed = !aliens_allowed
log_admin("[key_name(usr)] toggled Aliens to [aliens_allowed].")
message_admins("[key_name_admin(usr)] toggled Aliens [aliens_allowed ? "on" : "off"].", 1)
log_admin("[key_name(usr)] toggled aliens to [aliens_allowed].")
message_admins("[key_name_admin(usr)] toggled aliens [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/delay()
@@ -689,11 +700,13 @@ var/global/nologevent = 0
set desc="Delay the game start/end"
set name="Delay"
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_SERVER))
return
if (!ticker || ticker.current_state != GAME_STATE_PREGAME)
ticker.delay_end = !ticker.delay_end
log_admin("[key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].")
message_admins("\blue [key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].", 1)
message_admins("[key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].", 1)
return //alert("Round end delayed", null, null, null, null, null)
going = !( going )
if (!( going ))
@@ -704,17 +717,6 @@ var/global/nologevent = 0
log_admin("[key_name(usr)] removed the delay.")
feedback_add_details("admin_verb","DELAY") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/unprison(var/mob/M in mob_list)
set category = "Admin"
set name = "Unprison"
if ((M.z in config.admin_levels))
M.loc = pick(latejoin)
message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]", 1)
log_admin("[key_name(usr)] has unprisoned [key_name(M)]")
else
alert("[M.name] is not prisoned.")
feedback_add_details("admin_verb","UP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
////////////////////////////////////////////////////////////////////////////////////////////////ADMIN HELPER PROCS
/proc/is_special_character(mob/M as mob) // returns 1 for specail characters and 2 for heroes of gamemode
@@ -760,7 +762,8 @@ var/global/nologevent = 0
set desc = "(atom path) Spawn an atom"
set name = "Spawn"
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
var/list/types = typesof(/atom)
var/list/matches = new()
@@ -794,6 +797,9 @@ var/global/nologevent = 0
set category = "Admin"
set desc = "Edit mobs's memory and role"
set name = "Show Traitor Panel"
if(!check_rights(R_ADMIN))
return
if(!istype(M))
usr << "This can only be used on instances of type /mob"
@@ -805,24 +811,14 @@ var/global/nologevent = 0
M.mind.edit_memory()
feedback_add_details("admin_verb","STP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/toggletintedweldhelmets()
set category = "Debug"
set desc="Reduces view range when wearing welding helmets"
set name="Toggle tinted welding helmes"
tinted_weldhelh = !( tinted_weldhelh )
if (tinted_weldhelh)
world << "<B>The tinted_weldhelh has been enabled!</B>"
else
world << "<B>The tinted_weldhelh has been disabled!</B>"
log_admin("[key_name(usr)] toggled tinted_weldhelh.")
message_admins("[key_name_admin(usr)] toggled tinted_weldhelh.", 1)
feedback_add_details("admin_verb","TTWH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/toggleguests()
set category = "Server"
set desc="Guests can't enter"
set name="Toggle guests"
set name="Toggle Guests"
if(!check_rights(R_SERVER))
return
guests_allowed = !( guests_allowed )
if (!( guests_allowed ))
world << "<B>Guests may no longer enter the game.</B>"
@@ -861,6 +857,9 @@ var/global/nologevent = 0
set category = "Admin"
set name = "Update Mob Sprite"
set desc = "Should fix any mob sprite update errors."
if(!check_rights(R_ADMIN))
return
if (!holder)
src << "Only administrators may use this command."
@@ -876,7 +875,7 @@ var/global/nologevent = 0
var/gamma_ship_location = 1 // 0 = station , 1 = space
proc/move_gamma_ship()
/proc/move_gamma_ship()
var/area/fromArea
var/area/toArea
if (gamma_ship_location == 1)
@@ -902,7 +901,7 @@ proc/move_gamma_ship()
gamma_ship_location = 1
return
proc/formatJumpTo(var/location,var/where="")
/proc/formatJumpTo(var/location,var/where="")
var/turf/loc
if(istype(location,/turf/))
loc = location
@@ -912,7 +911,7 @@ proc/formatJumpTo(var/location,var/where="")
where=formatLocation(loc)
return "<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>[where]</a>"
proc/formatLocation(var/location)
/proc/formatLocation(var/location)
var/turf/loc
if(istype(location,/turf/))
loc = location
@@ -921,7 +920,7 @@ proc/formatLocation(var/location)
var/area/A = get_area(location)
return "[A.name] - [loc.x],[loc.y],[loc.z]"
proc/formatPlayerPanel(var/mob/U,var/text="PP")
/proc/formatPlayerPanel(var/mob/U,var/text="PP")
return "<A HREF='?_src_=holder;adminplayeropts=\ref[U]'>[text]</A>"
//Kicks all the clients currently in the lobby. The second parameter (kick_only_afk) determins if an is_afk() check is ran, or if all clients are kicked
+163 -170
View File
@@ -93,7 +93,6 @@ var/list/admin_verbs_event = list(
/client/proc/cmd_admin_add_random_ai_law,
/client/proc/make_sound,
/client/proc/toggle_random_events,
/client/proc/editappear,
/client/proc/toggle_random_events,
/client/proc/toggle_ert_calling,
/client/proc/cmd_admin_change_custom_event,
@@ -170,7 +169,6 @@ 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/cmd_admin_pm_by_key_panel, /*admin-pm list by key*/
/client/proc/toggledebuglogs,
/datum/admins/proc/PlayerNotes,
/client/proc/admin_ghost, /*allows us to ghost/reenter body at will*/
/client/proc/cmd_mod_say,
@@ -230,6 +228,9 @@ var/list/admin_verbs_mentor = list(
/client/proc/hide_verbs()
set name = "Adminverbs - Hide All"
set category = "Admin"
if(!holder)
return
remove_admin_verbs()
verbs += /client/proc/show_verbs
@@ -241,6 +242,9 @@ var/list/admin_verbs_mentor = list(
/client/proc/show_verbs()
set name = "Adminverbs - Show"
set category = "Admin"
if(!holder)
return
verbs -= /client/proc/show_verbs
add_admin_verbs()
@@ -251,30 +255,37 @@ var/list/admin_verbs_mentor = list(
/client/proc/admin_ghost()
set category = "Admin"
set name = "Aghost"
if(!holder) return
if(!check_rights(R_ADMIN|R_MOD))
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()
log_admin("[key_name(usr)] re-entered their body")
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>"
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
log_admin("[key_name(usr)] has admin-ghosted")
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(!check_rights(R_ADMIN))
return
if(holder && mob)
if(mob)
if(mob.invisibility == INVISIBILITY_OBSERVER)
mob.invisibility = initial(mob.invisibility)
mob << "<span class='danger'>Invisimin off. Invisibility reset.</span>"
@@ -286,63 +297,84 @@ var/list/admin_verbs_mentor = list(
/client/proc/player_panel()
set name = "Player Panel"
set category = "Admin"
if(holder)
holder.player_panel_old()
if(!check_rights(R_ADMIN))
return
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()
if(!check_rights(R_ADMIN|R_MOD))
return
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~
if(!check_rights(R_ADMIN))
return
holder.check_antagonists()
log_admin("[key_name(usr)] checked antagonists")
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()
if(!check_rights(R_ADMIN|R_MOD))
return
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()
if(!check_rights(R_BAN))
return
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()
if(!check_rights(R_ADMIN))
return
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()
if(!check_rights(R_ADMIN))
return
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
@@ -368,6 +400,10 @@ var/list/admin_verbs_mentor = list(
/client/proc/stealth()
set category = "Admin"
set name = "Stealth Mode"
if(!check_rights(R_ADMIN))
return
if(holder)
if(holder.fakekey)
holder.fakekey = null
@@ -386,7 +422,8 @@ var/list/admin_verbs_mentor = list(
#define AUTOBANTIME 10
/client/proc/warn(warned_ckey)
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
if(!warned_ckey || !istext(warned_ckey)) return
if(warned_ckey in admin_datums)
@@ -405,19 +442,23 @@ var/list/admin_verbs_mentor = list(
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.")
message_admins("[key_name_admin(src)] has warned [key_name_admin(C)] resulting in a [AUTOBANTIME] minute ban")
log_admin("[key_name(src)] has warned [key_name(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.")
message_admins("[key_name_admin(src)] has warned [warned_ckey] resulting in a [AUTOBANTIME] minute ban")
log_admin("[key_name(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.")
log_admin("[key_name(src)] has warned [key_name(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.")
log_admin("[key_name(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!
@@ -428,6 +469,9 @@ var/list/admin_verbs_mentor = list(
set category = "Special Verbs"
set name = "Drop Bomb"
set desc = "Cause an explosion of varying strength at your location."
if(!check_rights(R_EVENT))
return
var/turf/epicenter = mob.loc
var/list/choices = list("Small Bomb", "Medium Bomb", "Big Bomb", "Custom Bomb")
@@ -455,13 +499,18 @@ var/list/admin_verbs_mentor = list(
if(flash_range == null)
return
explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, 1, 1)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] creating an admin explosion at [epicenter.loc].</span>")
log_admin("[key_name(usr)] created an admin explosion at [epicenter.loc]")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] created an admin explosion at [epicenter.loc]</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/give_spell(mob/T as mob in mob_list) // -- Urist
set category = "Event"
set name = "Give Spell"
set desc = "Gives a spell to a mob."
if(!check_rights(R_EVENT))
return
var/list/spell_list = list()
var/type_length = length("/obj/effect/proc_holder/spell") + 2
for(var/A in spells)
@@ -474,15 +523,19 @@ var/list/admin_verbs_mentor = list(
T.mind.AddSpell(new S)
else
T.AddSpell(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)
message_admins("[key_name_admin(usr)] gave [key_name(T)] the spell [S].", 1)
/client/proc/give_disease2(mob/T as mob in mob_list) // -- Giacom
set category = "Fun"
set category = "Event"
set name = "Give Disease"
set desc = "Gives a Disease to a mob."
if(!check_rights(R_EVENT))
return
var/datum/disease2/disease/D = new /datum/disease2/disease()
@@ -511,26 +564,33 @@ var/list/admin_verbs_mentor = list(
feedback_add_details("admin_verb","GD2") //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)] a [greater] disease2 with infection chance [D.infectionchance].")
message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] a [greater] disease2 with infection chance [D.infectionchance].", 1)
message_admins("[key_name_admin(usr)] gave [key_name(T)] a [greater] disease2 with infection chance [D.infectionchance].")
/client/proc/make_sound(var/obj/O in world) // -- TLE
set category = "Event"
set name = "Make Sound"
set desc = "Display a message to everyone who can hear the target"
if(!check_rights(R_EVENT))
return
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)
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")
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 = "Event"
if(!check_rights(R_EVENT))
return
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!
@@ -539,32 +599,28 @@ var/list/admin_verbs_mentor = list(
set category = "Event"
set name = "oSay"
set desc = "Display a message to everyone who can hear the target"
if(!check_rights(R_EVENT))
return
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)
log_admin("[key_name(usr)] used oSay on [mob.control_object]: [msg]")
message_admins("[key_name_admin(usr)] used oSay on [mob.control_object]: [msg]")
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/kill_air() // -- TLE
set category = "Debug"
set name = "Kill Air"
set desc = "Toggle Air Processing"
if(!check_rights(R_DEBUG))
return
if(air_processing_killed)
air_processing_killed = 0
usr << "<b>Enabled air processing.</b>"
@@ -579,19 +635,22 @@ var/list/admin_verbs_mentor = list(
set name = "De-admin self"
set category = "Admin"
if(holder)
log_admin("[key_name(usr)] deadmined themself.")
message_admins("[key_name_admin(usr)] deadmined themself.")
deadmin()
verbs += /client/proc/readmin
deadmins += ckey
src << "<span class='interface'>You are now a normal player.</span>"
if(!check_rights(R_ADMIN|R_MOD))
return
log_admin("[key_name(usr)] deadmined themself.")
message_admins("[key_name_admin(usr)] deadmined themself.")
deadmin()
verbs += /client/proc/readmin
deadmins += ckey
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/readmin()
set name = "Re-admin self"
set category = "Admin"
set desc = "Regain your admin powers."
var/datum/admins/D = admin_datums[ckey]
var/rank = null
if(config.admin_legacy_system)
@@ -657,7 +716,10 @@ var/list/admin_verbs_mentor = list(
/client/proc/toggle_log_hrefs()
set name = "Toggle href logging"
set category = "Server"
if(!holder) return
if(!check_rights(R_SERVER))
return
if(config)
if(config.log_hrefs)
config.log_hrefs = 0
@@ -670,16 +732,17 @@ var/list/admin_verbs_mentor = list(
set name = "Check AI Laws"
set category = "Admin"
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
if(holder)
src.holder.output_ai_laws()
holder.output_ai_laws()
/client/proc/manage_silicon_laws()
set name = "Manage Silicon Laws"
set category = "Admin"
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
var/mob/living/silicon/S = input("Select silicon.", "Manage Silicon Laws") as null|anything in silicon_mob_list
if(!S) return
@@ -693,6 +756,9 @@ var/list/admin_verbs_mentor = list(
set name = "C.M.A. - Admin"
set desc = "Allows you to change the mob appearance"
set category = "Admin"
if(!check_rights(R_ADMIN))
return
if(!istype(H))
return
@@ -706,6 +772,9 @@ var/list/admin_verbs_mentor = list(
set name = "C.M.A. - Self"
set desc = "Allows the mob to change its appearance"
set category = "Admin"
if(!check_rights(R_ADMIN))
return
if(!istype(H))
return
@@ -714,102 +783,19 @@ var/list/admin_verbs_mentor = list(
usr << "Only mobs with clients can alter their own appearance."
return
if(holder)
switch(alert("Do you wish for [H] to be allowed to select non-whitelisted races?","Alter Mob Appearance","Yes","No","Cancel"))
if("Yes")
admin_log_and_message_admins("has allowed [H] to change \his appearance, without whitelisting of races.")
H.change_appearance(APPEARANCE_ALL, H.loc, check_species_whitelist = 0)
if("No")
admin_log_and_message_admins("has allowed [H] to change \his appearance, with whitelisting of races.")
H.change_appearance(APPEARANCE_ALL, H.loc, 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!
//---- bs12 verbs ----
/client/proc/mod_panel()
set name = "Moderator Panel"
set category = "Admin"
/* if(holder)
holder.mod_panel()*/
// feedback_add_details("admin_verb","MP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
/client/proc/editappear(mob/living/carbon/human/M as mob in world)
set name = "Edit Appearance"
set category = "Event"
if(!check_rights(R_SERVER|R_EVENT)) return
if(!istype(M, /mob/living/carbon/human))
usr << "\red You can only do this to humans!"
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"))
switch(alert("Do you wish for [H] to be allowed to select non-whitelisted races?","Alter Mob Appearance","Yes","No","Cancel"))
if("Yes")
admin_log_and_message_admins("has allowed [H] to change \his appearance, without whitelisting of races.")
H.change_appearance(APPEARANCE_ALL, H.loc, check_species_whitelist = 0)
if("No")
return
var/new_facial = input("Please select facial hair color.", "Character Generation") as color
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))
var/new_hair = input("Please select hair color.", "Character Generation") as color
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))
var/new_eyes = input("Please select eye color.", "Character Generation") as color
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()
var/new_skin = input("Please select body color. This is for Tajaran, Unathi, and Skrell only!", "Character Generation") as color
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))
var/new_tone = input("Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation") as text
if (new_tone)
M.s_tone = max(min(round(text2num(new_tone)), 220), 1)
M.s_tone = -M.s_tone + 35
// hair
var/new_hstyle = input(usr, "Select a hair style", "Grooming") as null|anything in hair_styles_list
if(new_hstyle)
M.h_style = new_hstyle
// facial hair
var/new_fstyle = input(usr, "Select a facial hair style", "Grooming") as null|anything in facial_hair_styles_list
if(new_fstyle)
M.f_style = new_fstyle
var/new_gender = alert(usr, "Please select gender.", "Character Generation", "Male", "Female")
if (new_gender)
if(new_gender == "Male")
M.gender = MALE
else
M.gender = FEMALE
M.update_hair()
M.update_body()
M.check_dna(M)
/client/proc/playernotes()
set name = "Show Player Info"
set category = "Admin"
if(!check_rights(R_ADMIN))
return
if(holder)
holder.PlayerNotes()
return
admin_log_and_message_admins("has allowed [H] to change \his appearance, with whitelisting of races.")
H.change_appearance(APPEARANCE_ALL, H.loc, 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/free_slot()
set name = "Free Job Slot"
set category = "Admin"
if(!check_rights(R_ADMIN))
return
@@ -829,6 +815,9 @@ var/list/admin_verbs_mentor = list(
/client/proc/toggleattacklogs()
set name = "Toggle Attack Log Messages"
set category = "Preferences"
if(!check_rights(R_ADMIN))
return
prefs.toggles ^= CHAT_ATTACKLOGS
prefs.save_preferences(src)
@@ -837,24 +826,23 @@ var/list/admin_verbs_mentor = list(
else
usr << "You now won't get attack log messages"
/client/proc/toggledrones()
set name = "Toggle maintenance drones"
set name = "Toggle Maintenance Drones"
set category = "Server"
if(!holder) return
if(config)
if(config.allow_drone_spawn)
config.allow_drone_spawn = 0
src << "<b>Disallowed maint drones.</b>"
message_admins("Admin [key_name_admin(usr)] has disabled maint drones.", 1)
else
config.allow_drone_spawn = 1
src << "<b>Enabled maint drones.</b>"
message_admins("Admin [key_name_admin(usr)] has enabled maint drones.", 1)
if(!check_rights(R_SERVER))
return
config.allow_drone_spawn = !(config.allow_drone_spawn)
log_admin("[key_name(usr)] has [config.allow_drone_spawn ? "enabled" : "disabled"] maintenance drones.")
message_admins("[key_name_admin(usr)] has [config.allow_drone_spawn ? "enabled" : "disabled"] maintenance drones.")
/client/proc/toggledebuglogs()
set name = "Toggle Debug Log Messages"
set category = "Preferences"
if(!check_rights(R_DEBUG))
return
prefs.toggles ^= CHAT_DEBUGLOGS
if (prefs.toggles & CHAT_DEBUGLOGS)
@@ -862,22 +850,27 @@ var/list/admin_verbs_mentor = list(
else
usr << "You now won't get debug log messages"
/client/proc/man_up(mob/T as mob in mob_list)
set category = "Admin"
set name = "Man Up"
set desc = "Tells mob to man up and deal with it."
if(!check_rights(R_ADMIN))
return
T << "<span class='notice'><b><font size=3>Man up and deal with it.</font></b></span>"
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("\blue [key_name_admin(usr)] told [key_name(T)] to man up and deal with it.", 1)
message_admins("[key_name_admin(usr)] told [key_name(T)] to man up and deal with it.")
/client/proc/global_man_up()
set category = "Admin"
set name = "Man Up Global"
set desc = "Tells everyone to man up and deal with it."
if(!check_rights(R_ADMIN))
return
var/confirm = alert("Are you sure you want to send the global message?", "Confirm Man Up Global", "Yes", "No")
@@ -887,4 +880,4 @@ var/list/admin_verbs_mentor = list(
T << 'sound/voice/ManUp1.ogg'
log_admin("[key_name(usr)] told everyone to man up and deal with it.")
message_admins("\blue [key_name_admin(usr)] told everyone to man up and deal with it.", 1)
message_admins("[key_name_admin(usr)] told everyone to man up and deal with it.")