Does the rest of the if()'s/ else's

This commit is contained in:
Firecage
2016-01-17 19:03:12 +02:00
parent 754491ce4c
commit 332bde0f4f
186 changed files with 2169 additions and 1085 deletions
+10 -5
View File
@@ -3,7 +3,8 @@
//Either pass the mob you wish to ban in the 'banned_mob' attribute, or the banckey, banip and bancid variables. If both are passed, the mob takes priority! If a mob is not passed, banckey is the minimum that needs to be passed! banip and bancid are optional.
/datum/admins/proc/DB_ban_record(bantype, mob/banned_mob, duration = -1, reason, job = "", rounds = 0, banckey = null, banip = null, bancid = null)
if(!check_rights(R_BAN)) return
if(!check_rights(R_BAN))
return
establish_db_connection()
if(!dbcon.IsConnected())
@@ -140,7 +141,8 @@
/datum/admins/proc/DB_ban_unban(ckey, bantype, job = "")
if(!check_rights(R_BAN)) return
if(!check_rights(R_BAN))
return
var/bantype_str
if(bantype)
@@ -218,7 +220,8 @@
/datum/admins/proc/DB_ban_edit(banid = null, param = null)
if(!check_rights(R_BAN)) return
if(!check_rights(R_BAN))
return
if(!isnum(banid) || !istext(param))
usr << "Cancelled"
@@ -278,7 +281,8 @@
/datum/admins/proc/DB_ban_unban_by_id(id)
if(!check_rights(R_BAN)) return
if(!check_rights(R_BAN))
return
var/sql = "SELECT ckey FROM [format_table_name("ban")] WHERE id = [id]"
@@ -332,7 +336,8 @@
if(!usr.client)
return
if(!check_rights(R_BAN)) return
if(!check_rights(R_BAN))
return
establish_db_connection()
if(!dbcon.IsConnected())
+4 -2
View File
@@ -183,8 +183,10 @@ var/savefile/Banlist
var/expiry
if(Banlist["temp"])
expiry = GetExp(Banlist["minutes"])
if(!expiry) expiry = "Removal Pending"
else expiry = "Permaban"
if(!expiry)
expiry = "Removal Pending"
else
expiry = "Permaban"
dat += text("<tr><td><A href='?src=[ref];unbanf=[key][id]'>(U)</A><A href='?src=[ref];unbane=[key][id]'>(E)</A> Key: <B>[key]</B></td><td>ComputerID: <B>[id]</B></td><td>IP: <B>[ip]</B></td><td> [expiry]</td><td>(By: [by])</td><td>(Reason: [reason])</td></tr>")
+8 -4
View File
@@ -379,7 +379,8 @@ var/global/BSACooldown = 0
/datum/admins/proc/Game()
if(!check_rights(0)) return
if(!check_rights(0))
return
var/dat = {"
<center><B>Game Panel</B></center><hr>\n
@@ -439,7 +440,8 @@ var/global/BSACooldown = 0
set category = "Special Verbs"
set name = "Announce"
set desc="Announce your desires to the world"
if(!check_rights(0)) return
if(!check_rights(0))
return
var/message = input("Global message to send:", "Admin Announce", null, null) as message
if(message)
@@ -453,7 +455,8 @@ var/global/BSACooldown = 0
set category = "Special Verbs"
set name = "Set Admin Notice"
set desc ="Set an announcement that appears to everyone who joins the server. Only lasts this round"
if(!check_rights(0)) return
if(!check_rights(0))
return
var/new_admin_notice = input(src,"Set a public notice for this round. Everyone who joins the server will see it.\n(Leaving it blank will delete the current notice):","Set Notice",admin_notice) as message|null
if(new_admin_notice == null)
@@ -613,7 +616,8 @@ var/global/BSACooldown = 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/matches = get_fancy_list_of_types()
if (!isnull(object) && object!="")
+8 -4
View File
@@ -12,20 +12,24 @@
return file("[INVESTIGATE_DIR][subject].html")
/proc/investigate_reset()
if(fdel(INVESTIGATE_DIR)) return 1
if(fdel(INVESTIGATE_DIR))
return 1
return 0
/atom/proc/investigate_log(message, subject)
if(!message) return
if(!message)
return
var/F = investigate_subject2file(subject)
if(!F) return
if(!F)
return
F << "<small>[time_stamp()] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
//ADMINVERBS
/client/proc/investigate_show( subject in list("hrefs","notes","watchlist","singulo","wires","telesci", "gravity", "records", "cargo", "supermatter", "atmos", "experimentor", "kudzu") )
set name = "Investigate"
set category = "Admin"
if(!holder) return
if(!holder)
return
switch(subject)
if("singulo", "wires", "telesci", "gravity", "records", "cargo", "supermatter", "atmos", "kudzu") //general one-round-only stuff
var/F = investigate_subject2file(subject)
+2 -1
View File
@@ -1,7 +1,8 @@
/client/proc/admin_memo()
set name = "Memo"
set category = "Server"
if(!check_rights(0)) return
if(!check_rights(0))
return
if(!dbcon.IsConnected())
src << "<span class='danger'>Failed to establish database connection.</span>"
return
+80 -40
View File
@@ -14,30 +14,48 @@ var/list/admin_ranks = list() //list of all admin_rank datums
qdel(src)
throw EXCEPTION("invalid admin-rank name")
return
if(init_rights) rights = init_rights
if(!init_adds) init_adds = list()
if(!init_subs) init_subs = list()
if(init_rights)
rights = init_rights
if(!init_adds)
init_adds = list()
if(!init_subs)
init_subs = list()
adds = init_adds
subs = init_subs
/proc/admin_keyword_to_flag(word, previous_rights=0)
var/flag = 0
switch(ckey(word))
if("buildmode","build") flag = R_BUILDMODE
if("admin") flag = R_ADMIN
if("ban") flag = R_BAN
if("fun") flag = R_FUN
if("server") flag = R_SERVER
if("debug") flag = R_DEBUG
if("permissions","rights") flag = R_PERMISSIONS
if("possess") flag = R_POSSESS
if("stealth") flag = R_STEALTH
if("rejuv","rejuvinate") flag = R_REJUVINATE
if("varedit") flag = R_VAREDIT
if("everything","host","all") flag = 65535
if("sound","sounds") flag = R_SOUNDS
if("spawn","create") flag = R_SPAWN
if("@","prev") flag = previous_rights
if("buildmode","build")
flag = R_BUILDMODE
if("admin")
flag = R_ADMIN
if("ban")
flag = R_BAN
if("fun")
flag = R_FUN
if("server")
flag = R_SERVER
if("debug")
flag = R_DEBUG
if("permissions","rights")
flag = R_PERMISSIONS
if("possess")
flag = R_POSSESS
if("stealth")
flag = R_STEALTH
if("rejuv","rejuvinate")
flag = R_REJUVINATE
if("varedit")
flag = R_VAREDIT
if("everything","host","all")
flag = 65535
if("sound","sounds")
flag = R_SOUNDS
if("spawn","create")
flag = R_SPAWN
if("@","prev")
flag = previous_rights
return flag
/proc/admin_keyword_to_path(word) //use this with verb keywords eg +/client/proc/blah
@@ -48,8 +66,10 @@ var/list/admin_ranks = list() //list of all admin_rank datums
var/flag = admin_keyword_to_flag(word, previous_rights)
if(flag)
switch(text2ascii(word,1))
if(43) rights |= flag //+
if(45) rights &= ~flag //-
if(43)
rights |= flag //+
if(45)
rights &= ~flag //-
else
//isn't a keyword so maybe it's a verbpath?
var/path = admin_keyword_to_path(word)
@@ -82,12 +102,15 @@ var/list/admin_ranks = list() //list of all admin_rank datums
var/previous_rights = 0
//load text from file and process each line seperately
for(var/line in file2list("config/admin_ranks.txt"))
if(!line) continue
if(findtextEx(line,"#",1,2)) continue
if(!line)
continue
if(findtextEx(line,"#",1,2))
continue
var/next = findtext(line, "=")
var/datum/admin_rank/R = new(ckeyEx(copytext(line, 1, next)))
if(!R) continue
if(!R)
continue
admin_ranks += R
var/prev = findchar(line, "+-", next, 0)
@@ -111,9 +134,11 @@ var/list/admin_ranks = list() //list of all admin_rank datums
while(query.NextRow())
var/rank_name = ckeyEx(query.item[1])
var/flags = query.item[2]
if(istext(flags)) flags = text2num(flags)
if(istext(flags))
flags = text2num(flags)
var/datum/admin_rank/R = new(rank_name, flags)
if(!R) continue
if(!R)
continue
admin_ranks += R
#ifdef TESTING
@@ -121,7 +146,8 @@ var/list/admin_ranks = list() //list of all admin_rank datums
for(var/datum/admin_rank/R in admin_ranks)
msg += "\t[R.name]"
var/rights = rights2text(R.rights,"\n\t\t",R.adds,R.subs)
if(rights) msg += "\t\t[rights]\n"
if(rights)
msg += "\t\t[rights]\n"
testing(msg)
#endif
@@ -145,16 +171,20 @@ var/list/admin_ranks = list() //list of all admin_rank datums
//process each line seperately
for(var/line in Lines)
if(!length(line)) continue
if(findtextEx(line,"#",1,2)) continue
if(!length(line))
continue
if(findtextEx(line,"#",1,2))
continue
//Split the line at every "="
var/list/List = text2list(line, "=")
if(!List.len) continue
if(!List.len)
continue
//ckey is before the first "="
var/ckey = ckey(List[1])
if(!ckey) continue
if(!ckey)
continue
//rank follows the first "="
var/rank = ""
@@ -162,7 +192,8 @@ var/list/admin_ranks = list() //list of all admin_rank datums
rank = ckeyEx(List[2])
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
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
else
@@ -183,7 +214,8 @@ var/list/admin_ranks = list() //list of all admin_rank datums
WARNING("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
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
#ifdef TESTING
@@ -225,7 +257,8 @@ var/list/admin_ranks = list() //list of all admin_rank datums
switch(task)
if("add")
var/new_ckey = ckey(input(usr,"New admin's ckey","Admin ckey", null) as text|null)
if(!new_ckey) return
if(!new_ckey)
return
if(new_ckey in admin_datums)
usr << "<font color='red'>Error: Topic 'editrights': [new_ckey] is already an admin</font>"
return
@@ -242,7 +275,8 @@ var/list/admin_ranks = list() //list of all admin_rank datums
switch(task)
if("remove")
if(alert("Are you sure you want to remove [adm_ckey]?","Message","Yes","Cancel") == "Yes")
if(!D) return
if(!D)
return
if(!check_if_greater_rights_than_holder(D))
message_admins("[key_name_admin(usr)] attempted to remove [adm_ckey] from the admins list without sufficient rights.")
log_admin("[key_name(usr)] attempted to remove [adm_ckey] from the admins list without sufficient rights.")
@@ -265,10 +299,12 @@ var/list/admin_ranks = list() //list of all admin_rank datums
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(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
if(!new_rank)
return
if(D)
if(!check_if_greater_rights_than_holder(D))
@@ -278,8 +314,10 @@ var/list/admin_ranks = list() //list of all admin_rank datums
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
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
@@ -297,10 +335,12 @@ var/list/admin_ranks = list() //list of all admin_rank datums
log_admin_rank_modification(adm_ckey, new_rank)
if("permissions")
if(!D) return //they're not an admin!
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
if(!keyword)
return
if(!check_keyword(keyword) || !check_if_greater_rights_than_holder(D))
message_admins("[key_name_admin(usr)] attempted to give [adm_ckey] the keyword [keyword] without sufficient rights.")
+30 -15
View File
@@ -226,18 +226,30 @@ var/list/admin_verbs_hideable = list(
var/rights = holder.rank.rights
verbs += admin_verbs_default
if(rights & R_BUILDMODE) verbs += /client/proc/togglebuildmodeself
if(rights & R_ADMIN) verbs += admin_verbs_admin
if(rights & R_BAN) verbs += admin_verbs_ban
if(rights & R_FUN) verbs += admin_verbs_fun
if(rights & R_SERVER) verbs += admin_verbs_server
if(rights & R_DEBUG) verbs += admin_verbs_debug
if(rights & R_POSSESS) verbs += admin_verbs_possess
if(rights & R_PERMISSIONS) verbs += admin_verbs_permissions
if(rights & R_STEALTH) verbs += /client/proc/stealth
if(rights & R_REJUVINATE) verbs += admin_verbs_rejuv
if(rights & R_SOUNDS) verbs += admin_verbs_sounds
if(rights & R_SPAWN) verbs += admin_verbs_spawn
if(rights & R_BUILDMODE)
verbs += /client/proc/togglebuildmodeself
if(rights & R_ADMIN)
verbs += admin_verbs_admin
if(rights & R_BAN)
verbs += admin_verbs_ban
if(rights & R_FUN)
verbs += admin_verbs_fun
if(rights & R_SERVER)
verbs += admin_verbs_server
if(rights & R_DEBUG)
verbs += admin_verbs_debug
if(rights & R_POSSESS)
verbs += admin_verbs_possess
if(rights & R_PERMISSIONS)
verbs += admin_verbs_permissions
if(rights & R_STEALTH)
verbs += /client/proc/stealth
if(rights & R_REJUVINATE)
verbs += admin_verbs_rejuv
if(rights & R_SOUNDS)
verbs += admin_verbs_sounds
if(rights & R_SPAWN)
verbs += admin_verbs_spawn
for(var/path in holder.rank.adds)
verbs += path
@@ -318,7 +330,8 @@ var/list/admin_verbs_hideable = list(
/client/proc/admin_ghost()
set category = "Admin"
set name = "Aghost"
if(!holder) return
if(!holder)
return
if(istype(mob,/mob/dead/observer))
//re-enter
var/mob/dead/observer/ghost = mob
@@ -430,7 +443,8 @@ var/list/admin_verbs_hideable = list(
mob.name = initial(mob.name)
else
var/new_key = ckeyEx(input("Enter your desired display name.", "Fake Key", key) as text|null)
if(!new_key) return
if(!new_key)
return
if(length(new_key) >= 26)
new_key = copytext(new_key, 1, 26)
holder.fakekey = new_key
@@ -547,7 +561,8 @@ var/list/admin_verbs_hideable = list(
/client/proc/toggle_log_hrefs()
set name = "Toggle href logging"
set category = "Server"
if(!holder) return
if(!holder)
return
if(config)
if(config.log_hrefs)
config.log_hrefs = 0
+2 -1
View File
@@ -81,7 +81,8 @@ DEBUG
log_admin("Updating appearancefile!")
// Updates bans.. Or fixes them. Either way.
for(var/T in appearance_keylist)
if(!T) continue
if(!T)
continue
appearanceban_runonce++ //don't run this update again
+2 -1
View File
@@ -1,7 +1,8 @@
/client/proc/create_poll()
set name = "Create Poll"
set category = "Special Verbs"
if(!check_rights(R_PERMISSIONS)) return
if(!check_rights(R_PERMISSIONS))
return
if(!dbcon.IsConnected())
src << "<span class='danger'>Failed to establish database connection.</span>"
return
@@ -2,11 +2,13 @@
set category = "Admin"
set name = "Permissions Panel"
set desc = "Edit admin permissions"
if(!check_rights(R_PERMISSIONS)) return
if(!check_rights(R_PERMISSIONS))
return
usr.client.holder.edit_admin_permissions()
/datum/admins/proc/edit_admin_permissions()
if(!check_rights(R_PERMISSIONS)) return
if(!check_rights(R_PERMISSIONS))
return
var/output = {"<!DOCTYPE html>
<html>
@@ -27,7 +29,8 @@
for(var/adm_ckey in admin_datums)
var/datum/admins/D = admin_datums[adm_ckey]
if(!D) continue
if(!D)
continue
var/rights = rights2text(D.rank.rights," ")
if(!rights) rights = "*none*"
@@ -48,7 +51,8 @@
usr << browse(output,"window=editrights;size=900x650")
/datum/admins/proc/log_admin_rank_modification(adm_ckey, new_rank)
if(config.admin_legacy_system) return
if(config.admin_legacy_system)
return
if(!usr.client)
return
@@ -98,9 +102,12 @@
/datum/admins/proc/log_admin_permission_modification(adm_ckey, new_permission)
if(config.admin_legacy_system) return
if(!usr.client) return
if(check_rights(R_PERMISSIONS)) return
if(config.admin_legacy_system)
return
if(!usr.client)
return
if(check_rights(R_PERMISSIONS))
return
establish_db_connection()
if(!dbcon.IsConnected())
@@ -117,7 +124,8 @@
while(select_query.NextRow())
admin_id = text2num(select_query.item[1])
if(!admin_id) return
if(!admin_id)
return
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `[format_table_name("admin")]` SET flags = [new_permission] WHERE id = [admin_id]")
insert_query.Execute()
+2 -1
View File
@@ -101,7 +101,8 @@
dat += "[line]<BR>"
dat+= "*******<BR><BR>"
for(var/datum/job/job in SSjob.occupations)
if(!job) continue
if(!job)
continue
dat += "job: [job.title], current_positions: [job.current_positions], total_positions: [job.total_positions] <BR>"
usr << browse(dat, "window=jobdebug;size=600x500")
+270 -135
View File
@@ -135,7 +135,8 @@
log_admin("[key_name(usr)] failed to create a shadowling.")
else if(href_list["forceevent"])
if(!check_rights(R_FUN)) return
if(!check_rights(R_FUN))
return
var/datum/round_event_control/E = locate(href_list["forceevent"]) in SSevent.control
if(E)
var/datum/round_event/event = E.runEvent()
@@ -245,7 +246,8 @@
edit_rights_topic(href_list)
else if(href_list["call_shuttle"])
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
switch(href_list["call_shuttle"])
@@ -273,7 +275,8 @@
href_list["secrets"] = "check_antagonist"
else if(href_list["edit_shuttle_time"])
if(!check_rights(R_SERVER)) return
if(!check_rights(R_SERVER))
return
var/timer = input("Enter new shuttle duration (seconds):","Edit Shuttle Timeleft", SSshuttle.emergency.timeLeft() ) as num
SSshuttle.emergency.setTimer(timer*10)
@@ -283,7 +286,8 @@
href_list["secrets"] = "check_antagonist"
else if(href_list["toggle_continuous"])
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
if(!config.continuous[ticker.mode.config_tag])
config.continuous[ticker.mode.config_tag] = 1
@@ -294,7 +298,8 @@
check_antagonists()
else if(href_list["toggle_midround_antag"])
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
if(!config.midround_antag[ticker.mode.config_tag])
config.midround_antag[ticker.mode.config_tag] = 1
@@ -305,7 +310,8 @@
check_antagonists()
else if(href_list["alter_midround_time_limit"])
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
var/timer = input("Enter new maximum time",, config.midround_antag_time_check ) as num
if(timer)
@@ -315,7 +321,8 @@
check_antagonists()
else if(href_list["alter_midround_life_limit"])
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
var/ratio = input("Enter new life ratio",, config.midround_antag_life_check*100) as num
if(ratio)
@@ -325,7 +332,8 @@
check_antagonists()
else if(href_list["toggle_noncontinuous_behavior"])
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
if(!ticker.mode.round_ends_with_antag_death)
ticker.mode.round_ends_with_antag_death = 1
@@ -336,7 +344,8 @@
check_antagonists()
else if(href_list["delay_round_end"])
if(!check_rights(R_SERVER)) return
if(!check_rights(R_SERVER))
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"].")
@@ -344,7 +353,8 @@
href_list["secrets"] = "check_antagonist"
else if(href_list["end_round"])
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
message_admins("<span class='adminnotice'>[key_name_admin(usr)] is considering ending the round.</span>")
if(alert(usr, "This will end the round, are you SURE you want to do this?", "Confirmation", "Yes", "No") == "Yes")
@@ -358,7 +368,8 @@
message_admins("<span class='adminnotice'>[key_name_admin(usr)] decided against ending the round.</span>")
else if(href_list["simplemake"])
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
var/mob/M = locate(href_list["mob"])
if(!ismob(M))
@@ -367,42 +378,69 @@
var/delmob = 0
switch(alert("Delete old mob?","Message","Yes","No","Cancel"))
if("Cancel") return
if("Yes") delmob = 1
if("Cancel")
return
if("Yes")
delmob = 1
log_admin("[key_name(usr)] has used rudimentary transformation on [key_name(M)]. Transforming to [href_list["simplemake"]]; deletemob=[delmob]")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has used rudimentary transformation on [key_name_admin(M)]. Transforming to [href_list["simplemake"]]; deletemob=[delmob]</span>")
switch(href_list["simplemake"])
if("observer") M.change_mob_type( /mob/dead/observer , null, null, delmob )
if("drone") M.change_mob_type( /mob/living/carbon/alien/humanoid/drone , null, null, delmob )
if("hunter") M.change_mob_type( /mob/living/carbon/alien/humanoid/hunter , null, null, delmob )
if("queen") M.change_mob_type( /mob/living/carbon/alien/humanoid/royal/queen , null, null, delmob )
if("praetorian") M.change_mob_type( /mob/living/carbon/alien/humanoid/royal/praetorian , null, null, delmob )
if("sentinel") M.change_mob_type( /mob/living/carbon/alien/humanoid/sentinel , null, null, delmob )
if("larva") M.change_mob_type( /mob/living/carbon/alien/larva , null, null, delmob )
if("human") M.change_mob_type( /mob/living/carbon/human , null, null, delmob )
if("slime") M.change_mob_type( /mob/living/simple_animal/slime , null, null, delmob )
if("monkey") M.change_mob_type( /mob/living/carbon/monkey , null, null, delmob )
if("robot") M.change_mob_type( /mob/living/silicon/robot , null, null, delmob )
if("cat") M.change_mob_type( /mob/living/simple_animal/pet/cat , null, null, delmob )
if("runtime") M.change_mob_type( /mob/living/simple_animal/pet/cat/Runtime , null, null, delmob )
if("corgi") M.change_mob_type( /mob/living/simple_animal/pet/dog/corgi , null, null, delmob )
if("ian") M.change_mob_type( /mob/living/simple_animal/pet/dog/corgi/Ian , null, null, delmob )
if("pug") M.change_mob_type( /mob/living/simple_animal/pet/dog/pug , null, null, delmob )
if("crab") M.change_mob_type( /mob/living/simple_animal/crab , null, null, delmob )
if("coffee") M.change_mob_type( /mob/living/simple_animal/crab/Coffee , null, null, delmob )
if("parrot") M.change_mob_type( /mob/living/simple_animal/parrot , null, null, delmob )
if("polyparrot") M.change_mob_type( /mob/living/simple_animal/parrot/Poly , null, null, delmob )
if("constructarmored") M.change_mob_type( /mob/living/simple_animal/hostile/construct/armored , null, null, delmob )
if("constructbuilder") M.change_mob_type( /mob/living/simple_animal/hostile/construct/builder , null, null, delmob )
if("constructwraith") M.change_mob_type( /mob/living/simple_animal/hostile/construct/wraith , null, null, delmob )
if("shade") M.change_mob_type( /mob/living/simple_animal/shade , null, null, delmob )
if("observer")
M.change_mob_type( /mob/dead/observer , null, null, delmob )
if("drone")
M.change_mob_type( /mob/living/carbon/alien/humanoid/drone , null, null, delmob )
if("hunter")
M.change_mob_type( /mob/living/carbon/alien/humanoid/hunter , null, null, delmob )
if("queen")
M.change_mob_type( /mob/living/carbon/alien/humanoid/royal/queen , null, null, delmob )
if("praetorian")
M.change_mob_type( /mob/living/carbon/alien/humanoid/royal/praetorian , null, null, delmob )
if("sentinel")
M.change_mob_type( /mob/living/carbon/alien/humanoid/sentinel , null, null, delmob )
if("larva")
M.change_mob_type( /mob/living/carbon/alien/larva , null, null, delmob )
if("human")
M.change_mob_type( /mob/living/carbon/human , null, null, delmob )
if("slime")
M.change_mob_type( /mob/living/simple_animal/slime , null, null, delmob )
if("monkey")
M.change_mob_type( /mob/living/carbon/monkey , null, null, delmob )
if("robot")
M.change_mob_type( /mob/living/silicon/robot , null, null, delmob )
if("cat")
M.change_mob_type( /mob/living/simple_animal/pet/cat , null, null, delmob )
if("runtime")
M.change_mob_type( /mob/living/simple_animal/pet/cat/Runtime , null, null, delmob )
if("corgi")
M.change_mob_type( /mob/living/simple_animal/pet/dog/corgi , null, null, delmob )
if("ian")
M.change_mob_type( /mob/living/simple_animal/pet/dog/corgi/Ian , null, null, delmob )
if("pug")
M.change_mob_type( /mob/living/simple_animal/pet/dog/pug , null, null, delmob )
if("crab")
M.change_mob_type( /mob/living/simple_animal/crab , null, null, delmob )
if("coffee")
M.change_mob_type( /mob/living/simple_animal/crab/Coffee , null, null, delmob )
if("parrot")
M.change_mob_type( /mob/living/simple_animal/parrot , null, null, delmob )
if("polyparrot")
M.change_mob_type( /mob/living/simple_animal/parrot/Poly , null, null, delmob )
if("constructarmored")
M.change_mob_type( /mob/living/simple_animal/hostile/construct/armored , null, null, delmob )
if("constructbuilder")
M.change_mob_type( /mob/living/simple_animal/hostile/construct/builder , null, null, delmob )
if("constructwraith")
M.change_mob_type( /mob/living/simple_animal/hostile/construct/wraith , null, null, delmob )
if("shade")
M.change_mob_type( /mob/living/simple_animal/shade , null, null, delmob )
/////////////////////////////////////new ban stuff
else if(href_list["unbanf"])
if(!check_rights(R_BAN)) return
if(!check_rights(R_BAN))
return
var/banfolder = href_list["unbanf"]
Banlist.cd = "/base/[banfolder]"
@@ -415,7 +453,8 @@
unbanpanel()
else if(href_list["unbane"])
if(!check_rights(R_BAN)) return
if(!check_rights(R_BAN))
return
UpdateTime()
var/reason
@@ -439,16 +478,19 @@
if(minutes > CMinutes)
mins = minutes - CMinutes
mins = input(usr,"How long (in minutes)? (Default: 1440)","Ban time",mins ? mins : 1440) as num|null
if(!mins) return
if(!mins)
return
minutes = CMinutes + mins
duration = GetExp(minutes)
reason = input(usr,"Please State Reason","Reason",reason2) as message
if(!reason) return
if(!reason)
return
if("No")
temp = 0
duration = "Perma"
reason = input(usr,"Please State Reason","Reason",reason2) as message
if(!reason) return
if(!reason)
return
log_admin("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]")
ban_unban_log_save("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]")
@@ -535,9 +577,11 @@
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
jobs += "<tr align='center' bgcolor='ccccff'><th colspan='[length(command_positions)]'><a href='?src=\ref[src];jobban3=commanddept;jobban4=\ref[M]'>Command Positions</a></th></tr><tr align='center'>"
for(var/jobPos in command_positions)
if(!jobPos) continue
if(!jobPos)
continue
var/datum/job/job = SSjob.GetJob(jobPos)
if(!job) continue
if(!job)
continue
if(jobban_isbanned(M, job.title))
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=[job.title];jobban4=\ref[M]'><font color=red>[replacetext(job.title, " ", "&nbsp")]</font></a></td>"
@@ -556,9 +600,11 @@
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
jobs += "<tr bgcolor='ffddf0'><th colspan='[length(security_positions)]'><a href='?src=\ref[src];jobban3=securitydept;jobban4=\ref[M]'>Security Positions</a></th></tr><tr align='center'>"
for(var/jobPos in security_positions)
if(!jobPos) continue
if(!jobPos)
continue
var/datum/job/job = SSjob.GetJob(jobPos)
if(!job) continue
if(!job)
continue
if(jobban_isbanned(M, job.title))
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=[job.title];jobban4=\ref[M]'><font color=red>[replacetext(job.title, " ", "&nbsp")]</font></a></td>"
@@ -577,9 +623,11 @@
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
jobs += "<tr bgcolor='fff5cc'><th colspan='[length(engineering_positions)]'><a href='?src=\ref[src];jobban3=engineeringdept;jobban4=\ref[M]'>Engineering Positions</a></th></tr><tr align='center'>"
for(var/jobPos in engineering_positions)
if(!jobPos) continue
if(!jobPos)
continue
var/datum/job/job = SSjob.GetJob(jobPos)
if(!job) continue
if(!job)
continue
if(jobban_isbanned(M, job.title))
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=[job.title];jobban4=\ref[M]'><font color=red>[replacetext(job.title, " ", "&nbsp")]</font></a></td>"
@@ -598,9 +646,11 @@
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
jobs += "<tr bgcolor='ffeef0'><th colspan='[length(medical_positions)]'><a href='?src=\ref[src];jobban3=medicaldept;jobban4=\ref[M]'>Medical Positions</a></th></tr><tr align='center'>"
for(var/jobPos in medical_positions)
if(!jobPos) continue
if(!jobPos)
continue
var/datum/job/job = SSjob.GetJob(jobPos)
if(!job) continue
if(!job)
continue
if(jobban_isbanned(M, job.title))
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=[job.title];jobban4=\ref[M]'><font color=red>[replacetext(job.title, " ", "&nbsp")]</font></a></td>"
@@ -619,9 +669,11 @@
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
jobs += "<tr bgcolor='e79fff'><th colspan='[length(science_positions)]'><a href='?src=\ref[src];jobban3=sciencedept;jobban4=\ref[M]'>Science Positions</a></th></tr><tr align='center'>"
for(var/jobPos in science_positions)
if(!jobPos) continue
if(!jobPos)
continue
var/datum/job/job = SSjob.GetJob(jobPos)
if(!job) continue
if(!job)
continue
if(jobban_isbanned(M, job.title))
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=[job.title];jobban4=\ref[M]'><font color=red>[replacetext(job.title, " ", "&nbsp")]</font></a></td>"
@@ -640,9 +692,11 @@
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
jobs += "<tr bgcolor='DDAA55'><th colspan='[length(supply_positions)]'><a href='?src=\ref[src];jobban3=supplydept;jobban4=\ref[M]'>Supply Positions</a></th></tr><tr align='center'>"
for(var/jobPos in supply_positions)
if(!jobPos) continue
if(!jobPos)
continue
var/datum/job/job = SSjob.GetJob(jobPos)
if(!job) continue
if(!job)
continue
if(jobban_isbanned(M, job.title))
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=[job.title];jobban4=\ref[M]'><font color=red>[replacetext(job.title, " ", "&nbsp")]</font></a></td>"
@@ -661,9 +715,11 @@
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
jobs += "<tr bgcolor='dddddd'><th colspan='[length(civilian_positions)]'><a href='?src=\ref[src];jobban3=civiliandept;jobban4=\ref[M]'>Civilian Positions</a></th></tr><tr align='center'>"
for(var/jobPos in civilian_positions)
if(!jobPos) continue
if(!jobPos)
continue
var/datum/job/job = SSjob.GetJob(jobPos)
if(!job) continue
if(!job)
continue
if(jobban_isbanned(M, job.title))
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=[job.title];jobban4=\ref[M]'><font color=red>[replacetext(job.title, " ", "&nbsp")]</font></a></td>"
@@ -682,9 +738,11 @@
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
jobs += "<tr bgcolor='ccffcc'><th colspan='[length(nonhuman_positions)]'><a href='?src=\ref[src];jobban3=nonhumandept;jobban4=\ref[M]'>Non-human Positions</a></th></tr><tr align='center'>"
for(var/jobPos in nonhuman_positions)
if(!jobPos) continue
if(!jobPos)
continue
var/datum/job/job = SSjob.GetJob(jobPos)
if(!job) continue
if(!job)
continue
if(jobban_isbanned(M, job.title))
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=[job.title];jobban4=\ref[M]'><font color=red>[replacetext(job.title, " ", "&nbsp")]</font></a></td>"
@@ -808,7 +866,8 @@
//JOBBAN'S INNARDS
else if(href_list["jobban3"])
if(!check_rights(R_BAN)) return
if(!check_rights(R_BAN))
return
var/mob/M = locate(href_list["jobban4"])
if(!ismob(M))
@@ -824,51 +883,67 @@
switch(href_list["jobban3"])
if("commanddept")
for(var/jobPos in command_positions)
if(!jobPos) continue
if(!jobPos)
continue
var/datum/job/temp = SSjob.GetJob(jobPos)
if(!temp) continue
if(!temp)
continue
joblist += temp.title
if("securitydept")
for(var/jobPos in security_positions)
if(!jobPos) continue
if(!jobPos)
continue
var/datum/job/temp = SSjob.GetJob(jobPos)
if(!temp) continue
if(!temp)
continue
joblist += temp.title
if("engineeringdept")
for(var/jobPos in engineering_positions)
if(!jobPos) continue
if(!jobPos)
continue
var/datum/job/temp = SSjob.GetJob(jobPos)
if(!temp) continue
if(!temp)
continue
joblist += temp.title
if("medicaldept")
for(var/jobPos in medical_positions)
if(!jobPos) continue
if(!jobPos)
continue
var/datum/job/temp = SSjob.GetJob(jobPos)
if(!temp) continue
if(!temp)
continue
joblist += temp.title
if("sciencedept")
for(var/jobPos in science_positions)
if(!jobPos) continue
if(!jobPos)
continue
var/datum/job/temp = SSjob.GetJob(jobPos)
if(!temp) continue
if(!temp)
continue
joblist += temp.title
if("supplydept")
for(var/jobPos in supply_positions)
if(!jobPos) continue
if(!jobPos)
continue
var/datum/job/temp = SSjob.GetJob(jobPos)
if(!temp) continue
if(!temp)
continue
joblist += temp.title
if("civiliandept")
for(var/jobPos in civilian_positions)
if(!jobPos) continue
if(!jobPos)
continue
var/datum/job/temp = SSjob.GetJob(jobPos)
if(!temp) continue
if(!temp)
continue
joblist += temp.title
if("nonhumandept")
for(var/jobPos in nonhuman_positions)
if(!jobPos) continue
if(!jobPos)
continue
var/datum/job/temp = SSjob.GetJob(jobPos)
if(!temp) continue
if(!temp)
continue
joblist += temp.title
if("ghostroles")
joblist += list("pAI", "posibrain", "drone", "deathsquad")
@@ -920,8 +995,10 @@
feedback_inc("ban_job",1)
DB_ban_record(BANTYPE_JOB_PERMA, M, -1, reason, job)
feedback_add_details("ban_job","- [job]")
if(!msg) msg = job
else msg += ", [job]"
if(!msg)
msg = job
else
msg += ", [job]"
add_note(M.ckey, "Banned from [msg] - [reason]", null, usr.ckey, 0)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] banned [key_name_admin(M)] from [msg]</span>")
M << "<span class='boldannounce'><BIG>You have been jobbanned by [usr.client.ckey] from: [msg].</BIG></span>"
@@ -938,7 +1015,8 @@
var/msg
for(var/job in joblist)
var/reason = jobban_isbanned(M, job)
if(!reason) continue //skip if it isn't jobbanned anyway
if(!reason)
continue //skip if it isn't jobbanned anyway
switch(alert("Job: '[job]' Reason: '[reason]' Un-jobban?","Please Confirm","Yes","No"))
if("Yes")
ban_unban_log_save("[key_name(usr)] unjobbanned [key_name(M)] from [job]")
@@ -946,8 +1024,10 @@
DB_ban_unban(M.ckey, BANTYPE_ANY_JOB, job)
feedback_inc("ban_job_unban",1)
feedback_add_details("ban_job_unban","- [job]")
if(!msg) msg = job
else msg += ", [job]"
if(!msg)
msg = job
else
msg += ", [job]"
else
continue
if(msg)
@@ -1014,12 +1094,15 @@
usr << browse(edit_log,"window=noteedits")
else if(href_list["newban"])
if(!check_rights(R_BAN)) return
if(!check_rights(R_BAN))
return
var/mob/M = locate(href_list["newban"])
if(!ismob(M)) return
if(!ismob(M))
return
if(M.client && M.client.holder) return //admins cannot be banned. Even if they could, the ban doesn't affect them anyway
if(M.client && M.client.holder)
return //admins cannot be banned. Even if they could, the ban doesn't affect them anyway
switch(alert("Temporary Ban?",,"Yes","No", "Cancel"))
if("Yes")
@@ -1050,7 +1133,8 @@
if(!reason)
return
switch(alert(usr,"IP ban?",,"Yes","No","Cancel"))
if("Cancel") return
if("Cancel")
return
if("Yes")
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0, M.lastKnownIP)
if("No")
@@ -1115,11 +1199,13 @@
usr << browse(edit_log,"window=watchedits")
else if(href_list["mute"])
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
cmd_admin_mute(href_list["mute"], text2num(href_list["mute_type"]))
else if(href_list["c_mode"])
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
if(ticker && ticker.mode)
return alert(usr, "The game has already started.", null, null, null, null)
@@ -1132,7 +1218,8 @@
usr << browse(dat, "window=c_mode")
else if(href_list["f_secret"])
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
if(ticker && ticker.mode)
return alert(usr, "The game has already started.", null, null, null, null)
@@ -1146,7 +1233,8 @@
usr << browse(dat, "window=f_secret")
else if(href_list["c_mode2"])
if(!check_rights(R_ADMIN|R_SERVER)) return
if(!check_rights(R_ADMIN|R_SERVER))
return
if (ticker && ticker.mode)
return alert(usr, "The game has already started.", null, null, null, null)
@@ -1159,7 +1247,8 @@
.(href, list("c_mode"=1))
else if(href_list["f_secret2"])
if(!check_rights(R_ADMIN|R_SERVER)) return
if(!check_rights(R_ADMIN|R_SERVER))
return
if(ticker && ticker.mode)
return alert(usr, "The game has already started.", null, null, null, null)
@@ -1172,7 +1261,8 @@
.(href, list("f_secret"=1))
else if(href_list["monkeyone"])
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
var/mob/living/carbon/human/H = locate(href_list["monkeyone"])
if(!istype(H))
@@ -1184,7 +1274,8 @@
H.monkeyize()
else if(href_list["humanone"])
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
var/mob/living/carbon/monkey/Mo = locate(href_list["humanone"])
if(!istype(Mo))
@@ -1196,7 +1287,8 @@
Mo.humanize()
else if(href_list["corgione"])
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
var/mob/living/carbon/human/H = locate(href_list["corgione"])
if(!istype(H))
@@ -1209,21 +1301,24 @@
else if(href_list["forcespeech"])
if(!check_rights(R_FUN)) return
if(!check_rights(R_FUN))
return
var/mob/M = locate(href_list["forcespeech"])
if(!ismob(M))
usr << "this can only be used on instances of type /mob"
var/speech = input("What will [key_name(M)] say?.", "Force speech", "")// Don't need to sanitize, since it does that in say(), we also trust our admins.
if(!speech) return
if(!speech)
return
M.say(speech)
speech = sanitize(speech) // Nah, we don't trust them
log_admin("[key_name(usr)] forced [key_name(M)] to say: [speech]")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] forced [key_name_admin(M)] to say: [speech]</span>")
else if(href_list["sendtoprison"])
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
var/mob/M = locate(href_list["sendtoprison"])
if(!ismob(M))
@@ -1267,7 +1362,8 @@
qdel(M)
else if(href_list["tdome1"])
if(!check_rights(R_FUN)) return
if(!check_rights(R_FUN))
return
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
return
@@ -1296,7 +1392,8 @@
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 1)")
else if(href_list["tdome2"])
if(!check_rights(R_FUN)) return
if(!check_rights(R_FUN))
return
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
return
@@ -1325,7 +1422,8 @@
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 2)")
else if(href_list["tdomeadmin"])
if(!check_rights(R_FUN)) return
if(!check_rights(R_FUN))
return
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
return
@@ -1347,7 +1445,8 @@
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Admin.)")
else if(href_list["tdomeobserve"])
if(!check_rights(R_FUN)) return
if(!check_rights(R_FUN))
return
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
return
@@ -1380,7 +1479,8 @@
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Observer.)")
else if(href_list["revive"])
if(!check_rights(R_REJUVINATE)) return
if(!check_rights(R_REJUVINATE))
return
var/mob/living/L = locate(href_list["revive"])
if(!istype(L))
@@ -1392,7 +1492,8 @@
log_admin("[key_name(usr)] healed / Revived [key_name(L)]")
else if(href_list["makeai"])
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
var/mob/living/carbon/human/H = locate(href_list["makeai"])
if(!istype(H))
@@ -1404,7 +1505,8 @@
H.AIize()
else if(href_list["makealien"])
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
var/mob/living/carbon/human/H = locate(href_list["makealien"])
if(!istype(H))
@@ -1414,7 +1516,8 @@
usr.client.cmd_admin_alienize(H)
else if(href_list["makeslime"])
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
var/mob/living/carbon/human/H = locate(href_list["makeslime"])
if(!istype(H))
@@ -1424,7 +1527,8 @@
usr.client.cmd_admin_slimeize(H)
else if(href_list["makeblob"])
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
var/mob/living/carbon/human/H = locate(href_list["makeblob"])
if(!istype(H))
@@ -1435,7 +1539,8 @@
else if(href_list["makerobot"])
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
var/mob/living/carbon/human/H = locate(href_list["makerobot"])
if(!istype(H))
@@ -1445,7 +1550,8 @@
usr.client.cmd_admin_robotize(H)
else if(href_list["makeanimal"])
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
var/mob/M = locate(href_list["makeanimal"])
if(istype(M, /mob/new_player))
@@ -1469,24 +1575,28 @@
show_player_panel(M)
else if(href_list["adminplayerobservefollow"])
if(!isobserver(usr) && !check_rights(R_ADMIN)) return
if(!isobserver(usr) && !check_rights(R_ADMIN))
return
var/atom/movable/AM = locate(href_list["adminplayerobservefollow"])
var/client/C = usr.client
if(!isobserver(usr)) C.admin_ghost()
if(!isobserver(usr))
C.admin_ghost()
var/mob/dead/observer/A = C.mob
A.ManualFollow(AM)
else if(href_list["adminplayerobservecoodjump"])
if(!isobserver(usr) && !check_rights(R_ADMIN)) return
if(!isobserver(usr) && !check_rights(R_ADMIN))
return
var/x = text2num(href_list["X"])
var/y = text2num(href_list["Y"])
var/z = text2num(href_list["Z"])
var/client/C = usr.client
if(!isobserver(usr)) C.admin_ghost()
if(!isobserver(usr))
C.admin_ghost()
sleep(2)
C.jumptocoord(x,y,z)
@@ -1523,9 +1633,12 @@
var/mob/living/L = M
var/status
switch (M.stat)
if (0) status = "Alive"
if (1) status = "<font color='orange'><b>Unconscious</b></font>"
if (2) status = "<font color='red'><b>Dead</b></font>"
if (0)
status = "Alive"
if (1)
status = "<font color='orange'><b>Unconscious</b></font>"
if (2)
status = "<font color='red'><b>Dead</b></font>"
health_description = "Status = [status]"
health_description += "<BR>Oxy: [L.getOxyLoss()] - Tox: [L.getToxLoss()] - Fire: [L.getFireLoss()] - Brute: [L.getBruteLoss()] - Clone: [L.getCloneLoss()] - Brain: [L.getBrainLoss()] - Stamina: [L.getStaminaLoss()]"
else
@@ -1533,8 +1646,10 @@
//Gender
switch(M.gender)
if(MALE,FEMALE) gender_description = "[M.gender]"
else gender_description = "<font color='red'><b>[M.gender]</b></font>"
if(MALE,FEMALE)
gender_description = "[M.gender]"
else
gender_description = "<font color='red'><b>[M.gender]</b></font>"
src.owner << "<b>Info about [M.name]:</b> "
src.owner << "Mob type = [M.type]; Gender = [gender_description] Damage = [health_description]"
@@ -1544,7 +1659,8 @@
src.owner << "(<a href='?priv_msg=[M.ckey]'>PM</a>) (<A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[M]'>VV</A>) (<A HREF='?src=\ref[src];subtlemessage=\ref[M]'>SM</A>) (<A HREF='?src=\ref[src];adminplayerobservefollow=\ref[M]'>FLW</A>) (<A HREF='?src=\ref[src];secrets=check_antagonist'>CA</A>)"
else if(href_list["addjobslot"])
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
var/Add = href_list["addjobslot"]
@@ -1556,7 +1672,8 @@
src.manage_free_slots()
else if(href_list["removejobslot"])
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
var/Remove = href_list["removejobslot"]
@@ -1568,7 +1685,8 @@
src.manage_free_slots()
else if(href_list["unlimitjobslot"])
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
var/Unlimit = href_list["unlimitjobslot"]
@@ -1580,7 +1698,8 @@
src.manage_free_slots()
else if(href_list["limitjobslot"])
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
var/Limit = href_list["limitjobslot"]
@@ -1593,7 +1712,8 @@
else if(href_list["adminspawncookie"])
if(!check_rights(R_ADMIN|R_FUN)) return
if(!check_rights(R_ADMIN|R_FUN))
return
var/mob/living/carbon/human/H = locate(href_list["adminspawncookie"])
if(!ishuman(H))
@@ -1631,7 +1751,8 @@
return
var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from Centcom", "")
if(!input) return
if(!input)
return
src.owner << "You sent [input] to [H] via a secure channel."
log_admin("[src.owner] replied to [key_name(H)]'s Centcom message with the message [input].")
@@ -1648,7 +1769,8 @@
return
var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from The Syndicate", "")
if(!input) return
if(!input)
return
src.owner << "You sent [input] to [H] via a secure channel."
log_admin("[src.owner] replied to [key_name(H)]'s Syndicate message with the message [input].")
@@ -1656,38 +1778,45 @@
H << "You hear something crackle in your ears for a moment before a voice speaks. \"Please stand by for a message from your benefactor. Message as follows, agent. [input]. Message ends.\""
else if(href_list["jumpto"])
if(!isobserver(usr) && !check_rights(R_ADMIN)) return
if(!isobserver(usr) && !check_rights(R_ADMIN))
return
var/mob/M = locate(href_list["jumpto"])
usr.client.jumptomob(M)
else if(href_list["getmob"])
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes") return
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
return
var/mob/M = locate(href_list["getmob"])
usr.client.Getmob(M)
else if(href_list["sendmob"])
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
var/mob/M = locate(href_list["sendmob"])
usr.client.sendmob(M)
else if(href_list["narrateto"])
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
var/mob/M = locate(href_list["narrateto"])
usr.client.cmd_admin_direct_narrate(M)
else if(href_list["subtlemessage"])
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
var/mob/M = locate(href_list["subtlemessage"])
usr.client.cmd_admin_subtle_message(M)
else if(href_list["traitor"])
if(!check_rights(R_ADMIN)) return
if(!check_rights(R_ADMIN))
return
if(!ticker || !ticker.mode)
alert("The game hasn't started yet!")
@@ -1700,27 +1829,33 @@
show_traitor_panel(M)
else if(href_list["create_object"])
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
return create_object(usr)
else if(href_list["quick_create_object"])
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
return quick_create_object(usr)
else if(href_list["create_turf"])
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
return create_turf(usr)
else if(href_list["create_mob"])
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
return create_mob(usr)
else if(href_list["dupe_marked_datum"])
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
return DuplicateObject(marked_datum, perfectcopy=1, newloc=get_turf(usr))
else if(href_list["object_list"]) //this is the laggiest thing ever
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
var/atom/loc = usr.loc
+6 -3
View File
@@ -12,7 +12,8 @@
var/list/ckeys = list()
for(var/mob/M in mob_list)
var/list/indexing = list(M.real_name, M.name)
if(M.mind) indexing += M.mind.name
if(M.mind)
indexing += M.mind.name
for(var/string in indexing)
var/list/L = text2list(string, " ")
@@ -80,7 +81,8 @@
return
//clean the input msg
if(!msg) return
if(!msg)
return
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
if(!msg) return
var/original_msg = msg
@@ -91,7 +93,8 @@
msg = keywords_lookup(msg)
if(!mob) return //this doesn't happen
if(!mob)
return //this doesn't happen
var/ref_mob = "\ref[mob]"
var/ref_client = "\ref[src]"
+16 -8
View File
@@ -5,7 +5,8 @@
if(!holder)
src << "<font color='red'>Error: Admin-PM-Context: Only administrators may use this command.</font>"
return
if( !ismob(M) || !M.client ) return
if( !ismob(M) || !M.client )
return
cmd_admin_pm(M.client,null)
feedback_add_details("admin_verb","APMM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -44,7 +45,8 @@
else if(istype(whom,/client))
C = whom
if(!C)
if(holder) src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
if(holder)
src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
return
message_admins("[key_name_admin(src)] has started replying to [key_name(C, 0, 0)]'s admin help.")
var/msg = input(src,"Message:", "Private message to [key_name(C, 0, 0)]") as text|null
@@ -68,18 +70,23 @@
else if(istype(whom,/client))
C = whom
if(!C)
if(holder) src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
else adminhelp(msg) //admin we are replying to left. adminhelp instead
if(holder)
src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
else
adminhelp(msg) //admin we are replying to left. adminhelp instead
return
//get message text, limit it's length.and clean/escape html
if(!msg)
msg = input(src,"Message:", "Private message to [key_name(C, 0, 0)]") as text|null
if(!msg) return
if(!msg)
return
if(!C)
if(holder) src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
else adminhelp(msg) //admin we are replying to has vanished, adminhelp instead
if(holder)
src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
else
adminhelp(msg) //admin we are replying to has vanished, adminhelp instead
return
if (src.handle_spam_prevention(msg,MUTE_ADMINHELP))
@@ -88,7 +95,8 @@
//clean the message if it's not sent by a high-rank admin
if(!check_rights(R_SERVER|R_DEBUG,0))
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
if(!msg) return
if(!msg)
return
msg = emoji_parse(msg)
var/keywordparsedmsg = keywords_lookup(msg)
+4 -2
View File
@@ -2,10 +2,12 @@
set category = "Special Verbs"
set name = "Asay" //Gave this shit a shorter name so you only have to time out "asay" rather than "admin say" to use it --NeoFite
set hidden = 1
if(!check_rights(0)) return
if(!check_rights(0))
return
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
if(!msg) return
if(!msg)
return
log_adminsay("[key_name(src)] : [msg]")
msg = keywords_lookup(msg)
+4 -2
View File
@@ -18,8 +18,10 @@
var/turf/simulated/floor/T = get_turf(target)
if(istype(T))
if(prob(80)) T.break_tile_to_plating()
else T.break_tile()
if(prob(80))
T.break_tile_to_plating()
else
T.break_tile()
target << "<span class='userdanger'>You're hit by bluespace artillery!</span>"
log_admin("[target.name] has been hit by Bluespace Artillery fired by [usr]")
+2 -1
View File
@@ -3,7 +3,8 @@
set category = "Fun"
set desc = "Shows a cinematic." // Intended for testing but I thought it might be nice for events on the rare occasion Feel free to comment it out if it's not wanted.
set hidden = 1
if(!ticker) return
if(!ticker)
return
switch(cinematic)
if("explosion")
var/parameter = input(src,"station_missed = ?","Enter Parameter",0) as num
+8 -4
View File
@@ -1,7 +1,8 @@
/client/proc/Debug2()
set category = "Debug"
set name = "Debug-Game"
if(!check_rights(R_DEBUG)) return
if(!check_rights(R_DEBUG))
return
if(Debug2)
Debug2 = 0
@@ -67,7 +68,8 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
targetselected = 0
var/procname = input("Proc path, eg: /proc/fake_blood","Path:", null) as text|null
if(!procname) return
if(!procname)
return
if(targetselected && !hascall(target,procname))
usr << "<font color='red'>Error: callproc(): target has no such call [procname].</font>"
return
@@ -128,7 +130,8 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
/client/proc/get_callproc_args()
var/argnum = input("Number of arguments","Number:",0) as num|null
if(!argnum && (argnum!=0)) return
if(!argnum && (argnum!=0))
return
var/list/lst = list()
//TODO: make a list to store whether each argument was initialised as null.
@@ -692,5 +695,6 @@ var/global/list/g_fancy_list_of_types = null
set name = "Debug HUDs"
set desc = "Debug the data or antag HUDs"
if(!holder) return
if(!holder)
return
debug_variables(huds[i])
+4 -2
View File
@@ -89,10 +89,12 @@
set name = "Reload Admins"
set category = "Admin"
if(!src.holder) return
if(!src.holder)
return
var/confirm = alert(src, "Are you sure you want to reload all admins?", "Confirm", "Yes", "No")
if(confirm !="Yes") return
if(confirm !="Yes")
return
message_admins("[key_name_admin(usr)] manually reloaded admins")
load_admins()
+2 -1
View File
@@ -4,7 +4,8 @@
set name = "Set fps"
set desc = "Sets game speed in frames-per-second. Can potentially break the game"
if(!check_rights(R_DEBUG)) return
if(!check_rights(R_DEBUG))
return
var/fps = round(input("Sets game frames-per-second. Can potentially break the game","FPS", config.fps) as num|null)
+10 -5
View File
@@ -5,7 +5,8 @@
var/method = 0 //0 means strict type detection while 1 means this type and all subtypes (IE: /obj/item with this set to 1 will set it to ALL itms)
if(!check_rights(R_VAREDIT)) return
if(!check_rights(R_VAREDIT))
return
if(A && A.type)
if(typesof(A.type))
@@ -24,7 +25,8 @@
/client/proc/massmodify_variables(atom/O, var_name = "", method = 0)
if(!check_rights(R_VAREDIT)) return
if(!check_rights(R_VAREDIT))
return
for(var/p in forbidden_varedit_object_types)
if( istype(O,p) )
@@ -44,7 +46,8 @@
else
variable = var_name
if(!variable) return
if(!variable)
return
var/default
var/var_value = O.vars[variable]
var/dir
@@ -53,9 +56,11 @@
usr << "It's forbidden to mass-modify ckeys. I'll crash everyone's client you dummy."
return
if(variable in VVlocked)
if(!check_rights(R_DEBUG)) return
if(!check_rights(R_DEBUG))
return
if(variable in VVicon_edit_lock)
if(!check_rights(R_FUN|R_DEBUG)) return
if(!check_rights(R_FUN|R_DEBUG))
return
if(isnull(var_value))
usr << "Unable to determine variable type."
+26 -13
View File
@@ -149,8 +149,10 @@ var/list/VVckey_edit = list("key", "ckey")
message_admins("[key_name_admin(src)] modified [original_name]'s [objectvar]: ADDED=[var_value]")
/client/proc/mod_list(list/L, atom/O, original_name, objectvar)
if(!check_rights(R_VAREDIT)) return
if(!istype(L,/list)) src << "Not a List."
if(!check_rights(R_VAREDIT))
return
if(!istype(L,/list))
src << "Not a List."
if(L.len > 1000)
var/confirm = alert(src, "The list you're trying to edit is very long, continuing may crash the server.", "Warning", "Continue", "Abort")
@@ -191,11 +193,14 @@ var/list/VVckey_edit = list("key", "ckey")
var/dir
if(variable in VVlocked)
if(!check_rights(R_DEBUG)) return
if(!check_rights(R_DEBUG))
return
if(variable in VVckey_edit)
if(!check_rights(R_SPAWN|R_DEBUG)) return
if(!check_rights(R_SPAWN|R_DEBUG))
return
if(variable in VVicon_edit_lock)
if(!check_rights(R_FUN|R_DEBUG)) return
if(!check_rights(R_FUN|R_DEBUG))
return
if(isnull(variable))
usr << "Unable to determine variable type."
@@ -373,7 +378,8 @@ var/list/VVckey_edit = list("key", "ckey")
message_admins("[key_name_admin(src)] modified [original_name]'s varlist [objectvar]: [original_var]=[new_var]")
/client/proc/modify_variables(atom/O, param_var_name = null, autodetect_class = 0)
if(!check_rights(R_VAREDIT)) return
if(!check_rights(R_VAREDIT))
return
for(var/p in forbidden_varedit_object_types)
if( istype(O,p) )
@@ -394,11 +400,14 @@ var/list/VVckey_edit = list("key", "ckey")
return
if(param_var_name in VVlocked)
if(!check_rights(R_DEBUG)) return
if(!check_rights(R_DEBUG))
return
if(param_var_name in VVckey_edit)
if(!check_rights(R_SPAWN|R_DEBUG)) return
if(!check_rights(R_SPAWN|R_DEBUG))
return
if(param_var_name in VVicon_edit_lock)
if(!check_rights(R_FUN|R_DEBUG)) return
if(!check_rights(R_FUN|R_DEBUG))
return
variable = param_var_name
@@ -452,15 +461,19 @@ var/list/VVckey_edit = list("key", "ckey")
names = sortList(names)
variable = input("Which var?","Var") as null|anything in names
if(!variable) return
if(!variable)
return
var_value = O.vars[variable]
if(variable in VVlocked)
if(!check_rights(R_DEBUG)) return
if(!check_rights(R_DEBUG))
return
if(variable in VVckey_edit)
if(!check_rights(R_SPAWN|R_DEBUG)) return
if(!check_rights(R_SPAWN|R_DEBUG))
return
if(variable in VVicon_edit_lock)
if(!check_rights(R_FUN|R_DEBUG)) return
if(!check_rights(R_FUN|R_DEBUG))
return
if(!autodetect_class)
+8 -4
View File
@@ -4,7 +4,8 @@ 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
if(!check_rights(R_SOUNDS))
return
admin_sound = sound(S, repeat = 0, wait = 1, channel = SOUND_CHANNEL_ADMIN)
admin_sound.priority = 250
@@ -29,7 +30,8 @@ var/sound/admin_sound
/client/proc/play_local_sound(S as sound)
set category = "Fun"
set name = "Play Local Sound"
if(!check_rights(R_SOUNDS)) return
if(!check_rights(R_SOUNDS))
return
log_admin("[key_name(src)] played a local sound [S]")
message_admins("[key_name_admin(src)] played a local sound [S]")
@@ -39,7 +41,8 @@ var/sound/admin_sound
/client/proc/set_round_end_sound(S as sound)
set category = "Fun"
set name = "Set Round End Sound"
if(!check_rights(R_SOUNDS)) return
if(!check_rights(R_SOUNDS))
return
if(ticker)
ticker.round_end_sound = fcopy_rsc(S)
@@ -53,7 +56,8 @@ var/sound/admin_sound
/client/proc/stop_sounds()
set category = "Debug"
set name = "Stop All Playing Sounds"
if(!src.holder) return
if(!src.holder)
return
log_admin("[key_name(src)] stopped all currently playing sounds.")
message_admins("[key_name_admin(src)] stopped all currently playing sounds.")
+2 -1
View File
@@ -7,7 +7,8 @@
return
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
if(!msg) return
if(!msg)
return
log_prayer("[src.key]/([src.name]): [msg]")
if(usr.client)
if(usr.client.prefs.muted & MUTE_PRAY)
+84 -42
View File
@@ -23,7 +23,8 @@
set category = "Special Verbs"
set name = "Subtle Message"
if(!ismob(M)) return
if(!ismob(M))
return
if (!holder)
src << "Only administrators may use this command."
return
@@ -127,13 +128,20 @@
var/muteunmute
var/mute_string
switch(mute_type)
if(MUTE_IC) mute_string = "IC (say and emote)"
if(MUTE_OOC) mute_string = "OOC"
if(MUTE_PRAY) mute_string = "pray"
if(MUTE_ADMINHELP) mute_string = "adminhelp, admin PM and ASAY"
if(MUTE_DEADCHAT) mute_string = "deadchat and DSAY"
if(MUTE_ALL) mute_string = "everything"
else return
if(MUTE_IC)
mute_string = "IC (say and emote)"
if(MUTE_OOC)
mute_string = "OOC"
if(MUTE_PRAY)
mute_string = "pray"
if(MUTE_ADMINHELP)
mute_string = "adminhelp, admin PM and ASAY"
if(MUTE_DEADCHAT)
mute_string = "deadchat and DSAY"
if(MUTE_ALL)
mute_string = "everything"
else
return
var/client/C
if(istype(whom, /client))
@@ -144,12 +152,16 @@
return
var/datum/preferences/P
if(C) P = C.prefs
else P = preferences_datums[whom]
if(!P) return
if(C)
P = C.prefs
else
P = preferences_datums[whom]
if(!P)
return
if(automute)
if(!config.automute_on) return
if(!config.automute_on)
return
else
if(!check_rights())
return
@@ -159,7 +171,8 @@
P.muted |= mute_type
log_admin("SPAM AUTOMUTE: [muteunmute] [key_name(whom)] from [mute_string]")
message_admins("SPAM AUTOMUTE: [muteunmute] [key_name_admin(whom)] from [mute_string].")
if(C) C << "You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin."
if(C)
C << "You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin."
feedback_add_details("admin_verb","AUTOMUTE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
@@ -172,7 +185,8 @@
log_admin("[key_name(usr)] has [muteunmute] [key_name(whom)] from [mute_string]")
message_admins("[key_name_admin(usr)] has [muteunmute] [key_name_admin(whom)] from [mute_string].")
if(C) C << "You have been [muteunmute] from [mute_string]."
if(C)
C << "You have been [muteunmute] from [mute_string]."
feedback_add_details("admin_verb","MUTE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -183,7 +197,8 @@
src << "Only administrators may use this command."
return
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
if(confirm != "Yes") return
if(confirm != "Yes")
return
log_admin("[key_name(src)] has added a random AI law.")
message_admins("[key_name_admin(src)] has added a random AI law.")
@@ -199,28 +214,40 @@
if(!ckey)
var/list/candidates = list()
for(var/mob/M in player_list)
if(M.stat != DEAD) continue //we are not dead!
if(!(ROLE_ALIEN in M.client.prefs.be_special)) continue //we don't want to be an alium
if(M.client.is_afk()) continue //we are afk
if(M.mind && M.mind.current && M.mind.current.stat != DEAD) continue //we have a live body we are tied to
if(M.stat != DEAD)
continue //we are not dead!
if(!(ROLE_ALIEN in M.client.prefs.be_special))
continue //we don't want to be an alium
if(M.client.is_afk())
continue //we are afk
if(M.mind && M.mind.current && M.mind.current.stat != DEAD)
continue //we have a live body we are tied to
candidates += M.ckey
if(candidates.len)
ckey = input("Pick the player you want to respawn as a xeno.", "Suitable Candidates") as null|anything in candidates
else
usr << "<font color='red'>Error: create_xeno(): no suitable candidates.</font>"
if(!istext(ckey)) return 0
if(!istext(ckey))
return 0
var/alien_caste = input(usr, "Please choose which caste to spawn.","Pick a caste",null) as null|anything in list("Queen","Praetorian","Hunter","Sentinel","Drone","Larva")
var/obj/effect/landmark/spawn_here = xeno_spawn.len ? pick(xeno_spawn) : pick(latejoin)
var/mob/living/carbon/alien/new_xeno
switch(alien_caste)
if("Queen") new_xeno = new /mob/living/carbon/alien/humanoid/royal/queen(spawn_here)
if("Praetorian") new_xeno = new /mob/living/carbon/alien/humanoid/royal/praetorian(spawn_here)
if("Hunter") new_xeno = new /mob/living/carbon/alien/humanoid/hunter(spawn_here)
if("Sentinel") new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(spawn_here)
if("Drone") new_xeno = new /mob/living/carbon/alien/humanoid/drone(spawn_here)
if("Larva") new_xeno = new /mob/living/carbon/alien/larva(spawn_here)
else return 0
if("Queen")
new_xeno = new /mob/living/carbon/alien/humanoid/royal/queen(spawn_here)
if("Praetorian")
new_xeno = new /mob/living/carbon/alien/humanoid/royal/praetorian(spawn_here)
if("Hunter")
new_xeno = new /mob/living/carbon/alien/humanoid/hunter(spawn_here)
if("Sentinel")
new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(spawn_here)
if("Drone")
new_xeno = new /mob/living/carbon/alien/humanoid/drone(spawn_here)
if("Larva")
new_xeno = new /mob/living/carbon/alien/larva(spawn_here)
else
return 0
new_xeno.ckey = ckey
message_admins("<span class='notice'>[key_name_admin(usr)] has spawned [ckey] as a filthy xeno [alien_caste].</span>")
@@ -257,16 +284,23 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(G_found.mind.assigned_role=="Alien")
if(alert("This character appears to have been an alien. Would you like to respawn them as such?",,"Yes","No")=="Yes")
var/turf/T
if(xeno_spawn.len) T = pick(xeno_spawn)
else T = pick(latejoin)
if(xeno_spawn.len)
T = pick(xeno_spawn)
else
T = pick(latejoin)
var/mob/living/carbon/alien/new_xeno
switch(G_found.mind.special_role)//If they have a mind, we can determine which caste they were.
if("Hunter") new_xeno = new /mob/living/carbon/alien/humanoid/hunter(T)
if("Sentinel") new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(T)
if("Drone") new_xeno = new /mob/living/carbon/alien/humanoid/drone(T)
if("Praetorian") new_xeno = new /mob/living/carbon/alien/humanoid/royal/praetorian(T)
if("Queen") new_xeno = new /mob/living/carbon/alien/humanoid/royal/queen(T)
if("Hunter")
new_xeno = new /mob/living/carbon/alien/humanoid/hunter(T)
if("Sentinel")
new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(T)
if("Drone")
new_xeno = new /mob/living/carbon/alien/humanoid/drone(T)
if("Praetorian")
new_xeno = new /mob/living/carbon/alien/humanoid/royal/praetorian(T)
if("Queen")
new_xeno = new /mob/living/carbon/alien/humanoid/royal/queen(T)
else//If we don't know what special role they have, for whatever reason, or they're a larva.
create_xeno(G_found.ckey)
return
@@ -542,9 +576,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
if(confirm != "Yes") return
if(confirm != "Yes")
return
//Due to the delay here its easy for something to have happened to the mob
if(!M) return
if(!M)
return
log_admin("[key_name(usr)] has gibbed [key_name(M)]")
message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]")
@@ -608,7 +644,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
if(confirm != "Yes") return
if(confirm != "Yes")
return
SSshuttle.emergency.request()
feedback_add_details("admin_verb","CSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -619,8 +656,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
/client/proc/admin_cancel_shuttle()
set category = "Admin"
set name = "Cancel Shuttle"
if(!check_rights(0)) return
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes") return
if(!check_rights(0))
return
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes")
return
if(SSshuttle.emergency.mode >= SHUTTLE_DOCKED)
return
@@ -710,7 +749,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
set name = "Toggle Nuke"
set category = "Fun"
set popup_menu = 0
if(!check_rights(R_DEBUG)) return
if(!check_rights(R_DEBUG))
return
if(!N.timing)
var/newtime = input(usr, "Set activation timer.", "Activate Nuke", "[N.timeleft]") as num
@@ -728,7 +768,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Debug"
set name = "Remove Latejoin Spawns"
if(!check_rights(R_DEBUG)) return
if(!check_rights(R_DEBUG))
return
latejoin.Cut()
@@ -744,7 +785,8 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
set category = "Debug"
set name = "Create Custom Outfit"
if(!check_rights(R_DEBUG)) return
if(!check_rights(R_DEBUG))
return
holder.create_outfit()