diff --git a/code/modules/admin/new/admin.dm b/code/modules/admin/new/admin.dm new file mode 100644 index 00000000000..14b966db81d --- /dev/null +++ b/code/modules/admin/new/admin.dm @@ -0,0 +1,3048 @@ + +var/global/BSACooldown = 0 + + +//////////////////////////////// +/proc/message_admins(var/text, var/admin_ref = 0) + var/rendered = "ADMIN LOG: [text]" + log_adminwarn(rendered) + 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 + + +/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("Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior 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() + captain_announce("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() + captain_announce("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() + 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("Secondary Game Admin", "Game Admin", "Senior 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()]") + captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.") + 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)]") + + ban_unban_log_save("[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" + feedback_inc("ban_edit",1) + unbanpanel() + + /////////////////////////////////////new ban stuff + + if(href_list["jobban2"]) + var/mob/M = locate(href_list["jobban2"]) + if(!M) //sanity + alert("Mob no longer exists!") + return + if(!M.ckey) //sanity + alert("Mob has no ckey") + return + if(!job_master) + usr << "Job Master has not been setup!" + return + var/dat = "" + var/header = "Job-Ban Panel: [M.name]" + var/body + var/jobs = "" + + /***********************************WARNING!************************************ + The jobban stuff looks mangled and disgusting + But it looks beautiful in-game + -Nodrak + ************************************WARNING!***********************************/ + var/counter = 0 +//Regular jobs + //Command (Blue) + jobs += "" + jobs += "" + for(var/jobPos in command_positions) + if(!jobPos) continue + var/datum/job/job = job_master.GetJob(jobPos) + if(!job) continue + + if(jobban_isbanned(M, job.title)) + jobs += "" + counter++ + else + jobs += "" + counter++ + + if(counter >= 6) //So things dont get squiiiiished! + jobs += "" + counter = 0 + jobs += "
Command Positions
[dd_replacetext(job.title, " ", " ")][dd_replacetext(job.title, " ", " ")]
" + + //Security (Red) + counter = 0 + jobs += "" + jobs += "" + for(var/jobPos in security_positions) + if(!jobPos) continue + var/datum/job/job = job_master.GetJob(jobPos) + if(!job) continue + + if(jobban_isbanned(M, job.title)) + jobs += "" + counter++ + else + jobs += "" + counter++ + + if(counter >= 5) //So things dont get squiiiiished! + jobs += "" + counter = 0 + jobs += "
Security Positions
[dd_replacetext(job.title, " ", " ")][dd_replacetext(job.title, " ", " ")]
" + + //Engineering (Yellow) + counter = 0 + jobs += "" + jobs += "" + for(var/jobPos in engineering_positions) + if(!jobPos) continue + var/datum/job/job = job_master.GetJob(jobPos) + if(!job) continue + + if(jobban_isbanned(M, job.title)) + jobs += "" + counter++ + else + jobs += "" + counter++ + + if(counter >= 5) //So things dont get squiiiiished! + jobs += "" + counter = 0 + jobs += "
Engineering Positions
[dd_replacetext(job.title, " ", " ")][dd_replacetext(job.title, " ", " ")]
" + + //Medical (White) + counter = 0 + jobs += "" + jobs += "" + for(var/jobPos in medical_positions) + if(!jobPos) continue + var/datum/job/job = job_master.GetJob(jobPos) + if(!job) continue + + if(jobban_isbanned(M, job.title)) + jobs += "" + counter++ + else + jobs += "" + counter++ + + if(counter >= 5) //So things dont get squiiiiished! + jobs += "" + counter = 0 + jobs += "
Medical Positions
[dd_replacetext(job.title, " ", " ")][dd_replacetext(job.title, " ", " ")]
" + + //Science (Purple) + counter = 0 + jobs += "" + jobs += "" + for(var/jobPos in science_positions) + if(!jobPos) continue + var/datum/job/job = job_master.GetJob(jobPos) + if(!job) continue + + if(jobban_isbanned(M, job.title)) + jobs += "" + counter++ + else + jobs += "" + counter++ + + if(counter >= 5) //So things dont get squiiiiished! + jobs += "" + counter = 0 + jobs += "
Science Positions
[dd_replacetext(job.title, " ", " ")][dd_replacetext(job.title, " ", " ")]
" + + //Civilian (Grey) + counter = 0 + jobs += "" + jobs += "" + for(var/jobPos in civilian_positions) + if(!jobPos) continue + var/datum/job/job = job_master.GetJob(jobPos) + if(!job) continue + + if(jobban_isbanned(M, job.title)) + jobs += "" + counter++ + else + jobs += "" + counter++ + + if(counter >= 5) //So things dont get squiiiiished! + jobs += "" + counter = 0 + jobs += "
Civilian Positions
[dd_replacetext(job.title, " ", " ")][dd_replacetext(job.title, " ", " ")]
" + + //Non-Human (Green) + counter = 0 + jobs += "" + jobs += "" + for(var/jobPos in nonhuman_positions) + if(!jobPos) continue + var/datum/job/job = job_master.GetJob(jobPos) + if(!job) continue + + if(jobban_isbanned(M, job.title)) + jobs += "" + counter++ + else + jobs += "" + counter++ + + if(counter >= 5) //So things dont get squiiiiished! + jobs += "" + counter = 0 + + //pAI isn't technically a job, but it goes in here. + if(jobban_isbanned(M, "pAI")) + jobs += "" + else + jobs += "" + + jobs += "
Non-human Positions
[dd_replacetext(job.title, " ", " ")][dd_replacetext(job.title, " ", " ")]
pAIpAI
" + + //Antagonist (Orange) + var/isbanned_dept = jobban_isbanned(M, "Syndicate") + jobs += "" + jobs += "" + + //Traitor + if(jobban_isbanned(M, "traitor") || isbanned_dept) + jobs += "" + else + jobs += "" + + //Changeling + if(jobban_isbanned(M, "changeling") || isbanned_dept) + jobs += "" + else + jobs += "" + + //Nuke Operative + if(jobban_isbanned(M, "operative") || isbanned_dept) + jobs += "" + else + jobs += "" + + //Revolutionary + if(jobban_isbanned(M, "revolutionary") || isbanned_dept) + jobs += "" + else + jobs += "" + + jobs += "" //Breaking it up so it fits nicer on the screen every 5 entries + + //Cultist + if(jobban_isbanned(M, "cultist") || isbanned_dept) + jobs += "" + else + jobs += "" + + //Wizard + if(jobban_isbanned(M, "wizard") || isbanned_dept) + jobs += "" + else + jobs += "" + +/* //Malfunctioning AI //Removed Malf-bans because they're a pain to impliment + if(jobban_isbanned(M, "malf AI") || isbanned_dept) + jobs += "" + else + jobs += "" + + //Alien + if(jobban_isbanned(M, "alien candidate") || isbanned_dept) + jobs += "" + else + jobs += "" + + //Infested Monkey + if(jobban_isbanned(M, "infested monkey") || isbanned_dept) + jobs += "" + else + jobs += "" +*/ + jobs += "
Antagonist Positions
[dd_replacetext("Traitor", " ", " ")][dd_replacetext("Traitor", " ", " ")][dd_replacetext("Changeling", " ", " ")][dd_replacetext("Changeling", " ", " ")][dd_replacetext("Nuke Operative", " ", " ")][dd_replacetext("Nuke Operative", " ", " ")][dd_replacetext("Revolutionary", " ", " ")][dd_replacetext("Revolutionary", " ", " ")]
[dd_replacetext("Cultist", " ", " ")][dd_replacetext("Cultist", " ", " ")][dd_replacetext("Wizard", " ", " ")][dd_replacetext("Wizard", " ", " ")][dd_replacetext("Malf AI", " ", " ")][dd_replacetext("Malf AI", " ", " ")][dd_replacetext("Alien", " ", " ")][dd_replacetext("Alien", " ", " ")][dd_replacetext("Infested Monkey", " ", " ")][dd_replacetext("Infested Monkey", " ", " ")]
" + + body = "[jobs]" + dat = "[header][body]" + usr << browse(dat, "window=jobban2;size=800x450") + return + + //JOBBAN'S INNARDS + if(href_list["jobban3"]) + if (src.rank in list( "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master" )) + var/mob/M = locate(href_list["jobban4"]) + if(!M) + alert("Mob no longer exists!") + 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 + if(!job_master) + usr << "Job Master has not been setup!" + return + + //get jobs for department if specified, otherwise just returnt he one job in a list. + var/list/joblist = list() + switch(href_list["jobban3"]) + if("commanddept") + for(var/jobPos in command_positions) + if(!jobPos) continue + var/datum/job/temp = job_master.GetJob(jobPos) + if(!temp) continue + joblist += temp.title + if("securitydept") + for(var/jobPos in security_positions) + if(!jobPos) continue + var/datum/job/temp = job_master.GetJob(jobPos) + if(!temp) continue + joblist += temp.title + if("engineeringdept") + for(var/jobPos in engineering_positions) + if(!jobPos) continue + var/datum/job/temp = job_master.GetJob(jobPos) + if(!temp) continue + joblist += temp.title + if("medicaldept") + for(var/jobPos in medical_positions) + if(!jobPos) continue + var/datum/job/temp = job_master.GetJob(jobPos) + if(!temp) continue + joblist += temp.title + if("sciencedept") + for(var/jobPos in science_positions) + if(!jobPos) continue + var/datum/job/temp = job_master.GetJob(jobPos) + if(!temp) continue + joblist += temp.title + if("civiliandept") + for(var/jobPos in civilian_positions) + if(!jobPos) continue + var/datum/job/temp = job_master.GetJob(jobPos) + if(!temp) continue + joblist += temp.title + if("nonhumandept") + joblist += "pAI" + for(var/jobPos in nonhuman_positions) + if(!jobPos) continue + var/datum/job/temp = job_master.GetJob(jobPos) + if(!temp) continue + joblist += temp.title + else + joblist += href_list["jobban3"] + + //Create a list of unbanned jobs within joblist + var/list/notbannedlist = list() + for(var/job in joblist) + if(!jobban_isbanned(M, job)) + notbannedlist += job + + //Banning comes first + if(notbannedlist.len) //at least 1 unbanned job exists in joblist so we have stuff to ban. + var/reason = input(usr,"Reason?","Please State Reason","") as text|null + if(reason) + var/msg + for(var/job in notbannedlist) + ban_unban_log_save("[key_name(usr)] jobbanned [key_name(M)] from [job]. reason: [reason]") + log_admin("[key_name(usr)] banned [key_name(M)] from [job]") + feedback_inc("ban_job",1) + feedback_add_details("ban_job","- [job]") + jobban_fullban(M, job, reason) + if(!msg) msg = job + else msg += ", [job]" + message_admins("\blue [key_name_admin(usr)] banned [key_name_admin(M)] from [msg]", 1) + M << "\redYou have been jobbanned by [usr.client.ckey] from: [msg]." + M << "\red The reason is: [reason]" + M << "\red Jobban can be lifted only upon request." + href_list["jobban2"] = 1 // lets it fall through and refresh + return 1 + + //Unbanning joblist + //all jobs in joblist are banned already OR we didn't give a reason (implying they shouldn't be banned) + if(joblist.len) //at least 1 banned job exists in joblist so we have stuff to unban. + var/msg + for(var/job in joblist) + var/reason = jobban_isbanned(M, job) + 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]") + log_admin("[key_name(usr)] unbanned [key_name(M)] from [job]") + feedback_inc("ban_job_unban",1) + feedback_add_details("ban_job_unban","- [job]") + jobban_unban(M, job) + if(!msg) msg = job + else msg += ", [job]" + else + continue + if(msg) + message_admins("\blue [key_name_admin(usr)] unbanned [key_name_admin(M)] from [msg]", 1) + M << "\redYou have been un-jobbanned by [usr.client.ckey] from [msg]." + href_list["jobban2"] = 1 // lets it fall through and refresh + return 1 + return 0 //we didn't do anything! + + if (href_list["boot2"]) + if ((src.rank in list( "Moderator", "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior 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 + M << "\red You have been kicked from the server" + 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("Secondary Game Admin", "Game Admin", "Senior 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", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior 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|null + if(!mins) + return + if(mins >= 525600) mins = 525599 + var/reason = input(usr,"Reason?","reason","Griefer") as text|null + if(!reason) + return + AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins) + ban_unban_log_save("[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.") + 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." + feedback_inc("ban_tmp",1) + feedback_inc("ban_tmp_mins",mins) + 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|null + 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." + ban_unban_log_save("[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This is a permanent ban.") + 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.") + feedback_inc("ban_perma",1) + + del(M.client) + //del(M) + if("Cancel") + return + if (href_list["newjobban1"]) + var/mob/M = locate(href_list["newjobban1"]) + var/dat = "" + var/header = "Pick Job to ban this guy from.
" + var/body +// var/list/alljobs = get_all_jobs() + var/jobs = "" + jobs += "Heads
" + jobs += "Security
" + jobs += "Engineering
" + jobs += "Research
" + jobs += "Medical

" + + jobs += "CE+Station Engineer
" + jobs += "CE+Atmospheric Tech
" + jobs += "CE+Shaft Miner
" + jobs += "Chemist+RD+CMO
" + jobs += "Geneticist+RD+CMO
" + jobs += "MD+CMO
" + jobs += "Virologist+RD+CMO
" + jobs += "Scientist+RD
" + jobs += "AI+Cyborg
" + jobs += "Detective+HoS

" + for(var/datum/job/job in job_master.occupations) + if(jobban_isbanned(M, job.title)) + jobs += "[dd_replacetext(job.title, " ", " ")] " + else + jobs += "[dd_replacetext(job.title, " ", " ")] " //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=600x250") + return + if(href_list["newjobban2"]) + if ((src.rank in list("Moderator", "Administrator", "Badmin", "Tyrant" ))) + var/mob/M = locate(href_list["jobban4"]) + var/job = href_list["newjobban2"] + 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 days)?","Ban time",7) as num + mins = mins * 24 * 60 + if(!mins) + return + if(mins >= 525600) mins = 525599 + var/reason = input(usr,"Reason?","reason","Griefer") as text + if(!reason) + return + if(AddBanjob(M.ckey, M.computer_id, reason, usr.ckey, 1, mins, job)) + M << "\redYou have been jobbanned from [job] 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." + ban_unban_log_save("[usr.client.ckey] has jobbanned [M.ckey] from [job]. - Reason: [reason] - This will be removed in [mins] minutes.") + feedback_inc("ban_job",1) + feedback_add_details("ban_job","- [job]") + log_admin("[usr.client.ckey] has banned [M.ckey] from [job].\nReason: [reason]\nThis will be removed in [mins] minutes.") + message_admins("\blue[usr.client.ckey] has banned [M.ckey] from [job].\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 + if(AddBanjob(M.ckey, M.computer_id, reason, usr.ckey, 0, 0, job)) + M << "\redYou have been banned from [job] 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." + ban_unban_log_save("[usr.client.ckey] has banned [M.ckey] from [job]. - Reason: [reason] - This is a permanent ban.") + feedback_inc("ban_job_tmp",1) + feedback_add_details("ban_job_tmp","- [job]") + log_admin("[usr.client.ckey] has banned [M.ckey] from [job].\nReason: [reason]\nThis is a permanent ban.") + message_admins("\blue[usr.client.ckey] has banned [M.ckey] from [job].\nReason: [reason]\nThis is a permanent ban.") + + //del(M.client) + //del(M) + if("Cancel") + return + + if(href_list["unjobbanf"]) + var/banfolder = href_list["unjobbanf"] + Banlist.cd = "/base/[banfolder]" + var/key = Banlist["key"] + if(alert(usr, "Are you sure you want to unban [key]?", "Confirmation", "Yes", "No") == "Yes") + if (RemoveBanjob(banfolder)) + unjobbanpanel() + else + alert(usr,"This ban has already been lifted / does not exist.","Error","Ok") + unjobbanpanel() + + if(href_list["unjobbane"]) + return +/* + if (href_list["remove"]) + if ((src.rank in list( "Admin Candidate", "Trial Admin", "Badmin", "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( "Moderator", "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior 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 + if(!M.client) + src << "This mob doesn't have a client tied to it." + return + M.client.muted = !M.client.muted + log_admin("[key_name(usr)] has [(M.client.muted ? "muted" : "voiced")] [key_name(M)].") + message_admins("\blue [key_name_admin(usr)] has [(M.client.muted ? "muted" : "voiced")] [key_name_admin(M)].", 1) + M << "You have been [(M.client.muted ? "muted" : "voiced")]. Please resolve this in adminhelp." + if (href_list["mute_complete"]) + if ((src.rank in list( "Moderator", "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master" ))) + var/mob/M = locate(href_list["mute_complete"]) + 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 + if(!M.client) + src << "This mob doesn't have a client tied to it." + return + M.client.muted_complete = !M.client.muted_complete + log_admin("[key_name(usr)] has [(M.client.muted_complete ? "completely muted" : "voiced (complete)")] [key_name(M)].") + message_admins("\blue [key_name_admin(usr)] has [(M.client.muted_complete ? "completely muted" : "voiced (complete)")] [key_name_admin(M)].", 1) + M << "You have been [(M.client.muted_complete ? "completely muted" : "voiced (complete)")]. You are unable to speak or even adminhelp" + + if (href_list["c_mode"]) + if ((src.rank in list( "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master" ))) + if (ticker && ticker.mode) + return alert(usr, "The game has already started.", null, null, null, null) + var/dat = {"What mode do you wish to play?
"} + for (var/mode in config.modes) + dat += {"[config.mode_names[mode]]
"} + dat += {"Secret
"} + dat += {"Random
"} + dat += {"Now: [master_mode]"} + usr << browse(dat, "window=c_mode") + + if (href_list["f_secret"]) + if ((src.rank in list( "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master" ))) + if (ticker && ticker.mode) + return alert(usr, "The game has already started.", null, null, null, null) + if (master_mode != "secret") + return alert(usr, "The game mode has to be secret!", null, null, null, null) + var/dat = {"What game mode do you want to force secret to be? Use this if you want to change the game mode, but want the players to believe it's secret. This will only work if the current game mode is secret.
"} + for (var/mode in config.modes) + dat += {"[config.mode_names[mode]]
"} + dat += {"Random (default)
"} + dat += {"Now: [secret_force_mode]"} + usr << browse(dat, "window=f_secret") + + if (href_list["c_mode2"]) + if ((src.rank in list( "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master" ))) + if (ticker && ticker.mode) + return alert(usr, "The game has already started.", null, null, null, null) + master_mode = href_list["c_mode2"] + 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]" + Game() // updates the main game menu + world.save_mode(master_mode) + .(href, list("c_mode"=1)) + + if (href_list["f_secret2"]) + if ((src.rank in list( "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master" ))) + if (ticker && ticker.mode) + return alert(usr, "The game has already started.", null, null, null, null) + if (master_mode != "secret") + return alert(usr, "The game mode has to be secret!", null, null, null, null) + secret_force_mode = href_list["f_secret2"] + log_admin("[key_name(usr)] set the forced secret mode as [secret_force_mode].") + message_admins("\blue [key_name_admin(usr)] set the forced secret mode as [secret_force_mode].", 1) + Game() // updates the main game menu + .(href, list("f_secret"=1)) + + if (href_list["monkeyone"]) + if ((src.rank in list( "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior 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["corgione"]) + if ((src.rank in list( "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master" ))) + var/mob/M = locate(href_list["corgione"]) + 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 corgize [key_name(M)]") + message_admins("\blue [key_name_admin(usr)] attempting to corgize [key_name_admin(M)]", 1) + N.corgize() + if(istype(M, /mob/living/silicon)) + alert("The AI can't be corgized!", null, null, null, null, null) + return + + if (href_list["forcespeech"]) + if ((src.rank in list( "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior 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( "Moderator", "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior 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.Paralyse(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", "Badmin", "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( "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior 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.Paralyse(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( "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior 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.Paralyse(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( "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior 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.Paralyse(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( "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior 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.Paralyse(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( "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior 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( "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master" ))) + var/mob/living/M = locate(href_list["revive"]) + if (isliving(M)) + 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.level>=3) + 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/effect/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 + + if (href_list["makealien"]) + if (src.level>=3) + var/mob/M = locate(href_list["makealien"]) + if(istype(M, /mob/living/carbon/human)) + usr.client.cmd_admin_alienize(M) + else + alert("Wrong mob. Must be human.") + return + else + alert("You cannot perform this action. You must be of a higher administrative rank!") + return + + if (href_list["makemetroid"]) + if (src.level>=3) + var/mob/M = locate(href_list["makemetroid"]) + if(istype(M, /mob/living/carbon/human)) + usr.client.cmd_admin_metroidize(M) + else + alert("Wrong mob. Must be human.") + return + else + alert("You cannot perform this action. You must be of a higher administrative rank!") + return + + if (href_list["makerobot"]) + if (src.level>=3) + var/mob/M = locate(href_list["makerobot"]) + if(istype(M, /mob/living/carbon/human)) + usr.client.cmd_admin_robotize(M) + else + alert("Wrong mob. Must be human.") + return + else + alert("You cannot perform this action. You must be of a higher administrative rank!") + 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"]) + show_player_panel(M) + + if (href_list["adminplayervars"]) + var/mob/M = locate(href_list["adminplayervars"]) + if(src && src.owner) + if(istype(src.owner,/client)) + var/client/cl = src.owner + cl.debug_variables(M) + else if(ismob(src.owner)) + var/mob/MO = src.owner + if(MO.client) + var/client/cl = MO.client + cl.debug_variables(M) + + if (href_list["adminplayersubtlemessage"]) + var/mob/M = locate(href_list["adminplayersubtlemessage"]) + if(src && src.owner) + if(istype(src.owner,/client)) + var/client/cl = src.owner + cl.cmd_admin_subtle_message(M) + else if(ismob(src.owner)) + var/mob/MO = src.owner + if(MO.client) + var/client/cl = MO.client + cl.cmd_admin_subtle_message(M) + + if (href_list["adminplayerobservejump"]) + var/mob/M = locate(href_list["adminplayerobservejump"]) + if(src && src.owner) + if(istype(src.owner,/client)) + var/client/cl = src.owner + cl.admin_observe() + sleep(2) + cl.jumptomob(M) + else if(ismob(src.owner)) + var/mob/MO = src.owner + if(MO.client) + var/client/cl = MO.client + cl.admin_observe() + sleep(2) + cl.jumptomob(M) + + + + + + if (href_list["BlueSpaceArtillery"]) + var/mob/M = locate(href_list["BlueSpaceArtillery"]) + if(!M) + return + + var/choice = alert(src.owner, "Are you sure you wish to hit [key_name(M)] with Blue Space Artillery?", "Confirm Firing?" , "Yes" , "No") + if (choice == "No") + return + + if(BSACooldown) + src.owner << "Standby! Reload cycle in progress! Gunnary crews ready in five seconds!" + return + + BSACooldown = 1 + spawn(50) + BSACooldown = 0 + + + M << "You've been hit by bluespace artillery!" + log_admin("[key_name(M)] has been hit by Bluespace Artillery fired by [src.owner]") + message_admins("[key_name(M)] has been hit by Bluespace Artillery fired by [src.owner]") + var/obj/effect/stop/S + S = new /obj/effect/stop + S.victim = M + S.loc = M.loc + spawn(20) + del(S) + + var/turf/T = get_turf(M) + if(T && (istype(T,/turf/simulated/floor/))) + if(prob(80)) + T:break_tile_to_plating() + else + T:break_tile() + + if(M.health == 1) + M.gib() + else + M.adjustBruteLoss( min( 99 , (M.health - 1) ) ) + M.Stun(20) + M.Weaken(20) + M.stuttering = 20 + + if (href_list["CentcommReply"]) + var/mob/M = locate(href_list["CentcommReply"]) + if(!M) + return + if(!istype(M, /mob/living/carbon/human)) + alert("Centcomm cannot transmit to non-humans.") + return + if(!istype(M:ears, /obj/item/device/radio/headset)) + alert("The person you're trying to reply to doesn't have a headset! Centcomm cannot transmit directly to them.") + return + var/input = input(src.owner, "Please enter a message to reply to [key_name(M)] via their headset.","Outgoing message from Centcomm", "") + if(!input) + return + + src.owner << "You sent [input] to [M] via a secure channel." + log_admin("[src.owner] replied to [key_name(M)]'s Centcomm message with the message [input].") + M << "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows. [input]. Message ends.\"" + + return + + if (href_list["SyndicateReply"]) + var/mob/M = locate(href_list["SyndicateReply"]) + if(!M) + return + if(!istype(M, /mob/living/carbon/human)) + alert("The Syndicate cannot transmit to non-humans.") + return + if(!istype(M:ears, /obj/item/device/radio/headset)) + alert("The person you're trying to reply to doesn't have a headset! The Syndicate cannot transmit directly to them.") + return + var/input = input(src.owner, "Please enter a message to reply to [key_name(M)] via their headset.","Outgoing message from The Syndicate", "") + if(!input) + return + + src.owner << "You sent [input] to [M] via a secure channel." + log_admin("[src.owner] replied to [key_name(M)]'s Syndicate message with the message [input].") + M << "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from your benefactor. Message as follows, agent. [input]. Message ends.\"" + + return + + if (href_list["jumpto"]) + if(rank in list("Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master")) + var/mob/M = locate(href_list["jumpto"]) + usr.client.jumptomob(M) + else + alert("You cannot perform this action. You must be of a higher administrative rank!") + return + + if (href_list["getmob"]) + if(rank in list( "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master")) + var/mob/M = locate(href_list["getmob"]) + usr.client.Getmob(M) + else + alert("You cannot perform this action. You must be of a higher administrative rank!") + return + + if (href_list["sendmob"]) + if(rank in list( "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master")) + var/mob/M = locate(href_list["sendmob"]) + usr.client.sendmob(M) + else + alert("You cannot perform this action. You must be of a higher administrative rank!") + return + + if (href_list["narrateto"]) + if(rank in list("Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master")) + var/mob/M = locate(href_list["narrateto"]) + usr.client.cmd_admin_direct_narrate(M) + else + alert("You cannot perform this action. You must be of a higher administrative rank!") + return + + if (href_list["subtlemessage"]) + var/mob/M = locate(href_list["subtlemessage"]) + usr.client.cmd_admin_subtle_message(M) + + if (href_list["traitor"]) + if(!ticker || !ticker.mode) + alert("The game hasn't started yet!") + return + var/mob/M = locate(href_list["traitor"]) + if (!istype(M)) + player_panel_new() + return + if(isalien(M)) + alert("Is an [M.mind ? M.mind.special_role : "Alien"]!", "[M.key]") + return + if (M:mind) + M:mind.edit_memory() + return + alert("Cannot make this mob a traitor! It has no mind!") + + if (href_list["create_object"]) + if (src.rank in list("Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior 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("Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior 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("Secondary Game Admin", "Game Admin", "Senior 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("Secondary Game Admin", "Game Admin", "Senior 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) + //Game Master + dat += {" + Senior Game Admin + Game Admin + Secondary Game Admin + Trial admin + Temporary Admin + Moderator + Admin Observer + Remove Admin
"} + else if(src.level == 5) + //Senior Admin + dat += {" + Game Admin + Secondary Game Admin + Trial admin + Temporary Admin + Moderator + Admin Observer + Remove Admin
"} + else if(src.level == 4) + //Game Admin + dat += {" + Secondary Game Admin + Trial admin + Temporary Admin + Moderator + Admin Observer + Remove Admin
"} + else if(src.level == 3) + //Secondary Game Admin + dat += {" + Trial admin + Temporary Admin + Moderator + Admin Observer + 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("Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master")) + if (config.allow_admin_spawning && ((src.state == 2) || (src.rank in list("Secondary Game Admin", "Game Admin", "Senior 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("Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master"))) + removed_paths += dirty_path + else if (ispath(path, /obj/item/weapon/melee/energy/blade))//Not an item one should be able to spawn./N + removed_paths += dirty_path + else if (ispath(path, /obj/effect/bhole) && !(src.rank in list("Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master"))) + removed_paths += dirty_path + else if (ispath(path, /mob) && !(src.rank in list("Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master"))) + removed_paths += dirty_path + + else + paths += path + + if (!paths) + return + else if (length(paths) > 5) + alert("Select less object types, (max 5)") + 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 + var/tmp_dir = href_list["object_dir"] + var/obj_dir = tmp_dir ? text2num(tmp_dir) : 2 + if(!obj_dir || !(obj_dir in list(1,2,4,8,5,6,9,10))) + obj_dir = 2 + var/obj_name = sanitize(href_list["object_name"]) + var/where = href_list["object_where"] + if (!( where in list("onfloor","inhand","inmarked") )) + where = "onfloor" + + //TODO ERRORAGE + if( where == "inhand" ) + usr << "Support for inhand not available yet. Will spawn on floor." + where = "onfloor" + //END TODO ERRORAGE + + if ( where == "inhand" ) //Can only give when human or monkey + if ( !( ishuman(usr) || ismonkey(usr) ) ) + usr << "Can only spawn in hand when you're a human or a monkey." + where = "onfloor" + else if ( usr.get_active_hand() ) + usr << "Your active hand is full. Spawning on floor." + where = "onfloor" + if ( where == "inmarked" ) + if ( !marked_datum ) + usr << "You don't have any object marked. Abandoning spawn." + return + else + if ( !istype(marked_datum,/atom) ) + usr << "The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn." + return + + var/atom/target //Where the object will be spawned + switch ( where ) + if ( "onfloor" ) + switch (href_list["offset_type"]) + if ("absolute") + target = locate(0 + X,0 + Y,0 + Z) + if ("relative") + target = locate(loc.x + X,loc.y + Y,loc.z + Z) + if ( "inmarked" ) + target = marked_datum + + + //TODO ERRORAGE - Give support for "inhand" + + if(target) + for (var/path in paths) + for (var/i = 0; i < number; i++) + var/atom/O = new path(target) + if(O) + O.dir = obj_dir + if(obj_name) + O.name = obj_name + if(istype(O,/mob)) + var/mob/M = O + M.real_name = obj_name + + + + 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( "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master" ))) + var/ok = 0 + switch(href_list["secretsfun"]) + if("sec_clothes") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","SC") + for(var/obj/item/clothing/under/O in world) + del(O) + ok = 1 + if("sec_all_clothes") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","SAC") + for(var/obj/item/clothing/O in world) + del(O) + ok = 1 + if("sec_classic1") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","SC1") + for(var/obj/item/clothing/suit/fire/O in world) + del(O) + for(var/obj/structure/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") + /* + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","T") + for(var/obj/machinery/atmoalter/siphs/fullairsiphon/O in world) + O.t_status = 3 + for(var/obj/machinery/atmoalter/siphs/scrubbers/O in world) + O.t_status = 1 + O.t_per = 1000000.0 + for(var/obj/machinery/atmoalter/canister/O in world) + if (!( istype(O, /obj/machinery/atmoalter/canister/oxygencanister) )) + O.t_status = 1 + O.t_per = 1000000.0 + else + O.t_status = 3 + */ + usr << "HEH" + if("monkey") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","M") + for(var/mob/living/carbon/human/H in world) + spawn(0) + H.monkeyize() + ok = 1 + if("corgi") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","M") + for(var/mob/living/carbon/human/H in world) + spawn(0) + H.corgize() + ok = 1 + if("power") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","P") + log_admin("[key_name(usr)] made all areas powered", 1) + message_admins("\blue [key_name_admin(usr)] made all areas powered", 1) + power_restore() + if("unpower") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","UP") + log_admin("[key_name(usr)] made all areas unpowered", 1) + message_admins("\blue [key_name_admin(usr)] made all areas unpowered", 1) + power_failure() + if("activateprison") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","AP") + 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") + /* + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","DP") + 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") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","TPS") + 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 + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","PW") + 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.Paralyse(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( "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master" ))) + if(!ticker) + alert("The game hasn't started yet!") + return + var/objective = input("Enter an objective") + if(!objective) + return + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","TA([objective])") + for(var/mob/living/carbon/human/H in world) + if(H.stat == 2 || !H.client || !H.mind) continue + if(is_special_character(H)) continue + //traitorize(H, objective, 0) + ticker.mode.traitors += H.mind + H.mind.special_role = "traitor" + var/datum/objective/new_objective = new + new_objective.owner = H + new_objective.explanation_text = objective + H.mind.objectives += new_objective + ticker.mode.greet_traitor(H) + //ticker.mode.forge_traitor_objectives(H.mind) + ticker.mode.finalize_traitor(H) + for(var/mob/living/silicon/A in world) + ticker.mode.traitors += A.mind + A.mind.special_role = "traitor" + var/datum/objective/new_objective = new + new_objective.owner = A + new_objective.explanation_text = objective + A.mind.objectives += new_objective + ticker.mode.greet_traitor(A) + ticker.mode.finalize_traitor(A) + 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( "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master" ))) + if(mining_shuttle_moving) + return + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","ShM") + 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( "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master" ))) + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","ShA") + 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( "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master" ))) + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","ShF") + 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("movealienship") + if ((src.rank in list( "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master" ))) + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","ShX") + move_alien_ship() + message_admins("\blue [key_name_admin(usr)] moved the alien dinghy", 1) + log_admin("[key_name(usr)] moved the alien dinghy") + else + alert("You're not of a high enough rank to do this") + if("togglebombcap") + if (src.rank in list( "Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master" )) + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","BC") + switch(MAX_EXPLOSION_RANGE) + if(14) + MAX_EXPLOSION_RANGE = 16 + if(16) + MAX_EXPLOSION_RANGE = 20 + if(20) + MAX_EXPLOSION_RANGE = 28 + if(28) + MAX_EXPLOSION_RANGE = 56 + if(56) + MAX_EXPLOSION_RANGE = 128 + if(128) + MAX_EXPLOSION_RANGE = 14 + var/range_dev = MAX_EXPLOSION_RANGE *0.25 + var/range_high = MAX_EXPLOSION_RANGE *0.5 + var/range_low = MAX_EXPLOSION_RANGE + message_admins("\red [key_name_admin(usr)] changed the bomb cap to [range_dev], [range_high], [range_low]", 1) + log_admin("[key_name_admin(usr)] changed the bomb cap to [MAX_EXPLOSION_RANGE]") + else + alert("No way. You're not of a high enough rank to do this.") + + if("flicklights") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","FL") + 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/structure/window/W in world) + spawn(0) + sleep(rand(10,400)) + W.ex_act(rand(2,1)) + for(var/obj/structure/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/structure/cable/Cable in world) + spawn(0) + sleep(rand(30,400)) + Cable.ex_act(rand(2,1)) + for(var/obj/structure/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") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","MW") + if ((src.rank in list("Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior 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") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","GA") + 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/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 ) + spawn(rand(50, 300)) + del(bh) + if("timeanomalies") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","STA") + 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/effect/portal/P = new /obj/effect/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") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","BL") + mini_blob_event() + message_admins("[key_name_admin(usr)] has spawned blob", 1) + if("aliens") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","AL") + if(aliens_allowed) + alien_infestation() + message_admins("[key_name_admin(usr)] has spawned aliens", 1) + if("spaceninja") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","SN") + if(toggle_space_ninja) + if(space_ninja_arrival())//If the ninja is actually spawned. They may not be depending on a few factors. + message_admins("[key_name_admin(usr)] has sent in a space ninja", 1) + if("carp") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","C") + 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") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","R") + message_admins("[key_name_admin(usr)] has has irradiated the station", 1) + high_radiation_event() + if("immovable") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","IR") + message_admins("[key_name_admin(usr)] has sent an immovable rod to the station", 1) + immovablerod() + if("prison_break") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","PB") + message_admins("[key_name_admin(usr)] has allowed a prison break", 1) + prison_break() + if("lightsout") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","LO") + message_admins("[key_name_admin(usr)] has broke a lot of lights", 1) + lightsout(1,2) + if("blackout") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","BO") + message_admins("[key_name_admin(usr)] broke all lights", 1) + lightsout(0,0) + if("virus") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","V") + var/answer = alert("Do you want this to be a random disease or do you have something in mind?",,"Virus2","Random","Choose") + if(answer=="Random") + viral_outbreak() + message_admins("[key_name_admin(usr)] has triggered a virus outbreak", 1) + else if(answer == "Choose") + 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) + else + usr << "Nope" + /* + var/lesser = (alert("Do you want to infect the mob with a major or minor disease?",,"Major","Minor") == "Minor") + var/mob/living/carbon/victim = input("Select a mob to infect", "Virus2") as null|mob in world + if(!istype(victim)) return + if(lesser) + infect_mob_random_lesser(victim) + else + infect_mob_random_greater(victim) + message_admins("[key_name_admin(usr)] has infected [victim] with a [lesser ? "minor" : "major"] virus2.", 1) + */ + if("retardify") + if (src.rank in list("Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master")) + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","RET") + for(var/mob/living/carbon/human/H in world) + if(H.client) + H << "\red You suddenly feel stupid." + H.setBrainLoss(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("Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master")) + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","FG") + 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("Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master")) + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","SG") + 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("Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master")) + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","DF") + 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("ionstorm") + if (src.rank in list("Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master")) + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","I") + IonStorm() + message_admins("[key_name_admin(usr)] triggered an ion storm") + var/show_log = alert(usr, "Show ion message?", "Message", "Yes", "No") + if(show_log == "Yes") + command_alert("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert") + world << sound('ionstorm.ogg') + else + alert("You cannot perform this action. You must be of a higher administrative rank!") + return + if("spacevines") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","K") + spacevine_infestation() + message_admins("[key_name_admin(usr)] has spawned spacevines", 1) + 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( "Moderator", "Temporary Admin", "Trial Admin", "Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master" ))) + var/ok = 0 + switch(href_list["secretsadmin"]) + if("clear_bombs") + //I do nothing + 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("list_job_debug") + var/dat = "Job Debug info.
" + if(job_master) + for(var/line in job_master.job_debug) + dat += "[line]
" + dat+= "*******

" + for(var/datum/job/job in job_master.occupations) + if(!job) continue + dat += "job: [job.title], current_positions: [job.current_positions], total_positions: [job.total_positions]
" + usr << browse(dat, "window=jobdebug;size=600x500") + if("check_antagonist") + if (ticker && ticker.current_state >= GAME_STATE_PLAYING) + var/dat = "Round Status

Round 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)]
" + + if(ticker.mode.syndicates.len) + dat += "
" + for(var/datum/mind/N in ticker.mode.syndicates) + var/mob/M = N.current + if(M) + dat += "" + dat += "" + else + dat += "" + dat += "
Syndicates
[M.real_name][M.client ? "" : " (logged out)"][M.stat == 2 ? " (DEAD)" : ""]PM
Nuclear Operative not found!

" + for(var/obj/item/weapon/disk/nuclear/N in world) + dat += "" + dat += "
Nuclear Disk(s)
[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])
" + + if(ticker.mode.head_revolutionaries.len || ticker.mode.revolutionaries.len) + dat += "
" + for(var/datum/mind/N in ticker.mode.head_revolutionaries) + var/mob/M = N.current + if(!M) + dat += "" + else + dat += "" + dat += "" + for(var/datum/mind/N in ticker.mode.revolutionaries) + var/mob/M = N.current + if(M) + dat += "" + dat += "" + dat += "
Revolutionaries
Head Revolutionary not found!
[M.real_name] (Leader)[M.client ? "" : " (logged out)"][M.stat == 2 ? " (DEAD)" : ""]PM
[M.real_name][M.client ? "" : " (logged out)"][M.stat == 2 ? " (DEAD)" : ""]PM
" + for(var/datum/mind/N in ticker.mode.get_living_heads()) + var/mob/M = N.current + if(M) + dat += "" + dat += "" + var/turf/mob_loc = get_turf_loc(M) + dat += "" + else + dat += "" + dat += "
Target(s)Location
[M.real_name][M.client ? "" : " (logged out)"][M.stat == 2 ? " (DEAD)" : ""]PM[mob_loc.loc]
Head not found!
" + + if(ticker.mode.changelings.len > 0) + dat += "
" + for(var/datum/mind/changeling in ticker.mode.changelings) + var/mob/M = changeling.current + if(M) + dat += "" + dat += "" + dat += "" + else + dat += "" + dat += "
Changelings
[M.real_name][M.client ? "" : " (logged out)"][M.stat == 2 ? " (DEAD)" : ""]PMShow Objective
Changeling not found!
" + + if(ticker.mode.wizards.len > 0) + dat += "
" + for(var/datum/mind/wizard in ticker.mode.wizards) + var/mob/M = wizard.current + if(M) + dat += "" + dat += "" + dat += "" + else + dat += "" + dat += "
Wizards
[M.real_name][M.client ? "" : " (logged out)"][M.stat == 2 ? " (DEAD)" : ""]PMShow Objective
Wizard not found!
" + + if(ticker.mode.cult.len) + dat += "
" + for(var/datum/mind/N in ticker.mode.cult) + var/mob/M = N.current + if(M) + dat += "" + dat += "" + dat += "
Cultists
[M.real_name][M.client ? "" : " (logged out)"][M.stat == 2 ? " (DEAD)" : ""]PM
" + + if(ticker.mode.traitors.len > 0) + dat += "
" + for(var/datum/mind/traitor in ticker.mode.traitors) + var/mob/M = traitor.current + if(M) + dat += "" + dat += "" + dat += "" + else + dat += "" + dat += "
Traitors
[M.real_name][M.client ? "" : " (logged out)"][M.stat == 2 ? " (DEAD)" : ""]PMShow Objective
Traitor not found!
" + + 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 == null) + usr << "[key_name(ai, usr)]'s Laws are null??" + else + ai.laws.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 += "" + for(var/mob/living/carbon/human/H in world) + if(H.ckey) + dat += text("", H.name, H.get_assignment()) + dat += "
NamePosition
[][]
" + usr << browse(dat, "window=manifest;size=440x410") + if("DNA") + var/dat = "Showing DNA from blood.
" + dat += "" + for(var/mob/living/carbon/human/H in world) + if(H.dna && H.ckey) + dat += "" + dat += "
NameDNABlood Type
[H][H.dna.unique_enzymes][H.b_type]
" + usr << browse(dat, "window=DNA;size=440x410") + if("fingerprints") + var/dat = "Showing Fingerprints.
" + dat += "" + for(var/mob/living/carbon/human/H in world) + if(H.ckey) + if(H.dna && H.dna.uni_identity) + dat += "" + else if(H.dna && !H.dna.uni_identity) + dat += "" + else if(!H.dna) + dat += "" + dat += "
NameFingerprints
[H][md5(H.dna.uni_identity)]
[H]H.dna.uni_identity = null
[H]H.dna = null
" + 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( "Secondary Game Admin", "Game Admin", "Senior 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") + if("maint_access_brig") + for(var/obj/machinery/door/airlock/maintenance/M in world) + if (access_maint_tunnels in M.req_access) + M.req_access = list(access_brig) + message_admins("[key_name_admin(usr)] made all maint doors brig access-only.") + if("maint_access_engiebrig") + for(var/obj/machinery/door/airlock/maintenance/M in world) + if (access_maint_tunnels in M.req_access) + M.req_access = list() + M.req_one_access = list(access_brig,access_engine) + message_admins("[key_name_admin(usr)] made all maint doors engineering and brig access-only.") + if("infinite_sec") + var/datum/job/J = job_master.GetJob("Security Officer") + if(!J) return + J.total_positions = -1 + J.spawn_positions = -1 + message_admins("[key_name_admin(usr)] has removed the cap on security officers.") + return + //hahaha + +///////////////////////////////////////////////////////////////////////////////////////////////Panels + +/obj/admins/proc/show_player_panel(var/mob/M in world) + set category = "Admin" + set name = "Show Player Panel" + set desc="Edit player (respawn, ban, heal, etc)" + if(!M) + usr << "You seem to be selecting a mob that doesn't exist anymore." + return + if (!istype(src,/obj/admins)) + src = usr.client.holder + if (!istype(src,/obj/admins)) + usr << "Error: you are not an admin!" + 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(!ismonkey(M)) + foo += text("Monkeyize | ") + else + foo += text("Monkeyized | ") + if(!iscorgi(M)) + foo += text("Corgize | ") + else + foo += text("Corgized | ") + if(isAI(M)) + foo += text("Is an AI | ") + else if(ishuman(M)) + foo += text("Make AI | ") + foo += text("Make Robot | ") + foo += text("Make Alien | ") + foo += text("Make Metroid | ") + 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("Forcesay | ") + if(M.client) + foo += text("Mute: [(M.client.muted ? "Muted" : "Voiced")] | ") + foo += text("Complete mute: [(M.client.muted ? "Completely Muted" : "Voiced")] | ") + else + foo += "Mute unavailable - no client" + foo += text("Boot") + foo += text("
    ") + foo += text("Jump to | ") + foo += text("Get | ") + foo += text("Send") + foo += text("
    ") + foo += text("Edit mind | ") + foo += text("Narrate to | ") + foo += text("Subtle message") + foo += text("
    ") + foo += text("Ban | ") + foo += text("Jobban") + dat += text("[foo]") + usr << browse(dat, "window=adminplayeropts;size=480x150") + + + +/obj/admins/proc/Jobbans() + + if ((src.rank in list( "Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master" ))) + var/dat = "Job Bans!
    " + for(var/t in jobban_keylist) + var/r = t + if( findtext(r,"##") ) + r = copytext( r, 1, findtext(r,"##") )//removes the description + dat += text("") + dat += "
    [t] (unban)
    " + usr << browse(dat, "window=ban;size=400x400") + +/obj/admins/proc/Game() + + var/dat + var/lvl = 0 + switch(src.rank) + if("Moderator") + lvl = 1 + if("Temporary Admin") + lvl = 2 + if("Trial Admin") + lvl = 3 + if("Secondary Game Admin") + lvl = 4 + if("Game Admin") + lvl = 5 + if("Senior Game Admin") + lvl = 6 + if("Game Master") + lvl = 7 + + dat += "
    Game Panel

    \n" + + if(lvl > 0) + +// if(lvl >= 2 ) + dat += "Change Game Mode
    " + + if(lvl > 0 && master_mode == "secret") + dat += "(Force Secret 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
    " + for(var/t in goon_keylist) + dat += text("") + dat += "
    KeySA Username
    [t][goon_keylist[ckey(t)]]
    " + usr << browse(dat, "window=ban;size=300x400") + +/obj/admins/proc/beta_testers() + var/dat = "
    Beta testers
    " + for(var/t in beta_tester_keylist) + dat += text("") + dat += "
    Key
    [t]
    " + usr << browse(dat, "window=ban;size=300x400") +*/ +/obj/admins/proc/Secrets() + if (!usr.client.holder) + return + + var/lvl = 0 + switch(src.rank) + if("Moderator") + lvl = 1 + if("Temporary Admin") + lvl = 2 + if("Trial Admin") + lvl = 3 + if("Secondary Game Admin") + lvl = 4 + if("Game Admin") + lvl = 5 + if("Senior 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 blob(Untested)
    +Trigger an Alien infestation
    +Send in a space ninja
    +Trigger an Carp migration
    +Irradiate the station
    +Trigger a Prison Break
    +Trigger a Virus Outbreak
    +Spawn an Immovable Rod
    +Toggle a "lights out" event
    +Spawn an Ion Storm
    +Spawn Space-Vines
    +
    +Fun Secrets
    +
    +Remove 'internal' clothing
    +Remove ALL clothing
    +Toxic Air (WARNING: dangerous)
    +Turn all humans into monkeys
    +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
    +Make all players retarded
    +Make all items look like guns
    +Japanese Animes Mode
    +Move Administration Shuttle
    +Move Ferry
    +Move Alien Dinghy
    +Move Mining Shuttle
    +Break all lights
    "} +//Station Shockwave
    + + if(lvl >= 6) + dat += {" +Toggle bomb cap
    + "} + + dat += "
    " + + if(lvl >= 5) + dat += {" +Security Level Elevated
    +
    +Change all maintenance doors to engie/brig access only
    +Change all maintenance doors to brig access only
    +Remove cap on security officers
    +
    +Coder Secrets
    +
    +Show Job Debug
    +Admin Log
    +
    +"} + usr << browse(dat, "window=secrets") + return + +/obj/admins/proc/Voting() + + var/dat + var/lvl = 0 + switch(src.rank) + if("Moderator") + lvl = 1 + if("Temporary Admin") + lvl = 2 + if("Trial Admin") + lvl = 3 + if("Secondary Game Admin") + lvl = 4 + if("Game Admin") + lvl = 5 + if("Senior 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" + if (!usr.client.holder) + return + 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" + if (!usr.client.holder) + return + 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" : usr.key]!" + log_admin("[key_name(usr)] initiated a reboot.") + + feedback_set_details("end_error","admin reboot - by [usr.key] [usr.client.stealth ? "(stealth)" : ""]") + + if(blackbox) + blackbox.save_all_data_to_sql() + + 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 ? "Administrator" : 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/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 << "New players may no longer enter the game." + else + world << "New players 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/toggle_space_ninja() + set category = "Server" + set desc="Toggle space ninjas spawning." + set name="Toggle Space Ninjas" + toggle_space_ninja = !toggle_space_ninja + log_admin("[key_name(usr)] toggled Space Ninjas to [toggle_space_ninja].") + message_admins("[key_name_admin(usr)] toggled Space Ninjas [toggle_space_ninja ? "on" : "off"].", 1) + +/obj/admins/proc/delay() + set category = "Server" + set desc="Delay the game start" + set name="Delay" + if (!ticker || ticker.current_state != GAME_STATE_PREGAME) + 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" : usr.key]!" + log_admin("[key_name(usr)] initiated an immediate reboot.") + + feedback_set_details("end_error","immediate admin reboot - by [usr.key] [usr.client.stealth ? "(stealth)" : ""]") + + if(blackbox) + blackbox.save_all_data_to_sql() + + 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" + +/client/proc/toggleprayers() + set category = "Admin" + set desc="Toggles Prayer Visibility" + set name="Prayer Visibility" + if(seeprayers == 0) + seeprayers = 1 + usr << "Prayer visibility turned on" + else + seeprayers = 0 + usr << "Prayer visibility 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.") + +////////////////////////////////////////////////////////////////////////////////////////////////ADMIN HELPER PROCS + +/proc/is_special_character(mob/M as mob) // returns 1 for specail characters and 2 for heroes of gamemode + if(!ticker || !ticker.mode) + return 0 + if (!istype(M)) + return 0 + if((M.mind in ticker.mode.head_revolutionaries) || (M.mind in ticker.mode.revolutionaries)) + if (ticker.mode.config_tag == "revolution") + return 2 + return 1 + if(M.mind in ticker.mode.cult) + if (ticker.mode.config_tag == "cult") + return 2 + return 1 + if(M.mind in ticker.mode.malf_ai) + if (ticker.mode.config_tag == "malfunction") + return 2 + return 1 + if(M.mind in ticker.mode.syndicates) + if (ticker.mode.config_tag == "nuclear") + return 2 + return 1 + if(M.mind in ticker.mode.wizards) + if (ticker.mode.config_tag == "wizard") + return 2 + return 1 + if(M.mind in ticker.mode.changelings) + if (ticker.mode.config_tag == "changeling") + return 2 + return 1 + + for(var/datum/disease/D in M.viruses) + if(istype(D, /datum/disease/jungle_fever)) + if (ticker.mode.config_tag == "monkey") + return 2 + return 1 + if(isrobot(M)) + var/mob/living/silicon/robot/R = M + if(R.emagged) + return 1 + if(M.mind&&M.mind.special_role)//If they have a mind and special role, they are some type of traitor or antagonist. + return 1 + + return 0 + +/* +/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/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/show_traitor_panel(var/mob/M in world) + set category = "Admin" + set desc = "Edit mobs's memory and role" + set name = "Show Traitor Panel" + + if (!M.mind) + usr << "Sorry, this mob has no mind!" + return + 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) + +/obj/admins/proc/toggleguests() + set category = "Server" + set desc="Guests can't enter" + set name="Toggle guests" + guests_allowed = !( guests_allowed ) + if (!( guests_allowed )) + world << "Guests may no longer enter the game." + else + world << "Guests may now enter the game." + log_admin("[key_name(usr)] toggled guests game entering [guests_allowed?"":"dis"]allowed.") + message_admins("\blue [key_name_admin(usr)] toggled guests game entering [guests_allowed?"":"dis"]allowed.", 1) + + + +/obj/admins/proc/view_txt_log() + set category = "Admin" + set desc="Shows todays server log in new window" + set name="Show Server Log" + var/path = "data/logs/[time2text(world.realtime,"YYYY")]/[time2text(world.realtime,"MM")]-[time2text(world.realtime,"Month")]/[time2text(world.realtime,"DD")]-[time2text(world.realtime,"Day")].log" + var/output = {" + + [time2text(world.realtime,"Day, MMM DD, YYYY")] - Log + + +
    +						[file2text(path)]
    +						
    + + "} + usr << browse(output,"window=server_logfile") + onclose(usr,"server_logfile") + return + +/obj/admins/proc/view_atk_log() + set category = "Admin" + set desc="Shows todays server attack log in new window" + set name="Show Server Attack Log" + var/path = "data/logs/[time2text(world.realtime,"YYYY")]/[time2text(world.realtime,"MM")]-[time2text(world.realtime,"Month")]/[time2text(world.realtime,"DD")]-[time2text(world.realtime,"Day")] Attack.log" + var/output = {" + + [time2text(world.realtime,"Day, MMM DD, YYYY")] - Attack Log + + +
    +						[file2text(path)]
    +						
    + + "} + usr << browse(output,"window=server_logfile") + onclose(usr,"server_logfile") + return + +/client/proc/unjobban_panel() + set name = "Unjobban Panel" + set category = "Admin" + if (src.holder) + src.holder.unjobbanpanel() + return + + +// +// +//ALL DONE +//********************************************************************************************************* +//TO-DO: +// +// + + +/**********************Administration Shuttle**************************/ + +var/admin_shuttle_location = 0 // 0 = centcom 13, 1 = station + +proc/move_admin_shuttle() + var/area/fromArea + var/area/toArea + if (admin_shuttle_location == 1) + fromArea = locate(/area/shuttle/administration/station) + toArea = locate(/area/shuttle/administration/centcom) + else + fromArea = locate(/area/shuttle/administration/centcom) + toArea = locate(/area/shuttle/administration/station) + fromArea.move_contents_to(toArea) + if (admin_shuttle_location) + admin_shuttle_location = 0 + else + admin_shuttle_location = 1 + return + +/**********************Centcom Ferry**************************/ + +var/ferry_location = 0 // 0 = centcom , 1 = station + +proc/move_ferry() + var/area/fromArea + var/area/toArea + if (ferry_location == 1) + fromArea = locate(/area/shuttle/transport1/station) + toArea = locate(/area/shuttle/transport1/centcom) + else + fromArea = locate(/area/shuttle/transport1/centcom) + toArea = locate(/area/shuttle/transport1/station) + fromArea.move_contents_to(toArea) + if (ferry_location) + ferry_location = 0 + else + ferry_location = 1 + return + +/**********************Alien ship**************************/ + +var/alien_ship_location = 1 // 0 = base , 1 = mine + +proc/move_alien_ship() + var/area/fromArea + var/area/toArea + if (alien_ship_location == 1) + fromArea = locate(/area/shuttle/alien/mine) + toArea = locate(/area/shuttle/alien/base) + else + fromArea = locate(/area/shuttle/alien/base) + toArea = locate(/area/shuttle/alien/mine) + fromArea.move_contents_to(toArea) + if (alien_ship_location) + alien_ship_location = 0 + else + alien_ship_location = 1 + return \ No newline at end of file diff --git a/code/modules/admin/new/admin_verbs.dm b/code/modules/admin/new/admin_verbs.dm new file mode 100644 index 00000000000..37bd024ec4c --- /dev/null +++ b/code/modules/admin/new/admin_verbs.dm @@ -0,0 +1,802 @@ +//GUYS REMEMBER TO ADD A += to UPDATE_ADMINS +//AND A -= TO CLEAR_ADMIN_VERBS + + + +//Some verbs that are still in the code but not used atm + // Debug +// verbs += /client/proc/radio_report //for radio debugging dont think its been used in a very long time +// verbs += /client/proc/fix_next_move //has not been an issue in a very very long time + + // Mapping helpers added via enable_mapping_debug verb +// verbs += /client/proc/do_not_use_these +// verbs += /client/proc/camera_view +// verbs += /client/proc/sec_camera_report +// verbs += /client/proc/intercom_view +// verbs += /client/proc/air_status //Air things +// verbs += /client/proc/Cell //More air things + +/client/proc/update_admins(var/rank) + + if(!holder) + holder = new /obj/admins(src) + + holder.rank = rank + + if(!holder.state) + var/state = alert("Which state do you want the admin to begin in?", "Admin-state", "Play", "Observe", "Neither") + if(state == "Play") + holder.state = 1 + admin_play() + return + else if(state == "Observe") + holder.state = 2 + admin_observe() + return + else + del(holder) + return + + switch (rank) + if ("Game Master") + holder.level = 6 + + if ("Senior Game Admin") + holder.level = 5 + + if ("Game Admin") + holder.level = 4 + + if ("Secondary Game Admin") + holder.level = 3 + + if ("Trial Admin") + holder.level = 2 + if(holder.state == 2) // if observing + verbs += /client/proc/debug_variables + verbs += /client/proc/cmd_modify_ticker_variables + verbs += /client/proc/toggle_view_range + verbs += /client/proc/Getmob + verbs += /client/proc/Getkey + verbs += /client/proc/sendmob + verbs += /client/proc/Jump + verbs += /client/proc/jumptokey + verbs += /client/proc/jumptomob + verbs += /client/proc/jumptoturf + verbs += /client/proc/jumptocoord + verbs += /client/proc/cmd_admin_delete + verbs += /client/proc/cmd_admin_add_freeform_ai_law + verbs += /client/proc/cmd_admin_rejuvenate + verbs += /client/proc/cmd_admin_drop_everything + //verbs += /client/proc/cmd_modify_object_variables --Merged with view variables + + if ("Temporary Admin") + holder.level = 1 + if(holder.state == 2) // if observing + verbs += /client/proc/debug_variables + verbs += /client/proc/cmd_modify_ticker_variables + verbs += /client/proc/toggle_view_range + verbs += /client/proc/Getmob + verbs += /client/proc/Getkey + verbs += /client/proc/sendmob + verbs += /client/proc/Jump + verbs += /client/proc/jumptokey + verbs += /client/proc/jumptomob + verbs += /client/proc/jumptoturf + verbs += /client/proc/jumptocoord + verbs += /client/proc/cmd_admin_delete + verbs += /client/proc/cmd_admin_add_freeform_ai_law + verbs += /client/proc/cmd_admin_rejuvenate + verbs += /client/proc/cmd_admin_drop_everything + //verbs += /client/proc/cmd_modify_object_variables --Merged with view variables + + if ("Moderator") + holder.level = 0 + + if ("Admin Observer") + holder.level = -1 + + if ("Banned") + holder.level = -2 + del(src) + return + + else + del(holder) + return + + if (holder) //THE BELOW handles granting powers. The above is for special cases only! + holder.owner = src + + //Admin Observer + if (holder.level >= -1) + verbs += /client/proc/cmd_admin_say + verbs += /client/proc/cmd_admin_gib_self + verbs += /client/proc/deadmin_self + else return + + //Moderator + if (holder.level >= 0) + verbs += /obj/admins/proc/announce + verbs += /obj/admins/proc/startnow + verbs += /obj/admins/proc/toggleAI //Toggle the AI + verbs += /obj/admins/proc/toggleenter //Toggle enterting + verbs += /obj/admins/proc/toggleguests //Toggle guests entering + verbs += /obj/admins/proc/toggleooc //toggle ooc + verbs += /obj/admins/proc/toggleoocdead //toggle ooc for dead/unc + verbs += /obj/admins/proc/voteres //toggle votes + verbs += /obj/admins/proc/vmode + verbs += /obj/admins/proc/votekill + verbs += /obj/admins/proc/show_player_panel + verbs += /client/proc/deadchat //toggles deadchat + verbs += /client/proc/cmd_admin_mute + verbs += /client/proc/cmd_admin_pm_context + verbs += /client/proc/cmd_admin_pm_panel + verbs += /client/proc/cmd_admin_subtle_message + verbs += /client/proc/warn + verbs += /client/proc/dsay + verbs += /client/proc/admin_play + verbs += /client/proc/admin_observe + verbs += /client/proc/game_panel + verbs += /client/proc/player_panel + verbs += /client/proc/player_panel_new + verbs += /client/proc/unban_panel + verbs += /client/proc/jobbans + verbs += /client/proc/unjobban_panel + verbs += /client/proc/voting + verbs += /client/proc/hide_verbs + verbs += /client/proc/general_report + verbs += /client/proc/air_report + verbs += /client/proc/deadmin_self + //verbs += /client/proc/cmd_admin_prison --Merged with player panel + //verbs += /obj/admins/proc/unprison --Merged with player panel + else return + + //Temporary Admin + if (holder.level >= 1) + deadchat = 1 + seeprayers = 1 + + verbs += /obj/admins/proc/toggleaban //abandon mob + verbs += /obj/admins/proc/show_traitor_panel + verbs += /client/proc/cmd_admin_remove_plasma + verbs += /client/proc/admin_call_shuttle + verbs += /client/proc/admin_cancel_shuttle + verbs += /client/proc/cmd_admin_dress + verbs += /client/proc/respawn_character + verbs += /client/proc/spawn_xeno + verbs += /client/proc/toggleprayers + verbs += /client/proc/deadmin_self + verbs += /client/proc/tension_report + verbs += /client/proc/toggleadminhelpsound + verbs += /client/proc/cmd_admin_add_random_ai_law + verbs += /client/proc/secrets + verbs += /client/proc/play_sound + verbs += /client/proc/stealth + verbs += /obj/admins/proc/delay //game start delay + verbs += /obj/admins/proc/immreboot //immediate reboot + verbs += /obj/admins/proc/restart //restart + verbs += /client/proc/cmd_admin_check_contents + verbs += /client/proc/cmd_admin_create_centcom_report + verbs += /client/proc/toggle_hear_deadcast + verbs += /client/proc/toggle_hear_radio + verbs += /proc/possess + verbs += /proc/release + verbs += /client/proc/deadmin_self + else return + +/* //Trial Admin + if (holder.level >= 2) + + else return +*/ + //Secondary Game Admin + if (holder.level >= 3) + verbs += /obj/admins/proc/view_txt_log + verbs += /obj/admins/proc/view_atk_log + verbs += /obj/admins/proc/spawn_atom + verbs += /client/proc/cmd_admin_list_open_jobs + verbs += /client/proc/cmd_admin_direct_narrate + verbs += /client/proc/kill_air + verbs += /client/proc/cmd_admin_world_narrate + verbs += /client/proc/cmd_debug_del_all + verbs += /client/proc/cmd_debug_tog_aliens + verbs += /client/proc/mapload + verbs += /client/proc/check_words + verbs += /client/proc/drop_bomb + verbs += /client/proc/cmd_admin_grantfullaccess + verbs += /client/proc/jump_to_dead_group + verbs += /client/proc/cmd_admin_drop_everything + verbs += /client/proc/make_sound + verbs += /client/proc/play_local_sound + verbs += /client/proc/send_space_ninja + verbs += /client/proc/restartcontroller //Can call via aproccall --I_hate_easy_things.jpg, Mport --Agouri + verbs += /client/proc/Blobize //I need to remember to move/remove this later + verbs += /client/proc/toggle_clickproc //TODO ERRORAGE (Temporary proc while the new clickproc is being tested) + verbs += /client/proc/toggle_gravity_on + verbs += /client/proc/toggle_gravity_off + verbs += /client/proc/toggle_random_events + verbs += /obj/admins/proc/adrev //toggle admin revives + verbs += /obj/admins/proc/adspawn //toggle admin item spawning + verbs += /client/proc/debug_variables + verbs += /client/proc/cmd_modify_ticker_variables + verbs += /client/proc/Debug2 //debug toggle switch + verbs += /client/proc/toggle_view_range + verbs += /client/proc/Getmob + verbs += /client/proc/Getkey + verbs += /client/proc/sendmob + verbs += /client/proc/Jump + verbs += /client/proc/jumptokey + verbs += /client/proc/jumptomob + verbs += /client/proc/jumptoturf + verbs += /client/proc/cmd_admin_delete + verbs += /client/proc/cmd_admin_add_freeform_ai_law + verbs += /client/proc/cmd_admin_add_random_ai_law + verbs += /client/proc/cmd_admin_rejuvenate + verbs += /client/proc/hide_most_verbs + verbs += /client/proc/jumptocoord + verbs += /client/proc/startSinglo + verbs += /client/proc/cmd_modify_ticker_variables + verbs += /client/proc/deadmin_self + //verbs += /client/proc/cmd_mass_modify_object_variables --Merged with view variables + //verbs += /client/proc/cmd_admin_explosion --Merged with view variables + //verbs += /client/proc/cmd_admin_emp --Merged with view variables + //verbs += /client/proc/give_spell --Merged with view variables + //verbs += /client/proc/cmd_admin_ninjafy --Merged with view variables + //verbs += /client/proc/cmd_switch_radio --removed as tcommsat is staying + else return + + //Game Admin + if (holder.level >= 4) + verbs += /client/proc/ticklag + else return + + //Senior Game admin + if (holder.level >= 5) + verbs += /client/proc/colorooc + verbs += /client/proc/strike_team + verbs += /client/proc/everyone_random + verbs += /client/proc/only_one + verbs += /obj/admins/proc/toggle_aliens //toggle aliens + verbs += /obj/admins/proc/toggle_space_ninja //toggle ninjas + verbs += /client/proc/deadmin_self + else return + + //Game Master + if (holder.level >= 6) + verbs += /obj/admins/proc/adjump + verbs += /client/proc/callproc + verbs += /client/proc/triple_ai + verbs += /client/proc/get_admin_state + verbs += /client/proc/reload_admins + verbs += /client/proc/cmd_debug_make_powernets + verbs += /client/proc/object_talk + verbs += /client/proc/enable_mapping_debug + verbs += /client/proc/deadmin_self + else return + return + + +/client/proc/clear_admin_verbs() + deadchat = 0 + + verbs -= /obj/admins/proc/vmode + verbs -= /obj/admins/proc/votekill + verbs -= /obj/admins/proc/announce + verbs -= /obj/admins/proc/startnow + verbs -= /obj/admins/proc/toggleAI //Toggle the AI + verbs -= /obj/admins/proc/toggleenter //Toggle enterting + verbs -= /obj/admins/proc/toggleguests //Toggle guests entering + verbs -= /obj/admins/proc/toggleooc //toggle ooc + verbs -= /obj/admins/proc/toggleoocdead //toggle ooc for dead/unc + verbs -= /obj/admins/proc/voteres //toggle votes + verbs -= /obj/admins/proc/delay //game start delay + verbs -= /obj/admins/proc/immreboot //immediate reboot + verbs -= /obj/admins/proc/restart //restart + verbs -= /obj/admins/proc/show_traitor_panel + verbs -= /obj/admins/proc/show_player_panel + verbs -= /obj/admins/proc/toggle_aliens //toggle aliens + verbs -= /obj/admins/proc/toggle_space_ninja //toggle ninjas + verbs -= /obj/admins/proc/adjump + verbs -= /obj/admins/proc/view_txt_log + verbs -= /obj/admins/proc/view_atk_log + verbs -= /obj/admins/proc/spawn_atom + verbs -= /obj/admins/proc/adrev //toggle admin revives + verbs -= /obj/admins/proc/adspawn //toggle admin item spawning + verbs -= /obj/admins/proc/toggleaban //abandon mob + verbs -= /client/proc/hide_verbs + verbs -= /client/proc/hide_most_verbs + verbs -= /client/proc/show_verbs + verbs -= /client/proc/colorooc + verbs -= /client/proc/triple_ai + verbs -= /client/proc/get_admin_state + verbs -= /client/proc/reload_admins + verbs -= /client/proc/kill_air + verbs -= /client/proc/cmd_debug_make_powernets + verbs -= /client/proc/object_talk + verbs -= /client/proc/strike_team + verbs -= /client/proc/cmd_admin_list_open_jobs + verbs -= /client/proc/cmd_admin_direct_narrate + verbs -= /client/proc/cmd_admin_world_narrate + verbs -= /client/proc/callproc + verbs -= /client/proc/Cell + verbs -= /client/proc/cmd_debug_del_all + verbs -= /client/proc/cmd_debug_tog_aliens + verbs -= /client/proc/ticklag + verbs -= /client/proc/mapload + verbs -= /client/proc/check_words + verbs -= /client/proc/drop_bomb + verbs -= /client/proc/cmd_admin_grantfullaccess + verbs -= /client/proc/cmd_admin_drop_everything + verbs -= /client/proc/make_sound + verbs -= /client/proc/only_one + verbs -= /client/proc/send_space_ninja + verbs -= /client/proc/debug_variables + verbs -= /client/proc/cmd_modify_ticker_variables + verbs -= /client/proc/Debug2 //debug toggle switch + verbs -= /client/proc/toggle_view_range + verbs -= /client/proc/Getmob + verbs -= /client/proc/Getkey + verbs -= /client/proc/sendmob + verbs -= /client/proc/Jump + verbs -= /client/proc/jumptokey + verbs -= /client/proc/jumptomob + verbs -= /client/proc/jumptoturf + verbs -= /client/proc/cmd_admin_add_freeform_ai_law + verbs -= /client/proc/cmd_admin_add_random_ai_law + verbs -= /client/proc/cmd_admin_rejuvenate + verbs -= /client/proc/cmd_admin_delete + verbs -= /client/proc/toggleadminhelpsound + verbs -= /client/proc/cmd_admin_remove_plasma + verbs -= /client/proc/admin_call_shuttle + verbs -= /client/proc/admin_cancel_shuttle + verbs -= /client/proc/cmd_admin_dress + verbs -= /client/proc/respawn_character + verbs -= /client/proc/spawn_xeno + verbs -= /client/proc/cmd_admin_add_random_ai_law + verbs -= /client/proc/secrets + verbs -= /client/proc/play_sound + verbs -= /client/proc/stealth + verbs -= /client/proc/cmd_admin_check_contents + verbs -= /client/proc/cmd_admin_create_centcom_report + verbs -= /client/proc/deadchat //toggles deadchat + verbs -= /client/proc/cmd_admin_mute + verbs -= /client/proc/cmd_admin_pm_context + verbs -= /client/proc/cmd_admin_pm_panel + verbs -= /client/proc/cmd_admin_say + verbs -= /client/proc/cmd_admin_subtle_message + verbs -= /client/proc/warn + verbs -= /client/proc/dsay + verbs -= /client/proc/admin_play + verbs -= /client/proc/admin_observe + verbs -= /client/proc/game_panel + verbs -= /client/proc/player_panel + verbs -= /client/proc/unban_panel + verbs -= /client/proc/jobbans + verbs -= /client/proc/unjobban_panel + verbs -= /client/proc/voting + verbs -= /client/proc/hide_verbs + verbs -= /client/proc/general_report + verbs -= /client/proc/air_report + verbs -= /client/proc/cmd_admin_say + verbs -= /client/proc/cmd_admin_gib_self + verbs -= /client/proc/restartcontroller + verbs -= /client/proc/play_local_sound + verbs -= /client/proc/enable_mapping_debug + verbs -= /client/proc/toggleprayers + verbs -= /client/proc/jump_to_dead_group + verbs -= /client/proc/Blobize + verbs -= /client/proc/toggle_clickproc //TODO ERRORAGE (Temporary proc while the enw clickproc is being tested) + verbs -= /client/proc/toggle_hear_deadcast + verbs -= /client/proc/toggle_hear_radio + verbs -= /client/proc/tension_report + verbs -= /client/proc/player_panel_new + verbs -= /client/proc/toggle_gravity_on + verbs -= /client/proc/toggle_gravity_off + verbs -= /client/proc/toggle_random_events + verbs -= /client/proc/deadmin_self + verbs -= /client/proc/startSinglo + verbs -= /client/proc/jumptocoord + verbs -= /client/proc/everyone_random + verbs -= /proc/possess + verbs -= /proc/release + //verbs -= /client/proc/give_spell --Merged with view variables + //verbs -= /client/proc/cmd_admin_ninjafy --Merged with view variables + //verbs -= /client/proc/cmd_modify_object_variables --Merged with view variables + //verbs -= /client/proc/cmd_admin_explosion --Merged with view variables + //verbs -= /client/proc/cmd_admin_emp --Merged with view variables + //verbs -= /client/proc/cmd_admin_godmode --Merged with view variables + //verbs -= /client/proc/cmd_admin_gib --Merged with view variables + //verbs -= /client/proc/cmd_mass_modify_object_variables --Merged with view variables + //verbs -= /client/proc/cmd_admin_attack_log --Merged with view variables + //verbs -= /proc/togglebuildmode --Merged with view variables + //verbs -= /client/proc/cmd_admin_prison --Merged with player panel + //verbs -= /obj/admins/proc/unprison --Merged with player panel + //verbs -= /client/proc/cmd_switch_radio --removed because tcommsat is staying + //verbs -= /client/proc/togglebuildmodeself --removed due to runtimes + return + + +/client/proc/admin_observe() + set category = "Admin" + set name = "Set Observe" + if(!holder) + alert("You are not an admin") + return + + verbs -= /client/proc/admin_play + spawn( 1200 ) + verbs += /client/proc/admin_play + var/rank = holder.rank + clear_admin_verbs() + holder.state = 2 + update_admins(rank) + if(!istype(mob, /mob/dead/observer)) + mob.adminghostize(1) + src << "\blue You are now observing" + +/client/proc/admin_play() + set category = "Admin" + set name = "Set Play" + if(!holder) + alert("You are not an admin") + return + verbs -= /client/proc/admin_observe + spawn( 1200 ) + verbs += /client/proc/admin_observe + var/rank = holder.rank + clear_admin_verbs() + holder.state = 1 + update_admins(rank) + if(istype(mob, /mob/dead/observer)) + mob:reenter_corpse() + src << "\blue You are now playing" + +/client/proc/get_admin_state() + set name = "Get Admin State" + set category = "Debug" + for(var/mob/M in world) + if(M.client && M.client.holder) + if(M.client.holder.state == 1) + src << "[M.key] is playing - [M.client.holder.state]" + else if(M.client.holder.state == 2) + src << "[M.key] is observing - [M.client.holder.state]" + else + src << "[M.key] is undefined - [M.client.holder.state]" + + +/client/proc/player_panel() + set name = "Player Panel" + set category = "Admin" + if(holder) + holder.player_panel_old() + return + +/client/proc/player_panel_new() + set name = "Player Panel-New" + set category = "Admin" + if(holder) + holder.player_panel_new() + return + +/client/proc/jobbans() + set name = "Display Job bans" + set category = "Admin" + if(holder) + holder.Jobbans() + return + +/client/proc/unban_panel() + set name = "Unban Panel" + set category = "Admin" + if(holder) + holder.unbanpanel() + return + +/client/proc/game_panel() + set name = "Game Panel" + set category = "Admin" + if(holder) + holder.Game() + return + +/client/proc/secrets() + set name = "Secrets" + set category = "Admin" + if (holder) + holder.Secrets() + return + +/client/proc/voting() + set name = "Voting" + set category = "Admin" + if (holder) + holder.Voting() + +/client/proc/colorooc() + set category = "Fun" + set name = "OOC Text Color" + ooccolor = input(src, "Please select your OOC colour.", "OOC colour") as color + return + +/client/proc/stealth() + set category = "Admin" + set name = "Stealth Mode" + if(!authenticated || !holder) + src << "Only administrators may use this command." + return + stealth = !stealth + if(stealth) + var/new_key = trim(input("Enter your desired display name.", "Fake Key", key)) + if(!new_key) + stealth = 0 + return + new_key = strip_html(new_key) + if(length(new_key) >= 26) + new_key = copytext(new_key, 1, 26) + fakekey = new_key + else + fakekey = null + log_admin("[key_name(usr)] has turned stealth mode [stealth ? "ON" : "OFF"]") + message_admins("[key_name_admin(usr)] has turned stealth mode [stealth ? "ON" : "OFF"]", 1) + +#define AUTOBATIME 10 +/client/proc/warn(var/mob/M in world) + set category = "Special Verbs" + set name = "Warn" + set desc = "Warn a player" + if(!authenticated || !holder) + src << "Only administrators may use this command." + return + if(M.client && M.client.holder && (M.client.holder.level >= holder.level)) + alert("You cannot perform this action. You must be of a higher administrative rank!", null, null, null, null, null) + return + if(!M.client.warned) + M << "\red You have been warned by an administrator. This is the only warning you will recieve." + M.client.warned = 1 + message_admins("\blue [ckey] warned [M.ckey].") + else + AddBan(M.ckey, M.computer_id, "Autobanning due to previous warn", ckey, 1, AUTOBATIME) + M << "\redYou have been autobanned by [ckey]. This is what we in the biz like to call a \"second warning\"." + M << "\red This is a temporary ban; it will automatically be removed in [AUTOBATIME] minutes." + log_admin("[ckey] warned [M.ckey], resulting in a [AUTOBATIME] minute autoban.") + ban_unban_log_save("[ckey] warned [M.ckey], resulting in a [AUTOBATIME] minute autoban.") + message_admins("\blue [ckey] warned [M.ckey], resulting in a [AUTOBATIME] minute autoban.") + feedback_inc("ban_warn",1) + + del(M.client) + + +/client/proc/drop_bomb() // Some admin dickery that can probably be done better -- TLE + set category = "Special Verbs" + set name = "Drop Bomb" + set desc = "Cause an explosion of varying strength at your location." + + var/turf/epicenter = mob.loc + var/list/choices = list("Small Bomb", "Medium Bomb", "Big Bomb", "Custom Bomb") + var/choice = input("What size explosion would you like to produce?") in choices + switch(choice) + if(null) + return 0 + if("Small Bomb") + explosion(epicenter, 1, 2, 3, 3) + if("Medium Bomb") + explosion(epicenter, 2, 3, 4, 4) + if("Big Bomb") + explosion(epicenter, 3, 5, 7, 5) + if("Custom Bomb") + var/devastation_range = input("Devastation range (in tiles):") as num + var/heavy_impact_range = input("Heavy impact range (in tiles):") as num + var/light_impact_range = input("Light impact range (in tiles):") as num + var/flash_range = input("Flash range (in tiles):") as num + explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range) + message_admins("\blue [ckey] creating an admin explosion at [epicenter.loc].") + +/client/proc/give_spell(mob/T as mob in world) // -- Urist + set category = "Fun" + set name = "Give Spell" + set desc = "Gives a spell to a mob." + var/obj/effect/proc_holder/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in spells + if(!S) return + T.spell_list += new S + +/client/proc/make_sound(var/obj/O in world) // -- TLE + set category = "Special Verbs" + set name = "Make Sound" + set desc = "Display a message to everyone who can hear the target" + if(O) + var/message = input("What do you want the message to be?", "Make Sound") as text|null + if(!message) + return + for (var/mob/V in hearers(O)) + V.show_message(message, 2) + +////I'm removing buildmode because it's shitty and runtimes a lot. -Pete +/* +/client/proc/togglebuildmodeself() + set name = "Toggle Build Mode Self" + set category = "Special Verbs" + if(src.mob) + togglebuildmode(src.mob) +*/ + +/client/proc/toggleadminhelpsound() + set name = "Toggle Adminhelp Sound" + set category = "Admin" + sound_adminhelp = !sound_adminhelp + if(sound_adminhelp) + usr << "You will now hear a sound when adminhelps arrive" + else + usr << "You will no longer hear a sound when adminhelps arrive" + +/client/proc/object_talk(var/msg as text) // -- TLE + set category = "Special Verbs" + set name = "oSay" + set desc = "Display a message to everyone who can hear the target" + if(mob.control_object) + if(!msg) + return + for (var/mob/V in hearers(mob.control_object)) + V.show_message("[mob.control_object.name] says: \"" + msg + "\"", 2) + +/client/proc/kill_air() // -- TLE + set category = "Debug" + set name = "Kill Air" + set desc = "Toggle Air Processing" + if(kill_air) + kill_air = 0 + usr << "Enabled air processing." + else + kill_air = 1 + usr << "Disabled air processing." + +/client/proc/show_verbs() + set name = "Toggle admin verb visibility" + set category = "Admin" + src << "Restoring admin verbs back" + + var/temp = deadchat + clear_admin_verbs() + update_admins(holder.rank) + deadchat = temp + +/client/proc/toggle_clickproc() //TODO ERRORAGE (This is a temporary verb here while I test the new clicking proc) + set name = "Toggle NewClickProc" + set category = "Admin" + + if(!holder) return + using_new_click_proc = !using_new_click_proc + world << "Testing of new click proc [using_new_click_proc ? "enabled" : "disabled"]" + +/client/proc/toggle_hear_deadcast() + set name = "Toggle Hear Deadcast" + set category = "Admin" + + if(!holder) return + STFU_ghosts = !STFU_ghosts + usr << "You will now [STFU_ghosts ? "not hear" : "hear"] ghosts" + +/client/proc/toggle_hear_radio() + set name = "Toggle Hear Radio" + set category = "Admin" + + if(!holder) return + STFU_radio = !STFU_radio + usr << "You will now [STFU_radio ? "not hear" : "hear"] radio chatter from nearby radios or speakers" + +/client/proc/deadmin_self() + set name = "De-admin self" + set category = "Admin" + + if(src.holder) + if(alert("Confirm self-deadmin for the round? You can't re-admin yourself without someont promoting you.",,"Yes","No") == "Yes") + del(holder) + log_admin("[src] deadmined themself.") + message_admins("[src] deadmined themself.", 1) + src.clear_admin_verbs() + src.update_admins(null) + admins.Remove(src.ckey) + usr << "You are now a normal player." + +/client/proc/startSinglo() + set name = "Singlo Starter" + set category = "Debug" + set desc = "Starts a self-sustaining, stable singlo. This artifical singlo does not have a gravitational pull." + + for(var/obj/machinery/emitter/E in world) + if(E.anchored) + E.active = 1 + + for(var/obj/machinery/field_generator/F in world) + if(F.anchored) + F.Varedit_start = 1 + spawn(30) + for(var/obj/machinery/the_singularitygen/G in world) + if(G.anchored) + var/obj/machinery/singularity/S = new /obj/machinery/singularity(get_turf(G), 50) + spawn(0) + del(G) + S.energy = 1750 + S.current_size = 7 + S.icon = '224x224.dmi' + S.icon_state = "singularity_s7" + S.pixel_x = -96 + S.pixel_y = -96 + S.grav_pull = 0 + //S.consume_range = 3 + S.dissipate = 0 + //S.dissipate_delay = 10 + //S.dissipate_track = 0 + //S.dissipate_strength = 10 + + for(var/obj/machinery/power/rad_collector/Rad in world) + if(Rad.anchored) + if(!Rad.P) + var/obj/item/weapon/tank/plasma/Plasma = new/obj/item/weapon/tank/plasma(Rad) + Plasma.air_contents.toxins = 70 + Rad.drainratio = 0 + Rad.P = Plasma + Plasma.loc = Rad + + if(!Rad.active) + Rad.toggle_power() + + for(var/obj/machinery/power/smes/SMES in world) + if(SMES.anchored) + SMES.chargemode = 1 + +/client/proc/hide_most_verbs()//Allows you to keep some functionality while hiding some verbs + set name = "Toggle most admin verb visibility" + set category = "Admin" + src << "Hiding most admin verbs" + + var/temp = deadchat + clear_admin_verbs() + deadchat = temp + verbs -= /client/proc/hide_verbs + verbs -= /client/proc/hide_most_verbs + verbs += /client/proc/show_verbs + + if(holder.level >= 5)//Senior Game Admin******************************************************************** + verbs += /client/proc/colorooc + + if(holder.level >= 3)//Secondary Game admin******************************************************************** + verbs += /client/proc/debug_variables + //verbs += /client/proc/cmd_modify_object_variables --merged with view vairiables + verbs += /client/proc/Jump + verbs += /client/proc/jumptoturf +// verbs += /client/proc/togglebuildmodeself + + verbs += /client/proc/dsay + verbs += /client/proc/admin_play + verbs += /client/proc/admin_observe + verbs += /client/proc/game_panel + verbs += /client/proc/player_panel + verbs += /client/proc/cmd_admin_subtle_message + verbs += /client/proc/cmd_admin_pm_context + verbs += /client/proc/cmd_admin_pm_panel + verbs += /client/proc/cmd_admin_gib_self + + verbs += /client/proc/deadchat //toggles deadchat + verbs += /obj/admins/proc/toggleooc //toggle ooc + verbs += /client/proc/cmd_admin_say//asay + verbs += /client/proc/toggleadminhelpsound + return + + +/client/proc/hide_verbs() + set name = "Toggle admin verb visibility" + set category = "Admin" + src << "Hiding almost all admin verbs" + + var/temp = deadchat + clear_admin_verbs() + deadchat = temp + verbs -= /client/proc/hide_verbs + verbs -= /client/proc/hide_most_verbs + verbs += /client/proc/show_verbs + + verbs += /client/proc/deadchat //toggles deadchat + verbs += /obj/admins/proc/toggleooc //toggle ooc + verbs += /client/proc/cmd_admin_say//asay + return diff --git a/code/modules/admin/new/verbs/modifyvariables.dm b/code/modules/admin/new/verbs/modifyvariables.dm new file mode 100644 index 00000000000..6498ea358d1 --- /dev/null +++ b/code/modules/admin/new/verbs/modifyvariables.dm @@ -0,0 +1,502 @@ +var/list/forbidden_varedit_object_types = list( + /obj/admins, //Admins editing their own admin-power object? Yup, sounds like a good idea. + /obj/machinery/blackbox_recorder, //Prevents people messing with feedback gathering + /datum/feedback_variable //Prevents people messing with feedback gathering + ) + +/client/proc/cmd_modify_object_variables(obj/O as obj|mob|turf|area in world) + set category = "Debug" + set name = "Edit Variables" + set desc="(target) Edit a target item's variables" + src.modify_variables(O) + +/client/proc/cmd_modify_ticker_variables() + set category = "Debug" + set name = "Edit Ticker Variables" + + if (ticker == null) + src << "Game hasn't started yet." + else + src.modify_variables(ticker) + +/client/proc/mod_list_add_ass() //haha + + var/class = "text" + if(src.holder && src.holder.marked_datum) + class = input("What kind of variable?","Variable Type") as null|anything in list("text", + "num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default","marked datum ([holder.marked_datum.type])") + else + class = input("What kind of variable?","Variable Type") as null|anything in list("text", + "num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default") + + if(!class) + return + + if(holder.marked_datum && class == "marked datum ([holder.marked_datum.type])") + class = "marked datum" + + var/var_value = null + + switch(class) + + if("text") + var_value = input("Enter new text:","Text") as null|text + + if("num") + var_value = input("Enter new number:","Num") as null|num + + if("type") + var_value = input("Enter type:","Type") as null|anything in typesof(/obj,/mob,/area,/turf) + + if("reference") + var_value = input("Select reference:","Reference") as null|mob|obj|turf|area in world + + if("mob reference") + var_value = input("Select reference:","Reference") as null|mob in world + + if("file") + var_value = input("Pick file:","File") as null|file + + if("icon") + var_value = input("Pick icon:","Icon") as null|icon + + if("marked datum") + var_value = holder.marked_datum + + if(!var_value) return + + return var_value + + +/client/proc/mod_list_add(var/list/L) + + var/class = "text" + if(src.holder && src.holder.marked_datum) + class = input("What kind of variable?","Variable Type") as null|anything in list("text", + "num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default","marked datum ([holder.marked_datum.type])") + else + class = input("What kind of variable?","Variable Type") as null|anything in list("text", + "num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default") + + if(!class) + return + + if(holder.marked_datum && class == "marked datum ([holder.marked_datum.type])") + class = "marked datum" + + var/var_value = null + + switch(class) + + if("text") + var_value = input("Enter new text:","Text") as text + + if("num") + var_value = input("Enter new number:","Num") as num + + if("type") + var_value = input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf) + + if("reference") + var_value = input("Select reference:","Reference") as mob|obj|turf|area in world + + if("mob reference") + var_value = input("Select reference:","Reference") as mob in world + + if("file") + var_value = input("Pick file:","File") as file + + if("icon") + var_value = input("Pick icon:","Icon") as icon + + if("marked datum") + var_value = holder.marked_datum + + if(!var_value) return + + switch(alert("Would you like to associate a var with the list entry?",,"Yes","No")) + if("Yes") + L += var_value + L[var_value] = mod_list_add_ass() //haha + if("No") + L += var_value + +/client/proc/mod_list(var/list/L) + if(!istype(L,/list)) src << "Not a List." + + var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine", "poo", "icon", "icon_state") + + var/list/names = sortList(L) + + var/variable = input("Which var?","Var") as null|anything in names + "(ADD VAR)" + + if(variable == "(ADD VAR)") + mod_list_add(L) + return + + if(!variable) + return + + var/default + + var/dir + + if (locked.Find(variable) && !(src.holder.rank in list("Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master"))) + return + + if(isnull(variable)) + usr << "Unable to determine variable type." + + else if(isnum(variable)) + usr << "Variable appears to be NUM." + default = "num" + dir = 1 + + else if(istext(variable)) + usr << "Variable appears to be TEXT." + default = "text" + + else if(isloc(variable)) + usr << "Variable appears to be REFERENCE." + default = "reference" + + else if(isicon(variable)) + usr << "Variable appears to be ICON." + variable = "\icon[variable]" + default = "icon" + + else if(istype(variable,/atom) || istype(variable,/datum)) + usr << "Variable appears to be TYPE." + default = "type" + + else if(istype(variable,/list)) + usr << "Variable appears to be LIST." + default = "list" + + else if(istype(variable,/client)) + usr << "Variable appears to be CLIENT." + default = "cancel" + + else + usr << "Variable appears to be FILE." + default = "file" + + usr << "Variable contains: [variable]" + if(dir) + switch(variable) + if(1) + dir = "NORTH" + if(2) + dir = "SOUTH" + if(4) + dir = "EAST" + if(8) + dir = "WEST" + if(5) + dir = "NORTHEAST" + if(6) + dir = "SOUTHEAST" + if(9) + dir = "NORTHWEST" + if(10) + dir = "SOUTHWEST" + else + dir = null + + if(dir) + usr << "If a direction, direction is: [dir]" + + var/class = "text" + if(src.holder && src.holder.marked_datum) + class = input("What kind of variable?","Variable Type",default) as null|anything in list("text", + "num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default","marked datum ([holder.marked_datum.type])") + else + class = input("What kind of variable?","Variable Type",default) as null|anything in list("text", + "num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default") + + if(!class) + return + + if(holder.marked_datum && class == "marked datum ([holder.marked_datum.type])") + class = "marked datum" + + switch(class) + + if("list") + mod_list(variable) + + if("restore to default") + variable = initial(variable) + + if("edit referenced object") + modify_variables(variable) + + if("(DELETE FROM LIST)") + L -= variable + return + + if("text") + variable = input("Enter new text:","Text",\ + variable) as text + + if("num") + variable = input("Enter new number:","Num",\ + variable) as num + + if("type") + variable = input("Enter type:","Type",variable) \ + in typesof(/obj,/mob,/area,/turf) + + if("reference") + variable = input("Select reference:","Reference",\ + variable) as mob|obj|turf|area in world + + if("mob reference") + variable = input("Select reference:","Reference",\ + variable) as mob in world + + if("file") + variable = input("Pick file:","File",variable) \ + as file + + if("icon") + variable = input("Pick icon:","Icon",variable) \ + as icon + + if("marked datum") + variable = holder.marked_datum + +/client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0) + var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "cuffed", "ka", "last_eaten", "urine", "poo", "icon", "icon_state") + + if(!src.authenticated || !src.holder) + src << "Only administrators may use this command." + return + + for(var/p in forbidden_varedit_object_types) + if( istype(O,p) ) + usr << "\red It is forbidden to edit this object's variables." + return + + var/class + var/variable + var/var_value + + if(param_var_name) + if(!param_var_name in O.vars) + src << "A variable with this name ([param_var_name]) doesn't exist in this atom ([O])" + return + + if (param_var_name == "holder" && holder.rank != "Game Master") + src << "No. Stop being stupid." + return + + if (locked.Find(param_var_name) && !(src.holder.rank in list("Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master"))) + src << "Editing this variable requires you to be a game master or game admin." + return + + variable = param_var_name + + var_value = O.vars[variable] + + if(autodetect_class) + if(isnull(var_value)) + usr << "Unable to determine variable type." + class = null + autodetect_class = null + else if(isnum(var_value)) + usr << "Variable appears to be NUM." + class = "num" + dir = 1 + + else if(istext(var_value)) + usr << "Variable appears to be TEXT." + class = "text" + + else if(isloc(var_value)) + usr << "Variable appears to be REFERENCE." + class = "reference" + + else if(isicon(var_value)) + usr << "Variable appears to be ICON." + var_value = "\icon[var_value]" + class = "icon" + + else if(istype(var_value,/atom) || istype(var_value,/datum)) + usr << "Variable appears to be TYPE." + class = "type" + + else if(istype(var_value,/list)) + usr << "Variable appears to be LIST." + class = "list" + + else if(istype(var_value,/client)) + usr << "Variable appears to be CLIENT." + class = "cancel" + + else + usr << "Variable appears to be FILE." + class = "file" + + else + + var/list/names = list() + for (var/V in O.vars) + names += V + + names = sortList(names) + + variable = input("Which var?","Var") as null|anything in names + if(!variable) + return + var_value = O.vars[variable] + + if (locked.Find(variable) && !(src.holder.rank in list("Secondary Game Admin", "Game Admin", "Senior Game Admin", "Game Master"))) + return + + if (variable == "holder" && holder.rank != "Game Master") //Hotfix, a bit ugly but that exploit has been there for ages and now somebody just had to go and tell everyone of it bluh bluh - U + return + + if(!autodetect_class) + + var/dir + var/default + if(isnull(var_value)) + usr << "Unable to determine variable type." + + else if(isnum(var_value)) + usr << "Variable appears to be NUM." + default = "num" + dir = 1 + + else if(istext(var_value)) + usr << "Variable appears to be TEXT." + default = "text" + + else if(isloc(var_value)) + usr << "Variable appears to be REFERENCE." + default = "reference" + + else if(isicon(var_value)) + usr << "Variable appears to be ICON." + var_value = "\icon[var_value]" + default = "icon" + + else if(istype(var_value,/atom) || istype(var_value,/datum)) + usr << "Variable appears to be TYPE." + default = "type" + + else if(istype(var_value,/list)) + usr << "Variable appears to be LIST." + default = "list" + + else if(istype(var_value,/client)) + usr << "Variable appears to be CLIENT." + default = "cancel" + + else + usr << "Variable appears to be FILE." + default = "file" + + usr << "Variable contains: [var_value]" + if(dir) + switch(var_value) + if(1) + dir = "NORTH" + if(2) + dir = "SOUTH" + if(4) + dir = "EAST" + if(8) + dir = "WEST" + if(5) + dir = "NORTHEAST" + if(6) + dir = "SOUTHEAST" + if(9) + dir = "NORTHWEST" + if(10) + dir = "SOUTHWEST" + else + dir = null + if(dir) + usr << "If a direction, direction is: [dir]" + + if(src.holder && src.holder.marked_datum) + class = input("What kind of variable?","Variable Type",default) as null|anything in list("text", + "num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default","marked datum ([holder.marked_datum.type])") + else + class = input("What kind of variable?","Variable Type",default) as null|anything in list("text", + "num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default") + + if(!class) + return + + var/original_name + + if (!istype(O, /atom)) + original_name = "\ref[O] ([O])" + else + original_name = O:name + + if(holder.marked_datum && class == "marked datum ([holder.marked_datum.type])") + class = "marked datum" + + switch(class) + + if("list") + mod_list(O.vars[variable]) + return + + if("restore to default") + O.vars[variable] = initial(O.vars[variable]) + + if("edit referenced object") + return .(O.vars[variable]) + + if("text") + var/var_new = input("Enter new text:","Text",O.vars[variable]) as null|text + if(var_new==null) return + O.vars[variable] = var_new + + if("num") + if(variable=="luminosity") + var/var_new = input("Enter new number:","Num",O.vars[variable]) as null|num + if(var_new == null) return + O.sd_SetLuminosity(var_new) + else + var/var_new = input("Enter new number:","Num",O.vars[variable]) as null|num + if(var_new==null) return + O.vars[variable] = var_new + + if("type") + var/var_new = input("Enter type:","Type",O.vars[variable]) as null|anything in typesof(/obj,/mob,/area,/turf) + if(var_new==null) return + O.vars[variable] = var_new + + if("reference") + var/var_new = input("Select reference:","Reference",O.vars[variable]) as null|mob|obj|turf|area in world + if(var_new==null) return + O.vars[variable] = var_new + + if("mob reference") + var/var_new = input("Select reference:","Reference",O.vars[variable]) as null|mob in world + if(var_new==null) return + O.vars[variable] = var_new + + if("file") + var/var_new = input("Pick file:","File",O.vars[variable]) as null|file + if(var_new==null) return + O.vars[variable] = var_new + + if("icon") + var/var_new = input("Pick icon:","Icon",O.vars[variable]) as null|icon + if(var_new==null) return + O.vars[variable] = var_new + + if("marked datum") + O.vars[variable] = holder.marked_datum + + log_admin("[key_name(src)] modified [original_name]'s [variable] to [O.vars[variable]]") + message_admins("[key_name_admin(src)] modified [original_name]'s [variable] to [O.vars[variable]]", 1) + diff --git a/code/modules/admin/new/verbs/playsound.dm b/code/modules/admin/new/verbs/playsound.dm new file mode 100644 index 00000000000..ffa49e1f1b0 --- /dev/null +++ b/code/modules/admin/new/verbs/playsound.dm @@ -0,0 +1,98 @@ +/client/proc/play_sound(S as sound) + set category = "Fun" + set name = "Play Global Sound" + + //if(Debug2) + if(!src.authenticated || !src.holder) + src << "Only administrators may use this command." + return + + var/sound/uploaded_sound = sound(S,0,1,0) + uploaded_sound.channel = 777 + uploaded_sound.priority = 255 + uploaded_sound.wait = 1 + + if(src.holder.rank == "Game Master" || src.holder.rank == "Senior Game Admin" || src.holder.rank == "Game Admin" || src.holder.rank == "Secondary Game Admin") + log_admin("[key_name(src)] played sound [S]") + message_admins("[key_name_admin(src)] played sound [S]", 1) + for(var/mob/M in world) + if(M.client) + if(M.client.midis) + M << uploaded_sound + else + if(usr.client.canplaysound) + usr.client.canplaysound = 0 + log_admin("[key_name(src)] played sound [S]") + message_admins("[key_name_admin(src)] played sound [S]", 1) + for(var/mob/M in world) + if(M.client) + if(M.client.midis) + M << uploaded_sound + else + usr << "You already used up your jukebox monies this round!" + del(uploaded_sound) + + +/client/proc/play_local_sound(S as sound) + set category = "Fun" + set name = "Play Local Sound" + + if(!src.authenticated || !src.holder) + src << "Only administrators may use this command." + return + + if(src.holder.rank == "Game Master" || src.holder.rank == "Senior Game Admin" || src.holder.rank == "Game Admin" || src.holder.rank == "Secondary Game Admin") + log_admin("[key_name(src)] played a local sound [S]") + message_admins("[key_name_admin(src)] played a local sound [S]", 1) + playsound(get_turf_loc(src.mob), S, 50, 0, 0) + return + + +/* +/client/proc/cuban_pete() + set category = "Fun" + set name = "Cuban Pete Time" + + message_admins("[key_name_admin(usr)] has declared Cuban Pete Time!", 1) + for(var/mob/M in world) + if(M.client) + if(M.client.midis) + M << 'cubanpetetime.ogg' + + for(var/mob/living/carbon/human/CP in world) + if(CP.real_name=="Cuban Pete" && CP.key!="Rosham") + CP << "Your body can't contain the rhumba beat" + CP.gib(1) + + +/client/proc/bananaphone() + set category = "Fun" + set name = "Banana Phone" + + message_admins("[key_name_admin(usr)] has activated Banana Phone!", 1) + for(var/mob/M in world) + if(M.client) + if(M.client.midis) + M << 'bananaphone.ogg' + + +client/proc/space_asshole() + set category = "Fun" + set name = "Space Asshole" + + message_admins("[key_name_admin(usr)] has played the Space Asshole Hymn.", 1) + for(var/mob/M in world) + if(M.client) + if(M.client.midis) + M << 'space_asshole.ogg' + + +client/proc/honk_theme() + set category = "Fun" + set name = "Honk" + + message_admins("[key_name_admin(usr)] has creeped everyone out with Blackest Honks.", 1) + for(var/mob/M in world) + if(M.client) + if(M.client.midis) + M << 'honk_theme.ogg'*/ diff --git a/tgstation.dme b/tgstation.dme index a5f287c7849..dbba89ceae0 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -80,6 +80,8 @@ #define FILE_DIR "code/js" #define FILE_DIR "code/modules" #define FILE_DIR "code/modules/admin" +#define FILE_DIR "code/modules/admin/new" +#define FILE_DIR "code/modules/admin/new/verbs" #define FILE_DIR "code/modules/admin/verbs" #define FILE_DIR "code/modules/assembly" #define FILE_DIR "code/modules/chemical" @@ -174,7 +176,6 @@ #define FILE_DIR "icons/vending_icons" #define FILE_DIR "interface" #define FILE_DIR "maps" -#define FILE_DIR "maps/backup" #define FILE_DIR "sound" #define FILE_DIR "sound/AI" #define FILE_DIR "sound/ambience"