Moved one or two bits out of +FUN and into a +SPAWN flag. The spawn flag allows mob transformations, spawning of items etc.

Moved fun (admin-event stuff) up to badmin rank.
deadchat visibility defaults to on
removed update_admin()
fixed associate so it won't accidentally add people to the admins list multiple times.
toggling ooc on/off is now available to any admin regardless of rights.
mass deletion is now restricted to DEBUG or SERVER flags
ADMIN, SERVER, DEBUG can all use the delete verb

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5032 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
elly1989@rocketmail.com
2012-11-09 21:58:10 +00:00
parent d71cc8f3d6
commit 35cac8aefc
12 changed files with 146 additions and 177 deletions

View File

@@ -212,11 +212,11 @@ proc/tg_list2text(list/list, glue=",")
/proc/angle2dir(var/degree) /proc/angle2dir(var/degree)
degree = ((degree+22.5)%365) degree = ((degree+22.5)%365)
if(degree < 45) return NORTH if(degree < 45) return NORTH
if(degree < 90) return NORTH|EAST if(degree < 90) return NORTHEAST
if(degree < 135) return EAST if(degree < 135) return EAST
if(degree < 180) return SOUTH|EAST if(degree < 180) return SOUTHEAST
if(degree < 225) return SOUTH if(degree < 225) return SOUTH
if(degree < 270) return SOUTH|WEST if(degree < 270) return SOUTHWEST
if(degree < 315) return WEST if(degree < 315) return WEST
return NORTH|WEST return NORTH|WEST
@@ -224,24 +224,15 @@ proc/tg_list2text(list/list, glue=",")
/proc/dir2angle(var/D) /proc/dir2angle(var/D)
switch(D) switch(D)
if(1) if(NORTH) return 0
return 0 if(SOUTH) return 180
if(2) if(EAST) return 90
return 180 if(WEST) return 270
if(4) if(NORTHEAST) return 45
return 90 if(SOUTHEAST) return 135
if(8) if(NORTHWEST) return 315
return 270 if(SOUTHWEST) return 225
if(5) else return null
return 45
if(6)
return 135
if(9)
return 315
if(10)
return 225
else
return null
//Returns the angle in english //Returns the angle in english
/proc/angle2text(var/degree) /proc/angle2text(var/degree)
@@ -262,4 +253,5 @@ proc/tg_list2text(list/list, glue=",")
if(rights & R_REJUVINATE) . += "+REJUVINATE" if(rights & R_REJUVINATE) . += "+REJUVINATE"
if(rights & R_VAREDIT) . += "+VAREDIT" if(rights & R_VAREDIT) . += "+VAREDIT"
if(rights & R_SOUNDS) . += "+SOUND" if(rights & R_SOUNDS) . += "+SOUND"
if(rights & R_SPAWN) . += "+SPAWN"
return . return .

View File

@@ -496,7 +496,7 @@ client
href_list["datumrefresh"] = href_list["ninja"] href_list["datumrefresh"] = href_list["ninja"]
else if(href_list["godmode"]) else if(href_list["godmode"])
if(!check_rights(0)) return if(!check_rights(R_REJUVINATE)) return
var/mob/M = locate(href_list["godmode"]) var/mob/M = locate(href_list["godmode"])
if(!istype(M)) if(!istype(M))
@@ -517,7 +517,7 @@ client
src.cmd_admin_gib(M) src.cmd_admin_gib(M)
else if(href_list["build_mode"]) else if(href_list["build_mode"])
if(!check_rights(0)) return if(!check_rights(R_BUILDMODE)) return
var/mob/M = locate(href_list["build_mode"]) var/mob/M = locate(href_list["build_mode"])
if(!istype(M)) if(!istype(M))
@@ -561,7 +561,7 @@ client
href_list["datumrefresh"] = href_list["make_skeleton"] href_list["datumrefresh"] = href_list["make_skeleton"]
else if(href_list["delall"]) else if(href_list["delall"])
if(!check_rights(0)) return if(!check_rights(R_DEBUG|R_SERVER)) return
var/obj/O = locate(href_list["delall"]) var/obj/O = locate(href_list["delall"])
if(!isobj(O)) if(!isobj(O))

View File

@@ -221,6 +221,7 @@ var/fileaccess_timer = 1800 //Cannot access files by ftp until the game is finis
#define R_REJUVINATE 512 #define R_REJUVINATE 512
#define R_VAREDIT 1024 #define R_VAREDIT 1024
#define R_SOUNDS 2048 #define R_SOUNDS 2048
#define R_SPAWN 4096
#define R_MAXPERMISSION 4096 //This holds the maximum value for a permission. It is used in iteration, so keep it updated. #define R_MAXPERMISSION 4096 //This holds the maximum value for a permission. It is used in iteration, so keep it updated.

View File

@@ -39,6 +39,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
if("varedit") rights |= R_VAREDIT if("varedit") rights |= R_VAREDIT
if("everything","host","all") rights |= R_HOST if("everything","host","all") rights |= R_HOST
if("sound","sounds") rights |= R_SOUNDS if("sound","sounds") rights |= R_SOUNDS
if("spawn","create") rights |= R_SPAWN
admin_ranks[rank] = rights admin_ranks[rank] = rights
previous_rights = rights previous_rights = rights
@@ -134,3 +135,24 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
#endif #endif
/*
#ifdef TESTING
/client/verb/changerank(newrank in admin_ranks)
if(holder)
holder.rank = newrank
holder.rights = admin_ranks[newrank]
else
holder = new /datum/admins(newrank,admin_ranks[newrank],ckey)
remove_admin_verbs()
holder.associate(src)
/client/verb/changerights(newrights as num)
if(holder)
holder.rights = newrights
else
holder = new /datum/admins("testing",newrights,ckey)
remove_admin_verbs()
holder.associate(src)
#endif
*/

View File

@@ -1,5 +1,7 @@
//admin verb groups - They can overlap if you so wish. Only one of each verb will exist in the verbs list regardless //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( var/list/admin_verbs_default = list(
/datum/admins/proc/toggleooc, /*toggles ooc on/off for everyone*/
/datum/admins/proc/toggleoocdead, /*toggles ooc on/off for everyone who is dead*/
/client/proc/toggleadminhelpsound, /*toggles whether we hear a sound when adminhelps/PMs are used*/ /client/proc/toggleadminhelpsound, /*toggles whether we hear a sound when adminhelps/PMs are used*/
/client/proc/deadmin_self, /*destroys our own admin datum so we can play as a regular player*/ /client/proc/deadmin_self, /*destroys our own admin datum so we can play as a regular player*/
/client/proc/cmd_admin_say, /*admin-only ooc chat*/ /client/proc/cmd_admin_say, /*admin-only ooc chat*/
@@ -48,7 +50,6 @@ var/list/admin_verbs_admin = list(
/client/proc/jumptokey, /*allows us to jump to the location of a mob with a certain ckey*/ /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/jumptomob, /*allows us to jump to a specific mob*/
/client/proc/jumptoturf, /*allows us to jump to a specific turf*/ /client/proc/jumptoturf, /*allows us to jump to a specific turf*/
/datum/admins/proc/spawn_atom, /*allows us to spawn instances*/
/client/proc/admin_call_shuttle, /*allows us to call the emergency shuttle*/ /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/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_direct_narrate, /*send text directly to a player with no padding. Useful for narratives and fluff-text*/
@@ -86,6 +87,10 @@ var/list/admin_verbs_fun = list(
/client/proc/make_sound, /client/proc/make_sound,
/client/proc/toggle_random_events /client/proc/toggle_random_events
) )
var/list/admin_verbs_spawn = list(
/datum/admins/proc/spawn_atom, /*allows us to spawn instances*/
/client/proc/respawn_character
)
var/list/admin_verbs_server = list( var/list/admin_verbs_server = list(
/client/proc/Set_Holiday, /client/proc/Set_Holiday,
/client/proc/ToRban, /client/proc/ToRban,
@@ -97,8 +102,8 @@ var/list/admin_verbs_server = list(
/datum/admins/proc/immreboot, /datum/admins/proc/immreboot,
/client/proc/everyone_random, /client/proc/everyone_random,
/datum/admins/proc/toggleAI, /datum/admins/proc/toggleAI,
/datum/admins/proc/toggleooc, /client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/
/datum/admins/proc/toggleoocdead, /client/proc/cmd_debug_del_all,
/datum/admins/proc/adrev, /datum/admins/proc/adrev,
/datum/admins/proc/adspawn, /datum/admins/proc/adspawn,
/datum/admins/proc/adjump, /datum/admins/proc/adjump,
@@ -113,6 +118,7 @@ var/list/admin_verbs_debug = list(
/client/proc/kill_airgroup, /client/proc/kill_airgroup,
/client/proc/debug_controller, /client/proc/debug_controller,
/client/proc/cmd_debug_mob_lists, /client/proc/cmd_debug_mob_lists,
/client/proc/cmd_admin_delete,
/client/proc/cmd_debug_del_all, /client/proc/cmd_debug_del_all,
/client/proc/cmd_debug_tog_aliens, /client/proc/cmd_debug_tog_aliens,
/client/proc/air_report, /client/proc/air_report,
@@ -132,7 +138,7 @@ var/list/admin_verbs_rejuv = list(
/client/proc/respawn_character /client/proc/respawn_character
) )
//verbs which can be hidden //verbs which can be hidden - needs work
var/list/admin_verbs_hideable = list( var/list/admin_verbs_hideable = list(
/client/proc/deadmin_self, /client/proc/deadmin_self,
/client/proc/deadchat, /client/proc/deadchat,
@@ -147,7 +153,7 @@ var/list/admin_verbs_hideable = list(
/client/proc/admin_ghost, /client/proc/admin_ghost,
/client/proc/toggle_view_range, /client/proc/toggle_view_range,
/datum/admins/proc/view_txt_log, /datum/admins/proc/view_txt_log,
/datum/admins/proc/view_atk_log, // /datum/admins/proc/view_atk_log,
/client/proc/cmd_admin_subtle_message, /client/proc/cmd_admin_subtle_message,
/client/proc/cmd_admin_check_contents, /client/proc/cmd_admin_check_contents,
/datum/admins/proc/access_news_network, /datum/admins/proc/access_news_network,
@@ -214,22 +220,21 @@ var/list/admin_verbs_hideable = list(
/client/proc/add_admin_verbs() /client/proc/add_admin_verbs()
if(holder) if(holder)
var/rights = holder.rights
verbs += admin_verbs_default verbs += admin_verbs_default
if(rights & R_BUILDMODE) verbs += /client/proc/togglebuildmodeself if(holder.rights & R_BUILDMODE) verbs += /client/proc/togglebuildmodeself
if(rights & R_ADMIN) verbs += admin_verbs_admin if(holder.rights & R_ADMIN) verbs += admin_verbs_admin
if(rights & R_BAN) verbs += admin_verbs_ban if(holder.rights & R_BAN) verbs += admin_verbs_ban
if(rights & R_FUN) verbs += admin_verbs_fun if(holder.rights & R_FUN) verbs += admin_verbs_fun
if(rights & R_SERVER) verbs += admin_verbs_server if(holder.rights & R_SERVER) verbs += admin_verbs_server
if(rights & R_DEBUG) verbs += admin_verbs_debug if(holder.rights & R_DEBUG) verbs += admin_verbs_debug
if(rights & R_POSSESS) verbs += admin_verbs_possess if(holder.rights & R_POSSESS) verbs += admin_verbs_possess
if(rights & R_PERMISSIONS) verbs += admin_verbs_permissions if(holder.rights & R_PERMISSIONS) verbs += admin_verbs_permissions
if(rights & R_STEALTH) verbs += /client/proc/stealth if(holder.rights & R_STEALTH) verbs += /client/proc/stealth
if(rights & R_REJUVINATE) verbs += admin_verbs_rejuv if(holder.rights & R_REJUVINATE) verbs += admin_verbs_rejuv
if(rights & R_SOUNDS) verbs += admin_verbs_sounds if(holder.rights & R_SOUNDS) verbs += admin_verbs_sounds
if(holder.rights & R_SPAWN) verbs += admin_verbs_spawn
/client/proc/remove_admin_verbs() /client/proc/remove_admin_verbs()
if(holder)
verbs.Remove( verbs.Remove(
admin_verbs_default, admin_verbs_default,
/client/proc/togglebuildmodeself, /client/proc/togglebuildmodeself,
@@ -242,6 +247,9 @@ var/list/admin_verbs_hideable = list(
admin_verbs_permissions, admin_verbs_permissions,
/client/proc/stealth, /client/proc/stealth,
admin_verbs_rejuv, admin_verbs_rejuv,
admin_verbs_sounds,
admin_verbs_spawn,
/*Debug verbs added by "show debug verbs"*/
/client/proc/Cell, /client/proc/Cell,
/client/proc/do_not_use_these, /client/proc/do_not_use_these,
/client/proc/camera_view, /client/proc/camera_view,
@@ -259,18 +267,14 @@ var/list/admin_verbs_hideable = list(
/client/proc/cmd_admin_grantfullaccess, /client/proc/cmd_admin_grantfullaccess,
/client/proc/kaboom, /client/proc/kaboom,
/client/proc/splash, /client/proc/splash,
/client/proc/cmd_admin_areatest, /client/proc/cmd_admin_areatest
admin_verbs_sounds
) )
/client/proc/hide_most_verbs()//Allows you to keep some functionality while hiding some verbs /client/proc/hide_most_verbs()//Allows you to keep some functionality while hiding some verbs
set name = "Adminverbs - Hide Most" set name = "Adminverbs - Hide Most"
set category = "Admin" set category = "Admin"
verbs.Remove( verbs.Remove(/client/proc/hide_most_verbs, admin_verbs_hideable)
/client/proc/hide_most_verbs,
admin_verbs_hideable
)
verbs += /client/proc/show_verbs verbs += /client/proc/show_verbs
src << "<span class='interface'>Most of your adminverbs have been hidden.</span>" src << "<span class='interface'>Most of your adminverbs have been hidden.</span>"
@@ -281,21 +285,7 @@ var/list/admin_verbs_hideable = list(
set name = "Adminverbs - Hide All" set name = "Adminverbs - Hide All"
set category = "Admin" set category = "Admin"
verbs.Remove( remove_admin_verbs()
/client/proc/hide_verbs,
/client/proc/hide_most_verbs,
/client/proc/togglebuildmodeself,
admin_verbs_admin,
admin_verbs_ban,
admin_verbs_fun,
admin_verbs_server,
admin_verbs_debug,
admin_verbs_possess,
admin_verbs_permissions,
/client/proc/cmd_admin_rejuvenate,
/client/proc/stealth,
admin_verbs_rejuv
)
verbs += /client/proc/show_verbs verbs += /client/proc/show_verbs
src << "<span class='interface'>Almost all of your adminverbs have been hidden.</span>" src << "<span class='interface'>Almost all of your adminverbs have been hidden.</span>"

View File

@@ -28,11 +28,11 @@ var/list/admin_datums = list()
admin_datums[ckey] = src admin_datums[ckey] = src
/datum/admins/proc/associate(client/C) /datum/admins/proc/associate(client/C)
if(C) if(istype(C))
owner = C owner = C
owner.holder = src owner.holder = src
owner.add_admin_verbs() //TODO owner.add_admin_verbs() //TODO
admins += C admins |= C
/datum/admins/proc/disassociate() /datum/admins/proc/disassociate()
if(owner) if(owner)
@@ -71,6 +71,7 @@ you will have to do something like if(client.rights & R_ADMIN) yourself.
usr << "<font color='red'>Error: You are not an admin.</font>" usr << "<font color='red'>Error: You are not an admin.</font>"
return 0 return 0
//probably a bit iffy - will hopefully figure out a better solution
/proc/check_if_greater_rights_than(client/other) /proc/check_if_greater_rights_than(client/other)
if(usr && usr.client) if(usr && usr.client)
if(usr.client.holder) if(usr.client.holder)
@@ -82,9 +83,6 @@ you will have to do something like if(client.rights & R_ADMIN) yourself.
usr << "<font color='red'>Error: Cannot proceed. They have more or equal rights to us.</font>" usr << "<font color='red'>Error: Cannot proceed. They have more or equal rights to us.</font>"
return 0 return 0
/client/proc/update_admin()
add_admin_verbs()
/client/proc/deadmin() /client/proc/deadmin()
admin_datums -= ckey admin_datums -= ckey

View File

@@ -8,12 +8,7 @@
holder.edit_admin_permissions() holder.edit_admin_permissions()
/datum/admins/proc/edit_admin_permissions() /datum/admins/proc/edit_admin_permissions()
if(!usr.client) if(!check_rights(R_PERMISSIONS)) return
return
if(!usr.client.holder || !(usr.client.holder.rights & R_PERMISSIONS))
usr << "\red You do not have permission to do this!"
return
establish_db_connection() establish_db_connection()
if(!dbcon.IsConnected()) if(!dbcon.IsConnected())

View File

@@ -1,12 +1,10 @@
/datum/admins/Topic(href, href_list) /datum/admins/Topic(href, href_list)
..() ..()
if(usr.client != src.owner) if(usr.client != src.owner || !check_rights(0))
world << "\blue [usr.key] has attempted to override the admin panel!" world << "\blue [usr.key] has attempted to override the admin panel!"
log_admin("[key_name(usr)] tried to use the admin panel without authorization.") log_admin("[key_name(usr)] tried to use the admin panel without authorization.")
return return
if(!check_rights(0)) return //check they are an admin
if(href_list["makeAntag"]) if(href_list["makeAntag"])
switch(href_list["makeAntag"]) switch(href_list["makeAntag"])
if("1") if("1")
@@ -48,39 +46,34 @@
if(!src.makeDeathsquad()) if(!src.makeDeathsquad())
usr << "\red Unfortunatly there were no candidates available" usr << "\red Unfortunatly there were no candidates available"
if(href_list["editadminpermissions"]) else if(href_list["editadminpermissions"])
if(!usr.client)
return
var/adm_ckey = href_list["editadminckey"] var/adm_ckey = href_list["editadminckey"]
if(!adm_ckey) if(!adm_ckey)
usr << "\red no valid ckey" usr << "\red no valid ckey"
return return
if(!usr.client.holder || !(usr.client.holder.rights & R_PERMISSIONS)) if(!check_rights(R_PERMISSIONS))
usr << "\red You do not have permission to do this!" message_admins("[key_name_admin(usr)] attempted to edit the admin permissions of [adm_ckey] without sufficient rights.")
message_admins("[key_name_admin(usr)] attempted to edit the admin permissions of [adm_ckey] without authentication!") log_admin("[key_name(usr)] attempted to edit the admin permissions of [adm_ckey] without sufficient rights.")
log_admin("[key_name(usr)] attempted to edit the admin permissions of [adm_ckey] without authentication!")
return return
switch(href_list["editadminpermissions"]) switch(href_list["editadminpermissions"])
if("permissions") if("permissions")
var/list/permissionlist = list() var/list/permissionlist = list()
for(var/i = 1; i <= R_MAXPERMISSION; i = i << 1) for(var/i=1, i<=R_MAXPERMISSION, i<<=1) //that <<= is shorthand for i = i << 1. Which is a left bitshift
permissionlist[rights2text(i)] = i permissionlist[rights2text(i)] = i
var/new_permission var/new_permission
spawn(0) //Safety spawn(0) //Safety
new_permission = input("Select a permission to turn on/off", "Permission toggle", null, null) as null|anything in permissionlist new_permission = input("Select a permission to turn on/off", "Permission toggle", null, null) as null|anything in permissionlist
if(!new_permission) if(!new_permission) return
return
message_admins("[key_name_admin(usr)] toggled the [new_permission] permission of [adm_ckey]") message_admins("[key_name_admin(usr)] toggled the [new_permission] permission of [adm_ckey]")
log_admin("[key_name(usr)] toggled the [new_permission] permission of [adm_ckey]") log_admin("[key_name(usr)] toggled the [new_permission] permission of [adm_ckey]")
log_admin_permission_modification(adm_ckey, permissionlist[new_permission]) log_admin_permission_modification(adm_ckey, permissionlist[new_permission])
if("rank") if("rank")
var/new_rank = input("Please, select a rank", "New rank for player", null, null) as null|anything in list("Game Master","Game Admin", "Trial Admin", "Admin Observer") var/new_rank = input("Please, select a rank", "New rank for player", null, null) as null|anything in list("Game Master","Game Admin", "Trial Admin", "Admin Observer")
if(!new_rank) if(!new_rank) return
return
message_admins("[key_name_admin(usr)] edited the admin rank of [adm_ckey] to [new_rank]") message_admins("[key_name_admin(usr)] edited the admin rank of [adm_ckey] to [new_rank]")
log_admin("[key_name(usr)] edited the admin rank of [adm_ckey] to [new_rank]") log_admin("[key_name(usr)] edited the admin rank of [adm_ckey] to [new_rank]")
log_admin_rank_modification(adm_ckey, new_rank) log_admin_rank_modification(adm_ckey, new_rank)
@@ -91,11 +84,10 @@
log_admin_rank_modification(adm_ckey, "Removed") log_admin_rank_modification(adm_ckey, "Removed")
if("add") if("add")
var/new_ckey = input(usr,"New admin's ckey","Admin ckey", null) as text|null var/new_ckey = input(usr,"New admin's ckey","Admin ckey", null) as text|null
if(!new_ckey) if(!new_ckey) return
return
var/new_rank = input("Please, select a rank", "New rank for player", null, null) as null|anything in list("Game Master","Game Admin", "Trial Admin", "Admin Observer") var/new_rank = input("Please, select a rank", "New rank for player", null, null) as null|anything in list("Game Master","Game Admin", "Trial Admin", "Admin Observer")
if(!new_rank) if(!new_rank) return
return
message_admins("[key_name_admin(usr)] added [new_ckey] as a new admin to the rank [new_rank]") message_admins("[key_name_admin(usr)] added [new_ckey] as a new admin to the rank [new_rank]")
log_admin("[key_name(usr)] added [new_ckey] as a new admin to the rank [new_rank]") log_admin("[key_name(usr)] added [new_ckey] as a new admin to the rank [new_rank]")
log_admin_rank_modification(new_ckey, new_rank) log_admin_rank_modification(new_ckey, new_rank)
@@ -151,7 +143,7 @@
href_list["secretsadmin"] = "check_antagonist" href_list["secretsadmin"] = "check_antagonist"
else if(href_list["simplemake"]) else if(href_list["simplemake"])
if(!check_rights(R_FUN)) return if(!check_rights(R_SPAWN)) return
var/mob/M = locate(href_list["mob"]) var/mob/M = locate(href_list["mob"])
if(!ismob(M)) if(!ismob(M))
@@ -784,7 +776,7 @@
usr << browse(dat, "window=f_secret") usr << browse(dat, "window=f_secret")
else if(href_list["c_mode2"]) else if(href_list["c_mode2"])
if(!check_rights(R_ADMIN)) return if(!check_rights(R_ADMIN|R_SERVER)) return
if (ticker && ticker.mode) if (ticker && ticker.mode)
return alert(usr, "The game has already started.", null, null, null, null) return alert(usr, "The game has already started.", null, null, null, null)
@@ -797,7 +789,7 @@
.(href, list("c_mode"=1)) .(href, list("c_mode"=1))
else if(href_list["f_secret2"]) else if(href_list["f_secret2"])
if(!check_rights(R_ADMIN)) return if(!check_rights(R_ADMIN|R_SERVER)) return
if(ticker && ticker.mode) if(ticker && ticker.mode)
return alert(usr, "The game has already started.", null, null, null, null) return alert(usr, "The game has already started.", null, null, null, null)
@@ -810,7 +802,7 @@
.(href, list("f_secret"=1)) .(href, list("f_secret"=1))
else if(href_list["monkeyone"]) else if(href_list["monkeyone"])
if(!check_rights(R_FUN)) return if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["monkeyone"]) var/mob/living/carbon/human/H = locate(href_list["monkeyone"])
if(!istype(H)) if(!istype(H))
@@ -822,7 +814,7 @@
H.monkeyize() H.monkeyize()
else if(href_list["corgione"]) else if(href_list["corgione"])
if(!check_rights(R_FUN)) return if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["corgione"]) var/mob/living/carbon/human/H = locate(href_list["corgione"])
if(!istype(H)) if(!istype(H))
@@ -1021,7 +1013,7 @@
usr << "Admin Rejuvinates have been disabled" usr << "Admin Rejuvinates have been disabled"
else if(href_list["makeai"]) else if(href_list["makeai"])
if(!check_rights(R_FUN)) return if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makeai"]) var/mob/living/carbon/human/H = locate(href_list["makeai"])
if(!istype(H)) if(!istype(H))
@@ -1033,7 +1025,7 @@
H.AIize() H.AIize()
else if(href_list["makealien"]) else if(href_list["makealien"])
if(!check_rights(R_FUN)) return if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makealien"]) var/mob/living/carbon/human/H = locate(href_list["makealien"])
if(!istype(H)) if(!istype(H))
@@ -1043,7 +1035,7 @@
usr.client.cmd_admin_alienize(H) usr.client.cmd_admin_alienize(H)
else if(href_list["makemetroid"]) else if(href_list["makemetroid"])
if(!check_rights(R_FUN)) return if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makemetroid"]) var/mob/living/carbon/human/H = locate(href_list["makemetroid"])
if(!istype(H)) if(!istype(H))
@@ -1053,7 +1045,7 @@
usr.client.cmd_admin_metroidize(H) usr.client.cmd_admin_metroidize(H)
else if(href_list["makerobot"]) else if(href_list["makerobot"])
if(!check_rights(R_FUN)) return if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makerobot"]) var/mob/living/carbon/human/H = locate(href_list["makerobot"])
if(!istype(H)) if(!istype(H))
@@ -1063,7 +1055,7 @@
usr.client.cmd_admin_robotize(H) usr.client.cmd_admin_robotize(H)
else if(href_list["makeanimal"]) else if(href_list["makeanimal"])
if(!check_rights(R_FUN)) return if(!check_rights(R_SPAWN)) return
var/mob/M = locate(href_list["makeanimal"]) var/mob/M = locate(href_list["makeanimal"])
if(istype(M, /mob/new_player)) if(istype(M, /mob/new_player))
@@ -1342,19 +1334,19 @@
alert("Cannot make this mob a traitor! It has no mind!") alert("Cannot make this mob a traitor! It has no mind!")
else if(href_list["create_object"]) else if(href_list["create_object"])
if(!check_rights(R_ADMIN)) return if(!check_rights(R_SPAWN)) return
return create_object(usr) return create_object(usr)
else if(href_list["quick_create_object"]) else if(href_list["quick_create_object"])
if(!check_rights(R_ADMIN)) return if(!check_rights(R_SPAWN)) return
return quick_create_object(usr) return quick_create_object(usr)
else if(href_list["create_turf"]) else if(href_list["create_turf"])
if(!check_rights(R_ADMIN)) return if(!check_rights(R_SPAWN)) return
return create_turf(usr) return create_turf(usr)
else if(href_list["create_mob"]) else if(href_list["create_mob"])
if(!check_rights(R_ADMIN)) return if(!check_rights(R_SPAWN)) return
return create_mob(usr) return create_mob(usr)
//Promote or Demote a client. //Promote or Demote a client.
@@ -1377,10 +1369,11 @@
dat += "<A href='?src=\ref[src];chgadlvl=[rank];client4ad=\ref[C]'>[rank]</A><br>" dat += "<A href='?src=\ref[src];chgadlvl=[rank];client4ad=\ref[C]'>[rank]</A><br>"
dat += "<A href='?src=\ref[src];chgadlvl=Remove;client4ad=\ref[C]'>Deadmin</A>" dat += "<A href='?src=\ref[src];chgadlvl=Remove;client4ad=\ref[C]'>Deadmin</A>"
dat += "<br>NOTE: this screen currently does nothing<br>"
usr << browse(dat, "window=prom_demot;size=480x300") usr << browse(dat, "window=prom_demot;size=480x300")
else if(href_list["object_list"]) else if(href_list["object_list"])
if(!check_rights(R_ADMIN)) return if(!check_rights(R_SPAWN)) return
if(!config.allow_admin_spawning) if(!config.allow_admin_spawning)
usr << "Spawning of items is not allowed." usr << "Spawning of items is not allowed."
@@ -1418,7 +1411,6 @@
removed_paths += dirty_path removed_paths += dirty_path
continue continue
else if(ispath(path, /mob)) else if(ispath(path, /mob))
if(!check_rights(R_FUN,0))
removed_paths += dirty_path removed_paths += dirty_path
continue continue
paths += path paths += path
@@ -1538,23 +1530,6 @@
M.client.eye = M M.client.eye = M
del(O) del(O)
ok = 1*/ ok = 1*/
if("toxic")
/*
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","T")
for(var/obj/machinery/atmoalter/siphs/fullairsiphon/O in world)
O.t_status = 3
for(var/obj/machinery/atmoalter/siphs/scrubbers/O in world)
O.t_status = 1
O.t_per = 1000000.0
for(var/obj/machinery/atmoalter/canister/O in world)
if (!( istype(O, /obj/machinery/atmoalter/canister/oxygencanister) ))
O.t_status = 1
O.t_per = 1000000.0
else
O.t_status = 3
*/
usr << "HEH"
if("monkey") if("monkey")
feedback_inc("admin_secrets_fun_used",1) feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","M") feedback_add_details("admin_secrets_fun_used","M")
@@ -1718,18 +1693,12 @@
feedback_inc("admin_secrets_fun_used",1) feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","BC") feedback_add_details("admin_secrets_fun_used","BC")
switch(MAX_EXPLOSION_RANGE) switch(MAX_EXPLOSION_RANGE)
if(14) if(14) MAX_EXPLOSION_RANGE = 16
MAX_EXPLOSION_RANGE = 16 if(16) MAX_EXPLOSION_RANGE = 20
if(16) if(20) MAX_EXPLOSION_RANGE = 28
MAX_EXPLOSION_RANGE = 20 if(28) MAX_EXPLOSION_RANGE = 56
if(20) if(56) MAX_EXPLOSION_RANGE = 128
MAX_EXPLOSION_RANGE = 28 if(128) MAX_EXPLOSION_RANGE = 14
if(28)
MAX_EXPLOSION_RANGE = 56
if(56)
MAX_EXPLOSION_RANGE = 128
if(128)
MAX_EXPLOSION_RANGE = 14
var/range_dev = MAX_EXPLOSION_RANGE *0.25 var/range_dev = MAX_EXPLOSION_RANGE *0.25
var/range_high = MAX_EXPLOSION_RANGE *0.5 var/range_high = MAX_EXPLOSION_RANGE *0.5
var/range_low = MAX_EXPLOSION_RANGE var/range_low = MAX_EXPLOSION_RANGE

View File

@@ -338,6 +338,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
src << "Made [M] a cultist." src << "Made [M] a cultist."
*/ */
//TODO: merge the vievars version into this or something maybe mayhaps
/client/proc/cmd_debug_del_all() /client/proc/cmd_debug_del_all()
set category = "Debug" set category = "Debug"
set name = "Del-All" set name = "Del-All"

View File

@@ -19,7 +19,7 @@
var/move_delay = 1 var/move_delay = 1
var/moving = null var/moving = null
var/adminobs = null var/adminobs = null
var/deadchat = 0 var/deadchat = 1
var/changes = 0 var/changes = 0
var/area = null var/area = null
var/played = 0 var/played = 0

View File

@@ -111,7 +111,7 @@
world.update_status() world.update_status()
if(holder) if(holder)
update_admin() add_admin_verbs()
admin_memo_show() admin_memo_show()
log_client_to_db() log_client_to_db()

View File

@@ -13,7 +13,7 @@
# KEYWORDS: # KEYWORDS:
# +ADMIN = general admin tools, verbs etc # +ADMIN = general admin tools, verbs etc
# +FUN = mob-transformation, events, other event-orientated actions # +FUN = events, other event-orientated actions. Access to the fun secrets in the secrets panel.
# +BAN = the ability to ban, jobban and fullban # +BAN = the ability to ban, jobban and fullban
# +STEALTH = the ability to stealthmin (make yourself appear with a fake name to everyone but other admins # +STEALTH = the ability to stealthmin (make yourself appear with a fake name to everyone but other admins
# +POSSESS = the ability to possess objects # +POSSESS = the ability to possess objects
@@ -24,16 +24,17 @@
# +VAREDIT = everyone may view viewvars/debugvars/whatever you call it. This keyword allows you to actually EDIT those variables. # +VAREDIT = everyone may view viewvars/debugvars/whatever you call it. This keyword allows you to actually EDIT those variables.
# +RIGHTS (or +PERMISSIONS) = allows you to promote and/or demote people. # +RIGHTS (or +PERMISSIONS) = allows you to promote and/or demote people.
# +SOUND (or +SOUNDS) = allows you to upload and play sounds # +SOUND (or +SOUNDS) = allows you to upload and play sounds
# +SPAWN (or +CREATE) = mob transformations, spawning of most atoms including mobs (high-risk atoms, e.g. blackholes, will require the +FUN flag too)
# +EVERYTHING (or +HOST or +ALL) = Simply gives you everything without having to type every flag # +EVERYTHING (or +HOST or +ALL) = Simply gives you everything without having to type every flag
Admin Observer Admin Observer
Moderator +ADMIN Moderator +ADMIN
Admin Candidate +@ Admin Candidate +@
Trial Admin +@ +FUN +REJUV +VAREDIT +BAN Trial Admin +@ +SPAWN +REJUV +VAREDIT +BAN
Badmin +@ +POSSESS +BUILDMODE +SERVER Badmin +@ +POSSESS +BUILDMODE +SERVER +FUN
Game Admin +@ +STEALTH +SOUNDS +DEBUG Game Admin +@ +STEALTH +SOUNDS +DEBUG
Game Master +EVERYTHING Game Master +EVERYTHING
Host +EVERYTHING Host +EVERYTHING
Coder +DEBUG +VAREDIT +SERVER Coder +DEBUG +VAREDIT +SERVER +SPAWN