Does work on the event manager role again

This commit is contained in:
Anewbe
2017-10-18 20:00:01 -05:00
parent 799a51ec60
commit cad5ef12e7
17 changed files with 105 additions and 76 deletions

View File

@@ -36,7 +36,7 @@
#define R_SOUNDS 0x800
#define R_SPAWN 0x1000
#define R_MOD 0x2000
#define R_MENTOR 0x4000
#define R_EVENT 0x4000
#define R_HOST 0x8000 //higher than this will overflow
#define R_MAXPERMISSION 0x8000 // This holds the maximum value for a permission. It is used in iteration, so keep it updated.

View File

@@ -148,7 +148,7 @@
if (rights & R_SOUNDS) . += "[seperator]+SOUND"
if (rights & R_SPAWN) . += "[seperator]+SPAWN"
if (rights & R_MOD) . += "[seperator]+MODERATOR"
if (rights & R_MENTOR) . += "[seperator]+MENTOR"
if (rights & R_EVENT) . += "[seperator]+EVENT"
return .
// Converts a hexadecimal color (e.g. #FF0050) to a list of numbers for red, green, and blue (e.g. list(255,0,80) ).

View File

@@ -67,7 +67,7 @@ var/list/gamemode_cache = list()
var/kick_inactive = 0 //force disconnect for inactive players after this many minutes, if non-0
var/show_mods = 0
var/show_devs = 0
var/show_mentors = 0
var/show_event_managers = 0
var/mods_can_tempban = 0
var/mods_can_job_tempban = 0
var/mod_tempban_max = 1440
@@ -511,8 +511,8 @@ var/list/gamemode_cache = list()
if("show_devs")
config.show_devs = 1
if("show_mentors")
config.show_mentors = 1
if("show_event_managers")
config.show_event_managers = 1
if("mods_can_tempban")
config.mods_can_tempban = 1

View File

@@ -70,16 +70,16 @@
var/msg = ""
var/modmsg = ""
var/devmsg = ""
var/mentmsg = ""
var/eventMmsg = ""
var/num_mods_online = 0
var/num_admins_online = 0
var/num_devs_online = 0
var/num_mentors_online = 0
var/num_event_managers_online = 0
if(holder)
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights || (!R_MOD & C.holder.rights && !R_MENTOR & C.holder.rights)) //Used to determine who shows up in admin rows
if(R_ADMIN & C.holder.rights || (!R_MOD & C.holder.rights && !R_EVENT & C.holder.rights)) //Used to determine who shows up in admin rows
if(C.holder.fakekey && (!R_ADMIN & holder.rights && !R_MOD & holder.rights)) //Mentors can't see stealthmins
if(C.holder.fakekey && (!R_ADMIN & holder.rights && !R_MOD & holder.rights)) //Event Managerss can't see stealthmins
continue
msg += "\t[C] is a [C.holder.rank]"
@@ -102,7 +102,7 @@
msg += "\n"
num_admins_online++
else if(R_MOD & C.holder.rights) //Who shows up in mod/mentor rows.
else if(R_MOD & C.holder.rights) //Who shows up in mod rows.
modmsg += "\t[C] is a [C.holder.rank]"
if(isobserver(C.mob))
@@ -137,26 +137,26 @@
devmsg += "\n"
num_devs_online++
else if(R_MENTOR & C.holder.rights)
mentmsg += "\t[C] is a [C.holder.rank]"
else if(R_EVENT & C.holder.rights)
eventMmsg += "\t[C] is a [C.holder.rank]"
if(isobserver(C.mob))
mentmsg += " - Observing"
eventMmsg += " - Observing"
else if(istype(C.mob,/mob/new_player))
mentmsg += " - Lobby"
eventMmsg += " - Lobby"
else
mentmsg += " - Playing"
eventMmsg += " - Playing"
if(C.is_afk())
var/seconds = C.last_activity_seconds()
mentmsg += " (AFK - "
mentmsg += "[round(seconds / 60)] minutes, "
mentmsg += "[seconds % 60] seconds)"
mentmsg += "\n"
num_mentors_online++
eventMmsg += " (AFK - "
eventMmsg += "[round(seconds / 60)] minutes, "
eventMmsg += "[seconds % 60] seconds)"
eventMmsg += "\n"
num_event_managers_online++
else
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights || (!R_MOD & C.holder.rights && !R_MENTOR & C.holder.rights))
if(R_ADMIN & C.holder.rights || (!R_MOD & C.holder.rights && !R_EVENT & C.holder.rights))
if(!C.holder.fakekey)
msg += "\t[C] is a [C.holder.rank]\n"
num_admins_online++
@@ -166,9 +166,9 @@
else if (R_SERVER & C.holder.rights)
devmsg += "\t[C] is a [C.holder.rank]\n"
num_devs_online++
else if (R_MENTOR & C.holder.rights)
mentmsg += "\t[C] is a [C.holder.rank]\n"
num_mentors_online++
else if (R_EVENT & C.holder.rights)
eventMmsg += "\t[C] is a [C.holder.rank]\n"
num_event_managers_online++
if(config.admin_irc)
src << "<span class='info'>Adminhelps are also sent to IRC. If no admins are available in game try anyway and an admin on IRC may see it and respond.</span>"
@@ -180,7 +180,7 @@
if(config.show_devs)
msg += "\n<b> Current Developers ([num_devs_online]):</b>\n" + devmsg
if(config.show_mentors)
msg += "\n<b> Current Mentors ([num_mentors_online]):</b>\n" + mentmsg
if(config.show_event_managers)
msg += "\n<b> Current Event Managers ([num_event_managers_online]):</b>\n" + eventMmsg
src << msg

View File

@@ -860,7 +860,7 @@ proc/admin_notice(var/message, var/rights)
set desc="Delay the game start/end"
set name="Delay"
if(!check_rights(R_SERVER)) return
if(!check_rights(R_SERVER|R_EVENT)) 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"].")
@@ -1225,16 +1225,16 @@ proc/admin_notice(var/message, var/rights)
/*
helper proc to test if someone is a mentor or not. Got tired of writing this same check all over the place.
helper proc to test if someone is an event manager or not. Got tired of writing this same check all over the place.
*/
/proc/is_mentor(client/C)
/proc/is_eventM(client/C)
if(!istype(C))
return 0
if(!C.holder)
return 0
if(C.holder.rights == R_MENTOR)
if(C.holder.rights == R_EVENT)
return 1
return 0
@@ -1266,7 +1266,7 @@ proc/admin_notice(var/message, var/rights)
var/ref_mob = "\ref[M]"
return "<b>[key_name(C, link, name, highlight_special)](<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>)([admin_jump_link(M, src)]) (<A HREF='?_src_=holder;take_question=\ref[M]'>TAKE</A>)</b>"
if(4) //Mentors
if(4) //Event Managers
var/ref_mob = "\ref[M]"
return "<b>[key_name(C, link, name, highlight_special)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) ([admin_jump_link(M, src)]) (<A HREF='?_src_=holder;take_question=\ref[M]'>TAKE</A>)</b>"

View File

@@ -37,11 +37,11 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
if("stealth") rights |= R_STEALTH
if("rejuv","rejuvinate") rights |= R_REJUVINATE
if("varedit") rights |= R_VAREDIT
if("everything","host","all") rights |= (R_HOST | R_BUILDMODE | R_ADMIN | R_BAN | R_FUN | R_SERVER | R_DEBUG | R_PERMISSIONS | R_POSSESS | R_STEALTH | R_REJUVINATE | R_VAREDIT | R_SOUNDS | R_SPAWN | R_MOD| R_MENTOR)
if("everything","host","all") rights |= (R_HOST | R_BUILDMODE | R_ADMIN | R_BAN | R_FUN | R_SERVER | R_DEBUG | R_PERMISSIONS | R_POSSESS | R_STEALTH | R_REJUVINATE | R_VAREDIT | R_SOUNDS | R_SPAWN | R_MOD| R_EVENT)
if("sound","sounds") rights |= R_SOUNDS
if("spawn","create") rights |= R_SPAWN
if("mod") rights |= R_MOD
if("mentor") rights |= R_MENTOR
if("event") rights |= R_EVENT
admin_ranks[rank] = rights
previous_rights = rights

View File

@@ -8,7 +8,7 @@ var/list/admin_verbs_default = list(
/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/cmd_mod_say,
/client/proc/cmd_mentor_check_new_players,
/client/proc/cmd_eventM_check_new_players,
// /client/proc/deadchat //toggles deadchat on/off,
// /client/proc/toggle_ahelp_sound,
)
@@ -186,7 +186,7 @@ var/list/admin_verbs_debug = list(
/client/proc/cmd_debug_tog_aliens,
/client/proc/air_report,
/client/proc/reload_admins,
/client/proc/reload_mentors,
/client/proc/reload_eventMs,
/client/proc/restart_controller,
/datum/admins/proc/restart,
/client/proc/print_random_map,
@@ -327,19 +327,53 @@ var/list/admin_verbs_mod = list(
/client/proc/getserverlog, //allows us to fetch server logs (diary) for other days,
/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,
)
var/list/admin_verbs_mentor = list(
var/list/admin_verbs_event_manager = list(
/client/proc/cmd_admin_pm_context,
/client/proc/cmd_admin_pm_panel,
/datum/admins/proc/PlayerNotes,
/client/proc/admin_ghost,
/client/proc/cmd_mod_say,
/datum/admins/proc/show_player_info,
// /client/proc/dsay,
/client/proc/cmd_admin_subtle_message
/client/proc/dsay,
/client/proc/cmd_admin_subtle_message,
/client/proc/debug_variables,
/client/proc/check_antagonists,
/client/proc/aooc,
/datum/admins/proc/paralyze_mob,
/client/proc/cmd_admin_direct_narrate,
/client/proc/allow_character_respawn,
/datum/admins/proc/sendFax,
/client/proc/respawn_character,
/proc/possess,
/proc/release,
/client/proc/callproc,
/client/proc/callproc_target,
/client/proc/debug_controller,
/client/proc/show_gm_status,
/datum/admins/proc/change_weather,
/datum/admins/proc/change_time,
/client/proc/admin_give_modifier,
/client/proc/Jump,
/client/proc/jumptomob,
/client/proc/jumptocoord,
/client/proc/cmd_admin_delete,
/datum/admins/proc/delay,
/client/proc/Set_Holiday,
/client/proc/make_sound,
/client/proc/toggle_random_events,
/datum/admins/proc/cmd_admin_dress,
/client/proc/cmd_admin_gib_self,
/client/proc/drop_bomb,
/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/editappear,
/client/proc/roll_dices,
/datum/admins/proc/call_supply_drop,
/datum/admins/proc/call_drop_pod
)
/client/proc/add_admin_verbs()
@@ -361,7 +395,7 @@ var/list/admin_verbs_mentor = list(
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_MENTOR) verbs += admin_verbs_mentor
if(holder.rights & R_EVENT) verbs += admin_verbs_event_manager
/client/proc/remove_admin_verbs()
verbs.Remove(
@@ -424,12 +458,10 @@ var/list/admin_verbs_mentor = list(
if(istype(mob,/mob/observer/dead))
//re-enter
var/mob/observer/dead/ghost = mob
if(!is_mentor(usr.client))
ghost.can_reenter_corpse = 1
if(ghost.can_reenter_corpse)
ghost.reenter_corpse()
else
ghost << "<font color='red'>Error: Aghost: Can't reenter corpse, mentors that use adminHUD while aghosting are not permitted to enter their corpse again</font>"
ghost << "<font color='red'>Error: Aghost: Can't reenter corpse, event managers that use adminHUD while aghosting are not permitted to enter their corpse again</font>"
return
feedback_add_details("admin_verb","P") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

View File

@@ -367,7 +367,7 @@
if(usr.client)
var/client/C = usr.client
if(is_mentor(C))
if(is_eventM(C))
dat += {"<td align=center> N/A </td>"}
else
switch(is_special_character(M))

View File

@@ -237,7 +237,7 @@
href_list["secretsadmin"] = "check_antagonist"
else if(href_list["delay_round_end"])
if(!check_rights(R_SERVER)) return
if(!check_rights(R_SERVER|R_EVENT)) return
ticker.delay_end = !ticker.delay_end
log_admin("[key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].")
@@ -1194,7 +1194,7 @@
show_player_panel(M)
else if(href_list["adminplayerobservejump"])
if(!check_rights(R_MENTOR|R_MOD|R_ADMIN|R_SERVER)) return
if(!check_rights(R_EVENT|R_MOD|R_ADMIN|R_SERVER|R_EVENT)) return
var/mob/M = locate(href_list["adminplayerobservejump"])
@@ -1204,7 +1204,7 @@
C.jumptomob(M)
else if(href_list["adminplayerobservefollow"])
if(!check_rights(R_MENTOR|R_MOD|R_ADMIN|R_SERVER))
if(!check_rights(R_EVENT|R_MOD|R_ADMIN|R_SERVER|R_EVENT))
return
var/mob/M = locate(href_list["adminplayerobservefollow"])
@@ -1224,14 +1224,14 @@
if(ismob(M))
var/take_msg = "<span class='notice'><b>ADMINHELP</b>: <b>[key_name(usr.client)]</b> is attending to <b>[key_name(M)]'s</b> adminhelp, please don't dogpile them.</span>"
for(var/client/X in admins)
if((R_ADMIN|R_MOD|R_MENTOR) & X.holder.rights)
if((R_ADMIN|R_MOD|R_EVENT) & X.holder.rights)
to_chat(X, take_msg)
to_chat(M, "<span class='notice'><b>Your adminhelp is being attended to by [usr.client]. Thanks for your patience!</b></span>")
else
to_chat(usr, "<span class='warning'>Unable to locate mob.</span>")
else if(href_list["adminplayerobservecoodjump"])
if(!check_rights(R_ADMIN|R_SERVER|R_MOD)) return
if(!check_rights(R_ADMIN|R_SERVER|R_MOD|R_EVENT)) return
var/x = text2num(href_list["X"])
var/y = text2num(href_list["Y"])
@@ -1843,7 +1843,7 @@
vsc.SetDefault(usr)
else if(href_list["toglang"])
if(check_rights(R_SPAWN))
if(check_rights(R_SPAWN|R_EVENT))
var/mob/M = locate(href_list["toglang"])
if(!istype(M))
usr << "[M] is illegal type, must be /mob!"

View File

@@ -88,24 +88,21 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
if(ai_found)
ai_cl = " (<A HREF='?_src_=holder;adminchecklaws=\ref[mob]'>CL</A>)"
//Options bar: mob, details ( admin = 2, dev = 3, mentor = 4, character name (0 = just ckey, 1 = ckey and character name), link? (0 no don't make it a link, 1 do so),
//Options bar: mob, details ( admin = 2, dev = 3, event manager = 4, character name (0 = just ckey, 1 = ckey and character name), link? (0 no don't make it a link, 1 do so),
// highlight special roles (0 = everyone has same looking name, 1 = antags / special roles get a golden name)
var/mentor_msg = "<b><font color=red>Request for Help: </font></b><font color='blue'><b>[get_options_bar(mob, 4, 1, 1, 0)][ai_cl]:</b> [msg]</font>"
msg = "<b><font color=red>Request for Help: </font></b><font color='blue'><b>[get_options_bar(mob, 2, 1, 1)][ai_cl]</b> [msg]</font>"
var/admin_number_afk = 0
for(var/client/X in admins)
if((R_ADMIN|R_MOD|R_MENTOR|R_SERVER) & X.holder.rights)
if((R_ADMIN|R_MOD|R_EVENT|R_SERVER) & X.holder.rights)
if(X.is_afk())
admin_number_afk++
if(X.is_preference_enabled(/datum/client_preference/holder/play_adminhelp_ping))
X << 'sound/effects/adminhelp.ogg'
if(X.holder.rights == R_MENTOR)
X << mentor_msg // Mentors won't see coloring of names on people with special_roles (Antags, etc.)
else
X << msg
if(X.is_preference_enabled(/datum/client_preference/holder/play_adminhelp_ping))
X << 'sound/effects/adminhelp.ogg'
//show it to the person adminhelping too
src << "<font color='blue'>PM to-<b>Staff </b>: [original_msg]</font>"

View File

@@ -112,7 +112,7 @@
//check client/X is an admin and isn't the sender or recipient
if(X == C || X == src)
continue
if(X.key != key && X.key != C.key && (X.holder.rights & R_ADMIN|R_MOD|R_MENTOR))
if(X.key != key && X.key != C.key && (X.holder.rights & R_ADMIN|R_MOD|R_EVENT))
X << "<span class='pm'><span class='other'>" + create_text_tag("pm_other", "PM:", X) + " <span class='name'>[key_name(src, X, 0)]</span> to <span class='name'>[key_name(C, X, 0)]</span>: <span class='message'>[msg]</span></span></span>"
/client/proc/cmd_admin_irc_pm(sender)

View File

@@ -23,7 +23,7 @@
set name = "Msay"
set hidden = 1
if(!check_rights(R_ADMIN|R_MOD|R_MENTOR|R_SERVER))
if(!check_rights(R_ADMIN|R_MOD|R_SERVER))
return
msg = sanitize(msg)
@@ -45,7 +45,7 @@
set name = "Esay"
set hidden = 1
if(!check_rights(R_ADMIN|R_MOD|R_MENTOR|R_SERVER))
if(!check_rights(R_ADMIN|R_MOD|R_EVENT|R_SERVER))
return
msg = sanitize(msg)

View File

@@ -108,13 +108,13 @@
load_admins()
feedback_add_details("admin_verb","RLDA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/reload_mentors()
set name = "Reload Mentors"
/client/proc/reload_eventMs()
set name = "Reload Event Managers"
set category = "Debug"
if(!check_rights(R_SERVER)) return
message_admins("[usr] manually reloaded Mentors")
message_admins("[usr] manually reloaded Event Managers")
world.load_mods()

View File

@@ -65,7 +65,7 @@
message_admins("<font color='blue'><B>SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] : [msg]</B></font>", 1)
feedback_add_details("admin_verb","SMS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_mentor_check_new_players() //Allows mentors / admins to determine who the newer players are.
/client/proc/cmd_eventM_check_new_players() //Allows event managers / admins to determine who the newer players are.
set category = "Admin"
set name = "Check new Players"
if(!holder)
@@ -82,7 +82,7 @@
var/msg = ""
var/highlight_special_characters = 1
if(is_mentor(usr.client))
if(is_eventM(usr.client))
highlight_special_characters = 0
for(var/client/C in clients)
@@ -610,7 +610,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Special Verbs"
set name = "Explosion"
if(!check_rights(R_DEBUG|R_FUN)) return
if(!check_rights(R_DEBUG|R_FUN|R_EVENT)) return
var/devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null
if(devastation == null) return
@@ -638,7 +638,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Special Verbs"
set name = "EM Pulse"
if(!check_rights(R_DEBUG|R_FUN)) return
if(!check_rights(R_DEBUG|R_FUN|R_EVENT)) return
var/heavy = input("Range of heavy pulse.", text("Input")) as num|null
if(heavy == null) return
@@ -664,7 +664,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Special Verbs"
set name = "Gib"
if(!check_rights(R_ADMIN|R_FUN)) return
if(!check_rights(R_ADMIN|R_FUN|R_EVENT)) return
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
if(confirm != "Yes") return
@@ -820,7 +820,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if ((!( ticker ) || !emergency_shuttle.location()))
return
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN|R_EVENT)) return
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
if(confirm != "Yes") return
@@ -849,7 +849,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Admin"
set name = "Cancel Shuttle"
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN|R_EVENT)) return
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes") return
@@ -870,7 +870,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if (!ticker)
return
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN|R_EVENT)) return
emergency_shuttle.deny_shuttle = !emergency_shuttle.deny_shuttle
@@ -926,7 +926,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set name = "Toggle random events on/off"
set desc = "Toggles random events such as meteors, black holes, blob (but not space dust) on/off"
if(!check_rights(R_SERVER)) return
if(!check_rights(R_SERVER|R_EVENT)) return
if(!config.allow_random_events)
config.allow_random_events = 1

View File

@@ -310,7 +310,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(!client)
return
var/mentor = is_mentor(usr.client)
var/mentor = is_eventM(usr.client)
if(!config.antag_hud_allowed && (!client.holder || mentor))
src << "<font color='red'>Admins have disabled this for this round.</font>"
return

View File

@@ -400,7 +400,7 @@ proc/is_blind(A)
return // Can't talk in deadchat if you can't see it.
for(var/mob/M in player_list)
if(M.client && ((!istype(M, /mob/new_player) && M.stat == DEAD) || (M.client.holder && !is_mentor(M.client))) && M.is_preference_enabled(/datum/client_preference/show_dsay))
if(M.client && ((!istype(M, /mob/new_player) && M.stat == DEAD) || (M.client.holder && !is_eventM(M.client))) && M.is_preference_enabled(/datum/client_preference/show_dsay))
var/follow
var/lname
if(M.forbid_seeing_deadchat && !M.client.holder)

View File

@@ -93,7 +93,7 @@ SHOW_DEVS
SHOW_MODS
##Show mentors on staffwho
SHOW_MENTORS
SHOW_EVENT
## Chooses whether mods have the ability to tempban or not
MODS_CAN_TEMPBAN