mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 19:44:58 +01:00
Does the rest of the if()'s/ else's
This commit is contained in:
+270
-135
@@ -135,7 +135,8 @@
|
||||
log_admin("[key_name(usr)] failed to create a shadowling.")
|
||||
|
||||
else if(href_list["forceevent"])
|
||||
if(!check_rights(R_FUN)) return
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
var/datum/round_event_control/E = locate(href_list["forceevent"]) in SSevent.control
|
||||
if(E)
|
||||
var/datum/round_event/event = E.runEvent()
|
||||
@@ -245,7 +246,8 @@
|
||||
edit_rights_topic(href_list)
|
||||
|
||||
else if(href_list["call_shuttle"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
|
||||
switch(href_list["call_shuttle"])
|
||||
@@ -273,7 +275,8 @@
|
||||
href_list["secrets"] = "check_antagonist"
|
||||
|
||||
else if(href_list["edit_shuttle_time"])
|
||||
if(!check_rights(R_SERVER)) return
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
var/timer = input("Enter new shuttle duration (seconds):","Edit Shuttle Timeleft", SSshuttle.emergency.timeLeft() ) as num
|
||||
SSshuttle.emergency.setTimer(timer*10)
|
||||
@@ -283,7 +286,8 @@
|
||||
href_list["secrets"] = "check_antagonist"
|
||||
|
||||
else if(href_list["toggle_continuous"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(!config.continuous[ticker.mode.config_tag])
|
||||
config.continuous[ticker.mode.config_tag] = 1
|
||||
@@ -294,7 +298,8 @@
|
||||
check_antagonists()
|
||||
|
||||
else if(href_list["toggle_midround_antag"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(!config.midround_antag[ticker.mode.config_tag])
|
||||
config.midround_antag[ticker.mode.config_tag] = 1
|
||||
@@ -305,7 +310,8 @@
|
||||
check_antagonists()
|
||||
|
||||
else if(href_list["alter_midround_time_limit"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/timer = input("Enter new maximum time",, config.midround_antag_time_check ) as num
|
||||
if(timer)
|
||||
@@ -315,7 +321,8 @@
|
||||
check_antagonists()
|
||||
|
||||
else if(href_list["alter_midround_life_limit"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/ratio = input("Enter new life ratio",, config.midround_antag_life_check*100) as num
|
||||
if(ratio)
|
||||
@@ -325,7 +332,8 @@
|
||||
check_antagonists()
|
||||
|
||||
else if(href_list["toggle_noncontinuous_behavior"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(!ticker.mode.round_ends_with_antag_death)
|
||||
ticker.mode.round_ends_with_antag_death = 1
|
||||
@@ -336,7 +344,8 @@
|
||||
check_antagonists()
|
||||
|
||||
else if(href_list["delay_round_end"])
|
||||
if(!check_rights(R_SERVER)) return
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
ticker.delay_end = !ticker.delay_end
|
||||
log_admin("[key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].")
|
||||
@@ -344,7 +353,8 @@
|
||||
href_list["secrets"] = "check_antagonist"
|
||||
|
||||
else if(href_list["end_round"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] is considering ending the round.</span>")
|
||||
if(alert(usr, "This will end the round, are you SURE you want to do this?", "Confirmation", "Yes", "No") == "Yes")
|
||||
@@ -358,7 +368,8 @@
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] decided against ending the round.</span>")
|
||||
|
||||
else if(href_list["simplemake"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
|
||||
var/mob/M = locate(href_list["mob"])
|
||||
if(!ismob(M))
|
||||
@@ -367,42 +378,69 @@
|
||||
|
||||
var/delmob = 0
|
||||
switch(alert("Delete old mob?","Message","Yes","No","Cancel"))
|
||||
if("Cancel") return
|
||||
if("Yes") delmob = 1
|
||||
if("Cancel")
|
||||
return
|
||||
if("Yes")
|
||||
delmob = 1
|
||||
|
||||
log_admin("[key_name(usr)] has used rudimentary transformation on [key_name(M)]. Transforming to [href_list["simplemake"]]; deletemob=[delmob]")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has used rudimentary transformation on [key_name_admin(M)]. Transforming to [href_list["simplemake"]]; deletemob=[delmob]</span>")
|
||||
|
||||
switch(href_list["simplemake"])
|
||||
if("observer") M.change_mob_type( /mob/dead/observer , null, null, delmob )
|
||||
if("drone") M.change_mob_type( /mob/living/carbon/alien/humanoid/drone , null, null, delmob )
|
||||
if("hunter") M.change_mob_type( /mob/living/carbon/alien/humanoid/hunter , null, null, delmob )
|
||||
if("queen") M.change_mob_type( /mob/living/carbon/alien/humanoid/royal/queen , null, null, delmob )
|
||||
if("praetorian") M.change_mob_type( /mob/living/carbon/alien/humanoid/royal/praetorian , null, null, delmob )
|
||||
if("sentinel") M.change_mob_type( /mob/living/carbon/alien/humanoid/sentinel , null, null, delmob )
|
||||
if("larva") M.change_mob_type( /mob/living/carbon/alien/larva , null, null, delmob )
|
||||
if("human") M.change_mob_type( /mob/living/carbon/human , null, null, delmob )
|
||||
if("slime") M.change_mob_type( /mob/living/simple_animal/slime , null, null, delmob )
|
||||
if("monkey") M.change_mob_type( /mob/living/carbon/monkey , null, null, delmob )
|
||||
if("robot") M.change_mob_type( /mob/living/silicon/robot , null, null, delmob )
|
||||
if("cat") M.change_mob_type( /mob/living/simple_animal/pet/cat , null, null, delmob )
|
||||
if("runtime") M.change_mob_type( /mob/living/simple_animal/pet/cat/Runtime , null, null, delmob )
|
||||
if("corgi") M.change_mob_type( /mob/living/simple_animal/pet/dog/corgi , null, null, delmob )
|
||||
if("ian") M.change_mob_type( /mob/living/simple_animal/pet/dog/corgi/Ian , null, null, delmob )
|
||||
if("pug") M.change_mob_type( /mob/living/simple_animal/pet/dog/pug , null, null, delmob )
|
||||
if("crab") M.change_mob_type( /mob/living/simple_animal/crab , null, null, delmob )
|
||||
if("coffee") M.change_mob_type( /mob/living/simple_animal/crab/Coffee , null, null, delmob )
|
||||
if("parrot") M.change_mob_type( /mob/living/simple_animal/parrot , null, null, delmob )
|
||||
if("polyparrot") M.change_mob_type( /mob/living/simple_animal/parrot/Poly , null, null, delmob )
|
||||
if("constructarmored") M.change_mob_type( /mob/living/simple_animal/hostile/construct/armored , null, null, delmob )
|
||||
if("constructbuilder") M.change_mob_type( /mob/living/simple_animal/hostile/construct/builder , null, null, delmob )
|
||||
if("constructwraith") M.change_mob_type( /mob/living/simple_animal/hostile/construct/wraith , null, null, delmob )
|
||||
if("shade") M.change_mob_type( /mob/living/simple_animal/shade , null, null, delmob )
|
||||
if("observer")
|
||||
M.change_mob_type( /mob/dead/observer , null, null, delmob )
|
||||
if("drone")
|
||||
M.change_mob_type( /mob/living/carbon/alien/humanoid/drone , null, null, delmob )
|
||||
if("hunter")
|
||||
M.change_mob_type( /mob/living/carbon/alien/humanoid/hunter , null, null, delmob )
|
||||
if("queen")
|
||||
M.change_mob_type( /mob/living/carbon/alien/humanoid/royal/queen , null, null, delmob )
|
||||
if("praetorian")
|
||||
M.change_mob_type( /mob/living/carbon/alien/humanoid/royal/praetorian , null, null, delmob )
|
||||
if("sentinel")
|
||||
M.change_mob_type( /mob/living/carbon/alien/humanoid/sentinel , null, null, delmob )
|
||||
if("larva")
|
||||
M.change_mob_type( /mob/living/carbon/alien/larva , null, null, delmob )
|
||||
if("human")
|
||||
M.change_mob_type( /mob/living/carbon/human , null, null, delmob )
|
||||
if("slime")
|
||||
M.change_mob_type( /mob/living/simple_animal/slime , null, null, delmob )
|
||||
if("monkey")
|
||||
M.change_mob_type( /mob/living/carbon/monkey , null, null, delmob )
|
||||
if("robot")
|
||||
M.change_mob_type( /mob/living/silicon/robot , null, null, delmob )
|
||||
if("cat")
|
||||
M.change_mob_type( /mob/living/simple_animal/pet/cat , null, null, delmob )
|
||||
if("runtime")
|
||||
M.change_mob_type( /mob/living/simple_animal/pet/cat/Runtime , null, null, delmob )
|
||||
if("corgi")
|
||||
M.change_mob_type( /mob/living/simple_animal/pet/dog/corgi , null, null, delmob )
|
||||
if("ian")
|
||||
M.change_mob_type( /mob/living/simple_animal/pet/dog/corgi/Ian , null, null, delmob )
|
||||
if("pug")
|
||||
M.change_mob_type( /mob/living/simple_animal/pet/dog/pug , null, null, delmob )
|
||||
if("crab")
|
||||
M.change_mob_type( /mob/living/simple_animal/crab , null, null, delmob )
|
||||
if("coffee")
|
||||
M.change_mob_type( /mob/living/simple_animal/crab/Coffee , null, null, delmob )
|
||||
if("parrot")
|
||||
M.change_mob_type( /mob/living/simple_animal/parrot , null, null, delmob )
|
||||
if("polyparrot")
|
||||
M.change_mob_type( /mob/living/simple_animal/parrot/Poly , null, null, delmob )
|
||||
if("constructarmored")
|
||||
M.change_mob_type( /mob/living/simple_animal/hostile/construct/armored , null, null, delmob )
|
||||
if("constructbuilder")
|
||||
M.change_mob_type( /mob/living/simple_animal/hostile/construct/builder , null, null, delmob )
|
||||
if("constructwraith")
|
||||
M.change_mob_type( /mob/living/simple_animal/hostile/construct/wraith , null, null, delmob )
|
||||
if("shade")
|
||||
M.change_mob_type( /mob/living/simple_animal/shade , null, null, delmob )
|
||||
|
||||
|
||||
/////////////////////////////////////new ban stuff
|
||||
else if(href_list["unbanf"])
|
||||
if(!check_rights(R_BAN)) return
|
||||
if(!check_rights(R_BAN))
|
||||
return
|
||||
|
||||
var/banfolder = href_list["unbanf"]
|
||||
Banlist.cd = "/base/[banfolder]"
|
||||
@@ -415,7 +453,8 @@
|
||||
unbanpanel()
|
||||
|
||||
else if(href_list["unbane"])
|
||||
if(!check_rights(R_BAN)) return
|
||||
if(!check_rights(R_BAN))
|
||||
return
|
||||
|
||||
UpdateTime()
|
||||
var/reason
|
||||
@@ -439,16 +478,19 @@
|
||||
if(minutes > CMinutes)
|
||||
mins = minutes - CMinutes
|
||||
mins = input(usr,"How long (in minutes)? (Default: 1440)","Ban time",mins ? mins : 1440) as num|null
|
||||
if(!mins) return
|
||||
if(!mins)
|
||||
return
|
||||
minutes = CMinutes + mins
|
||||
duration = GetExp(minutes)
|
||||
reason = input(usr,"Please State Reason","Reason",reason2) as message
|
||||
if(!reason) return
|
||||
if(!reason)
|
||||
return
|
||||
if("No")
|
||||
temp = 0
|
||||
duration = "Perma"
|
||||
reason = input(usr,"Please State Reason","Reason",reason2) as message
|
||||
if(!reason) return
|
||||
if(!reason)
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]")
|
||||
ban_unban_log_save("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]")
|
||||
@@ -535,9 +577,11 @@
|
||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
jobs += "<tr align='center' bgcolor='ccccff'><th colspan='[length(command_positions)]'><a href='?src=\ref[src];jobban3=commanddept;jobban4=\ref[M]'>Command Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in command_positions)
|
||||
if(!jobPos) continue
|
||||
if(!jobPos)
|
||||
continue
|
||||
var/datum/job/job = SSjob.GetJob(jobPos)
|
||||
if(!job) continue
|
||||
if(!job)
|
||||
continue
|
||||
|
||||
if(jobban_isbanned(M, job.title))
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=[job.title];jobban4=\ref[M]'><font color=red>[replacetext(job.title, " ", " ")]</font></a></td>"
|
||||
@@ -556,9 +600,11 @@
|
||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
jobs += "<tr bgcolor='ffddf0'><th colspan='[length(security_positions)]'><a href='?src=\ref[src];jobban3=securitydept;jobban4=\ref[M]'>Security Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in security_positions)
|
||||
if(!jobPos) continue
|
||||
if(!jobPos)
|
||||
continue
|
||||
var/datum/job/job = SSjob.GetJob(jobPos)
|
||||
if(!job) continue
|
||||
if(!job)
|
||||
continue
|
||||
|
||||
if(jobban_isbanned(M, job.title))
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=[job.title];jobban4=\ref[M]'><font color=red>[replacetext(job.title, " ", " ")]</font></a></td>"
|
||||
@@ -577,9 +623,11 @@
|
||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
jobs += "<tr bgcolor='fff5cc'><th colspan='[length(engineering_positions)]'><a href='?src=\ref[src];jobban3=engineeringdept;jobban4=\ref[M]'>Engineering Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in engineering_positions)
|
||||
if(!jobPos) continue
|
||||
if(!jobPos)
|
||||
continue
|
||||
var/datum/job/job = SSjob.GetJob(jobPos)
|
||||
if(!job) continue
|
||||
if(!job)
|
||||
continue
|
||||
|
||||
if(jobban_isbanned(M, job.title))
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=[job.title];jobban4=\ref[M]'><font color=red>[replacetext(job.title, " ", " ")]</font></a></td>"
|
||||
@@ -598,9 +646,11 @@
|
||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
jobs += "<tr bgcolor='ffeef0'><th colspan='[length(medical_positions)]'><a href='?src=\ref[src];jobban3=medicaldept;jobban4=\ref[M]'>Medical Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in medical_positions)
|
||||
if(!jobPos) continue
|
||||
if(!jobPos)
|
||||
continue
|
||||
var/datum/job/job = SSjob.GetJob(jobPos)
|
||||
if(!job) continue
|
||||
if(!job)
|
||||
continue
|
||||
|
||||
if(jobban_isbanned(M, job.title))
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=[job.title];jobban4=\ref[M]'><font color=red>[replacetext(job.title, " ", " ")]</font></a></td>"
|
||||
@@ -619,9 +669,11 @@
|
||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
jobs += "<tr bgcolor='e79fff'><th colspan='[length(science_positions)]'><a href='?src=\ref[src];jobban3=sciencedept;jobban4=\ref[M]'>Science Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in science_positions)
|
||||
if(!jobPos) continue
|
||||
if(!jobPos)
|
||||
continue
|
||||
var/datum/job/job = SSjob.GetJob(jobPos)
|
||||
if(!job) continue
|
||||
if(!job)
|
||||
continue
|
||||
|
||||
if(jobban_isbanned(M, job.title))
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=[job.title];jobban4=\ref[M]'><font color=red>[replacetext(job.title, " ", " ")]</font></a></td>"
|
||||
@@ -640,9 +692,11 @@
|
||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
jobs += "<tr bgcolor='DDAA55'><th colspan='[length(supply_positions)]'><a href='?src=\ref[src];jobban3=supplydept;jobban4=\ref[M]'>Supply Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in supply_positions)
|
||||
if(!jobPos) continue
|
||||
if(!jobPos)
|
||||
continue
|
||||
var/datum/job/job = SSjob.GetJob(jobPos)
|
||||
if(!job) continue
|
||||
if(!job)
|
||||
continue
|
||||
|
||||
if(jobban_isbanned(M, job.title))
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=[job.title];jobban4=\ref[M]'><font color=red>[replacetext(job.title, " ", " ")]</font></a></td>"
|
||||
@@ -661,9 +715,11 @@
|
||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
jobs += "<tr bgcolor='dddddd'><th colspan='[length(civilian_positions)]'><a href='?src=\ref[src];jobban3=civiliandept;jobban4=\ref[M]'>Civilian Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in civilian_positions)
|
||||
if(!jobPos) continue
|
||||
if(!jobPos)
|
||||
continue
|
||||
var/datum/job/job = SSjob.GetJob(jobPos)
|
||||
if(!job) continue
|
||||
if(!job)
|
||||
continue
|
||||
|
||||
if(jobban_isbanned(M, job.title))
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=[job.title];jobban4=\ref[M]'><font color=red>[replacetext(job.title, " ", " ")]</font></a></td>"
|
||||
@@ -682,9 +738,11 @@
|
||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
jobs += "<tr bgcolor='ccffcc'><th colspan='[length(nonhuman_positions)]'><a href='?src=\ref[src];jobban3=nonhumandept;jobban4=\ref[M]'>Non-human Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in nonhuman_positions)
|
||||
if(!jobPos) continue
|
||||
if(!jobPos)
|
||||
continue
|
||||
var/datum/job/job = SSjob.GetJob(jobPos)
|
||||
if(!job) continue
|
||||
if(!job)
|
||||
continue
|
||||
|
||||
if(jobban_isbanned(M, job.title))
|
||||
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=[job.title];jobban4=\ref[M]'><font color=red>[replacetext(job.title, " ", " ")]</font></a></td>"
|
||||
@@ -808,7 +866,8 @@
|
||||
|
||||
//JOBBAN'S INNARDS
|
||||
else if(href_list["jobban3"])
|
||||
if(!check_rights(R_BAN)) return
|
||||
if(!check_rights(R_BAN))
|
||||
return
|
||||
|
||||
var/mob/M = locate(href_list["jobban4"])
|
||||
if(!ismob(M))
|
||||
@@ -824,51 +883,67 @@
|
||||
switch(href_list["jobban3"])
|
||||
if("commanddept")
|
||||
for(var/jobPos in command_positions)
|
||||
if(!jobPos) continue
|
||||
if(!jobPos)
|
||||
continue
|
||||
var/datum/job/temp = SSjob.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
if(!temp)
|
||||
continue
|
||||
joblist += temp.title
|
||||
if("securitydept")
|
||||
for(var/jobPos in security_positions)
|
||||
if(!jobPos) continue
|
||||
if(!jobPos)
|
||||
continue
|
||||
var/datum/job/temp = SSjob.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
if(!temp)
|
||||
continue
|
||||
joblist += temp.title
|
||||
if("engineeringdept")
|
||||
for(var/jobPos in engineering_positions)
|
||||
if(!jobPos) continue
|
||||
if(!jobPos)
|
||||
continue
|
||||
var/datum/job/temp = SSjob.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
if(!temp)
|
||||
continue
|
||||
joblist += temp.title
|
||||
if("medicaldept")
|
||||
for(var/jobPos in medical_positions)
|
||||
if(!jobPos) continue
|
||||
if(!jobPos)
|
||||
continue
|
||||
var/datum/job/temp = SSjob.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
if(!temp)
|
||||
continue
|
||||
joblist += temp.title
|
||||
if("sciencedept")
|
||||
for(var/jobPos in science_positions)
|
||||
if(!jobPos) continue
|
||||
if(!jobPos)
|
||||
continue
|
||||
var/datum/job/temp = SSjob.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
if(!temp)
|
||||
continue
|
||||
joblist += temp.title
|
||||
if("supplydept")
|
||||
for(var/jobPos in supply_positions)
|
||||
if(!jobPos) continue
|
||||
if(!jobPos)
|
||||
continue
|
||||
var/datum/job/temp = SSjob.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
if(!temp)
|
||||
continue
|
||||
joblist += temp.title
|
||||
if("civiliandept")
|
||||
for(var/jobPos in civilian_positions)
|
||||
if(!jobPos) continue
|
||||
if(!jobPos)
|
||||
continue
|
||||
var/datum/job/temp = SSjob.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
if(!temp)
|
||||
continue
|
||||
joblist += temp.title
|
||||
if("nonhumandept")
|
||||
for(var/jobPos in nonhuman_positions)
|
||||
if(!jobPos) continue
|
||||
if(!jobPos)
|
||||
continue
|
||||
var/datum/job/temp = SSjob.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
if(!temp)
|
||||
continue
|
||||
joblist += temp.title
|
||||
if("ghostroles")
|
||||
joblist += list("pAI", "posibrain", "drone", "deathsquad")
|
||||
@@ -920,8 +995,10 @@
|
||||
feedback_inc("ban_job",1)
|
||||
DB_ban_record(BANTYPE_JOB_PERMA, M, -1, reason, job)
|
||||
feedback_add_details("ban_job","- [job]")
|
||||
if(!msg) msg = job
|
||||
else msg += ", [job]"
|
||||
if(!msg)
|
||||
msg = job
|
||||
else
|
||||
msg += ", [job]"
|
||||
add_note(M.ckey, "Banned from [msg] - [reason]", null, usr.ckey, 0)
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] banned [key_name_admin(M)] from [msg]</span>")
|
||||
M << "<span class='boldannounce'><BIG>You have been jobbanned by [usr.client.ckey] from: [msg].</BIG></span>"
|
||||
@@ -938,7 +1015,8 @@
|
||||
var/msg
|
||||
for(var/job in joblist)
|
||||
var/reason = jobban_isbanned(M, job)
|
||||
if(!reason) continue //skip if it isn't jobbanned anyway
|
||||
if(!reason)
|
||||
continue //skip if it isn't jobbanned anyway
|
||||
switch(alert("Job: '[job]' Reason: '[reason]' Un-jobban?","Please Confirm","Yes","No"))
|
||||
if("Yes")
|
||||
ban_unban_log_save("[key_name(usr)] unjobbanned [key_name(M)] from [job]")
|
||||
@@ -946,8 +1024,10 @@
|
||||
DB_ban_unban(M.ckey, BANTYPE_ANY_JOB, job)
|
||||
feedback_inc("ban_job_unban",1)
|
||||
feedback_add_details("ban_job_unban","- [job]")
|
||||
if(!msg) msg = job
|
||||
else msg += ", [job]"
|
||||
if(!msg)
|
||||
msg = job
|
||||
else
|
||||
msg += ", [job]"
|
||||
else
|
||||
continue
|
||||
if(msg)
|
||||
@@ -1014,12 +1094,15 @@
|
||||
usr << browse(edit_log,"window=noteedits")
|
||||
|
||||
else if(href_list["newban"])
|
||||
if(!check_rights(R_BAN)) return
|
||||
if(!check_rights(R_BAN))
|
||||
return
|
||||
|
||||
var/mob/M = locate(href_list["newban"])
|
||||
if(!ismob(M)) return
|
||||
if(!ismob(M))
|
||||
return
|
||||
|
||||
if(M.client && M.client.holder) return //admins cannot be banned. Even if they could, the ban doesn't affect them anyway
|
||||
if(M.client && M.client.holder)
|
||||
return //admins cannot be banned. Even if they could, the ban doesn't affect them anyway
|
||||
|
||||
switch(alert("Temporary Ban?",,"Yes","No", "Cancel"))
|
||||
if("Yes")
|
||||
@@ -1050,7 +1133,8 @@
|
||||
if(!reason)
|
||||
return
|
||||
switch(alert(usr,"IP ban?",,"Yes","No","Cancel"))
|
||||
if("Cancel") return
|
||||
if("Cancel")
|
||||
return
|
||||
if("Yes")
|
||||
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0, M.lastKnownIP)
|
||||
if("No")
|
||||
@@ -1115,11 +1199,13 @@
|
||||
usr << browse(edit_log,"window=watchedits")
|
||||
|
||||
else if(href_list["mute"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
cmd_admin_mute(href_list["mute"], text2num(href_list["mute_type"]))
|
||||
|
||||
else if(href_list["c_mode"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(ticker && ticker.mode)
|
||||
return alert(usr, "The game has already started.", null, null, null, null)
|
||||
@@ -1132,7 +1218,8 @@
|
||||
usr << browse(dat, "window=c_mode")
|
||||
|
||||
else if(href_list["f_secret"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(ticker && ticker.mode)
|
||||
return alert(usr, "The game has already started.", null, null, null, null)
|
||||
@@ -1146,7 +1233,8 @@
|
||||
usr << browse(dat, "window=f_secret")
|
||||
|
||||
else if(href_list["c_mode2"])
|
||||
if(!check_rights(R_ADMIN|R_SERVER)) return
|
||||
if(!check_rights(R_ADMIN|R_SERVER))
|
||||
return
|
||||
|
||||
if (ticker && ticker.mode)
|
||||
return alert(usr, "The game has already started.", null, null, null, null)
|
||||
@@ -1159,7 +1247,8 @@
|
||||
.(href, list("c_mode"=1))
|
||||
|
||||
else if(href_list["f_secret2"])
|
||||
if(!check_rights(R_ADMIN|R_SERVER)) return
|
||||
if(!check_rights(R_ADMIN|R_SERVER))
|
||||
return
|
||||
|
||||
if(ticker && ticker.mode)
|
||||
return alert(usr, "The game has already started.", null, null, null, null)
|
||||
@@ -1172,7 +1261,8 @@
|
||||
.(href, list("f_secret"=1))
|
||||
|
||||
else if(href_list["monkeyone"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["monkeyone"])
|
||||
if(!istype(H))
|
||||
@@ -1184,7 +1274,8 @@
|
||||
H.monkeyize()
|
||||
|
||||
else if(href_list["humanone"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/monkey/Mo = locate(href_list["humanone"])
|
||||
if(!istype(Mo))
|
||||
@@ -1196,7 +1287,8 @@
|
||||
Mo.humanize()
|
||||
|
||||
else if(href_list["corgione"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["corgione"])
|
||||
if(!istype(H))
|
||||
@@ -1209,21 +1301,24 @@
|
||||
|
||||
|
||||
else if(href_list["forcespeech"])
|
||||
if(!check_rights(R_FUN)) return
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
var/mob/M = locate(href_list["forcespeech"])
|
||||
if(!ismob(M))
|
||||
usr << "this can only be used on instances of type /mob"
|
||||
|
||||
var/speech = input("What will [key_name(M)] say?.", "Force speech", "")// Don't need to sanitize, since it does that in say(), we also trust our admins.
|
||||
if(!speech) return
|
||||
if(!speech)
|
||||
return
|
||||
M.say(speech)
|
||||
speech = sanitize(speech) // Nah, we don't trust them
|
||||
log_admin("[key_name(usr)] forced [key_name(M)] to say: [speech]")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] forced [key_name_admin(M)] to say: [speech]</span>")
|
||||
|
||||
else if(href_list["sendtoprison"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/mob/M = locate(href_list["sendtoprison"])
|
||||
if(!ismob(M))
|
||||
@@ -1267,7 +1362,8 @@
|
||||
qdel(M)
|
||||
|
||||
else if(href_list["tdome1"])
|
||||
if(!check_rights(R_FUN)) return
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
|
||||
return
|
||||
@@ -1296,7 +1392,8 @@
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 1)")
|
||||
|
||||
else if(href_list["tdome2"])
|
||||
if(!check_rights(R_FUN)) return
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
|
||||
return
|
||||
@@ -1325,7 +1422,8 @@
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 2)")
|
||||
|
||||
else if(href_list["tdomeadmin"])
|
||||
if(!check_rights(R_FUN)) return
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
|
||||
return
|
||||
@@ -1347,7 +1445,8 @@
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Admin.)")
|
||||
|
||||
else if(href_list["tdomeobserve"])
|
||||
if(!check_rights(R_FUN)) return
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
|
||||
return
|
||||
@@ -1380,7 +1479,8 @@
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Observer.)")
|
||||
|
||||
else if(href_list["revive"])
|
||||
if(!check_rights(R_REJUVINATE)) return
|
||||
if(!check_rights(R_REJUVINATE))
|
||||
return
|
||||
|
||||
var/mob/living/L = locate(href_list["revive"])
|
||||
if(!istype(L))
|
||||
@@ -1392,7 +1492,8 @@
|
||||
log_admin("[key_name(usr)] healed / Revived [key_name(L)]")
|
||||
|
||||
else if(href_list["makeai"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makeai"])
|
||||
if(!istype(H))
|
||||
@@ -1404,7 +1505,8 @@
|
||||
H.AIize()
|
||||
|
||||
else if(href_list["makealien"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makealien"])
|
||||
if(!istype(H))
|
||||
@@ -1414,7 +1516,8 @@
|
||||
usr.client.cmd_admin_alienize(H)
|
||||
|
||||
else if(href_list["makeslime"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makeslime"])
|
||||
if(!istype(H))
|
||||
@@ -1424,7 +1527,8 @@
|
||||
usr.client.cmd_admin_slimeize(H)
|
||||
|
||||
else if(href_list["makeblob"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makeblob"])
|
||||
if(!istype(H))
|
||||
@@ -1435,7 +1539,8 @@
|
||||
|
||||
|
||||
else if(href_list["makerobot"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makerobot"])
|
||||
if(!istype(H))
|
||||
@@ -1445,7 +1550,8 @@
|
||||
usr.client.cmd_admin_robotize(H)
|
||||
|
||||
else if(href_list["makeanimal"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
|
||||
var/mob/M = locate(href_list["makeanimal"])
|
||||
if(istype(M, /mob/new_player))
|
||||
@@ -1469,24 +1575,28 @@
|
||||
show_player_panel(M)
|
||||
|
||||
else if(href_list["adminplayerobservefollow"])
|
||||
if(!isobserver(usr) && !check_rights(R_ADMIN)) return
|
||||
if(!isobserver(usr) && !check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/atom/movable/AM = locate(href_list["adminplayerobservefollow"])
|
||||
|
||||
var/client/C = usr.client
|
||||
if(!isobserver(usr)) C.admin_ghost()
|
||||
if(!isobserver(usr))
|
||||
C.admin_ghost()
|
||||
var/mob/dead/observer/A = C.mob
|
||||
A.ManualFollow(AM)
|
||||
|
||||
else if(href_list["adminplayerobservecoodjump"])
|
||||
if(!isobserver(usr) && !check_rights(R_ADMIN)) return
|
||||
if(!isobserver(usr) && !check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/x = text2num(href_list["X"])
|
||||
var/y = text2num(href_list["Y"])
|
||||
var/z = text2num(href_list["Z"])
|
||||
|
||||
var/client/C = usr.client
|
||||
if(!isobserver(usr)) C.admin_ghost()
|
||||
if(!isobserver(usr))
|
||||
C.admin_ghost()
|
||||
sleep(2)
|
||||
C.jumptocoord(x,y,z)
|
||||
|
||||
@@ -1523,9 +1633,12 @@
|
||||
var/mob/living/L = M
|
||||
var/status
|
||||
switch (M.stat)
|
||||
if (0) status = "Alive"
|
||||
if (1) status = "<font color='orange'><b>Unconscious</b></font>"
|
||||
if (2) status = "<font color='red'><b>Dead</b></font>"
|
||||
if (0)
|
||||
status = "Alive"
|
||||
if (1)
|
||||
status = "<font color='orange'><b>Unconscious</b></font>"
|
||||
if (2)
|
||||
status = "<font color='red'><b>Dead</b></font>"
|
||||
health_description = "Status = [status]"
|
||||
health_description += "<BR>Oxy: [L.getOxyLoss()] - Tox: [L.getToxLoss()] - Fire: [L.getFireLoss()] - Brute: [L.getBruteLoss()] - Clone: [L.getCloneLoss()] - Brain: [L.getBrainLoss()] - Stamina: [L.getStaminaLoss()]"
|
||||
else
|
||||
@@ -1533,8 +1646,10 @@
|
||||
|
||||
//Gender
|
||||
switch(M.gender)
|
||||
if(MALE,FEMALE) gender_description = "[M.gender]"
|
||||
else gender_description = "<font color='red'><b>[M.gender]</b></font>"
|
||||
if(MALE,FEMALE)
|
||||
gender_description = "[M.gender]"
|
||||
else
|
||||
gender_description = "<font color='red'><b>[M.gender]</b></font>"
|
||||
|
||||
src.owner << "<b>Info about [M.name]:</b> "
|
||||
src.owner << "Mob type = [M.type]; Gender = [gender_description] Damage = [health_description]"
|
||||
@@ -1544,7 +1659,8 @@
|
||||
src.owner << "(<a href='?priv_msg=[M.ckey]'>PM</a>) (<A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[M]'>VV</A>) (<A HREF='?src=\ref[src];subtlemessage=\ref[M]'>SM</A>) (<A HREF='?src=\ref[src];adminplayerobservefollow=\ref[M]'>FLW</A>) (<A HREF='?src=\ref[src];secrets=check_antagonist'>CA</A>)"
|
||||
|
||||
else if(href_list["addjobslot"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/Add = href_list["addjobslot"]
|
||||
|
||||
@@ -1556,7 +1672,8 @@
|
||||
src.manage_free_slots()
|
||||
|
||||
else if(href_list["removejobslot"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/Remove = href_list["removejobslot"]
|
||||
|
||||
@@ -1568,7 +1685,8 @@
|
||||
src.manage_free_slots()
|
||||
|
||||
else if(href_list["unlimitjobslot"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/Unlimit = href_list["unlimitjobslot"]
|
||||
|
||||
@@ -1580,7 +1698,8 @@
|
||||
src.manage_free_slots()
|
||||
|
||||
else if(href_list["limitjobslot"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/Limit = href_list["limitjobslot"]
|
||||
|
||||
@@ -1593,7 +1712,8 @@
|
||||
|
||||
|
||||
else if(href_list["adminspawncookie"])
|
||||
if(!check_rights(R_ADMIN|R_FUN)) return
|
||||
if(!check_rights(R_ADMIN|R_FUN))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["adminspawncookie"])
|
||||
if(!ishuman(H))
|
||||
@@ -1631,7 +1751,8 @@
|
||||
return
|
||||
|
||||
var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from Centcom", "")
|
||||
if(!input) return
|
||||
if(!input)
|
||||
return
|
||||
|
||||
src.owner << "You sent [input] to [H] via a secure channel."
|
||||
log_admin("[src.owner] replied to [key_name(H)]'s Centcom message with the message [input].")
|
||||
@@ -1648,7 +1769,8 @@
|
||||
return
|
||||
|
||||
var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from The Syndicate", "")
|
||||
if(!input) return
|
||||
if(!input)
|
||||
return
|
||||
|
||||
src.owner << "You sent [input] to [H] via a secure channel."
|
||||
log_admin("[src.owner] replied to [key_name(H)]'s Syndicate message with the message [input].")
|
||||
@@ -1656,38 +1778,45 @@
|
||||
H << "You hear something crackle in your ears for a moment before a voice speaks. \"Please stand by for a message from your benefactor. Message as follows, agent. [input]. Message ends.\""
|
||||
|
||||
else if(href_list["jumpto"])
|
||||
if(!isobserver(usr) && !check_rights(R_ADMIN)) return
|
||||
if(!isobserver(usr) && !check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/mob/M = locate(href_list["jumpto"])
|
||||
usr.client.jumptomob(M)
|
||||
|
||||
else if(href_list["getmob"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes") return
|
||||
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes")
|
||||
return
|
||||
var/mob/M = locate(href_list["getmob"])
|
||||
usr.client.Getmob(M)
|
||||
|
||||
else if(href_list["sendmob"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/mob/M = locate(href_list["sendmob"])
|
||||
usr.client.sendmob(M)
|
||||
|
||||
else if(href_list["narrateto"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/mob/M = locate(href_list["narrateto"])
|
||||
usr.client.cmd_admin_direct_narrate(M)
|
||||
|
||||
else if(href_list["subtlemessage"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/mob/M = locate(href_list["subtlemessage"])
|
||||
usr.client.cmd_admin_subtle_message(M)
|
||||
|
||||
else if(href_list["traitor"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(!ticker || !ticker.mode)
|
||||
alert("The game hasn't started yet!")
|
||||
@@ -1700,27 +1829,33 @@
|
||||
show_traitor_panel(M)
|
||||
|
||||
else if(href_list["create_object"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
return create_object(usr)
|
||||
|
||||
else if(href_list["quick_create_object"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
return quick_create_object(usr)
|
||||
|
||||
else if(href_list["create_turf"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
return create_turf(usr)
|
||||
|
||||
else if(href_list["create_mob"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
return create_mob(usr)
|
||||
|
||||
else if(href_list["dupe_marked_datum"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
return DuplicateObject(marked_datum, perfectcopy=1, newloc=get_turf(usr))
|
||||
|
||||
else if(href_list["object_list"]) //this is the laggiest thing ever
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
|
||||
var/atom/loc = usr.loc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user