Merge remote-tracking branch 'bay12-upstream/master' into development

This commit is contained in:
skull132
2016-10-07 00:58:39 +03:00
1594 changed files with 53994 additions and 48590 deletions
+2 -2
View File
@@ -455,9 +455,9 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
if("TEMPBAN")
typedesc = "<b>TEMPBAN</b><br><font size='2'>([duration] minutes) [(unbanned || auto) ? "" : "(<a href=\"byond://?src=\ref[src];dbbanedit=duration;dbbanid=[banid]\">Edit</a>)"]<br>Expires [expiration]</font>"
if("JOB_PERMABAN")
typedesc = "<b>JOBBAN</b><br><font size='2'>([job])"
typedesc = "<b>JOBBAN</b><br><font size='2'>([job])</font>"
if("JOB_TEMPBAN")
typedesc = "<b>TEMP JOBBAN</b><br><font size='2'>([job])<br>([duration] minutes)<br>Expires [expiration]"
typedesc = "<b>TEMP JOBBAN</b><br><font size='2'>([job])<br>([duration] minutes<br>Expires [expiration]</font>"
output += "<tr bgcolor='[dcolor]'>"
output += "<td align='center'>[typedesc]</td>"
+39 -116
View File
@@ -58,7 +58,7 @@ proc/admin_notice(var/message, var/rights)
<a href='?src=\ref[src];traitor=\ref[M]'>TP</a> -
<a href='?src=\ref[usr];priv_msg=\ref[M]'>PM</a> -
<a href='?src=\ref[src];subtlemessage=\ref[M]'>SM</a> -
<a href='?src=\ref[src];adminplayerobservejump=\ref[M]'>JMP</a>\] </b><br>
[admin_jump_link(M, src)]\] <br>
<b>Mob type</b> = [M.type]<br><br>
<A href='?src=\ref[src];boot2=\ref[M]'>Kick</A> |
<A href='?_src_=holder;warn=[M.ckey]'>Warn</A> |
@@ -364,7 +364,7 @@ proc/admin_notice(var/message, var/rights)
dat+={"<HR><B>Feed Security functions:</B><BR>
<BR><A href='?src=\ref[src];ac_menu_wanted=1'>[(wanted_already) ? ("Manage") : ("Publish")] \"Wanted\" Issue</A>
<BR><A href='?src=\ref[src];ac_menu_censor_story=1'>Censor Feed Stories</A>
<BR><A href='?src=\ref[src];ac_menu_censor_channel=1'>Mark Feed Channel with Nanotrasen D-Notice (disables and locks the channel.</A>
<BR><A href='?src=\ref[src];ac_menu_censor_channel=1'>Mark Feed Channel with [company_name] D-Notice (disables and locks the channel.</A>
<BR><HR><A href='?src=\ref[src];ac_set_signature=1'>The newscaster recognises you as:<BR> <FONT COLOR='green'>[src.admincaster_signature]</FONT></A>
"}
if(1)
@@ -430,7 +430,7 @@ proc/admin_notice(var/message, var/rights)
dat+="<B>[src.admincaster_feed_channel.channel_name]: </B><FONT SIZE=1>\[created by: <FONT COLOR='maroon'>[src.admincaster_feed_channel.author]</FONT>\]</FONT><HR>"
if(src.admincaster_feed_channel.censored)
dat+={"
<FONT COLOR='red'><B>ATTENTION: </B></FONT>This channel has been deemed as threatening to the welfare of the station, and marked with a Nanotrasen D-Notice.<BR>
<FONT COLOR='red'><B>ATTENTION: </B></FONT>This channel has been deemed as threatening to the welfare of the station, and marked with a [company_name] D-Notice.<BR>
No further feed story additions are allowed while the D-Notice is in effect.</FONT><BR><BR>
"}
else
@@ -451,7 +451,7 @@ proc/admin_notice(var/message, var/rights)
"}
if(10)
dat+={"
<B>Nanotrasen Feed Censorship Tool</B><BR>
<B>[company_name] Feed Censorship Tool</B><BR>
<FONT SIZE=1>NOTE: Due to the nature of news Feeds, total deletion of a Feed Story is not possible.<BR>
Keep in mind that users attempting to view a censored feed will instead see the \[REDACTED\] tag above it.</FONT>
<HR>Select Feed channel to get Stories from:<BR>
@@ -464,7 +464,7 @@ proc/admin_notice(var/message, var/rights)
dat+="<BR><A href='?src=\ref[src];ac_setScreen=[0]'>Cancel</A>"
if(11)
dat+={"
<B>Nanotrasen D-Notice Handler</B><HR>
<B>[company_name] D-Notice Handler</B><HR>
<FONT SIZE=1>A D-Notice is to be bestowed upon the channel if the handling Authority deems it as harmful for the station's
morale, integrity or disciplinary behaviour. A D-Notice will render a channel unable to be updated by anyone, without deleting any feed
stories it might contain at the time. You can lift a D-Notice if you have the required access at any time.</FONT><HR>
@@ -497,7 +497,7 @@ proc/admin_notice(var/message, var/rights)
"}
if(src.admincaster_feed_channel.censored)
dat+={"
<FONT COLOR='red'><B>ATTENTION: </B></FONT>This channel has been deemed as threatening to the welfare of the station, and marked with a Nanotrasen D-Notice.<BR>
<FONT COLOR='red'><B>ATTENTION: </B></FONT>This channel has been deemed as threatening to the welfare of the station, and marked with a [company_name] D-Notice.<BR>
No further feed story additions are allowed while the D-Notice is in effect.</FONT><BR><BR>
"}
else
@@ -615,110 +615,17 @@ proc/admin_notice(var/message, var/rights)
if(!check_rights(0)) return
var/dat = "<B>The first rule of adminbuse is: you don't talk about the adminbuse.</B><HR>"
if(check_rights(R_ADMIN,0))
dat += {"
<B>Admin Secrets</B><BR>
<BR>
<A href='?src=\ref[src];secretsadmin=list_bombers'>Bombing List</A><BR>
<A href='?src=\ref[src];secretsadmin=check_antagonist'>Show current traitors and objectives</A><BR>
<A href='?src=\ref[src];secretsadmin=list_signalers'>Show last [length(lastsignalers)] signalers</A><BR>
<A href='?src=\ref[src];secretsadmin=list_lawchanges'>Show last [lawchanges.len] law change\s</A><BR>
<A href='?src=\ref[src];secretsadmin=showailaws'>Show AI Laws</A><BR>
<A href='?src=\ref[src];secretsadmin=showgm'>Show Game Mode</A><BR>
<A href='?src=\ref[src];secretsadmin=manifest'>Show Crew Manifest</A><BR>
<A href='?src=\ref[src];secretsadmin=DNA'>List DNA (Blood)</A><BR>
<A href='?src=\ref[src];secretsadmin=fingerprints'>List Fingerprints</A><BR><BR>
<BR>
"}
if(check_rights(R_FUN,0))
dat += {"
<B>'Random' Events</B><BR>
<BR>
<A href='?src=\ref[src];secretsfun=gravity'>Toggle station artificial gravity</A><BR>
<A href='?src=\ref[src];secretsfun=wave'>Spawn a wave of meteors (aka lagocolyptic shower)</A><BR>
<A href='?src=\ref[src];secretsfun=gravanomalies'>Spawn a gravitational anomaly (aka lagitational anomolag)</A><BR>
<A href='?src=\ref[src];secretsfun=timeanomalies'>Spawn wormholes</A><BR>
<A href='?src=\ref[src];secretsfun=goblob'>Spawn blob</A><BR>
<A href='?src=\ref[src];secretsfun=aliens'>Trigger a Xenomorph infestation</A><BR>
<A href='?src=\ref[src];secretsfun=borers'>Trigger a Cortical Borer infestation</A><BR>
<A href='?src=\ref[src];secretsfun=alien_silent'>Spawn an Alien silently</A><BR>
<A href='?src=\ref[src];secretsfun=spiders'>Trigger a Spider infestation</A><BR>
<A href='?src=\ref[src];secretsfun=spaceninja'>Send in a space ninja</A><BR>
<A href='?src=\ref[src];secretsfun=striketeam'>Send in a strike team</A><BR>
<A href='?src=\ref[src];secretsfun=carp'>Trigger an Carp migration</A><BR>
<A href='?src=\ref[src];secretsfun=radiation'>Irradiate the station</A><BR>
<A href='?src=\ref[src];secretsfun=prison_break'>Trigger a Prison Break</A><BR>
<A href='?src=\ref[src];secretsfun=virus'>Trigger a Virus Outbreak</A><BR>
<A href='?src=\ref[src];secretsfun=immovable'>Spawn an Immovable Rod</A><BR>
<A href='?src=\ref[src];secretsfun=lightsout'>Toggle a "lights out" event</A><BR>
<A href='?src=\ref[src];secretsfun=ionstorm'>Spawn an Ion Storm</A><BR>
<A href='?src=\ref[src];secretsfun=spacevines'>Spawn Space-Vines</A><BR>
<A href='?src=\ref[src];secretsfun=comms_blackout'>Trigger a communication blackout</A><BR>
<BR>
<B>Fun Secrets</B><BR>
<BR>
<A href='?src=\ref[src];secretsfun=sec_clothes'>Remove 'internal' clothing</A><BR>
<A href='?src=\ref[src];secretsfun=sec_all_clothes'>Remove ALL clothing</A><BR>
<A href='?src=\ref[src];secretsfun=monkey'>Turn all humans into monkeys</A><BR>
<A href='?src=\ref[src];secretsfun=sec_classic1'>Remove firesuits, grilles, and pods</A><BR>
<A href='?src=\ref[src];secretsfun=power'>Make all areas powered</A><BR>
<A href='?src=\ref[src];secretsfun=unpower'>Make all areas unpowered</A><BR>
<A href='?src=\ref[src];secretsfun=quickpower'>Power all SMES</A><BR>
<A href='?src=\ref[src];secretsfun=toggleprisonstatus'>Toggle Prison Shuttle Status(Use with S/R)</A><BR>
<A href='?src=\ref[src];secretsfun=activateprison'>Send Prison Shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=deactivateprison'>Return Prison Shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=prisonwarp'>Warp all Players to Prison</A><BR>
<A href='?src=\ref[src];secretsfun=tripleAI'>Triple AI mode (needs to be used in the lobby)</A><BR>
<A href='?src=\ref[src];secretsfun=traitor_all'>Everyone is the traitor</A><BR>
<A href='?src=\ref[src];secretsfun=onlyone'>There can only be one!</A><BR>
<A href='?src=\ref[src];secretsfun=flicklights'>Ghost Mode</A><BR>
<A href='?src=\ref[src];secretsfun=retardify'>Make all players retarded</A><BR>
<A href='?src=\ref[src];secretsfun=fakeguns'>Make all items look like guns</A><BR>
<A href='?src=\ref[src];secretsfun=paintball'>Paintball Mode</A><BR>
<A href='?src=\ref[src];secretsfun=schoolgirl'>Japanese Animes Mode</A><BR>
<A href='?src=\ref[src];secretsfun=eagles'>Egalitarian Station Mode</A><BR>
<A href='?src=\ref[src];secretsfun=launchshuttle'>Launch a shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=forcelaunchshuttle'>Force launch a shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=jumpshuttle'>Jump a shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=moveshuttle'>Move a shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=blackout'>Break all lights</A><BR>
<A href='?src=\ref[src];secretsfun=whiteout'>Fix all lights</A><BR>
<A href='?src=\ref[src];secretsfun=friendai'>Best Friend AI</A><BR>
<A href='?src=\ref[src];secretsfun=floorlava'>The floor is lava! (DANGEROUS: extremely lame)</A><BR>
"}
if(check_rights(R_SERVER,0))
dat += "<A href='?src=\ref[src];secretsfun=togglebombcap'>Toggle bomb cap</A><BR>"
if(check_rights(R_SERVER|R_FUN,0))
dat += {"
<BR>
<B>Final Solutions</B><BR>
<I>(Warning, these will end the round!)</I><BR>
<BR>
<A href='?src=\ref[src];secretsfun=hellonearth'>Summon Nar-Sie</A><BR>
<A href='?src=\ref[src];secretsfun=supermattercascade'>Start a Supermatter Cascade</A><BR>
"}
dat += "<BR>"
if(check_rights(R_DEBUG|R_DEV,0))
dat += {"
<B>Security Level Elevated</B><BR>
<BR>
<A href='?src=\ref[src];secretscoder=maint_access_engiebrig'>Change all maintenance doors to engie/brig access only</A><BR>
<A href='?src=\ref[src];secretscoder=maint_access_brig'>Change all maintenance doors to brig access only</A><BR>
<A href='?src=\ref[src];secretscoder=infinite_sec'>Remove cap on security officers</A><BR>
<BR>
<B>Coder Secrets</B><BR>
<BR>
<A href='?src=\ref[src];secretsadmin=list_job_debug'>Show Job Debug</A><BR>
<A href='?src=\ref[src];secretscoder=spawn_objects'>Admin Log</A><BR>
<BR>
"}
for(var/datum/admin_secret_category/category in admin_secrets.categories)
if(!category.can_view(usr))
continue
dat += "<B>[category.name]</B><br>"
if(category.desc)
dat += "<I>[category.desc]</I><BR>"
for(var/datum/admin_secret_item/item in category.items)
if(!item.can_view(usr))
continue
dat += "<A href='?src=\ref[src];admin_secrets=\ref[item]'>[item.name()]</A><BR>"
dat += "<BR>"
usr << browse(dat, "window=secrets")
return
@@ -738,7 +645,7 @@ proc/admin_notice(var/message, var/rights)
if(confirm == "Cancel")
return
if(confirm == "Yes")
world << "\red <b>Restarting world!</b> \blue Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]!"
world << "<span class='danger'>Restarting world!</span> <span class='notice'>Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]!</span>"
log_admin("[key_name(usr)] initiated a reboot.")
feedback_set_details("end_error","admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]")
@@ -829,6 +736,22 @@ proc/admin_notice(var/message, var/rights)
message_admins("[key_name_admin(usr)] toggled Dead OOC.", 1)
feedback_add_details("admin_verb","TDOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/togglehubvisibility()
set category = "Server"
set desc="Globally Toggles Hub Visibility"
set name="Toggle Hub Visibility"
if(!check_rights(R_ADMIN))
return
world.visibility = !(world.visibility)
var/long_message = " toggled hub visibility. The server is now [world.visibility ? "visible" : "invisible"] ([world.visibility])."
send2adminirc("[key_name(src)]" + long_message)
message_admins("[key_name_admin(usr)]" + long_message, 1)
log_admin("[key_name(usr)] toggled hub visibility.")
feedback_add_details("admin_verb","THUB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc
/datum/admins/proc/toggletraitorscaling()
set category = "Server"
set desc="Toggle traitor scaling"
@@ -925,8 +848,8 @@ proc/admin_notice(var/message, var/rights)
log_admin("[key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].")
message_admins("\blue [key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].", 1)
return //alert("Round end delayed", null, null, null, null, null)
going = !( going )
if (!( going ))
round_progressing = !round_progressing
if (!round_progressing)
world << "<b>The game start has been delayed.</b>"
log_admin("[key_name(usr)] delayed the game.")
else
@@ -1301,15 +1224,15 @@ proc/admin_notice(var/message, var/rights)
if(2) //Admins
var/ref_mob = "\ref[M]"
return "<b>[key_name(C, link, name, highlight_special)](<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=[ref_mob]'>JMP</A>) (<A HREF='?_src_=holder;check_antagonist=1'>CA</A>)</b>"
return "<b>[key_name(C, link, name, highlight_special)](<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) ([admin_jump_link(M, src)]) (<A HREF='?_src_=holder;check_antagonist=1'>CA</A>)</b>"
if(3) //Undibbsed
var/ref_mob = "\ref[M]"
return "<b>[key_name(C, link, name, highlight_special)](<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;admindibs=\ref[C]'>DIBS</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[M]'>PP</A>) (<A HREF='?_src_=holder;adminplayerobservejump=[ref_mob]'>JMP</A>)</b>"
return "<b>[key_name(C, link, name, highlight_special)](<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;admindibs=\ref[C]'>DIBS</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[M]'>PP</A>) ([admin_jump_link(M, src)])</b>"
if(4) //Mentors
var/ref_mob = "\ref[M]"
return "<b>[key_name(C, link, name, highlight_special)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=[ref_mob]'>JMP</A>)</b>"
return "<b>[key_name(C, link, name, highlight_special)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) ([admin_jump_link(M, src)])</b>"
//
//ALL DONE
+6 -2
View File
@@ -1,8 +1,12 @@
/mob/var/lastattacker = null
/mob/var/lastattacked = null
/mob/var/attack_log = list( )
/mob/var/attack_log = list()
proc/log_and_message_admins(var/message as text, var/mob/user = usr, var/turf/location)
var/turf/T = location ? location : (user ? get_turf(user) : null)
if(T)
message = message + " (<a HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>)"
proc/log_and_message_admins(var/message as text, var/mob/user = usr)
log_admin(user ? "[key_name(user)] [message]" : "EVENT [message]")
message_admins(user ? "[key_name_admin(user)] [message]" : "EVENT [message]")
+180 -180
View File
@@ -1,180 +1,180 @@
// Reports are a way to notify admins of wrongdoings that happened
// while no admin was present. They work a bit similar to news, but
// they can only be read by admins and moderators.
// a single admin report
datum/admin_report/var
ID // the ID of the report
body // the content of the report
author // key of the author
date // date on which this was created
done // whether this was handled
offender_key // store the key of the offender
offender_cid // store the cid of the offender
datum/report_topic_handler
Topic(href,href_list)
..()
var/client/C = locate(href_list["client"])
if(href_list["action"] == "show_reports")
C.display_admin_reports()
else if(href_list["action"] == "remove")
C.mark_report_done(text2num(href_list["ID"]))
else if(href_list["action"] == "edit")
C.edit_report(text2num(href_list["ID"]))
var/datum/report_topic_handler/report_topic_handler
world/New()
..()
report_topic_handler = new
// add a new news datums
proc/make_report(body, author, okey, cid)
var/savefile/Reports = new("data/reports.sav")
var/list/reports
var/lastID
Reports["reports"] >> reports
Reports["lastID"] >> lastID
if(!reports) reports = list()
if(!lastID) lastID = 0
var/datum/admin_report/created = new()
created.ID = ++lastID
created.body = body
created.author = author
created.date = world.realtime
created.done = 0
created.offender_key = okey
created.offender_cid = cid
reports.Insert(1, created)
Reports["reports"] << reports
Reports["lastID"] << lastID
// load the reports from disk
proc/load_reports()
var/savefile/Reports = new("data/reports.sav")
var/list/reports
Reports["reports"] >> reports
if(!reports) reports = list()
return reports
// check if there are any unhandled reports
client/proc/unhandled_reports()
if(!src.holder) return 0
var/list/reports = load_reports()
for(var/datum/admin_report/N in reports)
if(N.done)
continue
else return 1
return 0
// checks if the player has an unhandled report against him
client/proc/is_reported()
var/list/reports = load_reports()
for(var/datum/admin_report/N in reports) if(!N.done)
if(N.offender_key == src.key)
return 1
return 0
// display only the reports that haven't been handled
client/proc/display_admin_reports()
set category = "Admin"
set name = "Display Admin Reports"
if(!src.holder) return
var/list/reports = load_reports()
var/output = ""
if(unhandled_reports())
// load the list of unhandled reports
for(var/datum/admin_report/N in reports)
if(N.done)
continue
output += "<b>Reported player:</b> [N.offender_key](CID: [N.offender_cid])<br>"
output += "<b>Offense:</b>[N.body]<br>"
output += "<small>Occured at [time2text(N.date,"MM/DD hh:mm:ss")]</small><br>"
output += "<small>authored by <i>[N.author]</i></small><br>"
output += " <a href='?src=\ref[report_topic_handler];client=\ref[src];action=remove;ID=[N.ID]'>Flag as Handled</a>"
if(src.key == N.author)
output += " <a href='?src=\ref[report_topic_handler];client=\ref[src];action=edit;ID=[N.ID]'>Edit</a>"
output += "<br>"
output += "<br>"
else
output += "Whoops, no reports!"
usr << browse(output, "window=news;size=600x400")
client/proc/Report(mob/M as mob in world)
set category = "Admin"
if(!src.holder)
return
var/CID = "Unknown"
if(M.client)
CID = M.client.computer_id
var/body = input(src.mob, "Describe in detail what you're reporting [M] for", "Report") as null|text
if(!body) return
make_report(body, key, M.key, CID)
spawn(1)
display_admin_reports()
client/proc/mark_report_done(ID as num)
if(!src.holder || src.holder.level < 0)
return
var/savefile/Reports = new("data/reports.sav")
var/list/reports
Reports["reports"] >> reports
var/datum/admin_report/found
for(var/datum/admin_report/N in reports)
if(N.ID == ID)
found = N
if(!found) src << "<b>* An error occured, sorry.</b>"
found.done = 1
Reports["reports"] << reports
client/proc/edit_report(ID as num)
if(!src.holder || src.holder.level < 0)
src << "<b>You tried to modify the news, but you're not an admin!"
return
var/savefile/Reports = new("data/reports.sav")
var/list/reports
Reports["reports"] >> reports
var/datum/admin_report/found
for(var/datum/admin_report/N in reports)
if(N.ID == ID)
found = N
if(!found) src << "<b>* An error occured, sorry.</b>"
var/body = input(src.mob, "Enter a body for the news", "Body") as null|message
if(!body) return
found.body = body
Reports["reports"] << reports
// Reports are a way to notify admins of wrongdoings that happened
// while no admin was present. They work a bit similar to news, but
// they can only be read by admins and moderators.
// a single admin report
datum/admin_report/var
ID // the ID of the report
body // the content of the report
author // key of the author
date // date on which this was created
done // whether this was handled
offender_key // store the key of the offender
offender_cid // store the cid of the offender
datum/report_topic_handler
Topic(href,href_list)
..()
var/client/C = locate(href_list["client"])
if(href_list["action"] == "show_reports")
C.display_admin_reports()
else if(href_list["action"] == "remove")
C.mark_report_done(text2num(href_list["ID"]))
else if(href_list["action"] == "edit")
C.edit_report(text2num(href_list["ID"]))
var/datum/report_topic_handler/report_topic_handler
world/New()
..()
report_topic_handler = new
// add a new news datums
proc/make_report(body, author, okey, cid)
var/savefile/Reports = new("data/reports.sav")
var/list/reports
var/lastID
Reports["reports"] >> reports
Reports["lastID"] >> lastID
if(!reports) reports = list()
if(!lastID) lastID = 0
var/datum/admin_report/created = new()
created.ID = ++lastID
created.body = body
created.author = author
created.date = world.realtime
created.done = 0
created.offender_key = okey
created.offender_cid = cid
reports.Insert(1, created)
Reports["reports"] << reports
Reports["lastID"] << lastID
// load the reports from disk
proc/load_reports()
var/savefile/Reports = new("data/reports.sav")
var/list/reports
Reports["reports"] >> reports
if(!reports) reports = list()
return reports
// check if there are any unhandled reports
client/proc/unhandled_reports()
if(!src.holder) return 0
var/list/reports = load_reports()
for(var/datum/admin_report/N in reports)
if(N.done)
continue
else return 1
return 0
// checks if the player has an unhandled report against him
client/proc/is_reported()
var/list/reports = load_reports()
for(var/datum/admin_report/N in reports) if(!N.done)
if(N.offender_key == src.key)
return 1
return 0
// display only the reports that haven't been handled
client/proc/display_admin_reports()
set category = "Admin"
set name = "Display Admin Reports"
if(!src.holder) return
var/list/reports = load_reports()
var/output = ""
if(unhandled_reports())
// load the list of unhandled reports
for(var/datum/admin_report/N in reports)
if(N.done)
continue
output += "<b>Reported player:</b> [N.offender_key](CID: [N.offender_cid])<br>"
output += "<b>Offense:</b>[N.body]<br>"
output += "<small>Occured at [time2text(N.date,"MM/DD hh:mm:ss")]</small><br>"
output += "<small>authored by <i>[N.author]</i></small><br>"
output += " <a href='?src=\ref[report_topic_handler];client=\ref[src];action=remove;ID=[N.ID]'>Flag as Handled</a>"
if(src.key == N.author)
output += " <a href='?src=\ref[report_topic_handler];client=\ref[src];action=edit;ID=[N.ID]'>Edit</a>"
output += "<br>"
output += "<br>"
else
output += "Whoops, no reports!"
usr << browse(output, "window=news;size=600x400")
client/proc/Report(mob/M as mob in mob_list)
set category = "Admin"
if(!src.holder)
return
var/CID = "Unknown"
if(M.client)
CID = M.client.computer_id
var/body = input(src.mob, "Describe in detail what you're reporting [M] for", "Report") as null|text
if(!body) return
make_report(body, key, M.key, CID)
spawn(1)
display_admin_reports()
client/proc/mark_report_done(ID as num)
if(!src.holder || src.holder.level < 0)
return
var/savefile/Reports = new("data/reports.sav")
var/list/reports
Reports["reports"] >> reports
var/datum/admin_report/found
for(var/datum/admin_report/N in reports)
if(N.ID == ID)
found = N
if(!found) src << "<b>* An error occured, sorry.</b>"
found.done = 1
Reports["reports"] << reports
client/proc/edit_report(ID as num)
if(!src.holder || src.holder.level < 0)
src << "<b>You tried to modify the news, but you're not an admin!</b>"
return
var/savefile/Reports = new("data/reports.sav")
var/list/reports
Reports["reports"] >> reports
var/datum/admin_report/found
for(var/datum/admin_report/N in reports)
if(N.ID == ID)
found = N
if(!found) src << "<b>* An error occured, sorry.</b>"
var/body = input(src.mob, "Enter a body for the news", "Body") as null|message
if(!body) return
found.body = body
Reports["reports"] << reports
+110
View File
@@ -0,0 +1,110 @@
var/datum/admin_secrets/admin_secrets = new()
/datum/admin_secrets
var/list/datum/admin_secret_category/categories
var/list/datum/admin_secret_item/items
/datum/admin_secrets/New()
..()
categories = init_subtypes(/datum/admin_secret_category)
items = list()
var/list/category_assoc = list()
for(var/datum/admin_secret_category/category in categories)
category_assoc[category.type] = category
for(var/item_type in (typesof(/datum/admin_secret_item) - /datum/admin_secret_item))
var/datum/admin_secret_item/secret_item = item_type
if(!initial(secret_item.name))
continue
var/datum/admin_secret_item/item = new item_type()
var/datum/admin_secret_category/category = category_assoc[item.category]
dd_insertObjectList(category.items, item)
items += item
/datum/admin_secret_category
var/name = ""
var/desc = ""
var/list/datum/admin_secret_item/items
/datum/admin_secret_category
..()
items = list()
/datum/admin_secret_category/proc/can_view(var/mob/user)
for(var/datum/admin_secret_item/item in items)
if(item.can_view(user))
return 1
return 0
/datum/admin_secret_item
var/name = ""
var/category = null
var/log = 1
var/feedback = 1
var/permissions = R_HOST
var/warn_before_use = 0
/datum/admin_secret_item/dd_SortValue()
return "[name]"
/datum/admin_secret_item/proc/name()
return name
/datum/admin_secret_item/proc/can_view(var/mob/user)
return check_rights(permissions, 0, user)
/datum/admin_secret_item/proc/can_execute(var/mob/user)
if(can_view(user))
if(!warn_before_use || alert("Execute the command '[name]'?", name, "No","Yes") == "Yes")
return 1
return 0
/datum/admin_secret_item/proc/execute(var/mob/user)
if(!can_execute(user))
return 0
if(log)
log_and_message_admins("used secret '[name]'", user)
if(feedback)
feedback_inc("admin_secrets_used",1)
feedback_add_details("admin_secrets_used","[name]")
return 1
/*************************
* Pre-defined categories *
*************************/
/datum/admin_secret_category/admin_secrets
name = "Admin Secrets"
/datum/admin_secret_category/random_events
name = "'Random' Events"
/datum/admin_secret_category/fun_secrets
name = "Fun Secrets"
/datum/admin_secret_category/final_solutions
name = "Final Solutions"
desc = "(Warning, these will end the round!)"
/*************************
* Pre-defined base items *
*************************/
/datum/admin_secret_item/admin_secret
category = /datum/admin_secret_category/admin_secrets
log = 0
permissions = R_ADMIN
/datum/admin_secret_item/random_event
category = /datum/admin_secret_category/random_events
permissions = R_FUN
warn_before_use = 1
/datum/admin_secret_item/fun_secret
category = /datum/admin_secret_category/fun_secrets
permissions = R_FUN
warn_before_use = 1
/datum/admin_secret_item/final_solution
category = /datum/admin_secret_category/final_solutions
permissions = R_FUN|R_SERVER|R_ADMIN
+46 -35
View File
@@ -1,6 +1,6 @@
//admin verb groups - They can overlap if you so wish. Only one of each verb will exist in the verbs list regardless
var/list/admin_verbs_default = list(
/datum/admins/proc/show_player_panel, /*shows an interface for individual players, with various links (links require additional flags*/
/datum/admins/proc/show_player_panel, //shows an interface for individual players, with various links (links require additional flags,
/client/proc/player_panel,
/client/proc/toggleadminhelpsound, /*toggles whether we hear a sound when adminhelps/PMs are used*/
/client/proc/deadmin_self, /*destroys our own admin datum so we can play as a regular player*/
@@ -37,18 +37,18 @@ var/list/admin_verbs_admin = list(
/client/proc/Getkey, /*teleports a mob with a certain ckey to our location*/
// /client/proc/sendmob, /*sends a mob somewhere*/ -Removed due to it needing two sorting procs to work, which were executed every time an admin right-clicked. ~Errorage
/client/proc/Jump,
/client/proc/jumptokey, /*allows us to jump to the location of a mob with a certain ckey*/
/client/proc/jumptomob, /*allows us to jump to a specific mob*/
/client/proc/jumptoturf, /*allows us to jump to a specific turf*/
/client/proc/admin_call_shuttle, /*allows us to call the emergency shuttle*/
/client/proc/admin_cancel_shuttle, /*allows us to cancel the emergency shuttle, sending it back to centcomm*/
/client/proc/cmd_admin_direct_narrate, /*send text directly to a player with no padding. Useful for narratives and fluff-text*/
/client/proc/cmd_admin_world_narrate, /*sends text to all players with no padding*/
/client/proc/jumptokey, //allows us to jump to the location of a mob with a certain ckey,
/client/proc/jumptomob, //allows us to jump to a specific mob,
/client/proc/jumptoturf, //allows us to jump to a specific turf,
/client/proc/admin_call_shuttle, //allows us to call the emergency shuttle,
/client/proc/admin_cancel_shuttle, //allows us to cancel the emergency shuttle, sending it back to centcomm,
/client/proc/cmd_admin_direct_narrate, //send text directly to a player with no padding. Useful for narratives and fluff-text,
/client/proc/cmd_admin_world_narrate, //sends text to all players with no padding,
/client/proc/cmd_admin_create_centcom_report,
/client/proc/check_words, /*displays cult-words*/
/client/proc/check_ai_laws, /*shows AI and borg laws*/
/client/proc/rename_silicon, /*properly renames silicons*/
/client/proc/manage_silicon_laws, /* Allows viewing and editing silicon laws. */
/client/proc/check_words, //displays cult-words,
/client/proc/check_ai_laws, //shows AI and borg laws,
/client/proc/rename_silicon, //properly renames silicons,
/client/proc/manage_silicon_laws, // Allows viewing and editing silicon laws. ,
/client/proc/check_antagonists,
/client/proc/admin_memo_control, /*admin memo system. show/delete/write. +SERVER needed to delete admin memos of others*/
/client/proc/dsay, /*talk in deadchat using our ckey/fakekey*/
@@ -57,16 +57,17 @@ var/list/admin_verbs_admin = list(
/client/proc/toggle_hear_radio, /*toggles whether we hear the radio*/
/client/proc/investigate_show, /*various admintools for investigation. Such as a singulo grief-log*/
/client/proc/secrets,
/datum/admins/proc/toggleooc, /*toggles ooc on/off for everyone*/
/datum/admins/proc/togglelooc, /*toggles looc on/off for everyone*/
/datum/admins/proc/toggleoocdead, /*toggles ooc on/off for everyone who is dead*/
/datum/admins/proc/toggledsay, /*toggles dsay on/off for everyone*/
/client/proc/game_panel, /*game panel, allows to change game-mode etc*/
/client/proc/cmd_admin_say, /*admin-only ooc chat*/
/datum/admins/proc/toggleooc, //toggles ooc on/off for everyone,
/datum/admins/proc/togglelooc, //toggles looc on/off for everyone,
/datum/admins/proc/toggleoocdead, //toggles ooc on/off for everyone who is dead,
/datum/admins/proc/toggledsay, //toggles dsay on/off for everyone,
/client/proc/game_panel, //game panel, allows to change game-mode etc,
/client/proc/cmd_admin_say, //admin-only ooc chat,
/datum/admins/proc/togglehubvisibility, //toggles visibility on the BYOND Hub,
/datum/admins/proc/PlayerNotes,
/client/proc/cmd_mod_say,
/datum/admins/proc/show_player_info,
/client/proc/free_slot, /*frees slot for chosen job*/
/client/proc/free_slot, //frees slot for chosen job,
/client/proc/cmd_admin_change_custom_event,
/client/proc/cmd_admin_rejuvenate,
/client/proc/toggleattacklogs,
@@ -77,15 +78,15 @@ var/list/admin_verbs_admin = list(
/client/proc/check_customitem_activity,
/client/proc/man_up,
/client/proc/global_man_up,
/client/proc/response_team, // Response Teams admin verb
/client/proc/response_team, // Response Teams admin verb,
/client/proc/toggle_antagHUD_use,
/client/proc/toggle_antagHUD_restrictions,
/client/proc/allow_character_respawn, /* Allows a ghost to respawn */
/client/proc/allow_character_respawn, // Allows a ghost to respawn ,
/client/proc/event_manager_panel,
/client/proc/empty_ai_core_toggle_latejoin,
/client/proc/aooc,
/client/proc/change_human_appearance_admin, /* Allows an admin to change the basic appearance of human-based mobs */
/client/proc/change_human_appearance_self, /* Allows the human-based mob itself change its basic appearance */
/client/proc/change_human_appearance_admin, // Allows an admin to change the basic appearance of human-based mobs ,
/client/proc/change_human_appearance_self, // Allows the human-based mob itself change its basic appearance ,
/client/proc/change_security_level,
/client/proc/view_chemical_reaction_logs,
/client/proc/makePAI,
@@ -113,7 +114,7 @@ var/list/admin_verbs_fun = list(
/client/proc/cmd_admin_dress,
/client/proc/cmd_admin_gib_self,
/client/proc/drop_bomb,
/client/proc/everyone_random,
/client/proc/everyone_random,
/client/proc/cinematic,
/datum/admins/proc/toggle_aliens,
/datum/admins/proc/toggle_space_ninja,
@@ -123,19 +124,23 @@ var/list/admin_verbs_fun = list(
/client/proc/toggle_random_events,
/client/proc/editappear,
/client/proc/roll_dices,
/datum/admins/proc/create_admin_fax
/datum/admins/proc/create_admin_fax,
/datum/admins/proc/call_supply_drop,
/datum/admins/proc/call_drop_pod
)
var/list/admin_verbs_spawn = list(
/datum/admins/proc/spawn_fruit,
/datum/admins/proc/spawn_custom_item,
/datum/admins/proc/check_custom_items,
/datum/admins/proc/spawn_plant,
/datum/admins/proc/spawn_atom, /*allows us to spawn instances*/
/datum/admins/proc/spawn_atom, // allows us to spawn instances,
/client/proc/respawn_character,
/client/proc/virus2_editor,
/client/proc/spawn_chemdisp_cartridge
)
var/list/admin_verbs_server = list(
/datum/admins/proc/capture_map,
/client/proc/Set_Holiday,
/client/proc/ToRban,
/datum/admins/proc/startnow,
@@ -146,7 +151,7 @@ var/list/admin_verbs_server = list(
/datum/admins/proc/immreboot,
/client/proc/everyone_random,
/datum/admins/proc/toggleAI,
/client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/
/client/proc/cmd_admin_delete, // delete an instance/object/mob/etc,
/client/proc/cmd_debug_del_all,
/datum/admins/proc/adrev,
/datum/admins/proc/adspawn,
@@ -159,7 +164,7 @@ var/list/admin_verbs_server = list(
/client/proc/admin_edit_motd
)
var/list/admin_verbs_debug = list(
/client/proc/getruntimelog, /*allows us to access runtime logs to somebody*/
/client/proc/getruntimelog, // allows us to access runtime logs to somebody,
/client/proc/cmd_admin_list_open_jobs,
/client/proc/Debug2,
/client/proc/kill_air,
@@ -178,9 +183,13 @@ var/list/admin_verbs_debug = list(
/client/proc/restart_controller,
/client/proc/print_random_map,
/client/proc/create_random_map,
/client/proc/apply_random_map,
/client/proc/overlay_random_map,
/client/proc/delete_random_map,
/client/proc/show_plant_genes,
/client/proc/enable_debug_verbs,
/client/proc/callproc,
/client/proc/callproc_target,
/client/proc/toggledebuglogs,
/client/proc/SDQL_query,
/client/proc/SDQL2_query,
@@ -192,6 +201,7 @@ var/list/admin_verbs_debug = list(
var/list/admin_verbs_paranoid_debug = list(
/client/proc/callproc,
/client/proc/callproc_target,
/client/proc/debug_controller
)
@@ -261,6 +271,7 @@ var/list/admin_verbs_hideable = list(
/client/proc/restart_controller,
/client/proc/cmd_admin_list_open_jobs,
/client/proc/callproc,
/client/proc/callproc_target,
/client/proc/Debug2,
/client/proc/reload_admins,
/client/proc/kill_air,
@@ -278,12 +289,12 @@ var/list/admin_verbs_hideable = list(
/proc/release
)
var/list/admin_verbs_mod = list(
/client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/
/client/proc/cmd_admin_pm_panel, /*admin-pm list*/
/client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game.*/
/client/proc/cmd_admin_pm_context, // right-click adminPM interface,
/client/proc/cmd_admin_pm_panel, // admin-pm list,
/client/proc/debug_variables, // allows us to -see- the variables of any instance in the game.,
/client/proc/toggledebuglogs,
/datum/admins/proc/PlayerNotes,
/client/proc/admin_ghost, /*allows us to ghost/reenter body at will*/
/client/proc/admin_ghost, // allows us to ghost/reenter body at will,
/client/proc/cmd_mod_say,
/datum/admins/proc/show_player_info,
/client/proc/player_panel_new,
@@ -634,7 +645,7 @@ var/list/admin_verbs_cciaa = list(
log_admin("[key_name(usr)] gave [key_name(T)] a [greater] disease2 with infection chance [D.infectionchance].")
message_admins("\blue [key_name_admin(usr)] gave [key_name(T)] a [greater] disease2 with infection chance [D.infectionchance].", 1)
/client/proc/make_sound(var/obj/O in world) // -- TLE
/client/proc/make_sound(var/obj/O in range(world.view)) // -- TLE
set category = "Special Verbs"
set name = "Make Sound"
set desc = "Display a message to everyone who can hear the target"
@@ -697,7 +708,7 @@ var/list/admin_verbs_cciaa = list(
set category = "Admin"
if(holder)
if(alert("Confirm self-deadmin for the round? You can't re-admin yourself without someont promoting you.",,"Yes","No") == "Yes")
if(alert("Confirm self-deadmin for the round? You can re-admin yourself at any time.",,"Yes","No") == "Yes")
log_admin("[src] deadmined themself.")
message_admins("[src] deadmined themself.", 1)
deadmin()
@@ -747,7 +758,7 @@ var/list/admin_verbs_cciaa = list(
var/mob/living/silicon/S = input("Select silicon.", "Manage Silicon Laws") as null|anything in silicon_mob_list
if(!S) return
var/obj/nano_module/law_manager/L = new(S)
var/datum/nano_module/law_manager/L = new(S)
L.ui_interact(usr, state = admin_state)
log_and_message_admins("has opened [S]'s law manager.")
feedback_add_details("admin_verb","MSL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+152
View File
@@ -0,0 +1,152 @@
/client/proc/callproc()
set category = "Debug"
set name = "Advanced ProcCall"
if(!check_rights(R_DEBUG)) return
if(config.debugparanoid && !check_rights(R_ADMIN)) return
var/target = null
var/targetselected = 0
switch(alert("Proc owned by something?",, "Yes", "No", "Cancel"))
if("Yes")
targetselected=1
switch(input("Proc owned by...", "Owner", null) as null|anything in list("Obj", "Mob", "Area or Turf", "Client"))
if("Obj")
target = input("Select target:", "Target") as null|obj in world
if("Mob")
target = input("Select target:", "Target", usr) as null|mob in world
if("Area or Turf")
target = input("Select target:", "Target", get_turf(usr)) as null|area|turf in world
if("Client")
target = input("Select target:", "Target", usr.client) as null|anything in clients
else
return
if(!target)
usr << "Proc call cancelled."
return
if("Cancel")
return
if("No")
; // do nothing
callproc_targetpicked(targetselected, target)
/client/proc/callproc_target(atom/A in range(world.view))
set category = "Debug"
set name = "Advanced ProcCall Target"
if(!check_rights(R_DEBUG)) return
if(config.debugparanoid && !check_rights(R_ADMIN)) return
callproc_targetpicked(1, A)
/client/proc/callproc_targetpicked(hastarget, datum/target)
// this needs checking again here because VV's 'Call Proc' option directly calls this proc with the target datum
if(!check_rights(R_DEBUG)) return
if(config.debugparanoid && !check_rights(R_ADMIN)) return
var/returnval = null
var/procname = input("Proc name", "Proc") as null|text
if(!procname) return
if(hastarget)
if(!target)
usr << "Your callproc target no longer exists."
return
if(!hascall(target, procname))
usr << "\The [target] has no call [procname]()"
return
var/list/arguments = list()
var/done = 0
var/current = null
while(!done)
if(hastarget && !target)
usr << "Your callproc target no longer exists."
return
switch(input("Type of [arguments.len+1]\th variable", "argument [arguments.len+1]") as null|anything in list(
"finished", "null", "text", "num", "type", "obj reference", "mob reference",
"area/turf reference", "icon", "file", "client", "mob's area", "marked datum"))
if(null)
return
if("finished")
done = 1
if("null")
current = null
if("text")
current = input("Enter text for [arguments.len+1]\th argument") as null|text
if(isnull(current)) return
if("num")
current = input("Enter number for [arguments.len+1]\th argument") as null|num
if(isnull(current)) return
if("type")
current = input("Select type for [arguments.len+1]\th argument") as null|anything in typesof(/obj, /mob, /area, /turf)
if(isnull(current)) return
if("obj reference")
current = input("Select object for [arguments.len+1]\th argument") as null|obj in world
if(isnull(current)) return
if("mob reference")
current = input("Select mob for [arguments.len+1]\th argument") as null|mob in world
if(isnull(current)) return
if("area/turf reference")
current = input("Select area/turf for [arguments.len+1]\th argument") as null|area|turf in world
if(isnull(current)) return
if("icon")
current = input("Provide icon for [arguments.len+1]\th argument") as null|icon
if(isnull(current)) return
if("client")
current = input("Select client for [arguments.len+1]\th argument") as null|anything in clients
if(isnull(current)) return
if("mob's area")
var/mob/M = input("Select mob to take area for [arguments.len+1]\th argument") as null|mob in world
if(!M) return
current = get_area(M)
if(!current)
switch(alert("\The [M] appears to not have an area; do you want to pass null instead?",, "Yes", "Cancel"))
if("Yes")
; // do nothing
if("Cancel")
return
if("marked datum")
current = holder.marked_datum
if(!current)
switch(alert("You do not currently have a marked datum; do you want to pass null instead?",, "Yes", "Cancel"))
if("Yes")
; // do nothing
if("Cancel")
return
if(!done)
arguments += current
if(hastarget)
if(!target)
usr << "Your callproc target no longer exists."
return
log_admin("[key_name(src)] called [target]'s [procname]() with [arguments.len ? "the arguments [list2params(arguments)]" : "no arguments"].")
if(arguments.len)
returnval = call(target, procname)(arglist(arguments))
else
returnval = call(target, procname)()
else
log_admin("[key_name(src)] called [procname]() with [arguments.len ? "the arguments [list2params(arguments)]" : "no arguments"].")
returnval = call(procname)(arglist(arguments))
usr << "<span class='info'>[procname]() returned: [isnull(returnval) ? "null" : returnval]</span>"
feedback_add_details("admin_verb","APC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+1 -1
View File
@@ -20,7 +20,7 @@ var/list/admin_datums = list()
error("Admin datum created without a ckey argument. Datum has been deleted")
qdel(src)
return
admincaster_signature = "Nanotrasen Officer #[rand(0,9)][rand(0,9)][rand(0,9)]"
admincaster_signature = "[company_name] Officer #[rand(0,9)][rand(0,9)][rand(0,9)]"
rank = initial_rank
rights = initial_rights
admin_datums[ckey] = src
+26
View File
@@ -0,0 +1,26 @@
/datum/admins/proc/capture_map(tx as null|num, ty as null|num, tz as null|num, range as null|num)
set category = "Server"
set name = "Capture Map Part"
set desc = "Usage: Capture-Map-Part target_x_cord target_y_cord target_z_cord range (captures part of a map originating from bottom left corner)"
if(!check_rights(R_ADMIN|R_DEBUG|R_SERVER))
usr << "You are not allowed to use this command"
return
if(isnull(tx) || isnull(ty) || isnull(tz) || isnull(range))
usr << "Capture Map Part, captures part of a map using camara like rendering."
usr << "Usage: Capture-Map-Part target_x_cord target_y_cord target_z_cord range"
usr << "Target coordinates specify bottom left corner of the capture, range defines render distance to opposite corner."
return
if(range > 32 || range <= 0)
usr << "Capturing range is incorrect, it must be within 1-32."
return
if(locate(tx,ty,tz))
var/cap = generate_image(tx ,ty ,tz ,range, CAPTURE_MODE_PARTIAL, null, 1, 1)
var/file_name = "map_capture_x[tx]_y[ty]_z[tz]_r[range].png"
usr << "Saved capture in cache as [file_name]."
usr << browse_rsc(cap, file_name)
else
usr << "Target coordinates are incorrect."
@@ -33,7 +33,7 @@
output += "<tr>"
output += "<td style='text-align:right;'>[adm_ckey] <a class='small' href='?src=\ref[src];editrights=remove;ckey=[adm_ckey]'>\[-\]</a></td>"
output += "<td><a href='?src=\ref[src];editrights=rank;ckey=[adm_ckey]'>[rank]</a></td>"
output += "<td><a class='small' href='?src=\ref[src];editrights=permissions;ckey=[adm_ckey]'>[rights]</a></font></td>"
output += "<td><a class='small' href='?src=\ref[src];editrights=permissions;ckey=[adm_ckey]'>[rights]</a></td>"
output += "</tr>"
output += {"
+1 -1
View File
@@ -291,7 +291,7 @@
<a id='link[i]'
onmouseover='expand("item[i]","[M_job]","[M_name]","[M_rname]","--unused--","[M_key]","[M.lastKnownIP]",[is_antagonist],"\ref[M]")'
>
<b id='search[i]'>[M_name] - [M_rname] - [M_key] ([M_job])</b>
<span id='search[i]'><b>[M_name] - [M_rname] - [M_key] ([M_job])</b></span>
</a>
<br><span id='item[i]'></span>
</td>
@@ -0,0 +1,13 @@
/datum/admin_secret_item/admin_secret/admin_logs
name = "Admin Logs"
/datum/admin_secret_item/admin_secret/admin_logs/execute(var/mob/user)
. = ..()
if(!.)
return
var/dat = "<B>Admin Log<HR></B>"
for(var/l in admin_log)
dat += "<li>[l]</li>"
if(!admin_log.len)
dat += "No-one has done anything this round!"
user << browse(dat, "window=admin_log")
@@ -0,0 +1,14 @@
/datum/admin_secret_item/admin_secret/alter_narise
name = "Alter Nar-Sie"
/datum/admin_secret_item/admin_secret/alter_narise/execute(var/mob/user)
. = ..()
if(!.)
return
var/choice = input(user, "How do you wish for Nar-Sie to interact with its surroundings?") as null|anything in list("CultStation13", "Nar-Singulo")
if(choice == "CultStation13")
log_and_message_admins("has set narsie's behaviour to \"CultStation13\".", user)
narsie_behaviour = choice
if(choice == "Nar-Singulo")
log_and_message_admins("has set narsie's behaviour to \"Nar-Singulo\".", user)
narsie_behaviour = choice
@@ -0,0 +1,12 @@
/datum/admin_secret_item/admin_secret/bombing_list
name = "Bombing List"
/datum/admin_secret_item/admin_secret/bombing_list/execute(var/mob/user)
. = ..()
if(!.)
return
var/dat = "<B>Bombing List</B>"
for(var/l in bombers)
dat += text("[l]<BR>")
user << browse(dat, "window=bombers")
@@ -0,0 +1,36 @@
/datum/admin_secret_item/admin_secret/jump_shuttle
name = "Jump a Shuttle"
/datum/admin_secret_item/admin_secret/jump_shuttle/can_execute(var/mob/user)
if(!shuttle_controller) return 0
return ..()
/datum/admin_secret_item/admin_secret/jump_shuttle/execute(var/mob/user)
. = ..()
if(!.)
return
var/shuttle_tag = input(user, "Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles
if (!shuttle_tag) return
var/datum/shuttle/S = shuttle_controller.shuttles[shuttle_tag]
var/origin_area = input(user, "Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!origin_area) return
var/destination_area = input(user, "Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!destination_area) return
var/long_jump = alert(user, "Is there a transition area for this jump?","", "Yes", "No")
if (long_jump == "Yes")
var/transition_area = input(user, "Which area is the transition area? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!transition_area) return
var/move_duration = input(user, "How many seconds will this jump take?") as num
S.long_jump(origin_area, destination_area, transition_area, move_duration)
message_admins("<span class='notice'>[key_name_admin(user)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle</span>", 1)
log_admin("[key_name_admin(user)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle")
else
S.short_jump(origin_area, destination_area)
message_admins("<span class='notice'>[key_name_admin(user)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle</span>", 1)
log_admin("[key_name_admin(user)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle")
@@ -0,0 +1,26 @@
/datum/admin_secret_item/admin_secret/launch_shuttle
name = "Launch a Shuttle"
/datum/admin_secret_item/admin_secret/launch_shuttle/can_execute(var/mob/user)
if(!shuttle_controller) return 0
return ..()
/datum/admin_secret_item/admin_secret/launch_shuttle/execute(var/mob/user)
. = ..()
if(!.)
return
var/list/valid_shuttles = list()
for (var/shuttle_tag in shuttle_controller.shuttles)
if (istype(shuttle_controller.shuttles[shuttle_tag], /datum/shuttle/ferry))
valid_shuttles += shuttle_tag
var/shuttle_tag = input(user, "Which shuttle do you want to launch?") as null|anything in valid_shuttles
if (!shuttle_tag)
return
var/datum/shuttle/ferry/S = shuttle_controller.shuttles[shuttle_tag]
if (S.can_launch())
S.launch(user)
log_and_message_admins("launched the [shuttle_tag] shuttle", user)
else
alert(user, "The [shuttle_tag] shuttle cannot be launched at this time. It's probably busy.")
@@ -0,0 +1,26 @@
/datum/admin_secret_item/admin_secret/launch_shuttle_forced
name = "Launch a Shuttle (Forced)"
/datum/admin_secret_item/admin_secret/launch_shuttle_forced/can_execute(var/mob/user)
if(!shuttle_controller) return 0
return ..()
/datum/admin_secret_item/admin_secret/launch_shuttle_forced/execute(var/mob/user)
. = ..()
if(!.)
return
var/list/valid_shuttles = list()
for (var/shuttle_tag in shuttle_controller.shuttles)
if (istype(shuttle_controller.shuttles[shuttle_tag], /datum/shuttle/ferry))
valid_shuttles += shuttle_tag
var/shuttle_tag = input(user, "Which shuttle's launch do you want to force?") as null|anything in valid_shuttles
if (!shuttle_tag)
return
var/datum/shuttle/ferry/S = shuttle_controller.shuttles[shuttle_tag]
if (S.can_force())
S.force_launch(user)
log_and_message_admins("forced the [shuttle_tag] shuttle", user)
else
alert(user, "The [shuttle_tag] shuttle launch cannot be forced at this time. It's busy, or hasn't been launched yet.")
@@ -0,0 +1,14 @@
/datum/admin_secret_item/admin_secret/list_dna
name = "List DNA (Blood)"
/datum/admin_secret_item/admin_secret/list_dna/execute(var/mob/user)
. = ..()
if(!.)
return
var/dat = "<B>Showing DNA from blood.</B><HR>"
dat += "<table cellspacing=5><tr><th>Name</th><th>DNA</th><th>Blood Type</th></tr>"
for(var/mob/living/carbon/human/H in mob_list)
if(H.dna && H.ckey)
dat += "<tr><td>[H]</td><td>[H.dna.unique_enzymes]</td><td>[H.b_type]</td></tr>"
dat += "</table>"
user << browse(dat, "window=DNA;size=440x410")
@@ -0,0 +1,19 @@
/datum/admin_secret_item/admin_secret/list_fingerprints
name = "List Fingerprints"
/datum/admin_secret_item/admin_secret/list_fingerprints/execute(var/mob/user)
. = ..()
if(!.)
return
var/dat = "<B>Showing Fingerprints.</B><HR>"
dat += "<table cellspacing=5><tr><th>Name</th><th>Fingerprints</th></tr>"
for(var/mob/living/carbon/human/H in mob_list)
if(H.ckey)
if(H.dna && H.dna.uni_identity)
dat += "<tr><td>[H]</td><td>[md5(H.dna.uni_identity)]</td></tr>"
else if(H.dna && !H.dna.uni_identity)
dat += "<tr><td>[H]</td><td>H.dna.uni_identity = null</td></tr>"
else if(!H.dna)
dat += "<tr><td>[H]</td><td>H.dna = null</td></tr>"
dat += "</table>"
user << browse(dat, "window=fingerprints;size=440x410")
@@ -0,0 +1,28 @@
/datum/admin_secret_item/admin_secret/move_shuttle
name = "Move a Shuttle"
/datum/admin_secret_item/admin_secret/move_shuttle/can_execute(var/mob/user)
if(!shuttle_controller) return 0
return ..()
/datum/admin_secret_item/admin_secret/move_shuttle/execute(var/mob/user)
. = ..()
if(!.)
return
var/confirm = alert(user, "This command directly moves a shuttle from one area to another. DO NOT USE THIS UNLESS YOU ARE DEBUGGING A SHUTTLE AND YOU KNOW WHAT YOU ARE DOING.", "Are you sure?", "Ok", "Cancel")
if (confirm == "Cancel")
return
var/shuttle_tag = input(user, "Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles
if (!shuttle_tag) return
var/datum/shuttle/S = shuttle_controller.shuttles[shuttle_tag]
var/origin_area = input(user, "Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!origin_area) return
var/destination_area = input(user, "Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!destination_area) return
S.move(origin_area, destination_area)
log_and_message_admins("moved the [shuttle_tag] shuttle", user)
@@ -0,0 +1,38 @@
/datum/admin_secret_item/admin_secret/prison_warp
name = "Prison Warp"
/datum/admin_secret_item/admin_secret/prison_warp/can_execute(var/mob/user)
if(!ticker) return 0
return ..()
/datum/admin_secret_item/admin_secret/prison_warp/execute(var/mob/user)
. = ..()
if(!.)
return
for(var/mob/living/carbon/human/H in mob_list)
var/turf/T = get_turf(H)
var/security = 0
if((T && T in config.admin_levels) || 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, /obj/item/organ/external))
continue
//don't strip organs
H.drop_from_inventory(W)
//teleport person to cell
H.loc = pick(prisonwarp)
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/orange(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(H), slot_shoes)
else
//teleport security person
H.loc = pick(prisonsecuritywarp)
prisonwarped += H
@@ -0,0 +1,7 @@
/datum/admin_secret_item/admin_secret/show_ai_laws
name = "Show AI laws"
/datum/admin_secret_item/admin_secret/show_ai_laws/execute(var/mob/user)
. = ..()
if(.)
user.client.holder.output_ai_laws()
@@ -0,0 +1,12 @@
/datum/admin_secret_item/admin_secret/show_crew_manifest
name = "Show Crew Manifest"
/datum/admin_secret_item/admin_secret/show_crew_manifest/execute(var/mob/user)
. = ..()
if(!.)
return
var/dat
dat += "<h4>Crew Manifest</h4>"
dat += data_core.get_manifest()
user << browse(dat, "window=manifest;size=370x420;can_close=1")
@@ -0,0 +1,14 @@
/datum/admin_secret_item/admin_secret/show_game_mode
name = "Show Game Mode"
/datum/admin_secret_item/admin_secret/show_game_mode/can_execute(var/mob/user)
if(!ticker)
return 0
return ..()
/datum/admin_secret_item/admin_secret/show_game_mode/execute(var/mob/user)
. = ..()
if(!.)
return
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")
@@ -0,0 +1,15 @@
/datum/admin_secret_item/admin_secret/show_law_changes
name = "Show law changes"
/datum/admin_secret_item/admin_secret/show_law_changes/name()
return "Show Last [length(lawchanges)] Law change\s"
/datum/admin_secret_item/admin_secret/show_law_changes/execute(var/mob/user)
. = ..()
if(!.)
return
var/dat = "<B>Showing last [length(lawchanges)] law changes.</B><HR>"
for(var/sig in lawchanges)
dat += "[sig]<BR>"
user << browse(dat, "window=lawchanges;size=800x500")
@@ -0,0 +1,15 @@
/datum/admin_secret_item/admin_secret/show_signalers
name = "Show Last Signalers"
/datum/admin_secret_item/admin_secret/show_signalers/name()
return "Show Last [length(lastsignalers)] Signaler\s"
/datum/admin_secret_item/admin_secret/show_signalers/execute(var/mob/user)
. = ..()
if(!.)
return
var/dat = "<B>Showing last [length(lastsignalers)] signalers.</B><HR>"
for(var/sig in lastsignalers)
dat += "[sig]<BR>"
user << browse(dat, "window=lastsignalers;size=800x500")
@@ -0,0 +1,7 @@
/datum/admin_secret_item/admin_secret/traitors_and_objectives
name = "Show current traitors and objectives"
/datum/admin_secret_item/admin_secret/traitors_and_objectives/execute(var/mob/user)
. = ..()
if(.)
user.client.holder.check_antagonists()
@@ -0,0 +1,11 @@
/datum/admin_secret_item/final_solution/summon_narsie
name = "Summon Nar-Sie"
/datum/admin_secret_item/final_solution/summon_narsie/execute(var/mob/user)
. = ..()
if(!.)
return
var/choice = input(user, "You sure you want to end the round and summon Nar-Sie at your location? Misuse of this could result in removal of flags or hilarity.") in list("PRAISE SATAN", "Cancel")
if(choice == "PRAISE SATAN")
new /obj/singularity/narsie/large(get_turf(user))
log_and_message_admins("has summoned Nar-Sie and brought about a new realm of suffering.", user)
@@ -0,0 +1,13 @@
/datum/admin_secret_item/final_solution/supermatter_cascade
name = "Supermatter Cascade"
/datum/admin_secret_item/final_solution/supermatter_cascade/execute(var/mob/user)
. = ..()
if(!.)
return
var/choice = input(user, "You sure you want to destroy the universe and create a large explosion at your location? Misuse of this could result in removal of flags or hilarity.") in list("NO TIME TO EXPLAIN", "Cancel")
if(choice == "NO TIME TO EXPLAIN")
explosion(get_turf(user), 8, 16, 24, 32, 1)
new /turf/unsimulated/wall/supermatter(get_turf(user))
SetUniversalState(/datum/universal_state/supermatter_cascade)
message_admins("[key_name_admin(user)] has managed to destroy the universe with a supermatter cascade. Good job, [key_name_admin(user)]")
@@ -0,0 +1,7 @@
/datum/admin_secret_item/fun_secret/break_all_lights
name = "Break All Lights"
/datum/admin_secret_item/fun_secret/break_all_lights/execute(var/mob/user)
. = ..()
if(.)
lightsout(0,0)
@@ -0,0 +1,7 @@
/datum/admin_secret_item/fun_secret/break_some_lights
name = "Break Some Lights"
/datum/admin_secret_item/fun_secret/break_some_lights/execute(var/mob/user)
. = ..()
if(.)
lightsout(1,2)
@@ -0,0 +1,10 @@
/datum/admin_secret_item/fun_secret/fix_all_lights
name = "Fix All Lights"
/datum/admin_secret_item/fun_secret/fix_all_lights/execute(var/mob/user)
. = ..()
if(!.)
return
for(var/obj/machinery/light/L in world)
L.fix()
@@ -0,0 +1,48 @@
/datum/admin_secret_item/fun_secret/ghost_mode
name = "Ghost Mode"
var/list/affected_mobs
/datum/admin_secret_item/fun_secret/ghost_mode/New()
..()
affected_mobs = list()
/datum/admin_secret_item/fun_secret/ghost_mode/execute(var/mob/user)
. = ..()
if(!.)
return
var/list/affected_areas = list()
for(var/mob/M in living_mob_list)
if(M.stat == CONSCIOUS && !(M in affected_mobs))
affected_mobs |= M
switch(rand(1,4))
if(1)
M.show_message(text("<span class='notice'>You shudder as if cold...</span>"), 1)
if(2)
M.show_message(text("<span class='notice'>You feel something gliding across your back...</span>"), 1)
if(3)
M.show_message(text("<span class='notice'>Your eyes twitch, you feel like something you can't see is here...</span>"), 1)
if(4)
M.show_message(text("<span class='notice'>You notice something moving out of the corner of your eye, but nothing is there...</span>"), 1)
for(var/obj/W in orange(5,M))
if(prob(25) && !W.anchored)
step_rand(W)
var/area/A = get_area(M)
if(A.requires_power && !A.always_unpowered && A.power_light && (A.z in config.player_levels))
affected_areas |= get_area(M)
affected_mobs |= user
for(var/area/AffectedArea in affected_areas)
AffectedArea.power_light = 0
AffectedArea.power_change()
spawn(rand(25,50))
AffectedArea.power_light = 1
AffectedArea.power_change()
sleep(100)
for(var/mob/M in affected_mobs)
M.show_message(text("<span class='notice'>The chilling wind suddenly stops...</span>"), 1)
affected_mobs.Cut()
affected_areas.Cut()
@@ -0,0 +1,7 @@
/datum/admin_secret_item/fun_secret/make_all_areas_powered
name = "Make All Areas Powered"
/datum/admin_secret_item/fun_secret/make_all_areas_powered/execute(var/mob/user)
. = ..()
if(.)
power_restore()
@@ -0,0 +1,7 @@
/datum/admin_secret_item/fun_secret/make_all_areas_unpowered
name = "Make All Areas Unpowered"
/datum/admin_secret_item/fun_secret/make_all_areas_unpowered/execute(var/mob/user)
. = ..()
if(.)
power_failure()
@@ -0,0 +1,7 @@
/datum/admin_secret_item/fun_secret/only_one
name = "There Can Be Only One"
/datum/admin_secret_item/fun_secret/only_one/execute(var/mob/user)
. = ..()
if(.)
only_one()
@@ -0,0 +1,14 @@
/datum/admin_secret_item/fun_secret/paintbal_mode
name = "Paintball Mode"
/datum/admin_secret_item/fun_secret/paintbal_mode/execute(var/mob/user)
. = ..()
if(!.)
return
for(var/species in all_species)
var/datum/species/S = all_species[species]
S.blood_color = "rainbow"
for(var/obj/effect/decal/cleanable/blood/B in world)
B.basecolor = "rainbow"
B.update_icon()
@@ -0,0 +1,7 @@
/datum/admin_secret_item/fun_secret/power_all_smes
name = "Power All SMES"
/datum/admin_secret_item/fun_secret/power_all_smes/execute(var/mob/user)
. = ..()
if(.)
power_restore_quick()
@@ -0,0 +1,10 @@
/datum/admin_secret_item/fun_secret/remove_all_clothing
name = "Remove ALL Clothing"
/datum/admin_secret_item/fun_secret/remove_all_clothing/execute(var/mob/user)
. = ..()
if(!.)
return
for(var/obj/item/clothing/O in world)
qdel(O)
@@ -0,0 +1,10 @@
/datum/admin_secret_item/fun_secret/remove_internal_clothing
name = "Remove 'Internal' Clothing"
/datum/admin_secret_item/fun_secret/remove_internal_clothing/execute(var/mob/user)
. = ..()
if(!.)
return
for(var/obj/item/clothing/under/O in world)
qdel(O)
@@ -0,0 +1,11 @@
/datum/admin_secret_item/fun_secret/send_strike_team
name = "Send Strike Team"
/datum/admin_secret_item/fun_secret/send_strike_team/can_execute(var/mob/user)
if(!ticker) return 0
return ..()
/datum/admin_secret_item/fun_secret/send_strike_team/execute(var/mob/user)
. = ..()
if(.)
return user.client.strike_team()
@@ -0,0 +1,21 @@
/datum/admin_secret_item/fun_secret/toggle_bomb_cap
name = "Toggle Bomb Cap"
permissions = R_SERVER
/datum/admin_secret_item/fun_secret/toggle_bomb_cap/execute(var/mob/user)
. = ..()
if(!.)
return
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("<span class='danger'>[key_name_admin(user)] changed the bomb cap to [range_dev], [range_high], [range_low]</span>", 1)
log_admin("[key_name_admin(user)] changed the bomb cap to [max_explosion_range]")
@@ -0,0 +1,13 @@
/datum/admin_secret_item/fun_secret/triple_ai_mode
name = "Triple AI Mode"
/datum/admin_secret_item/fun_secret/triple_ai_mode/can_execute(var/mob/user)
if(ticker && ticker.current_state > GAME_STATE_PREGAME)
return 0
return ..()
/datum/admin_secret_item/admin_secret/triple_ai_mode/execute(var/mob/user)
. = ..()
if(.)
user.client.triple_ai()
@@ -0,0 +1,11 @@
/datum/admin_secret_item/fun_secret/turn_humans_into_corgies
name = "Turn All Humans Into Corgies"
/datum/admin_secret_item/fun_secret/turn_humans_into_corgies/execute(var/mob/user)
. = ..()
if(!.)
return
for(var/mob/living/carbon/human/H in mob_list)
spawn(0)
H.corgize()
@@ -0,0 +1,11 @@
/datum/admin_secret_item/fun_secret/turn_humans_into_monkeys
name = "Turn All Humans Into Monkeys"
/datum/admin_secret_item/fun_secret/turn_humans_into_monkeys/execute(var/mob/user)
. = ..()
if(!.)
return
for(var/mob/living/carbon/human/H in mob_list)
spawn(0)
H.monkeyize()
@@ -0,0 +1,31 @@
/**********
* Gravity *
**********/
/datum/admin_secret_item/random_event/gravity
name = "Toggle Station Artificial Gravity"
/datum/admin_secret_item/random_event/gravity/can_execute(var/mob/user)
if(!(ticker && ticker.mode))
return 0
return ..()
/datum/admin_secret_item/random_event/gravity/execute(var/mob/user)
. = ..()
if(!.)
return
gravity_is_on = !gravity_is_on
for(var/area/A in world)
A.gravitychange(gravity_is_on,A)
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","Grav")
if(gravity_is_on)
log_admin("[key_name(user)] toggled gravity on.", 1)
message_admins("<span class='notice'>[key_name_admin(user)] toggled gravity on.", 1)
command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.</span>")
else
log_admin("[key_name(user)] toggled gravity off.", 1)
message_admins("<span class='notice'>[key_name_admin(usr)] toggled gravity off.", 1)
command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artificial gravity has been disabled whilst the system reinitializes. Further failures may result in a gravitational collapse and formation of blackholes. Have a nice day.</span>")
@@ -0,0 +1,7 @@
/datum/admin_secret_item/random_event/trigger_cordical_borer_infestation
name = "Trigger a Cortical Borer infestation"
/datum/admin_secret_item/random_event/trigger_cordical_borer_infestation/execute(var/mob/user)
. = ..()
if(.)
return borers.attempt_random_spawn()
@@ -0,0 +1,7 @@
/datum/admin_secret_item/random_event/trigger_xenomorph_infestation
name = "Trigger a Xenomorph Infestation"
/datum/admin_secret_item/random_event/trigger_xenomorph_infestation/execute(var/mob/user)
. = ..()
if(.)
return xenomorphs.attempt_random_spawn()
+27 -745
View File
@@ -1176,16 +1176,6 @@
log_admin("[key_name(usr)] AIized [key_name(H)]")
H.AIize()
else if(href_list["makealien"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makealien"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
return
usr.client.cmd_admin_alienize(H)
else if(href_list["makeslime"])
if(!check_rights(R_SPAWN)) return
@@ -1309,7 +1299,7 @@
src.owner << "Name = <b>[M.name]</b>; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = <b>[M.key]</b>;"
src.owner << "Location = [location_description];"
src.owner << "[special_role_description]"
src.owner << "(<a href='?src=\ref[usr];priv_msg=\ref[M]'>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];adminplayerobservejump=\ref[M]'>JMP</A>) (<A HREF='?src=\ref[src];secretsadmin=check_antagonist'>CA</A>)"
src.owner << "(<a href='?src=\ref[usr];priv_msg=\ref[M]'>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>) ([admin_jump_link(M, src)]) (<A HREF='?src=\ref[src];secretsadmin=check_antagonist'>CA</A>)"
else if(href_list["adminspawncookie"])
if(!check_rights(R_ADMIN|R_FUN)) return
@@ -1391,7 +1381,7 @@
src.owner << "You sent [input] to [L] via a secure channel."
log_admin("[src.owner] replied to [key_name(L)]'s Centcomm message with the message [input].")
message_admins("[src.owner] replied to [key_name(L)]'s Centcom message with: \"[input]\"")
if(!L.isMobAI())
if(!isAI(L))
L << "<span class='info'>You hear something crackle in your headset for a moment before a voice speaks.</span>"
L << "<span class='info'>Please stand by for a message from Central Command.</span>"
L << "<span class='info'>Message as follows.</span>"
@@ -1688,739 +1678,9 @@
log_and_message_admins("created [number] [english_list(paths)]")
return
else if(href_list["secretsfun"])
if(!check_rights(R_FUN)) return
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)
qdel(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)
qdel(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)
qdel(O)
for(var/obj/structure/grille/O in world)
qdel(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
qdel(O)
ok = 1*/
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 mob_list)
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 mob_list)
spawn(0)
H.corgize()
ok = 1
if("striketeam")
if(usr.client.strike_team())
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","Strike")
if("tripleAI")
usr.client.triple_ai()
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","TriAI")
if("gravity")
if(!(ticker && ticker.mode))
usr << "Please wait until the game starts! Not sure how it will work otherwise."
return
gravity_is_on = !gravity_is_on
for(var/area/A in world)
A.gravitychange(gravity_is_on,A)
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","Grav")
if(gravity_is_on)
log_admin("[key_name(usr)] toggled gravity on.", 1)
message_admins("\blue [key_name_admin(usr)] toggled gravity on.", 1)
command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.")
else
log_admin("[key_name(usr)] toggled gravity off.", 1)
message_admins("\blue [key_name_admin(usr)] toggled gravity off.", 1)
command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artifical gravity has been disabled whilst the system reinitializes. Further failures may result in a gravitational collapse and formation of blackholes. Have a nice day.")
if("wave")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","Meteor")
log_admin("[key_name(usr)] spawned a meteor wave", 1)
message_admins("\blue [key_name_admin(usr)] spawned a meteor wave.", 1)
new /datum/event/meteor_wave
if("goblob")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","Blob")
log_admin("[key_name(usr)] spawned a blob", 1)
message_admins("\blue [key_name_admin(usr)] spawned a blob.", 1)
new /datum/event/blob
if("aliens")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","Aliens")
log_admin("[key_name(usr)] spawned an alien infestation", 1)
message_admins("\blue [key_name_admin(usr)] attempted an alien infestation", 1)
xenomorphs.attempt_random_spawn()
if("borers")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","Borers")
log_admin("[key_name(usr)] spawned a cortical borer infestation.", 1)
message_admins("\blue [key_name_admin(usr)] spawned a cortical borer infestation.", 1)
borers.attempt_random_spawn()
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("quickpower")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","QP")
log_admin("[key_name(usr)] made all SMESs powered", 1)
message_admins("\blue [key_name_admin(usr)] made all SMESs powered", 1)
power_restore_quick()
if("activateprison")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","AP")
world << "\blue <B>Transit signature detected.</B>"
world << "\blue <B>Incoming shuttle.</B>"
/*
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 mob_list)
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, /obj/item/organ/external))
continue
//don't strip organs
H.drop_from_inventory(W)
//teleport person to cell
H.loc = pick(prisonwarp)
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/orange(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(H), slot_shoes)
else
//teleport security person
H.loc = pick(prisonsecuritywarp)
prisonwarped += H
if("launchshuttle")
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShL")
var/list/valid_shuttles = list()
for (var/shuttle_tag in shuttle_controller.shuttles)
if (istype(shuttle_controller.shuttles[shuttle_tag], /datum/shuttle/ferry))
valid_shuttles += shuttle_tag
var/shuttle_tag = input("Which shuttle do you want to launch?") as null|anything in valid_shuttles
if (!shuttle_tag)
return
var/datum/shuttle/ferry/S = shuttle_controller.shuttles[shuttle_tag]
if (S.can_launch())
S.launch(usr)
message_admins("\blue [key_name_admin(usr)] launched the [shuttle_tag] shuttle", 1)
log_admin("[key_name(usr)] launched the [shuttle_tag] shuttle")
else
alert("The [shuttle_tag] shuttle cannot be launched at this time. It's probably busy.")
if("forcelaunchshuttle")
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShFL")
var/list/valid_shuttles = list()
for (var/shuttle_tag in shuttle_controller.shuttles)
if (istype(shuttle_controller.shuttles[shuttle_tag], /datum/shuttle/ferry))
valid_shuttles += shuttle_tag
var/shuttle_tag = input("Which shuttle's launch do you want to force?") as null|anything in valid_shuttles
if (!shuttle_tag)
return
var/datum/shuttle/ferry/S = shuttle_controller.shuttles[shuttle_tag]
if (S.can_force())
S.force_launch(usr)
message_admins("\blue [key_name_admin(usr)] has forced the [shuttle_tag] shuttle launch", 1)
log_admin("[key_name(usr)] has forced the [shuttle_tag] shuttle launch")
else
alert("The [shuttle_tag] shuttle launch cannot be forced at this time. It's busy, or hasn't been launched yet.")
if("jumpshuttle")
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShJ")
var/shuttle_tag = input("Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles
if (!shuttle_tag) return
var/datum/shuttle/S = shuttle_controller.shuttles[shuttle_tag]
var/origin_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!origin_area) return
var/destination_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!destination_area) return
var/long_jump = alert("Is there a transition area for this jump?","", "Yes", "No")
if (long_jump == "Yes")
var/transition_area = input("Which area is the transition area? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!transition_area) return
var/move_duration = input("How many seconds will this jump take?") as num
S.long_jump(origin_area, destination_area, transition_area, move_duration)
message_admins("\blue [key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle", 1)
log_admin("[key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle")
else
S.short_jump(origin_area, destination_area)
message_admins("\blue [key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle", 1)
log_admin("[key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle")
if("moveshuttle")
if(!shuttle_controller) return // Something is very wrong, the shuttle controller has not been created.
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShM")
var/confirm = alert("This command directly moves a shuttle from one area to another. DO NOT USE THIS UNLESS YOU ARE DEBUGGING A SHUTTLE AND YOU KNOW WHAT YOU ARE DOING.", "Are you sure?", "Ok", "Cancel")
if (confirm == "Cancel")
return
var/shuttle_tag = input("Which shuttle do you want to jump?") as null|anything in shuttle_controller.shuttles
if (!shuttle_tag) return
var/datum/shuttle/S = shuttle_controller.shuttles[shuttle_tag]
var/origin_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!origin_area) return
var/destination_area = input("Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
if (!destination_area) return
S.move(origin_area, destination_area)
message_admins("\blue [key_name_admin(usr)] moved the [shuttle_tag] shuttle", 1)
log_admin("[key_name(usr)] moved the [shuttle_tag] shuttle")
if("togglebombcap")
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 <b> [key_name_admin(usr)] changed the bomb cap to [range_dev], [range_high], [range_low]</b>", 1)
log_admin("[key_name_admin(usr)] changed the bomb cap to [max_explosion_range]")
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 player_list)
if(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 player_list)
if(M.stat != 2)
M.show_message(text("\blue The chilling wind suddenly stops..."), 1)
/* if("shockwave")
ok = 1
world << "\red <B><big>ALERT: STATION STRESS CRITICAL</big></B>"
sleep(60)
world << "\red <B><big>ALERT: STATION STRESS CRITICAL. TOLERABLE LEVELS EXCEEDED!</big></B>"
sleep(80)
world << "\red <B><big>ALERT: STATION STRUCTURAL STRESS CRITICAL. SAFETY MECHANISMS FAILED!</big></B>"
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")
new /datum/event/meteor_wave
if("gravanomalies")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","GA")
command_announcement.Announce("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert", 'sound/AI/granomalies.ogg')
var/turf/T = pick(blobstart)
var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 )
spawn(rand(100, 600))
qdel(bh)
if("timeanomalies") //dear god this code was awful :P Still needs further optimisation
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","STA")
//moved to its own dm so I could split it up and prevent the spawns copying variables over and over
//can be found in code\game\game_modes\events\wormholes.dm
wormhole_event()
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(xenomorphs.attempt_random_spawn())
message_admins("[key_name_admin(usr)] has spawned aliens", 1)
if("spiders")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","SL")
new /datum/event/spider_infestation
message_admins("[key_name_admin(usr)] has spawned spiders", 1)
if("comms_blackout")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","CB")
var/answer = alert(usr, "Would you like to alert the crew?", "Alert", "Yes", "No")
if(answer == "Yes")
communications_blackout(0)
else
communications_blackout(1)
message_admins("[key_name_admin(usr)] triggered a communications blackout.", 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)
new /datum/event/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)
new /datum/event/radiation_storm
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("lightout")
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("whiteout")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","WO")
for(var/obj/machinery/light/L in world)
L.fix()
message_admins("[key_name_admin(usr)] fixed all lights", 1)
if("friendai")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","FA")
for(var/mob/eye/aiEye/aE in mob_list)
aE.icon_state = "ai_friend"
for(var/obj/machinery/M in machines)
if(istype(M, /obj/machinery/ai_status_display))
var/obj/machinery/ai_status_display/A = M
A.emotion = "Friend Computer"
else if(istype(M, /obj/machinery/status_display))
var/obj/machinery/status_display/A = M
A.friendc = 1
message_admins("[key_name_admin(usr)] turned all AIs into best friends.", 1)
if("floorlava")
if(floorIsLava)
usr << "The floor is lava already."
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","LF")
//Options
var/length = input(usr, "How long will the lava last? (in seconds)", "Length", 180) as num
length = min(abs(length), 1200)
var/damage = input(usr, "How deadly will the lava be?", "Damage", 2) as num
damage = min(abs(damage), 100)
var/sure = alert(usr, "Are you sure you want to do this?", "Confirmation", "YES!", "Nah")
if(sure == "Nah")
return
floorIsLava = 1
message_admins("[key_name_admin(usr)] made the floor LAVA! It'll last [length] seconds and it will deal [damage] damage to everyone.", 1)
for(var/turf/simulated/floor/F in world)
if(F.z in config.station_levels)
F.name = "lava"
F.desc = "The floor is LAVA!"
F.overlays += "lava"
F.lava = 1
spawn(0)
for(var/i = i, i < length, i++) // 180 = 3 minutes
if(damage)
for(var/mob/living/carbon/L in living_mob_list)
if(istype(L.loc, /turf/simulated/floor)) // Are they on LAVA?!
var/turf/simulated/floor/F = L.loc
if(F.lava)
var/safe = 0
for(var/obj/structure/O in F.contents)
if(O.level > F.level && !istype(O, /obj/structure/window)) // Something to stand on and it isn't under the floor!
safe = 1
break
if(!safe)
L.adjustFireLoss(damage)
sleep(10)
for(var/turf/simulated/floor/F in world) // Reset everything.
if(F.z in config.station_levels)
F.name = initial(F.name)
F.desc = initial(F.desc)
F.overlays.Cut()
F.lava = 0
F.update_icon()
floorIsLava = 0
return
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 greater disease or a lesser one?",,"Greater","Lesser")
if(answer=="Lesser")
virus2_lesser_infection()
message_admins("[key_name_admin(usr)] has triggered a lesser virus outbreak.", 1)
else
virus2_greater_infection()
message_admins("[key_name_admin(usr)] has triggered a greater virus outbreak.", 1)
if("retardify")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","RET")
for(var/mob/living/carbon/human/H in player_list)
H << "\red <B>You suddenly feel stupid.</B>"
H.setBrainLoss(60)
message_admins("[key_name_admin(usr)] made everybody retarded")
if("fakeguns")
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 = 'icons/obj/gun.dmi'
W.icon_state = "revolver"
W.item_state = "gun"
message_admins("[key_name_admin(usr)] made every item look like a gun")
if("schoolgirl")
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"
message_admins("[key_name_admin(usr)] activated Japanese Animes mode")
world << sound('sound/AI/animes.ogg')
if("paintball")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","PB")
for(var/species in all_species)
var/datum/species/S = all_species[species]
S.blood_color = "rainbow"
for(var/obj/effect/decal/cleanable/blood/B in world)
B.basecolor = "rainbow"
B.update_icon()
message_admins("[key_name_admin(usr)] activated Paintball mode")
if("eagles")//SCRAW
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","EgL")
for(var/obj/machinery/door/airlock/W in world)
if(W.z in config.station_levels && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
W.req_access = list()
message_admins("[key_name_admin(usr)] activated Egalitarian Station mode")
command_announcement.Announce("Centcomm airlock control override activated. Please take this time to get acquainted with your coworkers.", new_sound = 'sound/AI/commandreport.ogg')
if("dorf")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","DF")
for(var/mob/living/carbon/human/B in mob_list)
B.f_style = "Dward Beard"
B.update_hair()
message_admins("[key_name_admin(usr)] activated dorf mode")
if("ionstorm")
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_announcement.Announce("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert", new_sound = 'sound/AI/ionstorm.ogg')
if("onlyone")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","OO")
only_one()
message_admins("[key_name_admin(usr)] has triggered a battle to the death (only one)")
if("togglenarsie")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","NA")
var/choice = input("How do you wish for narsie to interact with her surroundings?") in list("CultStation13", "Nar-Singulo")
if(choice == "CultStation13")
message_admins("[key_name_admin(usr)] has set narsie's behaviour to \"CultStation13\".")
narsie_behaviour = "CultStation13"
if(choice == "Nar-Singulo")
message_admins("[key_name_admin(usr)] has set narsie's behaviour to \"Nar-Singulo\".")
narsie_behaviour = "Nar-Singulo"
if("hellonearth")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","NS")
var/choice = input("You sure you want to end the round and summon narsie at your location? Misuse of this could result in removal of flags or hilarity.") in list("PRAISE SATAN", "Cancel")
if(choice == "PRAISE SATAN")
new /obj/singularity/narsie/large(get_turf(usr))
message_admins("[key_name_admin(usr)] has summoned narsie and brought about a new realm of suffering.")
if("supermattercascade")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","SC")
var/choice = input("You sure you want to destroy the universe and create a large explosion at your location? Misuse of this could result in removal of flags or hilarity.") in list("NO TIME TO EXPLAIN", "Cancel")
if(choice == "NO TIME TO EXPLAIN")
explosion(get_turf(usr), 8, 16, 24, 32, 1)
new /turf/unsimulated/wall/supermatter(get_turf(usr))
SetUniversalState(/datum/universal_state/supermatter_cascade)
message_admins("[key_name_admin(usr)] has managed to destroy the universe with a supermatter cascade. Good job, [key_name_admin(usr)]")
if(usr)
log_admin("[key_name(usr)] used secret [href_list["secretsfun"]]")
if (ok)
world << text("<B>A secret has been activated by []!</B>", usr.key)
else if(href_list["secretsadmin"])
if(!check_rights(R_ADMIN)) return
var/ok = 0
switch(href_list["secretsadmin"])
if("clear_bombs")
//I do nothing
if("list_bombers")
var/dat = "<B>Bombing List<HR>"
for(var/l in bombers)
dat += text("[l]<BR>")
usr << browse(dat, "window=bombers")
if("list_signalers")
var/dat = "<B>Showing last [length(lastsignalers)] signalers.</B><HR>"
for(var/sig in lastsignalers)
dat += "[sig]<BR>"
usr << browse(dat, "window=lastsignalers;size=800x500")
if("list_lawchanges")
var/dat = "<B>Showing last [lawchanges.len] law change\s.</B><HR>"
for(var/sig in lawchanges)
dat += "[sig]<BR>"
usr << browse(dat, "window=lawchanges;size=800x500")
if("list_job_debug")
var/dat = "<B>Job Debug info.</B><HR>"
if(job_master)
for(var/line in job_master.job_debug)
dat += "[line]<BR>"
dat+= "*******<BR><BR>"
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] <BR>"
usr << browse(dat, "window=jobdebug;size=600x500")
if("showailaws")
output_ai_laws()
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 = "<B>Showing Crew Manifest.</B><HR>"
dat += "<table cellspacing=5><tr><th>Name</th><th>Position</th></tr>"
for(var/mob/living/carbon/human/H in mob_list)
if(H.ckey)
dat += text("<tr><td>[]</td><td>[]</td></tr>", H.name, H.get_assignment())
dat += "</table>"
usr << browse(dat, "window=manifest;size=440x410")
if("check_antagonist")
check_antagonists()
if("DNA")
var/dat = "<B>Showing DNA from blood.</B><HR>"
dat += "<table cellspacing=5><tr><th>Name</th><th>DNA</th><th>Blood Type</th></tr>"
for(var/mob/living/carbon/human/H in mob_list)
if(H.dna && H.ckey)
dat += "<tr><td>[H]</td><td>[H.dna.unique_enzymes]</td><td>[H.b_type]</td></tr>"
dat += "</table>"
usr << browse(dat, "window=DNA;size=440x410")
if("fingerprints")
var/dat = "<B>Showing Fingerprints.</B><HR>"
dat += "<table cellspacing=5><tr><th>Name</th><th>Fingerprints</th></tr>"
for(var/mob/living/carbon/human/H in mob_list)
if(H.ckey)
if(H.dna && H.dna.uni_identity)
dat += "<tr><td>[H]</td><td>[md5(H.dna.uni_identity)]</td></tr>"
else if(H.dna && !H.dna.uni_identity)
dat += "<tr><td>[H]</td><td>H.dna.uni_identity = null</td></tr>"
else if(!H.dna)
dat += "<tr><td>[H]</td><td>H.dna = null</td></tr>"
dat += "</table>"
usr << browse(dat, "window=fingerprints;size=440x410")
else
if (usr)
log_admin("[key_name(usr)] used secret [href_list["secretsadmin"]]")
if (ok)
world << text("<B>A secret has been activated by []!</B>", usr.key)
else if(href_list["secretscoder"])
if(!check_rights(R_DEBUG|R_DEV)) return
switch(href_list["secretscoder"])
if("spawn_objects")
var/dat = "<B>Admin Log<HR></B>"
for(var/l in admin_log)
dat += "<li>[l]</li>"
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.")
else if(href_list["admin_secrets"])
var/datum/admin_secret_item/item = locate(href_list["admin_secrets"]) in admin_secrets.items
item.execute(usr)
else if(href_list["ac_view_wanted"]) //Admin newscaster Topic() stuff be here
src.admincaster_screen = 18 //The ac_ prefix before the hrefs stands for AdminCaster.
@@ -2749,3 +2009,25 @@ mob/living/carbon/human/can_centcom_reply()
mob/living/silicon/ai/can_centcom_reply()
return common_radio != null && !check_unable(2)
/atom/proc/extra_admin_link()
return
/mob/extra_admin_link(var/source)
if(client && eyeobj)
return "|<A HREF='?[source];adminplayerobservejump=\ref[eyeobj]'>EYE</A>"
/mob/dead/observer/extra_admin_link(var/source)
if(mind && mind.current)
return "|<A HREF='?[source];adminplayerobservejump=\ref[mind.current]'>BDY</A>"
/proc/admin_jump_link(var/atom/target, var/source)
if(!target) return
// The way admin jump links handle their src is weirdly inconsistent...
if(istype(source, /datum/admins))
source = "src=\ref[source]"
else
source = "_src_=holder"
. = "<A HREF='?[source];adminplayerobservejump=\ref[target]'>JMP</A>"
. += target.extra_admin_link(source)
+2 -2
View File
@@ -2,7 +2,7 @@
return
/mob/dead/observer/on_mob_jump()
following = null
stop_following()
/client/proc/Jump(var/area/A in return_sorted_areas())
set name = "Jump to Area"
@@ -21,7 +21,7 @@
else
alert("Admin jumping disabled")
/client/proc/jumptoturf(var/turf/T in world)
/client/proc/jumptoturf(var/turf/T in turfs)
set name = "Jump to Turf"
set category = "Admin"
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_DEV))
+1 -1
View File
@@ -12,7 +12,7 @@
if(check_rights(R_ADMIN,0))
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights)
C << "<span class='admin_channel'>" + create_text_tag("admin", "ADMIN:", C) + " <span class='name'>[key_name(usr, 1)]</span>(<a href='?_src_=holder;adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
C << "<span class='admin_channel'>" + create_text_tag("admin", "ADMIN:", C) + " <span class='name'>[key_name(usr, 1)]</span>([admin_jump_link(mob, src)]): <span class='message'>[msg]</span></span>"
feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+24 -255
View File
@@ -14,140 +14,9 @@
feedback_add_details("admin_verb","DG2") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
// callproc moved to code/modules/admin/callproc
/* 21st Sept 2010
Updated by Skie -- Still not perfect but better!
Stuff you can't do:
Call proc /mob/proc/make_dizzy() for some player
Because if you select a player mob as owner it tries to do the proc for
/mob/living/carbon/human/ instead. And that gives a run-time error.
But you can call procs that are of type /mob/living/carbon/human/proc/ for that player.
*/
/client/proc/callproc()
set category = "Debug"
set name = "Advanced ProcCall"
if(!check_rights(R_DEBUG)) return
if(config.debugparanoid && !check_rights(R_ADMIN)) return
spawn(0)
var/target = null
var/targetselected = 0
var/lst[] // List reference
lst = new/list() // Make the list
var/returnval = null
var/class = null
switch(alert("Proc owned by something?",,"Yes","No"))
if("Yes")
targetselected = 1
class = input("Proc owned by...","Owner",null) as null|anything in list("Obj","Mob","Area or Turf","Client")
switch(class)
if("Obj")
target = input("Enter target:","Target",usr) as obj in world
if("Mob")
target = input("Enter target:","Target",usr) as mob in world
if("Area or Turf")
target = input("Enter target:","Target",usr.loc) as area|turf in world
if("Client")
var/list/keys = list()
for(var/client/C)
keys += C
target = input("Please, select a player!", "Selection", null, null) as null|anything in keys
else
return
if("No")
target = null
targetselected = 0
var/procname = input("Proc path, eg: /proc/fake_blood","Path:", null) as text|null
if(!procname) return
if(targetselected)
if(!target)
usr << "<span class='danger'>Your target no longer exists.</span>"
return
if(!hascall(target,procname))
usr << "<font color='red'>Error: callproc(): target has no such call [procname].</font>"
return
else
if(copytext(procname, 1, 7) == "/proc/")
// nothing
else if(copytext(procname, 1, 6) == "proc/")
procname = "/[procname]"
else if(copytext(procname, 1, 2) == "/")
procname = "/proc[procname]"
else
procname = "/proc/[procname]"
// Procs have the strange property that text2path will return non-null, but ispath() will return false.
var/path = text2path(procname)
if(!path || ispath(path))
usr << "<span class='danger'>Invalid proc [procname]</span>"
return
var/argnum = input("Number of arguments","Number:",0) as num|null
if(!argnum && (argnum!=0)) return
lst.len = argnum // Expand to right length
//TODO: make a list to store whether each argument was initialised as null.
//Reason: So we can abort the proccall if say, one of our arguments was a mob which no longer exists
//this will protect us from a fair few errors ~Carn
var/i
for(i=1, i<argnum+1, i++) // Lists indexed from 1 forwards in byond
// Make a list with each index containing one variable, to be given to the proc
class = input("What kind of variable?","Variable Type") in list("text","num","type","reference","mob reference","icon","file","client","mob's area","CANCEL")
switch(class)
if("CANCEL")
return
if("text")
lst[i] = input("Enter new text:","Text",null) as text
if("num")
lst[i] = input("Enter new number:","Num",0) as num
if("type")
lst[i] = input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf)
if("reference")
lst[i] = input("Select reference:","Reference",src) as mob|obj|turf|area in world
if("mob reference")
lst[i] = input("Select reference:","Reference",usr) as mob in world
if("file")
lst[i] = input("Pick file:","File") as file
if("icon")
lst[i] = input("Pick icon:","Icon") as icon
if("client")
var/list/keys = list()
for(var/mob/M in world)
keys += M.client
lst[i] = input("Please, select a player!", "Selection", null, null) as null|anything in keys
if("mob's area")
var/mob/temp = input("Select mob", "Selection", usr) as mob in world
lst[i] = temp.loc
if(targetselected)
if(!target)
usr << "<font color='red'>Error: callproc(): owner of proc no longer exists.</font>"
return
log_admin("[key_name(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
returnval = call(target,procname)(arglist(lst)) // Pass the lst as an argument list to the proc
else
log_admin("[key_name(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
returnval = call(procname)(arglist(lst)) // Pass the lst as an argument list to the proc
usr << "<font color='blue'>[procname] returned: [returnval ? returnval : "null"]</font>"
feedback_add_details("admin_verb","APC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/Cell()
set category = "Debug"
set name = "Cell"
@@ -232,23 +101,6 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
paiController.pai_candidates.Remove(candidate)
feedback_add_details("admin_verb","MPAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_alienize(var/mob/M in mob_list)
set category = "Fun"
set name = "Make Alien"
if(!ticker)
alert("Wait until the game starts")
return
if(ishuman(M))
log_admin("[key_name(src)] has alienized [M.key].")
spawn(10)
M:Alienize()
feedback_add_details("admin_verb","MKAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] made [key_name(M)] into an alien.")
message_admins("\blue [key_name_admin(usr)] made [key_name(M)] into an alien.", 1)
else
alert("Invalid mob")
/client/proc/cmd_admin_slimeize(var/mob/M in mob_list)
set category = "Fun"
set name = "Make slime"
@@ -267,7 +119,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
alert("Invalid mob")
/*
/client/proc/cmd_admin_monkeyize(var/mob/M in world)
/client/proc/cmd_admin_monkeyize(var/mob/M in mob_list)
set category = "Fun"
set name = "Make Monkey"
@@ -282,7 +134,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
else
alert("Invalid mob")
/client/proc/cmd_admin_changelinginize(var/mob/M in world)
/client/proc/cmd_admin_changelinginize(var/mob/M in mob_list)
set category = "Fun"
set name = "Make Changeling"
@@ -300,7 +152,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
alert("Invalid mob")
*/
/*
/client/proc/cmd_admin_abominize(var/mob/M in world)
/client/proc/cmd_admin_abominize(var/mob/M in mob_list)
set category = null
set name = "Make Abomination"
@@ -317,7 +169,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
*/
/*
/client/proc/make_cultist(var/mob/M in world) // -- TLE, modified by Urist
/client/proc/make_cultist(var/mob/M in mob_list) // -- TLE, modified by Urist
set category = "Fun"
set name = "Make Cultist"
set desc = "Makes target a cultist"
@@ -405,11 +257,11 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/obj/item/device/pda/pda = H.wear_id
id = pda.id
id.icon_state = "gold"
id:access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
id.access = get_all_accesses()
else
var/obj/item/weapon/card/id/id = new/obj/item/weapon/card/id(M);
id.icon_state = "gold"
id:access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
id.access = get_all_accesses()
id.registered_name = H.real_name
id.assignment = "Captain"
id.name = "[id.registered_name]'s ID Card ([id.assignment])"
@@ -624,9 +476,9 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/under/det(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/det_suit(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/det_trench(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/plain/monocle(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/head/det_hat(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/clothing/head/det(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/cloaking_device(M), slot_r_store)
@@ -659,13 +511,13 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/weapon/grenade/chem_grenade/cleaner(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/grenade/chem_grenade/cleaner(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/stack/tile/steel(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/tile/steel(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/tile/steel(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/tile/steel(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/tile/steel(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/tile/steel(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/tile/steel(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/tile/floor(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/tile/floor(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/tile/floor(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/tile/floor(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/tile/floor(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/tile/floor(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/tile/floor(M), slot_in_backpack)
if ("pirate")
M.equip_to_slot_or_del(new /obj/item/clothing/under/pirate(M), slot_w_uniform)
@@ -701,7 +553,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/obj/item/weapon/card/id/W = new(M)
W.name = "[M.real_name]'s ID Card"
W.access = get_all_accesses()
W.access = get_all_station_access()
W.assignment = "Tunnel Clown!"
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
@@ -758,7 +610,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/obj/item/weapon/card/id/syndicate/W = new(M)
W.name = "[M.real_name]'s ID Card"
W.access = get_all_accesses()
W.access = get_all_station_access()
W.assignment = "Reaper"
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
@@ -788,7 +640,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
W.name = "[M.real_name]'s ID Card"
W.icon_state = "centcom"
W.item_state = "id_inv"
W.access = get_all_accesses()
W.access = get_all_station_access()
W.access += list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer")
W.assignment = "NanoTrasen Navy Representative"
W.registered_name = M.real_name
@@ -812,7 +664,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/obj/item/weapon/card/id/centcom/W = new(M)
W.name = "[M.real_name]'s ID Card"
W.access = get_all_accesses()
W.access = get_all_station_access()
W.access += get_all_centcom_access()
W.assignment = "NanoTrasen Navy Officer"
W.registered_name = M.real_name
@@ -837,7 +689,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/obj/item/weapon/card/id/centcom/W = new(M)
W.name = "[M.real_name]'s ID Card"
W.access = get_all_accesses()
W.access = get_all_station_access()
W.access += get_all_centcom_access()
W.assignment = "NanoTrasen Navy Captain"
W.registered_name = M.real_name
@@ -855,7 +707,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/obj/item/weapon/card/id/W = new(M)
W.name = "[M.real_name]'s ID Card"
W.icon_state = "centcom"
W.access = get_all_accesses()
W.access = get_all_station_access()
W.access += get_all_centcom_access()
W.assignment = "Emergency Response Team"
W.registered_name = M.real_name
@@ -877,7 +729,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/obj/item/weapon/card/id/W = new(M)
W.name = "[M.real_name]'s ID Card"
W.icon_state = "centcom"
W.access = get_all_accesses()
W.access = get_all_station_access()
W.access += get_all_centcom_access()
W.assignment = "Special Operations Officer"
W.registered_name = M.real_name
@@ -931,7 +783,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/obj/item/weapon/card/id/W = new(M)
W.name = "[M.real_name]'s ID Card"
W.icon_state = "centcom"
W.access = get_all_accesses()
W.access = get_all_station_access()
W.access += get_all_centcom_access()
W.assignment = "Admiral"
W.registered_name = M.real_name
@@ -994,89 +846,6 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(SMES.anchored)
SMES.input_attempt = 1
/client/proc/setup_supermatter_engine()
set category = "Debug"
set name = "Setup supermatter"
set desc = "Sets up the supermatter engine"
if(!check_rights(R_DEBUG|R_ADMIN)) return
var/response = alert("Are you sure? This will start up the engine. Should only be used during debug!",,"Setup Completely","Setup except coolant","No")
if(response == "No")
return
var/found_the_pump = 0
var/obj/machinery/power/supermatter/SM
for(var/obj/machinery/M in world)
if(!M)
continue
if(!M.loc)
continue
if(!M.loc.loc)
continue
if(istype(M.loc.loc,/area/engineering/engine_room))
if(istype(M,/obj/machinery/power/rad_collector))
var/obj/machinery/power/rad_collector/Rad = M
Rad.anchored = 1
Rad.connect_to_network()
var/obj/item/weapon/tank/phoron/Phoron = new/obj/item/weapon/tank/phoron(Rad)
Phoron.air_contents.gas["phoron"] = 29.1154 //This is a full tank if you filled it from a canister
Rad.P = Phoron
Phoron.loc = Rad
if(!Rad.active)
Rad.toggle_power()
Rad.update_icon()
else if(istype(M,/obj/machinery/atmospherics/binary/pump)) //Turning on every pump.
var/obj/machinery/atmospherics/binary/pump/Pump = M
if(Pump.name == "Engine Feed" && response == "Setup Completely")
found_the_pump = 1
Pump.air2.gas["nitrogen"] = 3750 //The contents of 2 canisters.
Pump.air2.temperature = 50
Pump.air2.update_values()
Pump.use_power=1
Pump.target_pressure = 4500
Pump.update_icon()
else if(istype(M,/obj/machinery/power/supermatter))
SM = M
spawn(50)
SM.power = 320
else if(istype(M,/obj/machinery/power/smes)) //This is the SMES inside the engine room. We don't need much power.
var/obj/machinery/power/smes/SMES = M
SMES.input_attempt = 1
SMES.input_level = 200000
SMES.output_level = 75000
else if(istype(M.loc.loc,/area/engineering/engine_smes)) //Set every SMES to charge and spit out 300,000 power between the 4 of them.
if(istype(M,/obj/machinery/power/smes))
var/obj/machinery/power/smes/SMES = M
SMES.input_attempt = 1
SMES.input_level = 200000
SMES.output_level = 75000
if(!found_the_pump && response == "Setup Completely")
src << "\red Unable to locate air supply to fill up with coolant, adding some coolant around the supermatter"
var/turf/simulated/T = SM.loc
T.zone.air.gas["nitrogen"] += 450
T.zone.air.temperature = 50
T.zone.air.update_values()
log_admin("[key_name(usr)] setup the supermatter engine [response == "Setup except coolant" ? "without coolant" : ""]")
message_admins("\blue [key_name_admin(usr)] setup the supermatter engine [response == "Setup except coolant" ? "without coolant": ""]", 1)
return
/client/proc/cmd_debug_mob_lists()
set category = "Debug"
set name = "Debug Mob Lists"
+1 -1
View File
@@ -160,7 +160,7 @@ var/list/debug_verbs = list (
,/client/proc/hide_debug_verbs
,/client/proc/testZAScolors
,/client/proc/testZAScolors_remove
,/client/proc/setup_supermatter_engine
,/datum/admins/proc/setup_supermatter
,/client/proc/atmos_toggle_debug
,/client/proc/spawn_tanktransferbomb
)
+131 -47
View File
@@ -1,11 +1,15 @@
var/list/forbidden_varedit_object_types = list(
/datum/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
/datum/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
)
var/list/VVlocked = list("vars", "holder", "client", "virus", "viruses", "cuffed", "last_eaten", "unlock_content", "bound_x", "bound_y", "step_x", "step_y", "force_ending")
var/list/VVicon_edit_lock = list("icon", "icon_state", "overlays", "underlays")
var/list/VVckey_edit = list("key", "ckey")
/*
/client/proc/cmd_modify_object_variables(obj/O as obj|mob|turf|area in world)
/client/proc/cmd_modify_object_variables(obj/O as obj|mob|turf|area in world) // Acceptable 'in world', as VV would be incredibly hampered otherwise
set category = "Debug"
set name = "Edit Variables"
set desc="(target) Edit a target item's variables"
@@ -44,7 +48,7 @@ var/list/forbidden_varedit_object_types = list(
switch(class)
if("text")
var_value = input("Enter new text:","Text") as null|text//todo: sanitize ???
var_value = input("Enter new text:","Text") as null|text
if("num")
var_value = input("Enter new number:","Num") as null|num
@@ -72,7 +76,7 @@ var/list/forbidden_varedit_object_types = list(
return var_value
/client/proc/mod_list_add(var/list/L)
/client/proc/mod_list_add(var/list/L, atom/O, original_name, objectvar)
var/class = "text"
if(src.holder && src.holder.marked_datum)
@@ -93,7 +97,7 @@ var/list/forbidden_varedit_object_types = list(
switch(class)
if("text")
var_value = input("Enter new text:","Text") as text//todo: sanitize ???
var_value = input("Enter new text:","Text") as text
if("num")
var_value = input("Enter new number:","Num") as num
@@ -124,30 +128,58 @@ var/list/forbidden_varedit_object_types = list(
L[var_value] = mod_list_add_ass() //haha
if("No")
L += var_value
world.log << "### ListVarEdit by [src]: [O.type] [objectvar]: ADDED=[var_value]"
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: ADDED=[var_value]")
message_admins("[key_name_admin(src)] modified [original_name]'s [objectvar]: ADDED=[var_value]")
/client/proc/mod_list(var/list/L)
/client/proc/mod_list(var/list/L, atom/O, original_name, objectvar)
if(!check_rights(R_VAREDIT|R_DEV)) return
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)
if(L.len > 1000)
var/confirm = alert(src, "The list you're trying to edit is very long, continuing may crash the server.", "Warning", "Continue", "Abort")
if(confirm != "Continue")
return
var/variable = input("Which var?","Var") as null|anything in names + "(ADD VAR)"
var/assoc = 0
if(L.len > 0)
var/a = L[1]
if(istext(a) && L[a] != null)
assoc = 1 //This is pretty weak test but i can't think of anything else
usr << "List appears to be associative."
var/list/names = null
if(!assoc)
names = sortList(L)
var/variable
var/assoc_key
if(assoc)
variable = input("Which var?","Var") as null|anything in L + "(ADD VAR)"
else
variable = input("Which var?","Var") as null|anything in names + "(ADD VAR)"
if(variable == "(ADD VAR)")
mod_list_add(L)
mod_list_add(L, O, original_name, objectvar)
return
if(!variable)
if(assoc)
assoc_key = variable
variable = L[assoc_key]
if(!assoc && !variable || assoc && !assoc_key)
return
var/default
var/dir
if(variable in locked)
if(variable in VVlocked)
if(!check_rights(R_DEBUG|R_DEV)) return
if(variable in VVckey_edit)
if(!check_rights(R_SPAWN|R_DEBUG|R_DEV)) return
if(variable in VVicon_edit_lock)
if(!check_rights(R_FUN|R_DEBUG|R_DEV)) return
if(isnull(variable))
usr << "Unable to determine variable type."
@@ -212,14 +244,12 @@ var/list/forbidden_varedit_object_types = list(
usr << "If a direction, direction is: [dir]"
var/class = "text"
var/list/choices = list("text","num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default")
if(src.holder && src.holder.marked_datum)
choices += "marked datum ([holder.marked_datum.type])"
if(!isnull(default) && default != "num")
choices += "edit associated variable"
choices += "DELETE FROM LIST"
class = input("What kind of variable?","Variable Type",default) as null|anything in choices
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])", "DELETE FROM LIST")
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", "DELETE FROM LIST")
if(!class)
return
@@ -227,61 +257,107 @@ var/list/forbidden_varedit_object_types = list(
if(holder.marked_datum && class == "marked datum ([holder.marked_datum.type])")
class = "marked datum"
var/original_var
if(assoc)
original_var = L[assoc_key]
else
original_var = L[L.Find(variable)]
var/new_var
switch(class) //Spits a runtime error if you try to modify an entry in the contents list. Dunno how to fix it, yet.
if("list")
mod_list(variable)
mod_list(variable, O, original_name, objectvar)
if("restore to default")
L[L.Find(variable)]=initial(variable)
new_var = initial(variable)
if(assoc)
L[assoc_key] = new_var
else
L[L.Find(variable)] = new_var
if("edit referenced object")
modify_variables(variable)
if("DELETE FROM LIST")
world.log << "### ListVarEdit by [src]: [O.type] [objectvar]: REMOVED=[html_encode("[variable]")]"
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: REMOVED=[variable]")
message_admins("[key_name_admin(src)] modified [original_name]'s [objectvar]: REMOVED=[variable]")
L -= variable
return
if("text")
L[L.Find(variable)] = input("Enter new text:","Text") as text//todo: sanitize ???
new_var = input("Enter new text:","Text") as text
if(assoc)
L[assoc_key] = new_var
else
L[L.Find(variable)] = new_var
if("num")
L[L.Find(variable)] = input("Enter new number:","Num") as num
new_var = input("Enter new number:","Num") as num
if(assoc)
L[assoc_key] = new_var
else
L[L.Find(variable)] = new_var
if("type")
L[L.Find(variable)] = input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf)
new_var = input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf)
if(assoc)
L[assoc_key] = new_var
else
L[L.Find(variable)] = new_var
if("reference")
L[L.Find(variable)] = input("Select reference:","Reference") as mob|obj|turf|area in world
new_var = input("Select reference:","Reference") as mob|obj|turf|area in world
if(assoc)
L[assoc_key] = new_var
else
L[L.Find(variable)] = new_var
if("mob reference")
L[L.Find(variable)] = input("Select reference:","Reference") as mob in world
new_var = input("Select reference:","Reference") as mob in world
if(assoc)
L[assoc_key] = new_var
else
L[L.Find(variable)] = new_var
if("file")
L[L.Find(variable)] = input("Pick file:","File") as file
new_var = input("Pick file:","File") as file
if(assoc)
L[assoc_key] = new_var
else
L[L.Find(variable)] = new_var
if("icon")
L[L.Find(variable)] = input("Pick icon:","Icon") as icon
new_var = input("Pick icon:","Icon") as icon
if(assoc)
L[assoc_key] = new_var
else
L[L.Find(variable)] = new_var
if("marked datum")
L[L.Find(variable)] = holder.marked_datum
if("edit associated variable")
var/temp_var = mod_list_add_ass()
if(temp_var)
L[variable] = temp_var
new_var = holder.marked_datum
if(assoc)
L[assoc_key] = new_var
else
L[L.Find(variable)] = new_var
world.log << "### ListVarEdit by [src]: [O.type] [objectvar]: [original_var]=[new_var]"
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: [original_var]=[new_var]")
message_admins("[key_name_admin(src)] modified [original_name]'s varlist [objectvar]: [original_var]=[new_var]")
/client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0)
if(!check_rights(R_VAREDIT|R_DEV)) return
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "cuffed", "ka", "last_eaten", "icon", "icon_state")
for(var/p in forbidden_varedit_object_types)
if( istype(O,p) )
usr << "\red It is forbidden to edit this object's variables."
usr << "<span class='danger'>It is forbidden to edit this object's variables.</span>"
return
if(istype(O, /client) && (param_var_name == "ckey" || param_var_name == "key"))
usr << "<span class='danger'>You cannot edit ckeys on client objects.</span>"
return
var/class
var/variable
var/var_value
@@ -291,8 +367,12 @@ var/list/forbidden_varedit_object_types = list(
src << "A variable with this name ([param_var_name]) doesn't exist in this atom ([O])"
return
if(param_var_name == "holder" || (param_var_name in locked))
if(!check_rights(R_DEBUG|R_DEV|R_FUN)) return
if(param_var_name in VVlocked)
if(!check_rights(R_DEBUG|R_DEV)) return
if(param_var_name in VVckey_edit)
if(!check_rights(R_SPAWN|R_DEBUG|R_DEV)) return
if(param_var_name in VVicon_edit_lock)
if(!check_rights(R_FUN|R_DEBUG|R_DEV)) return
variable = param_var_name
@@ -349,8 +429,12 @@ var/list/forbidden_varedit_object_types = list(
if(!variable) return
var_value = O.vars[variable]
if(variable == "holder" || (variable in locked))
if(!check_rights(R_DEBUG|R_DEV)) return
if(variable in VVlocked)
if(!check_rights(R_DEBUG|R_DEV)) return
if(variable in VVckey_edit)
if(!check_rights(R_SPAWN|R_DEBUG|R_DEV)) return
if(variable in VVicon_edit_lock)
if(!check_rights(R_FUN|R_DEBUG|R_DEV)) return
if(!autodetect_class)
@@ -440,7 +524,7 @@ var/list/forbidden_varedit_object_types = list(
switch(class)
if("list")
mod_list(O.vars[variable])
mod_list(O.vars[variable], O, original_name, variable)
return
if("restore to default")
@@ -450,7 +534,7 @@ var/list/forbidden_varedit_object_types = list(
return .(O.vars[variable])
if("text")
var/var_new = input("Enter new text:","Text",O.vars[variable]) as null|text//todo: sanitize ???
var/var_new = input("Enter new text:","Text",O.vars[variable]) as null|text
if(var_new==null) return
O.vars[variable] = var_new
@@ -504,4 +588,4 @@ var/list/forbidden_varedit_object_types = list(
world.log << "### VarEdit by [src]: [O.type] [variable]=[html_encode("[O.vars[variable]]")]"
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)
message_admins("[key_name_admin(src)] modified [original_name]'s [variable] to [O.vars[variable]]")
+2 -2
View File
@@ -1,4 +1,4 @@
/proc/possess(obj/O as obj in world)
/proc/possess(obj/O as obj in range(world.view))
set name = "Possess Obj"
set category = "Object"
@@ -26,7 +26,7 @@
usr.control_object = O
feedback_add_details("admin_verb","PO") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/proc/release(obj/O as obj in world)
/proc/release(obj/O as obj in range(world.view))
set name = "Release Obj"
set category = "Object"
//usr.loc = get_turf(usr)
+4 -4
View File
@@ -17,7 +17,7 @@
return
var/image/cross = image('icons/obj/storage.dmi',"bible")
msg = "\blue \icon[cross] <b><font color=purple>PRAY: </font>[key_name(src, 1)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[src]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[src]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[src]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;adminspawncookie=\ref[src]'>SC</a>):</b> [msg]"
msg = "\blue \icon[cross] <b><font color=purple>PRAY: </font>[key_name(src, 1)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[src]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[src]'>SM</A>) ([admin_jump_link(src, src)]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;adminspawncookie=\ref[src]'>SC</a>):</b> [msg]"
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights)
@@ -31,9 +31,9 @@
/proc/Centcomm_announce(var/msg, var/mob/Sender, var/iamessage)
send_to_cciaa_discord("!!! @everyone - Emergency message from the station: `[msg]`, sent by [Sender] !!!")
var/msg_cciaa = "\blue <b><font color=orange>CENTCOMM[iamessage ? " IA" : ""]:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
msg = "\blue <b><font color=orange>CENTCOMM[iamessage ? " IA" : ""]:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
var/msg_cciaa = "\blue <b><font color=orange>[uppertext(boss_short)][iamessage ? " IA" : ""]:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
msg = "\blue <b><font color=orange>[uppertext(boss_short)]M[iamessage ? " IA" : ""]:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, src)]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights)
C << msg
@@ -41,7 +41,7 @@
C << msg_cciaa
/proc/Syndicate_announce(var/msg, var/mob/Sender)
msg = "\blue <b><font color=crimson>ILLEGAL:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;SyndicateReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
msg = "\blue <b><font color=crimson>ILLEGAL:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, src)]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;SyndicateReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights)
C << msg
+7 -7
View File
@@ -236,7 +236,7 @@ Ccomp's first proc.
var/list/mobs = list()
var/list/ghosts = list()
var/list/sortmob = sortAtom(mob_list) // get the mob list.
/var/any=0
var/any=0
for(var/mob/dead/observer/M in sortmob)
mobs.Add(M) //filter it where it's only ghosts
any = 1 //if no ghosts show up, any will just be 0
@@ -448,7 +448,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
data_core.manifest_inject(new_character)
if(alert(new_character,"Would you like an active AI to announce this character?",,"No","Yes")=="Yes")
call(/mob/new_player/proc/AnnounceArrival)(new_character, new_character.mind.assigned_role)
call(/proc/AnnounceArrival)(new_character, new_character.mind.assigned_role)
message_admins("\blue [admin] has respawned [player_key] as [new_character.real_name].", 1)
@@ -564,14 +564,14 @@ Traitors and the like can also be revived with the previous role mostly intact.
if("Yes")
command_announcement.Announce("[reportbody]\n\n- [reporter], Central Command Internal Affairs Agent, [commstation_name()]", reporttitle, new_sound = 'sound/AI/commandreport.ogg', msg_sanitized = 1);
if("No")
world << "\red New NanoTrasen Update available at all communication consoles."
world << "\red New [company_name] Update available at all communication consoles."
world << sound('sound/AI/commandreport.ogg')
log_admin("[key_name(src)] has created a command report: [reportbody]")
message_admins("[key_name_admin(src)] has created a command report", 1)
feedback_add_details("admin_verb","CCR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_delete(atom/O as obj|mob|turf in view())
/client/proc/cmd_admin_delete(atom/O as obj|mob|turf in range(world.view))
set category = "Admin"
set name = "Delete"
@@ -597,7 +597,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
src << "[job.title]: [job.total_positions]"
feedback_add_details("admin_verb","LFS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_explosion(atom/O as obj|mob|turf in world)
/client/proc/cmd_admin_explosion(atom/O as obj|mob|turf in range(world.view))
set category = "Special Verbs"
set name = "Explosion"
@@ -625,7 +625,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
else
return
/client/proc/cmd_admin_emp(atom/O as obj|mob|turf in world)
/client/proc/cmd_admin_emp(atom/O as obj|mob|turf in range(world.view))
set category = "Special Verbs"
set name = "EM Pulse"
@@ -900,7 +900,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
message_admins("Admin [key_name_admin(usr)] has forced the players to have random appearances.", 1)
if(notifyplayers == "Yes")
world << "\blue <b>Admin [usr.key] has forced the players to have completely random identities!"
world << "\blue <b>Admin [usr.key] has forced the players to have completely random identities!</b>"
usr << "<i>Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet</i>."
@@ -0,0 +1,93 @@
// Keep these two together, they *must* be defined on both
// If /client ever becomes /datum/client or similar, they can be merged
/client/proc/get_view_variables_header()
return "<b>[src]</b>"
/datum/proc/get_view_variables_header()
return "<b>[src]</b>"
/atom/get_view_variables_header()
return {"
<a href='?_src_=vars;datumedit=\ref[src];varnameedit=name'><b>[src]</b></a>
<br><font size='1'>
<a href='?_src_=vars;rotatedatum=\ref[src];rotatedir=left'><<</a>
<a href='?_src_=vars;datumedit=\ref[src];varnameedit=dir'>[dir2text(dir)]</a>
<a href='?_src_=vars;rotatedatum=\ref[src];rotatedir=right'>>></a>
</font>
"}
/mob/living/get_view_variables_header()
return {"
<a href='?_src_=vars;rename=\ref[src]'><b>[src]</b></a><font size='1'>
<br><a href='?_src_=vars;rotatedatum=\ref[src];rotatedir=left'><<</a> <a href='?_src_=vars;datumedit=\ref[src];varnameedit=dir'>[dir2text(dir)]</a> <a href='?_src_=vars;rotatedatum=\ref[src];rotatedir=right'>>></a>
<br><a href='?_src_=vars;datumedit=\ref[src];varnameedit=ckey'>[ckey ? ckey : "No ckey"]</a> / <a href='?_src_=vars;datumedit=\ref[src];varnameedit=real_name'>[real_name ? real_name : "No real name"]</a>
<br>
BRUTE:<a href='?_src_=vars;mobToDamage=\ref[src];adjustDamage=brute'>[getBruteLoss()]</a>
FIRE:<a href='?_src_=vars;mobToDamage=\ref[src];adjustDamage=fire'>[getFireLoss()]</a>
TOXIN:<a href='?_src_=vars;mobToDamage=\ref[src];adjustDamage=toxin'>[getToxLoss()]</a>
OXY:<a href='?_src_=vars;mobToDamage=\ref[src];adjustDamage=oxygen'>[getOxyLoss()]</a>
CLONE:<a href='?_src_=vars;mobToDamage=\ref[src];adjustDamage=clone'>[getCloneLoss()]</a>
BRAIN:<a href='?_src_=vars;mobToDamage=\ref[src];adjustDamage=brain'>[getBrainLoss()]</a>
</font>
"}
// Same for these as for get_view_variables_header() above
/client/proc/get_view_variables_options()
return ""
/datum/proc/get_view_variables_options()
return ""
/mob/get_view_variables_options()
return ..() + {"
<option value='?_src_=vars;mob_player_panel=\ref[src]'>Show player panel</option>
<option>---</option>
<option value='?_src_=vars;give_spell=\ref[src]'>Give Spell</option>
<option value='?_src_=vars;give_disease2=\ref[src]'>Give Disease</option>
<option value='?_src_=vars;give_disease=\ref[src]'>Give TG-style Disease</option>
<option value='?_src_=vars;godmode=\ref[src]'>Toggle Godmode</option>
<option value='?_src_=vars;build_mode=\ref[src]'>Toggle Build Mode</option>
<option value='?_src_=vars;ninja=\ref[src]'>Make Space Ninja</option>
<option value='?_src_=vars;make_skeleton=\ref[src]'>Make 2spooky</option>
<option value='?_src_=vars;direct_control=\ref[src]'>Assume Direct Control</option>
<option value='?_src_=vars;drop_everything=\ref[src]'>Drop Everything</option>
<option value='?_src_=vars;regenerateicons=\ref[src]'>Regenerate Icons</option>
<option value='?_src_=vars;addlanguage=\ref[src]'>Add Language</option>
<option value='?_src_=vars;remlanguage=\ref[src]'>Remove Language</option>
<option value='?_src_=vars;addorgan=\ref[src]'>Add Organ</option>
<option value='?_src_=vars;remorgan=\ref[src]'>Remove Organ</option>
<option value='?_src_=vars;fix_nano=\ref[src]'>Fix NanoUI</option>
<option value='?_src_=vars;addverb=\ref[src]'>Add Verb</option>
<option value='?_src_=vars;remverb=\ref[src]'>Remove Verb</option>
<option>---</option>
<option value='?_src_=vars;gib=\ref[src]'>Gib</option>
<option value='?_src_=vars;explode=\ref[src]'>Trigger explosion</option>
<option value='?_src_=vars;emp=\ref[src]'>Trigger EM pulse</option>
"}
/mob/living/carbon/human/get_view_variables_options()
return ..() + {"
<option value='?_src_=vars;setspecies=\ref[src]'>Set Species</option>
<option value='?_src_=vars;makeai=\ref[src]'>Make AI</option>
<option value='?_src_=vars;makerobot=\ref[src]'>Make cyborg</option>
<option value='?_src_=vars;makemonkey=\ref[src]'>Make monkey</option>
<option value='?_src_=vars;makealien=\ref[src]'>Make alien</option>
<option value='?_src_=vars;makeslime=\ref[src]'>Make slime</option>
"}
/obj/get_view_variables_options()
return ..() + {"
<option value='?_src_=vars;delall=\ref[src]'>Delete all of type</option>
<option value='?_src_=vars;explode=\ref[src]'>Trigger explosion</option>
<option value='?_src_=vars;emp=\ref[src]'>Trigger EM pulse</option>
"}
/turf/get_view_variables_options()
return ..() + {"
<option value='?_src_=vars;explode=\ref[src]'>Trigger explosion</option>
<option value='?_src_=vars;emp=\ref[src]'>Trigger EM pulse</option>
"}
+532
View File
@@ -0,0 +1,532 @@
/client/proc/view_var_Topic(href, href_list, hsrc)
//This should all be moved over to datum/admins/Topic() or something ~Carn
if( (usr.client != src) || !src.holder )
return
if(href_list["Vars"])
debug_variables(locate(href_list["Vars"]))
//~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records).
else if(href_list["rename"])
if(!check_rights(R_VAREDIT|R_DEV)) return
var/mob/M = locate(href_list["rename"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
var/new_name = sanitize(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null, MAX_NAME_LEN)
if( !new_name || !M ) return
message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].")
M.fully_replace_character_name(M.real_name,new_name)
href_list["datumrefresh"] = href_list["rename"]
else if(href_list["varnameedit"] && href_list["datumedit"])
if(!check_rights(R_VAREDIT|R_DEV)) return
var/D = locate(href_list["datumedit"])
if(!istype(D,/datum) && !istype(D,/client))
usr << "This can only be used on instances of types /client or /datum"
return
modify_variables(D, href_list["varnameedit"], 1)
else if(href_list["varnamechange"] && href_list["datumchange"])
if(!check_rights(R_VAREDIT|R_DEV)) return
var/D = locate(href_list["datumchange"])
if(!istype(D,/datum) && !istype(D,/client))
usr << "This can only be used on instances of types /client or /datum"
return
modify_variables(D, href_list["varnamechange"], 0)
else if(href_list["varnamemass"] && href_list["datummass"])
if(!check_rights(R_VAREDIT|R_DEV)) return
var/atom/A = locate(href_list["datummass"])
if(!istype(A))
usr << "This can only be used on instances of type /atom"
return
cmd_mass_modify_object_variables(A, href_list["varnamemass"])
else if(href_list["mob_player_panel"])
if(!check_rights(0)) return
var/mob/M = locate(href_list["mob_player_panel"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.holder.show_player_panel(M)
href_list["datumrefresh"] = href_list["mob_player_panel"]
else if(href_list["give_spell"])
if(!check_rights(R_ADMIN|R_FUN)) return
var/mob/M = locate(href_list["give_spell"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.give_spell(M)
href_list["datumrefresh"] = href_list["give_spell"]
else if(href_list["give_disease"])
if(!check_rights(R_ADMIN|R_FUN)) return
var/mob/M = locate(href_list["give_disease"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.give_disease(M)
href_list["datumrefresh"] = href_list["give_spell"]
else if(href_list["give_disease2"])
if(!check_rights(R_ADMIN|R_FUN)) return
var/mob/M = locate(href_list["give_disease2"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.give_disease2(M)
href_list["datumrefresh"] = href_list["give_spell"]
else if(href_list["godmode"])
if(!check_rights(R_REJUVINATE)) return
var/mob/M = locate(href_list["godmode"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.cmd_admin_godmode(M)
href_list["datumrefresh"] = href_list["godmode"]
else if(href_list["gib"])
if(!check_rights(0)) return
var/mob/M = locate(href_list["gib"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
src.cmd_admin_gib(M)
else if(href_list["build_mode"])
if(!check_rights(R_BUILDMODE|R_DEV)) return
var/mob/M = locate(href_list["build_mode"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
togglebuildmode(M)
href_list["datumrefresh"] = href_list["build_mode"]
else if(href_list["drop_everything"])
if(!check_rights(R_DEBUG|R_ADMIN)) return
var/mob/M = locate(href_list["drop_everything"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
if(usr.client)
usr.client.cmd_admin_drop_everything(M)
else if(href_list["direct_control"])
if(!check_rights(0)) return
var/mob/M = locate(href_list["direct_control"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
if(usr.client)
usr.client.cmd_assume_direct_control(M)
else if(href_list["make_skeleton"])
if(!check_rights(R_FUN)) return
var/mob/living/carbon/human/H = locate(href_list["make_skeleton"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
return
H.ChangeToSkeleton()
href_list["datumrefresh"] = href_list["make_skeleton"]
else if(href_list["delall"])
if(!check_rights(R_DEBUG|R_SERVER)) return
var/obj/O = locate(href_list["delall"])
if(!isobj(O))
usr << "This can only be used on instances of type /obj"
return
var/action_type = alert("Strict type ([O.type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel")
if(action_type == "Cancel" || !action_type)
return
if(alert("Are you really sure you want to delete all objects of type [O.type]?",,"Yes","No") != "Yes")
return
if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes")
return
var/O_type = O.type
switch(action_type)
if("Strict type")
var/i = 0
for(var/obj/Obj in world)
if(Obj.type == O_type)
i++
qdel(Obj)
if(!i)
usr << "No objects of this type exist"
return
log_admin("[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted)")
message_admins("<span class='notice'>[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted)</span>")
if("Type and subtypes")
var/i = 0
for(var/obj/Obj in world)
if(istype(Obj,O_type))
i++
qdel(Obj)
if(!i)
usr << "No objects of this type exist"
return
log_admin("[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted)")
message_admins("<span class='notice'>[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted)</span>")
else if(href_list["explode"])
if(!check_rights(R_DEBUG|R_FUN)) return
var/atom/A = locate(href_list["explode"])
if(!isobj(A) && !ismob(A) && !isturf(A))
usr << "This can only be done to instances of type /obj, /mob and /turf"
return
src.cmd_admin_explosion(A)
href_list["datumrefresh"] = href_list["explode"]
else if(href_list["emp"])
if(!check_rights(R_DEBUG|R_FUN)) return
var/atom/A = locate(href_list["emp"])
if(!isobj(A) && !ismob(A) && !isturf(A))
usr << "This can only be done to instances of type /obj, /mob and /turf"
return
src.cmd_admin_emp(A)
href_list["datumrefresh"] = href_list["emp"]
else if(href_list["mark_object"])
if(!check_rights(0)) return
var/datum/D = locate(href_list["mark_object"])
if(!istype(D))
usr << "This can only be done to instances of type /datum"
return
src.holder.marked_datum = D
href_list["datumrefresh"] = href_list["mark_object"]
else if(href_list["rotatedatum"])
if(!check_rights(0)) return
var/atom/A = locate(href_list["rotatedatum"])
if(!istype(A))
usr << "This can only be done to instances of type /atom"
return
switch(href_list["rotatedir"])
if("right") A.set_dir(turn(A.dir, -45))
if("left") A.set_dir(turn(A.dir, 45))
href_list["datumrefresh"] = href_list["rotatedatum"]
else if(href_list["makemonkey"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makemonkey"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(!H)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("monkeyone"=href_list["makemonkey"]))
else if(href_list["makerobot"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makerobot"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(!H)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("makerobot"=href_list["makerobot"]))
else if(href_list["makeslime"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makeslime"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(!H)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("makeslime"=href_list["makeslime"]))
else if(href_list["makeai"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makeai"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(!H)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("makeai"=href_list["makeai"]))
else if(href_list["setspecies"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["setspecies"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
var/new_species = input("Please choose a new species.","Species",null) as null|anything in all_species
if(!H)
usr << "Mob doesn't exist anymore"
return
if(H.set_species(new_species))
usr << "Set species of [H] to [H.species]."
else
usr << "Failed! Something went wrong."
else if(href_list["addlanguage"])
if(!check_rights(R_SPAWN)) return
var/mob/H = locate(href_list["addlanguage"])
if(!istype(H))
usr << "This can only be done to instances of type /mob"
return
var/new_language = input("Please choose a language to add.","Language",null) as null|anything in all_languages
if(!new_language)
return
if(!H)
usr << "Mob doesn't exist anymore"
return
if(H.add_language(new_language))
usr << "Added [new_language] to [H]."
else
usr << "Mob already knows that language."
else if(href_list["remlanguage"])
if(!check_rights(R_SPAWN)) return
var/mob/H = locate(href_list["remlanguage"])
if(!istype(H))
usr << "This can only be done to instances of type /mob"
return
if(!H.languages.len)
usr << "This mob knows no languages."
return
var/datum/language/rem_language = input("Please choose a language to remove.","Language",null) as null|anything in H.languages
if(!rem_language)
return
if(!H)
usr << "Mob doesn't exist anymore"
return
if(H.remove_language(rem_language.name))
usr << "Removed [rem_language] from [H]."
else
usr << "Mob doesn't know that language."
else if(href_list["addverb"])
if(!check_rights(R_DEBUG|R_DEV)) return
var/mob/living/H = locate(href_list["addverb"])
if(!istype(H))
usr << "This can only be done to instances of type /mob/living"
return
var/list/possibleverbs = list()
possibleverbs += "Cancel" // One for the top...
possibleverbs += typesof(/mob/proc,/mob/verb,/mob/living/proc,/mob/living/verb)
switch(H.type)
if(/mob/living/carbon/human)
possibleverbs += typesof(/mob/living/carbon/proc,/mob/living/carbon/verb,/mob/living/carbon/human/verb,/mob/living/carbon/human/proc)
if(/mob/living/silicon/robot)
possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/robot/proc,/mob/living/silicon/robot/verb)
if(/mob/living/silicon/ai)
possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/ai/proc,/mob/living/silicon/ai/verb)
possibleverbs -= H.verbs
possibleverbs += "Cancel" // ...And one for the bottom
var/verb = input("Select a verb!", "Verbs",null) as anything in possibleverbs
if(!H)
usr << "Mob doesn't exist anymore"
return
if(!verb || verb == "Cancel")
return
else
H.verbs += verb
else if(href_list["remverb"])
if(!check_rights(R_DEBUG|R_DEV)) return
var/mob/H = locate(href_list["remverb"])
if(!istype(H))
usr << "This can only be done to instances of type /mob"
return
var/verb = input("Please choose a verb to remove.","Verbs",null) as null|anything in H.verbs
if(!H)
usr << "Mob doesn't exist anymore"
return
if(!verb)
return
else
H.verbs -= verb
else if(href_list["addorgan"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/M = locate(href_list["addorgan"])
if(!istype(M))
usr << "This can only be done to instances of type /mob/living/carbon"
return
var/new_organ = input("Please choose an organ to add.","Organ",null) as null|anything in typesof(/obj/item/organ)-/obj/item/organ
if(!new_organ) return
if(!M)
usr << "Mob doesn't exist anymore"
return
if(locate(new_organ) in M.internal_organs)
usr << "Mob already has that organ."
return
new new_organ(M)
else if(href_list["remorgan"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/M = locate(href_list["remorgan"])
if(!istype(M))
usr << "This can only be done to instances of type /mob/living/carbon"
return
var/obj/item/organ/rem_organ = input("Please choose an organ to remove.","Organ",null) as null|anything in M.internal_organs
if(!M)
usr << "Mob doesn't exist anymore"
return
if(!(locate(rem_organ) in M.internal_organs))
usr << "Mob does not have that organ."
return
usr << "Removed [rem_organ] from [M]."
rem_organ.removed()
qdel(rem_organ)
else if(href_list["fix_nano"])
if(!check_rights(R_DEBUG)) return
var/mob/H = locate(href_list["fix_nano"])
if(!istype(H) || !H.client)
usr << "This can only be done on mobs with clients"
return
nanomanager.send_resources(H.client)
usr << "Resource files sent"
H << "Your NanoUI Resource files have been refreshed"
log_admin("[key_name(usr)] resent the NanoUI resource files to [key_name(H)] ")
else if(href_list["regenerateicons"])
if(!check_rights(0)) return
var/mob/M = locate(href_list["regenerateicons"])
if(!ismob(M))
usr << "This can only be done to instances of type /mob"
return
M.regenerate_icons()
else if(href_list["adjustDamage"] && href_list["mobToDamage"])
if(!check_rights(R_DEBUG|R_ADMIN|R_FUN)) return
var/mob/living/L = locate(href_list["mobToDamage"])
if(!istype(L)) return
var/Text = href_list["adjustDamage"]
var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num
if(!L)
usr << "Mob doesn't exist anymore"
return
switch(Text)
if("brute") L.adjustBruteLoss(amount)
if("fire") L.adjustFireLoss(amount)
if("toxin") L.adjustToxLoss(amount)
if("oxygen")L.adjustOxyLoss(amount)
if("brain") L.adjustBrainLoss(amount)
if("clone") L.adjustCloneLoss(amount)
else
usr << "You caused an error. DEBUG: Text:[Text] Mob:[L]"
return
if(amount != 0)
log_admin("[key_name(usr)] dealt [amount] amount of [Text] damage to [L]")
message_admins("<span class='notice'>[key_name(usr)] dealt [amount] amount of [Text] damage to [L]</span>")
href_list["datumrefresh"] = href_list["mobToDamage"]
else if(href_list["call_proc"])
var/datum/D = locate(href_list["call_proc"])
if(istype(D) || istype(D, /client)) // can call on clients too, not just datums
callproc_targetpicked(1, D)
if(href_list["datumrefresh"])
var/datum/DAT = locate(href_list["datumrefresh"])
if(istype(DAT, /datum) || istype(DAT, /client))
debug_variables(DAT)
return
@@ -0,0 +1,167 @@
// Variables to not even show in the list.
// step_* and bound_* are here because they literally break the game and do nothing else.
// parent_type is here because it's pointless to show in VV.
/var/list/view_variables_hide_vars = list("bound_x", "bound_y", "bound_height", "bound_width", "bounds", "parent_type", "step_x", "step_y", "step_size")
// Variables not to expand the lists of. Vars is pointless to expand, and overlays/underlays cannot be expanded.
/var/list/view_variables_dont_expand = list("overlays", "underlays", "vars")
// Variables that runtime if you try to test associativity of the lists they contain by indexing
/var/list/view_variables_no_assoc = list("verbs", "contents")
// Acceptable 'in world', as VV would be incredibly hampered otherwise
/client/proc/debug_variables(datum/D in world)
set category = "Debug"
set name = "View Variables"
if(!check_rights(0))
return
if(!D)
return
var/icon/sprite
if(istype(D, /atom))
var/atom/A = D
if(A.icon && A.icon_state)
sprite = icon(A.icon, A.icon_state)
usr << browse_rsc(sprite, "view_vars_sprite.png")
usr << browse_rsc('code/js/view_variables.js', "view_variables.js")
var/html = {"
<html>
<head>
<script src='view_variables.js'></script>
<title>[D] (\ref[D] - [D.type])</title>
<style>
body { font-family: Verdana, sans-serif; font-size: 9pt; }
.value { font-family: "Courier New", monospace; font-size: 8pt; }
</style>
</head>
<body onload='selectTextField(); updateSearch()'; onkeyup='updateSearch()'>
<div align='center'>
<table width='100%'><tr>
<td width='50%'>
<table align='center' width='100%'><tr>
[sprite ? "<td><img src='view_vars_sprite.png'></td>" : ""]
<td><div align='center'>[D.get_view_variables_header()]</div></td>
</tr></table>
<div align='center'>
<b><font size='1'>[replacetext("[D.type]", "/", "/<wbr>")]</font></b>
[holder.marked_datum == D ? "<br/><font size='1' color='red'><b>Marked Object</b></font>" : ""]
</div>
</td>
<td width='50%'>
<div align='center'>
<a href='?_src_=vars;datumrefresh=\ref[D]'>Refresh</a>
<form>
<select name='file'
size='1'
onchange='loadPage(this.form.elements\[0\])'
target='_parent._top'
onmouseclick='this.focus()'
style='background-color:#ffffff'>
<option>Select option</option>
<option />
<option value='?_src_=vars;mark_object=\ref[D]'>Mark Object</option>
<option value='?_src_=vars;call_proc=\ref[D]'>Call Proc</option>
[D.get_view_variables_options()]
</select>
</form>
</div>
</td>
</tr></table>
</div>
<hr/>
<font size='1'>
<b>E</b> - Edit, tries to determine the variable type by itself.<br/>
<b>C</b> - Change, asks you for the var type first.<br/>
<b>M</b> - Mass modify: changes this variable for all objects of this type.<br/>
</font>
<hr/>
<table width='100%'><tr>
<td width='20%'>
<div align='center'>
<b>Search:</b>
</div>
</td>
<td width='80%'>
<input type='text'
id='filter'
name='filter_text'
value=''
style='width:100%;' />
</td>
</tr></table>
<hr/>
<ol id='vars'>
[make_view_variables_var_list(D)]
</ol>
</body>
</html>
"}
usr << browse(html, "window=variables\ref[D];size=475x650")
/proc/make_view_variables_var_list(datum/D)
. = ""
var/list/variables = list()
for(var/x in D.vars)
if(x in view_variables_hide_vars)
continue
variables += x
variables = sortList(variables)
for(var/x in variables)
. += make_view_variables_var_entry(D, x, D.vars[x])
/proc/make_view_variables_value(value, varname = "*")
var/vtext = ""
var/extra = list()
if(isnull(value))
vtext = "null"
else if(istext(value))
vtext = "\"[value]\""
else if(isicon(value))
vtext = "[value]"
else if(isfile(value))
vtext = "'[value]'"
else if(istype(value, /datum))
var/datum/DA = value
if("[DA]" == "[DA.type]" || !"[DA]")
vtext = "<a href='?_src_=vars;Vars=\ref[DA]'>\ref[DA]</a> - [DA.type]"
else
vtext = "<a href='?_src_=vars;Vars=\ref[DA]'>\ref[DA]</a> - [DA] ([DA.type])"
else if(istype(value, /client))
var/client/C = value
vtext = "<a href='?_src_=vars;Vars=\ref[C]'>\ref[C]</a> - [C] ([C.type])"
else if(islist(value))
var/list/L = value
vtext = "/list ([L.len])"
if(!(varname in view_variables_dont_expand) && L.len > 0 && L.len < 100)
extra += "<ul>"
for (var/index = 1 to L.len)
var/entry = L[index]
if(!isnum(entry) && !isnull(entry) && !(varname in view_variables_no_assoc) && L[entry] != null)
extra += "<li>[index]: [make_view_variables_value(entry)] -> [make_view_variables_value(L[entry])]</li>"
else
extra += "<li>[index]: [make_view_variables_value(entry)]</li>"
extra += "</ul>"
else
vtext = "[value]"
return "<span class=value>[vtext]</span>[list2text(extra)]"
/proc/make_view_variables_var_entry(datum/D, varname, value, level=0)
var/ecm = null
if(D)
ecm = {"
(<a href='?_src_=vars;datumedit=\ref[D];varnameedit=[varname]'>E</a>)
(<a href='?_src_=vars;datumchange=\ref[D];varnamechange=[varname]'>C</a>)
(<a href='?_src_=vars;datummass=\ref[D];varnamemass=[varname]'>M</a>)
"}
var/valuestr = make_view_variables_value(value, varname)
return "<li>[ecm][varname] = [valuestr]</li>"