Merge branch 'master' of https://github.com/tgstation/-tg-station into warnstandardization

Conflicts:
	code/_onclick/telekinesis.dm
This commit is contained in:
Miauw
2014-04-08 14:29:58 +02:00
172 changed files with 15844 additions and 4189 deletions
+1 -5
View File
@@ -566,11 +566,7 @@ var/global/floorIsLava = 0
set category = "Server"
set desc="Toggle dis bitch"
set name="Toggle OOC"
ooc_allowed = !( ooc_allowed )
if (ooc_allowed)
world << "<B>The OOC channel has been globally enabled!</B>"
else
world << "<B>The OOC channel has been globally disabled!</B>"
toggle_ooc()
log_admin("[key_name(usr)] toggled OOC.")
message_admins("[key_name_admin(usr)] toggled OOC.", 1)
feedback_add_details("admin_verb","TOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+22 -19
View File
@@ -3,7 +3,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
/datum/admin_rank
var/name = "NoRank"
var/rights = 0
var/list/adds
var/list/adds
var/list/subs
/datum/admin_rank/New(init_name, init_rights, list/init_adds, list/init_subs)
@@ -74,7 +74,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
next = findchar(line, "+-", prev+1, 0)
R.process_keyword(copytext(line, prev, next), previous_rights)
prev = next
previous_rights = R.rights
else
establish_db_connection()
@@ -117,7 +117,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
var/list/rank_names = list()
for(var/datum/admin_rank/R in admin_ranks)
rank_names[R.name] = R
if(config.admin_legacy_system)
//load text from file
var/list/Lines = file2list("config/admins.txt")
@@ -158,7 +158,10 @@ var/list/admin_ranks = list() //list of all admin_rank datums
while(query.NextRow())
var/ckey = ckey(query.item[1])
var/rank = ckeyEx(query.item[2])
var/datum/admins/D = new(rank, ckey) //create the admin datum and store it for later use
if(rank_names[rank] == null)
error("Admin rank ([rank]) does not exist.")
continue
var/datum/admins/D = new(rank_names[rank], ckey) //create the admin datum and store it for later use
if(!D) continue //will occur if an invalid rank is provided
D.associate(directory[ckey]) //find the client for a ckey if they are connected and associate them with the new admin datum
@@ -214,7 +217,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
return
var/datum/admins/D = admin_datums[adm_ckey]
switch(task)
if("remove")
if(alert("Are you sure you want to remove [adm_ckey]?","Message","Yes","Cancel") == "Yes")
@@ -228,57 +231,57 @@ var/list/admin_ranks = list() //list of all admin_rank datums
if("rank")
var/datum/admin_rank/R
var/list/rank_names = list("*New Rank*")
for(R in admin_ranks)
rank_names[R.name] = R
var/new_rank = input("Please select a rank", "New rank", null, null) as null|anything in rank_names
switch(new_rank)
if(null) return
if("*New Rank*")
new_rank = ckeyEx(input("Please input a new rank", "New custom rank", null, null) as null|text)
if(!new_rank) return
R = rank_names[new_rank]
if(!R) //rank with that name doesn't exist yet - make it
if(D) R = new(new_rank, D.rank.rights, D.rank.adds, D.rank.subs) //duplicate our previous admin_rank but with a new name
else R = new(new_rank) //blank new admin_rank
admin_ranks += R
if(D) //they were previously an admin
D.disassociate() //existing admin needs to be disassociated
D.rank = R //set the admin_rank as our rank
else
D = new(R,adm_ckey) //new admin
var/client/C = directory[adm_ckey] //find the client with the specified ckey (if they are logged in)
D.associate(C) //link up with the client and add verbs
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_rank_modification(adm_ckey, new_rank)
if("permissions")
if(!D) return //they're not an admin!
var/keyword = input("Input permission keyword (one at a time):\ne.g. +BAN or -FUN or +/client/proc/someverb", "Permission toggle", null, null) as null|text
if(!keyword) return
D.disassociate()
if(!findtext(D.rank.name, "([adm_ckey])")) //not a modified subrank, need to duplicate the admin_rank datum to prevent modifying others too
D.rank = new("[D.rank.name]([adm_ckey])", D.rank.rights, D.rank.adds, D.rank.subs) //duplicate our previous admin_rank but with a new name
//we don't add this clone to the admin_ranks list, as it is unique to that ckey
D.rank.process_keyword(keyword)
var/client/C = directory[adm_ckey] //find the client with the specified ckey (if they are logged in)
D.associate(C) //link up with the client and add verbs
message_admins("[key_name(usr)] added keyword [keyword] to permission of [adm_ckey]")
log_admin("[key_name(usr)] added keyword [keyword] to permission of [adm_ckey]")
log_admin_permission_modification(adm_ckey, D.rank.rights)
edit_admin_permissions()
+24
View File
@@ -626,6 +626,8 @@ var/global/list/g_fancy_list_of_safe_types = null
"tournament gangster",
"tournament chef",
"tournament janitor",
"lasertag red",
"lasertag blue",
"pirate",
"space pirate",
"soviet admiral",
@@ -745,6 +747,28 @@ var/global/list/g_fancy_list_of_safe_types = null
M.equip_to_slot_or_del(new /obj/item/stack/tile/plasteel(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/tile/plasteel(M), slot_in_backpack)
if ("lasertag red")
M.equip_to_slot_or_del(new /obj/item/clothing/under/color/red(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/red(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/red(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/redtaghelm(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/redtag(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/laser/redtag(M), slot_s_store)
if ("lasertag blue")
M.equip_to_slot_or_del(new /obj/item/clothing/under/color/blue(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/blue(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/blue(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/bluetaghelm(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/bluetag(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/laser/bluetag(M), slot_s_store)
if ("pirate")
M.equip_to_slot_or_del(new /obj/item/clothing/under/pirate(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(M), slot_shoes)
+15 -51
View File
@@ -1,17 +1,28 @@
#define SOUND_CHANNEL_ADMIN 777
var/sound/admin_sound
/client/proc/play_sound(S as sound)
set category = "Fun"
set name = "Play Global Sound"
if(!check_rights(R_SOUNDS)) return
var/sound/uploaded_sound = sound(S, repeat = 0, wait = 1, channel = 777)
uploaded_sound.priority = 250
admin_sound = sound(S, repeat = 0, wait = 1, channel = SOUND_CHANNEL_ADMIN)
admin_sound.priority = 250
admin_sound.status = SOUND_UPDATE|SOUND_STREAM
log_admin("[key_name(src)] played sound [S]")
message_admins("[key_name_admin(src)] played sound [S]", 1)
if(events.holiday == "April Fool's Day")
admin_sound.frequency = pick(0.5, 0.7, 0.8, 0.85, 0.9, 0.95, 1.1, 1.2, 1.4, 1.6, 2.0, 2.5)
src << "You feel the Honkmother messing with your song..."
for(var/mob/M in player_list)
if(M.client.prefs.toggles & SOUND_MIDI)
M << uploaded_sound
M << admin_sound
admin_sound.frequency = 1 //Remove this line when the AFD stuff above is gone
admin_sound.wait = 0
feedback_add_details("admin_verb","PGS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -39,51 +50,4 @@
else
return
/*
/client/proc/cuban_pete()
set category = "Fun"
set name = "Cuban Pete Time"
message_admins("[key_name_admin(usr)] has declared Cuban Pete Time!", 1)
for(var/mob/M in world)
if(M.client)
if(M.client.midis)
M << 'cubanpetetime.ogg'
for(var/mob/living/carbon/human/CP in world)
if(CP.real_name=="Cuban Pete" && CP.key!="Rosham")
CP << "Your body can't contain the rhumba beat"
CP.gib()
/client/proc/bananaphone()
set category = "Fun"
set name = "Banana Phone"
message_admins("[key_name_admin(usr)] has activated Banana Phone!", 1)
for(var/mob/M in world)
if(M.client)
if(M.client.midis)
M << 'bananaphone.ogg'
client/proc/space_asshole()
set category = "Fun"
set name = "Space Asshole"
message_admins("[key_name_admin(usr)] has played the Space Asshole Hymn.", 1)
for(var/mob/M in world)
if(M.client)
if(M.client.midis)
M << 'space_asshole.ogg'
client/proc/honk_theme()
set category = "Fun"
set name = "Honk"
message_admins("[key_name_admin(usr)] has creeped everyone out with Blackest Honks.", 1)
for(var/mob/M in world)
if(M.client)
if(M.client.midis)
M << 'honk_theme.ogg'*/
#undef SOUND_CHANNEL_ADMIN