Remove the R_REJUVINATE flag and replace with R_POLL

Rejuvenation lives under R_ADMIN and R_POLL is a new flag you can grant
to someone to allow them to create polls
This commit is contained in:
oranges
2017-06-28 02:38:00 +00:00
parent 27276ca3bb
commit 8ef47216a5
8 changed files with 34 additions and 21 deletions
+8 -2
View File
@@ -27,6 +27,9 @@ GLOBAL_PROTECT(admin_ranks)
/datum/admin_rank/vv_edit_var(var_name, var_value)
return FALSE
#if DM_VERSION > 512
#error remove the rejuv keyword from this proc
#endif
/proc/admin_keyword_to_flag(word, previous_rights=0)
var/flag = 0
switch(ckey(word))
@@ -48,8 +51,8 @@ GLOBAL_PROTECT(admin_ranks)
flag = R_POSSESS
if("stealth")
flag = R_STEALTH
if("rejuv","rejuvinate")
flag = R_REJUVINATE
if("poll")
flag = R_POLL
if("varedit")
flag = R_VAREDIT
if("everything","host","all")
@@ -60,6 +63,9 @@ GLOBAL_PROTECT(admin_ranks)
flag = R_SPAWN
if("@","prev")
flag = previous_rights
if("rejuv","rejuvinate")
stack_trace("Legacy keyword rejuvinate used defaulting to R_ADMIN")
flag = R_ADMIN
return flag
/proc/admin_keyword_to_path(word) //use this with verb keywords eg +/client/proc/blah
+8 -7
View File
@@ -66,7 +66,8 @@ GLOBAL_LIST_INIT(admin_verbs_admin, world.AVerbsAdmin())
/client/proc/open_shuttle_manipulator, /* Opens shuttle manipulator UI */
/client/proc/deadchat,
/client/proc/toggleprayers,
/client/proc/toggleadminhelpsound
/client/proc/toggleadminhelpsound,
/client/proc/respawn_character
)
GLOBAL_PROTECT(admin_verbs_ban)
GLOBAL_LIST_INIT(admin_verbs_ban, list(/client/proc/unban_panel,/client/proc/DB_ban_panel,/client/proc/stickybanpanel))
@@ -157,9 +158,9 @@ GLOBAL_LIST_INIT(admin_verbs_debug, world.AVerbsDebug())
GLOBAL_PROTECT(admin_verbs_possess)
GLOBAL_LIST_INIT(admin_verbs_possess, list(/proc/possess,/proc/release))
GLOBAL_PROTECT(admin_verbs_permissions)
GLOBAL_LIST_INIT(admin_verbs_permissions, list(/client/proc/edit_admin_permissions,/client/proc/create_poll))
GLOBAL_PROTECT(admin_verbs_rejuv)
GLOBAL_LIST_INIT(admin_verbs_rejuv, list(/client/proc/respawn_character))
GLOBAL_LIST_INIT(admin_verbs_permissions, list(/client/proc/edit_admin_permissions))
GLOBAL_PROTECT(admin_verbs_poll)
GLOBAL_LIST_INIT(admin_verbs_poll, list(/client/proc/create_poll))
//verbs which can be hidden - needs work
GLOBAL_PROTECT(admin_verbs_hideable)
@@ -254,8 +255,8 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list(
verbs += GLOB.admin_verbs_permissions
if(rights & R_STEALTH)
verbs += /client/proc/stealth
if(rights & R_REJUVINATE)
verbs += GLOB.admin_verbs_rejuv
if(rights & R_ADMIN)
verbs += GLOB.admin_verbs_poll
if(rights & R_SOUNDS)
verbs += GLOB.admin_verbs_sounds
if(rights & R_SPAWN)
@@ -278,7 +279,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list(
GLOB.admin_verbs_possess,
GLOB.admin_verbs_permissions,
/client/proc/stealth,
GLOB.admin_verbs_rejuv,
GLOB.admin_verbs_poll,
GLOB.admin_verbs_sounds,
GLOB.admin_verbs_spawn,
/*Debug verbs added by "show debug verbs"*/
+1 -1
View File
@@ -1,7 +1,7 @@
/client/proc/create_poll()
set name = "Create Poll"
set category = "Special Verbs"
if(!check_rights(R_PERMISSIONS))
if(!check_rights(R_POLL))
return
if(!SSdbcore.Connect())
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
+1 -1
View File
@@ -1442,7 +1442,7 @@
message_admins("[key_name_admin(usr)] has sent [key_name_admin(L)] to the thunderdome. (Observer.)")
else if(href_list["revive"])
if(!check_rights(R_REJUVINATE))
if(!check_rights(R_ADMIN))
return
var/mob/living/L = locate(href_list["revive"])