April sync (#360)
* Maps and things no code/icons * helpers defines globalvars * Onclick world.dm orphaned_procs * subsystems Round vote and shuttle autocall done here too * datums * Game folder * Admin - chatter modules * clothing - mining * modular computers - zambies * client * mob level 1 * mob stage 2 + simple_animal * silicons n brains * mob stage 3 + Alien/Monkey * human mobs * icons updated * some sounds * emitter y u no commit * update tgstation.dme * compile fixes * travis fixes Also removes Fast digest mode, because reasons. * tweaks for travis Mentors are broke again Also fixes Sizeray guns * oxygen loss fix for vore code. * removes unused code * some code updates * bulk fixes * further fixes * outside things * whoops. * Maint bar ported * GLOBs.
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/client/C = locate(href_list["rejectadminhelp"]) in clients
|
||||
var/client/C = locate(href_list["rejectadminhelp"]) in GLOB.clients
|
||||
if(!C)
|
||||
return
|
||||
if (deltimer(C.adminhelptimerid))
|
||||
@@ -31,7 +31,7 @@
|
||||
if(world.time && spamcooldown > world.time)
|
||||
to_chat(usr, "Please wait [max(round((spamcooldown - world.time)*0.1, 0.1), 0)] seconds.")
|
||||
return
|
||||
var/client/C = locate(href_list["icissue"]) in clients
|
||||
var/client/C = locate(href_list["icissue"]) in GLOB.clients
|
||||
if(!C)
|
||||
return
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
if(world.time && spamcooldown > world.time)
|
||||
to_chat(usr, "Please wait [max(round((spamcooldown - world.time)*0.1, 0.1), 0)] seconds.")
|
||||
return
|
||||
var/client/C = locate(href_list["markedread"]) in clients
|
||||
var/client/C = locate(href_list["markedread"]) in GLOB.clients
|
||||
if(!C)
|
||||
return
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
stickyban(href_list["stickyban"],href_list)
|
||||
|
||||
else if(href_list["makeAntag"])
|
||||
if (!ticker.mode)
|
||||
if (!SSticker.mode)
|
||||
to_chat(usr, "<span class='danger'>Not until the round starts!</span>")
|
||||
return
|
||||
switch(href_list["makeAntag"])
|
||||
@@ -176,7 +176,7 @@
|
||||
else if(href_list["forceevent"])
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
var/datum/round_event_control/E = locate(href_list["forceevent"]) in SSevent.control
|
||||
var/datum/round_event_control/E = locate(href_list["forceevent"]) in SSevents.control
|
||||
if(E)
|
||||
var/datum/round_event/event = E.runEvent()
|
||||
if(event.announceWhen>0)
|
||||
@@ -257,7 +257,7 @@
|
||||
|
||||
var/mob/playermob
|
||||
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.ckey == banckey)
|
||||
playermob = M
|
||||
break
|
||||
@@ -327,24 +327,24 @@
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(!config.continuous[ticker.mode.config_tag])
|
||||
config.continuous[ticker.mode.config_tag] = 1
|
||||
if(!config.continuous[SSticker.mode.config_tag])
|
||||
config.continuous[SSticker.mode.config_tag] = 1
|
||||
else
|
||||
config.continuous[ticker.mode.config_tag] = 0
|
||||
config.continuous[SSticker.mode.config_tag] = 0
|
||||
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] toggled the round to [config.continuous[ticker.mode.config_tag] ? "continue if all antagonists die" : "end with the antagonists"].</span>")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] toggled the round to [config.continuous[SSticker.mode.config_tag] ? "continue if all antagonists die" : "end with the antagonists"].</span>")
|
||||
check_antagonists()
|
||||
|
||||
else if(href_list["toggle_midround_antag"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(!config.midround_antag[ticker.mode.config_tag])
|
||||
config.midround_antag[ticker.mode.config_tag] = 1
|
||||
if(!config.midround_antag[SSticker.mode.config_tag])
|
||||
config.midround_antag[SSticker.mode.config_tag] = 1
|
||||
else
|
||||
config.midround_antag[ticker.mode.config_tag] = 0
|
||||
config.midround_antag[SSticker.mode.config_tag] = 0
|
||||
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] toggled the round to [config.midround_antag[ticker.mode.config_tag] ? "use" : "skip"] the midround antag system.</span>")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] toggled the round to [config.midround_antag[SSticker.mode.config_tag] ? "use" : "skip"] the midround antag system.</span>")
|
||||
check_antagonists()
|
||||
|
||||
else if(href_list["alter_midround_time_limit"])
|
||||
@@ -373,21 +373,21 @@
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(!ticker.mode.round_ends_with_antag_death)
|
||||
ticker.mode.round_ends_with_antag_death = 1
|
||||
if(!SSticker.mode.round_ends_with_antag_death)
|
||||
SSticker.mode.round_ends_with_antag_death = 1
|
||||
else
|
||||
ticker.mode.round_ends_with_antag_death = 0
|
||||
SSticker.mode.round_ends_with_antag_death = 0
|
||||
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] edited the midround antagonist system to [ticker.mode.round_ends_with_antag_death ? "end the round" : "continue as extended"] upon failure.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] edited the midround antagonist system to [SSticker.mode.round_ends_with_antag_death ? "end the round" : "continue as extended"] upon failure.")
|
||||
check_antagonists()
|
||||
|
||||
else if(href_list["delay_round_end"])
|
||||
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"].")
|
||||
message_admins("<span class='adminnotice'>[key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].</span>")
|
||||
SSticker.delay_end = !SSticker.delay_end
|
||||
log_admin("[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].")
|
||||
message_admins("<span class='adminnotice'>[key_name(usr)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].</span>")
|
||||
href_list["secrets"] = "check_antagonist"
|
||||
|
||||
else if(href_list["end_round"])
|
||||
@@ -398,7 +398,7 @@
|
||||
if(alert(usr, "This will end the round, are you SURE you want to do this?", "Confirmation", "Yes", "No") == "Yes")
|
||||
if(alert(usr, "Final Confirmation: End the round NOW?", "Confirmation", "Yes", "No") == "Yes")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has ended the round.</span>")
|
||||
ticker.force_ending = 1 //Yeah there we go APC destroyed mission accomplished
|
||||
SSticker.force_ending = 1 //Yeah there we go APC destroyed mission accomplished
|
||||
return
|
||||
else
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] decided against ending the round.</span>")
|
||||
@@ -481,8 +481,8 @@
|
||||
return
|
||||
|
||||
var/banfolder = href_list["unbanf"]
|
||||
Banlist.cd = "/base/[banfolder]"
|
||||
var/key = Banlist["key"]
|
||||
GLOB.Banlist.cd = "/base/[banfolder]"
|
||||
var/key = GLOB.Banlist["key"]
|
||||
if(alert(usr, "Are you sure you want to unban [key]?", "Confirmation", "Yes", "No") == "Yes")
|
||||
if(RemoveBan(banfolder))
|
||||
unbanpanel()
|
||||
@@ -498,14 +498,14 @@
|
||||
var/reason
|
||||
|
||||
var/banfolder = href_list["unbane"]
|
||||
Banlist.cd = "/base/[banfolder]"
|
||||
var/reason2 = Banlist["reason"]
|
||||
var/temp = Banlist["temp"]
|
||||
GLOB.Banlist.cd = "/base/[banfolder]"
|
||||
var/reason2 = GLOB.Banlist["reason"]
|
||||
var/temp = GLOB.Banlist["temp"]
|
||||
|
||||
var/minutes = Banlist["minutes"]
|
||||
var/minutes = GLOB.Banlist["minutes"]
|
||||
|
||||
var/banned_key = Banlist["key"]
|
||||
Banlist.cd = "/base"
|
||||
var/banned_key = GLOB.Banlist["key"]
|
||||
GLOB.Banlist.cd = "/base"
|
||||
|
||||
var/duration
|
||||
|
||||
@@ -513,12 +513,12 @@
|
||||
if("Yes")
|
||||
temp = 1
|
||||
var/mins = 0
|
||||
if(minutes > CMinutes)
|
||||
mins = minutes - CMinutes
|
||||
if(minutes > GLOB.CMinutes)
|
||||
mins = minutes - GLOB.CMinutes
|
||||
mins = input(usr,"How long (in minutes)? (Default: 1440)","Ban time",mins ? mins : 1440) as num|null
|
||||
if(!mins)
|
||||
return
|
||||
minutes = CMinutes + mins
|
||||
minutes = GLOB.CMinutes + mins
|
||||
duration = GetExp(minutes)
|
||||
reason = input(usr,"Please State Reason.","Reason",reason2) as message|null
|
||||
if(!reason)
|
||||
@@ -533,12 +533,12 @@
|
||||
log_admin_private("[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]")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]</span>")
|
||||
Banlist.cd = "/base/[banfolder]"
|
||||
Banlist["reason"] << reason
|
||||
Banlist["temp"] << temp
|
||||
Banlist["minutes"] << minutes
|
||||
Banlist["bannedby"] << usr.ckey
|
||||
Banlist.cd = "/base"
|
||||
GLOB.Banlist.cd = "/base/[banfolder]"
|
||||
GLOB.Banlist["reason"] << reason
|
||||
GLOB.Banlist["temp"] << temp
|
||||
GLOB.Banlist["minutes"] << minutes
|
||||
GLOB.Banlist["bannedby"] << usr.ckey
|
||||
GLOB.Banlist.cd = "/base"
|
||||
feedback_inc("ban_edit",1)
|
||||
unbanpanel()
|
||||
|
||||
@@ -614,8 +614,8 @@
|
||||
//Regular jobs
|
||||
//Command (Blue)
|
||||
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
dat += "<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)
|
||||
dat += "<tr align='center' bgcolor='ccccff'><th colspan='[length(GLOB.command_positions)]'><a href='?src=\ref[src];jobban3=commanddept;jobban4=\ref[M]'>Command Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in GLOB.command_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
if(jobban_isbanned(M, jobPos))
|
||||
@@ -633,8 +633,8 @@
|
||||
//Security (Red)
|
||||
counter = 0
|
||||
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
dat += "<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)
|
||||
dat += "<tr bgcolor='ffddf0'><th colspan='[length(GLOB.security_positions)]'><a href='?src=\ref[src];jobban3=securitydept;jobban4=\ref[M]'>Security Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in GLOB.security_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
if(jobban_isbanned(M, jobPos))
|
||||
@@ -652,8 +652,8 @@
|
||||
//Engineering (Yellow)
|
||||
counter = 0
|
||||
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
dat += "<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)
|
||||
dat += "<tr bgcolor='fff5cc'><th colspan='[length(GLOB.engineering_positions)]'><a href='?src=\ref[src];jobban3=engineeringdept;jobban4=\ref[M]'>Engineering Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in GLOB.engineering_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
if(jobban_isbanned(M, jobPos))
|
||||
@@ -671,8 +671,8 @@
|
||||
//Medical (White)
|
||||
counter = 0
|
||||
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
dat += "<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)
|
||||
dat += "<tr bgcolor='ffeef0'><th colspan='[length(GLOB.medical_positions)]'><a href='?src=\ref[src];jobban3=medicaldept;jobban4=\ref[M]'>Medical Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in GLOB.medical_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
if(jobban_isbanned(M, jobPos))
|
||||
@@ -690,8 +690,8 @@
|
||||
//Science (Purple)
|
||||
counter = 0
|
||||
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
dat += "<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)
|
||||
dat += "<tr bgcolor='e79fff'><th colspan='[length(GLOB.science_positions)]'><a href='?src=\ref[src];jobban3=sciencedept;jobban4=\ref[M]'>Science Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in GLOB.science_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
if(jobban_isbanned(M, jobPos))
|
||||
@@ -709,8 +709,8 @@
|
||||
//Supply (Brown)
|
||||
counter = 0
|
||||
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
dat += "<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)
|
||||
dat += "<tr bgcolor='DDAA55'><th colspan='[length(GLOB.supply_positions)]'><a href='?src=\ref[src];jobban3=supplydept;jobban4=\ref[M]'>Supply Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in GLOB.supply_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
if(jobban_isbanned(M, jobPos))
|
||||
@@ -728,8 +728,8 @@
|
||||
//Civilian (Grey)
|
||||
counter = 0
|
||||
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
dat += "<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)
|
||||
dat += "<tr bgcolor='dddddd'><th colspan='[length(GLOB.civilian_positions)]'><a href='?src=\ref[src];jobban3=civiliandept;jobban4=\ref[M]'>Civilian Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in GLOB.civilian_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
if(jobban_isbanned(M, jobPos))
|
||||
@@ -747,8 +747,8 @@
|
||||
//Non-Human (Green)
|
||||
counter = 0
|
||||
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
dat += "<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)
|
||||
dat += "<tr bgcolor='ccffcc'><th colspan='[length(GLOB.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 GLOB.nonhuman_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
if(jobban_isbanned(M, jobPos))
|
||||
@@ -895,42 +895,42 @@
|
||||
var/list/joblist = list()
|
||||
switch(href_list["jobban3"])
|
||||
if("commanddept")
|
||||
for(var/jobPos in command_positions)
|
||||
for(var/jobPos in GLOB.command_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
joblist += jobPos
|
||||
if("securitydept")
|
||||
for(var/jobPos in security_positions)
|
||||
for(var/jobPos in GLOB.security_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
joblist += jobPos
|
||||
if("engineeringdept")
|
||||
for(var/jobPos in engineering_positions)
|
||||
for(var/jobPos in GLOB.engineering_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
joblist += jobPos
|
||||
if("medicaldept")
|
||||
for(var/jobPos in medical_positions)
|
||||
for(var/jobPos in GLOB.medical_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
joblist += jobPos
|
||||
if("sciencedept")
|
||||
for(var/jobPos in science_positions)
|
||||
for(var/jobPos in GLOB.science_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
joblist += jobPos
|
||||
if("supplydept")
|
||||
for(var/jobPos in supply_positions)
|
||||
for(var/jobPos in GLOB.supply_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
joblist += jobPos
|
||||
if("civiliandept")
|
||||
for(var/jobPos in civilian_positions)
|
||||
for(var/jobPos in GLOB.civilian_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
joblist += jobPos
|
||||
if("nonhumandept")
|
||||
for(var/jobPos in nonhuman_positions)
|
||||
for(var/jobPos in GLOB.nonhuman_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
joblist += jobPos
|
||||
@@ -1124,7 +1124,7 @@
|
||||
|
||||
else if(href_list["messageedits"])
|
||||
var/message_id = sanitizeSQL("[href_list["messageedits"]]")
|
||||
var/DBQuery/query_get_message_edits = dbcon.NewQuery("SELECT edits FROM [format_table_name("messages")] WHERE id = '[message_id]'")
|
||||
var/DBQuery/query_get_message_edits = GLOB.dbcon.NewQuery("SELECT edits FROM [format_table_name("messages")] WHERE id = '[message_id]'")
|
||||
if(!query_get_message_edits.warn_execute())
|
||||
return
|
||||
if(query_get_message_edits.NextRow())
|
||||
@@ -1204,56 +1204,56 @@
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(ticker && ticker.mode)
|
||||
if(SSticker && SSticker.mode)
|
||||
return alert(usr, "The game has already started.", null, null, null, null)
|
||||
var/dat = {"<B>What mode do you wish to play?</B><HR>"}
|
||||
for(var/mode in config.modes)
|
||||
dat += {"<A href='?src=\ref[src];c_mode2=[mode]'>[config.mode_names[mode]]</A><br>"}
|
||||
dat += {"<A href='?src=\ref[src];c_mode2=secret'>Secret</A><br>"}
|
||||
dat += {"<A href='?src=\ref[src];c_mode2=random'>Random</A><br>"}
|
||||
dat += {"Now: [master_mode]"}
|
||||
dat += {"Now: [GLOB.master_mode]"}
|
||||
usr << browse(dat, "window=c_mode")
|
||||
|
||||
else if(href_list["f_secret"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(ticker && ticker.mode)
|
||||
if(SSticker && SSticker.mode)
|
||||
return alert(usr, "The game has already started.", null, null, null, null)
|
||||
if(master_mode != "secret")
|
||||
if(GLOB.master_mode != "secret")
|
||||
return alert(usr, "The game mode has to be secret!", null, null, null, null)
|
||||
var/dat = {"<B>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.</B><HR>"}
|
||||
for(var/mode in config.modes)
|
||||
dat += {"<A href='?src=\ref[src];f_secret2=[mode]'>[config.mode_names[mode]]</A><br>"}
|
||||
dat += {"<A href='?src=\ref[src];f_secret2=secret'>Random (default)</A><br>"}
|
||||
dat += {"Now: [secret_force_mode]"}
|
||||
dat += {"Now: [GLOB.secret_force_mode]"}
|
||||
usr << browse(dat, "window=f_secret")
|
||||
|
||||
else if(href_list["c_mode2"])
|
||||
if(!check_rights(R_ADMIN|R_SERVER))
|
||||
return
|
||||
|
||||
if (ticker && ticker.mode)
|
||||
if (SSticker && SSticker.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("<span class='adminnotice'>[key_name_admin(usr)] set the mode as [master_mode].</span>")
|
||||
to_chat(world, "<span class='adminnotice'><b>The mode is now: [master_mode]</b></span>")
|
||||
GLOB.master_mode = href_list["c_mode2"]
|
||||
log_admin("[key_name(usr)] set the mode as [GLOB.master_mode].")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] set the mode as [GLOB.master_mode].</span>")
|
||||
to_chat(world, "<span class='adminnotice'><b>The mode is now: [GLOB.master_mode]</b></span>")
|
||||
Game() // updates the main game menu
|
||||
world.save_mode(master_mode)
|
||||
world.save_mode(GLOB.master_mode)
|
||||
.(href, list("c_mode"=1))
|
||||
|
||||
else if(href_list["f_secret2"])
|
||||
if(!check_rights(R_ADMIN|R_SERVER))
|
||||
return
|
||||
|
||||
if(ticker && ticker.mode)
|
||||
if(SSticker && SSticker.mode)
|
||||
return alert(usr, "The game has already started.", null, null, null, null)
|
||||
if(master_mode != "secret")
|
||||
if(GLOB.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("<span class='adminnotice'>[key_name_admin(usr)] set the forced secret mode as [secret_force_mode].</span>")
|
||||
GLOB.secret_force_mode = href_list["f_secret2"]
|
||||
log_admin("[key_name(usr)] set the forced secret mode as [GLOB.secret_force_mode].")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] set the forced secret mode as [GLOB.secret_force_mode].</span>")
|
||||
Game() // updates the main game menu
|
||||
.(href, list("f_secret"=1))
|
||||
|
||||
@@ -1328,7 +1328,7 @@
|
||||
if(alert(usr, "Send [key_name(M)] to Prison?", "Message", "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
M.loc = pick(prisonwarp)
|
||||
M.loc = pick(GLOB.prisonwarp)
|
||||
to_chat(M, "<span class='adminnotice'>You have been sent to Prison!</span>")
|
||||
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to Prison!")
|
||||
@@ -1378,7 +1378,7 @@
|
||||
|
||||
M.Paralyse(5)
|
||||
sleep(5)
|
||||
M.loc = pick(tdome1)
|
||||
M.loc = pick(GLOB.tdome1)
|
||||
spawn(50)
|
||||
to_chat(M, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>")
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 1)")
|
||||
@@ -1404,7 +1404,7 @@
|
||||
|
||||
M.Paralyse(5)
|
||||
sleep(5)
|
||||
M.loc = pick(tdome2)
|
||||
M.loc = pick(GLOB.tdome2)
|
||||
spawn(50)
|
||||
to_chat(M, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>")
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 2)")
|
||||
@@ -1427,7 +1427,7 @@
|
||||
|
||||
M.Paralyse(5)
|
||||
sleep(5)
|
||||
M.loc = pick(tdomeadmin)
|
||||
M.loc = pick(GLOB.tdomeadmin)
|
||||
spawn(50)
|
||||
to_chat(M, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>")
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Admin.)")
|
||||
@@ -1457,7 +1457,7 @@
|
||||
observer.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(observer), slot_shoes)
|
||||
M.Paralyse(5)
|
||||
sleep(5)
|
||||
M.loc = pick(tdomeobserve)
|
||||
M.loc = pick(GLOB.tdomeobserve)
|
||||
spawn(50)
|
||||
to_chat(M, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>")
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Observer.)")
|
||||
@@ -1546,7 +1546,7 @@
|
||||
usr.client.cmd_admin_animalize(M)
|
||||
|
||||
else if(href_list["gangpoints"])
|
||||
var/datum/gang/G = locate(href_list["gangpoints"]) in ticker.mode.gangs
|
||||
var/datum/gang/G = locate(href_list["gangpoints"]) in SSticker.mode.gangs
|
||||
if(G)
|
||||
var/newpoints = input("Set [G.name ] Gang's influence.","Set Influence",G.points) as null|num
|
||||
if(!newpoints)
|
||||
@@ -1594,7 +1594,7 @@
|
||||
output_devil_info(M)
|
||||
|
||||
else if(href_list["adminmoreinfo"])
|
||||
var/mob/M = locate(href_list["adminmoreinfo"])
|
||||
var/mob/M = locate(href_list["adminmoreinfo"]) in GLOB.mob_list
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "This can only be used on instances of type /mob.")
|
||||
return
|
||||
@@ -1646,7 +1646,7 @@
|
||||
to_chat(src.owner, "Name = <b>[M.name]</b>; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = <b>[M.key]</b>;")
|
||||
to_chat(src.owner, "Location = [location_description];")
|
||||
to_chat(src.owner, "[special_role_description]")
|
||||
to_chat(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>)")
|
||||
to_chat(src.owner, ADMIN_FULLMONTY_NONAME(M))
|
||||
|
||||
else if(href_list["addjobslot"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
@@ -1729,38 +1729,15 @@
|
||||
if(!check_rights(R_ADMIN|R_FUN))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["adminsmite"]) in mob_list
|
||||
var/mob/living/carbon/human/H = locate(href_list["adminsmite"]) in GLOB.mob_list
|
||||
if(!H || !istype(H))
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
||||
return
|
||||
|
||||
var/list/punishment_list = list(ADMIN_PUNISHMENT_LIGHTNING, ADMIN_PUNISHMENT_BRAINDAMAGE, ADMIN_PUNISHMENT_GIB)
|
||||
|
||||
var/punishment = input("Choose a punishment", "DIVINE SMITING") as null|anything in punishment_list
|
||||
|
||||
if(QDELETED(H) || !punishment)
|
||||
return
|
||||
|
||||
switch(punishment)
|
||||
if(ADMIN_PUNISHMENT_LIGHTNING)
|
||||
var/turf/T = get_step(get_step(H, NORTH), NORTH)
|
||||
T.Beam(H, icon_state="lightning[rand(1,12)]", time = 5)
|
||||
H.adjustFireLoss(75)
|
||||
H.electrocution_animation(40)
|
||||
to_chat(H, "<span class='userdanger'>The gods have punished you for your sins!</span>")
|
||||
if(ADMIN_PUNISHMENT_BRAINDAMAGE)
|
||||
H.adjustBrainLoss(75)
|
||||
if(ADMIN_PUNISHMENT_GIB)
|
||||
H.gib(FALSE)
|
||||
|
||||
message_admins("[key_name_admin(usr)] punished [key_name_admin(H)] with [punishment].")
|
||||
log_admin("[key_name(usr)] punished [key_name(H)] with [punishment].")
|
||||
|
||||
else if(href_list["BlueSpaceArtillery"])
|
||||
var/mob/living/M = locate(href_list["BlueSpaceArtillery"]) in mob_list
|
||||
usr.client.bluespace_artillery(M)
|
||||
usr.client.smite(H)
|
||||
|
||||
else if(href_list["CentcommReply"])
|
||||
var/mob/living/carbon/human/H = locate(href_list["CentcommReply"]) in mob_list
|
||||
var/mob/living/carbon/human/H = locate(href_list["CentcommReply"]) in GLOB.mob_list
|
||||
if(!istype(H))
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
||||
return
|
||||
@@ -1846,18 +1823,28 @@
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/mob/M = locate(href_list["individuallog"]) in mob_list
|
||||
var/mob/M = locate(href_list["individuallog"]) in GLOB.mob_list
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "This can only be used on instances of type /mob.")
|
||||
return
|
||||
|
||||
show_individual_logging_panel(M, href_list["log_type"])
|
||||
else if(href_list["languagemenu"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/mob/living/L = locate(href_list["languagemenu"]) in GLOB.mob_list
|
||||
if(!isliving(L))
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living.")
|
||||
return
|
||||
|
||||
L.open_language_menu(usr)
|
||||
|
||||
else if(href_list["traitor"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(!ticker || !ticker.mode)
|
||||
if(!SSticker || !SSticker.mode)
|
||||
alert("The game hasn't started yet!")
|
||||
return
|
||||
|
||||
@@ -2024,7 +2011,7 @@
|
||||
|
||||
else if(href_list["ac_submit_new_channel"])
|
||||
var/check = 0
|
||||
for(var/datum/newscaster/feed_channel/FC in news_network.network_channels)
|
||||
for(var/datum/newscaster/feed_channel/FC in GLOB.news_network.network_channels)
|
||||
if(FC.channel_name == src.admincaster_feed_channel.channel_name)
|
||||
check = 1
|
||||
break
|
||||
@@ -2033,7 +2020,7 @@
|
||||
else
|
||||
var/choice = alert("Please confirm Feed channel creation.","Network Channel Handler","Confirm","Cancel")
|
||||
if(choice=="Confirm")
|
||||
news_network.CreateFeedChannel(src.admincaster_feed_channel.channel_name, src.admin_signature, src.admincaster_feed_channel.locked, 1)
|
||||
GLOB.news_network.CreateFeedChannel(src.admincaster_feed_channel.channel_name, src.admin_signature, src.admincaster_feed_channel.locked, 1)
|
||||
feedback_inc("newscaster_channels",1)
|
||||
log_admin("[key_name(usr)] created command feed channel: [src.admincaster_feed_channel.channel_name]!")
|
||||
src.admincaster_screen=5
|
||||
@@ -2041,7 +2028,7 @@
|
||||
|
||||
else if(href_list["ac_set_channel_receiving"])
|
||||
var/list/available_channels = list()
|
||||
for(var/datum/newscaster/feed_channel/F in news_network.network_channels)
|
||||
for(var/datum/newscaster/feed_channel/F in GLOB.news_network.network_channels)
|
||||
available_channels += F.channel_name
|
||||
src.admincaster_feed_channel.channel_name = adminscrub(input(usr, "Choose receiving Feed Channel.", "Network Channel Handler") in available_channels )
|
||||
src.access_news_network()
|
||||
@@ -2056,11 +2043,11 @@
|
||||
if(src.admincaster_feed_message.returnBody(-1) =="" || src.admincaster_feed_message.returnBody(-1) =="\[REDACTED\]" || src.admincaster_feed_channel.channel_name == "" )
|
||||
src.admincaster_screen = 6
|
||||
else
|
||||
news_network.SubmitArticle(src.admincaster_feed_message.returnBody(-1), src.admin_signature, src.admincaster_feed_channel.channel_name, null, 1)
|
||||
GLOB.news_network.SubmitArticle(src.admincaster_feed_message.returnBody(-1), src.admin_signature, src.admincaster_feed_channel.channel_name, null, 1)
|
||||
feedback_inc("newscaster_stories",1)
|
||||
src.admincaster_screen=4
|
||||
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in GLOB.allCasters)
|
||||
NEWSCASTER.newsAlert(src.admincaster_feed_channel.channel_name)
|
||||
|
||||
log_admin("[key_name(usr)] submitted a feed story to channel: [src.admincaster_feed_channel.channel_name]!")
|
||||
@@ -2084,12 +2071,12 @@
|
||||
|
||||
else if(href_list["ac_menu_wanted"])
|
||||
var/already_wanted = 0
|
||||
if(news_network.wanted_issue.active)
|
||||
if(GLOB.news_network.wanted_issue.active)
|
||||
already_wanted = 1
|
||||
|
||||
if(already_wanted)
|
||||
src.admincaster_wanted_message.criminal = news_network.wanted_issue.criminal
|
||||
src.admincaster_wanted_message.body = news_network.wanted_issue.body
|
||||
src.admincaster_wanted_message.criminal = GLOB.news_network.wanted_issue.criminal
|
||||
src.admincaster_wanted_message.body = GLOB.news_network.wanted_issue.body
|
||||
src.admincaster_screen = 14
|
||||
src.access_news_network()
|
||||
|
||||
@@ -2113,10 +2100,10 @@
|
||||
var/choice = alert("Please confirm Wanted Issue [(input_param==1) ? ("creation.") : ("edit.")]","Network Security Handler","Confirm","Cancel")
|
||||
if(choice=="Confirm")
|
||||
if(input_param==1) //If input_param == 1 we're submitting a new wanted issue. At 2 we're just editing an existing one. See the else below
|
||||
news_network.submitWanted(admincaster_wanted_message.criminal, admincaster_wanted_message.body, admin_signature, null, 1, 1)
|
||||
GLOB.news_network.submitWanted(admincaster_wanted_message.criminal, admincaster_wanted_message.body, admin_signature, null, 1, 1)
|
||||
src.admincaster_screen = 15
|
||||
else
|
||||
news_network.submitWanted(admincaster_wanted_message.criminal, admincaster_wanted_message.body, admin_signature)
|
||||
GLOB.news_network.submitWanted(admincaster_wanted_message.criminal, admincaster_wanted_message.body, admin_signature)
|
||||
src.admincaster_screen = 19
|
||||
log_admin("[key_name(usr)] issued a Station-wide Wanted Notification for [src.admincaster_wanted_message.criminal]!")
|
||||
src.access_news_network()
|
||||
@@ -2124,7 +2111,7 @@
|
||||
else if(href_list["ac_cancel_wanted"])
|
||||
var/choice = alert("Please confirm Wanted Issue removal.","Network Security Handler","Confirm","Cancel")
|
||||
if(choice=="Confirm")
|
||||
news_network.deleteWanted()
|
||||
GLOB.news_network.deleteWanted()
|
||||
src.admincaster_screen=17
|
||||
src.access_news_network()
|
||||
|
||||
@@ -2208,7 +2195,7 @@
|
||||
else if(href_list["kick_all_from_lobby"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
if(ticker && ticker.current_state == GAME_STATE_PLAYING)
|
||||
if(SSticker && SSticker.current_state == GAME_STATE_PLAYING)
|
||||
var/afkonly = text2num(href_list["afkonly"])
|
||||
if(alert("Are you sure you want to kick all [afkonly ? "AFK" : ""] clients from the lobby??","Message","Yes","Cancel") != "Yes")
|
||||
to_chat(usr, "Kick clients from lobby aborted")
|
||||
@@ -2247,14 +2234,14 @@
|
||||
O.belt = text2path(href_list["outfit_belt"])
|
||||
O.ears = text2path(href_list["outfit_ears"])
|
||||
|
||||
custom_outfits.Add(O)
|
||||
GLOB.custom_outfits.Add(O)
|
||||
message_admins("[key_name(usr)] created \"[O.name]\" outfit!")
|
||||
|
||||
else if(href_list["set_selfdestruct_code"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/code = random_nukecode()
|
||||
for(var/obj/machinery/nuclearbomb/selfdestruct/SD in nuke_list)
|
||||
for(var/obj/machinery/nuclearbomb/selfdestruct/SD in GLOB.nuke_list)
|
||||
SD.r_code = code
|
||||
message_admins("[key_name_admin(usr)] has set the self-destruct \
|
||||
code to \"[code]\".")
|
||||
@@ -2277,7 +2264,7 @@
|
||||
return
|
||||
G.report_message = description
|
||||
message_admins("[key_name(usr)] created \"[G.name]\" station goal.")
|
||||
ticker.mode.station_goals += G
|
||||
SSticker.mode.station_goals += G
|
||||
modify_goals()
|
||||
|
||||
else if(href_list["viewruntime"])
|
||||
@@ -2290,58 +2277,3 @@
|
||||
error_viewer.show_to(owner, locate(href_list["viewruntime_backto"]), href_list["viewruntime_linear"])
|
||||
else
|
||||
error_viewer.show_to(owner, null, href_list["viewruntime_linear"])
|
||||
else if(href_list["mentor"])
|
||||
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
var/mob/M = locate(href_list["mentor"])
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "this can be only used on instances of type /mob")
|
||||
return
|
||||
|
||||
if(!M.client)
|
||||
to_chat(usr, "no client")
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] has granted [key_name(M)] mentor access")
|
||||
message_admins("\blue [key_name_admin(usr)] has granted [key_name_admin(M)] mentor access", 1)
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("INSERT INTO [format_table_name("mentor")] (ckey) VALUES ('[M.client.ckey]')")
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during adding new mentor. Error : \[[err]\]\n")
|
||||
load_mentors()
|
||||
M.verbs += /client/proc/cmd_mentor_say
|
||||
M.verbs += /client/proc/show_mentor_memo
|
||||
to_chat(M, "\blue You've been granted mentor access! Help people who send mentor-pms")
|
||||
|
||||
else if(href_list["removementor"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
var/mob/living/carbon/human/M = locate(href_list["removementor"])
|
||||
if(!ismob(M))
|
||||
usr << "this can be only used on instances of type /mob"
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] has removed mentor access from [key_name(M)]")
|
||||
message_admins("\blue [key_name_admin(usr)] has removed mentor access from [key_name_admin(M)]", 1)
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("DELETE FROM [format_table_name("mentor")] WHERE ckey = '[M.client.ckey]'")
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during removing mentor. Error : \[[err]\]\n")
|
||||
load_mentors()
|
||||
to_chat(M, "\blue Your mentor access has been removed")
|
||||
M.verbs -= /client/proc/cmd_mentor_say
|
||||
M.verbs -= /client/proc/show_mentor_memo
|
||||
|
||||
else if(href_list["mentormemoeditlist"])
|
||||
var/sql_key = sanitizeSQL("[href_list["memoeditlist"]]")
|
||||
var/DBQuery/query_memoedits = dbcon.NewQuery("SELECT edits FROM [format_table_name("mentor_memo")] WHERE (ckey = '[sql_key]')")
|
||||
if(!query_memoedits.Execute())
|
||||
var/err = query_memoedits.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining edits from memo table. Error : \[[err]\]\n")
|
||||
return
|
||||
if(query_memoedits.NextRow())
|
||||
var/edit_log = query_memoedits.item[1]
|
||||
usr << browse(edit_log,"window=mentormemoeditlist")
|
||||
Reference in New Issue
Block a user