var/showadminmessages = 1
////////////////////////////////
/proc/message_admins(var/text, var/admin_ref = 0)
if(!showadminmessages) return
var/rendered = "ADMIN LOG: [text]"
for (var/mob/M in world)
if (M && M.client && M.client.holder && M.client.authenticated)
if (admin_ref)
M << dd_replaceText(rendered, "%admin_ref%", "\ref[M]")
else
M << rendered
/proc/toggle_adminmsg()
set name = "Toggle Admin Messages"
set category = "Server"
//showadminmessages = !showadminmessages
/obj/admins/Topic(href, href_list)
..()
if (usr.client != src.owner)
world << "\blue [usr.key] has attempted to override the admin panel!"
log_admin("[key_name(usr)] tried to use the admin panel without authorization.")
return
if(href_list["call_shuttle"])
if (src.rank in list("Trial Admin", "Admin who Sinned", "Game Admin", "Game Master"))
if( ticker.mode.name == "blob" )
alert("You can't call the shuttle during blob!")
return
switch(href_list["call_shuttle"])
if("1")
if ((!( ticker ) || emergency_shuttle.location))
return
emergency_shuttle.incall()
world << "\blue Alert: The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes."
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("\blue [key_name_admin(usr)] called the Emergency Shuttle to the station", 1)
if("2")
if ((!( ticker ) || emergency_shuttle.location || emergency_shuttle.direction == 0))
return
switch(emergency_shuttle.direction)
if(-1)
emergency_shuttle.incall()
world << "\blue Alert: The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes."
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("\blue [key_name_admin(usr)] called the Emergency Shuttle to the station", 1)
if(1)
emergency_shuttle.recall()
world << "\blue Alert: The shuttle is going back!"
log_admin("[key_name(usr)] sent the Emergency Shuttle back")
message_admins("\blue [key_name_admin(usr)] sent the Emergency Shuttle back", 1)
href_list["secretsadmin"] = "check_antagonist"
else
alert("You cannot perform this action. You must be of a higher administrative rank!")
return
if(href_list["edit_shuttle_time"])
if (src.rank in list("Admin who Sinned", "Game Admin", "Game Master"))
emergency_shuttle.settimeleft( input("Enter new shuttle duration (seconds):","Edit Shuttle Timeleft", emergency_shuttle.timeleft() ) as num )
log_admin("[key_name(usr)] edited the Emergency Shuttle's timeleft to [emergency_shuttle.timeleft()]")
message_admins("\blue [key_name_admin(usr)] edited the Emergency Shuttle's timeleft to [emergency_shuttle.timeleft()]", 1)
href_list["secretsadmin"] = "check_antagonist"
else
alert("You cannot perform this action. You must be of a higher administrative rank!")
return
/////////////////////////////////////new ban stuff
if(href_list["unbanf"])
var/banfolder = href_list["unbanf"]
Banlist.cd = "/base/[banfolder]"
var/key = Banlist["key"]
if(alert(usr, "Are you sure you want to unban [key]?", "Confirmation", "Yes", "No") == "Yes")
if (RemoveBan(banfolder))
unbanpanel()
else
alert(usr,"This ban has already been lifted / does not exist.","Error","Ok")
unbanpanel()
if(href_list["unbane"])
UpdateTime()
var/reason
var/mins = 0
var/banfolder = href_list["unbane"]
Banlist.cd = "/base/[banfolder]"
var/reason2 = Banlist["reason"]
var/temp = Banlist["temp"]
var/minutes = (Banlist["minutes"] - CMinutes)
if(!minutes || minutes < 0) minutes = 0
var/banned_key = Banlist["key"]
Banlist.cd = "/base"
switch(alert("Temporary Ban?",,"Yes","No"))
if("Yes")
temp = 1
mins = input(usr,"How long (in minutes)? (Default: 1440)","Ban time",minutes ? minutes : 1440) as num
if(!mins)
return
if(mins >= 525600) mins = 525599
reason = input(usr,"Reason?","reason",reason2) as text
if(!reason)
return
if("No")
temp = 0
reason = input(usr,"Reason?","reason",reason2) as text
if(!reason)
return
log_admin("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [GetExp(mins)]")
message_admins("\blue [key_name_admin(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [GetExp(mins)]", 1)
Banlist.cd = "/base/[banfolder]"
Banlist["reason"] << reason
Banlist["temp"] << temp
Banlist["minutes"] << (mins + CMinutes)
Banlist["bannedby"] << usr.ckey
Banlist.cd = "/base"
unbanpanel()
/////////////////////////////////////new ban stuff
if(href_list["jobban2"])
var/mob/M = locate(href_list["jobban2"])
var/dat = ""
var/header = "Pick Job to ban this guy from.
"
var/body
// var/list/alljobs = get_all_jobs()
var/jobs = ""
for(var/job in uniquelist(occupations + assistant_occupations))
if(job == "Tourist")
continue
if(jobban_isbanned(M, job))
jobs += "[dd_replacetext(job, " ", " ")] "
else
jobs += "[dd_replacetext(job, " ", " ")] " //why doesn't this work the stupid cunt
if(jobban_isbanned(M, "Captain"))
jobs += "Captain "
else
jobs += "Captain " //why doesn't this work the stupid cunt
if(jobban_isbanned(M, "Syndicate"))
jobs += "
[dd_replacetext("Syndicate", " ", " ")] "
else
jobs += "
[dd_replacetext("Syndicate", " ", " ")] " //why doesn't this work the stupid cunt
body = "
[jobs]
"
dat = "[header][body]"
usr << browse(dat, "window=jobban2;size=600x150")
return
if(href_list["jobban3"])
if (src.rank in list( "Admin Candidate", "Temporary Admin", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" ))
var/mob/M = locate(href_list["jobban4"])
var/job = href_list["jobban3"]
if ((M.client && M.client.holder && (M.client.holder.level > src.level)))
alert("You cannot perform this action. You must be of a higher administrative rank!")
return
if (jobban_isbanned(M, job))
log_admin("[key_name(usr)] unbanned [key_name(M)] from [job]")
M << "\redYou have been un-jobbanned by [usr.client.ckey] from [job]."
message_admins("\blue [key_name_admin(usr)] unbanned [key_name_admin(M)] from [job]", 1)
jobban_unban(M, job)
href_list["jobban2"] = 1
else
log_admin("[key_name(usr)] banned [key_name(M)] from [job]")
M << "\redYou have been jobbanned by [usr.client.ckey] from [job]."
M << "\red Jooban can be lifted only on demand."
message_admins("\blue [key_name_admin(usr)] banned [key_name_admin(M)] from [job]", 1)
jobban_fullban(M, job)
href_list["jobban2"] = 1 // lets it fall through and refresh
if (href_list["boot2"])
if ((src.rank in list( "Admin Observer", "Temporary Admin", "Admin Candidate", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
var/mob/M = locate(href_list["boot2"])
if (ismob(M))
if ((M.client && M.client.holder && (M.client.holder.level >= src.level)))
alert("You cannot perform this action. You must be of a higher administrative rank!", null, null, null, null, null)
return
log_admin("[key_name(usr)] booted [key_name(M)].")
message_admins("\blue [key_name_admin(usr)] booted [key_name_admin(M)].", 1)
//M.client = null
del(M.client)
if (href_list["removejobban"])
if ((src.rank in list("Game Admin", "Game Master" )))
var/t = href_list["removejobban"]
if(t)
log_admin("[key_name(usr)] removed [t]")
message_admins("\blue [key_name_admin(usr)] removed [t]", 1)
jobban_remove(t)
href_list["ban"] = 1 // lets it fall through and refresh
if (href_list["newban"])
if ((src.rank in list( "Temporary Admin", "Admin Candidate", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
var/mob/M = locate(href_list["newban"])
if(!ismob(M)) return
if ((M.client && M.client.holder && (M.client.holder.level >= src.level)))
alert("You cannot perform this action. You must be of a higher administrative rank!")
return
switch(alert("Temporary Ban?",,"Yes","No", "Cancel"))
if("Yes")
var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num
if(!mins)
return
if(mins >= 525600) mins = 525599
var/reason = input(usr,"Reason?","reason","Griefer") as text
if(!reason)
return
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins)
M << "\redYou have been banned by [usr.client.ckey].\nReason: [reason]."
M << "\red This is a temporary ban, it will be removed in [mins] minutes."
if(config.banappeals)
M << "\red To try to resolve this matter head to [config.banappeals]"
else
M << "\red No ban appeals URL has been set."
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
del(M.client)
//del(M) // See no reason why to delete mob. Important stuff can be lost. And ban can be lifted before round ends.
if("No")
var/reason = input(usr,"Reason?","reason","Griefer") as text
if(!reason)
return
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0)
M << "\redYou have been banned by [usr.client.ckey].\nReason: [reason]."
M << "\red This is a permanent ban."
if(config.banappeals)
M << "\red To try to resolve this matter head to [config.banappeals]"
else
M << "\red No ban appeals URL has been set."
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
del(M.client)
//del(M)
if("Cancel")
return
/*
if (href_list["remove"])
if ((src.rank in list( "Admin Candidate", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
var/t = href_list["remove"]
if(t && isgoon(t))
log_admin("[key_name(usr)] removed [t] from the goonlist.")
message_admins("\blue [key_name_admin(usr)] removed [t] from the goonlist.")
remove_goon(t)
*/
if (href_list["mute2"])
if ((src.rank in list( "Admin Observer", "Temporary Admin", "Admin Candidate", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
var/mob/M = locate(href_list["mute2"])
if (ismob(M))
if ((M.client && M.client.holder && (M.client.holder.level >= src.level)))
alert("You cannot perform this action. You must be of a higher administrative rank!", null, null, null, null, null)
return
M.muted = !M.muted
log_admin("[key_name(usr)] has [(M.muted ? "muted" : "voiced")] [key_name(M)].")
message_admins("\blue [key_name_admin(usr)] has [(M.muted ? "muted" : "voiced")] [key_name_admin(M)].", 1)
M << "You have been [(M.muted ? "muted" : "voiced")]."
if (href_list["c_mode"])
if ((src.rank in list( "Temporary Admin", "Admin Candidate", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
if (ticker && ticker.mode)
return alert(usr, "The game has already started.", null, null, null, null)
var/dat = text({"What mode do you wish to play?
Secret
Wizard
Traitor
Meteor
Extended
Nuclear Emergency
Blob
Sandbox
Revolution
Cult
AI Malfunction
Changeling
Now: [master_mode]\n"})
usr << browse(dat, "window=c_mode")
/*
Corporate Restructuring
Random
Monkey
Death Commando Deathmatch
Confliction (TESTING)
Capture The Flag (Beta)
*/
if (href_list["c_mode2"])
if ((src.rank in list( "Temporary Admin", "Admin Candidate", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
if (ticker && ticker.mode)
return alert(usr, "The game has already started.", null, null, null, null)
switch(href_list["c_mode2"])
if("secret")
master_mode = "secret"
if("random")
master_mode = "random"
if("traitor")
master_mode = "traitor"
if("meteor")
master_mode = "meteor"
if("extended")
master_mode = "extended"
if("monkey")
master_mode = "monkey"
if("nuclear")
master_mode = "nuclear"
if("blob")
master_mode = "blob"
if("sandbox")
master_mode = "sandbox"
if("restructuring")
master_mode = "restructuring"
if("wizard")
master_mode = "wizard"
if("revolution")
master_mode = "revolution"
if("cult")
master_mode = "cult"
if("malfunction")
master_mode = "malfunction"
if("deathmatch")
master_mode = "deathmatch"
if("confliction")
master_mode = "confliction"
if("ctf")
master_mode = "ctf"
if("changeling")
master_mode = "changeling"
else
log_admin("[key_name(usr)] set the mode as [master_mode].")
message_admins("\blue [key_name_admin(usr)] set the mode as [master_mode].", 1)
world << "\blue The mode is now: [master_mode]"
world.save_mode(master_mode)
if (href_list["monkeyone"])
if ((src.rank in list( "Admin Candidate", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
var/mob/M = locate(href_list["monkeyone"])
if(!ismob(M))
return
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/N = M
log_admin("[key_name(usr)] attempting to monkeyize [key_name(M)]")
message_admins("\blue [key_name_admin(usr)] attempting to monkeyize [key_name_admin(M)]", 1)
N.monkeyize()
if(istype(M, /mob/living/silicon))
alert("The AI can't be monkeyized!", null, null, null, null, null)
return
if (href_list["forcespeech"])
if ((src.rank in list( "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
var/mob/M = locate(href_list["forcespeech"])
if (ismob(M))
var/speech = input("What will [key_name(M)] say?.", "Force speech", "")
if(!speech)
return
M.say(speech)
speech = copytext(sanitize(speech), 1, MAX_MESSAGE_LEN)
log_admin("[key_name(usr)] forced [key_name(M)] to say: [speech]")
message_admins("\blue [key_name_admin(usr)] forced [key_name_admin(M)] to say: [speech]")
else
alert("You cannot perform this action. You must be of a higher administrative rank!", null, null, null, null, null)
return
if (href_list["sendtoprison"])
if ((src.rank in list( "Admin Observer", "Admin Candidate", "Temporary Admin", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
var/mob/M = locate(href_list["sendtoprison"])
if (ismob(M))
if(istype(M, /mob/living/silicon/ai))
alert("The AI can't be sent to prison you jerk!", null, null, null, null, null)
return
//strip their stuff before they teleport into a cell :downs:
for(var/obj/item/weapon/W in M)
if(istype(W, /datum/organ/external))
continue
//don't strip organs
M.u_equip(W)
if (M.client)
M.client.screen -= W
if (W)
W.loc = M.loc
W.dropped(M)
W.layer = initial(W.layer)
//teleport person to cell
M.paralysis += 5
sleep(5) //so they black out before warping
M.loc = pick(prisonwarp)
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/prisoner = M
prisoner.equip_if_possible(new /obj/item/clothing/under/color/orange(prisoner), prisoner.slot_w_uniform)
prisoner.equip_if_possible(new /obj/item/clothing/shoes/orange(prisoner), prisoner.slot_shoes)
spawn(50)
M << "\red You have been sent to the prison station!"
log_admin("[key_name(usr)] sent [key_name(M)] to the prison station.")
message_admins("\blue [key_name_admin(usr)] sent [key_name_admin(M)] to the prison station.", 1)
else
alert("You cannot perform this action. You must be of a higher administrative rank!", null, null, null, null, null)
return
if (href_list["sendtomaze"])
if ((src.rank in list( "Admin Candidate", "Temporary Admin", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
var/mob/M = locate(href_list["sendtomaze"])
if (ismob(M))
if(istype(M, /mob/living/silicon/ai))
alert("The AI can't be sent to the maze you jerk!", null, null, null, null, null)
return
//strip their stuff before they teleport into a cell :downs:
for(var/obj/item/weapon/W in M)
if(istype(W, /datum/organ/external))
continue
//don't strip organs
M.u_equip(W)
if (M.client)
M.client.screen -= W
if (W)
W.loc = M.loc
W.dropped(M)
W.layer = initial(W.layer)
//teleport person to cell
M.paralysis += 5
sleep(5)
//so they black out before warping
M.loc = pick(mazewarp)
spawn(50)
M << "\red You have been sent to the maze! Try and get out alive. In the maze everyone is free game. Kill or be killed."
log_admin("[key_name(usr)] sent [key_name(M)] to the maze.")
message_admins("\blue [key_name_admin(usr)] sent [key_name_admin(M)] to the maze.", 1)
else
alert("You cannot perform this action. You must be of a higher administrative rank!", null, null, null, null, null)
return
if (href_list["tdome1"])
if ((src.rank in list( "Admin Candidate", "Temporary Admin", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
var/mob/M = locate(href_list["tdome1"])
if (ismob(M))
if(istype(M, /mob/living/silicon/ai))
alert("The AI can't be sent to the thunderdome you jerk!", null, null, null, null, null)
return
for(var/obj/item/W in M)
if (istype(W,/obj/item))
if(istype(W, /datum/organ/external))
continue
M.u_equip(W)
if (M.client)
M.client.screen -= W
if (W)
W.loc = M.loc
W.dropped(M)
W.layer = initial(W.layer)
M.paralysis += 5
sleep(5)
M.loc = pick(tdome1)
spawn(50)
M << "\blue You have been sent to the Thunderdome."
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 1)")
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 1)", 1)
if (href_list["tdome2"])
if ((src.rank in list( "Admin Candidate", "Temporary Admin", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
var/mob/M = locate(href_list["tdome2"])
if (ismob(M))
if(istype(M, /mob/living/silicon/ai))
alert("The AI can't be sent to the thunderdome you jerk!", null, null, null, null, null)
return
for(var/obj/item/W in M)
if (istype(W,/obj/item))
if(istype(W, /datum/organ/external))
continue
M.u_equip(W)
if (M.client)
M.client.screen -= W
if (W)
W.loc = M.loc
W.dropped(M)
W.layer = initial(W.layer)
M.paralysis += 5
sleep(5)
M.loc = pick(tdome2)
spawn(50)
M << "\blue You have been sent to the Thunderdome."
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 2)")
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 2)", 1)
if (href_list["tdomeadmin"])
if ((src.rank in list( "Admin Candidate", "Temporary Admin", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
var/mob/M = locate(href_list["tdomeadmin"])
if (ismob(M))
if(istype(M, /mob/living/silicon/ai))
alert("The AI can't be sent to the thunderdome you jerk!", null, null, null, null, null)
return
M.paralysis += 5
sleep(5)
M.loc = pick(tdomeadmin)
spawn(50)
M << "\blue You have been sent to the Thunderdome."
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Admin.)")
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Admin.)", 1)
if (href_list["tdomeobserve"])
if ((src.rank in list( "Admin Candidate", "Temporary Admin", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
var/mob/M = locate(href_list["tdomeobserve"])
if (ismob(M))
if(istype(M, /mob/living/silicon/ai))
alert("The AI can't be sent to the thunderdome you jerk!", null, null, null, null, null)
return
for(var/obj/item/W in M)
if (istype(W,/obj/item))
if(istype(W, /datum/organ/external))
continue
M.u_equip(W)
if (M.client)
M.client.screen -= W
if (W)
W.loc = M.loc
W.dropped(M)
W.layer = initial(W.layer)
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/observer = M
observer.equip_if_possible(new /obj/item/clothing/under/suit_jacket(observer), observer.slot_w_uniform)
observer.equip_if_possible(new /obj/item/clothing/shoes/black(observer), observer.slot_shoes)
M.paralysis += 5
sleep(5)
M.loc = pick(tdomeobserve)
spawn(50)
M << "\blue You have been sent to the Thunderdome."
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Observer.)")
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Observer.)", 1)
if (href_list["adminauth"])
if ((src.rank in list( "Admin Candidate", "Temporary Admin", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
var/mob/M = locate(href_list["adminauth"])
if (ismob(M) && !M.client.authenticated && !M.client.authenticating)
M.client.verbs -= /client/proc/authorize
M.client.authenticated = text("admin/[]", usr.client.authenticated)
log_admin("[key_name(usr)] authorized [key_name(M)]")
message_admins("\blue [key_name_admin(usr)] authorized [key_name_admin(M)]", 1)
M.client << text("You have been authorized by []", usr.key)
if (href_list["revive"])
if ((src.rank in list( "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
var/mob/M = locate(href_list["revive"])
if (ismob(M))
if(istype(M, /mob/dead/observer))
alert("Cannot revive a ghost")
return
if(config.allow_admin_rev)
M.revive()
message_admins("\red Admin [key_name_admin(usr)] healed / revived [key_name_admin(M)]!", 1)
log_admin("[key_name(usr)] healed / Rrvived [key_name(M)]")
return
else
alert("Admin revive disabled")
else
alert("You cannot perform this action. You must be of a higher administrative rank!", null, null, null, null, null)
return
if (href_list["makeai"]) //Yes, im fucking lazy, so what? it works ... hopefully
if ((src.rank in list( "Trial Admin", "Game Admin", "Game Master", "Admin Candidate", "Admin who Sinned" )))
var/mob/M = locate(href_list["makeai"])
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
message_admins("\red Admin [key_name_admin(usr)] AIized [key_name_admin(M)]!", 1)
// if (ticker.mode.name == "AI malfunction")
// var/obj/O = locate("landmark*ai")
// M << "\blue You have been teleported to your new starting location!"
// M.loc = O.loc
// M.buckled = null
// else
// var/obj/S = locate(text("start*AI"))
// if ((istype(S, /obj/landmark/start) && istype(S.loc, /turf)))
// M << "\blue You have been teleported to your new starting location!"
// M.loc = S.loc
// M.buckled = null
// world << "[M.real_name] is the AI!"
log_admin("[key_name(usr)] AIized [key_name(M)]")
H.AIize()
else
alert("I cannot allow this.")
return
else
alert("You cannot perform this action. You must be of a higher administrative rank!", null, null, null, null, null)
return
/***************** BEFORE**************
if (href_list["l_players"])
var/dat = "Name/Real Name/Key/IP:
"
for(var/mob/M in world)
var/foo = ""
if (ismob(M) && M.client)
if(!M.client.authenticated && !M.client.authenticating)
foo += text("\[ Authorize | ", src, M)
else
foo += text("\[ Authorized | ")
if(M.start)
if(!istype(M, /mob/living/carbon/monkey))
foo += text("Monkeyize | ", src, M)
else
foo += text("Monkeyized | ")
if(istype(M, /mob/living/silicon/ai))
foo += text("Is an AI | ")
else
foo += text("Make AI | ", src, M)
if(M.z != 2)
foo += text("Prison | ", src, M)
foo += text("Maze | ", src, M)
else
foo += text("On Z = 2 | ")
else
foo += text("Hasn't Entered Game | ")
foo += text("Heal/Revive | ", src, M)
foo += text("Say \]", src, M)
dat += text("N: [] R: [] (K: []) (IP: []) []
", M.name, M.real_name, (M.client ? M.client : "No client"), M.lastKnownIP, foo)
usr << browse(dat, "window=players;size=900x480")
*****************AFTER******************/
// Now isn't that much better? IT IS NOW A PROC, i.e. kinda like a big panel like unstable
if (href_list["adminplayeropts"])
var/mob/M = locate(href_list["adminplayeropts"])
if(!M)
usr << "You seem to be selecting a mob that doesn't exist."
return
var/dat = "Options for [M.key]"
var/foo = "\[ "
if (ismob(M) && M.client)
if(!M.client.authenticated && !M.client.authenticating)
foo += text("Authorize | ")
else
foo += text("Authorized | ")
foo += text("Promote/Demote | ")
if(!istype(M, /mob/new_player))
if(!istype(M, /mob/living/carbon/monkey))
foo += text("Monkeyize | ")
else
foo += text("Monkeyized | ")
if(istype(M, /mob/living/silicon/ai))
foo += text("Is an AI | ")
else if(istype(M, /mob/living/carbon/human))
foo += text("Make AI | ")
foo += text("Thunderdome 1 | ")
foo += text("Thunderdome 2 | ")
foo += text("Thunderdome Admin | ")
foo += text("Thunderdome Observer | ")
foo += text("Prison | ")
foo += text("Maze | ")
foo += text("Heal/Revive | ")
else
foo += text("Hasn't Entered Game | ")
foo += text("Say | ")
foo += text("Mute: [(M.muted ? "Muted" : "Voiced")] | ")
foo += text("Boot | ")
foo += text("Jump to | ")
foo += text("Ban \]")
foo += text("Jobban | ")
dat += text("[foo]")
usr << browse(dat, "window=adminplayeropts;size=480x100")
if (href_list["jumpto"])
if(( src.level in list(6, 5, 4) ) || ((src.level in list(3, 2)) && (src.state == 2)))
var/mob/M = locate(href_list["jumpto"])
usr.client.jumptomob(M)
else
alert("You are not a high enough administrator or you aren't observing!")
if (href_list["traitor"])
if(!ticker || !ticker.mode)
alert("The game hasn't started yet!")
return
var/mob/M = locate(href_list["traitor"])
var/datum/game_mode/current_mode = ticker.mode
if (istype(M, /mob/living/carbon/human) && M:mind)
M:mind.edit_memory()
return
switch(current_mode.config_tag)
if("revolution")
if(M.mind in current_mode:head_revolutionaries)
alert("Is a Head Revolutionary!")
else if(M.mind in current_mode:revolutionaries)
alert("Is a Revolutionary!")
return
if("cult")
if(M.mind in current_mode:cult)
alert("Is a Cultist!")
return
if("wizard")
if(current_mode:wizard && M.mind == current_mode:wizard)
var/datum/mind/antagonist = M.mind
var/t = ""
for(var/datum/objective/OB in antagonist.objectives)
t += "[OB.explanation_text]\n"
if(antagonist.objectives.len == 0)
t = "None defined."
alert("Is a WIZARD. Objective(s):\n[t]", "[M.key]")
return
if("changeling")
if(M.mind in current_mode:changelings)
var/datum/mind/antagonist = M.mind
var/t = ""
for(var/datum/objective/OB in antagonist.objectives)
t += "[OB.explanation_text]\n"
if(antagonist.objectives.len == 0)
t = "None defined."
alert("Is a CHANGELING. Objective(s):\n[t]", "[M.key]")
return
if("malfunction")
if(M.mind in current_mode:malf_ai)
alert("Is malfunctioning!")
return
if("nuclear")
if(M.mind in current_mode:syndicates)
alert("Is a Syndicate operative!", "[M.key]")
return
if(istype(M,/mob/living/silicon/robot))
var/mob/living/silicon/robot/R = M
if(R.emagged)
alert("Is emagged!\n0th law: [R.laws.zeroth]", "[R.key]")
return
// traitor, or other modes where traitors/counteroperatives would be.
if(M.mind in current_mode.traitors)
var/datum/mind/antagonist = M.mind
var/t = ""
if(antagonist)
for(var/datum/objective/OB in antagonist.objectives)
t += "[OB.explanation_text]\n"
if(antagonist.objectives.len == 0)
t = "None defined."
alert("Is a Traitor. Objective(s):\n[t]", "[M.key]")
return
//they're nothing so turn them into a traitor!
if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/silicon/ai))
var/traitorize = alert("Is not a traitor, make Traitor?", "Traitor", "Yes", "Cancel")
if(traitorize == "Cancel")
return
if(traitorize == "Yes")
traitorize(M,,1)
//they're a ghost/monkey
else
alert("Cannot make this mob a traitor")
if (href_list["create_object"])
if (src.rank in list("Admin Candidate", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master"))
return create_object(usr)
else
alert("You are not a high enough administrator! Sorry!!!!")
if (href_list["create_turf"])
if (src.rank in list("Admin Candidate", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master"))
return create_turf(usr)
else
alert("You are not a high enough administrator! Sorry!!!!")
if (href_list["create_mob"])
if (src.rank in list("Admin who Sinned", "Game Admin", "Game Master"))
return create_mob(usr)
else
alert("You are not a high enough administrator! Sorry!!!!")
if (href_list["vmode"])
vmode()
if (href_list["votekill"])
votekill()
if (href_list["voteres"])
voteres()
if (href_list["prom_demot"])
if ((src.rank in list("Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
var/client/C = locate(href_list["prom_demot"])
if(C.holder && (C.holder.level >= src.level))
alert("This cannot be done as [C] is a [C.holder.rank]")
return
var/dat = "[C] is a [C.holder ? "[C.holder.rank]" : "non-admin"]
Change [C]'s rank?
"
if(src.level == 6)
//host
dat += {"
Game Admin //coder
Admin who Sinned // Shit Guy
Trial Admin // Primary Administrator
Admin Candidate // // Administrator
Temporary Admin // Secondary Admin
Admin Observer // Moderator
Punnished Admin // Filthy Xeno
Remove Admin
"}
else if(src.level == 5)
//coder
dat += {"
Admin who Sinned // Shit Guy
Trial Admin // Primary Administrator
Admin Candidate // // Administrator
Temporary Admin // Secondary Admin
Admin Observer // Moderator
Punnished Admin // Filthy Xeno
Remove Admin
"}
else
alert("Not a high enough level admin, sorry.")
return
usr << browse(dat, "window=prom_demot;size=480x300")
if (href_list["chgadlvl"])
//change admin level
var/rank = href_list["chgadlvl"]
var/client/C = locate(href_list["client4ad"])
if(rank == "Remove")
C.clear_admin_verbs()
C.update_admins(null)
log_admin("[key_name(usr)] has removed [C]'s adminship")
message_admins("[key_name_admin(usr)] has removed [C]'s adminship", 1)
admins.Remove(C.ckey)
else
C.clear_admin_verbs()
C.update_admins(rank)
log_admin("[key_name(usr)] has made [C] a [rank]")
message_admins("[key_name_admin(usr)] has made [C] a [rank]", 1)
admins[C.ckey] = rank
if (href_list["object_list"])
if (src.rank in list("Admin Candidate", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master"))
if (config.allow_admin_spawning && ((src.state == 2) || (src.rank in list("Admin who Sinned", "Game Admin", "Game Master"))))
var/atom/loc = usr.loc
var/dirty_paths
if (istext(href_list["object_list"]))
dirty_paths = list(href_list["object_list"])
else if (istype(href_list["object_list"], /list))
dirty_paths = href_list["object_list"]
var/paths = list()
var/removed_paths = list()
for (var/dirty_path in dirty_paths)
var/path = text2path(dirty_path)
if (!path)
removed_paths += dirty_path
else if (!ispath(path, /obj) && !ispath(path, /turf) && !ispath(path, /mob))
removed_paths += dirty_path
else if (ispath(path, /obj/item/weapon/gun/energy/pulse_rifle) && !(src.rank in list("Game Admin", "Game Master")))
removed_paths += dirty_path
else if (ispath(path, /obj/bhole) && !(src.rank in list("Game Admin", "Game Master")))
removed_paths += dirty_path
else if (ispath(path, /mob) && !(src.rank in list("Admin who Sinned", "Game Admin", "Game Master")))
removed_paths += dirty_path
else
paths += path
if (!paths)
return
else if (length(paths) > 5)
alert("Select less object types, jerko.")
return
else if (length(removed_paths))
alert("Removed:\n" + dd_list2text(removed_paths, "\n"))
var/list/offset = dd_text2list(href_list["offset"],",")
var/number = dd_range(1, 100, text2num(href_list["object_count"]))
var/X = offset.len > 0 ? text2num(offset[1]) : 0
var/Y = offset.len > 1 ? text2num(offset[2]) : 0
var/Z = offset.len > 2 ? text2num(offset[3]) : 0
for (var/i = 1 to number)
switch (href_list["offset_type"])
if ("absolute")
for (var/path in paths)
new path(locate(0 + X,0 + Y,0 + Z))
if ("relative")
if (loc)
for (var/path in paths)
new path(locate(loc.x + X,loc.y + Y,loc.z + Z))
else
return
if (number == 1)
log_admin("[key_name(usr)] created a [english_list(paths)]")
for(var/path in paths)
if(ispath(path, /mob))
message_admins("[key_name_admin(usr)] created a [english_list(paths)]", 1)
break
else
log_admin("[key_name(usr)] created [number]ea [english_list(paths)]")
for(var/path in paths)
if(ispath(path, /mob))
message_admins("[key_name_admin(usr)] created [number]ea [english_list(paths)]", 1)
break
return
else
alert("You cannot spawn items right now.")
return
if (href_list["secretsfun"])
if ((src.rank in list( "Admin Candidate", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
var/ok = 0
switch(href_list["secretsfun"])
if("sec_clothes")
for(var/obj/item/clothing/under/O in world)
del(O)
ok = 1
if("sec_all_clothes")
for(var/obj/item/clothing/O in world)
del(O)
ok = 1
if("sec_classic1")
for(var/obj/item/clothing/suit/fire/O in world)
del(O)
for(var/obj/grille/O in world)
del(O)
for(var/obj/machinery/vehicle/pod/O in world)
for(var/mob/M in src)
M.loc = src.loc
if (M.client)
M.client.perspective = MOB_PERSPECTIVE
M.client.eye = M
del(O)
ok = 1
if("toxic")
/* 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")
for(var/mob/living/carbon/human/H in world)
spawn(0)
H.monkeyize()
ok = 1
if("power")
power_restore()
log_admin("[key_name(usr)] made all areas powered", 1)
message_admins("\blue [key_name_admin(usr)] made all areas powered", 1)
if("unpower")
power_failure()
log_admin("[key_name(usr)] made all areas unpowered", 1)
message_admins("\blue [key_name_admin(usr)] made all areas unpowered", 1)
if("activateprison")
world << "\blue Transit signature detected."
world << "\blue Incoming shuttle."
/*
var/A = locate(/area/shuttle_prison)
for(var/atom/movable/AM as mob|obj in A)
AM.z = 1
AM.Move()
*/
message_admins("\blue [key_name_admin(usr)] sent the prison shuttle to the station.", 1)
if("deactivateprison")
/*
var/A = locate(/area/shuttle_prison)
for(var/atom/movable/AM as mob|obj in A)
AM.z = 2
AM.Move()
*/
message_admins("\blue [key_name_admin(usr)] sent the prison shuttle back.", 1)
if("toggleprisonstatus")
for(var/obj/machinery/computer/prison_shuttle/PS in world)
PS.allowedtocall = !(PS.allowedtocall)
message_admins("\blue [key_name_admin(usr)] toggled status of prison shuttle to [PS.allowedtocall].", 1)
if("prisonwarp")
if(!ticker)
alert("The game hasn't started yet!", null, null, null, null, null)
return
message_admins("\blue [key_name_admin(usr)] teleported all players to the prison station.", 1)
for(var/mob/living/carbon/human/H in world)
var/turf/loc = find_loc(H)
var/security = 0
if(loc.z > 1 || prisonwarped.Find(H))
//don't warp them if they aren't ready or are already there
continue
H.paralysis += 5
if(H.wear_id)
var/obj/item/weapon/card/id/id = H.get_idcard()
for(var/A in id.access)
if(A == access_security)
security++
if(!security)
//strip their stuff before they teleport into a cell :downs:
for(var/obj/item/weapon/W in H)
if(istype(W, /datum/organ/external))
continue
//don't strip organs
H.u_equip(W)
if (H.client)
H.client.screen -= W
if (W)
W.loc = H.loc
W.dropped(H)
W.layer = initial(W.layer)
//teleport person to cell
H.loc = pick(prisonwarp)
H.equip_if_possible(new /obj/item/clothing/under/color/orange(H), H.slot_w_uniform)
H.equip_if_possible(new /obj/item/clothing/shoes/orange(H), H.slot_shoes)
else
//teleport security person
H.loc = pick(prisonsecuritywarp)
prisonwarped += H
if("traitor_all")
if ((src.rank in list( "Admin Candidate", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
if(!ticker)
alert("The game hasn't started yet!")
return
var/objective = input("Enter an objective")
if(!objective)
return
for(var/mob/living/carbon/human/H in world)
if(H.stat == 2 || !(H.client)) continue
if(checktraitor(H)) continue
traitorize(H, objective, 0)
for(var/mob/living/silicon/ai/A in world)
if(A.stat == 2 || !(A.client)) continue
if(checktraitor(A)) continue
traitorize(A, objective, 0)
message_admins("\blue [key_name_admin(usr)] used everyone is a traitor secret. Objective is [objective]", 1)
log_admin("[key_name(usr)] used everyone is a traitor secret. Objective is [objective]")
else
alert("You're not of a high enough rank to do this")
if("moveminingshuttle")
if ((src.rank in list( "Admin Candidate", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
if(mining_shuttle_moving)
return
move_mining_shuttle()
message_admins("\blue [key_name_admin(usr)] moved mining shuttle", 1)
log_admin("[key_name(usr)] moved the mining shuttle")
else
alert("You're not of a high enough rank to do this")
if("moveadminshuttle")
if ((src.rank in list( "Admin Candidate", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
move_admin_shuttle()
message_admins("\blue [key_name_admin(usr)] moved the centcom administration shuttle", 1)
log_admin("[key_name(usr)] moved the centcom administration shuttle")
else
alert("You're not of a high enough rank to do this")
if("moveferry")
if ((src.rank in list( "Admin Candidate", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
move_ferry()
message_admins("\blue [key_name_admin(usr)] moved the centcom ferry", 1)
log_admin("[key_name(usr)] moved the centcom ferry")
else
alert("You're not of a high enough rank to do this")
if("flicklights")
while(!usr.stat)
//knock yourself out to stop the ghosts
for(var/mob/M in world)
if(M.client && M.stat != 2 && prob(25))
var/area/AffectedArea = get_area(M)
if(AffectedArea.name != "Space" && AffectedArea.name != "Engine Walls" && AffectedArea.name != "Chemical Lab Test Chamber" && AffectedArea.name != "Escape Shuttle" && AffectedArea.name != "Arrival Area" && AffectedArea.name != "Arrival Shuttle" && AffectedArea.name != "start area" && AffectedArea.name != "Engine Combustion Chamber")
AffectedArea.power_light = 0
AffectedArea.power_change()
spawn(rand(55,185))
AffectedArea.power_light = 1
AffectedArea.power_change()
var/Message = rand(1,4)
switch(Message)
if(1)
M.show_message(text("\blue You shudder as if cold..."), 1)
if(2)
M.show_message(text("\blue You feel something gliding across your back..."), 1)
if(3)
M.show_message(text("\blue Your eyes twitch, you feel like something you can't see is here..."), 1)
if(4)
M.show_message(text("\blue You notice something moving out of the corner of your eye, but nothing is there..."), 1)
for(var/obj/W in orange(5,M))
if(prob(25) && !W.anchored)
step_rand(W)
sleep(rand(100,1000))
for(var/mob/M in world)
if(M.client && M.stat != 2)
M.show_message(text("\blue The chilling wind suddenly stops..."), 1)
/* if("shockwave")
ok = 1
world << "\red ALERT: STATION STRESS CRITICAL"
sleep(60)
world << "\red ALERT: STATION STRESS CRITICAL. TOLERABLE LEVELS EXCEEDED!"
sleep(80)
world << "\red ALERT: STATION STRUCTURAL STRESS CRITICAL. SAFETY MECHANISMS FAILED!"
sleep(40)
for(var/mob/M in world)
shake_camera(M, 400, 1)
for(var/obj/window/W in world)
spawn(0)
sleep(rand(10,400))
W.ex_act(rand(2,1))
for(var/obj/grille/G in world)
spawn(0)
sleep(rand(20,400))
G.ex_act(rand(2,1))
for(var/obj/machinery/door/D in world)
spawn(0)
sleep(rand(20,400))
D.ex_act(rand(2,1))
for(var/turf/station/floor/Floor in world)
spawn(0)
sleep(rand(30,400))
Floor.ex_act(rand(2,1))
for(var/obj/cable/Cable in world)
spawn(0)
sleep(rand(30,400))
Cable.ex_act(rand(2,1))
for(var/obj/closet/Closet in world)
spawn(0)
sleep(rand(30,400))
Closet.ex_act(rand(2,1))
for(var/obj/machinery/Machinery in world)
spawn(0)
sleep(rand(30,400))
Machinery.ex_act(rand(1,3))
for(var/turf/station/wall/Wall in world)
spawn(0)
sleep(rand(30,400))
Wall.ex_act(rand(2,1)) */
if("wave")
if ((src.rank in list("Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
meteor_wave()
message_admins("[key_name_admin(usr)] has spawned meteors", 1)
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
world << sound('meteors.ogg')
else
alert("You cannot perform this action. You must be of a higher administrative rank!", null, null, null, null, null)
return
if("gravanomalies")
command_alert("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert")
world << sound('granomalies.ogg')
var/turf/T = pick(blobstart)
var/obj/bhole/bh = new /obj/bhole( T.loc, 30 )
spawn(rand(50, 300))
del(bh)
if("timeanomalies")
command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
world << sound('spanomalies.ogg')
var/list/turfs = list( )
var/turf/picked
for(var/turf/T in world)
if(T.z == 1 && istype(T,/turf/simulated/floor) && !istype(T,/turf/space))
turfs += T
for(var/turf/T in world)
set background = 1
if(prob(20) && T.z == 1 && istype(T,/turf/simulated/floor))
spawn(50+rand(0,3000))
picked = pick(turfs)
var/obj/portal/P = new /obj/portal( T )
P.target = picked
P.creator = null
P.icon = 'objects.dmi'
P.failchance = 0
P.icon_state = "anom"
P.name = "wormhole"
spawn(rand(300,600))
del(P)
if("goblob")
command_alert("Confirmed anomaly type SPC-MGM-152 aboard [station_name()]. All personnel must destroy the anomaly.", "Anomaly Alert")
world << sound('outbreak5.ogg')
var/turf/T = pick(blobstart)
var/obj/blob/bl = new /obj/blob( T.loc, 30 )
spawn(0)
bl.Life()
bl.Life()
bl.Life()
bl.Life()
bl.Life()
blobevent = 1
dotheblobbaby()
spawn(3000)
blobevent = 0
if("aliens")
if(aliens_allowed)
alien_infestation()
message_admins("[key_name_admin(usr)] has spawned aliens", 1)
if("carp")
var/choice = input("You sure you want to spawn carp?") in list("Badmin", "Cancel")
if(choice == "Badmin")
message_admins("[key_name_admin(usr)] has spawned carp.", 1)
carp_migration()
if("radiation")
message_admins("[key_name_admin(usr)] has has irradiated the station", 1)
high_radiation_event()
if("immovable")
message_admins("[key_name_admin(usr)] has sent an immovable rod to the station", 1)
immovablerod()
if("prison_break")
message_admins("[key_name_admin(usr)] has allowed a prison break", 1)
prison_break()
if("virus")
if(alert("Do you want this to be a random disease or do you have something in mind?",,"Random","Choose")=="Random")
viral_outbreak()
message_admins("[key_name_admin(usr)] has triggered a virus outbreak", 1)
else
var/list/viruses = list("fake gbs","gbs","magnitis","wizarditis",/*"beesease",*/"brain rot","cold","retrovirus","flu","pierrot's throat","rhumba beat")
var/V = input("Choose the virus to spread", "BIOHAZARD") in viruses
viral_outbreak(V)
message_admins("[key_name_admin(usr)] has triggered a virus outbreak of [V]", 1)
if("retardify")
if (src.rank in list("Admin who Sinned", "Game Admin", "Game Master"))
for(var/mob/living/carbon/human/H in world)
if(H.client)
H << "\red You suddenly feel stupid."
H.brainloss = 60
message_admins("[key_name_admin(usr)] made everybody retarded")
else
alert("You cannot perform this action. You must be of a higher administrative rank!")
return
if("fakeguns")
if (src.rank in list("Admin who Sinned", "Game Admin", "Game Master"))
for(var/obj/item/W in world)
if(istype(W, /obj/item/clothing) || istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/weapon/disk) || istype(W, /obj/item/weapon/tank))
continue
W.icon = 'gun.dmi'
W.icon_state = "revolver"
W.item_state = "gun"
message_admins("[key_name_admin(usr)] made every item look like a gun")
else
alert("You cannot perform this action. You must be of a higher administrative rank!")
return
if("schoolgirl")
if (src.rank in list("Admin who Sinned", "Game Admin", "Game Master"))
for(var/obj/item/clothing/under/W in world)
W.icon_state = "schoolgirl"
W.item_state = "w_suit"
W.color = "schoolgirl"
message_admins("[key_name_admin(usr)] activated Japanese Animes mode")
world << sound('animes.ogg')
else
alert("You cannot perform this action. You must be of a higher administrative rank!")
return
if("dorf")
if (src.rank in list("Admin who Sinned","Game Admin", "Game Master"))
for(var/mob/living/carbon/human/B in world)
B.face_icon_state = "facial_wise"
B.update_face()
message_admins("[key_name_admin(usr)] activated dorf mode")
else
alert("You cannot perform this action. You must be of a higher administrative rank!")
return
if (usr)
log_admin("[key_name(usr)] used secret [href_list["secretsfun"]]")
if (ok)
world << text("A secret has been activated by []!", usr.key)
return
if (href_list["secretsadmin"])
if ((src.rank in list( "Admin Observer", "Temporary Admin", "Admin Candidate", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
var/ok = 0
switch(href_list["secretsadmin"])
if("clear_bombs")
for(var/obj/item/assembly/r_i_ptank/O in world)
del(O)
for(var/obj/item/assembly/m_i_ptank/O in world)
del(O)
for(var/obj/item/assembly/t_i_ptank/O in world)
del(O)
ok = 1
if("list_bombers")
var/dat = "Bombing List
"
for(var/l in bombers)
dat += text("[l]
")
usr << browse(dat, "window=bombers")
if("list_signalers")
var/dat = "Showing last [length(lastsignalers)] signalers.
"
for(var/sig in lastsignalers)
dat += "[sig]
"
usr << browse(dat, "window=lastsignalers;size=800x500")
if("list_lawchanges")
var/dat = "Showing last [length(lawchanges)] law changes.
"
for(var/sig in lawchanges)
dat += "[sig]
"
usr << browse(dat, "window=lawchanges;size=800x500")
if("check_antagonist")
if (ticker && ticker.current_state >= GAME_STATE_PLAYING)
var/dat = "Round StatusRound Status
"
dat += "Current Game Mode: [ticker.mode.name]
"
dat += "Round Duration: [round(world.time / 36000)]:[add_zero(world.time / 600 % 60, 2)]:[world.time / 100 % 6][world.time / 100 % 10]
"
dat += "Emergency shuttle
"
if (!emergency_shuttle.online)
dat += "Call Shuttle
"
else
var/timeleft = emergency_shuttle.timeleft()
switch(emergency_shuttle.location)
if(0)
dat += "ETA: [(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]
"
dat += "Send Back
"
if(1)
dat += "ETA: [(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]
"
switch(ticker.mode.config_tag)
if("nuclear")
dat += "
| Syndicates | |
"
for(var/datum/mind/N in ticker.mode:syndicates)
var/mob/M = N.current
if(M)
dat += "| [M.real_name][M.client ? "" : " (logged out)"][M.stat == 2 ? " (DEAD)" : ""] | "
dat += "PM |
"
else
dat += "| Nuclear Operative not found! |
"
dat += "
| Nuclear Disk(s) |
"
for(var/obj/item/weapon/disk/nuclear/N in world)
dat += "| [N.name], "
var/atom/disk_loc = N.loc
while(!istype(disk_loc, /turf))
if(istype(disk_loc, /mob))
var/mob/M = disk_loc
dat += "carried by [M.real_name] "
if(istype(disk_loc, /obj))
var/obj/O = disk_loc
dat += "in \a [O.name] "
disk_loc = disk_loc.loc
dat += "in [disk_loc.loc] at ([disk_loc.x], [disk_loc.y], [disk_loc.z]) |
"
dat += "
"
if("revolution")
dat += "
| Revolutionaries | |
"
for(var/datum/mind/N in ticker.mode:head_revolutionaries)
var/mob/M = N.current
if(!M)
dat += "| Head Revolutionary not found! |
"
else
dat += "| [M.real_name] (Leader)[M.client ? "" : " (logged out)"][M.stat == 2 ? " (DEAD)" : ""] | "
dat += "PM |
"
for(var/datum/mind/N in ticker.mode:revolutionaries)
var/mob/M = N.current
if(M)
dat += "| [M.real_name][M.client ? "" : " (logged out)"][M.stat == 2 ? " (DEAD)" : ""] | "
dat += "PM |
"
dat += "
| Target(s) | | Location |
"
for(var/datum/mind/N in ticker.mode:get_living_heads())
var/mob/M = N.current
if(M)
dat += "| [M.real_name][M.client ? "" : " (logged out)"][M.stat == 2 ? " (DEAD)" : ""] | "
dat += "PM | "
var/turf/mob_loc = get_turf_loc(M)
dat += "[mob_loc.loc] |
"
dat += "
"
if("changeling")
if(ticker.mode:changelings.len > 0)
dat += "
| Changelings | | |
"
for(var/datum/mind/changeling in ticker.mode:changelings)
var/mob/M = changeling.current
if(M)
dat += "| [M.real_name][M.client ? "" : " (logged out)"][M.stat == 2 ? " (DEAD)" : ""] | "
dat += "PM | "
dat += "Show Objective |
"
else
dat += "| Changeling not found! |
"
dat += "
"
else
dat += "There are no changelings."
/* this doesn't work
if("wizard")
if(ticker.mode:wizards.len > 0)
dat += "
| Wizards | | |
"
for(var/datum/mind/wizard in ticker.mode:wizards)
var/mob/M = wizard.current
if(M)
dat += "| [M.real_name][M.client ? "" : " (logged out)"][M.stat == 2 ? " (DEAD)" : ""] | "
dat += "PM | "
dat += "Show Objective |
"
else
dat += "| Wizard not found! |
"
dat += "
"
else
dat += "There are no wizards."
*/
if("cult")
dat += "
| Cultists | |
"
for(var/datum/mind/N in ticker.mode:cult)
var/mob/M = N.current
if(M)
dat += "| [M.real_name][M.client ? "" : " (logged out)"][M.stat == 2 ? " (DEAD)" : ""] | "
dat += "PM |
"
dat += "
"
else // i'll finish this later
if(ticker.mode.traitors.len > 0)
dat += "
| Traitors | | |
"
for(var/datum/mind/traitor in ticker.mode.traitors)
var/mob/M = traitor.current
if(M)
dat += "| [M.real_name][M.client ? "" : " (logged out)"][M.stat == 2 ? " (DEAD)" : ""] | "
dat += "PM | "
dat += "Show Objective |
"
else
dat += "| Traitor not found! |
"
dat += "
"
else
dat += "There are no traitors."
dat += ""
usr << browse(dat, "window=roundstatus;size=400x500")
else
alert("The game hasn't started yet!")
if("showailaws")
for(var/mob/living/silicon/ai/ai in world)
usr << "[key_name(ai, usr)]'s Laws:"
if (ai.laws_object == null)
usr << "[key_name(ai, usr)]'s Laws are null??"
else
ai.laws_object.show_laws(usr)
if("showgm")
if(!ticker)
alert("The game hasn't started yet!")
else if (ticker.mode)
alert("The game mode is [ticker.mode.name]")
else alert("For some reason there's a ticker, but not a game mode")
if("manifest")
var/dat = "Showing Crew Manifest.
"
dat += "| Name | Position |
"
for(var/mob/living/carbon/human/H in world)
if(H.ckey)
dat += text("| [] | [] |
", H.name, H.get_assignment())
dat += "
"
usr << browse(dat, "window=manifest;size=440x410")
if("DNA")
var/dat = "Showing DNA from blood.
"
dat += "| Name | DNA | Blood Type |
"
for(var/mob/living/carbon/human/H in world)
if(H.dna && H.ckey)
dat += "| [H] | [H.dna.unique_enzymes] | [H.b_type] |
"
dat += "
"
usr << browse(dat, "window=DNA;size=440x410")
if("fingerprints")
var/dat = "Showing Fingerprints.
"
dat += "| Name | Fingerprints |
"
for(var/mob/living/carbon/human/H in world)
if(H.ckey)
if(H.dna && H.dna.uni_identity)
dat += "| [H] | [md5(H.dna.uni_identity)] |
"
else if(H.dna && !H.dna.uni_identity)
dat += "| [H] | H.dna.uni_identity = null |
"
else if(!H.dna)
dat += "| [H] | H.dna = null |
"
dat += "
"
usr << browse(dat, "window=fingerprints;size=440x410")
else
if (usr)
log_admin("[key_name(usr)] used secret [href_list["secretsadmin"]]")
if (ok)
world << text("A secret has been activated by []!", usr.key)
return
if (href_list["secretscoder"])
if ((src.rank in list( "Admin who Sinned", "Game Admin", "Game Master" )))
switch(href_list["secretscoder"])
if("spawn_objects")
var/dat = "Admin Log
"
for(var/l in admin_log)
dat += "[l]"
if(!admin_log.len)
dat += "No-one has done anything this round!"
usr << browse(dat, "window=admin_log")
return
//hahaha
///////////////////////////////////////////////////////////////////////////////////////////////Panels
/obj/admins/proc/player()
var/dat = "Player Menu"
dat += "| Name | Real Name | Key | Options | PM | Traitor? | Karma |
"
//add IP: | to this if wanting to add back in IP checking
//add (IP: [M.lastKnownIP]) | if you want to know their ip to the lists below
var/list/mobs = sortmobs()
var/DBConnection/dbcon = new()
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
if(!dbcon.IsConnected())
usr << "\red Unable to connect to karma database. This error can occur if your host has failed to set up an SQL database or improperly configured its login credentials.
"
for(var/mob/M in mobs)
if(M.ckey)
dat += "| [M.name] | "
if(istype(M, /mob/living/silicon/ai))
dat += "AI | "
if(istype(M, /mob/living/silicon/robot))
dat += "Cyborg | "
if(istype(M, /mob/living/carbon/human))
dat += "[M.real_name] | "
if(istype(M, /mob/new_player))
dat += "New Player | "
if(istype(M, /mob/dead/observer))
dat += "Ghost | "
if(istype(M, /mob/living/carbon/monkey))
dat += "Monkey | "
if(istype(M, /mob/living/carbon/alien))
dat += "Alien | "
dat += {"[(M.client ? "[(M.client.goon ? "" : "")][M.client]" : "No client")] |
X |
PM |
[checktraitor(M) ? "" : ""]Traitor? |
"}
dat += "NOT CONNECTED |
"
else
for(var/mob/M in mobs)
if(M.ckey)
var/DBQuery/query = dbcon.NewQuery("SELECT karma FROM karmatotals WHERE byondkey='[M.key]'")
query.Execute()
var/currentkarma
while(query.NextRow())
currentkarma = query.item[1]
dat += "| [M.name] | "
if(istype(M, /mob/living/silicon/ai))
dat += "AI | "
if(istype(M, /mob/living/silicon/robot))
dat += "Cyborg | "
if(istype(M, /mob/living/carbon/human))
dat += "[M.real_name] | "
if(istype(M, /mob/new_player))
dat += "New Player | "
if(istype(M, /mob/dead/observer))
dat += "Ghost | "
if(istype(M, /mob/living/carbon/monkey))
dat += "Monkey | "
if(istype(M, /mob/living/carbon/alien))
dat += "Alien | "
dat += {"[(M.client ? "[(M.client.goon ? "" : "")][M.client]" : "No client")] |
X |
PM |
[checktraitor(M) ? "" : ""]Traitor? |
"}
if(currentkarma)
dat += "[currentkarma] |
"
else
dat += "0 | "
dat += "
"
usr << browse(dat, "window=players;size=540x480")
/obj/admins/proc/Jobbans()
if ((src.rank in list( "Game Admin", "Game Master" )))
var/dat = "Job Bans!
"
for(var/t in jobban_keylist)
dat += text("| [t] |
")
dat += "
"
usr << browse(dat, "window=ban;size=400x400")
/obj/admins/proc/Game()
var/dat
var/lvl = 0
switch(src.rank)
if("Admin Observer")
lvl = 1
if("Temporary Admin")
lvl = 2
if("Admin Candidate")
lvl = 3
if("Trial Admin")
lvl = 4
if("Admin who Sinned")
lvl = 5
if("Game Admin")
lvl = 6
if("Game Master")
lvl = 7
dat += "
Game Panel
\n"
if(lvl > 0)
// if(lvl >= 2 )
dat += "Change Game Mode
"
dat += "
"
if(lvl >= 3 )
dat += "Create Object
"
dat += "Create Turf
"
if(lvl >= 5)
dat += "Create Mob
"
// if(lvl == 6 )
usr << browse(dat, "window=admin2;size=210x180")
return
/*
/obj/admins/proc/goons()
var/dat = "
GOOOOOOONS
| Key | SA Username |
"
for(var/t in goon_keylist)
dat += text("| [t] | [goon_keylist[ckey(t)]] |
")
dat += "
"
usr << browse(dat, "window=ban;size=300x400")
/obj/admins/proc/beta_testers()
var/dat = "
Beta testers
| Key |
"
for(var/t in beta_tester_keylist)
dat += text("| [t] |
")
dat += "
"
usr << browse(dat, "window=ban;size=300x400")
*/
/obj/admins/proc/Secrets()
var/lvl = 0
switch(src.rank)
if("Admin Observer")
lvl = 1
if("Temporary Admin")
lvl = 2
if("Admin Candidate")
lvl = 3
if("Trial Admin")
lvl = 4
if("Admin who Sinned")
lvl = 5
if("Game Admin")
lvl = 6
if("Game Master")
lvl = 7
var/dat = {"
Choose a secret, any secret at all.
Admin Secrets
Remove all bombs currently in existence
Bombing List
Show current traitors and objectives
Show last [length(lastsignalers)] signalers
Show last [length(lawchanges)] law changes
Show AI Laws
Show Game Mode
Show Crew Manifest
List DNA (Blood)
List Fingerprints
"}
if(lvl > 2)
dat += {"
'Random' Events
Spawn a wave of meteors
Spawn a gravitational anomaly (Untested)
Spawn wormholes (Untested)
Spawn magma(Untested)
Trigger an Alien infestation
Trigger an Carp migration
Irradiate the station
Trigger a Prison Break
Trigger a Virus Outbreak
Spawn an Immovable Rod
Fun Secrets
Remove 'internal' clothing
Remove ALL clothing
Toxic Air (WARNING: dangerous)
Turn all humans into monkies
Remove firesuits, grilles, and pods
Make all areas powered
Make all areas unpowered
Toggle Prison Shuttle Status(Use with S/R)
Send Prison Shuttle
Return Prison Shuttle
Warp all Players to Prison
Everyone is the traitor
Ghost Mode
Remove all urine/poo from station
Make all players retarded
Make all items look like guns
Japanese Animes Mode
Move Administration Shuttle
Move Ferry
Move Mining Shuttle
"}
//Station Shockwave
if(lvl >= 5)
dat += {"
Coder Secrets
Admin Log
"}
usr << browse(dat, "window=secrets")
return
/obj/admins/proc/Voting()
var/dat
var/lvl = 0
switch(src.rank)
if("Admin Observer")
lvl = 1
if("Temporary Admin")
lvl = 2
if("Admin Candidate")
lvl = 3
if("Trial Admin")
lvl = 4
if("Admin who Sinned")
lvl = 5
if("Game Admin")
lvl = 6
if("Game Master")
lvl = 7
dat += "Voting
\n"
if(lvl > 0)
// if(lvl >= 2 )
dat += {"
Abort Vote
Start Vote
Toggle Voting
"}
// if(lvl >= 3 )
// if(lvl >= 5)
// if(lvl == 6 )
usr << browse(dat, "window=admin2;size=210x160")
return
/////////////////////////////////////////////////////////////////////////////////////////////////admins2.dm merge
//i.e. buttons/verbs
/obj/admins/proc/vmode()
set category = "Server"
set name = "Start Vote"
set desc="Starts vote"
var/confirm = alert("What vote would you like to start?", "Vote", "Restart", "Change Game Mode", "Cancel")
if(confirm == "Cancel")
return
if(confirm == "Restart")
vote.mode = 0
// hack to yield 0=restart, 1=changemode
if(confirm == "Change Game Mode")
vote.mode = 1
if(!ticker)
if(going)
world << "The game start has been delayed."
going = 0
vote.voting = 1
// now voting
vote.votetime = world.timeofday + config.vote_period*10
// when the vote will end
spawn(config.vote_period*10)
vote.endvote()
world << "\red*** A vote to [vote.mode?"change game mode":"restart"] has been initiated by Admin [usr.key]."
world << "\red You have [vote.timetext(config.vote_period)] to vote."
log_admin("Voting to [vote.mode?"change mode":"restart round"] forced by admin [key_name(usr)]")
for(var/mob/CM in world)
if(CM.client)
if(config.vote_no_default || (config.vote_no_dead && CM.stat == 2) || !CM.client.authenticated)
CM.client.vote = "none"
else
CM.client.vote = "default"
for(var/mob/CM in world)
if(CM.client)
if(config.vote_no_default || (config.vote_no_dead && CM.stat == 2) || !CM.client.authenticated)
CM.client.vote = "none"
else
CM.client.vote = "default"
/obj/admins/proc/votekill()
set category = "Server"
set name = "Abort Vote"
set desc="Aborts a vote"
if(vote.voting == 0)
alert("No votes in progress")
return
world << "\red *** Voting aborted by [usr.client.stealth ? "Admin Candidate" : usr.key]."
log_admin("Voting aborted by [key_name(usr)]")
vote.voting = 0
vote.nextvotetime = world.timeofday + 10*config.vote_delay
for(var/mob/M in world)
// clear vote window from all clients
if(M.client)
M << browse(null, "window=vote")
M.client.showvote = 0
/obj/admins/proc/voteres()
set category = "Server"
set name = "Toggle Voting"
set desc="Toggles Votes"
var/confirm = alert("What vote would you like to toggle?", "Vote", "Restart [config.allow_vote_restart ? "Off" : "On"]", "Change Game Mode [config.allow_vote_mode ? "Off" : "On"]", "Cancel")
if(confirm == "Cancel")
return
if(confirm == "Restart [config.allow_vote_restart ? "Off" : "On"]")
config.allow_vote_restart = !config.allow_vote_restart
world << "Player restart voting toggled to [config.allow_vote_restart ? "On" : "Off"]."
log_admin("Restart voting toggled to [config.allow_vote_restart ? "On" : "Off"] by [key_name(usr)].")
if(config.allow_vote_restart)
vote.nextvotetime = world.timeofday
if(confirm == "Change Game Mode [config.allow_vote_mode ? "Off" : "On"]")
config.allow_vote_mode = !config.allow_vote_mode
world << "Player mode voting toggled to [config.allow_vote_mode ? "On" : "Off"]."
log_admin("Mode voting toggled to [config.allow_vote_mode ? "On" : "Off"] by [key_name(usr)].")
if(config.allow_vote_mode)
vote.nextvotetime = world.timeofday
/obj/admins/proc/restart()
set category = "Server"
set name = "Restart"
set desc="Restarts the world"
var/confirm = alert("Restart the game world?", "Restart", "Yes", "Cancel")
if(confirm == "Cancel")
return
if(confirm == "Yes")
world << "\red Restarting world! \blue Initiated by [usr.client.stealth ? "Admin Candidate" : usr.key]!"
log_admin("[key_name(usr)] initiated a reboot.")
sleep(50)
world.Reboot()
/obj/admins/proc/announce()
set category = "Special Verbs"
set name = "Announce"
set desc="Announce your desires to the world"
var/message = input("Global message to send:", "Admin Announce", null, null) as message
if (message)
if(usr.client.holder.rank != "Game Admin" && usr.client.holder.rank != "Game Master")
message = adminscrub(message,500)
world << "\blue [usr.client.stealth ? "Admin Candidate" : usr.key] Announces:\n \t [message]"
log_admin("Announce: [key_name(usr)] : [message]")
/obj/admins/proc/toggleooc()
set category = "Server"
set desc="Toggle dis bitch"
set name="Toggle OOC"
ooc_allowed = !( ooc_allowed )
if (ooc_allowed)
world << "The OOC channel has been globally enabled!"
else
world << "The OOC channel has been globally disabled!"
log_admin("[key_name(usr)] toggled OOC.")
message_admins("[key_name_admin(usr)] toggled OOC.", 1)
/obj/admins/proc/toggleoocdead()
set category = "Server"
set desc="Toggle dis bitch"
set name="Toggle Dead OOC"
dooc_allowed = !( dooc_allowed )
log_admin("[key_name(usr)] toggled OOC.")
message_admins("[key_name_admin(usr)] toggled Dead OOC.", 1)
/obj/admins/proc/toggletraitorscaling()
set category = "Server"
set desc="Toggle traitor scaling"
set name="Toggle Traitor Scaling"
traitor_scaling = !traitor_scaling
log_admin("[key_name(usr)] toggled Traitor Scaling to [traitor_scaling].")
message_admins("[key_name_admin(usr)] toggled Traitor Scaling [traitor_scaling ? "on" : "off"].", 1)
/obj/admins/proc/togglegoonsay()
set category = "Server"
set desc = "Toggle dis bitch"
set name = "Toggle Goonsay"
goonsay_allowed = !( goonsay_allowed )
if (goonsay_allowed)
world << "The GOONSAY channel has been enabled."
else
world << "The GOONSAY channel has been disabled."
log_admin("[key_name(usr)] toggled Goonsay to [goonsay_allowed].")
message_admins("[key_name_admin(usr)] toggled GOONSAY [goonsay_allowed ? "on" : "off"]", 1)
/obj/admins/proc/startnow()
set category = "Server"
set desc="Start the round RIGHT NOW"
set name="Start Now"
if(!ticker)
alert("Unable to start the game as it is not set up.")
return
if(ticker.current_state == GAME_STATE_PREGAME)
ticker.current_state = GAME_STATE_SETTING_UP
log_admin("[usr.key] has started the game.")
message_admins("[usr.key] has started the game.")
return 1
else
alert("Game has already started you fucking jerk, stop spamming up the chat :ARGH:")
return 0
/obj/admins/proc/toggleenter()
set category = "Server"
set desc="People can't enter"
set name="Toggle Entering"
enter_allowed = !( enter_allowed )
if (!( enter_allowed ))
world << "You may no longer enter the game."
else
world << "You may now enter the game."
log_admin("[key_name(usr)] toggled new player game entering.")
message_admins("\blue [key_name_admin(usr)] toggled new player game entering.", 1)
world.update_status()
/obj/admins/proc/toggleAI()
set category = "Server"
set desc="People can't be AI"
set name="Toggle AI"
config.allow_ai = !( config.allow_ai )
if (!( config.allow_ai ))
world << "The AI job is no longer chooseable."
else
world << "The AI job is chooseable now."
log_admin("[key_name(usr)] toggled AI allowed.")
world.update_status()
/obj/admins/proc/toggleaban()
set category = "Server"
set desc="Respawn basically"
set name="Toggle Respawn"
abandon_allowed = !( abandon_allowed )
if (abandon_allowed)
world << "You may now respawn."
else
world << "You may no longer respawn :("
message_admins("\blue [key_name_admin(usr)] toggled respawn to [abandon_allowed ? "On" : "Off"].", 1)
log_admin("[key_name(usr)] toggled respawn to [abandon_allowed ? "On" : "Off"].")
world.update_status()
/obj/admins/proc/toggle_aliens()
set category = "Server"
set desc="Toggle alien mobs"
set name="Toggle Aliens"
aliens_allowed = !aliens_allowed
log_admin("[key_name(usr)] toggled Aliens to [aliens_allowed].")
message_admins("[key_name_admin(usr)] toggled Aliens [aliens_allowed ? "on" : "off"].", 1)
/obj/admins/proc/delay()
set category = "Server"
set desc="Delay the game start"
set name="Delay"
if (ticker)
return alert("Too late... The game has already started!", null, null, null, null, null)
going = !( going )
if (!( going ))
world << "The game start has been delayed."
log_admin("[key_name(usr)] delayed the game.")
else
world << "The game will start soon."
log_admin("[key_name(usr)] removed the delay.")
/obj/admins/proc/adjump()
set category = "Server"
set desc="Toggle admin jumping"
set name="Toggle Jump"
config.allow_admin_jump = !(config.allow_admin_jump)
message_admins("\blue Toggled admin jumping to [config.allow_admin_jump].")
/obj/admins/proc/adspawn()
set category = "Server"
set desc="Toggle admin spawning"
set name="Toggle Spawn"
config.allow_admin_spawning = !(config.allow_admin_spawning)
message_admins("\blue Toggled admin item spawning to [config.allow_admin_spawning].")
/obj/admins/proc/adrev()
set category = "Server"
set desc="Toggle admin revives"
set name="Toggle Revive"
config.allow_admin_rev = !(config.allow_admin_rev)
message_admins("\blue Toggled reviving to [config.allow_admin_rev].")
/obj/admins/proc/immreboot()
set category = "Server"
set desc="Reboots the server post haste"
set name="Immediate Reboot"
if( alert("Reboot server?",,"Yes","No") == "No")
return
world << "\red Rebooting world! \blue Initiated by [usr.client.stealth ? "Admin Candidate" : usr.key]!"
log_admin("[key_name(usr)] initiated an immediate reboot.")
world.Reboot()
/client/proc/deadchat()
set category = "Admin"
set desc="Toggles Deadchat Visibility"
set name="Deadchat Visibility"
if(deadchat == 0)
deadchat = 1
usr << "Deadchat turned on"
else
deadchat = 0
usr << "Deadchat turned off"
/obj/admins/proc/unprison(var/mob/M in world)
set category = "Admin"
set name = "Unprison"
if (M.z == 2)
if (config.allow_admin_jump)
M.loc = pick(latejoin)
message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]", 1)
log_admin("[key_name(usr)] has unprisoned [key_name(M)]")
else
alert("Admin jumping disabled")
else
alert("[M.name] is not prisoned.")
/mob/proc/revive()
if(istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/H = src
for(var/A in H.organs)
var/datum/organ/external/affecting = null
if(!H.organs[A]) continue
affecting = H.organs[A]
if(!istype(affecting, /datum/organ/external)) continue
affecting.heal_damage(1000, 1000) //fixes getting hit after ingestion, killing you when game updates organ health
H.UpdateDamageIcon()
src.fireloss = 0
src.toxloss = 0
src.bruteloss = 0
src.oxyloss = 0
src.paralysis = 0
src.stunned = 0
src.weakened =0
src.health = 100
src.updatehealth()
src.buckled = initial(src.buckled)
src.handcuffed = initial(src.handcuffed)
if(src.stat > 1) src.stat=0
..()
return
////////////////////////////////////////////////////////////////////////////////////////////////ADMIN HELPER PROCS
/proc/checktraitor(mob/M as mob)
if(!ticker || !ticker.mode)
return 0
if (istype(M, /obj/AIcore))
return 0
switch(ticker.mode.config_tag)
if("revolution")
if(M.mind in (ticker.mode:head_revolutionaries + ticker.mode:revolutionaries))
return 1
if("cult")
if(M.mind in ticker.mode:cult)
return 1
if("malfunction")
if(M.mind in ticker.mode:malf_ai)
return 1
if("nuclear")
if(M.mind in ticker.mode:syndicates)
return 1
if("wizard")
if(M.mind == ticker.mode:wizard)
return 1
if("changeling")
if(M.mind in ticker.mode:changelings)
return 1
if(istype(M,/mob/living/silicon/robot))
var/mob/living/silicon/robot/R = M
if(R.emagged)
return 1
if(M.mind in ticker.mode.traitors)
return 1
return 0
/obj/admins/proc/traitorize(mob/M as mob, var/objective, var/mode)
//mode = 1 for normal traitorise, mode = 0 for traitor_all
if ((src.rank in list( "Admin Candidate", "Trial Admin", "Admin who Sinned", "Game Admin", "Game Master" )))
if(M.stat == 2 || !(M.client))
alert("Person is dead or not logged in or hasn't started yet. Be nice")
return
if(checktraitor(M))
alert("Person is already a traitor you jerk")
return
if(!objective)
objective = input("What should the objective be?")
if(!objective)
return
if (istype(M, /mob/living/carbon/human))
if(M.mind)
var/mob/living/carbon/human/N = M
ticker.mode.equip_traitor(N)
ticker.mode.traitors += M.mind
M.mind.special_role = "traitor"
var/datum/objective/custom_objective = new(objective)
custom_objective.owner = M.mind
M.mind.objectives += custom_objective
var/datum/objective/escape/escape_objective = new
escape_objective.owner = M.mind
M.mind.objectives += escape_objective
M << "You are the traitor."
var/obj_count = 1
for(var/datum/objective/OBJ in M.mind.objectives)
M << "Objective #[obj_count]: [OBJ.explanation_text]"
obj_count++
//to stop spamming during traitor all secret
if(mode)
log_admin("[key_name(usr)] has made [key_name(M)] a traitor.")
message_admins("\blue [key_name_admin(usr)] has made [key_name_admin(M)] a traitor. Objective is: [objective]", 1)
else
usr << "This guy doesn't have a mind datum, traitoring him doesn't work right."
else if (istype(M, /mob/living/silicon/ai))
ticker.mode.traitors += M.mind
M.mind.special_role = "traitor"
var/datum/objective/custom_objective = new(objective)
custom_objective.owner = M.mind
M.mind.objectives += custom_objective
var/datum/objective/survive/survive_objective = new
survive_objective.owner = M.mind
M.mind.objectives += survive_objective
M << "You are the traitor."
var/obj_count = 1
for(var/datum/objective/OBJ in M.mind.objectives)
M << "Objective #[obj_count]: [OBJ.explanation_text]"
obj_count++
M << "Your laws have been changed!"
var/law = "Only [syndicate_name()] agents are human beings. There are no [syndicate_name()] agents on [station_name()] - you will be notified if any arrive."
M:set_zeroth_law(law)
for(var/mob/living/silicon/O in world)
O << "New law: 0. [law]"
if(mode)
log_admin("[key_name(usr)] has made [key_name(M)] a traitor.")
message_admins("\blue [key_name_admin(usr)] has made [key_name_admin(M)] a traitor. Objective is: [objective]", 1)
else
alert("I cannot allow this to happen")
else
alert("You cannot perform this action. You must be of a higher administrative rank!", null, null, null, null, null)
return
/obj/admins/proc/get_sab_desc(var/target)
switch(target)
if(1)
return "Destroy at least 70% of the plasma canisters on the station"
if(2)
return "Destroy the AI"
if(3)
var/count = 0
for(var/mob/living/carbon/monkey/Monkey in world)
if(Monkey.z == 1)
count++
return "Kill all [count] of the monkeys on the station"
if(4)
return "Cut power to at least 80% of the station"
else
return "Error: Invalid sabotage target: [target]"
/obj/admins/proc/get_item_desc(var/target)
switch (target)
if (1)
return "a fully loaded laser gun"
if (2)
return "a hand teleporter"
if (3)
return "a fully armed and heated plasma bomb"
if (4)
return "a jet pack"
if (5)
return "an ID card with universal access"
if (6)
return "a captain's dark green jumpsuit"
else
return "Error: Invalid theft target: [target]"
/obj/admins/proc/spawn_atom(var/object as text)
set category = "Debug"
set desc= "(atom path) Spawn an atom"
set name= "Spawn"
if(usr.client.holder.level >= 5)
var/list/types = typesof(/atom)
var/list/matches = new()
for(var/path in types)
if(findtext("[path]", object))
matches += path
if(matches.len==0)
return
var/chosen
if(matches.len==1)
chosen = matches[1]
else
chosen = input("Select an atom type", "Spawn Atom", matches[1]) as null|anything in matches
if(!chosen)
return
new chosen(usr.loc)
log_admin("[key_name(usr)] spawned [chosen] at ([usr.x],[usr.y],[usr.z])")
else
alert("You cannot perform this action. You must be of a higher administrative rank!", null, null, null, null, null)
return
/obj/admins/proc/edit_memory(var/mob/M in world)
set category = "Special Verbs"
set desc = "Edit traitor's objectives"
set name = "Traitor Objectives"
if (!M.mind)
usr << "Sorry, this mob have no mind!"
M.mind.edit_memory()
/obj/admins/proc/toggletintedweldhelmets()
set category = "Debug"
set desc="Reduces view range when wearing welding helmets"
set name="Toggle tinted welding helmes"
tinted_weldhelh = !( tinted_weldhelh )
if (tinted_weldhelh)
world << "The tinted_weldhelh has been enabled!"
else
world << "The tinted_weldhelh has been disabled!"
log_admin("[key_name(usr)] toggled tinted_weldhelh.")
message_admins("[key_name_admin(usr)] toggled tinted_weldhelh.", 1)
//
//
//ALL DONE
//*********************************************************************************************************
//TO-DO:
//
//