Merge branch 'master' of https://github.com/tgstation/tgstation into Fixbundle

This commit is contained in:
Shadowlight213
2016-08-18 19:47:20 -07:00
1850 changed files with 1126898 additions and 173999 deletions
@@ -452,7 +452,7 @@
if("JOB_PERMABAN")
typedesc = "<b>JOBBAN</b><br><font size='2'>([job])"
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 [(unbanned) ? "" : "(<a href=\"byond://?src=\ref[src];dbbanedit=duration;dbbanid=[banid]\">Edit</a>))"]<br>Expires [expiration]"
if("APPEARANCE_PERMABAN")
typedesc = "<b>IDENTITY PERMABAN</b>"
if("ADMIN_PERMABAN")
@@ -487,4 +487,4 @@
output += "</table></div>"
usr << browse(output,"window=lookupbans;size=900x500")
usr << browse(output,"window=lookupbans;size=900x500")
+80 -9
View File
@@ -1,11 +1,17 @@
//Blocks an attempt to connect before even creating our client datum thing.
//How many new ckey matches before we revert the stickyban to it's roundstart state
//These are exclusive, so once it goes over one of these numbers, it reverts the ban
#define STICKYBAN_MAX_MATCHES 20
#define STICKYBAN_MAX_EXISTING_USER_MATCHES 5 //ie, users who were connected before the ban triggered
#define STICKYBAN_MAX_ADMIN_MATCHES 2
/world/IsBanned(key,address,computer_id)
if (!key || !address || !computer_id)
log_access("Failed Login (invalid data): [key] [address]-[computer_id]")
return list("reason"="invalid login data", "desc"="Error: Could not check ban status, Please try again. Error message: Your computer provided invalid or blank information to the server on connection (byond username, IP, and Computer ID.) Provided information for reference: Username:'[key]' IP:'[address]' Computer ID:'[computer_id]'. (If you continue to get this error, please restart byond or contact byond support.)")
if (text2num(computer_id) == 2147483647) //this cid causes stickybans to go haywire
if (text2num(computer_id) == 2147483647) //this cid causes stickybans to go haywire
log_access("Failed Login (invalid cid): [key] [address]-[computer_id]")
return list("reason"="invalid login data", "desc"="Error: Could not check ban status, Please try again. Error message: Your computer provided an invalid Computer ID.)")
var/admin = 0
@@ -99,18 +105,83 @@
log_access("Failed Login: [key] [computer_id] [address] - Banned [.["reason"]]")
return .
var/list/ban = ..() //default pager ban stuff
if (ban)
var/bannedckey = "ERROR"
if (ban["ckey"])
bannedckey = ban["ckey"]
var/newmatch = FALSE
var/client/C = directory[ckey]
var/cachedban = SSstickyban.cache[bannedckey]
//rogue ban in the process of being reverted.
if (cachedban && cachedban["reverting"])
return null
if (cachedban && ckey != bannedckey)
newmatch = TRUE
if (cachedban["keys"])
if (cachedban["keys"][ckey])
newmatch = FALSE
if (cachedban["matches_this_round"][ckey])
newmatch = FALSE
if (newmatch && cachedban)
var/list/newmatches = cachedban["matches_this_round"]
var/list/newmatches_connected = cachedban["existing_user_matches_this_round"]
var/list/newmatches_admin = cachedban["admin_matches_this_round"]
newmatches[ckey] = ckey
if (C)
newmatches_connected[ckey] = ckey
if (admin)
newmatches_admin[ckey] = ckey
if (\
newmatches.len > STICKYBAN_MAX_MATCHES || \
newmatches_connected.len > STICKYBAN_MAX_EXISTING_USER_MATCHES || \
newmatches_admin.len > STICKYBAN_MAX_ADMIN_MATCHES \
)
if (cachedban["reverting"])
return null
cachedban["reverting"] = TRUE
world.SetConfig("ban", bannedckey, null)
log_game("Stickyban on [bannedckey] detected as rogue, reverting to it's roundstart state")
message_admins("Stickyban on [bannedckey] detected as rogue, reverting to it's roundstart state")
//do not convert to timer.
spawn (5)
world.SetConfig("ban", bannedckey, null)
sleep(1)
world.SetConfig("ban", bannedckey, null)
cachedban["matches_this_round"] = list()
cachedban["existing_user_matches_this_round"] = list()
cachedban["admin_matches_this_round"] = list()
cachedban -= "reverting"
world.SetConfig("ban", bannedckey, list2stickyban(cachedban))
return null
. = ..() //default pager ban stuff
if (.)
//byond will not trigger isbanned() for "global" host bans,
//ie, ones where the "apply to this game only" checkbox is not checked (defaults to not checked)
//So it's safe to let admins walk thru host/sticky bans here
if (admin)
log_admin("The admin [key] has been allowed to bypass a matching host/sticky ban")
message_admins("<span class='adminnotice'>The admin [key] has been allowed to bypass a matching host/sticky ban</span>")
addclientmessage(ckey,"<span class='adminnotice'>You have been allowed to bypass a matching host/sticky ban</span>")
log_admin("The admin [key] has been allowed to bypass a matching host/sticky ban on [bannedckey]")
message_admins("<span class='adminnotice'>The admin [key] has been allowed to bypass a matching host/sticky ban on [bannedckey]</span>")
addclientmessage(ckey,"<span class='adminnotice'>You have been allowed to bypass a matching host/sticky ban on [bannedckey]</span>")
return null
else
log_access("Failed Login: [key] [computer_id] [address] - Banned [.["message"]]")
if (C) //user is already connected!.
C << "You are about to get disconnected for matching a sticky ban after you connected. If this turns out to be the ban evasion detection system going haywire, we will automatically detect this and revert the matches. if you feel that this is the case, please wait EXACTLY 6 seconds then reconnect using file -> reconnect to see if the match was reversed."
var/desc = "\nReason:(StickyBan) You, or another user of this computer or connection ([bannedckey]) is banned from playing here. The ban reason is:\n[ban["message"]]\nThis ban was applied by [ban["admin"]]\nThis is a BanEvasion Detection System ban, if you think this ban is a mistake, please wait EXACTLY 6 seconds, then try again before filing an appeal.\n"
. = list("reason" = "Stickyban", "desc" = desc)
log_access("Failed Login: [key] [computer_id] [address] - StickyBanned [ban["message"]] Target Username: [bannedckey] Placed by [ban["admin"]]")
return .
#undef STICKYBAN_MAX_MATCHES
#undef STICKYBAN_MAX_EXISTING_USER_MATCHES
#undef STICKYBAN_MAX_ADMIN_MATCHES
+12 -2
View File
@@ -21,6 +21,9 @@ var/global/BSACooldown = 0
if(!check_rights())
return
if(!isobserver(usr))
log_game("[key_name_admin(usr)] checked the player panel while in game.")
if(!M)
usr << "You seem to be selecting a mob that doesn't exist anymore."
return
@@ -630,7 +633,8 @@ var/global/BSACooldown = 0
var/turf/T = get_turf(usr.loc)
T.ChangeTurf(chosen)
else
new chosen(usr.loc)
var/atom/A = new chosen(usr.loc)
A.admin_spawned = TRUE
log_admin("[key_name(usr)] spawned [chosen] at ([usr.x],[usr.y],[usr.z])")
feedback_add_details("admin_verb","SA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -699,7 +703,7 @@ var/global/BSACooldown = 0
if(!ai_number)
usr << "<b>No AIs located</b>" //Just so you know the thing is actually working and not just ignoring you.
/datum/admins/proc/output_devil_info()
/datum/admins/proc/output_all_devil_info()
var/devil_number = 0
for(var/D in ticker.mode.devils)
devil_number++
@@ -707,6 +711,12 @@ var/global/BSACooldown = 0
if(!devil_number)
usr << "<b>No Devils located</b>" //Just so you know the thing is actually working and not just ignoring you.
/datum/admins/proc/output_devil_info(mob/living/M)
if(istype(M) && M.mind && M.mind.devilinfo)
usr << ticker.mode.printdevilinfo(M.mind)
else
usr << "<b>[M] is not a devil."
/datum/admins/proc/manage_free_slots()
if(!check_rights())
return
+6 -8
View File
@@ -37,16 +37,14 @@
src << "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>"
return
src << browse(F,"window=investigate[subject];size=800x300")
if("hrefs") //persistant logs and stuff
if(config && config.log_hrefs)
if(href_logfile)
src << browse(href_logfile,"window=investigate[subject];size=800x300")
else
src << "<font color='red'>Error: admin_investigate: No href logfile found.</font>"
return
if(href_logfile)
src << browse(href_logfile,"window=investigate[subject];size=800x300")
else if(!config.log_hrefs)
src << "<span class='danger'>Href logging is off and no logfile was found.</span>"
return
else
src << "<font color='red'>Error: admin_investigate: Href Logging is not on.</font>"
src << "<span class='danger'>No href logfile was found.</span>"
return
if("notes")
show_note()
+8 -1
View File
@@ -161,6 +161,9 @@ var/list/admin_ranks = list() //list of all admin_rank datums
C.holder = null
admins.Cut()
load_admin_ranks()
//Clear profile access
for(var/A in world.GetConfig("admin"))
world.SetConfig("APP/admin", A, null)
var/list/rank_names = list()
for(var/datum/admin_rank/R in admin_ranks)
@@ -189,6 +192,8 @@ var/list/admin_ranks = list() //list of all admin_rank datums
var/datum/admins/D = new(rank_names[rank], ckey) //create the admin datum and store it for later use
if(!D)
continue //will occur if an invalid rank is provided
if(D.rank.rights & R_DEBUG) //grant profile access
world.SetConfig("APP/admin", ckey, "role=admin")
D.associate(directory[ckey]) //find the client for a ckey if they are connected and associate them with the new admin datum
else
establish_db_connection()
@@ -214,6 +219,8 @@ var/list/admin_ranks = list() //list of all admin_rank datums
var/datum/admins/D = new(rank_names[rank], ckey) //create the admin datum and store it for later use
if(!D)
continue //will occur if an invalid rank is provided
if(D.rank.rights & R_DEBUG) //grant profile access
world.SetConfig("APP/admin", ckey, "role=admin")
D.associate(directory[ckey]) //find the client for a ckey if they are connected and associate them with the new admin datum
#ifdef TESTING
@@ -369,4 +376,4 @@ var/list/admin_ranks = list() //list of all admin_rank datums
var/sql_admin_rank = sanitizeSQL(newrank)
var/DBQuery/query_update = dbcon.NewQuery("UPDATE [format_table_name("player")] SET lastadminrank = '[sql_admin_rank]' WHERE ckey = '[sql_ckey]'")
query_update.Execute()
query_update.Execute()
+15 -9
View File
@@ -56,8 +56,6 @@ var/list/admin_verbs_admin = list(
/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 centcom*/
/client/proc/cmd_admin_destroy_shuttle, /* Destroys the emergency shuttle, allowing us to import a new shuttle template. Or just horribly fuck with the game. */
/client/proc/cmd_admin_import_shuttle, /* Imports a emergency shuttle from a template, and sends it to its round start location. Probably should destroy the old one first.*/
/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_local_narrate, /*sends text to all mobs within view of atom*/
@@ -67,7 +65,8 @@ var/list/admin_verbs_admin = list(
/client/proc/toggle_AI_interact, /*toggle admin ability to interact with machines as an AI*/
/client/proc/customiseSNPC, /* Customise any interactive crewmembers in the world */
/client/proc/resetSNPC, /* Resets any interactive crewmembers in the world */
/client/proc/toggleSNPC /* Toggles an npc's processing mode */
/client/proc/toggleSNPC, /* Toggles an npc's processing mode */
/client/proc/open_shuttle_manipulator /* Opens shuttle manipulator UI */
)
var/list/admin_verbs_ban = list(
/client/proc/unban_panel,
@@ -95,7 +94,11 @@ var/list/admin_verbs_fun = list(
/client/proc/forceEvent,
/client/proc/bluespace_artillery,
/client/proc/admin_change_sec_level,
/client/proc/toggle_nuke
/client/proc/toggle_nuke,
/client/proc/mass_zombie_infection,
/client/proc/mass_zombie_cure,
/client/proc/polymorph_all,
/client/proc/show_tip
)
var/list/admin_verbs_spawn = list(
/datum/admins/proc/spawn_atom, /*allows us to spawn instances*/
@@ -144,7 +147,10 @@ var/list/admin_verbs_debug = list(
/client/proc/create_outfits,
/client/proc/debug_huds,
/client/proc/map_template_load,
/client/proc/map_template_upload
/client/proc/map_template_upload,
/client/proc/jump_to_ruin,
/client/proc/clear_dynamic_transit,
/client/proc/toggle_medal_disable
)
var/list/admin_verbs_possess = list(
/proc/possess,
@@ -294,7 +300,7 @@ var/list/admin_verbs_hideable = list(
/client/proc/count_objects_all,
/client/proc/cmd_assume_direct_control,
/client/proc/startSinglo,
/client/proc/fps,
/client/proc/set_server_fps,
/client/proc/cmd_admin_grantfullaccess,
/client/proc/cmd_admin_areatest,
/client/proc/readmin
@@ -548,10 +554,10 @@ var/list/admin_verbs_hideable = list(
var/message = input(usr, "What do you want the message to be?", "Make Sound") as text | null
if(!message)
return
var/templanguages = O.languages
O.languages |= ALL
var/templanguages = O.languages_spoken
O.languages_spoken |= ALL
O.say(message)
O.languages = templanguages
O.languages_spoken = templanguages
log_admin("[key_name(usr)] made [O] at [O.x], [O.y], [O.z] say \"[message]\"")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] made [O] at [O.x], [O.y], [O.z]. say \"[message]\"</span>")
feedback_add_details("admin_verb","OS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+26 -11
View File
@@ -34,7 +34,7 @@
return
/client/proc/create_poll_function()
var/polltype = input("Choose poll type.","Poll Type") in list("Single Option","Text Reply","Rating","Multiple Choice")
var/polltype = input("Choose poll type.","Poll Type") in list("Single Option","Text Reply","Rating","Multiple Choice", "Instant Runoff Voting")|null
var/choice_amount = 0
switch(polltype)
if("Single Option")
@@ -48,6 +48,10 @@
choice_amount = input("How many choices should be allowed?","Select choice amount") as num|null
if(!choice_amount)
return
if ("Instant Runoff Voting")
polltype = POLLTYPE_IRV
else
return 0
var/starttime = SQLtime()
var/endtime = input("Set end time for poll as format YYYY-MM-DD HH:MM:SS. All times in server time. HH:MM:SS is optional and 24-hour. Must be later than starting time for obvious reasons.", "Set end time", SQLtime()) as text
if(!endtime)
@@ -81,12 +85,20 @@
adminonly = 0
else
return
var/dontshow
switch(alert("Hide poll results from tracking until completed?",,"Yes","No","Cancel"))
if("Yes")
dontshow = 1
if("No")
dontshow = 0
else
return
var/sql_ckey = sanitizeSQL(ckey)
var/question = input("Write your question","Question") as message|null
if(!question)
return
question = sanitizeSQL(question)
var/DBQuery/query_polladd_question = dbcon.NewQuery("INSERT INTO [format_table_name("poll_question")] (polltype, starttime, endtime, question, adminonly, multiplechoiceoptions, createdby_ckey, createdby_ip) VALUES ('[polltype]', '[starttime]', '[endtime]', '[question]', '[adminonly]', '[choice_amount]', '[sql_ckey]', '[address]')")
var/DBQuery/query_polladd_question = dbcon.NewQuery("INSERT INTO [format_table_name("poll_question")] (polltype, starttime, endtime, question, adminonly, multiplechoiceoptions, createdby_ckey, createdby_ip, dontshow) VALUES ('[polltype]', '[starttime]', '[endtime]', '[question]', '[adminonly]', '[choice_amount]', '[sql_ckey]', '[address]', '[dontshow]')")
if(!query_polladd_question.Execute())
var/err = query_polladd_question.ErrorMsg()
log_game("SQL ERROR adding new poll question to table. Error : \[[err]\]\n")
@@ -109,14 +121,15 @@
if(!option)
return pollid
option = sanitizeSQL(option)
var/percentagecalc
switch(alert("Calculate option results as percentage?",,"Yes","No","Cancel"))
if("Yes")
percentagecalc = 1
if("No")
percentagecalc = 0
else
return pollid
var/percentagecalc = 1
if (polltype != POLLTYPE_IRV)
switch(alert("Calculate option results as percentage?",,"Yes","No","Cancel"))
if("Yes")
percentagecalc = 1
if("No")
percentagecalc = 0
else
return pollid
var/minval = 0
var/maxval = 0
var/descmin = ""
@@ -152,9 +165,11 @@
var/err = query_polladd_option.ErrorMsg()
log_game("SQL ERROR adding new poll option to table. Error : \[[err]\]\n")
return pollid
switch(alert(" ",,"Add option","Finish"))
switch(alert(" ",,"Add option","Finish", "Cancel"))
if("Add option")
add_option = 1
if("Finish")
add_option = 0
else
return 0
return pollid
+85
View File
@@ -0,0 +1,85 @@
/obj/effect/fun_balloon
name = "fun balloon"
desc = "This is going to be a laugh riot."
icon = 'icons/obj/weapons.dmi'
icon_state = "syndballoon"
anchored = TRUE
var/popped = FALSE
/obj/effect/fun_balloon/New()
. = ..()
SSobj.processing |= src
/obj/effect/fun_balloon/Destroy()
SSobj.processing -= src
. = ..()
/obj/effect/fun_balloon/process()
if(!popped && check() && !qdeleted(src))
popped = TRUE
effect()
pop()
/obj/effect/fun_balloon/proc/check()
return FALSE
/obj/effect/fun_balloon/proc/effect()
return
/obj/effect/fun_balloon/proc/pop()
visible_message("[src] pops!")
playsound(get_turf(src), 'sound/items/party_horn.ogg', 50, 1, -1)
qdel(src)
/obj/effect/fun_balloon/attack_ghost(mob/user)
if(!user.client || !user.client.holder || popped)
return
switch(alert("Pop [src]?","Fun Balloon","Yes","No"))
if("Yes")
effect()
pop()
/obj/effect/fun_balloon/sentience
name = "sentience fun balloon"
desc = "When this pops, things are gonna get more aware around here."
var/effect_range = 3
var/group_name = "a bunch of giant spiders"
/obj/effect/fun_balloon/sentience/effect()
var/list/bodies = list()
for(var/mob/living/M in range(effect_range, get_turf(src)))
bodies += M
var/question = "Would you like to be [group_name]?"
var/list/candidates = pollCandidates(question, "pAI", null, FALSE, 100)
while(candidates.len && bodies.len)
var/mob/dead/observer/ghost = pick_n_take(candidates)
var/mob/living/body = pick_n_take(bodies)
body << "Your mob has been taken over by a ghost!"
message_admins("[key_name_admin(ghost)] has taken control \
of ([key_name_admin(body)])")
body.ghostize(0)
body.key = ghost.key
PoolOrNew(/obj/effect/overlay/temp/sparkle, body)
/obj/effect/fun_balloon/sentience/emergency_shuttle
name = "shuttle sentience fun balloon"
var/trigger_time = 60
/obj/effect/fun_balloon/sentience/emergency_shuttle/check()
. = FALSE
if(SSshuttle.emergency && (SSshuttle.emergency.timeLeft() <= trigger_time) && (SSshuttle.emergency.mode == SHUTTLE_CALL))
. = TRUE
/obj/effect/fun_balloon/scatter
name = "scatter fun balloon"
desc = "When this pops, you're not going to be around here anymore."
var/effect_range = 5
/obj/effect/fun_balloon/scatter/effect()
for(var/mob/living/M in range(effect_range, get_turf(src)))
var/turf/T = find_safe_turf()
PoolOrNew(/obj/effect/overlay/temp/sparkle, M)
M.forceMove(T)
M << "<span class='notice'>Pop!</span>"
+134
View File
@@ -0,0 +1,134 @@
/datum/ipintel
var/ip
var/intel = 0
var/cache = FALSE
var/cacheminutesago = 0
var/cachedate = ""
var/cacherealtime = 0
/datum/ipintel/New()
cachedate = SQLtime()
cacherealtime = world.realtime
/datum/ipintel/proc/is_valid()
. = FALSE
if (intel < 0)
return
if (intel <= config.ipintel_rating_bad)
if (world.realtime < cacherealtime+(config.ipintel_save_good*60*60*10))
return TRUE
else
if (world.realtime < cacherealtime+(config.ipintel_save_bad*60*60*10))
return TRUE
/proc/get_ip_intel(ip, bypasscache = FALSE, updatecache = TRUE)
var/datum/ipintel/res = new()
res.ip = ip
. = res
if (!ip || !config.ipintel_email || !SSipintel.enabled)
return
if (!bypasscache)
var/datum/ipintel/cachedintel = SSipintel.cache[ip]
if (cachedintel && cachedintel.is_valid())
cachedintel.cache = TRUE
return cachedintel
if (establish_db_connection())
var/DBQuery/query = dbcon.NewQuery({"
SELECT date, intel, TIMESTAMPDIFF(MINUTE,date,NOW())
FROM [format_table_name("ipintel")]
WHERE
ip = INET_ATON('[ip]')
AND ((
intel < [config.ipintel_rating_bad]
AND
date + INTERVAL [config.ipintel_save_good] HOUR > NOW()
) OR (
intel >= [config.ipintel_rating_bad]
AND
date + INTERVAL [config.ipintel_save_bad] HOUR > NOW()
))
"})
query.Execute()
if (query.NextRow())
res.cache = TRUE
res.cachedate = query.item[1]
res.intel = query.item[2]
res.cacheminutesago = query.item[3]
res.cacherealtime = world.realtime - (query.item[3]*10*60)
SSipintel.cache[ip] = res
return
res.intel = ip_intel_query(ip)
if (updatecache && res.intel >= 0)
SSipintel.cache[ip] = res
if (establish_db_connection())
var/DBQuery/query = dbcon.NewQuery("INSERT INTO [format_table_name("ipintel")] (ip, intel) VALUES (INET_ATON('[ip]'), [res.intel]) ON DUPLICATE KEY UPDATE intel = VALUES(intel), date = NOW()")
query.Execute()
return
/proc/ip_intel_query(ip, var/retryed=0)
. = -1 //default
if (!ip)
return
if (SSipintel.throttle > world.timeofday)
return
if (!SSipintel.enabled)
return
var/list/http[] = world.Export("http://[config.ipintel_domain]/check.php?ip=[ip]&contact=[config.ipintel_email]&format=json&flags=f")
if (http)
var/status = text2num(http["STATUS"])
if (status == 200)
var/response = json_decode(file2text(http["CONTENT"]))
if (response)
if (response["status"] == "success")
var/intelnum = text2num(response["result"])
if (isnum(intelnum))
return text2num(response["result"])
else
ipintel_handle_error("Bad intel from server: [response["result"]].", ip, retryed)
if (!retryed)
sleep(25)
return .(ip, 1)
else
ipintel_handle_error("Bad response from server: [response["status"]].", ip, retryed)
if (!retryed)
sleep(25)
return .(ip, 1)
else if (status == 429)
ipintel_handle_error("Error #429: We have exceeded the rate limit.", ip, 1)
return
else
ipintel_handle_error("Unknown status code: [status].", ip, retryed)
if (!retryed)
sleep(25)
return .(ip, 1)
else
ipintel_handle_error("Unable to connect to API.", ip, retryed)
if (!retryed)
sleep(25)
return .(ip, 1)
/proc/ipintel_handle_error(error, ip, retryed)
if (retryed)
SSipintel.errors++
error += " Could not check [ip]. Disabling IPINTEL for [SSipintel.errors] minute[( SSipintel.errors == 1 ? "" : "s" )]"
SSipintel.throttle = world.timeofday + (10 * 120 * SSipintel.errors)
else
error += " Attempting retry on [ip]."
log_ipintel(error)
/proc/log_ipintel(text)
log_game("IPINTEL: [text]")
debug_admins("IPINTEL: [text]")
+13 -26
View File
@@ -318,11 +318,11 @@
dat += "Current Game Mode: <B>[ticker.mode.name]</B><BR>"
dat += "Round Duration: <B>[round(world.time / 36000)]:[add_zero("[world.time / 600 % 60]", 2)]:[world.time / 100 % 6][world.time / 100 % 10]</B><BR>"
dat += "<B>Emergency shuttle</B><BR>"
if(SSshuttle.emergency.mode < SHUTTLE_CALL)
if(EMERGENCY_IDLE_OR_RECALLED)
dat += "<a href='?_src_=holder;call_shuttle=1'>Call Shuttle</a><br>"
else
var/timeleft = SSshuttle.emergency.timeLeft()
if(SSshuttle.emergency.mode < SHUTTLE_DOCKED)
if(SSshuttle.emergency.mode == SHUTTLE_CALL)
dat += "ETA: <a href='?_src_=holder;edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
dat += "<a href='?_src_=holder;call_shuttle=2'>Send Back</a><br>"
else
@@ -437,7 +437,7 @@
if(M)
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(No Client)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td>"
dat += "<td><A href='?_src_=holder;=\ref[M]'>FLW</a></td>"
dat += "<td><A href='?_src_=holder;adminplayerobservefollow=\ref[M]'>FLW</a></td>"
dat += "<td><A HREF='?_src_=holder;traitor=\ref[M]'>Show Objective</A></td></tr>"
else
dat += "<tr><td><a href='?_src_=vars;Vars=\ref[wizard]'>[wizard.name]([wizard.key])</a><i>Wizard body destroyed!</i></td></tr>"
@@ -468,6 +468,16 @@
dat += "<td><A href='?_src_=holder;adminplayerobservefollow=\ref[M]'>FLW</a></td></tr>"
dat += "</table>"
if(ticker.mode.servants_of_ratvar.len)
dat += "<br><table cellspacing=5><tr><td><B>Servants of Ratvar</B></td><td></td></tr>"
for(var/datum/mind/N in ticker.mode.servants_of_ratvar)
var/mob/M = N.current
if(M)
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(ghost)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td>"
dat += "<td><A href='?_src_=holder;adminplayerobservefollow=\ref[M]'>FLW</a></td></tr>"
dat += "</table>"
if(ticker.mode.red_deities.len || ticker.mode.red_deity_prophets.len || ticker.mode.blue_deity_prophets.len || ticker.mode.red_deity_followers.len || ticker.mode.blue_deity_followers.len)
dat += "<br><table cellspacing=5><tr><td><B>Red Deity</B></td><td></td></tr>"
for(var/datum/mind/N in ticker.mode.red_deities)
@@ -542,29 +552,6 @@
dat += "<td><A href='?priv_msg=[traitor.key]'>PM</A></td></tr>"
dat += "</table>"
if(ticker.mode.shadows.len)
dat += "<br><table cellspacing=5><tr><td><B>Shadowlings</B></td><td></td></tr>"
for(var/datum/mind/N in ticker.mode.shadows)
var/mob/M = N.current
if(M)
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(No Client)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td>"
dat += "<td><A href='?_src_=holder;adminplayerobservefollow=\ref[M]'>FLW</a></td></tr>"
else
dat += "<tr><td><a href='?_src_=vars;Vars=\ref[N]'>[N.name]([N.key])</a><i>Shadowling body destroyed!</i></td>"
dat += "<td><A href='?priv_msg=[N.key]'>PM</A></td></tr>"
dat += "</table>"
if(ticker.mode.thralls.len)
dat += "<br><table cellspacing=5><tr><td><B>Shadowling Thralls</B></td><td></td></tr>"
for(var/datum/mind/N in ticker.mode.thralls)
var/mob/M = N.current
if(M)
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(No Client)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td>"
dat += "<td><A href='?_src_=holder;adminplayerobservefollow=\ref[M]'>FLW</a></td></tr>"
dat += "</table>"
if(ticker.mode.abductors.len)
dat += "<br><table cellspacing=5><tr><td><B>Abductors</B></td><td></td><td></td></tr>"
for(var/datum/mind/abductor in ticker.mode.abductors)
+55 -6
View File
@@ -28,6 +28,7 @@
<A href='?src=\ref[src];secrets=fingerprints'>List Fingerprints</A><BR>
<A href='?src=\ref[src];secrets=ctfbutton'>Enable/Disable CTF</A><BR><BR>
<A href='?src=\ref[src];secrets=tdomereset'>Reset Thunderdome to default state</A><BR>
<A href='?src=\ref[src];secrets=reset_name'>Reset Station Name</A><BR>
<BR>
<B>Shuttles</B><BR>
<BR>
@@ -44,6 +45,7 @@
<A href='?src=\ref[src];secrets=virus'>Trigger a Virus Outbreak</A><BR>
<A href='?src=\ref[src];secrets=monkey'>Turn all humans into monkeys</A><BR>
<A href='?src=\ref[src];secrets=anime'>Chinese Cartoons</A><BR>
<A href='?src=\ref[src];secrets=allspecies'>Change the species of all humans</A><BR>
<A href='?src=\ref[src];secrets=power'>Make all areas powered</A><BR>
<A href='?src=\ref[src];secrets=unpower'>Make all areas unpowered</A><BR>
@@ -62,6 +64,8 @@
<A href='?src=\ref[src];secrets=floorlava'>The floor is lava! (DANGEROUS: extremely lame)</A><BR>
<BR>
<A href='?src=\ref[src];secrets=changebombcap'>Change bomb cap</A><BR>
<A href='?src=\ref[src];secrets=masspurrbation'>Mass Purrbation</A><BR>
<A href='?src=\ref[src];secrets=massremovepurrbation'>Mass Remove Purrbation</A><BR>
"}
dat += "<BR>"
@@ -144,6 +148,14 @@
for(var/datum/disease/D in SSdisease.processing)
D.cure(D)
if("reset_name")
if(!check_rights(R_ADMIN))
return
world.name = new_station_name()
station_name = world.name
log_admin("[key_name(usr)] reset the station name.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] reset the station name.</span>")
if("list_bombers")
if(!check_rights(R_ADMIN))
return
@@ -379,6 +391,32 @@
for(var/obj/machinery/light/L in machines)
L.broken()
if("anime")
if(!check_rights(R_FUN))
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","CC")
message_admins("[key_name_admin(usr)] made everything kawaii.")
for(var/mob/living/carbon/human/H in mob_list)
H << sound('sound/AI/animes.ogg')
if(H.dna.species.id == "human")
if(H.dna.features["tail_human"] == "None" || H.dna.features["ears"] == "None")
H.dna.features["tail_human"] = "Cat"
H.dna.features["ears"] = "Cat"
var/seifuku = pick(typesof(/obj/item/clothing/under/schoolgirl))
var/obj/item/clothing/under/schoolgirl/I = new seifuku
var/list/honorifics = list("[MALE]" = list("kun"), "[FEMALE]" = list("chan","tan"), "[NEUTER]" = list("san")) //John Robust -> Robust-kun
var/list/names = splittext(H.real_name," ")
var/forename = names.len > 1 ? names[2] : names[1]
var/newname = "[forename]-[pick(honorifics["[H.gender]"])]"
H.fully_replace_character_name(H.real_name,newname)
H.unEquip(H.w_uniform)
H.equip_to_slot_or_del(I, slot_w_uniform)
I.flags |= NODROP
else
H << "You're not kawaii enough for this."
if("whiteout")
if(!check_rights(R_FUN))
return
@@ -389,8 +427,7 @@
L.fix()
if("floorlava")
var/datum/weather/floor_is_lava/storm = new /datum/weather/floor_is_lava
storm.weather_start_up()
SSweather.run_weather("the floor is lava")
if("virus")
if(!check_rights(R_FUN))
@@ -530,13 +567,25 @@
if("ctfbutton")
if(!check_rights(R_ADMIN))
return
var/ctf_enabled = 0
var/ctf_enabled = FALSE
for(var/obj/machinery/capture_the_flag/CTF in machines)
ctf_enabled = !CTF.ctf_enabled
CTF.ctf_enabled = !CTF.ctf_enabled
CTF.TellGhost()
ctf_enabled = CTF.toggle_ctf()
message_admins("[key_name_admin(usr)] has [ctf_enabled? "enabled" : "disabled"] CTF!")
notify_ghosts("CTF has been [ctf_enabled? "enabled" : "disabled"]!",'sound/effects/ghost2.ogg')
if("masspurrbation")
if(!check_rights(R_FUN))
return
mass_purrbation()
message_admins("[key_name_admin(usr)] has put everyone on \
purrbation!")
log_admin("[key_name(usr)] has put everyone on purrbation.")
if("massremovepurrbation")
if(!check_rights(R_FUN))
return
mass_remove_purrbation()
message_admins("[key_name_admin(usr)] has removed everyone from \
purrbation.")
log_admin("[key_name(usr)] has removed everyone from purrbation.")
if(E)
E.processing = 0
+4 -1
View File
@@ -127,7 +127,10 @@
return
output += "<h2><center>Notes of [target_ckey]</center></h2>"
if(!linkless)
output += "<center><a href='?_src_=holder;addnote=[target_ckey]'>\[Add Note\]</a></center>"
output += "<center><a href='?_src_=holder;addnote=[target_ckey]'>\[Add Note\]</a>"
output += " <a href='?_src_=holder;shownoteckey=[target_ckey]'>\[Refresh Page\]</a></center>"
else
output += " <a href='?_src_=holder;shownoteckeylinkless=[target_ckey]'>\[Refresh Page\]</a></center>"
output += ruler
while(query_get_notes.NextRow())
var/id = query_get_notes.item[1]
+51 -7
View File
@@ -18,6 +18,8 @@
if (!ckey)
return
ckey = ckey(ckey)
ban["ckey"] = ckey
if (get_stickyban_from_ckey(ckey))
usr << "<span class='adminnotice'>Error: Can not add a stickyban: User already has a current sticky ban</span>"
@@ -125,9 +127,37 @@
log_admin("[key_name(usr)] has edited [ckey]'s sticky ban reason from [oldreason] to [reason]")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has edited [ckey]'s sticky ban reason from [oldreason] to [reason]</span>")
if ("revert")
if (!data["ckey"])
return
var/ckey = data["ckey"]
if (alert("Are you sure you want to revert the sticky ban on [ckey] to its state at round start?","Are you sure","Yes","No") == "No")
return
var/ban = get_stickyban_from_ckey(ckey)
if (!ban)
usr << "<span class='adminnotice'>Error: No sticky ban for [ckey] found!"
return
var/cached_ban = SSstickyban.cache[ckey]
if (!cached_ban)
usr << "<span class='adminnotice'>Error: No cached sticky ban for [ckey] found!"
world.SetConfig("ban",ckey,null)
log_admin("[key_name(usr)] has reverted [ckey]'s sticky ban to it's state at round start.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has reverted [ckey]'s sticky ban to it's state at round start.</span>")
//revert is mostly used when shit goes rouge, so we have to set it to null
// and wait a byond tick before assigning it to ensure byond clears its shit.
sleep(world.tick_lag)
world.SetConfig("ban",ckey,list2stickyban(cached_ban))
/datum/admins/proc/stickyban_gethtml(ckey, ban)
. = "<a href='?_src_=holder;stickyban=remove&ckey=[ckey]'>\[-\]</a><b>[ckey]</b><br />"
. += "[ban["message"]] <b><a href='?_src_=holder;stickyban=edit&ckey=[ckey]'>\[Edit\]</a></b><br />"
. = {"
<a href='?_src_=holder;stickyban=remove&ckey=[ckey]'>\[-\]</a>
<a href='?_src_=holder;stickyban=revert&ckey=[ckey]'>\[revert\]</a>
<b>[ckey]</b>
<br />"
[ban["message"]] <b><a href='?_src_=holder;stickyban=edit&ckey=[ckey]'>\[Edit\]</a></b><br />
"}
if (ban["admin"])
. += "[ban["admin"]]<br />"
else
@@ -175,7 +205,13 @@
if (!ban)
return null
. = params2list(ban)
.["keys"] = splittext(.["keys"], ",")
if (.["keys"])
var/keys = splittext(.["keys"], ",")
var/ckeys = list()
for (var/key in keys)
var/ckey = ckey(key)
ckeys[ckey] = ckey //to make searching faster.
.["keys"] = ckeys
.["type"] = splittext(.["type"], ",")
.["IP"] = splittext(.["IP"], ",")
.["computer_id"] = splittext(.["computer_id"], ",")
@@ -189,10 +225,18 @@
.["keys"] = jointext(.["keys"], ",")
if (.["type"])
.["type"] = jointext(.["type"], ",")
if (.["IP"])
.["IP"] = jointext(.["IP"], ",")
if (.["computer_id"])
.["computer_id"] = jointext(.["computer_id"], ",")
//internal tracking only, shouldn't be stored
. -= "existing_user_matches_this_round"
. -= "admin_matches_this_round"
. -= "matches_this_round"
. -= "reverting"
//storing these can sometimes cause sticky bans to start matching everybody
// and isn't even needed for sticky ban matching, as the hub tracks these seperately
. -= "IP"
. -= "computer_id"
. = list2params(.)
+150 -120
View File
@@ -17,11 +17,11 @@
C << 'sound/effects/adminhelp.ogg'
C << "<font color='red' size='4'><b>- AdminHelp Rejected! -</b></font>"
C << "<font color='red'><b>Your admin help was rejected.</b> The adminhelp verb has been returned to you so that you may try again</font>"
C << "<font color='red'><b>Your admin help was rejected.</b> The adminhelp verb has been returned to you so that you may try again.</font>"
C << "Please try to be calm, clear, and descriptive in admin helps, do not assume the admin has seen any related events, and clearly state the names of anybody you are reporting."
message_admins("[key_name_admin(usr)] Rejected [C.key]'s admin help. [C.key]'s Adminhelp verb has been returned to them")
log_admin("[key_name(usr)] Rejected [C.key]'s admin help")
message_admins("[key_name_admin(usr)] Rejected [C.key]'s admin help. [C.key]'s Adminhelp verb has been returned to them.")
log_admin("[key_name(usr)] Rejected [C.key]'s admin help.")
else if(href_list["stickyban"])
stickyban(href_list["stickyban"],href_list)
@@ -31,35 +31,35 @@
usr << "<span class='danger'>Not until the round starts!</span>"
return
switch(href_list["makeAntag"])
if("1")
if("traitors")
if(src.makeTraitors())
message_admins("[key_name_admin(usr)] created traitors.")
log_admin("[key_name(usr)] created traitors.")
else
message_admins("[key_name_admin(usr)] tried to create traitors. Unfortunately, there were no candidates available.")
log_admin("[key_name(usr)] failed to create traitors.")
if("2")
if("changelings")
if(src.makeChanglings())
message_admins("[key_name(usr)] created changelings.")
log_admin("[key_name(usr)] created changelings.")
else
message_admins("[key_name_admin(usr)] tried to create changelings. Unfortunately, there were no candidates available.")
log_admin("[key_name(usr)] failed to create changelings.")
if("3")
if("revs")
if(src.makeRevs())
message_admins("[key_name(usr)] started a revolution.")
log_admin("[key_name(usr)] started a revolution.")
else
message_admins("[key_name_admin(usr)] tried to start a revolution. Unfortunately, there were no candidates available.")
log_admin("[key_name(usr)] failed to start a revolution.")
if("4")
if("cult")
if(src.makeCult())
message_admins("[key_name(usr)] started a cult.")
log_admin("[key_name(usr)] started a cult.")
else
message_admins("[key_name_admin(usr)] tried to start a cult. Unfortunately, there were no candidates available.")
log_admin("[key_name(usr)] failed to start a cult.")
if("6")
if("wizard")
message_admins("[key_name(usr)] is creating a wizard...")
if(src.makeWizard())
message_admins("[key_name(usr)] created a wizard.")
@@ -67,7 +67,7 @@
else
message_admins("[key_name_admin(usr)] tried to create a wizard. Unfortunately, there were no candidates available.")
log_admin("[key_name(usr)] failed to create a wizard.")
if("7")
if("nukeops")
message_admins("[key_name(usr)] is creating a nuke team...")
if(src.makeNukeTeam())
message_admins("[key_name(usr)] created a nuke team.")
@@ -75,15 +75,15 @@
else
message_admins("[key_name_admin(usr)] tried to create a nuke team. Unfortunately, there were not enough candidates available.")
log_admin("[key_name(usr)] failed to create a nuke team.")
if("8")
if("ninja")
message_admins("[key_name(usr)] spawned a ninja.")
log_admin("[key_name(usr)] spawned a ninja.")
src.makeSpaceNinja()
if("9")
if("aliens")
message_admins("[key_name(usr)] started an alien infestation.")
log_admin("[key_name(usr)] started an alien infestation.")
src.makeAliens()
if("10")
if("deathsquad")
message_admins("[key_name(usr)] is creating a death squad...")
if(src.makeDeathsquad())
message_admins("[key_name(usr)] created a death squad.")
@@ -91,19 +91,19 @@
else
message_admins("[key_name_admin(usr)] tried to create a death squad. Unfortunately, there were not enough candidates available.")
log_admin("[key_name(usr)] failed to create a death squad.")
if("11")
var/strength = input("Set Blob Strength (1=Weak, 2=Strong, 3=Full)","Set Strength",1) as num
message_admins("[key_name(usr)] spawned a blob with strength [strength].")
log_admin("[key_name(usr)] spawned a blob with strength [strength].")
new/datum/round_event/blob(strength)
if("12")
if("blob")
var/strength = input("Set Blob Resource Gain Rate","Set Resource Rate",1) as num
message_admins("[key_name(usr)] spawned a blob with base resource gain [strength].")
log_admin("[key_name(usr)] spawned a blob with base resource gain [strength].")
new/datum/round_event/ghost_role/blob(TRUE, strength)
if("gangs")
if(src.makeGangsters())
message_admins("[key_name(usr)] created gangs.")
log_admin("[key_name(usr)] created gangs.")
else
message_admins("[key_name(usr)] tried to create gangs. Unfortunately, there were not enough candidates available.")
log_admin("[key_name(usr)] failed create gangs.")
if("13")
if("centcom")
message_admins("[key_name(usr)] is creating a Centcom response team...")
if(src.makeEmergencyresponseteam())
message_admins("[key_name(usr)] created a Centcom response team.")
@@ -111,7 +111,7 @@
else
message_admins("[key_name_admin(usr)] tried to create a Centcom response team. Unfortunately, there were not enough candidates available.")
log_admin("[key_name(usr)] failed to create a Centcom response team.")
if("14")
if("abductors")
message_admins("[key_name(usr)] is creating an abductor team...")
if(src.makeAbductorTeam())
message_admins("[key_name(usr)] created an abductor team.")
@@ -119,20 +119,20 @@
else
message_admins("[key_name_admin(usr)] tried to create an abductor team. Unfortunatly there were not enough candidates available.")
log_admin("[key_name(usr)] failed to create an abductor team.")
if("15")
if("clockcult")
if(src.makeClockCult())
message_admins("[key_name(usr)] started a clockwork cult.")
log_admin("[key_name(usr)] started a clockwork cult.")
else
message_admins("[key_name_admin(usr)] tried to start a clockwork cult. Unfortunately, there were no candidates available.")
log_admin("[key_name(usr)] failed to start a clockwork cult.")
if("revenant")
if(src.makeRevenant())
message_admins("[key_name(usr)] created a revenant.")
log_admin("[key_name(usr)] created a revenant.")
else
message_admins("[key_name_admin(usr)] tried to create a revenant. Unfortunately, there were no candidates available.")
log_admin("[key_name(usr)] failed to create a revenant.")
if("16")
if(src.makeShadowling())
message_admins("[key_name(usr)] created a shadowling.")
log_admin("[key_name(usr)] created a shadowling.")
else
message_admins("[key_name_admin(usr)] tried to create a shadowling. Unfortunately, there were no candidates available.")
log_admin("[key_name(usr)] failed to create a shadowling.")
else if(href_list["forceevent"])
if(!check_rights(R_FUN))
@@ -185,39 +185,39 @@
switch(bantype)
if(BANTYPE_PERMA)
if(!banckey || !banreason)
usr << "Not enough parameters (Requires ckey and reason)"
usr << "Not enough parameters (Requires ckey and reason)."
return
banduration = null
banjob = null
if(BANTYPE_TEMP)
if(!banckey || !banreason || !banduration)
usr << "Not enough parameters (Requires ckey, reason and duration)"
usr << "Not enough parameters (Requires ckey, reason and duration)."
return
banjob = null
if(BANTYPE_JOB_PERMA)
if(!banckey || !banreason || !banjob)
usr << "Not enough parameters (Requires ckey, reason and job)"
usr << "Not enough parameters (Requires ckey, reason and job)."
return
banduration = null
if(BANTYPE_JOB_TEMP)
if(!banckey || !banreason || !banjob || !banduration)
usr << "Not enough parameters (Requires ckey, reason and job)"
usr << "Not enough parameters (Requires ckey, reason and job)."
return
if(BANTYPE_APPEARANCE)
if(!banckey || !banreason)
usr << "Not enough parameters (Requires ckey and reason)"
usr << "Not enough parameters (Requires ckey and reason)."
return
banduration = null
banjob = null
if(BANTYPE_ADMIN_PERMA)
if(!banckey || !banreason)
usr << "Not enough parameters (Requires ckey and reason)"
usr << "Not enough parameters (Requires ckey and reason)."
return
banduration = null
banjob = null
if(BANTYPE_ADMIN_TEMP)
if(!banckey || !banreason || !banduration)
usr << "Not enough parameters (Requires ckey, reason and duration)"
usr << "Not enough parameters (Requires ckey, reason and duration)."
return
banjob = null
@@ -237,7 +237,7 @@
if(bancid)
banreason = "[banreason] (CUSTOM CID)"
else
message_admins("Ban process: A mob matching [playermob.ckey] was found at location [playermob.x], [playermob.y], [playermob.z]. Custom ip and computer id fields replaced with the ip and computer id from the located mob")
message_admins("Ban process: A mob matching [playermob.ckey] was found at location [playermob.x], [playermob.y], [playermob.z]. Custom ip and computer id fields replaced with the ip and computer id from the located mob.")
DB_ban_record(bantype, playermob, banduration, banreason, banjob, null, banckey, banip, bancid )
add_note(banckey, banreason, null, usr.ckey, 0)
@@ -252,24 +252,24 @@
switch(href_list["call_shuttle"])
if("1")
if(SSshuttle.emergency.mode >= SHUTTLE_DOCKED)
if(EMERGENCY_AT_LEAST_DOCKED)
return
SSshuttle.emergency.request()
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] called the Emergency Shuttle to the station</span>")
log_admin("[key_name(usr)] called the Emergency Shuttle.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] called the Emergency Shuttle to the station.</span>")
if("2")
if(SSshuttle.emergency.mode >= SHUTTLE_DOCKED)
if(EMERGENCY_AT_LEAST_DOCKED)
return
switch(SSshuttle.emergency.mode)
if(SHUTTLE_CALL)
SSshuttle.emergency.cancel()
log_admin("[key_name(usr)] sent the Emergency Shuttle back")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] sent the Emergency Shuttle back</span>")
log_admin("[key_name(usr)] sent the Emergency Shuttle back.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] sent the Emergency Shuttle back.</span>")
else
SSshuttle.emergency.cancel()
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] called the Emergency Shuttle to the station</span>")
log_admin("[key_name(usr)] called the Emergency Shuttle.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] called the Emergency Shuttle to the station.</span>")
href_list["secrets"] = "check_antagonist"
@@ -280,9 +280,9 @@
var/timer = input("Enter new shuttle duration (seconds):","Edit Shuttle Timeleft", SSshuttle.emergency.timeLeft() ) as num
SSshuttle.emergency.setTimer(timer*10)
log_admin("[key_name(usr)] edited the Emergency Shuttle's timeleft to [timer] seconds")
log_admin("[key_name(usr)] edited the Emergency Shuttle's timeleft to [timer] seconds.")
minor_announce("The emergency shuttle will reach its destination in [round(SSshuttle.emergency.timeLeft(600))] minutes.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] edited the Emergency Shuttle's timeleft to [timer] seconds</span>")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] edited the Emergency Shuttle's timeleft to [timer] seconds.</span>")
href_list["secrets"] = "check_antagonist"
else if(href_list["toggle_continuous"])
@@ -373,7 +373,7 @@
var/mob/M = locate(href_list["mob"])
if(!ismob(M))
usr << "This can only be used on instances of type /mob"
usr << "This can only be used on instances of type /mob."
return
var/delmob = 0
@@ -383,8 +383,8 @@
if("Yes")
delmob = 1
log_admin("[key_name(usr)] has used rudimentary transformation on [key_name(M)]. Transforming to [href_list["simplemake"]]; deletemob=[delmob]")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has used rudimentary transformation on [key_name_admin(M)]. Transforming to [href_list["simplemake"]]; deletemob=[delmob]</span>")
log_admin("[key_name(usr)] has used rudimentary transformation on [key_name(M)]. Transforming to [href_list["simplemake"]].; deletemob=[delmob]")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has used rudimentary transformation on [key_name_admin(M)]. Transforming to [href_list["simplemake"]].; deletemob=[delmob]</span>")
switch(href_list["simplemake"])
if("observer")
@@ -482,13 +482,13 @@
return
minutes = CMinutes + mins
duration = GetExp(minutes)
reason = input(usr,"Please State Reason","Reason",reason2) as message
reason = input(usr,"Please State Reason.","Reason",reason2) as message
if(!reason)
return
if("No")
temp = 0
duration = "Perma"
reason = input(usr,"Please State Reason","Reason",reason2) as message
reason = input(usr,"Please State Reason.","Reason",reason2) as message
if(!reason)
return
@@ -521,18 +521,18 @@
if(jobban_isbanned(M, "appearance"))
switch(alert("Remove appearance ban?","Please Confirm","Yes","No"))
if("Yes")
ban_unban_log_save("[key_name(usr)] removed [key_name(M)]'s appearance ban")
log_admin("[key_name(usr)] removed [key_name(M)]'s appearance ban")
ban_unban_log_save("[key_name(usr)] removed [key_name(M)]'s appearance ban.")
log_admin("[key_name(usr)] removed [key_name(M)]'s appearance ban.")
feedback_inc("ban_appearance_unban", 1)
DB_ban_unban(M.ckey, BANTYPE_ANY_JOB, "appearance")
if(M.client)
jobban_buildcache(M.client)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] removed [key_name_admin(M)]'s appearance ban</span>")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] removed [key_name_admin(M)]'s appearance ban.</span>")
M << "<span class='boldannounce'><BIG>[usr.client.ckey] has removed your appearance ban.</BIG></span>"
else switch(alert("Appearance ban [M.ckey]?",,"Yes","No", "Cancel"))
if("Yes")
var/reason = input(usr,"Please State Reason","Reason") as message
var/reason = input(usr,"Please State Reason.","Reason") as message
if(!reason)
return
ban_unban_log_save("[key_name(usr)] appearance banned [key_name(M)]. reason: [reason]")
@@ -542,7 +542,7 @@
if(M.client)
jobban_buildcache(M.client)
add_note(M.ckey, "Appearance banned - [reason]", null, usr.ckey, 0)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] appearance banned [key_name_admin(M)]</span>")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] appearance banned [key_name_admin(M)].</span>")
M << "<span class='boldannounce'><BIG>You have been appearance banned by [usr.client.ckey].</BIG></span>"
M << "<span class='boldannounce'>The reason is: [reason]</span>"
M << "<span class='danger'>Appearance ban can be lifted only upon request.</span>"
@@ -556,11 +556,11 @@
else if(href_list["jobban2"])
var/mob/M = locate(href_list["jobban2"])
if(!ismob(M))
usr << "This can only be used on instances of type /mob"
usr << "This can only be used on instances of type /mob."
return
if(!M.ckey) //sanity
usr << "This mob has no ckey"
usr << "This mob has no ckey."
return
var/dat = ""
@@ -790,6 +790,11 @@
else
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=deathsquad;jobban4=\ref[M]'>[replacetext("Deathsquad", " ", "&nbsp")]</a></td>"
if(jobban_isbanned(M, "lavaland"))
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=lavaland;jobban4=\ref[M]'><font color=red>[replacetext("Lavaland", " ", "&nbsp")]</font></a></td>"
else
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=lavaland;jobban4=\ref[M]'>[replacetext("Lavaland", " ", "&nbsp")]</a></td>"
jobs += "</tr></table>"
//Antagonist (Orange)
@@ -835,11 +840,11 @@
else
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=cultist;jobban4=\ref[M]'>[replacetext("Cultist", " ", "&nbsp")]</a></td>"
//Shadowling
if(jobban_isbanned(M, "shadowling") || isbanned_dept)
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=shadowling;jobban4=\ref[M]'><font color=red>[replacetext("Shadowling", " ", "&nbsp")]</font></a></td>"
//Servant of Ratvar
if(jobban_isbanned(M, "servant of Ratvar") || isbanned_dept)
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=servant of Ratvar;jobban4=\ref[M]'><font color=red>[replacetext("Servant", " ", "&nbsp")]</font></a></td>"
else
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=shadowling;jobban4=\ref[M]'>[replacetext("Shadowling", " ", "&nbsp")]</a></td>"
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=servant of Ratvar;jobban4=\ref[M]'>[replacetext("Servant", " ", "&nbsp")]</a></td>"
//Wizard
if(jobban_isbanned(M, "wizard") || isbanned_dept)
@@ -965,14 +970,14 @@
var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null
if(!mins)
return
var/reason = input(usr,"Please State Reason","Reason") as message
var/reason = input(usr,"Please State Reason.","Reason") as message
if(!reason)
return
var/msg
for(var/job in notbannedlist)
ban_unban_log_save("[key_name(usr)] temp-jobbanned [key_name(M)] from [job] for [mins] minutes. reason: [reason]")
log_admin("[key_name(usr)] temp-jobbanned [key_name(M)] from [job] for [mins] minutes")
log_admin("[key_name(usr)] temp-jobbanned [key_name(M)] from [job] for [mins] minutes.")
feedback_inc("ban_job_tmp",1)
DB_ban_record(BANTYPE_JOB_TEMP, M, mins, reason, job)
if(M.client)
@@ -983,7 +988,7 @@
else
msg += ", [job]"
add_note(M.ckey, "Banned from [msg] - [reason]", null, usr.ckey, 0)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] banned [key_name_admin(M)] from [msg] for [mins] minutes</span>")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] banned [key_name_admin(M)] from [msg] for [mins] minutes.</span>")
M << "<span class='boldannounce'><BIG>You have been [(msg == "ooc") ? "banned" : "jobbanned"] by [usr.client.ckey] from: [msg].</BIG></span>"
M << "<span class='boldannounce'>The reason is: [reason]</span>"
M << "<span class='danger'>This jobban will be lifted in [mins] minutes.</span>"
@@ -1006,7 +1011,7 @@
else
msg += ", [job]"
add_note(M.ckey, "Banned from [msg] - [reason]", null, usr.ckey, 0)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] banned [key_name_admin(M)] from [msg]</span>")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] banned [key_name_admin(M)] from [msg].</span>")
M << "<span class='boldannounce'><BIG>You have been [(msg == "ooc") ? "banned" : "jobbanned"] by [usr.client.ckey] from: [msg].</BIG></span>"
M << "<span class='boldannounce'>The reason is: [reason]</span>"
M << "<span class='danger'>Jobban can be lifted only upon request.</span>"
@@ -1039,7 +1044,7 @@
else
continue
if(msg)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] unbanned [key_name_admin(M)] from [msg]</span>")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] unbanned [key_name_admin(M)] from [msg].</span>")
M << "<span class='boldannounce'><BIG>You have been un-jobbanned by [usr.client.ckey] from [msg].</BIG></span>"
href_list["jobban2"] = 1 // lets it fall through and refresh
return 1
@@ -1086,6 +1091,10 @@
var/target_ckey = href_list["shownoteckey"]
show_note(target_ckey)
else if(href_list["shownoteckeylinkless"])
var/target_ckey = href_list["shownoteckeylinkless"]
show_note(target_ckey, null, 1)
else if(href_list["notessearch"])
var/target = href_list["notessearch"]
show_note(index = target)
@@ -1117,7 +1126,7 @@
var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null
if(!mins)
return
var/reason = input(usr,"Please State Reason","Reason") as message
var/reason = input(usr,"Please State Reason.","Reason") as message
if(!reason)
return
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins)
@@ -1137,7 +1146,7 @@
del(M.client)
//qdel(M) // See no reason why to delete mob. Important stuff can be lost. And ban can be lifted before round ends.
if("No")
var/reason = input(usr,"Please State Reason","Reason") as message
var/reason = input(usr,"Please State Reason.","Reason") as message
if(!reason)
return
switch(alert(usr,"IP ban?",,"Yes","No","Cancel"))
@@ -1274,11 +1283,11 @@
var/mob/living/carbon/human/H = locate(href_list["monkeyone"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
usr << "This can only be used on instances of type /mob/living/carbon/human."
return
log_admin("[key_name(usr)] attempting to monkeyize [key_name(H)]")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] attempting to monkeyize [key_name_admin(H)]</span>")
log_admin("[key_name(usr)] attempting to monkeyize [key_name(H)].")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] attempting to monkeyize [key_name_admin(H)].</span>")
H.monkeyize()
else if(href_list["humanone"])
@@ -1287,11 +1296,11 @@
var/mob/living/carbon/monkey/Mo = locate(href_list["humanone"])
if(!istype(Mo))
usr << "This can only be used on instances of type /mob/living/carbon/monkey"
usr << "This can only be used on instances of type /mob/living/carbon/monkey."
return
log_admin("[key_name(usr)] attempting to humanize [key_name(Mo)]")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] attempting to humanize [key_name_admin(Mo)]</span>")
log_admin("[key_name(usr)] attempting to humanize [key_name(Mo)].")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] attempting to humanize [key_name_admin(Mo)].</span>")
Mo.humanize()
else if(href_list["corgione"])
@@ -1300,11 +1309,11 @@
var/mob/living/carbon/human/H = locate(href_list["corgione"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
usr << "This can only be used on instances of type /mob/living/carbon/human."
return
log_admin("[key_name(usr)] attempting to corgize [key_name(H)]")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] attempting to corgize [key_name_admin(H)]</span>")
log_admin("[key_name(usr)] attempting to corgize [key_name(H)].")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] attempting to corgize [key_name_admin(H)].</span>")
H.corgize()
@@ -1314,7 +1323,7 @@
var/mob/M = locate(href_list["forcespeech"])
if(!ismob(M))
usr << "this can only be used on instances of type /mob"
usr << "this can only be used on instances of type /mob."
var/speech = input("What will [key_name(M)] say?.", "Force speech", "")// Don't need to sanitize, since it does that in say(), we also trust our admins.
if(!speech)
@@ -1330,10 +1339,10 @@
var/mob/M = locate(href_list["sendtoprison"])
if(!ismob(M))
usr << "This can only be used on instances of type /mob"
usr << "This can only be used on instances of type /mob."
return
if(istype(M, /mob/living/silicon/ai))
usr << "This cannot be used on instances of type /mob/living/silicon/ai"
usr << "This cannot be used on instances of type /mob/living/silicon/ai."
return
if(alert(usr, "Send [key_name(M)] to Prison?", "Message", "Yes", "No") != "Yes")
@@ -1378,10 +1387,10 @@
var/mob/M = locate(href_list["tdome1"])
if(!ismob(M))
usr << "This can only be used on instances of type /mob"
usr << "This can only be used on instances of type /mob."
return
if(istype(M, /mob/living/silicon/ai))
usr << "This cannot be used on instances of type /mob/living/silicon/ai"
usr << "This cannot be used on instances of type /mob/living/silicon/ai."
return
for(var/obj/item/I in M)
@@ -1408,10 +1417,10 @@
var/mob/M = locate(href_list["tdome2"])
if(!ismob(M))
usr << "This can only be used on instances of type /mob"
usr << "This can only be used on instances of type /mob."
return
if(istype(M, /mob/living/silicon/ai))
usr << "This cannot be used on instances of type /mob/living/silicon/ai"
usr << "This cannot be used on instances of type /mob/living/silicon/ai."
return
for(var/obj/item/I in M)
@@ -1438,10 +1447,10 @@
var/mob/M = locate(href_list["tdomeadmin"])
if(!ismob(M))
usr << "This can only be used on instances of type /mob"
usr << "This can only be used on instances of type /mob."
return
if(istype(M, /mob/living/silicon/ai))
usr << "This cannot be used on instances of type /mob/living/silicon/ai"
usr << "This cannot be used on instances of type /mob/living/silicon/ai."
return
M.Paralyse(5)
@@ -1461,10 +1470,10 @@
var/mob/M = locate(href_list["tdomeobserve"])
if(!ismob(M))
usr << "This can only be used on instances of type /mob"
usr << "This can only be used on instances of type /mob."
return
if(istype(M, /mob/living/silicon/ai))
usr << "This cannot be used on instances of type /mob/living/silicon/ai"
usr << "This cannot be used on instances of type /mob/living/silicon/ai."
return
for(var/obj/item/I in M)
@@ -1492,12 +1501,12 @@
var/mob/living/L = locate(href_list["revive"])
if(!istype(L))
usr << "This can only be used on instances of type /mob/living"
usr << "This can only be used on instances of type /mob/living."
return
L.revive(full_heal = 1, admin_revive = 1)
message_admins("<span class='danger'>Admin [key_name_admin(usr)] healed / revived [key_name_admin(L)]!</span>")
log_admin("[key_name(usr)] healed / Revived [key_name(L)]")
log_admin("[key_name(usr)] healed / Revived [key_name(L)].")
else if(href_list["makeai"])
if(!check_rights(R_SPAWN))
@@ -1505,11 +1514,11 @@
var/mob/living/carbon/human/H = locate(href_list["makeai"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
usr << "This can only be used on instances of type /mob/living/carbon/human."
return
message_admins("<span class='danger'>Admin [key_name_admin(usr)] AIized [key_name_admin(H)]!</span>")
log_admin("[key_name(usr)] AIized [key_name(H)]")
log_admin("[key_name(usr)] AIized [key_name(H)].")
H.AIize()
else if(href_list["makealien"])
@@ -1518,7 +1527,7 @@
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"
usr << "This can only be used on instances of type /mob/living/carbon/human."
return
usr.client.cmd_admin_alienize(H)
@@ -1529,7 +1538,7 @@
var/mob/living/carbon/human/H = locate(href_list["makeslime"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
usr << "This can only be used on instances of type /mob/living/carbon/human."
return
usr.client.cmd_admin_slimeize(H)
@@ -1540,7 +1549,7 @@
var/mob/living/carbon/human/H = locate(href_list["makeblob"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
usr << "This can only be used on instances of type /mob/living/carbon/human."
return
usr.client.cmd_admin_blobize(H)
@@ -1552,7 +1561,7 @@
var/mob/living/carbon/human/H = locate(href_list["makerobot"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
usr << "This can only be used on instances of type /mob/living/carbon/human."
return
usr.client.cmd_admin_robotize(H)
@@ -1563,7 +1572,7 @@
var/mob/M = locate(href_list["makeanimal"])
if(istype(M, /mob/new_player))
usr << "This cannot be used on instances of type /mob/new_player"
usr << "This cannot be used on instances of type /mob/new_player."
return
usr.client.cmd_admin_animalize(M)
@@ -1573,8 +1582,8 @@
if(G)
var/newpoints = input("Set [G.name ] Gang's influence.","Set Influence",G.points) as null|num
if(newpoints)
message_admins("[key_name_admin(usr)] changed the [G.name] Gang's influence from [G.points] to [newpoints]</span>")
log_admin("[key_name(usr)] changed the [G.name] Gang's influence from [G.points] to [newpoints]</span>")
message_admins("[key_name_admin(usr)] changed the [G.name] Gang's influence from [G.points] to [newpoints].</span>")
log_admin("[key_name(usr)] changed the [G.name] Gang's influence from [G.points] to [newpoints].</span>")
G.points = newpoints
G.message_gangtools("Your gang now has [G.points] influence.")
@@ -1612,12 +1621,13 @@
output_ai_laws()
else if(href_list["admincheckdevilinfo"])
output_devil_info()
var/mob/M = locate(href_list["admincheckdevilinfo"])
output_devil_info(M)
else if(href_list["adminmoreinfo"])
var/mob/M = locate(href_list["adminmoreinfo"])
if(!ismob(M))
usr << "This can only be used on instances of type /mob"
usr << "This can only be used on instances of type /mob."
return
var/location_description = ""
@@ -1728,7 +1738,7 @@
var/mob/living/carbon/human/H = locate(href_list["adminspawncookie"])
if(!ishuman(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
usr << "This can only be used on instances of type /mob/living/carbon/human."
return
H.equip_to_slot_or_del( new /obj/item/weapon/reagent_containers/food/snacks/cookie(H), slot_l_hand )
@@ -1742,8 +1752,8 @@
H.update_inv_r_hand()//To ensure the icon appears in the HUD
else
H.update_inv_l_hand()
log_admin("[key_name(H)] got their cookie, spawned by [key_name(src.owner)]")
message_admins("[key_name(H)] got their cookie, spawned by [key_name(src.owner)]")
log_admin("[key_name(H)] got their cookie, spawned by [key_name(src.owner)].")
message_admins("[key_name(H)] got their cookie, spawned by [key_name(src.owner)].")
feedback_inc("admin_cookies_spawned",1)
H << "<span class='adminnotice'>Your prayers have been answered!! You received the <b>best cookie</b>!</span>"
H << 'sound/effects/pray_chaplain.ogg'
@@ -1758,11 +1768,13 @@
usr << "This can only be used on instances of type /mob/living/carbon/human"
return
if(!istype(H.ears, /obj/item/device/radio/headset))
usr << "The person you are trying to contact is not wearing a headset"
usr << "The person you are trying to contact is not wearing a headset."
return
message_admins("[src.owner] has started answering [key_name(H)]'s Centcomm request.")
var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from Centcom", "")
if(!input)
message_admins("[src.owner] decided not to answer [key_name(H)]'s Centcomm request.")
return
src.owner << "You sent [input] to [H] via a secure channel."
@@ -1773,14 +1785,16 @@
else if(href_list["SyndicateReply"])
var/mob/living/carbon/human/H = locate(href_list["SyndicateReply"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
usr << "This can only be used on instances of type /mob/living/carbon/human."
return
if(!istype(H.ears, /obj/item/device/radio/headset))
usr << "The person you are trying to contact is not wearing a headset"
usr << "The person you are trying to contact is not wearing a headset."
return
message_admins("[src.owner] has started answering [key_name(H)]'s syndicate request.")
var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from The Syndicate", "")
if(!input)
message_admins("[src.owner] decided not to answer [key_name(H)]'s syndicate request.")
return
src.owner << "You sent [input] to [H] via a secure channel."
@@ -1788,6 +1802,12 @@
message_admins("[src.owner] replied to [key_name(H)]'s Syndicate message with: \"[input]\"")
H << "You hear something crackle in your ears for a moment before a voice speaks. \"Please stand by for a message from your benefactor. Message as follows, agent. [input]. Message ends.\""
else if(href_list["reject_custom_name"])
if(!check_rights(R_ADMIN))
return
var/obj/item/station_charter/charter = locate(href_list["reject_custom_name"])
if(istype(charter))
charter.reject_proposed(usr)
else if(href_list["jumpto"])
if(!isobserver(usr) && !check_rights(R_ADMIN))
return
@@ -1887,10 +1907,10 @@
paths += path
if(!paths)
alert("The path list you sent is empty")
alert("The path list you sent is empty.")
return
if(length(paths) > 5)
alert("Select fewer object types, (max 5)")
alert("Select fewer object types, (max 5).")
return
var/list/offset = splittext(href_list["offset"],",")
@@ -1945,7 +1965,8 @@
else
var/atom/O = new path(target)
if(O)
O.dir = obj_dir
O.admin_spawned = TRUE
O.setDir(obj_dir)
if(obj_name)
O.name = obj_name
if(istype(O,/mob))
@@ -1984,7 +2005,7 @@
src.access_news_network()
else if(href_list["ac_set_channel_name"])
src.admincaster_feed_channel.channel_name = stripped_input(usr, "Provide a Feed Channel Name", "Network Channel Handler", "")
src.admincaster_feed_channel.channel_name = stripped_input(usr, "Provide a Feed Channel Name.", "Network Channel Handler", "")
while (findtext(src.admincaster_feed_channel.channel_name," ") == 1)
src.admincaster_feed_channel.channel_name = copytext(src.admincaster_feed_channel.channel_name,2,lentext(src.admincaster_feed_channel.channel_name)+1)
src.access_news_network()
@@ -2002,7 +2023,7 @@
if(src.admincaster_feed_channel.channel_name == "" || src.admincaster_feed_channel.channel_name == "\[REDACTED\]" || check )
src.admincaster_screen=7
else
var/choice = alert("Please confirm Feed channel creation","Network Channel Handler","Confirm","Cancel")
var/choice = alert("Please confirm Feed channel creation.","Network Channel Handler","Confirm","Cancel")
if(choice=="Confirm")
news_network.CreateFeedChannel(src.admincaster_feed_channel.channel_name, src.admin_signature, src.admincaster_feed_channel.locked, 1)
feedback_inc("newscaster_channels",1)
@@ -2014,11 +2035,11 @@
var/list/available_channels = list()
for(var/datum/newscaster/feed_channel/F in news_network.network_channels)
available_channels += F.channel_name
src.admincaster_feed_channel.channel_name = adminscrub(input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels )
src.admincaster_feed_channel.channel_name = adminscrub(input(usr, "Choose receiving Feed Channel.", "Network Channel Handler") in available_channels )
src.access_news_network()
else if(href_list["ac_set_new_message"])
src.admincaster_feed_message.body = adminscrub(input(usr, "Write your Feed story", "Network Channel Handler", ""))
src.admincaster_feed_message.body = adminscrub(input(usr, "Write your Feed story.", "Network Channel Handler", ""))
while (findtext(src.admincaster_feed_message.returnBody(-1)," ") == 1)
src.admincaster_feed_message.body = copytext(src.admincaster_feed_message.returnBody(-1),2,lentext(src.admincaster_feed_message.returnBody(-1))+1)
src.access_news_network()
@@ -2065,13 +2086,13 @@
src.access_news_network()
else if(href_list["ac_set_wanted_name"])
src.admincaster_wanted_message.criminal = adminscrub(input(usr, "Provide the name of the Wanted person", "Network Security Handler", ""))
src.admincaster_wanted_message.criminal = adminscrub(input(usr, "Provide the name of the Wanted person.", "Network Security Handler", ""))
while(findtext(src.admincaster_wanted_message.criminal," ") == 1)
src.admincaster_wanted_message.criminal = copytext(admincaster_wanted_message.criminal,2,lentext(admincaster_wanted_message.criminal)+1)
src.access_news_network()
else if(href_list["ac_set_wanted_desc"])
src.admincaster_wanted_message.body = adminscrub(input(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler", ""))
src.admincaster_wanted_message.body = adminscrub(input(usr, "Provide the a description of the Wanted person and any other details you deem important.", "Network Security Handler", ""))
while (findtext(src.admincaster_wanted_message.body," ") == 1)
src.admincaster_wanted_message.body = copytext(src.admincaster_wanted_message.body,2,lentext(src.admincaster_wanted_message.body)+1)
src.access_news_network()
@@ -2093,7 +2114,7 @@
src.access_news_network()
else if(href_list["ac_cancel_wanted"])
var/choice = alert("Please confirm Wanted Issue removal","Network Security Handler","Confirm","Cancel")
var/choice = alert("Please confirm Wanted Issue removal.","Network Security Handler","Confirm","Cancel")
if(choice=="Confirm")
news_network.deleteWanted()
src.admincaster_screen=17
@@ -2156,7 +2177,7 @@
src.access_news_network()
else if(href_list["ac_set_signature"])
src.admin_signature = adminscrub(input(usr, "Provide your desired signature", "Network Identity Handler", ""))
src.admin_signature = adminscrub(input(usr, "Provide your desired signature.", "Network Identity Handler", ""))
src.access_news_network()
else if(href_list["ac_del_comment"])
@@ -2203,7 +2224,7 @@
message_admins("[key_name_admin(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]")
log_admin("[key_name(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]")
else
usr << "You may only use this when the game is running"
usr << "You may only use this when the game is running."
else if(href_list["create_outfit"])
if(!check_rights(R_ADMIN))
@@ -2231,3 +2252,12 @@
custom_outfits.Add(O)
message_admins("[key_name(usr)] created \"[O.name]\" outfit!")
else if(href_list["set_selfdestruct_code"])
if(!check_rights(R_ADMIN))
return
var/code = random_nukecode()
for(var/obj/machinery/nuclearbomb/selfdestruct/SD in nuke_list)
SD.r_code = code
message_admins("[key_name_admin(usr)] has set the self-destruct \
code to \"[code]\".")
+2 -1
View File
@@ -154,7 +154,8 @@
/proc/send2otherserver(source,msg,type = "Ahelp")
if(global.cross_allowed)
var/list/message = list()
message["message"] = "[source]: [msg]"
message["message_sender"] = source
message["message"] = msg
message["source"] = "([config.cross_name])"
message["key"] = global.comms_key
message["crossmessage"] = type
+135 -53
View File
@@ -1,3 +1,6 @@
#define IRCREPLYCOUNT 2
//allows right clicking mobs to send an admin PM to their client, forwards the selected mob's client to cmd_admin_pm
/client/proc/cmd_admin_pm_context(mob/M in mob_list)
set category = null
@@ -63,90 +66,169 @@
return
var/client/C
var/irc = 0
if(istext(whom))
if(cmptext(copytext(whom,1,2),"@"))
whom = findStealthKey(whom)
C = directory[whom]
if(whom == "IRCKEY")
irc = 1
else
C = directory[whom]
else if(istype(whom,/client))
C = whom
if(!C)
if(holder)
src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
else
adminhelp(msg) //admin we are replying to left. adminhelp instead
return
//get message text, limit it's length.and clean/escape html
if(!msg)
msg = input(src,"Message:", "Private message to [key_name(C, 0, 0)]") as text|null
if(irc)
if(!ircreplyamount) //to prevent people from spamming irc
return
if(!msg)
msg = input(src,"Message:", "Private message to Administrator") as text|null
if(!msg)
return
if(holder)
src << "<font color='red'>Error: Use the admin IRC channel, nerd.</font>"
return
else
if(!C)
if(holder)
src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
else
adminhelp(msg) //admin we are replying to has vanished, adminhelp instead
adminhelp(msg) //admin we are replying to left. adminhelp instead
return
//get message text, limit it's length.and clean/escape html
if(!msg)
msg = input(src,"Message:", "Private message to [key_name(C, 0, 0)]") as text|null
if(!msg)
return
if(!C)
if(holder)
src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
else
adminhelp(msg) //admin we are replying to has vanished, adminhelp instead
return
if (src.handle_spam_prevention(msg,MUTE_ADMINHELP))
return
//clean the message if it's not sent by a high-rank admin
if(!check_rights(R_SERVER|R_DEBUG,0))
if(!check_rights(R_SERVER|R_DEBUG,0)||irc)//no sending html to the poor bots
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
if(!msg)
return
var/rawmsg = msg
if(holder)
msg = emoji_parse(msg)
var/keywordparsedmsg = keywords_lookup(msg)
if(C.holder)
if(holder) //both are admins
C << "<font color='red'>Admin PM from-<b>[key_name(src, C, 1)]</b>: [keywordparsedmsg]</font>"
src << "<font color='blue'>Admin PM to-<b>[key_name(C, src, 1)]</b>: [keywordparsedmsg]</font>"
else //recipient is an admin but sender is not
C << "<font color='red'>Reply PM from-<b>[key_name(src, C, 1)]</b>: [keywordparsedmsg]</font>"
src << "<font color='blue'>PM to-<b>Admins</b>: [msg]</font>"
//play the recieving admin the adminhelp sound (if they have them enabled)
if(C.prefs.toggles & SOUND_ADMINHELP)
C << 'sound/effects/adminhelp.ogg'
if(irc)
src << "<font color='blue'>PM to-<b>Admins</b>: [rawmsg]</font>"
ircreplyamount--
send2irc("Reply: [ckey]",rawmsg)
else
if(holder) //sender is an admin but recipient is not. Do BIG RED TEXT
C << "<font color='red' size='4'><b>-- Administrator private message --</b></font>"
C << "<font color='red'>Admin PM from-<b>[key_name(src, C, 0)]</b>: [msg]</font>"
C << "<font color='red'><i>Click on the administrator's name to reply.</i></font>"
src << "<font color='blue'>Admin PM to-<b>[key_name(C, src, 1)]</b>: [msg]</font>"
if(C.holder)
if(holder) //both are admins
C << "<font color='red'>Admin PM from-<b>[key_name(src, C, 1)]</b>: [keywordparsedmsg]</font>"
src << "<font color='blue'>Admin PM to-<b>[key_name(C, src, 1)]</b>: [keywordparsedmsg]</font>"
//always play non-admin recipients the adminhelp sound
C << 'sound/effects/adminhelp.ogg'
else //recipient is an admin but sender is not
C << "<font color='red'>Reply PM from-<b>[key_name(src, C, 1)]</b>: [keywordparsedmsg]</font>"
src << "<font color='blue'>PM to-<b>Admins</b>: [msg]</font>"
//AdminPM popup for ApocStation and anybody else who wants to use it. Set it with POPUP_ADMIN_PM in config.txt ~Carn
if(config.popup_admin_pm)
spawn() //so we don't hold the caller proc up
var/sender = src
var/sendername = key
var/reply = input(C, msg,"Admin PM from-[sendername]", "") as text|null //show message and await a reply
if(C && reply)
if(sender)
C.cmd_admin_pm(sender,reply) //sender is still about, let's reply to them
else
adminhelp(reply) //sender has left, adminhelp instead
return
//play the recieving admin the adminhelp sound (if they have them enabled)
if(C.prefs.toggles & SOUND_ADMINHELP)
C << 'sound/effects/adminhelp.ogg'
else //neither are admins
src << "<font color='red'>Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.</font>"
return
else
if(holder) //sender is an admin but recipient is not. Do BIG RED TEXT
C << "<font color='red' size='4'><b>-- Administrator private message --</b></font>"
C << "<font color='red'>Admin PM from-<b>[key_name(src, C, 0)]</b>: [msg]</font>"
C << "<font color='red'><i>Click on the administrator's name to reply.</i></font>"
src << "<font color='blue'>Admin PM to-<b>[key_name(C, src, 1)]</b>: [msg]</font>"
log_admin("PM: [key_name(src)]->[key_name(C)]: [rawmsg]")
//always play non-admin recipients the adminhelp sound
C << 'sound/effects/adminhelp.ogg'
//we don't use message_admins here because the sender/receiver might get it too
for(var/client/X in admins)
if(X.key!=key && X.key!=C.key) //check client/X is an admin and isn't the sender or recipient
X << "<B><font color='blue'>PM: [key_name(src, X, 0)]-&gt;[key_name(C, X, 0)]:</B> \blue [keywordparsedmsg]</font>" //inform X
//AdminPM popup for ApocStation and anybody else who wants to use it. Set it with POPUP_ADMIN_PM in config.txt ~Carn
if(config.popup_admin_pm)
spawn() //so we don't hold the caller proc up
var/sender = src
var/sendername = key
var/reply = input(C, msg,"Admin PM from-[sendername]", "") as text|null //show message and await a reply
if(C && reply)
if(sender)
C.cmd_admin_pm(sender,reply) //sender is still about, let's reply to them
else
adminhelp(reply) //sender has left, adminhelp instead
return
else //neither are admins
src << "<font color='red'>Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.</font>"
return
if(irc)
log_admin("PM: [key_name(src)]->IRC: [rawmsg]")
for(var/client/X in admins)
X << "<B><font color='blue'>PM: [key_name(src, X, 0)]-&gt;IRC:</B> \blue [keywordparsedmsg]</font>" //inform X
else
log_admin("PM: [key_name(src)]->[key_name(C)]: [rawmsg]")
//we don't use message_admins here because the sender/receiver might get it too
for(var/client/X in admins)
if(X.key!=key && X.key!=C.key) //check client/X is an admin and isn't the sender or recipient
X << "<B><font color='blue'>PM: [key_name(src, X, 0)]-&gt;[key_name(C, X, 0)]:</B> \blue [keywordparsedmsg]</font>" //inform X
/proc/IrcPm(target,msg,sender)
var/client/C = directory[target]
var/static/stealthkey
if(!C)
return "No client"
if(!stealthkey)
stealthkey = GenIrcStealthKey()
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
if(!msg)
return "No message"
message_admins("IRC message from [sender] to [key_name_admin(C)] : [msg]")
log_admin("IRC PM: [sender] -> [key_name(C)] : [msg]")
msg = emoji_parse(msg)
C << "<font color='red' size='4'><b>-- Administrator private message --</b></font>"
C << "<font color='red'>Admin PM from-<b><a href='?priv_msg=[stealthkey]'>Administrator</A></b>: [msg]</font>"
C << "<font color='red'><i>Click on the administrator's name to reply.</i></font>"
//always play non-admin recipients the adminhelp sound
C << 'sound/effects/adminhelp.ogg'
C.ircreplyamount = IRCREPLYCOUNT
return "Message Successful"
/proc/GenIrcStealthKey()
var/num = (rand(0,1000))
var/i = 0
while(i == 0)
i = 1
for(var/P in stealthminID)
if(num == stealthminID[P])
num++
i = 0
var/stealth = "@[num2text(num)]"
stealthminID["IRCKEY"] = stealth
return stealth
#undef IRCREPLYCOUNT
+2 -2
View File
@@ -24,8 +24,8 @@
T.break_tile()
target << "<span class='userdanger'>You're hit by bluespace artillery!</span>"
log_admin("[target.name] has been hit by Bluespace Artillery fired by [usr]")
message_admins("[target.name] has been hit by Bluespace Artillery fired by [usr]")
log_admin("[key_name(target)] has been hit by Bluespace Artillery fired by [key_name(usr)]")
message_admins("[ADMIN_LOOKUPFLW(target)] has been hit by Bluespace Artillery fired by [ADMIN_LOOKUPFLW(usr)]")
if(target.health <= 1)
target.gib(1, 1)
+7 -7
View File
@@ -52,7 +52,7 @@
/obj/screen/buildmode/bdir/update_icon()
dir = bd.build_dir
setDir(bd.build_dir)
return
/obj/screen/buildmode/quit
@@ -273,19 +273,19 @@
switch(build_dir)
if(NORTH)
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
WIN.dir = NORTH
WIN.setDir(NORTH)
if(SOUTH)
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
WIN.dir = SOUTH
WIN.setDir(SOUTH)
if(EAST)
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
WIN.dir = EAST
WIN.setDir(EAST)
if(WEST)
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
WIN.dir = WEST
WIN.setDir(WEST)
if(NORTHWEST)
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
WIN.dir = NORTHWEST
WIN.setDir(NORTHWEST)
log_admin("Build Mode: [key_name(user)] built a window at ([object.x],[object.y],[object.z])")
if(ADV_BUILDMODE)
if(left_click)
@@ -295,7 +295,7 @@
T.ChangeTurf(objholder)
else
var/obj/A = new objholder (get_turf(object))
A.dir = build_dir
A.setDir(build_dir)
log_admin("Build Mode: [key_name(user)] modified [A]'s ([A.x],[A.y],[A.z]) dir to [build_dir]")
else if(right_click)
if(isobj(object))
+59 -3
View File
@@ -261,7 +261,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
log_admin("[key_name(src)] has blobized [M.key].")
var/mob/living/carbon/human/H = M
spawn(0)
var/mob/camera/blob/B = H.become_overmind()
var/mob/camera/blob/B = H.become_overmind(FALSE)
B.place_blob_core(B.base_point_rate, -1) //place them wherever they are
else
@@ -573,7 +573,6 @@ var/global/list/g_fancy_list_of_types = null
if(!ishuman(M))
alert("Invalid mob")
return
//log_admin("[key_name(src)] has alienized [M.key].")
var/list/outfits = list("Naked","Custom","As Job...")
@@ -630,7 +629,6 @@ var/global/list/g_fancy_list_of_types = null
log_admin("[key_name(usr)] changed the equipment of [key_name(M)] to [dresscode].")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] changed the equipment of [key_name_admin(M)] to [dresscode]..</span>")
return
/client/proc/startSinglo()
@@ -735,3 +733,61 @@ var/global/list/g_fancy_list_of_types = null
if(!holder)
return
debug_variables(huds[i])
/client/proc/jump_to_ruin()
set category = "Debug"
set name = "Jump to Ruin"
set desc = "Displays a list of all placed ruins to teleport to."
if(!holder)
return
var/list/names = list()
for(var/i in ruin_landmarks)
var/obj/effect/landmark/ruin/ruin_landmark = i
var/datum/map_template/ruin/template = ruin_landmark.ruin_template
var/count = 1
var/name = template.name
var/original_name = name
while(name in names)
count++
name = "[original_name] ([count])"
names[name] = ruin_landmark
var/ruinname = input("Select ruin", "Jump to Ruin") as null|anything in names
var/obj/effect/landmark/ruin/landmark = names[ruinname]
if(istype(landmark))
var/datum/map_template/ruin/template = landmark.ruin_template
usr.forceMove(get_turf(landmark))
usr << "<span class='name'>[template.name]</span>"
usr << "<span class='italics'>[template.description]</span>"
/client/proc/clear_dynamic_transit()
set category = "Debug"
set name = "Clear Dynamic Transit"
set desc = "Deallocates all transit space, restoring it to round start \
conditions."
if(!holder)
return
SSshuttle.clear_transit = TRUE
message_admins("<span class='adminnotice'>[key_name_admin(src)] cleared dynamic transit space.</span>")
feedback_add_details("admin_verb","CDT") // If...
log_admin("[key_name(src)] cleared dynamic transit space.")
/client/proc/toggle_medal_disable()
set category = "Debug"
set name = "Toggle Medal Disable"
set desc = "Toggles the safety lock on trying to contact the medal hub."
if(!holder)
return
global.medals_enabled = !global.medals_enabled
message_admins("<span class='adminnotice'>[key_name_admin(src)] [global.medals_enabled ? "disabled" : "enabled"] the medal hub lockout.</span>")
feedback_add_details("admin_verb","TMH") // If...
log_admin("[key_name(src)] [global.medals_enabled ? "disabled" : "enabled"] the medal hub lockout.")
+23 -23
View File
@@ -1,24 +1,24 @@
//replaces the old Ticklag verb, fps is easier to understand
/client/proc/fps()
set category = "Debug"
set name = "Set fps"
set desc = "Sets game speed in frames-per-second. Can potentially break the game"
if(!check_rights(R_DEBUG))
return
var/fps = round(input("Sets game frames-per-second. Can potentially break the game","FPS", config.fps) as num|null)
if(fps <= 0)
src << "<span class='danger'>Error: ticklag(): Invalid world.ticklag value. No changes made.</span>"
return
if(fps > config.fps)
if(alert(src, "You are setting fps to a high value:\n\t[fps] frames-per-second\n\tconfig.fps = [config.fps]","Warning!","Confirm","ABORT-ABORT-ABORT") != "Confirm")
return
var/msg = "[key_name(src)] has modified world.fps to [fps]"
log_admin(msg, 0)
message_admins(msg, 0)
feedback_add_details("admin_verb","TICKLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//replaces the old Ticklag verb, fps is easier to understand
/client/proc/set_server_fps()
set category = "Debug"
set name = "Set server fps"
set desc = "Sets game speed in frames-per-second. Can potentially break the game"
if(!check_rights(R_DEBUG))
return
var/fps = round(input("Sets game frames-per-second. Can potentially break the game","FPS", config.fps) as num|null)
if(fps <= 0)
src << "<span class='danger'>Error: ticklag(): Invalid world.ticklag value. No changes made.</span>"
return
if(fps > config.fps)
if(alert(src, "You are setting fps to a high value:\n\t[fps] frames-per-second\n\tconfig.fps = [config.fps]","Warning!","Confirm","ABORT-ABORT-ABORT") != "Confirm")
return
var/msg = "[key_name(src)] has modified world.fps to [fps]"
log_admin(msg, 0)
message_admins(msg, 0)
feedback_add_details("admin_verb","TICKLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
world.fps = fps
+255 -255
View File
@@ -1,255 +1,255 @@
//- Are all the floors with or without air, as they should be? (regular or airless)
//- Does the area have an APC?
//- Does the area have an Air Alarm?
//- Does the area have a Request Console?
//- Does the area have lights?
//- Does the area have a light switch?
//- Does the area have enough intercoms?
//- Does the area have enough security cameras? (Use the 'Camera Range Display' verb under Debug)
//- Is the area connected to the scrubbers air loop?
//- Is the area connected to the vent air loop? (vent pumps)
//- Is everything wired properly?
//- Does the area have a fire alarm and firedoors?
//- Do all pod doors work properly?
//- Are accesses set properly on doors, pod buttons, etc.
//- Are all items placed properly? (not below vents, scrubbers, tables)
//- Does the disposal system work properly from all the disposal units in this room and all the units, the pipes of which pass through this room?
//- Check for any misplaced or stacked piece of pipe (air and disposal)
//- Check for any misplaced or stacked piece of wire
//- Identify how hard it is to break into the area and where the weak points are
//- Check if the area has too much empty space. If so, make it smaller and replace the rest with maintenance tunnels.
var/intercom_range_display_status = 0
var/list/admin_verbs_debug_mapping = list(
/client/proc/do_not_use_these, //-errorage
/client/proc/camera_view, //-errorage
/client/proc/sec_camera_report, //-errorage
/client/proc/intercom_view, //-errorage
/client/proc/air_status, //Air things
/client/proc/Cell, //More air things
/client/proc/atmosscan, //check plumbing
/client/proc/powerdebug, //check power
/client/proc/count_objects_on_z_level,
/client/proc/count_objects_all,
/client/proc/cmd_assume_direct_control, //-errorage
/client/proc/startSinglo,
/client/proc/fps, //allows you to set the ticklag.
/client/proc/cmd_admin_grantfullaccess,
/client/proc/cmd_admin_areatest,
/client/proc/cmd_admin_rejuvenate,
/datum/admins/proc/show_traitor_panel,
/client/proc/disable_communication,
/client/proc/print_pointers,
/client/proc/cmd_show_at_list,
/client/proc/cmd_show_at_list,
/client/proc/manipulate_organs
)
/obj/effect/debugging/marker
icon = 'icons/turf/areas.dmi'
icon_state = "yellow"
/obj/effect/debugging/marker/Move()
return 0
/client/proc/do_not_use_these()
set category = "Mapping"
set name = "-None of these are for ingame use!!"
..()
/client/proc/camera_view()
set category = "Mapping"
set name = "Camera Range Display"
var/on = 0
for(var/turf/T in world)
if(T.maptext)
on = 1
T.maptext = null
if(!on)
var/list/seen = list()
for(var/obj/machinery/camera/C in cameranet.cameras)
for(var/turf/T in C.can_see())
seen[T]++
for(var/turf/T in seen)
T.maptext = "[seen[T]]"
feedback_add_details("admin_verb","mCRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/sec_camera_report()
set category = "Mapping"
set name = "Camera Report"
if(!Master)
alert(usr,"Master_controller not found.","Sec Camera Report")
return 0
var/list/obj/machinery/camera/CL = list()
for(var/obj/machinery/camera/C in cameranet.cameras)
CL += C
var/output = {"<B>CAMERA ANNOMALITIES REPORT</B><HR>
<B>The following annomalities have been detected. The ones in red need immediate attention: Some of those in black may be intentional.</B><BR><ul>"}
for(var/obj/machinery/camera/C1 in CL)
for(var/obj/machinery/camera/C2 in CL)
if(C1 != C2)
if(C1.c_tag == C2.c_tag)
output += "<li><font color='red'>c_tag match for sec. cameras at \[[C1.x], [C1.y], [C1.z]\] ([C1.loc.loc]) and \[[C2.x], [C2.y], [C2.z]\] ([C2.loc.loc]) - c_tag is [C1.c_tag]</font></li>"
if(C1.loc == C2.loc && C1.dir == C2.dir && C1.pixel_x == C2.pixel_x && C1.pixel_y == C2.pixel_y)
output += "<li><font color='red'>FULLY overlapping sec. cameras at \[[C1.x], [C1.y], [C1.z]\] ([C1.loc.loc]) Networks: [C1.network] and [C2.network]</font></li>"
if(C1.loc == C2.loc)
output += "<li>overlapping sec. cameras at \[[C1.x], [C1.y], [C1.z]\] ([C1.loc.loc]) Networks: [C1.network] and [C2.network]</font></li>"
var/turf/T = get_step(C1,turn(C1.dir,180))
if(!T || !isturf(T) || !T.density )
if(!(locate(/obj/structure/grille,T)))
var/window_check = 0
for(var/obj/structure/window/W in T)
if (W.dir == turn(C1.dir,180) || W.dir in list(5,6,9,10) )
window_check = 1
break
if(!window_check)
output += "<li><font color='red'>Camera not connected to wall at \[[C1.x], [C1.y], [C1.z]\] ([C1.loc.loc]) Network: [C1.network]</color></li>"
output += "</ul>"
usr << browse(output,"window=airreport;size=1000x500")
feedback_add_details("admin_verb","mCRP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/intercom_view()
set category = "Mapping"
set name = "Intercom Range Display"
if(intercom_range_display_status)
intercom_range_display_status = 0
else
intercom_range_display_status = 1
for(var/obj/effect/debugging/marker/M in world)
qdel(M)
if(intercom_range_display_status)
for(var/obj/item/device/radio/intercom/I in world)
for(var/turf/T in orange(7,I))
var/obj/effect/debugging/marker/F = new/obj/effect/debugging/marker(T)
if (!(F in view(7,I.loc)))
qdel(F)
feedback_add_details("admin_verb","mIRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_show_at_list()
set category = "Mapping"
set name = "Show roundstart AT list"
set desc = "Displays a list of active turfs coordinates at roundstart"
var/dat = {"<b>Coordinate list of Active Turfs at Roundstart</b>
<br>Real-time Active Turfs list you can see in Air Subsystem at active_turfs var<br>"}
for(var/i=1; i<=active_turfs_startlist.len; i++)
dat += active_turfs_startlist[i]
dat += "<br>"
usr << browse(dat, "window=at_list")
feedback_add_details("admin_verb","mATL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/enable_debug_verbs()
set category = "Debug"
set name = "Debug verbs - Enable"
if(!check_rights(R_DEBUG))
return
verbs -= /client/proc/enable_debug_verbs
verbs.Add(/client/proc/disable_debug_verbs, admin_verbs_debug_mapping)
feedback_add_details("admin_verb","mDVE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/disable_debug_verbs()
set category = "Debug"
set name = "Debug verbs - Disable"
verbs.Remove(/client/proc/disable_debug_verbs, admin_verbs_debug_mapping)
verbs += /client/proc/enable_debug_verbs
feedback_add_details("admin_verb", "mDVD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/count_objects_on_z_level()
set category = "Mapping"
set name = "Count Objects On Level"
var/level = input("Which z-level?","Level?") as text
if(!level) return
var/num_level = text2num(level)
if(!num_level) return
if(!isnum(num_level)) return
var/type_text = input("Which type path?","Path?") as text
if(!type_text) return
var/type_path = text2path(type_text)
if(!type_path) return
var/count = 0
var/list/atom/atom_list = list()
for(var/atom/A in world)
if(istype(A,type_path))
var/atom/B = A
while(!(isturf(B.loc)))
if(B && B.loc)
B = B.loc
else
break
if(B)
if(B.z == num_level)
count++
atom_list += A
/*
var/atom/temp_atom
for(var/i = 0; i <= (atom_list.len/10); i++)
var/line = ""
for(var/j = 1; j <= 10; j++)
if(i*10+j <= atom_list.len)
temp_atom = atom_list[i*10+j]
line += " no.[i+10+j]@\[[temp_atom.x], [temp_atom.y], [temp_atom.z]\]; "
world << line*/
world << "There are [count] objects of type [type_path] on z-level [num_level]"
feedback_add_details("admin_verb","mOBJZ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/count_objects_all()
set category = "Mapping"
set name = "Count Objects All"
var/type_text = input("Which type path?","") as text
if(!type_text) return
var/type_path = text2path(type_text)
if(!type_path) return
var/count = 0
for(var/atom/A in world)
if(istype(A,type_path))
count++
/*
var/atom/temp_atom
for(var/i = 0; i <= (atom_list.len/10); i++)
var/line = ""
for(var/j = 1; j <= 10; j++)
if(i*10+j <= atom_list.len)
temp_atom = atom_list[i*10+j]
line += " no.[i+10+j]@\[[temp_atom.x], [temp_atom.y], [temp_atom.z]\]; "
world << line*/
world << "There are [count] objects of type [type_path] in the game world"
feedback_add_details("admin_verb","mOBJ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//This proc is intended to detect lag problems relating to communication procs
var/global/say_disabled = 0
/client/proc/disable_communication()
set category = "Mapping"
set name = "Disable all communication verbs"
say_disabled = !say_disabled
if(say_disabled)
message_admins("[src.ckey] used 'Disable all communication verbs', killing all communication methods.")
else
message_admins("[src.ckey] used 'Disable all communication verbs', restoring all communication methods.")
//- Are all the floors with or without air, as they should be? (regular or airless)
//- Does the area have an APC?
//- Does the area have an Air Alarm?
//- Does the area have a Request Console?
//- Does the area have lights?
//- Does the area have a light switch?
//- Does the area have enough intercoms?
//- Does the area have enough security cameras? (Use the 'Camera Range Display' verb under Debug)
//- Is the area connected to the scrubbers air loop?
//- Is the area connected to the vent air loop? (vent pumps)
//- Is everything wired properly?
//- Does the area have a fire alarm and firedoors?
//- Do all pod doors work properly?
//- Are accesses set properly on doors, pod buttons, etc.
//- Are all items placed properly? (not below vents, scrubbers, tables)
//- Does the disposal system work properly from all the disposal units in this room and all the units, the pipes of which pass through this room?
//- Check for any misplaced or stacked piece of pipe (air and disposal)
//- Check for any misplaced or stacked piece of wire
//- Identify how hard it is to break into the area and where the weak points are
//- Check if the area has too much empty space. If so, make it smaller and replace the rest with maintenance tunnels.
var/intercom_range_display_status = 0
var/list/admin_verbs_debug_mapping = list(
/client/proc/do_not_use_these, //-errorage
/client/proc/camera_view, //-errorage
/client/proc/sec_camera_report, //-errorage
/client/proc/intercom_view, //-errorage
/client/proc/air_status, //Air things
/client/proc/Cell, //More air things
/client/proc/atmosscan, //check plumbing
/client/proc/powerdebug, //check power
/client/proc/count_objects_on_z_level,
/client/proc/count_objects_all,
/client/proc/cmd_assume_direct_control, //-errorage
/client/proc/startSinglo,
/client/proc/set_server_fps, //allows you to set the ticklag.
/client/proc/cmd_admin_grantfullaccess,
/client/proc/cmd_admin_areatest,
/client/proc/cmd_admin_rejuvenate,
/datum/admins/proc/show_traitor_panel,
/client/proc/disable_communication,
/client/proc/print_pointers,
/client/proc/cmd_show_at_list,
/client/proc/cmd_show_at_list,
/client/proc/manipulate_organs
)
/obj/effect/debugging/marker
icon = 'icons/turf/areas.dmi'
icon_state = "yellow"
/obj/effect/debugging/marker/Move()
return 0
/client/proc/do_not_use_these()
set category = "Mapping"
set name = "-None of these are for ingame use!!"
..()
/client/proc/camera_view()
set category = "Mapping"
set name = "Camera Range Display"
var/on = 0
for(var/turf/T in world)
if(T.maptext)
on = 1
T.maptext = null
if(!on)
var/list/seen = list()
for(var/obj/machinery/camera/C in cameranet.cameras)
for(var/turf/T in C.can_see())
seen[T]++
for(var/turf/T in seen)
T.maptext = "[seen[T]]"
feedback_add_details("admin_verb","mCRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/sec_camera_report()
set category = "Mapping"
set name = "Camera Report"
if(!Master)
alert(usr,"Master_controller not found.","Sec Camera Report")
return 0
var/list/obj/machinery/camera/CL = list()
for(var/obj/machinery/camera/C in cameranet.cameras)
CL += C
var/output = {"<B>CAMERA ANNOMALITIES REPORT</B><HR>
<B>The following annomalities have been detected. The ones in red need immediate attention: Some of those in black may be intentional.</B><BR><ul>"}
for(var/obj/machinery/camera/C1 in CL)
for(var/obj/machinery/camera/C2 in CL)
if(C1 != C2)
if(C1.c_tag == C2.c_tag)
output += "<li><font color='red'>c_tag match for sec. cameras at \[[C1.x], [C1.y], [C1.z]\] ([C1.loc.loc]) and \[[C2.x], [C2.y], [C2.z]\] ([C2.loc.loc]) - c_tag is [C1.c_tag]</font></li>"
if(C1.loc == C2.loc && C1.dir == C2.dir && C1.pixel_x == C2.pixel_x && C1.pixel_y == C2.pixel_y)
output += "<li><font color='red'>FULLY overlapping sec. cameras at \[[C1.x], [C1.y], [C1.z]\] ([C1.loc.loc]) Networks: [C1.network] and [C2.network]</font></li>"
if(C1.loc == C2.loc)
output += "<li>overlapping sec. cameras at \[[C1.x], [C1.y], [C1.z]\] ([C1.loc.loc]) Networks: [C1.network] and [C2.network]</font></li>"
var/turf/T = get_step(C1,turn(C1.dir,180))
if(!T || !isturf(T) || !T.density )
if(!(locate(/obj/structure/grille,T)))
var/window_check = 0
for(var/obj/structure/window/W in T)
if (W.dir == turn(C1.dir,180) || W.dir in list(5,6,9,10) )
window_check = 1
break
if(!window_check)
output += "<li><font color='red'>Camera not connected to wall at \[[C1.x], [C1.y], [C1.z]\] ([C1.loc.loc]) Network: [C1.network]</color></li>"
output += "</ul>"
usr << browse(output,"window=airreport;size=1000x500")
feedback_add_details("admin_verb","mCRP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/intercom_view()
set category = "Mapping"
set name = "Intercom Range Display"
if(intercom_range_display_status)
intercom_range_display_status = 0
else
intercom_range_display_status = 1
for(var/obj/effect/debugging/marker/M in world)
qdel(M)
if(intercom_range_display_status)
for(var/obj/item/device/radio/intercom/I in world)
for(var/turf/T in orange(7,I))
var/obj/effect/debugging/marker/F = new/obj/effect/debugging/marker(T)
if (!(F in view(7,I.loc)))
qdel(F)
feedback_add_details("admin_verb","mIRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_show_at_list()
set category = "Mapping"
set name = "Show roundstart AT list"
set desc = "Displays a list of active turfs coordinates at roundstart"
var/dat = {"<b>Coordinate list of Active Turfs at Roundstart</b>
<br>Real-time Active Turfs list you can see in Air Subsystem at active_turfs var<br>"}
for(var/i=1; i<=active_turfs_startlist.len; i++)
dat += active_turfs_startlist[i]
dat += "<br>"
usr << browse(dat, "window=at_list")
feedback_add_details("admin_verb","mATL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/enable_debug_verbs()
set category = "Debug"
set name = "Debug verbs - Enable"
if(!check_rights(R_DEBUG))
return
verbs -= /client/proc/enable_debug_verbs
verbs.Add(/client/proc/disable_debug_verbs, admin_verbs_debug_mapping)
feedback_add_details("admin_verb","mDVE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/disable_debug_verbs()
set category = "Debug"
set name = "Debug verbs - Disable"
verbs.Remove(/client/proc/disable_debug_verbs, admin_verbs_debug_mapping)
verbs += /client/proc/enable_debug_verbs
feedback_add_details("admin_verb", "mDVD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/count_objects_on_z_level()
set category = "Mapping"
set name = "Count Objects On Level"
var/level = input("Which z-level?","Level?") as text
if(!level) return
var/num_level = text2num(level)
if(!num_level) return
if(!isnum(num_level)) return
var/type_text = input("Which type path?","Path?") as text
if(!type_text) return
var/type_path = text2path(type_text)
if(!type_path) return
var/count = 0
var/list/atom/atom_list = list()
for(var/atom/A in world)
if(istype(A,type_path))
var/atom/B = A
while(!(isturf(B.loc)))
if(B && B.loc)
B = B.loc
else
break
if(B)
if(B.z == num_level)
count++
atom_list += A
/*
var/atom/temp_atom
for(var/i = 0; i <= (atom_list.len/10); i++)
var/line = ""
for(var/j = 1; j <= 10; j++)
if(i*10+j <= atom_list.len)
temp_atom = atom_list[i*10+j]
line += " no.[i+10+j]@\[[temp_atom.x], [temp_atom.y], [temp_atom.z]\]; "
world << line*/
world << "There are [count] objects of type [type_path] on z-level [num_level]"
feedback_add_details("admin_verb","mOBJZ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/count_objects_all()
set category = "Mapping"
set name = "Count Objects All"
var/type_text = input("Which type path?","") as text
if(!type_text) return
var/type_path = text2path(type_text)
if(!type_path) return
var/count = 0
for(var/atom/A in world)
if(istype(A,type_path))
count++
/*
var/atom/temp_atom
for(var/i = 0; i <= (atom_list.len/10); i++)
var/line = ""
for(var/j = 1; j <= 10; j++)
if(i*10+j <= atom_list.len)
temp_atom = atom_list[i*10+j]
line += " no.[i+10+j]@\[[temp_atom.x], [temp_atom.y], [temp_atom.z]\]; "
world << line*/
world << "There are [count] objects of type [type_path] in the game world"
feedback_add_details("admin_verb","mOBJ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//This proc is intended to detect lag problems relating to communication procs
var/global/say_disabled = 0
/client/proc/disable_communication()
set category = "Mapping"
set name = "Disable all communication verbs"
say_disabled = !say_disabled
if(say_disabled)
message_admins("[src.ckey] used 'Disable all communication verbs', killing all communication methods.")
else
message_admins("[src.ckey] used 'Disable all communication verbs', restoring all communication methods.")
+10 -10
View File
@@ -68,7 +68,7 @@
else if(isnum(var_value))
usr << "Variable appears to be <b>NUM</b>."
default = "num"
dir = 1
setDir(1)
else if(istext(var_value))
usr << "Variable appears to be <b>TEXT</b>."
@@ -103,23 +103,23 @@
if(dir)
switch(var_value)
if(1)
dir = "NORTH"
setDir("NORTH")
if(2)
dir = "SOUTH"
setDir("SOUTH")
if(4)
dir = "EAST"
setDir("EAST")
if(8)
dir = "WEST"
setDir("WEST")
if(5)
dir = "NORTHEAST"
setDir("NORTHEAST")
if(6)
dir = "SOUTHEAST"
setDir("SOUTHEAST")
if(9)
dir = "NORTHWEST"
setDir("NORTHWEST")
if(10)
dir = "SOUTHWEST"
setDir("SOUTHWEST")
else
dir = null
setDir(null)
if(dir)
usr << "If a direction, direction is: [dir]"
+31 -23
View File
@@ -189,14 +189,18 @@ var/list/VVckey_edit = list("key", "ckey")
var/variable
var/assoc_key
if(assoc)
variable = input("Which var?","Var") as null|anything in L + "(ADD VAR)"
variable = input("Which var?","Var") as null|anything in L + "(ADD VAR)" + "(CLEAR NULLS)"
else
variable = input("Which var?","Var") as null|anything in names + "(ADD VAR)"
variable = input("Which var?","Var") as null|anything in names + "(ADD VAR)" + "(CLEAR NULLS)"
if(variable == "(ADD VAR)")
mod_list_add(L, O, original_name, objectvar)
return
if(variable == "(CLEAR NULLS)")
listclearnulls(L)
return
if(assoc)
assoc_key = variable
variable = L[assoc_key]
@@ -224,7 +228,7 @@ var/list/VVckey_edit = list("key", "ckey")
else if(isnum(variable))
usr << "Variable appears to be <b>NUM</b>."
default = "num"
dir = 1
setDir(1)
else if(istext(variable))
usr << "Variable appears to be <b>TEXT</b>."
@@ -259,23 +263,23 @@ var/list/VVckey_edit = list("key", "ckey")
if(dir)
switch(variable)
if(1)
dir = "NORTH"
setDir("NORTH")
if(2)
dir = "SOUTH"
setDir("SOUTH")
if(4)
dir = "EAST"
setDir("EAST")
if(8)
dir = "WEST"
setDir("WEST")
if(5)
dir = "NORTHEAST"
setDir("NORTHEAST")
if(6)
dir = "SOUTHEAST"
setDir("SOUTHEAST")
if(9)
dir = "NORTHWEST"
setDir("NORTHWEST")
if(10)
dir = "SOUTHWEST"
setDir("SOUTHWEST")
else
dir = null
setDir(null)
if(dir)
usr << "If a direction, direction is: [dir]"
@@ -452,7 +456,7 @@ var/list/VVckey_edit = list("key", "ckey")
else if(isnum(var_value))
usr << "Variable appears to be <b>NUM</b>."
class = "num"
dir = 1
setDir(1)
else if(istext(var_value))
usr << "Variable appears to be <b>TEXT</b>."
@@ -516,7 +520,7 @@ var/list/VVckey_edit = list("key", "ckey")
else if(isnum(var_value))
usr << "Variable appears to be <b>NUM</b>."
default = "num"
dir = 1
setDir(1)
else if(istext(var_value))
usr << "Variable appears to be <b>TEXT</b>."
@@ -551,23 +555,23 @@ var/list/VVckey_edit = list("key", "ckey")
if(dir)
switch(var_value)
if(1)
dir = "NORTH"
setDir("NORTH")
if(2)
dir = "SOUTH"
setDir("SOUTH")
if(4)
dir = "EAST"
setDir("EAST")
if(8)
dir = "WEST"
setDir("WEST")
if(5)
dir = "NORTHEAST"
setDir("NORTHEAST")
if(6)
dir = "SOUTHEAST"
setDir("SOUTHEAST")
if(9)
dir = "NORTHWEST"
setDir("NORTHWEST")
if(10)
dir = "SOUTHWEST"
setDir("SOUTHWEST")
else
dir = null
setDir(null)
if(dir)
usr << "If a direction, direction is: [dir]"
@@ -594,6 +598,10 @@ var/list/VVckey_edit = list("key", "ckey")
switch(class)
if("list")
if(!istype(O.vars[variable],/list))
var/listchange = alert(usr,"Force change to empty list?","Change to list?","Yes","No")
if(listchange == "Yes")
O.vars[variable] = list() //Unlike all other VV operations, the type change must be set here, not at the end of setting data. Hence the warning
mod_list(O.vars[variable], O, original_name, variable)
return
+77 -77
View File
@@ -11,18 +11,18 @@
/datum/admins/proc/one_click_antag()
var/dat = {"
<a href='?src=\ref[src];makeAntag=1'>Make Traitors</a><br>
<a href='?src=\ref[src];makeAntag=2'>Make Changelings</a><br>
<a href='?src=\ref[src];makeAntag=3'>Make Revs</a><br>
<a href='?src=\ref[src];makeAntag=4'>Make Cult</a><br>
<a href='?src=\ref[src];makeAntag=11'>Make Blob</a><br>
<a href='?src=\ref[src];makeAntag=12'>Make Gangsters</a><br>
<a href='?src=\ref[src];makeAntag=16'>Make Shadowling</a><br>
<a href='?src=\ref[src];makeAntag=6'>Make Wizard (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=7'>Make Nuke Team (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=13'>Make Centcom Response Team (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=14'>Make Abductor Team (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=15'>Make Revenant (Requires Ghost)</a><br>
<a href='?src=\ref[src];makeAntag=traitors'>Make Traitors</a><br>
<a href='?src=\ref[src];makeAntag=changelings'>Make Changelings</a><br>
<a href='?src=\ref[src];makeAntag=revs'>Make Revs</a><br>
<a href='?src=\ref[src];makeAntag=cult'>Make Cult</a><br>
<a href='?src=\ref[src];makeAntag=clockcult'>Make Clockwork Cult</a><br>
<a href='?src=\ref[src];makeAntag=blob'>Make Blob</a><br>
<a href='?src=\ref[src];makeAntag=gangs'>Make Gangsters</a><br>
<a href='?src=\ref[src];makeAntag=wizard'>Make Wizard (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=nukeops'>Make Nuke Team (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=centcom'>Make Centcom Response Team (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=abductors'>Make Abductor Team (Requires Ghosts)</a><br>
<a href='?src=\ref[src];makeAntag=revenant'>Make Revenant (Requires Ghost)</a><br>
"}
var/datum/browser/popup = new(usr, "oneclickantag", "Quick-Create Antagonist", 400, 400)
@@ -79,13 +79,12 @@
for(var/mob/living/carbon/human/applicant in player_list)
if(ROLE_CHANGELING in applicant.client.prefs.be_special)
if(!applicant.stat)
if(applicant.mind)
if (!applicant.mind.special_role)
if(!jobban_isbanned(applicant, ROLE_CHANGELING) && !jobban_isbanned(applicant, "Syndicate"))
if(temp.age_check(applicant.client))
if(!(applicant.job in temp.restricted_jobs))
candidates += applicant
var/turf/T = get_turf(applicant)
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
if(!jobban_isbanned(applicant, ROLE_CHANGELING) && !jobban_isbanned(applicant, "Syndicate"))
if(temp.age_check(applicant.client))
if(!(applicant.job in temp.restricted_jobs))
candidates += applicant
if(candidates.len)
var/numChanglings = min(candidates.len, 3)
@@ -113,15 +112,12 @@
for(var/mob/living/carbon/human/applicant in player_list)
if(ROLE_REV in applicant.client.prefs.be_special)
if(applicant.stat == CONSCIOUS)
var/turf/T = get_turf(applicant)
if(T.z == ZLEVEL_STATION)
if(applicant.mind)
if(!applicant.mind.special_role)
if(!jobban_isbanned(applicant, ROLE_REV) && !jobban_isbanned(applicant, "Syndicate"))
if(temp.age_check(applicant.client))
if(!(applicant.job in temp.restricted_jobs))
candidates += applicant
var/turf/T = get_turf(applicant)
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
if(!jobban_isbanned(applicant, ROLE_REV) && !jobban_isbanned(applicant, "Syndicate"))
if(temp.age_check(applicant.client))
if(!(applicant.job in temp.restricted_jobs))
candidates += applicant
if(candidates.len)
var/numRevs = min(candidates.len, 3)
@@ -138,7 +134,7 @@
var/list/mob/dead/observer/candidates = pollCandidates("Do you wish to be considered for the position of a Wizard Foundation 'diplomat'?", "wizard", null)
var/mob/dead/observer/selected = popleft(candidates)
var/mob/dead/observer/selected = pick_n_take(candidates)
var/mob/living/carbon/human/new_character = makeBody(selected)
new_character.mind.make_Wizard()
@@ -158,13 +154,12 @@
for(var/mob/living/carbon/human/applicant in player_list)
if(ROLE_CULTIST in applicant.client.prefs.be_special)
if(applicant.stat == CONSCIOUS)
if(applicant.mind)
if(!applicant.mind.special_role)
if(!jobban_isbanned(applicant, ROLE_CULTIST) && !jobban_isbanned(applicant, "Syndicate"))
if(temp.age_check(applicant.client))
if(!(applicant.job in temp.restricted_jobs))
candidates += applicant
var/turf/T = get_turf(applicant)
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
if(!jobban_isbanned(applicant, ROLE_CULTIST) && !jobban_isbanned(applicant, "Syndicate"))
if(temp.age_check(applicant.client))
if(!(applicant.job in temp.restricted_jobs))
candidates += applicant
if(candidates.len)
var/numCultists = min(candidates.len, 4)
@@ -179,6 +174,43 @@
return 0
/datum/admins/proc/makeClockCult()
var/datum/game_mode/clockwork_cult/temp = new
if(config.protect_roles_from_antagonist)
temp.restricted_jobs += temp.protected_jobs
if(config.protect_assistant_from_antagonist)
temp.restricted_jobs += "Assistant"
var/list/mob/living/carbon/human/candidates = list()
var/mob/living/carbon/human/H = null
for(var/mob/living/carbon/human/applicant in player_list)
if(ROLE_SERVANT_OF_RATVAR in applicant.client.prefs.be_special)
var/turf/T = get_turf(applicant)
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
if(!jobban_isbanned(applicant, ROLE_SERVANT_OF_RATVAR) && !jobban_isbanned(applicant, "Syndicate"))
if(temp.age_check(applicant.client))
if(!(applicant.job in temp.restricted_jobs))
candidates += applicant
if(candidates.len)
var/numCultists = min(candidates.len, 4)
for(var/i = 0, i<numCultists, i++)
H = pick(candidates)
H << "<span class='heavy_brass'>The world before you suddenly glows a brilliant yellow. You hear the whooshing steam and clanking cogs of a billion billion machines, and all at once \
you see the truth. Ratvar, the Clockwork Justiciar, lies derelict and forgotten in an unseen realm, and he has selected you as one of his harbringers. You are now a servant of \
Ratvar, and you will bring him back.</span>"
add_servant_of_ratvar(H, TRUE)
ticker.mode.equip_servant(H)
candidates.Remove(H)
return 1
return 0
/datum/admins/proc/makeNukeTeam()
@@ -207,7 +239,7 @@
if(agentcount < 3)
return 0
var/nuke_code = "[rand(10000, 99999)]"
var/nuke_code = random_nukecode()
var/obj/machinery/nuclearbomb/nuke = locate("syndienuke") in nuke_list
if(nuke)
@@ -340,13 +372,12 @@
for(var/mob/living/carbon/human/applicant in player_list)
if(ROLE_GANG in applicant.client.prefs.be_special)
if(!applicant.stat)
if(applicant.mind)
if(!applicant.mind.special_role)
if(!jobban_isbanned(applicant, ROLE_GANG) && !jobban_isbanned(applicant, "Syndicate"))
if(temp.age_check(applicant.client))
if(!(applicant.job in temp.restricted_jobs))
candidates += applicant
var/turf/T = get_turf(applicant)
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
if(!jobban_isbanned(applicant, ROLE_GANG) && !jobban_isbanned(applicant, "Syndicate"))
if(temp.age_check(applicant.client))
if(!(applicant.job in temp.restricted_jobs))
candidates += applicant
if(candidates.len >= 2)
for(var/needs_assigned=2,needs_assigned>0,needs_assigned--)
@@ -521,36 +552,5 @@
return 1
/datum/admins/proc/makeRevenant()
new /datum/round_event/ghost_role/revenant
//Shadowling
/datum/admins/proc/makeShadowling()
var/datum/game_mode/shadowling/temp = new
if(config.protect_roles_from_antagonist)
temp.restricted_jobs += temp.protected_jobs
if(config.protect_assistant_from_antagonist)
temp.restricted_jobs += "Assistant"
var/list/mob/living/carbon/human/candidates = list()
var/mob/living/carbon/human/H = null
for(var/mob/living/carbon/human/applicant in player_list)
if(ROLE_SHADOWLING in applicant.client.prefs.be_special)
if(!applicant.stat)
if(applicant.mind)
if(!applicant.mind.special_role)
if(!jobban_isbanned(applicant, "shadowling") && !jobban_isbanned(applicant, "Syndicate"))
if(temp.age_check(applicant.client))
if(!(applicant.job in temp.restricted_jobs))
if(!(is_shadow_or_thrall(applicant)))
candidates += applicant
if(candidates.len)
H = pick(candidates)
ticker.mode.shadows += H.mind
H.mind.special_role = "shadowling"
H << "<span class='shadowling'><b><i>Something stirs in the space between worlds. A red light floods your mind, and suddenly you understand. Your human disguise has served you well, but it \
is time you cast it away. You are a shadowling, and you are to ascend at all costs.</b></i></span>"
ticker.mode.finalize_shadowling(H.mind)
message_admins("[H] has been made into a shadowling.")
candidates.Remove(H)
return 1
return 0
new /datum/round_event/ghost_role/revenant(TRUE, TRUE)
return 1
+2 -8
View File
@@ -20,10 +20,7 @@
H.mind.objectives += hijack_objective
H << "<B>You are the traitor.</B>"
var/obj_count = 1
for(var/datum/objective/OBJ in H.mind.objectives)
H << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]"
obj_count++
H.mind.announce_objectives()
for (var/obj/item/I in H)
if (istype(I, /obj/item/weapon/implant))
@@ -67,10 +64,7 @@
H.mind.objectives += hijack_objective
H << "<B>You are the multiverse summoner. Activate your blade to summon copies of yourself from another universe to fight by your side.</B>"
var/obj_count = 1
for(var/datum/objective/OBJ in H.mind.objectives)
H << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]"
obj_count++
H.mind.announce_objectives()
var/obj/item/slot_item_ID = H.get_item_by_slot(slot_wear_id)
qdel(slot_item_ID)
+28 -9
View File
@@ -18,15 +18,22 @@
return
var/image/cross = image('icons/obj/storage.dmi',"bible")
var/font_color = "purple"
var/prayer_type = "PRAYER"
if(usr.job == "Chaplain")
cross = image('icons/obj/storage.dmi',"kingyellow")
msg = "<span class='adminnotice'>\icon[cross] <b><font color=blue>CHAPLAIN PRAYER: </font>[key_name_admin(src)] (<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;adminplayerobservefollow=\ref[src]'>FLW</A>) (<A HREF='?_src_=holder;traitor=\ref[src]'>TP</A>) (<A HREF='?_src_=holder;adminspawncookie=\ref[src]'>SC</a>):</b> [msg]</span>"
font_color = "blue"
prayer_type = "CHAPLAIN PRAYER"
else if(iscultist(usr))
cross = image('icons/obj/storage.dmi',"tome")
msg = "<span class='adminnotice'>\icon[cross] <b><font color=red>CULTIST PRAYER: </font>[key_name_admin(src)] (<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;adminplayerobservefollow=\ref[src]'>FLW</A>) (<A HREF='?_src_=holder;traitor=\ref[src]'>TP</A>) (<A HREF='?_src_=holder;adminspawncookie=\ref[src]'>SC</a>):</b> [msg]</span>"
else
cross = image('icons/obj/storage.dmi',"bible")
msg = "<span class='adminnotice'>\icon[cross] <b><font color=purple>PRAYER: </font>[key_name_admin(src)] (<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;adminplayerobservefollow=\ref[src]'>FLW</A>) (<A HREF='?_src_=holder;traitor=\ref[src]'>TP</A>) (<A HREF='?_src_=holder;adminspawncookie=\ref[src]'>SC</a>):</b> [msg]</span>"
font_color = "red"
prayer_type = "CULTIST PRAYER"
msg = "<span class='adminnotice'>\icon[cross] \
<b><font color=[font_color]>[prayer_type]: </font>\
[ADMIN_FULLMONTY(src)] [ADMIN_SC(src)]:</b> \
[msg]</span>"
for(var/client/C in admins)
if(C.prefs.chat_toggles & CHAT_PRAYER)
C << msg
@@ -40,22 +47,34 @@
/proc/Centcomm_announce(text , mob/Sender)
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
msg = "<span class='adminnotice'><b><font color=orange>CENTCOM:</font>[key_name_admin(Sender)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[Sender]'>?</A>) (<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;adminplayerobservefollow=\ref[Sender]'>FLW</A>) (<A HREF='?_src_=holder;traitor=\ref[Sender]'>TP</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]</span>"
msg = "<span class='adminnotice'>\
<b><font color=orange>CENTCOM:</font>\
[ADMIN_FULLMONTY(Sender)] [ADMIN_BSA(Sender)] \
[ADMIN_CENTCOM_REPLY(Sender)]:</b> \
[msg]</span>"
admins << msg
for(var/obj/machinery/computer/communications/C in machines)
C.overrideCooldown()
/proc/Syndicate_announce(text , mob/Sender)
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
msg = "<span class='adminnotice'><b><font color=crimson>SYNDICATE:</font>[key_name_admin(Sender)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[Sender]'>?</A>) (<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;adminplayerobservefollow=\ref[Sender]'>FLW</A>) (<A HREF='?_src_=holder;traitor=\ref[Sender]'>TP</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;SyndicateReply=\ref[Sender]'>RPLY</A>):</b> [msg]</span>"
msg = "<span class='adminnotice'><b>\
<font color=crimson>SYNDICATE:</font>\
[ADMIN_FULLMONTY(Sender)] [ADMIN_BSA(Sender)] \
[ADMIN_SYNDICATE_REPLY(Sender)]:</b> \
[msg]</span>"
admins << msg
for(var/obj/machinery/computer/communications/C in machines)
C.overrideCooldown()
/proc/Nuke_request(text , mob/Sender)
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
msg = "<span class='adminnotice'><b><font color=orange>NUKE CODE REQUEST:</font>[key_name_admin(Sender)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[Sender]'>?</A>) (<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;adminplayerobservefollow=\ref[Sender]'>FLW</A>) (<A HREF='?_src_=holder;traitor=\ref[Sender]'>TP</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]</span>"
msg = "<span class='adminnotice'>\
<b><font color=orange>NUKE CODE REQUEST:</font>\
[ADMIN_FULLMONTY(Sender)] [ADMIN_BSA(Sender)] \
[ADMIN_CENTCOM_REPLY(Sender)] \
[ADMIN_SET_SD_CODE]:</b> \
[msg]</span>"
admins << msg
admins << "<span class='adminnotice'><b>At this current time, the nuke must have the code manually set via varedit.</b></span>"
for(var/obj/machinery/computer/communications/C in machines)
C.overrideCooldown()
+161 -7
View File
@@ -439,8 +439,9 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No")
var/announce_ion_laws = (show_log == "Yes" ? 1 : -1)
new /datum/round_event/ion_storm(0, announce_ion_laws, input)
var/datum/round_event/ion_storm/ion = new(0, announce_ion_laws, input)
ion.start()
feedback_add_details("admin_verb","IONC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_rejuvenate(mob/living/M in mob_list)
@@ -642,7 +643,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Admin"
set name = "Call Shuttle"
if(SSshuttle.emergency.mode >= SHUTTLE_DOCKED)
if(EMERGENCY_AT_LEAST_DOCKED)
return
if (!holder)
@@ -667,7 +668,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes")
return
if(SSshuttle.emergency.mode >= SHUTTLE_DOCKED)
if(EMERGENCY_AT_LEAST_DOCKED)
return
SSshuttle.emergency.cancel()
@@ -759,15 +760,15 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
if(!N.timing)
var/newtime = input(usr, "Set activation timer.", "Activate Nuke", "[N.timeleft]") as num
var/newtime = input(usr, "Set activation timer.", "Activate Nuke", "[N.timer_set]") as num
if(!newtime)
return
N.timeleft = newtime
N.timer_set = newtime
N.set_safety()
N.set_active()
log_admin("[key_name(usr)] [N.timing ? "activated" : "deactivated"] a nuke at ([N.x],[N.y],[N.z]).")
message_admins("[key_name_admin(usr)] (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[usr]'>FLW</A>) [N.timing ? "activated" : "deactivated"] a nuke at ([N.x],[N.y],[N.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[N.x];Y=[N.y];Z=[N.z]'>JMP</a>).")
message_admins("[ADMIN_LOOKUPFLW(usr)] [N.timing ? "activated" : "deactivated"] a nuke at [ADMIN_COORDJMP(N)].")
feedback_add_details("admin_verb","TN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/reset_latejoin_spawns()
@@ -983,3 +984,156 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
message_admins("[key_name_admin(usr)] toggled their admin antag HUD [adding_hud ? "ON" : "OFF"].")
log_admin("[key_name(usr)] toggled their admin antag HUD [adding_hud ? "ON" : "OFF"].")
feedback_add_details("admin_verb","TAH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/open_shuttle_manipulator()
set category = "Admin"
set name = "Shuttle Manipulator"
set desc = "Opens the shuttle manipulator UI."
for(var/obj/machinery/shuttle_manipulator/M in machines)
M.ui_interact(usr)
/client/proc/mass_zombie_infection()
set category = "Fun"
set name = "Mass Zombie Infection"
set desc = "Infects all humans with a latent organ that will zombify \
them on death."
if(!holder)
return
var/confirm = alert(src, "Please confirm you want to add latent zombie organs in all humans?", "Confirm Zombies", "Yes", "No")
if(confirm != "Yes")
return
for(var/mob/living/carbon/human/H in mob_list)
new /obj/item/organ/body_egg/zombie_infection(H)
message_admins("[key_name_admin(usr)] added a latent zombie infection to all humans.")
log_admin("[key_name(usr)] added a latent zombie infection to all humans.")
feedback_add_details("admin_verb","MZI")
/client/proc/mass_zombie_cure()
set category = "Fun"
set name = "Mass Zombie Cure"
set desc = "Removes the zombie infection from all humans, returning them to normal."
if(!holder)
return
var/confirm = alert(src, "Please confirm you want to cure all zombies?", "Confirm Zombie Cure", "Yes", "No")
if(confirm != "Yes")
return
for(var/obj/item/organ/body_egg/zombie_infection/I in zombie_infection_list)
qdel(I)
message_admins("[key_name_admin(usr)] cured all zombies.")
log_admin("[key_name(usr)] cured all zombies.")
feedback_add_details("admin_verb","MZC")
/client/proc/polymorph_all()
set category = "Fun"
set name = "Polymorph All"
set desc = "Applies the effects of the bolt of change to every single mob."
if(!holder)
return
var/confirm = alert(src, "Please confirm you want polymorph all mobs?", "Confirm Polymorph", "Yes", "No")
if(confirm != "Yes")
return
var/list/mobs = shuffle(living_mob_list.Copy()) // might change while iterating
var/who_did_it = key_name_admin(usr)
message_admins("[key_name_admin(usr)] started polymorphed all living mobs.")
log_admin("[key_name(usr)] polymorphed all living mobs.")
feedback_add_details("admin_verb","MASSWABBAJACK")
for(var/mob/living/M in mobs)
CHECK_TICK
if(!M)
continue
M.audible_message("<span class='italics'>...wabbajack...wabbajack...</span>")
playsound(M.loc, 'sound/magic/Staff_Change.ogg', 50, 1, -1)
wabbajack(M)
message_admins("Mass polymorph started by [who_did_it] is complete.")
/client/proc/show_tip()
set category = "Admin"
set name = "Show Tip"
set desc = "Sends a tip (that you specify) to all players. After all \
you're the experienced player here."
if(!holder)
return
var/input = input(usr, "Please specify your tip that you want to send to the players.", "Tip", "") as message|null
if(!input)
return
if(!ticker)
return
ticker.selected_tip = input
// If we've already tipped, then send it straight away.
if(ticker.tipped)
ticker.send_tip_of_the_round()
message_admins("[key_name_admin(usr)] sent a tip of the round.")
log_admin("[key_name(usr)] sent \"[input]\" as the Tip of the Round.")
feedback_add_details("admin_verb","TIP")
#define ON_PURRBATION(H) (!(H.dna.features["tail_human"] == "None" && H.dna.features["ears"] == "None"))
/proc/mass_purrbation()
for(var/M in mob_list)
if(ishumanbasic(M))
purrbation_apply(M)
CHECK_TICK
/proc/mass_remove_purrbation()
for(var/M in mob_list)
if(ishumanbasic(M))
purrbation_remove(M)
CHECK_TICK
/proc/purrbation_toggle(mob/living/carbon/human/H)
if(!ishumanbasic(H))
return
if(!ON_PURRBATION(H))
purrbation_apply(H)
. = TRUE
else
purrbation_remove(H)
. = FALSE
/proc/purrbation_apply(mob/living/carbon/human/H)
if(!ishuman(H))
return
if(ON_PURRBATION(H))
return
H << "Something is nya~t right."
H.dna.features["tail_human"] = "Cat"
H.dna.features["ears"] = "Cat"
H.regenerate_icons()
playsound(get_turf(H), 'sound/effects/meow1.ogg', 50, 1, -1)
/proc/purrbation_remove(mob/living/carbon/human/H)
if(!ishuman(H))
return
if(!ON_PURRBATION(H))
return
H << "You are no longer a cat."
H.dna.features["tail_human"] = "None"
H.dna.features["ears"] = "None"
H.regenerate_icons()
#undef ON_PURRBATION
-116
View File
@@ -1,116 +0,0 @@
/proc/emergency_sanity_check()
if(SSshuttle.emergency.mode != SHUTTLE_IDLE)
var/confirm = alert(src, "Modification of the emergency shuttle while it is not idle can be highly dangerous, and may result in WEIRD UNPREDICTABLE SHIT. Are you SURE you want to continue? Obviously if you're not touching the emergency shuttle, then you're probably fine.", "Confirm", "Yes", "No")
if(confirm == "Yes")
return TRUE
else
return FALSE
else
return TRUE
/client/proc/cmd_admin_destroy_shuttle()
set category = "Admin"
set name = "Shuttle Destroy"
if (!holder)
src << "Only administrators may use this command."
return
if(!emergency_sanity_check())
return
var/list/names = list()
var/obj/docking_port/mobile/M
for (var/atom/AM in SSshuttle.mobile)
M = AM
names += M.name
var/selected = input("Select shuttle to DESTROY", "Shuttles") as null|anything in names
var/decide_against_msg = "You decide against destroying a shuttle."
if(!selected)
src << decide_against_msg
return
var/confirm = alert(src, "Are you sure you want to destroy [selected]?", "Confirm", "Yes", "No")
if(confirm != "Yes")
src << decide_against_msg
return
var/destroyed = FALSE
for (var/atom/AM in SSshuttle.mobile)
M = AM
if(M.name == selected)
M.jumpToNullSpace()
destroyed = TRUE
break
if(!destroyed)
src << "<span class='warning'>Something went wrong, the selected shuttle doesn't exist anymore."
return
log_admin("[key_name(usr)] - ShuttleDestroy: [M]")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has used <b>ShuttleDestroy on [selected]</b><BR></span>")
feedback_add_details("admin_verb","SHTDEL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_import_shuttle()
set category = "Admin"
set name = "Shuttle Import"
if (!holder)
src << "Only administrators may use this command."
return
if(!emergency_sanity_check())
return
var/datum/map_template/template
var/map = input(usr, "Choose a Shuttle Template to import","Import Shuttle Template") as null|anything in shuttle_templates
if(!map)
return
template = shuttle_templates[map]
if(alert(usr,"Confirm importing of [map]","Shuttle Import Confirm","Yes","No") != "Yes")
return
var/turf/T = get_turf(locate("landmark*Shuttle Import"))
if(!T)
usr << "<span class='warning'>Shuttle import landmark not found. \
Aborting.</span>"
template.load(T, centered = TRUE)
var/obj/docking_port/mobile/M
for(var/S in template.get_affected_turfs(T,centered = TRUE))
for (var/AM in S)
if(istype(AM, /obj/docking_port/mobile))
if(!M)
M = AM
else
usr << "<span class='warning'>More than one mobile docking port was detected ([AM]), this is a BAD THING, TELL A CODER.</span>"
if(istype(AM, /obj/docking_port/stationary))
usr << "<span class='warning'>REEEEEEEEEEEE! THE LOADED TEMPLATE HAS [AM], A STATIONARY DOCKING PORT, THIS IS A BAD THING FIX IT. TELL A CODER. WE CAN DELETE IT BUT IT SHOULD NOT BE THERE."
var/obj/docking_port/stationary/bad = AM
bad.i_know_what_im_doing = TRUE
qdel(bad)
if(!M)
usr << "<span class='warning'>The loaded template didn't have a mobile docking port! The template has been deleted.</span>"
for(var/S in template.get_affected_turfs(T,centered = TRUE))
var/turf/T0 = S
for(var/atom/AM in T0.GetAllContents())
if(istype(AM, /mob/dead))
continue
qdel(AM)
qdel(S)
return
var/status = M.dockRoundstart()
if(status)
message_admins("<span class='adminnotice'>The imported shuttle [map]/[M] failed to travel to its roundstart location (error code [status]). Please fix or delete the imported shuttle before continuing any more shuttle import hijinks.</span>")
log_admin("[key_name(usr)] - ShuttleImport: [map] - [M]")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has used <b>ShuttleImport: [map] - [M]</b><BR></span>")
feedback_add_details("admin_verb","SHTIMP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!