mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-28 07:20:09 +01:00
Converts all necessary << outputs into the to_chat() macro. (#6076)
This PR will lead us towards the Promised Day, for in its wake there shall be much celebration and ecstasy as this world becomes a world suitable for developer hegemony. The first strike is thusly; All << is converted into to_chat().
This commit is contained in:
@@ -153,11 +153,11 @@
|
||||
var/list/mirrors = get_ban_mirrors(ban_id)
|
||||
|
||||
if (!mirrors)
|
||||
user << "<span class='warning'>Something went horribly wrong.</span>"
|
||||
to_chat(user, "<span class='warning'>Something went horribly wrong.</span>")
|
||||
return
|
||||
|
||||
if (!mirrors.len)
|
||||
user << "<span class='warning'>No mirrors for this ban found.</span>"
|
||||
to_chat(user, "<span class='warning'>No mirrors for this ban found.</span>")
|
||||
return
|
||||
|
||||
var/output = "<b><center>Ban mirrors for ban #[ban_id]</center></b><br>"
|
||||
@@ -342,7 +342,7 @@
|
||||
data += list(list(C.ckey, C.address, C.computer_id))
|
||||
|
||||
var/data_str = json_encode(data)
|
||||
C << output(list2params(list("E-DAT", data_str, 900)), "greeting.browser:setCookie")
|
||||
to_chat(C, output(list2params(list("E-DAT", data_str, 900)), "greeting.browser:setCookie"))
|
||||
|
||||
#undef BAD_CID
|
||||
#undef BAD_IP
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
var/sql = "INSERT INTO ss13_ban (`id`,`bantime`,`serverip`,`bantype`,`reason`,`job`,`duration`,`rounds`,`expiration_time`,`ckey`,`computerid`,`ip`,`a_ckey`,`a_computerid`,`a_ip`,`who`,`adminwho`,`edits`,`unbanned`,`unbanned_datetime`,`unbanned_ckey`,`unbanned_computerid`,`unbanned_ip`) VALUES (null, Now(), '[serverip]', '[bantype_str]', '[reason]', '[job]', [(duration)?"[duration]":"0"], [(rounds)?"[rounds]":"0"], Now() + INTERVAL [(duration>0) ? duration : 0] MINUTE, '[ckey]', '[computerid]', '[ip]', '[a_ckey]', '[a_computerid]', '[a_ip]', '[who]', '[adminwho]', '', null, null, null, null, null)"
|
||||
var/DBQuery/query_insert = dbcon.NewQuery(sql)
|
||||
query_insert.Execute()
|
||||
usr << "<span class='notice'>Ban saved to database.</span>"
|
||||
to_chat(usr, "<span class='notice'>Ban saved to database.</span>")
|
||||
message_admins("[key_name_admin(usr)] has added a [bantype_str] for [ckey] [(job)?"([job])":""] [(duration > 0)?"([duration] minutes)":""] with the reason: \"[reason]\" to the ban database.",1)
|
||||
|
||||
/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "")
|
||||
@@ -151,17 +151,17 @@
|
||||
ban_number++;
|
||||
|
||||
if(ban_number == 0)
|
||||
usr << "<span class='warning'>Database update failed due to no bans fitting the search criteria. If this is not a legacy ban you should contact the database admin.</span>"
|
||||
to_chat(usr, "<span class='warning'>Database update failed due to no bans fitting the search criteria. If this is not a legacy ban you should contact the database admin.</span>")
|
||||
return
|
||||
|
||||
if(ban_number > 1)
|
||||
usr << "<span class='warning'>Database update failed due to multiple bans fitting the search criteria. Note down the ckey, job and current time and contact the database admin.</span>"
|
||||
to_chat(usr, "<span class='warning'>Database update failed due to multiple bans fitting the search criteria. Note down the ckey, job and current time and contact the database admin.</span>")
|
||||
return
|
||||
|
||||
if(istext(ban_id))
|
||||
ban_id = text2num(ban_id)
|
||||
if(!isnum(ban_id))
|
||||
usr << "<span class='warning'>Database update failed due to a ban ID mismatch. Contact the database admin.</span>"
|
||||
to_chat(usr, "<span class='warning'>Database update failed due to a ban ID mismatch. Contact the database admin.</span>")
|
||||
return
|
||||
|
||||
DB_ban_unban_by_id(ban_id)
|
||||
@@ -171,7 +171,7 @@
|
||||
if(!check_rights(R_BAN)) return
|
||||
|
||||
if(!isnum(banid) || !istext(param))
|
||||
usr << "Cancelled"
|
||||
to_chat(usr, "Cancelled")
|
||||
return
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, duration, reason FROM ss13_ban WHERE id = [banid]")
|
||||
@@ -187,7 +187,7 @@
|
||||
duration = query.item[2]
|
||||
reason = query.item[3]
|
||||
else
|
||||
usr << "Invalid ban id. Contact the database admin"
|
||||
to_chat(usr, "Invalid ban id. Contact the database admin")
|
||||
return
|
||||
|
||||
reason = sql_sanitize_text(reason)
|
||||
@@ -199,7 +199,7 @@
|
||||
value = sanitize(input("Insert the new reason for [pckey]'s ban", "New Reason", "[reason]", null) as null|text)
|
||||
value = sql_sanitize_text(value)
|
||||
if(!value)
|
||||
usr << "Cancelled"
|
||||
to_chat(usr, "Cancelled")
|
||||
return
|
||||
|
||||
var/DBQuery/update_query = dbcon.NewQuery("UPDATE ss13_ban SET reason = '[value]', edits = CONCAT(edits,'- [eckey] changed ban reason from <cite><b>\\\"[reason]\\\"</b></cite> to <cite><b>\\\"[value]\\\"</b></cite><BR>') WHERE id = [banid]")
|
||||
@@ -209,7 +209,7 @@
|
||||
if(!value)
|
||||
value = input("Insert the new duration (in minutes) for [pckey]'s ban", "New Duration", "[duration]", null) as null|num
|
||||
if(!isnum(value) || !value)
|
||||
usr << "Cancelled"
|
||||
to_chat(usr, "Cancelled")
|
||||
return
|
||||
|
||||
var/DBQuery/update_query = dbcon.NewQuery("UPDATE ss13_ban SET duration = [value], edits = CONCAT(edits,'- [eckey] changed ban duration from [duration] to [value]<br>'), expiration_time = DATE_ADD(bantime, INTERVAL [value] MINUTE) WHERE id = [banid]")
|
||||
@@ -220,10 +220,10 @@
|
||||
DB_ban_unban_by_id(banid)
|
||||
return
|
||||
else
|
||||
usr << "Cancelled"
|
||||
to_chat(usr, "Cancelled")
|
||||
return
|
||||
else
|
||||
usr << "Cancelled"
|
||||
to_chat(usr, "Cancelled")
|
||||
return
|
||||
|
||||
/proc/DB_ban_unban_by_id(var/id)
|
||||
@@ -238,7 +238,7 @@
|
||||
|
||||
var/reason = input("Please specify an unban reason.", "Unban Reason", "Unbanned as per appeal.")
|
||||
if (!reason)
|
||||
usr << "<span class='warning'>Invalid reason given. Cancelled.</span>"
|
||||
to_chat(usr, "<span class='warning'>Invalid reason given. Cancelled.</span>")
|
||||
return
|
||||
|
||||
var/ban_number = 0 //failsafe
|
||||
@@ -255,11 +255,11 @@
|
||||
ban_number++;
|
||||
|
||||
if(ban_number == 0)
|
||||
usr << "<span class='warning'>Database update failed due to a ban id not being present in the database.</span>"
|
||||
to_chat(usr, "<span class='warning'>Database update failed due to a ban id not being present in the database.</span>")
|
||||
return
|
||||
|
||||
if(ban_number > 1)
|
||||
usr << "<span class='warning'>Database update failed due to multiple bans having the same ID. Contact the database admin.</span>"
|
||||
to_chat(usr, "<span class='warning'>Database update failed due to multiple bans having the same ID. Contact the database admin.</span>")
|
||||
return
|
||||
|
||||
var/datum/admins/holder = null
|
||||
@@ -306,7 +306,7 @@
|
||||
|
||||
establish_db_connection(dbcon)
|
||||
if(!dbcon.IsConnected())
|
||||
usr << "<span class='warning'>Failed to establish database connection</span>"
|
||||
to_chat(usr, "<span class='warning'>Failed to establish database connection</span>")
|
||||
return
|
||||
|
||||
var/output = "<div align='center'><table width='90%'><tr>"
|
||||
|
||||
@@ -106,7 +106,7 @@ var/savefile/Banlist
|
||||
|
||||
Banlist.cd = "/base"
|
||||
if ( Banlist.dir.Find("[ckey][computerid]") )
|
||||
usr << text("<span class='warning'>Ban already exists.</span>")
|
||||
to_chat(usr, text("<span class='warning'>Ban already exists.</span>"))
|
||||
return 0
|
||||
else
|
||||
Banlist.dir.Add("[ckey][computerid]")
|
||||
|
||||
+30
-30
@@ -8,7 +8,7 @@ var/global/enabled_spooking = 0
|
||||
msg = "<span class=\"log_message\"><span class=\"prefix\">ADMIN LOG:</span> <span class=\"message\">[msg]</span></span>"
|
||||
for(var/client/C in admins)
|
||||
if((R_ADMIN|R_MOD) & C.holder.rights)
|
||||
C << msg
|
||||
to_chat(C, msg)
|
||||
|
||||
/proc/msg_admin_attack(var/text,var/ckey="",var/ckey_target="") //Toggleable Attack Messages
|
||||
log_attack(text,ckey=ckey,ckey_target=ckey_target)
|
||||
@@ -17,12 +17,12 @@ var/global/enabled_spooking = 0
|
||||
if((R_ADMIN|R_MOD) & C.holder.rights)
|
||||
if(C.prefs.toggles & CHAT_ATTACKLOGS)
|
||||
var/msg = rendered
|
||||
C << msg
|
||||
to_chat(C, msg)
|
||||
|
||||
proc/admin_notice(var/message, var/rights)
|
||||
for(var/mob/M in mob_list)
|
||||
if(check_rights(rights, 0, M))
|
||||
M << message
|
||||
to_chat(M, message)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////Panels
|
||||
|
||||
@@ -32,12 +32,12 @@ proc/admin_notice(var/message, var/rights)
|
||||
set desc="Edit player (respawn, ban, heal, etc)"
|
||||
|
||||
if(!M)
|
||||
usr << "You seem to be selecting a mob that doesn't exist anymore."
|
||||
to_chat(usr, "You seem to be selecting a mob that doesn't exist anymore.")
|
||||
return
|
||||
if (!istype(src,/datum/admins))
|
||||
src = usr.client.holder
|
||||
if (!istype(src,/datum/admins))
|
||||
usr << "Error: you are not an admin!"
|
||||
to_chat(usr, "Error: you are not an admin!")
|
||||
return
|
||||
|
||||
var/body = "<html><head><title>Options for [M.key]</title></head>"
|
||||
@@ -210,7 +210,7 @@ proc/admin_notice(var/message, var/rights)
|
||||
if (!istype(src,/datum/admins))
|
||||
src = usr.client.holder
|
||||
if (!istype(src,/datum/admins))
|
||||
usr << "Error: you are not an admin!"
|
||||
to_chat(usr, "Error: you are not an admin!")
|
||||
return
|
||||
if (!check_rights(R_ADMIN|R_MOD))
|
||||
return
|
||||
@@ -273,7 +273,7 @@ proc/admin_notice(var/message, var/rights)
|
||||
if (!istype(src,/datum/admins))
|
||||
src = usr.client.holder
|
||||
if (!istype(src,/datum/admins))
|
||||
usr << "Error: you are not an admin!"
|
||||
to_chat(usr, "Error: you are not an admin!")
|
||||
return
|
||||
|
||||
if (config.ban_legacy_system)
|
||||
@@ -325,7 +325,7 @@ proc/admin_notice(var/message, var/rights)
|
||||
if (!istype(src,/datum/admins))
|
||||
src = usr.client.holder
|
||||
if (!istype(src,/datum/admins))
|
||||
usr << "Error: you are not an admin!"
|
||||
to_chat(usr, "Error: you are not an admin!")
|
||||
return
|
||||
|
||||
if (!admincaster_signature)
|
||||
@@ -435,7 +435,7 @@ proc/admin_notice(var/message, var/rights)
|
||||
i++
|
||||
dat+="<BLOCKQUOTE style=\"padding:4px;border-left:4px #797979 solid\">[MESSAGE.body] <FONT SIZE=1>\[Likes: <A href='?src=\ref[src];ac_setlikes=1;'><FONT COLOR='DarkGreen'>[MESSAGE.likes]</FONT></A> Dislikes: <A href='?src=\ref[src];ac_setdislikes=1;'><FONT COLOR='maroon'>[MESSAGE.dislikes]</FONT></A>\]</FONT><BR>"
|
||||
if(MESSAGE.img)
|
||||
usr << browse_rsc(MESSAGE.img, "tmp_photo[i].png")
|
||||
to_chat(usr, browse_rsc(MESSAGE.img, "tmp_photo[i].png"))
|
||||
dat+="<img src='tmp_photo[i].png' width = '180'><BR><BR>"
|
||||
dat+="<FONT SIZE=1><A href='?src=\ref[src];ac_view_comments=1;ac_story=\ref[MESSAGE]'>View Comments</A> <A href='?src=\ref[src];ac_add_comment=1;ac_story=\ref[MESSAGE]'>Add Comment</A> <A href='?src=\ref[src];ac_like=1;ac_story=\ref[MESSAGE]'>Like Story</A> <A href='?src=\ref[src];ac_dislike=1;ac_story=\ref[MESSAGE]'>Dislike Story</A></FONT><BR>"
|
||||
dat+="<FONT SIZE=1>\[Story by <FONT COLOR='maroon'>[MESSAGE.author] - [MESSAGE.time_stamp]</FONT>\]</FONT></BLOCKQUOTE><BR>"
|
||||
@@ -551,7 +551,7 @@ proc/admin_notice(var/message, var/rights)
|
||||
<B>Photo:</B>:
|
||||
"}
|
||||
if(SSnews.wanted_issue.img)
|
||||
usr << browse_rsc(SSnews.wanted_issue.img, "tmp_photow.png")
|
||||
to_chat(usr, browse_rsc(SSnews.wanted_issue.img, "tmp_photow.png"))
|
||||
dat+="<BR><img src='tmp_photow.png' width = '180'>"
|
||||
else
|
||||
dat+="None"
|
||||
@@ -779,7 +779,7 @@ proc/admin_notice(var/message, var/rights)
|
||||
feedback_add_details("admin_verb","SN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return 1
|
||||
else
|
||||
usr << "<font color='red'>Error: Start Now: Game has already started.</font>"
|
||||
to_chat(usr, "<font color='red'>Error: Start Now: Game has already started.</font>")
|
||||
return 0
|
||||
|
||||
/datum/admins/proc/toggleenter()
|
||||
@@ -977,18 +977,18 @@ proc/admin_notice(var/message, var/rights)
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
if(!custom_items)
|
||||
usr << "Custom item list is null."
|
||||
to_chat(usr, "Custom item list is null.")
|
||||
return
|
||||
|
||||
if(!custom_items.len)
|
||||
usr << "Custom item list not populated."
|
||||
to_chat(usr, "Custom item list not populated.")
|
||||
return
|
||||
|
||||
for(var/assoc_key in custom_items)
|
||||
usr << "[assoc_key] has:"
|
||||
to_chat(usr, "[assoc_key] has:")
|
||||
var/list/current_items = custom_items[assoc_key]
|
||||
for(var/datum/custom_item/item in current_items)
|
||||
usr << "- name: [item.name] icon: [item.item_icon] path: [item.item_path] desc: [item.item_desc]"
|
||||
to_chat(usr, "- name: [item.name] icon: [item.item_icon] path: [item.item_path] desc: [item.item_desc]")
|
||||
|
||||
/datum/admins/proc/spawn_plant(seedtype in SSplants.seeds)
|
||||
set category = "Debug"
|
||||
@@ -1043,10 +1043,10 @@ proc/admin_notice(var/message, var/rights)
|
||||
set name = "Show Traitor Panel"
|
||||
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
to_chat(usr, "This can only be used on instances of type /mob")
|
||||
return
|
||||
if(!M.mind)
|
||||
usr << "This mob has no mind!"
|
||||
to_chat(usr, "This mob has no mind!")
|
||||
return
|
||||
|
||||
M.mind.edit_memory()
|
||||
@@ -1157,21 +1157,21 @@ proc/admin_notice(var/message, var/rights)
|
||||
for(var/mob/living/silicon/S in mob_list)
|
||||
ai_number++
|
||||
if(isAI(S))
|
||||
usr << "<b>AI [key_name(S, usr)]'s laws:</b>"
|
||||
to_chat(usr, "<b>AI [key_name(S, usr)]'s laws:</b>")
|
||||
else if(isrobot(S))
|
||||
var/mob/living/silicon/robot/R = S
|
||||
usr << "<b>CYBORG [key_name(S, usr)] [R.connected_ai?"(Slaved to: [R.connected_ai])":"(Independant)"]: laws:</b>"
|
||||
to_chat(usr, "<b>CYBORG [key_name(S, usr)] [R.connected_ai?"(Slaved to: [R.connected_ai])":"(Independant)"]: laws:</b>")
|
||||
else if (ispAI(S))
|
||||
usr << "<b>pAI [key_name(S, usr)]'s laws:</b>"
|
||||
to_chat(usr, "<b>pAI [key_name(S, usr)]'s laws:</b>")
|
||||
else
|
||||
usr << "<b>SOMETHING SILICON [key_name(S, usr)]'s laws:</b>"
|
||||
to_chat(usr, "<b>SOMETHING SILICON [key_name(S, usr)]'s laws:</b>")
|
||||
|
||||
if (S.laws == null)
|
||||
usr << "[key_name(S, usr)]'s laws are null?? Contact a coder."
|
||||
to_chat(usr, "[key_name(S, usr)]'s laws are null?? Contact a coder.")
|
||||
else
|
||||
S.laws.show_laws(usr)
|
||||
if(!ai_number)
|
||||
usr << "<b>No AIs located</b>" //Just so you know the thing is actually working and not just ignoring you.
|
||||
to_chat(usr, "<b>No AIs located</b>") //Just so you know the thing is actually working and not just ignoring you.)
|
||||
|
||||
/datum/admins/proc/show_skills()
|
||||
set category = "Admin"
|
||||
@@ -1180,7 +1180,7 @@ proc/admin_notice(var/message, var/rights)
|
||||
if (!istype(src,/datum/admins))
|
||||
src = usr.client.holder
|
||||
if (!istype(src,/datum/admins))
|
||||
usr << "Error: you are not an admin!"
|
||||
to_chat(usr, "Error: you are not an admin!")
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/M = input("Select mob.", "Select mob.") as null|anything in human_mob_list
|
||||
@@ -1196,7 +1196,7 @@ proc/admin_notice(var/message, var/rights)
|
||||
set desc = "Should fix any mob sprite update errors."
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
if(istype(H))
|
||||
@@ -1277,16 +1277,16 @@ proc/admin_notice(var/message, var/rights)
|
||||
if (!istype(src,/datum/admins))
|
||||
src = usr.client.holder
|
||||
if (!istype(src,/datum/admins))
|
||||
usr << "Error: you are not an admin!"
|
||||
to_chat(usr, "Error: you are not an admin!")
|
||||
return
|
||||
|
||||
if(!SSticker.mode)
|
||||
usr << "Mode has not started."
|
||||
to_chat(usr, "Mode has not started.")
|
||||
return
|
||||
|
||||
var/antag_type = input("Choose a template.","Force Latespawn") as null|anything in all_antag_types
|
||||
if(!antag_type || !all_antag_types[antag_type])
|
||||
usr << "Aborting."
|
||||
to_chat(usr, "Aborting.")
|
||||
return
|
||||
|
||||
var/datum/antagonist/antag = all_antag_types[antag_type]
|
||||
@@ -1301,11 +1301,11 @@ proc/admin_notice(var/message, var/rights)
|
||||
if (!istype(src,/datum/admins))
|
||||
src = usr.client.holder
|
||||
if (!istype(src,/datum/admins) || !check_rights(R_ADMIN))
|
||||
usr << "Error: you are not an admin!"
|
||||
to_chat(usr, "Error: you are not an admin!")
|
||||
return
|
||||
|
||||
if(!SSticker || !SSticker.mode)
|
||||
usr << "Mode has not started."
|
||||
to_chat(usr, "Mode has not started.")
|
||||
return
|
||||
|
||||
log_and_message_admins("attempting to force mode autospawn.")
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
if(!message) return
|
||||
var/F = investigate_subject2file(subject)
|
||||
if(!F) return
|
||||
F << "<small>[time2text(world.timeofday,"hh:mm")] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
|
||||
to_chat(F, "<small>[time2text(world.timeofday,"hh:mm")] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>")
|
||||
|
||||
//ADMINVERBS
|
||||
/client/proc/investigate_show( subject in list("hrefs","notes","singulo","telesci") )
|
||||
@@ -34,7 +34,7 @@
|
||||
if("singulo", "telesci") //general one-round-only stuff
|
||||
var/F = investigate_subject2file(subject)
|
||||
if(!F)
|
||||
src << "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>"
|
||||
to_chat(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")
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
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>"
|
||||
to_chat(src, "<font color='red'>Error: admin_investigate: No href logfile found.</font>")
|
||||
return
|
||||
else
|
||||
src << "<font color='red'>Error: admin_investigate: Href Logging is not on.</font>"
|
||||
to_chat(src, "<font color='red'>Error: admin_investigate: Href Logging is not on.</font>")
|
||||
return
|
||||
|
||||
@@ -37,44 +37,44 @@
|
||||
var/new_memo = input(usr, "Please write your memo.", "Memo", current_memo) as message
|
||||
|
||||
if (server_greeting.update_value("memo_write", list(ckey, new_memo)))
|
||||
src << "<span class='notice'>Operation carried out successfully.</span>"
|
||||
to_chat(src, "<span class='notice'>Operation carried out successfully.</span>")
|
||||
message_admins("[ckey] wrote a new memo:<br>[html_encode(new_memo)]")
|
||||
else
|
||||
src << "<span class='danger'>Error carrying out desired operation.</span>"
|
||||
to_chat(src, "<span class='danger'>Error carrying out desired operation.</span>")
|
||||
|
||||
return
|
||||
|
||||
/client/proc/admin_memo_delete()
|
||||
if (!server_greeting.memo_list.len)
|
||||
src << "<span class='notice'>No memos are currently saved.</span>"
|
||||
to_chat(src, "<span class='notice'>No memos are currently saved.</span>")
|
||||
return
|
||||
|
||||
if (!check_rights(R_SERVER))
|
||||
if (!server_greeting.memo_list[ckey])
|
||||
src << "<span class='warning'>You do not have a memo saved. Cancelling.</span>"
|
||||
to_chat(src, "<span class='warning'>You do not have a memo saved. Cancelling.</span>")
|
||||
|
||||
else if (alert("Do you wish to delete your own memo, written on [server_greeting.memo_list[ckey]["date"]]?", "Choices", "Yes", "No") == "Yes")
|
||||
if (server_greeting.update_value("memo_delete", ckey))
|
||||
src << "<span class='notice'>Operation carried out successfully.</span>"
|
||||
to_chat(src, "<span class='notice'>Operation carried out successfully.</span>")
|
||||
message_admins("[ckey] has deleted their own memo.")
|
||||
else
|
||||
src << "<span class='danger'>Error carrying out desired operation.</span>"
|
||||
to_chat(src, "<span class='danger'>Error carrying out desired operation.</span>")
|
||||
|
||||
else
|
||||
src << "<span class='notice'>Cancelled.</span>"
|
||||
to_chat(src, "<span class='notice'>Cancelled.</span>")
|
||||
|
||||
return
|
||||
else
|
||||
var/input = input(usr, "Whose memo shall we delete?", "Remove Memo", null) as null|anything in server_greeting.memo_list
|
||||
|
||||
if (!input)
|
||||
src << "<span class='notice'>Cancelled.</span>"
|
||||
to_chat(src, "<span class='notice'>Cancelled.</span>")
|
||||
return
|
||||
|
||||
if (server_greeting.update_value("memo_delete", input))
|
||||
src << "<span class='notice'>Operation carried out successfully.</span>"
|
||||
to_chat(src, "<span class='notice'>Operation carried out successfully.</span>")
|
||||
message_admins("[ckey] has deleted the memo of [input].")
|
||||
else
|
||||
src << "<span class='danger'>Error carrying out desired operation.</span>"
|
||||
to_chat(src, "<span class='danger'>Error carrying out desired operation.</span>")
|
||||
|
||||
return
|
||||
|
||||
@@ -440,7 +440,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
verbs.Remove(/client/proc/hide_most_verbs, admin_verbs_hideable)
|
||||
verbs += /client/proc/show_verbs
|
||||
|
||||
src << "<span class='interface'>Most of your adminverbs have been hidden.</span>"
|
||||
to_chat(src, "<span class='interface'>Most of your adminverbs have been hidden.</span>")
|
||||
feedback_add_details("admin_verb","HMV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
@@ -451,7 +451,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
remove_admin_verbs()
|
||||
verbs += /client/proc/show_verbs
|
||||
|
||||
src << "<span class='interface'>Almost all of your adminverbs have been hidden.</span>"
|
||||
to_chat(src, "<span class='interface'>Almost all of your adminverbs have been hidden.</span>")
|
||||
feedback_add_details("admin_verb","TAVVH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
@@ -462,7 +462,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
verbs -= /client/proc/show_verbs
|
||||
add_admin_verbs()
|
||||
|
||||
src << "<span class='interface'>All of your adminverbs are now visible.</span>"
|
||||
to_chat(src, "<span class='interface'>All of your adminverbs are now visible.</span>")
|
||||
feedback_add_details("admin_verb","TAVVS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -480,13 +480,13 @@ var/list/admin_verbs_cciaa = list(
|
||||
ghost.reenter_corpse()
|
||||
log_admin("[src] reentered their corpose using aghost.",admin_key=key_name(src))
|
||||
else
|
||||
ghost << "<font color='red'>Error: Aghost: Can't reenter corpse.</font>"
|
||||
to_chat(ghost, "<font color='red'>Error: Aghost: Can't reenter corpse.</font>")
|
||||
return
|
||||
|
||||
feedback_add_details("admin_verb","P") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
else if(istype(mob,/mob/abstract/new_player))
|
||||
src << "<font color='red'>Error: Aghost: Can't admin-ghost whilst in the lobby. Join or Observe first.</font>"
|
||||
to_chat(src, "<font color='red'>Error: Aghost: Can't admin-ghost whilst in the lobby. Join or Observe first.</font>")
|
||||
else
|
||||
//ghostize
|
||||
var/mob/body = mob
|
||||
@@ -506,11 +506,11 @@ var/list/admin_verbs_cciaa = list(
|
||||
if(holder && mob)
|
||||
if(mob.invisibility == INVISIBILITY_OBSERVER)
|
||||
mob.invisibility = initial(mob.invisibility)
|
||||
mob << "<span class='danger'>Invisimin off. Invisibility reset.</span>"
|
||||
to_chat(mob, "<span class='danger'>Invisimin off. Invisibility reset.</span>")
|
||||
mob.alpha = max(mob.alpha + 100, 255)
|
||||
else
|
||||
mob.invisibility = INVISIBILITY_OBSERVER
|
||||
mob << "<span class='notice'><b>Invisimin on. You are now as invisible as a ghost.</b></span>"
|
||||
to_chat(mob, "<span class='notice'><b>Invisimin on. You are now as invisible as a ghost.</b></span>")
|
||||
mob.alpha = max(mob.alpha - 100, 0)
|
||||
|
||||
|
||||
@@ -783,7 +783,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
deadmin_holder.reassociate()
|
||||
log_admin("[src] re-admined themself.",admin_key=key_name(src))
|
||||
message_admins("[src] re-admined themself.", 1)
|
||||
src << "<span class='interface'>You now have the keys to control the planet, or atleast a small space station</span>"
|
||||
to_chat(src, "<span class='interface'>You now have the keys to control the planet, or atleast a small space station</span>")
|
||||
verbs -= /client/proc/readmin_self
|
||||
|
||||
/client/proc/deadmin_self()
|
||||
@@ -795,7 +795,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
log_admin("[src] deadmined themself.",admin_key=key_name(src))
|
||||
message_admins("[src] deadmined themself.", 1)
|
||||
deadmin()
|
||||
src << "<span class='interface'>You are now a normal player.</span>"
|
||||
to_chat(src, "<span class='interface'>You are now a normal player.</span>")
|
||||
verbs |= /client/proc/readmin_self
|
||||
feedback_add_details("admin_verb","DAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -806,10 +806,10 @@ var/list/admin_verbs_cciaa = list(
|
||||
if(config)
|
||||
if(config.log_hrefs)
|
||||
config.log_hrefs = 0
|
||||
src << "<b>Stopped logging hrefs</b>"
|
||||
to_chat(src, "<b>Stopped logging hrefs</b>")
|
||||
else
|
||||
config.log_hrefs = 1
|
||||
src << "<b>Started logging hrefs</b>"
|
||||
to_chat(src, "<b>Started logging hrefs</b>")
|
||||
|
||||
/client/proc/check_ai_laws()
|
||||
set name = "Check AI Laws"
|
||||
@@ -871,7 +871,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
if(!H) return
|
||||
|
||||
if(!H.client)
|
||||
usr << "Only mobs with clients can alter their own appearance."
|
||||
to_chat(usr, "Only mobs with clients can alter their own appearance.")
|
||||
return
|
||||
|
||||
switch(alert("Do you wish for [H] to be allowed to select non-whitelisted races?","Alter Mob Appearance","Yes","No","Cancel"))
|
||||
@@ -913,7 +913,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
var/mob/living/carbon/human/M = input("Select mob.", "Edit Appearance") as null|anything in human_mob_list
|
||||
|
||||
if(!istype(M, /mob/living/carbon/human))
|
||||
usr << "<span class='warning'>You can only do this to humans!</span>"
|
||||
to_chat(usr, "<span class='warning'>You can only do this to humans!</span>")
|
||||
return
|
||||
switch(alert("Are you sure you wish to edit this mob's appearance? Skrell, Unathi, Vox and Tajaran can result in unintended consequences.",,"Yes","No"))
|
||||
if("No")
|
||||
@@ -985,7 +985,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
if (J.current_positions >= J.total_positions && J.total_positions != -1)
|
||||
jobs += J.title
|
||||
if (!jobs.len)
|
||||
usr << "There are no fully staffed jobs."
|
||||
to_chat(usr, "There are no fully staffed jobs.")
|
||||
return
|
||||
var/job = input("Please select job slot to free", "Free job slot") as null|anything in jobs
|
||||
if (job)
|
||||
@@ -999,9 +999,9 @@ var/list/admin_verbs_cciaa = list(
|
||||
|
||||
prefs.toggles ^= CHAT_ATTACKLOGS
|
||||
if (prefs.toggles & CHAT_ATTACKLOGS)
|
||||
usr << "You now will get attack log messages"
|
||||
to_chat(usr, "You now will get attack log messages")
|
||||
else
|
||||
usr << "You now won't get attack log messages"
|
||||
to_chat(usr, "You now won't get attack log messages")
|
||||
prefs.save_preferences()
|
||||
|
||||
|
||||
@@ -1012,11 +1012,11 @@ var/list/admin_verbs_cciaa = list(
|
||||
if(config)
|
||||
if(config.cult_ghostwriter)
|
||||
config.cult_ghostwriter = 0
|
||||
src << "<b>Disallowed ghost writers.</b>"
|
||||
to_chat(src, "<b>Disallowed ghost writers.</b>")
|
||||
message_admins("Admin [key_name_admin(usr)] has disabled ghost writers.", 1)
|
||||
else
|
||||
config.cult_ghostwriter = 1
|
||||
src << "<b>Enabled ghost writers.</b>"
|
||||
to_chat(src, "<b>Enabled ghost writers.</b>")
|
||||
message_admins("Admin [key_name_admin(usr)] has enabled ghost writers.", 1)
|
||||
|
||||
/client/proc/toggledrones()
|
||||
@@ -1026,11 +1026,11 @@ var/list/admin_verbs_cciaa = list(
|
||||
if(config)
|
||||
if(config.allow_drone_spawn)
|
||||
config.allow_drone_spawn = 0
|
||||
src << "<b>Disallowed maint drones.</b>"
|
||||
to_chat(src, "<b>Disallowed maint drones.</b>")
|
||||
message_admins("Admin [key_name_admin(usr)] has disabled maint drones.", 1)
|
||||
else
|
||||
config.allow_drone_spawn = 1
|
||||
src << "<b>Enabled maint drones.</b>"
|
||||
to_chat(src, "<b>Enabled maint drones.</b>")
|
||||
message_admins("Admin [key_name_admin(usr)] has enabled maint drones.", 1)
|
||||
|
||||
/client/proc/toggledebuglogs()
|
||||
@@ -1039,9 +1039,9 @@ var/list/admin_verbs_cciaa = list(
|
||||
|
||||
prefs.toggles ^= CHAT_DEBUGLOGS
|
||||
if (prefs.toggles & CHAT_DEBUGLOGS)
|
||||
usr << "You now will get debug log messages"
|
||||
to_chat(usr, "You now will get debug log messages")
|
||||
else
|
||||
usr << "You now won't get debug log messages"
|
||||
to_chat(usr, "You now won't get debug log messages")
|
||||
|
||||
|
||||
/client/proc/man_up(mob/T as mob in mob_list)
|
||||
@@ -1049,8 +1049,8 @@ var/list/admin_verbs_cciaa = list(
|
||||
set name = "Man Up"
|
||||
set desc = "Tells mob to man up and deal with it."
|
||||
|
||||
T << "<span class='notice'><b><font size=3>Man up and deal with it.</font></b></span>"
|
||||
T << "<span class='notice'>Move on.</span>"
|
||||
to_chat(T, "<span class='notice'><b><font size=3>Man up and deal with it.</font></b></span>")
|
||||
to_chat(T, "<span class='notice'>Move on.</span>")
|
||||
|
||||
log_admin("[key_name(usr)] told [key_name(T)] to man up and deal with it.", admin_key=key_name(usr), ckey=key_name(T))
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] told [key_name(T)] to man up and deal with it.</span>", 1)
|
||||
@@ -1061,8 +1061,8 @@ var/list/admin_verbs_cciaa = list(
|
||||
set desc = "Tells everyone to man up and deal with it."
|
||||
|
||||
for (var/mob/T as mob in mob_list)
|
||||
T << "<br><center><span class='notice'><b><font size=4>Man up.<br> Deal with it.</font></b><br>Move on.</span></center><br>"
|
||||
T << 'sound/voice/ManUp1.ogg'
|
||||
to_chat(T, "<br><center><span class='notice'><b><font size=4>Man up.<br> Deal with it.</font></b><br>Move on.</span></center><br>")
|
||||
sound_to(T, 'sound/voice/ManUp1.ogg')
|
||||
|
||||
log_admin("[key_name(usr)] told everyone to man up and deal with it.",admin_key=key_name(usr))
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] told everyone to man up and deal with it.</span>", 1)
|
||||
@@ -1089,7 +1089,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
var/ans = alert(src, "This will force explosions to run in the [config.use_spreading_explosions ? "old manner (circular)" : "new, realistic manner (spreading)"]. Do you want to proceed?", "Switch explosion type", "Yes", "Cancel")
|
||||
|
||||
if (!ans || ans == "Cancel")
|
||||
src << "<span class='notice'>Cancelled.</span>"
|
||||
to_chat(src, "<span class='notice'>Cancelled.</span>")
|
||||
return
|
||||
|
||||
config.use_spreading_explosions = !config.use_spreading_explosions
|
||||
@@ -1229,5 +1229,5 @@ var/list/admin_verbs_cciaa = list(
|
||||
/client/proc/apply_sunstate()
|
||||
set hidden = TRUE
|
||||
|
||||
usr << "The sunlight system is disabled."
|
||||
to_chat(usr, "The sunlight system is disabled.")
|
||||
#endif
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
else
|
||||
return
|
||||
if(!target)
|
||||
usr << "Proc call cancelled."
|
||||
to_chat(usr, "Proc call cancelled.")
|
||||
return
|
||||
if("Cancel")
|
||||
return
|
||||
@@ -55,10 +55,10 @@
|
||||
|
||||
if(hastarget)
|
||||
if(!target)
|
||||
usr << "Your callproc target no longer exists."
|
||||
to_chat(usr, "Your callproc target no longer exists.")
|
||||
return
|
||||
if(!hascall(target, procname))
|
||||
usr << "\The [target] has no call [procname]()"
|
||||
to_chat(usr, "\The [target] has no call [procname]()")
|
||||
return
|
||||
|
||||
var/list/arguments = list()
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
while(!done)
|
||||
if(hastarget && !target)
|
||||
usr << "Your callproc target no longer exists."
|
||||
to_chat(usr, "Your callproc target no longer exists.")
|
||||
return
|
||||
switch(input("Type of [arguments.len+1]\th variable", "argument [arguments.len+1]") as null|anything in list(
|
||||
"finished", "null", "text", "num", "type", "obj reference", "mob reference",
|
||||
@@ -93,7 +93,7 @@
|
||||
var/object = input("Enter a typepath for [arguments.len+1]\th argument") as null|text
|
||||
if(!object)
|
||||
return
|
||||
|
||||
|
||||
var/list/types = typesof(/atom)
|
||||
var/list/matches = new()
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
current = matches[1]
|
||||
else
|
||||
current = input("Select an atom type", "Spawn Atom", matches[1]) as null|anything in matches
|
||||
|
||||
|
||||
if(isnull(current)) return
|
||||
|
||||
if("obj reference")
|
||||
@@ -155,7 +155,7 @@
|
||||
|
||||
if(hastarget)
|
||||
if(!target)
|
||||
usr << "Your callproc target no longer exists."
|
||||
to_chat(usr, "Your callproc target no longer exists.")
|
||||
return
|
||||
log_admin("[key_name(src)] called [target]'s [procname]() with [arguments.len ? "the arguments [list2params(arguments)]" : "no arguments"].",admin_key=key_name(src))
|
||||
if(arguments.len)
|
||||
@@ -166,5 +166,5 @@
|
||||
log_admin("[key_name(src)] called [procname]() with [arguments.len ? "the arguments [list2params(arguments)]" : "no arguments"].",admin_key=key_name(src))
|
||||
returnval = call(procname)(arglist(arguments))
|
||||
|
||||
usr << "<span class='info'>[procname]() returned: [isnull(returnval) ? "null" : returnval]</span>"
|
||||
to_chat(usr, "<span class='info'>[procname]() returned: [isnull(returnval) ? "null" : returnval]</span>")
|
||||
feedback_add_details("admin_verb","APC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -81,13 +81,13 @@ NOTE: It checks usr by default. Supply the "user" argument if you wish to check
|
||||
return 1
|
||||
else
|
||||
if(show_msg)
|
||||
user << "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</font>"
|
||||
to_chat(user, "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</font>")
|
||||
else
|
||||
if(user.client.holder)
|
||||
return 1
|
||||
else
|
||||
if(show_msg)
|
||||
user << "<font color='red'>Error: You are not an admin.</font>"
|
||||
to_chat(user, "<font color='red'>Error: You are not an admin.</font>")
|
||||
return 0
|
||||
|
||||
//probably a bit iffy - will hopefully figure out a better solution
|
||||
@@ -99,7 +99,7 @@ NOTE: It checks usr by default. Supply the "user" argument if you wish to check
|
||||
if(usr.client.holder.rights != other.holder.rights)
|
||||
if( (usr.client.holder.rights & other.holder.rights) == other.holder.rights )
|
||||
return 1 //we have all the rights they have and more
|
||||
usr << "<font color='red'>Error: Cannot proceed. They have more or equal rights to us.</font>"
|
||||
to_chat(usr, "<font color='red'>Error: Cannot proceed. They have more or equal rights to us.</font>")
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
set desc = "Usage: Capture-Map-Part target_x_cord target_y_cord target_z_cord range (captures part of a map originating from bottom left corner)"
|
||||
|
||||
if(!check_rights(R_ADMIN|R_DEBUG|R_SERVER))
|
||||
usr << "You are not allowed to use this command"
|
||||
to_chat(usr, "You are not allowed to use this command")
|
||||
return
|
||||
|
||||
if(isnull(tx) || isnull(ty) || isnull(tz) || isnull(range))
|
||||
usr << "Capture Map Part, captures part of a map using camara like rendering."
|
||||
usr << "Usage: Capture-Map-Part target_x_cord target_y_cord target_z_cord range"
|
||||
usr << "Target coordinates specify bottom left corner of the capture, range defines render distance to opposite corner."
|
||||
to_chat(usr, "Capture Map Part, captures part of a map using camara like rendering.")
|
||||
to_chat(usr, "Usage: Capture-Map-Part target_x_cord target_y_cord target_z_cord range")
|
||||
to_chat(usr, "Target coordinates specify bottom left corner of the capture, range defines render distance to opposite corner.")
|
||||
return
|
||||
|
||||
if(range > 32 || range <= 0)
|
||||
usr << "Capturing range is incorrect, it must be within 1-32."
|
||||
to_chat(usr, "Capturing range is incorrect, it must be within 1-32.")
|
||||
return
|
||||
|
||||
if(locate(tx,ty,tz))
|
||||
@@ -23,17 +23,17 @@
|
||||
ligths = 1
|
||||
var/cap = generate_image(tx ,ty ,tz ,range, CAPTURE_MODE_PARTIAL, null, ligths, 1)
|
||||
var/file_name = "map_capture_x[tx]_y[ty]_z[tz]_r[range].png"
|
||||
usr << "Saved capture in cache as [file_name]."
|
||||
usr << browse_rsc(cap, file_name)
|
||||
to_chat(usr, "Saved capture in cache as [file_name].")
|
||||
to_chat(usr, browse_rsc(cap, file_name))
|
||||
else
|
||||
usr << "Target coordinates are incorrect."
|
||||
to_chat(usr, "Target coordinates are incorrect.")
|
||||
|
||||
/datum/admins/proc/capture_map_capture_next(currentz, currentx, currenty, ligths)
|
||||
if(locate(currentx, currenty, currentz))
|
||||
var/cap = generate_image(currentx ,currenty ,currentz ,16, CAPTURE_MODE_PARTIAL, null, ligths, 1)
|
||||
var/file_name = "map_capture_x[currentx]_y[currenty]_z[currentz]_r16.png"
|
||||
usr << "Saved capture in cache as [file_name]."
|
||||
usr << browse_rsc(cap, file_name)
|
||||
to_chat(usr, "Saved capture in cache as [file_name].")
|
||||
to_chat(usr, browse_rsc(cap, file_name))
|
||||
currentx = currentx + 16
|
||||
spawn (6)
|
||||
del(cap)
|
||||
@@ -44,14 +44,14 @@
|
||||
if(locate(currentx, currenty, currentz))
|
||||
var/cap = generate_image(currentx ,currenty ,currentz ,16, CAPTURE_MODE_PARTIAL, null, ligths, 1)
|
||||
var/file_name = "map_capture_x[currentx]_y[currenty]_z[currentz]_r16.png"
|
||||
usr << "Saved capture in cache as [file_name]."
|
||||
usr << browse_rsc(cap, file_name)
|
||||
to_chat(usr, "Saved capture in cache as [file_name].")
|
||||
to_chat(usr, browse_rsc(cap, file_name))
|
||||
currentx = currentx + 16
|
||||
spawn (6)
|
||||
del(cap)
|
||||
.(currentz, currentx, currenty, ligths)
|
||||
else
|
||||
usr << "End of map, capture is done."
|
||||
to_chat(usr, "End of map, capture is done.")
|
||||
|
||||
/datum/admins/proc/capture_map(tz as null|num)
|
||||
set category = "Server"
|
||||
@@ -59,17 +59,17 @@
|
||||
set desc = "Usage: Capture-Map target_z_cord (captures map)"
|
||||
|
||||
if(!check_rights(R_ADMIN|R_DEBUG|R_SERVER))
|
||||
usr << "You are not allowed to use this command"
|
||||
to_chat(usr, "You are not allowed to use this command")
|
||||
return
|
||||
|
||||
if(isnull(tz))
|
||||
usr << "Map Part, map using camara like rendering."
|
||||
usr << "Usage: Capture-Map target_z_cord"
|
||||
usr << "Target Z coordinates define z level to capture."
|
||||
to_chat(usr, "Map Part, map using camara like rendering.")
|
||||
to_chat(usr, "Usage: Capture-Map target_z_cord")
|
||||
to_chat(usr, "Target Z coordinates define z level to capture.")
|
||||
return
|
||||
|
||||
if(!locate(1, 1, tz))
|
||||
usr << "Target z-level is incorrect."
|
||||
to_chat(usr, "Target z-level is incorrect.")
|
||||
return
|
||||
|
||||
var/ligths = 0
|
||||
|
||||
@@ -51,13 +51,13 @@
|
||||
return
|
||||
|
||||
if(!usr.client.holder || !(usr.client.holder.rights & R_PERMISSIONS))
|
||||
usr << "<span class='danger'>You do not have permission to do this!</span>"
|
||||
to_chat(usr, "<span class='danger'>You do not have permission to do this!</span>")
|
||||
return
|
||||
|
||||
establish_db_connection(dbcon)
|
||||
|
||||
if(!dbcon.IsConnected())
|
||||
usr << "<span class='warning'>Failed to establish database connection</span>"
|
||||
to_chat(usr, "<span class='warning'>Failed to establish database connection</span>")
|
||||
return
|
||||
|
||||
if(!adm_ckey || !new_rank)
|
||||
@@ -85,19 +85,19 @@
|
||||
update_query.Execute()
|
||||
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `ss13_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added new admin [adm_ckey] to rank [new_rank]');")
|
||||
log_query.Execute()
|
||||
usr << "<span class='notice'>New admin added.</span>"
|
||||
to_chat(usr, "<span class='notice'>New admin added.</span>")
|
||||
else if(!isnull(admin_id) && isnum(admin_id) && new_rank != "Removed")
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `ss13_player` SET rank = '[new_rank]' WHERE id = [admin_id]")
|
||||
insert_query.Execute()
|
||||
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `ss13_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Edited the rank of [adm_ckey] to [new_rank]');")
|
||||
log_query.Execute()
|
||||
usr << "<span class='notice'>Admin rank changed.</span>"
|
||||
to_chat(usr, "<span class='notice'>Admin rank changed.</span>")
|
||||
else if(!isnull(admin_id) && isnum(admin_id) && new_rank == "Removed")
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `ss13_player` SET rank = NULL, flags = 0 WHERE id = [admin_id]")
|
||||
insert_query.Execute()
|
||||
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `ss13_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Removed the rank of [adm_ckey]');")
|
||||
log_query.Execute()
|
||||
usr << "<span class='notice'>Admin rank removed.</span>"
|
||||
to_chat(usr, "<span class='notice'>Admin rank removed.</span>")
|
||||
|
||||
/datum/admins/proc/log_admin_permission_modification(var/adm_ckey, var/new_permission)
|
||||
if(config.admin_legacy_system) return
|
||||
@@ -106,12 +106,12 @@
|
||||
return
|
||||
|
||||
if(!usr.client.holder || !(usr.client.holder.rights & R_PERMISSIONS))
|
||||
usr << "<span class='warning'>You do not have permission to do this!</span>"
|
||||
to_chat(usr, "<span class='warning'>You do not have permission to do this!</span>")
|
||||
return
|
||||
|
||||
establish_db_connection(dbcon)
|
||||
if(!dbcon.IsConnected())
|
||||
usr << "<span class='warning'>Failed to establish database connection</span>"
|
||||
to_chat(usr, "<span class='warning'>Failed to establish database connection</span>")
|
||||
return
|
||||
|
||||
if(!adm_ckey || !new_permission)
|
||||
@@ -145,10 +145,10 @@
|
||||
insert_query.Execute()
|
||||
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `ss13_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Removed permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]');")
|
||||
log_query.Execute()
|
||||
usr << "<span class='notice'>Permission removed.</span>"
|
||||
to_chat(usr, "<span class='notice'>Permission removed.</span>")
|
||||
else //This admin doesn't have this permission, so we are adding it.
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `ss13_player` SET flags = '[admin_rights | new_permission]' WHERE id = [admin_id]")
|
||||
insert_query.Execute()
|
||||
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `ss13_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]')")
|
||||
log_query.Execute()
|
||||
usr << "<span class='notice'>Permission added.</span>"
|
||||
to_chat(usr, "<span class='notice'>Permission added.</span>")
|
||||
|
||||
@@ -53,12 +53,12 @@
|
||||
count++
|
||||
|
||||
if (count == 0)
|
||||
usr << "<span class='warning'>Database update failed due to a note id not being present in the database.</span>"
|
||||
to_chat(usr, "<span class='warning'>Database update failed due to a note id not being present in the database.</span>")
|
||||
error("Database update failed due to a note id not being present in the database.")
|
||||
return
|
||||
|
||||
if (count > 1)
|
||||
usr << "<span class='warning'>Database update failed due to multiple notes having the same ID. Contact the database admin.</span>"
|
||||
to_chat(usr, "<span class='warning'>Database update failed due to multiple notes having the same ID. Contact the database admin.</span>")
|
||||
error("Database update failed due to multiple notes having the same ID. Contact the database admin.")
|
||||
return
|
||||
|
||||
@@ -71,12 +71,12 @@
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] deleted one of [ckey]'s notes.</span>")
|
||||
log_admin("[key_name(usr)] deleted one of [ckey]'s notes.",admin_key=key_name(usr),ckey=ckey)
|
||||
else
|
||||
usr << "Cancelled"
|
||||
to_chat(usr, "Cancelled")
|
||||
return
|
||||
if ("content")
|
||||
var/new_content = input("Edit this note's contents.", "New Contents", note, null) as null|text
|
||||
if (!new_content)
|
||||
usr << "Cancelled"
|
||||
to_chat(usr, "Cancelled")
|
||||
return
|
||||
var/DBQuery/editquery = dbcon.NewQuery("UPDATE ss13_notes SET content = :new_content:, lasteditor = :a_ckey:, lasteditdate = Now(), edited = 1 WHERE id = :note_id:")
|
||||
editquery.Execute(list("new_content" = new_content, "a_ckey" = usr.client.ckey, "note_id" = note_id))
|
||||
@@ -86,7 +86,7 @@
|
||||
return
|
||||
|
||||
if (admin_ckey == "Adminbot")
|
||||
usr << "Adminbot is not an actual admin. You were lied to."
|
||||
to_chat(usr, "Adminbot is not an actual admin. You were lied to.")
|
||||
//The fucking size of this request would be astronomical. Please do not!
|
||||
return
|
||||
|
||||
|
||||
+86
-86
@@ -49,23 +49,23 @@
|
||||
switch(bantype)
|
||||
if(BANTYPE_PERMA)
|
||||
if(!banckey || !banreason)
|
||||
usr << "Not enough parameters (Requires ckey and reason)"
|
||||
to_chat(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)"
|
||||
to_chat(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)"
|
||||
to_chat(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)"
|
||||
to_chat(usr, "Not enough parameters (Requires ckey, reason and job)")
|
||||
return
|
||||
|
||||
var/mob/playermob
|
||||
@@ -119,14 +119,14 @@
|
||||
var/new_ckey = ckey(input(usr,"New admin's ckey","Admin ckey", null) as text|null)
|
||||
if(!new_ckey) return
|
||||
if(new_ckey in admin_datums)
|
||||
usr << "<font color='red'>Error: Topic 'editrights': [new_ckey] is already an admin</font>"
|
||||
to_chat(usr, "<font color='red'>Error: Topic 'editrights': [new_ckey] is already an admin</font>")
|
||||
return
|
||||
adm_ckey = new_ckey
|
||||
task = "rank"
|
||||
else if(task != "show")
|
||||
adm_ckey = ckey(href_list["ckey"])
|
||||
if(!adm_ckey)
|
||||
usr << "<font color='red'>Error: Topic 'editrights': No valid ckey</font>"
|
||||
to_chat(usr, "<font color='red'>Error: Topic 'editrights': No valid ckey</font>")
|
||||
return
|
||||
|
||||
var/datum/admins/D = admin_datums[adm_ckey]
|
||||
@@ -158,7 +158,7 @@
|
||||
if(config.admin_legacy_system)
|
||||
new_rank = ckeyEx(new_rank)
|
||||
if(!new_rank)
|
||||
usr << "<font color='red'>Error: Topic 'editrights': Invalid rank</font>"
|
||||
to_chat(usr, "<font color='red'>Error: Topic 'editrights': Invalid rank</font>")
|
||||
return
|
||||
if(config.admin_legacy_system)
|
||||
if(admin_ranks.len)
|
||||
@@ -267,7 +267,7 @@
|
||||
|
||||
var/mob/M = locate(href_list["mob"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
to_chat(usr, "This can only be used on instances of type /mob")
|
||||
return
|
||||
|
||||
var/delmob = 0
|
||||
@@ -402,7 +402,7 @@
|
||||
|
||||
var/ckey = ckey(input("Please specify the ckey you want to search for:", "ckey")) as text
|
||||
if (!ckey)
|
||||
usr << "<span class='notice'>Cancelled.</span>"
|
||||
to_chat(usr, "<span class='notice'>Cancelled.</span>")
|
||||
return
|
||||
|
||||
jobban_panel(ckey)
|
||||
@@ -412,15 +412,15 @@
|
||||
var/mob/M = locate(href_list["boot2"])
|
||||
if (ismob(M))
|
||||
if(!check_rights(R_MOD|R_ADMIN, 0))
|
||||
usr << "<span class='warning'>You do not have the appropriate permissions to boot users!</span>"
|
||||
to_chat(usr, "<span class='warning'>You do not have the appropriate permissions to boot users!</span>")
|
||||
return
|
||||
if(!check_if_greater_rights_than(M.client))
|
||||
return
|
||||
var/reason = sanitize(input("Please enter reason"))
|
||||
if(!reason)
|
||||
M << "<span class='danger'>You have been kicked from the server</span>"
|
||||
to_chat(M, "<span class='danger'>You have been kicked from the server</span>")
|
||||
else
|
||||
M << "<span class='danger'>You have been kicked from the server: [reason]</span>"
|
||||
to_chat(M, "<span class='danger'>You have been kicked from the server: [reason]</span>")
|
||||
log_admin("[key_name(usr)] booted [key_name(M)].",admin_key=key_name(usr),ckey=key_name(M))
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] booted [key_name_admin(M)].</span>", 1)
|
||||
//M.client = null
|
||||
@@ -428,11 +428,11 @@
|
||||
|
||||
else if(href_list["newban"])
|
||||
if(!check_rights(R_MOD,0) && !check_rights(R_BAN, 0))
|
||||
usr << "<span class='warning'>You do not have the appropriate permissions to add bans!</span>"
|
||||
to_chat(usr, "<span class='warning'>You do not have the appropriate permissions to add bans!</span>")
|
||||
return
|
||||
|
||||
if(check_rights(R_MOD,0) && !check_rights(R_ADMIN, 0) && !config.mods_can_job_tempban) // If mod and tempban disabled
|
||||
usr << "<span class='warning'>Mod jobbanning is disabled!</span>"
|
||||
to_chat(usr, "<span class='warning'>Mod jobbanning is disabled!</span>")
|
||||
return
|
||||
|
||||
var/mob/M = locate(href_list["newban"])
|
||||
@@ -446,7 +446,7 @@
|
||||
if(!mins)
|
||||
return
|
||||
if(check_rights(R_MOD, 0) && !check_rights(R_BAN, 0) && mins > config.mod_tempban_max)
|
||||
usr << "<span class='warning'>Moderators can only job tempban up to [config.mod_tempban_max] minutes!</span>"
|
||||
to_chat(usr, "<span class='warning'>Moderators can only job tempban up to [config.mod_tempban_max] minutes!</span>")
|
||||
return
|
||||
if(mins >= 525600) mins = 525599
|
||||
var/reason = sanitize(input(usr,"Reason?","reason","Griefer") as text|null)
|
||||
@@ -458,15 +458,15 @@
|
||||
notes_add(M.ckey,"[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.",usr)
|
||||
else
|
||||
notes_add_sql(M.ckey, "[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.", usr, M.lastKnownIP, M.computer_id)
|
||||
M << "<span class='danger'><BIG>You have been banned by [usr.client.ckey].\nReason: [reason].</BIG></span>"
|
||||
M << "<span class='danger'>This is a temporary ban, it will be removed in [mins] minutes.</span>"
|
||||
to_chat(M, "<span class='danger'><BIG>You have been banned by [usr.client.ckey].\nReason: [reason].</BIG></span>")
|
||||
to_chat(M, "<span class='danger'>This is a temporary ban, it will be removed in [mins] minutes.</span>")
|
||||
feedback_inc("ban_tmp",1)
|
||||
DB_ban_record(BANTYPE_TEMP, M, mins, reason)
|
||||
feedback_inc("ban_tmp_mins",mins)
|
||||
if(config.banappeals)
|
||||
M << "<span class='warning'>To try to resolve this matter head to [config.banappeals]</span>"
|
||||
to_chat(M, "<span class='warning'>To try to resolve this matter head to [config.banappeals]</span>")
|
||||
else
|
||||
M << "<span class='warning'>No ban appeals URL has been set.</span>"
|
||||
to_chat(M, "<span class='warning'>No ban appeals URL has been set.</span>")
|
||||
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.",admin_key=key_name(usr),ckey=key_name(M))
|
||||
message_admins("<span class='notice'>[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.</span>")
|
||||
|
||||
@@ -483,12 +483,12 @@
|
||||
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0, M.lastKnownIP)
|
||||
if("No")
|
||||
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0)
|
||||
M << "<span class='danger'><BIG>You have been banned by [usr.client.ckey].\nReason: [reason].</BIG></span>"
|
||||
M << "<span class='warning'>This is a permanent ban.</span>"
|
||||
to_chat(M, "<span class='danger'><BIG>You have been banned by [usr.client.ckey].\nReason: [reason].</BIG></span>")
|
||||
to_chat(M, "<span class='warning'>This is a permanent ban.</span>")
|
||||
if(config.banappeals)
|
||||
M << "<span class='warning'>To try to resolve this matter head to [config.banappeals]</span>"
|
||||
to_chat(M, "<span class='warning'>To try to resolve this matter head to [config.banappeals]</span>")
|
||||
else
|
||||
M << "<span class='warning'>No ban appeals URL has been set.</span>"
|
||||
to_chat(M, "<span class='warning'>No ban appeals URL has been set.</span>")
|
||||
ban_unban_log_save("[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This is a permanent ban.")
|
||||
if (config.ban_legacy_system)
|
||||
notes_add(M.ckey,"[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This is a permanent ban.",usr)
|
||||
@@ -575,7 +575,7 @@
|
||||
|
||||
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"
|
||||
to_chat(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)]",admin_key=key_name(usr))
|
||||
@@ -587,7 +587,7 @@
|
||||
|
||||
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"
|
||||
to_chat(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)]",admin_key=key_name(usr),ckey=key_name(H))
|
||||
@@ -599,7 +599,7 @@
|
||||
|
||||
var/mob/M = locate(href_list["forcespeech"])
|
||||
if(!ismob(M))
|
||||
usr << "this can only be used on instances of type /mob"
|
||||
to_chat(usr, "this can only be used on instances of type /mob")
|
||||
|
||||
var/speech = input("What will [key_name(M)] say?.", "Force speech", "")// Don't need to sanitize, since it does that in say(), we also trust our admins.
|
||||
if(!speech) return
|
||||
@@ -616,10 +616,10 @@
|
||||
|
||||
var/mob/M = locate(href_list["sendtoprison"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
to_chat(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"
|
||||
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
|
||||
return
|
||||
|
||||
var/turf/prison_cell = pick(prisonwarp)
|
||||
@@ -645,7 +645,7 @@
|
||||
prisoner.equip_to_slot_or_del(new /obj/item/clothing/under/color/orange(prisoner), slot_w_uniform)
|
||||
prisoner.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(prisoner), slot_shoes)
|
||||
|
||||
M << "<span class='warning'>You have been sent to the prison station!</span>"
|
||||
to_chat(M, "<span class='warning'>You have been sent to the prison station!</span>")
|
||||
log_admin("[key_name(usr)] sent [key_name(M)] to the prison station.",,admin_key=key_name(usr),ckey=key_name(M))
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] sent [key_name_admin(M)] to the prison station.</span>", 1)
|
||||
|
||||
@@ -657,10 +657,10 @@
|
||||
|
||||
var/mob/M = locate(href_list["tdome1"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
to_chat(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"
|
||||
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
|
||||
return
|
||||
|
||||
for(var/obj/item/I in M)
|
||||
@@ -670,7 +670,7 @@
|
||||
sleep(5)
|
||||
M.forceMove(pick(tdome1))
|
||||
spawn(50)
|
||||
M << "<span class='notice'>You have been sent to the Thunderdome.</span>"
|
||||
to_chat(M, "<span class='notice'>You have been sent to the Thunderdome.</span>")
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 1)",admin_key=key_name(usr),ckey=key_name(M))
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 1)", 1)
|
||||
|
||||
@@ -682,10 +682,10 @@
|
||||
|
||||
var/mob/M = locate(href_list["tdome2"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
to_chat(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"
|
||||
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
|
||||
return
|
||||
|
||||
for(var/obj/item/I in M)
|
||||
@@ -695,7 +695,7 @@
|
||||
sleep(5)
|
||||
M.forceMove(pick(tdome2))
|
||||
spawn(50)
|
||||
M << "<span class='notice'>You have been sent to the Thunderdome.</span>"
|
||||
to_chat(M, "<span class='notice'>You have been sent to the Thunderdome.</span>")
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 2)",admin_key=key_name(usr),ckey=key_name(M))
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 2)", 1)
|
||||
|
||||
@@ -707,17 +707,17 @@
|
||||
|
||||
var/mob/M = locate(href_list["tdomeadmin"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
to_chat(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"
|
||||
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
|
||||
return
|
||||
|
||||
M.Paralyse(5)
|
||||
sleep(5)
|
||||
M.forceMove(pick(tdomeadmin))
|
||||
spawn(50)
|
||||
M << "<span class='notice'>You have been sent to the Thunderdome.</span>"
|
||||
to_chat(M, "<span class='notice'>You have been sent to the Thunderdome.</span>")
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Admin.)",admin_key=key_name(usr),ckey=key_name(M))
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Admin.)", 1)
|
||||
|
||||
@@ -729,10 +729,10 @@
|
||||
|
||||
var/mob/M = locate(href_list["tdomeobserve"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
to_chat(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"
|
||||
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
|
||||
return
|
||||
|
||||
for(var/obj/item/I in M)
|
||||
@@ -746,7 +746,7 @@
|
||||
sleep(5)
|
||||
M.forceMove(pick(tdomeobserve))
|
||||
spawn(50)
|
||||
M << "<span class='notice'>You have been sent to the Thunderdome.</span>"
|
||||
to_chat(M, "<span class='notice'>You have been sent to the Thunderdome.</span>")
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Observer.)",admin_key=key_name(usr),ckey=key_name(M))
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Observer.)", 1)
|
||||
|
||||
@@ -755,7 +755,7 @@
|
||||
|
||||
var/mob/living/L = locate(href_list["revive"])
|
||||
if(!istype(L))
|
||||
usr << "This can only be used on instances of type /mob/living"
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living")
|
||||
return
|
||||
|
||||
if(config.allow_admin_rev)
|
||||
@@ -763,14 +763,14 @@
|
||||
message_admins("<span class='danger'>Admin [key_name_admin(usr)] healed / revived [key_name_admin(L)]!</span>", 1)
|
||||
log_admin("[key_name(usr)] healed / Revived [key_name(L)]",admin_key=key_name(usr),ckey=key_name(L))
|
||||
else
|
||||
usr << "Admin Rejuvinates have been disabled"
|
||||
to_chat(usr, "Admin Rejuvinates have been disabled")
|
||||
|
||||
else if(href_list["makeai"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makeai"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human"
|
||||
to_chat(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>", 1)
|
||||
@@ -782,7 +782,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"
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_slimeize(H)
|
||||
@@ -792,7 +792,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"
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_robotize(H)
|
||||
@@ -802,7 +802,7 @@
|
||||
|
||||
var/mob/M = locate(href_list["makeanimal"])
|
||||
if(istype(M, /mob/abstract/new_player))
|
||||
usr << "This cannot be used on instances of type /mob/abstract/new_player"
|
||||
to_chat(usr, "This cannot be used on instances of type /mob/abstract/new_player")
|
||||
return
|
||||
|
||||
usr.client.cmd_admin_animalize(M)
|
||||
@@ -812,7 +812,7 @@
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["togmutate"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human"
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
||||
return
|
||||
var/block=text2num(href_list["block"])
|
||||
//testing("togmutate([href_list["block"]] -> [block])")
|
||||
@@ -863,7 +863,7 @@
|
||||
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"
|
||||
to_chat(usr, "This can only be used on instances of type /mob")
|
||||
return
|
||||
|
||||
var/location_description = ""
|
||||
@@ -910,19 +910,19 @@
|
||||
if(MALE,FEMALE) gender_description = "[M.gender]"
|
||||
else gender_description = "<font color='red'><b>[M.gender]</b></font>"
|
||||
|
||||
src.owner << "<b>Info about [M.name]:</b> "
|
||||
src.owner << "Mob type = [M.type]; Species = [species_description] Gender = [gender_description] Damage = [health_description]"
|
||||
src.owner << "Name = <b>[M.name]</b>; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = <b>[M.key]</b>;"
|
||||
src.owner << "Location = [location_description];"
|
||||
src.owner << "[special_role_description]"
|
||||
src.owner << "(<a href='?src=\ref[usr];priv_msg=\ref[M]'>PM</a>) (<A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[M]'>VV</A>) (<A HREF='?src=\ref[src];subtlemessage=\ref[M]'>SM</A>) ([admin_jump_link(M, src)]) (<A HREF='?src=\ref[src];secretsadmin=check_antagonist'>CA</A>)"
|
||||
to_chat(src.owner, "<b>Info about [M.name]:</b> ")
|
||||
to_chat(src.owner, "Mob type = [M.type]; Species = [species_description] Gender = [gender_description] Damage = [health_description]")
|
||||
to_chat(src.owner, "Name = <b>[M.name]</b>; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = <b>[M.key]</b>;")
|
||||
to_chat(src.owner, "Location = [location_description];")
|
||||
to_chat(src.owner, "[special_role_description]")
|
||||
to_chat(src.owner, "(<a href='?src=\ref[usr];priv_msg=\ref[M]'>PM</a>) (<A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[M]'>VV</A>) (<A HREF='?src=\ref[src];subtlemessage=\ref[M]'>SM</A>) ([admin_jump_link(M, src)]) (<A HREF='?src=\ref[src];secretsadmin=check_antagonist'>CA</A>)")
|
||||
|
||||
else if(href_list["adminspawncookie"])
|
||||
if(!check_rights(R_ADMIN|R_FUN)) return
|
||||
|
||||
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"
|
||||
to_chat(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 )
|
||||
@@ -939,28 +939,28 @@
|
||||
log_admin("[key_name(H)] got their cookie, spawned by [key_name(src.owner)]",admin_key=key_name(src.owner),ckey=key_name(H))
|
||||
message_admins("[key_name(H)] got their cookie, spawned by [key_name(src.owner)]")
|
||||
feedback_inc("admin_cookies_spawned",1)
|
||||
H << "<span class='notice'>Your prayers have been answered!! You received the <b>best cookie</b>!</span>"
|
||||
to_chat(H, "<span class='notice'>Your prayers have been answered!! You received the <b>best cookie</b>!</span>")
|
||||
|
||||
else if(href_list["BlueSpaceArtillery"])
|
||||
if(!check_rights(R_ADMIN|R_FUN)) return
|
||||
|
||||
var/mob/living/M = locate(href_list["BlueSpaceArtillery"])
|
||||
if(!isliving(M))
|
||||
usr << "This can only be used on instances of type /mob/living"
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living")
|
||||
return
|
||||
|
||||
if(alert(src.owner, "Are you sure you wish to hit [key_name(M)] with Blue Space Artillery?", "Confirm Firing?" , "Yes" , "No") != "Yes")
|
||||
return
|
||||
|
||||
if(BSACooldown)
|
||||
src.owner << "Standby! Reload cycle in progress! Gunnary crews ready in five seconds!"
|
||||
to_chat(src.owner, "Standby! Reload cycle in progress! Gunnary crews ready in five seconds!")
|
||||
return
|
||||
|
||||
BSACooldown = 1
|
||||
spawn(50)
|
||||
BSACooldown = 0
|
||||
|
||||
M << "You've been hit by bluespace artillery!"
|
||||
to_chat(M, "You've been hit by bluespace artillery!")
|
||||
log_admin("[key_name(M)] has been hit by Bluespace Artillery fired by [src.owner]",admin_key=key_name(src.owner),ckey=key_name(M))
|
||||
message_admins("[key_name_admin(M)] has been hit by Bluespace Artillery fired by [src.owner]")
|
||||
|
||||
@@ -987,41 +987,41 @@
|
||||
else if(href_list["CentcommReply"])
|
||||
var/mob/living/L = locate(href_list["CentcommReply"])
|
||||
if(!istype(L))
|
||||
usr << "This can only be used on instances of type /mob/living/"
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/")
|
||||
return
|
||||
|
||||
if(L.can_centcom_reply())
|
||||
var/input = sanitize(input(src.owner, "Please enter a message to reply to [key_name(L)] via their headset.","Outgoing message from Centcomm", ""))
|
||||
if(!input) return
|
||||
|
||||
src.owner << "You sent [input] to [L] via a secure channel."
|
||||
to_chat(src.owner, "You sent [input] to [L] via a secure channel.")
|
||||
log_admin("[src.owner] replied to [key_name(L)]'s Centcomm message with the message [input].",admin_key=key_name(src.owner),ckey=key_name(L))
|
||||
message_admins("[src.owner] replied to [key_name(L)]'s Centcom message with: \"[input]\"")
|
||||
if(!isAI(L))
|
||||
L << "<span class='info'>You hear something crackle in your headset for a moment before a voice speaks.</span>"
|
||||
L << "<span class='info'>Please stand by for a message from Central Command.</span>"
|
||||
L << "<span class='info'>Message as follows.</span>"
|
||||
L << "<span class='notice'>[input]</span>"
|
||||
L << "<span class='info'>Message ends.</span>"
|
||||
to_chat(L, "<span class='info'>You hear something crackle in your headset for a moment before a voice speaks.</span>")
|
||||
to_chat(L, "<span class='info'>Please stand by for a message from Central Command.</span>")
|
||||
to_chat(L, "<span class='info'>Message as follows.</span>")
|
||||
to_chat(L, "<span class='notice'>[input]</span>")
|
||||
to_chat(L, "<span class='info'>Message ends.</span>")
|
||||
else
|
||||
src.owner << "The person you are trying to contact does not have functional radio equipment."
|
||||
to_chat(src.owner, "The person you are trying to contact does not have functional radio equipment.")
|
||||
|
||||
|
||||
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"
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
||||
return
|
||||
if(!istype(H.l_ear, /obj/item/device/radio/headset) && !istype(H.r_ear, /obj/item/device/radio/headset))
|
||||
usr << "The person you are trying to contact is not wearing a headset"
|
||||
to_chat(usr, "The person you are trying to contact is not wearing a headset")
|
||||
return
|
||||
|
||||
var/input = sanitize(input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from a shadowy figure...", ""))
|
||||
if(!input) return
|
||||
|
||||
src.owner << "You sent [input] to [H] via a secure channel."
|
||||
to_chat(src.owner, "You sent [input] to [H] via a secure channel.")
|
||||
log_admin("[src.owner] replied to [key_name(H)]'s illegal message with the message [input].", admin_key=key_name(src.owner), ckey=key_name(H))
|
||||
H << "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from your benefactor. Message as follows, agent. <b>\"[input]\"</b> Message ends.\""
|
||||
to_chat(H, "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from your benefactor. Message as follows, agent. <b>\"[input]\"</b> Message ends.\"")
|
||||
|
||||
else if(href_list["AdminFaxView"])
|
||||
var/obj/item/fax = locate(href_list["AdminFaxView"])
|
||||
@@ -1043,7 +1043,7 @@
|
||||
|
||||
usr << browse(data, "window=[B.name]")
|
||||
else
|
||||
usr << "<span class='warning'>The faxed item is not viewable. This is probably a bug, and should be reported on the tracker: [fax.type]</span>"
|
||||
to_chat(usr, "<span class='warning'>The faxed item is not viewable. This is probably a bug, and should be reported on the tracker: [fax.type]</span>")
|
||||
|
||||
else if (href_list["AdminFaxViewPage"])
|
||||
var/page = text2num(href_list["AdminFaxViewPage"])
|
||||
@@ -1108,11 +1108,11 @@
|
||||
P.overlays += stampoverlay
|
||||
P.stamps += "<HR><i>This paper has been stamped and encrypted by the Sol Government Quantum Relay.</i>"
|
||||
|
||||
src.owner << "Message reply to transmitted successfully."
|
||||
to_chat(src.owner, "Message reply to transmitted successfully.")
|
||||
log_admin("[key_name(src.owner)] replied to a fax message from [key_name(H)]: [input]")
|
||||
message_admins("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(H)]", 1)
|
||||
return
|
||||
src.owner << "/red Unable to locate fax!"
|
||||
to_chat(src.owner, "/red Unable to locate fax!")
|
||||
*/
|
||||
|
||||
|
||||
@@ -1157,7 +1157,7 @@
|
||||
|
||||
var/mob/M = locate(href_list["traitor"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be used on instances of type /mob."
|
||||
to_chat(usr, "This can only be used on instances of type /mob.")
|
||||
return
|
||||
show_traitor_panel(M)
|
||||
|
||||
@@ -1177,7 +1177,7 @@
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
if(!config.allow_admin_spawning)
|
||||
usr << "Spawning of items is not allowed."
|
||||
to_chat(usr, "Spawning of items is not allowed.")
|
||||
return
|
||||
|
||||
var/atom/loc = usr.loc
|
||||
@@ -1237,24 +1237,24 @@
|
||||
where = "onfloor"
|
||||
|
||||
if( where == "inhand" )
|
||||
usr << "Support for inhand not available yet. Will spawn on floor."
|
||||
to_chat(usr, "Support for inhand not available yet. Will spawn on floor.")
|
||||
where = "onfloor"
|
||||
|
||||
if ( where == "inhand" ) //Can only give when human or monkey
|
||||
if ( !( ishuman(usr) || issmall(usr) ) )
|
||||
usr << "Can only spawn in hand when you're a human or a monkey."
|
||||
to_chat(usr, "Can only spawn in hand when you're a human or a monkey.")
|
||||
where = "onfloor"
|
||||
else if ( usr.get_active_hand() )
|
||||
usr << "Your active hand is full. Spawning on floor."
|
||||
to_chat(usr, "Your active hand is full. Spawning on floor.")
|
||||
where = "onfloor"
|
||||
|
||||
if ( where == "inmarked" )
|
||||
if ( !marked_datum )
|
||||
usr << "You don't have any object marked. Abandoning spawn."
|
||||
to_chat(usr, "You don't have any object marked. Abandoning spawn.")
|
||||
return
|
||||
else
|
||||
if ( !istype(marked_datum,/atom) )
|
||||
usr << "The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn."
|
||||
to_chat(usr, "The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn.")
|
||||
return
|
||||
|
||||
var/atom/target //Where the object will be spawned
|
||||
@@ -1565,17 +1565,17 @@
|
||||
if(check_rights(R_SPAWN))
|
||||
var/mob/M = locate(href_list["toglang"])
|
||||
if(!istype(M))
|
||||
usr << "[M] is illegal type, must be /mob!"
|
||||
to_chat(usr, "[M] is illegal type, must be /mob!")
|
||||
return
|
||||
var/lang2toggle = href_list["lang"]
|
||||
var/datum/language/L = all_languages[lang2toggle]
|
||||
|
||||
if(L in M.languages)
|
||||
if(!M.remove_language(lang2toggle))
|
||||
usr << "Failed to remove language '[lang2toggle]' from \the [M]!"
|
||||
to_chat(usr, "Failed to remove language '[lang2toggle]' from \the [M]!")
|
||||
else
|
||||
if(!M.add_language(lang2toggle))
|
||||
usr << "Failed to add language '[lang2toggle]' from \the [M]!"
|
||||
to_chat(usr, "Failed to add language '[lang2toggle]' from \the [M]!")
|
||||
|
||||
show_player_panel(M)
|
||||
|
||||
@@ -1649,7 +1649,7 @@
|
||||
|
||||
var/mob/M = locate(href_list["admin_wind_player"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
to_chat(usr, "This can only be used on instances of type /mob")
|
||||
return
|
||||
|
||||
paralyze_mob(M)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
if(text)
|
||||
var/F = file("broken_icons.txt")
|
||||
fdel(F)
|
||||
F << text
|
||||
to_chat(F, text)
|
||||
to_world("Completeled successfully and written to [F]")
|
||||
|
||||
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
|
||||
if(query_list.len < 2)
|
||||
if(query_list.len > 0)
|
||||
usr << "<span class='warning'>SDQL: Too few discrete tokens in query \"[query_text]\". Please check your syntax and try again.</span>"
|
||||
to_chat(usr, "<span class='warning'>SDQL: Too few discrete tokens in query \"[query_text]\". Please check your syntax and try again.</span>")
|
||||
return
|
||||
|
||||
if(!(lowertext(query_list[1]) in list("select", "delete", "update")))
|
||||
usr << "<span class='warning'>SDQL: Unknown query type: \"[query_list[1]]\" in query \"[query_text]\". Please check your syntax and try again.</span>"
|
||||
to_chat(usr, "<span class='warning'>SDQL: Unknown query type: \"[query_list[1]]\" in query \"[query_text]\". Please check your syntax and try again.</span>")
|
||||
return
|
||||
|
||||
var/list/types = list()
|
||||
@@ -56,7 +56,7 @@
|
||||
set_vars[query_list[i]] = query_list[i + 2]
|
||||
|
||||
else
|
||||
usr << "<span class='warning'>SDQL: Invalid set parameter in query \"[query_text]\". Please check your syntax and try again.</span>"
|
||||
to_chat(usr, "<span class='warning'>SDQL: Invalid set parameter in query \"[query_text]\". Please check your syntax and try again.</span>")
|
||||
return
|
||||
|
||||
i += 3
|
||||
@@ -65,7 +65,7 @@
|
||||
break
|
||||
|
||||
if(set_vars.len < 1)
|
||||
usr << "<span class='warning'>SDQL: Invalid or missing set in query \"[query_text]\". Please check your syntax and try again.</span>"
|
||||
to_chat(usr, "<span class='warning'>SDQL: Invalid or missing set in query \"[query_text]\". Please check your syntax and try again.</span>")
|
||||
return
|
||||
|
||||
var/list/where = list()
|
||||
@@ -215,7 +215,7 @@
|
||||
var/v = where[i++]
|
||||
var/compare_op = where[i++]
|
||||
if(!(compare_op in list("==", "=", "<>", "<", ">", "<=", ">=", "!=")))
|
||||
usr << "<span class='warning'>SDQL: Unknown comparison operator [compare_op] in where clause following [v] in query \"[query_text]\". Please check your syntax and try again.</span>"
|
||||
to_chat(usr, "<span class='warning'>SDQL: Unknown comparison operator [compare_op] in where clause following [v] in query \"[query_text]\". Please check your syntax and try again.</span>")
|
||||
return
|
||||
|
||||
var/j
|
||||
@@ -262,32 +262,32 @@
|
||||
|
||||
|
||||
|
||||
usr << "<span class='notice'>SQDL Query: [query_text]</span>"
|
||||
to_chat(usr, "<span class='notice'>SQDL Query: [query_text]</span>")
|
||||
message_admins("[usr] executed SDQL query: \"[query_text]\".")
|
||||
/*
|
||||
for(var/t in types)
|
||||
usr << "Type: [t]"
|
||||
to_chat(usr, "Type: [t]")
|
||||
|
||||
for(var/t in from)
|
||||
usr << "From: [t]"
|
||||
to_chat(usr, "From: [t]")
|
||||
|
||||
for(var/t in set_vars)
|
||||
usr << "Set: [t] = [set_vars[t]]"
|
||||
to_chat(usr, "Set: [t] = [set_vars[t]]")
|
||||
|
||||
if(where.len)
|
||||
var/where_str = ""
|
||||
for(var/t in where)
|
||||
where_str += "[t] "
|
||||
|
||||
usr << "Where: [where_str]"
|
||||
to_chat(usr, "Where: [where_str]")
|
||||
|
||||
usr << "From objects:"
|
||||
to_chat(usr, "From objects:")
|
||||
for(var/datum/t in from_objs)
|
||||
usr << t
|
||||
to_chat(usr, t)
|
||||
|
||||
usr << "Objects:"
|
||||
to_chat(usr, "Objects:")
|
||||
for(var/datum/t in objs)
|
||||
usr << t
|
||||
to_chat(usr, t)
|
||||
*/
|
||||
switch(lowertext(query_list[1]))
|
||||
if("delete")
|
||||
@@ -349,7 +349,7 @@
|
||||
|
||||
|
||||
else
|
||||
usr << "<span class='warning'>SDQL: Sorry, equations not yet supported :(</span>"
|
||||
to_chat(usr, "<span class='warning'>SDQL: Sorry, equations not yet supported :(</span>")
|
||||
return null
|
||||
|
||||
|
||||
@@ -434,7 +434,7 @@
|
||||
|
||||
else if(char == "'")
|
||||
if(word != "")
|
||||
usr << "<span class='warning'>SDQL: You have an error in your SDQL syntax, unexpected ' in query: \"<font color=gray>[query_text]</font>\" following \"<font color=gray>[word]</font>\". Please check your syntax, and try again.</span>"
|
||||
to_chat(usr, "<span class='warning'>SDQL: You have an error in your SDQL syntax, unexpected ' in query: \"<font color=gray>[query_text]</font>\" following \"<font color=gray>[word]</font>\". Please check your syntax, and try again.</span>")
|
||||
return null
|
||||
|
||||
word = "'"
|
||||
@@ -454,7 +454,7 @@
|
||||
word += char
|
||||
|
||||
if(i > len)
|
||||
usr << "<span class='warning'>SDQL: You have an error in your SDQL syntax, unmatched ' in query: \"<font color=gray>[query_text]</font>\". Please check your syntax, and try again.</span>"
|
||||
to_chat(usr, "<span class='warning'>SDQL: You have an error in your SDQL syntax, unmatched ' in query: \"<font color=gray>[query_text]</font>\". Please check your syntax, and try again.</span>")
|
||||
return null
|
||||
|
||||
query_list += "[word]'"
|
||||
@@ -462,7 +462,7 @@
|
||||
|
||||
else if(char == "\"")
|
||||
if(word != "")
|
||||
usr << "<span class='warning'>SDQL: You have an error in your SDQL syntax, unexpected \" in query: \"<font color=gray>[query_text]</font>\" following \"<font color=gray>[word]</font>\". Please check your syntax, and try again.</span>"
|
||||
to_chat(usr, "<span class='warning'>SDQL: You have an error in your SDQL syntax, unexpected \" in query: \"<font color=gray>[query_text]</font>\" following \"<font color=gray>[word]</font>\". Please check your syntax, and try again.</span>")
|
||||
return null
|
||||
|
||||
word = "\""
|
||||
@@ -482,7 +482,7 @@
|
||||
word += char
|
||||
|
||||
if(i > len)
|
||||
usr << "<span class='danger'>SDQL: You have an error in your SDQL syntax, unmatched \" in query: \"<font color=gray>[query_text]</font>\". Please check your syntax, and try again.</span>"
|
||||
to_chat(usr, "<span class='danger'>SDQL: You have an error in your SDQL syntax, unmatched \" in query: \"<font color=gray>[query_text]</font>\". Please check your syntax, and try again.</span>")
|
||||
return null
|
||||
|
||||
query_list += "[word]\""
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
if(SDQL_expression(d, query_tree["where"]))
|
||||
objs += d
|
||||
|
||||
//usr << "Query: [query_text]"
|
||||
//to_chat(usr, "Query: [query_text]")
|
||||
message_admins("[usr] executed SDQL query: \"[query_text]\".")
|
||||
|
||||
switch(query_tree[1])
|
||||
@@ -256,7 +256,7 @@
|
||||
if("or", "||")
|
||||
result = (result || val)
|
||||
else
|
||||
usr << "<span class='warning'>SDQL2: Unknown op [op]</span>"
|
||||
to_chat(usr, "<span class='warning'>SDQL2: Unknown op [op]</span>")
|
||||
result = null
|
||||
else
|
||||
result = val
|
||||
@@ -361,7 +361,7 @@
|
||||
|
||||
else if(char == "'")
|
||||
if(word != "")
|
||||
usr << "<span class='warning'>SDQL2: You have an error in your SDQL syntax, unexpected ' in query: \"<font color=gray>[query_text]</font>\" following \"<font color=gray>[word]</font>\". Please check your syntax, and try again.</span>"
|
||||
to_chat(usr, "<span class='warning'>SDQL2: You have an error in your SDQL syntax, unexpected ' in query: \"<font color=gray>[query_text]</font>\" following \"<font color=gray>[word]</font>\". Please check your syntax, and try again.</span>")
|
||||
return null
|
||||
|
||||
word = "'"
|
||||
@@ -381,7 +381,7 @@
|
||||
word += char
|
||||
|
||||
if(i > len)
|
||||
usr << "<span class='warning'>SDQL2: You have an error in your SDQL syntax, unmatched ' in query: \"<font color=gray>[query_text]</font>\". Please check your syntax, and try again.</span>"
|
||||
to_chat(usr, "<span class='warning'>SDQL2: You have an error in your SDQL syntax, unmatched ' in query: \"<font color=gray>[query_text]</font>\". Please check your syntax, and try again.</span>")
|
||||
return null
|
||||
|
||||
query_list += "[word]'"
|
||||
@@ -389,7 +389,7 @@
|
||||
|
||||
else if(char == "\"")
|
||||
if(word != "")
|
||||
usr << "<span class='warning'>SDQL2: You have an error in your SDQL syntax, unexpected \" in query: \"<font color=gray>[query_text]</font>\" following \"<font color=gray>[word]</font>\". Please check your syntax, and try again.</span>"
|
||||
to_chat(usr, "<span class='warning'>SDQL2: You have an error in your SDQL syntax, unexpected \" in query: \"<font color=gray>[query_text]</font>\" following \"<font color=gray>[word]</font>\". Please check your syntax, and try again.</span>")
|
||||
return null
|
||||
|
||||
word = "\""
|
||||
@@ -409,7 +409,7 @@
|
||||
word += char
|
||||
|
||||
if(i > len)
|
||||
usr << "<span class='warning'>SDQL2: You have an error in your SDQL syntax, unmatched \" in query: \"<font color=gray>[query_text]</font>\". Please check your syntax, and try again.</span>"
|
||||
to_chat(usr, "<span class='warning'>SDQL2: You have an error in your SDQL syntax, unmatched \" in query: \"<font color=gray>[query_text]</font>\". Please check your syntax, and try again.</span>")
|
||||
return null
|
||||
|
||||
query_list += "[word]\""
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
/datum/SDQL_parser/proc/parse_error(error_message)
|
||||
error = 1
|
||||
usr << "<span class='warning'>SQDL2 Parsing Error: [error_message]</span>"
|
||||
to_chat(usr, "<span class='warning'>SQDL2 Parsing Error: [error_message]</span>")
|
||||
return query.len + 1
|
||||
|
||||
/datum/SDQL_parser/proc/parse()
|
||||
|
||||
@@ -67,12 +67,12 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
set name = "Adminhelp"
|
||||
|
||||
if(say_disabled) //This is here to try to identify lag problems
|
||||
usr << "<span class='warning'>Speech is currently admin-disabled.</span>"
|
||||
to_chat(usr, "<span class='warning'>Speech is currently admin-disabled.</span>")
|
||||
return
|
||||
|
||||
//handle muting and automuting
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
src << "<font color='red'>Error: Admin-PM: You cannot send adminhelps (Muted).</font>"
|
||||
to_chat(src, "<font color='red'>Error: Admin-PM: You cannot send adminhelps (Muted).</font>")
|
||||
return
|
||||
|
||||
adminhelped = ADMINHELPED
|
||||
@@ -127,12 +127,12 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
if(X.is_afk())
|
||||
admin_number_afk++
|
||||
if(X.prefs.toggles & SOUND_ADMINHELP)
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
sound_to(X, 'sound/effects/adminhelp.ogg')
|
||||
|
||||
X << msg
|
||||
to_chat(X, msg)
|
||||
|
||||
//show it to the person adminhelping too
|
||||
src << "<font color='blue'>PM to-<b>Staff </b>: [original_msg]</font>"
|
||||
to_chat(src, "<font color='blue'>PM to-<b>Staff </b>: [original_msg]</font>")
|
||||
|
||||
var/admin_number_active = admin_number_present - admin_number_afk
|
||||
log_admin("HELP: [key_name(src)]: [original_msg] - heard by [admin_number_present] non-AFK admins.",admin_key=key_name(src))
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
A.on_mob_jump()
|
||||
A.forceMove(T)
|
||||
else
|
||||
A << "This mob is not located in the game world."
|
||||
to_chat(A, "This mob is not located in the game world.")
|
||||
else
|
||||
alert("Admin jumping disabled")
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
keys += M.client
|
||||
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
|
||||
if(!selection)
|
||||
src << "No keys found."
|
||||
to_chat(src, "No keys found.")
|
||||
return
|
||||
var/mob/M = selection:mob
|
||||
log_admin("[key_name(usr)] jumped to [key_name(M)]",admin_key=key_name(usr),ckey=key_name(M))
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
set category = null
|
||||
set name = "Admin PM Mob"
|
||||
if(!holder)
|
||||
src << "<font color='red'>Error: Admin-PM-Context: Only administrators may use this command.</font>"
|
||||
to_chat(src, "<font color='red'>Error: Admin-PM-Context: Only administrators may use this command.</font>")
|
||||
return
|
||||
if( !ismob(M) || !M.client ) return
|
||||
cmd_admin_pm(M.client,null)
|
||||
@@ -14,7 +14,7 @@
|
||||
set category = "Admin"
|
||||
set name = "Admin PM"
|
||||
if(!holder)
|
||||
src << "<font color='red'>Error: Admin-PM-Panel: Only administrators may use this command.</font>"
|
||||
to_chat(src, "<font color='red'>Error: Admin-PM-Panel: Only administrators may use this command.</font>")
|
||||
return
|
||||
var/list/client/targets[0]
|
||||
for(var/client/T)
|
||||
@@ -38,12 +38,12 @@
|
||||
|
||||
/client/proc/cmd_admin_pm(var/client/C, var/msg = null, var/datum/ticket/ticket = null)
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
src << "<font color='red'>Error: Private-Message: You are unable to use PM-s (muted).</font>"
|
||||
to_chat(src, "<font color='red'>Error: Private-Message: You are unable to use PM-s (muted).</font>")
|
||||
return
|
||||
|
||||
if(!istype(C,/client))
|
||||
if(holder) src << "<font color='red'>Error: Private-Message: Client not found.</font>"
|
||||
else src << "<font color='red'>Error: Private-Message: Client not found. They may have lost connection, so try using an adminhelp!</font>"
|
||||
if(holder) to_chat(src, "<font color='red'>Error: Private-Message: Client not found.</font>")
|
||||
else to_chat(src, "<font color='red'>Error: Private-Message: Client not found. They may have lost connection, so try using an adminhelp!</font>")
|
||||
return
|
||||
|
||||
var/receive_pm_type = "Player"
|
||||
@@ -56,7 +56,7 @@
|
||||
receive_pm_type = holder.rank
|
||||
|
||||
else if(!C.holder)
|
||||
src << "<span class='warning'>Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.</span>"
|
||||
to_chat(src, "<span class='warning'>Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.</span>")
|
||||
return
|
||||
|
||||
//get message text, limit it's length.and clean/escape html
|
||||
@@ -67,9 +67,9 @@
|
||||
return
|
||||
if(!C)
|
||||
if(holder)
|
||||
src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
|
||||
to_chat(src, "<font color='red'>Error: Admin-PM: Client not found.</font>")
|
||||
else
|
||||
src << "<font color='red'>Error: Private-Message: Client not found. They may have lost connection, so try using an adminhelp!</font>"
|
||||
to_chat(src, "<font color='red'>Error: Private-Message: Client not found. They may have lost connection, so try using an adminhelp!</font>")
|
||||
return
|
||||
|
||||
if(!check_rights(R_SERVER|R_DEBUG|R_DEV, 0))
|
||||
@@ -94,10 +94,10 @@
|
||||
ticket = new /datum/ticket(C.ckey)
|
||||
ticket.take(src)
|
||||
else
|
||||
src << "<span class='notice'>You do not have an open ticket. Please use the adminhelp verb to open a ticket.</span>"
|
||||
to_chat(src, "<span class='notice'>You do not have an open ticket. Please use the adminhelp verb to open a ticket.</span>")
|
||||
return
|
||||
else if(ticket.status != TICKET_ASSIGNED && src.ckey == ticket.owner)
|
||||
src << "<span class='notice'>Your ticket is not open for conversation. Please wait for an administrator to receive your adminhelp.</span>"
|
||||
to_chat(src, "<span class='notice'>Your ticket is not open for conversation. Please wait for an administrator to receive your adminhelp.</span>")
|
||||
return
|
||||
|
||||
// if the sender is an admin and they're not assigned to the ticket, ask them if they want to take/join it, unless the admin is responding to their own ticket
|
||||
@@ -110,7 +110,7 @@
|
||||
if(holder && !C.holder)
|
||||
receive_message = "<span class='pm'><span class='howto'><b>-- Click the [receive_pm_type]'s name to reply --</b></span></span>\n"
|
||||
if(C.adminhelped)
|
||||
C << receive_message
|
||||
to_chat(C, receive_message)
|
||||
C.adminhelped = NOT_ADMINHELPED
|
||||
|
||||
//AdminPM popup for ApocStation and anybody else who wants to use it. Set it with POPUP_ADMIN_PM in config.txt ~Carn
|
||||
@@ -133,7 +133,7 @@
|
||||
else
|
||||
sender_message += ": <span class='message'>[msg]</span>"
|
||||
sender_message += "</span></span>"
|
||||
src << sender_message
|
||||
to_chat(src, sender_message)
|
||||
|
||||
var/receiver_message = "<span class='pm'><span class='in'>" + create_text_tag("pm_in", "", C) + " <b>\[[receive_pm_type] PM\]</b> <span class='name'>[get_options_bar(src, C.holder ? 1 : 0, C.holder ? 1 : 0, 1)]</span>"
|
||||
if(C.holder)
|
||||
@@ -142,12 +142,12 @@
|
||||
else
|
||||
receiver_message += ": <span class='message'>[msg]</span>"
|
||||
receiver_message += "</span></span>"
|
||||
C << receiver_message
|
||||
to_chat(C, receiver_message)
|
||||
|
||||
//play the recieving admin the adminhelp sound (if they have them enabled)
|
||||
//non-admins shouldn't be able to disable this
|
||||
if(C.prefs && C.prefs.toggles & SOUND_ADMINHELP)
|
||||
C << 'sound/effects/adminhelp.ogg'
|
||||
sound_to(C, 'sound/effects/adminhelp.ogg')
|
||||
|
||||
log_admin("PM: [key_name(src)]->[key_name(C)]: [msg]", admin_key = key_name(src), ckey_target = key_name(C))
|
||||
|
||||
@@ -159,11 +159,11 @@
|
||||
if(X == C || X == src)
|
||||
continue
|
||||
if(X.key != key && X.key != C.key && (X.holder.rights & (R_ADMIN|R_MOD)))
|
||||
X << "<span class='pm'><span class='other'>" + create_text_tag("pm_other", "PM:", X) + " <span class='name'>[key_name(src, X, 0, ticket)]</span> to <span class='name'>[key_name(C, X, 0, ticket)]</span> (<a href='?_src_=holder;take_ticket=\ref[ticket]'>[(ticket.status == TICKET_OPEN) ? "TAKE" : "JOIN"]</a>) (<a href='?src=\ref[usr];close_ticket=\ref[ticket]'>CLOSE</a>): <span class='message'>[msg]</span></span></span>"
|
||||
to_chat(X, "<span class='pm'><span class='other'>" + create_text_tag("pm_other", "PM:", X) + " <span class='name'>[key_name(src, X, 0, ticket)]</span> to <span class='name'>[key_name(C, X, 0, ticket)]</span> (<a href='?_src_=holder;take_ticket=\ref[ticket]'>[(ticket.status == TICKET_OPEN) ? "TAKE" : "JOIN"]</a>) (<a href='?src=\ref[usr];close_ticket=\ref[ticket]'>CLOSE</a>): <span class='message'>[msg]</span></span></span>")
|
||||
|
||||
/client/proc/cmd_admin_discord_pm(sender)
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
src << "<font color='red'>Error: Private-Message: You are unable to use PM-s (muted).</font>"
|
||||
to_chat(src, "<font color='red'>Error: Private-Message: You are unable to use PM-s (muted).</font>")
|
||||
return
|
||||
|
||||
var/msg = input(src,"Message:", "Reply private message to [sender] on Discord") as text|null
|
||||
@@ -176,11 +176,11 @@
|
||||
post_webhook_event(WEBHOOK_ADMIN_PM, list("title"="Help is requested", "message"="PlayerPM to **[sender]** from **[key_name(src)]**: ```[html_decode(msg)]```"))
|
||||
discord_bot.send_to_admins("PlayerPM to [sender] from [key_name(src)]: [html_decode(msg)]")
|
||||
|
||||
src << "<span class='pm'><span class='out'>" + create_text_tag("pm_out_alt", "", src) + " to <span class='name'>Discord-[sender]</span>: <span class='message'>[msg]</span></span></span>"
|
||||
to_chat(src, "<span class='pm'><span class='out'>" + create_text_tag("pm_out_alt", "", src) + " to <span class='name'>Discord-[sender]</span>: <span class='message'>[msg]</span></span></span>")
|
||||
|
||||
log_admin("PM: [key_name(src)]->Discord-[sender]: [msg]")
|
||||
for(var/client/X in admins)
|
||||
if(X == src)
|
||||
continue
|
||||
if(X.holder.rights & (R_ADMIN|R_MOD))
|
||||
X << "<span class='pm'><span class='other'>" + create_text_tag("pm_other", "PM:", X) + " <span class='name'>[key_name(src, X, 0)]</span> to <span class='name'>Discord-[sender]</span>: <span class='message'>[msg]</span></span></span>"
|
||||
to_chat(X, "<span class='pm'><span class='other'>" + create_text_tag("pm_other", "PM:", X) + " <span class='name'>[key_name(src, X, 0)]</span> to <span class='name'>Discord-[sender]</span>: <span class='message'>[msg]</span></span></span>")
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
if(check_rights(R_ADMIN,0))
|
||||
for(var/client/C in admins)
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
C << "<span class='admin_channel'>" + create_text_tag("admin", "ADMIN:", C) + " <span class='name'>[key_name(usr, 1)]</span>([admin_jump_link(mob, src)]): <span class='message'>[msg]</span></span>"
|
||||
to_chat(C, "<span class='admin_channel'>" + create_text_tag("admin", "ADMIN:", C) + " <span class='name'>[key_name(usr, 1)]</span>([admin_jump_link(mob, src)]): <span class='message'>[msg]</span></span>")
|
||||
|
||||
feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
sender_name = "<span class='admin'>[sender_name]</span>"
|
||||
for(var/client/C in admins)
|
||||
if ((R_ADMIN|R_MOD) & C.holder.rights)
|
||||
C << "<span class='mod_channel'>" + create_text_tag("mod", "MOD:", C) + " <span class='name'>[sender_name]</span>(<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
|
||||
to_chat(C, "<span class='mod_channel'>" + create_text_tag("mod", "MOD:", C) + " <span class='name'>[sender_name]</span>(<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>")
|
||||
|
||||
feedback_add_details("admin_verb","MS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
msg = "<span class='devsay'><span class='prefix'>DEV:</span> <EM>[key_name(usr, 0, 1, 0)]</EM>: <span class='message'>[msg]</span></span>"
|
||||
for(var/client/C in admins)
|
||||
if(C.holder.rights & (R_ADMIN|R_DEV))
|
||||
C << msg
|
||||
to_chat(C, msg)
|
||||
|
||||
/client/proc/cmd_cciaa_say(msg as text)
|
||||
set category = "Special Verbs"
|
||||
@@ -72,4 +72,4 @@
|
||||
msg = "<span class='cciaasay'><span class='prefix'>CCIAAgent:</span> <EM>[key_name(usr, 0, 1, 0)]</EM>: <span class='message'>[msg]</span></span>"
|
||||
for(var/client/C in admins)
|
||||
if(C.holder.rights & (R_ADMIN|R_CCIAA))
|
||||
C << msg
|
||||
to_chat(C, msg)
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
set desc = "Antagonist OOC"
|
||||
|
||||
if (istype(src.mob, /mob/abstract/observer) && !check_rights(R_ADMIN|R_MOD|R_CCIAA, 0))
|
||||
src << "<span class='warning'>You cannot use AOOC while ghosting/observing!</span>"
|
||||
to_chat(src, "<span class='warning'>You cannot use AOOC while ghosting/observing!</span>")
|
||||
return
|
||||
|
||||
if (src.prefs.muted & MUTE_AOOC)
|
||||
src << "<span class='warning'>You are muted from speaking on AOOC!</span>"
|
||||
to_chat(src, "<span class='warning'>You are muted from speaking on AOOC!</span>")
|
||||
return
|
||||
|
||||
msg = sanitize(msg)
|
||||
@@ -23,9 +23,9 @@
|
||||
|
||||
for(var/mob/M in mob_list)
|
||||
if (check_rights(R_ADMIN|R_MOD|R_CCIAA, 0, M))
|
||||
M << "<font color='#960018'><span class='ooc'>" + create_text_tag("aooc", "Antag-OOC:", M.client) + " <EM>[get_options_bar(src, 0, 1, 1)](<A HREF='?_src_=holder;adminplayerobservejump=\ref[src.mob]'>JMP</A>):</EM> <span class='message'>[msg]</span></span></font>"
|
||||
to_chat(M, "<font color='#960018'><span class='ooc'>" + create_text_tag("aooc", "Antag-OOC:", M.client) + " <EM>[get_options_bar(src, 0, 1, 1)](<A HREF='?_src_=holder;adminplayerobservejump=\ref[src.mob]'>JMP</A>):</EM> <span class='message'>[msg]</span></span></font>")
|
||||
else if (M.mind && M.mind.special_role && M.client)
|
||||
M << "<font color='#960018'><span class='ooc'>" + create_text_tag("aooc", "Antag-OOC:", M.client) + " <EM>[display_name]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||
to_chat(M, "<font color='#960018'><span class='ooc'>" + create_text_tag("aooc", "Antag-OOC:", M.client) + " <EM>[display_name]:</EM> <span class='message'>[msg]</span></span></font>")
|
||||
|
||||
log_ooc("(ANTAG) [key] : [msg]",ckey=key_name(mob))
|
||||
|
||||
|
||||
@@ -3,30 +3,30 @@
|
||||
set name = "Check Piping"
|
||||
set background = 1
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
feedback_add_details("admin_verb","CP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
if(alert("WARNING: This command should not be run on a live server. Do you want to continue?", "Check Piping", "No", "Yes") == "No")
|
||||
return
|
||||
|
||||
usr << "Checking for disconnected pipes..."
|
||||
to_chat(usr, "Checking for disconnected pipes...")
|
||||
//all plumbing - yes, some things might get stated twice, doesn't matter.
|
||||
for (var/obj/machinery/atmospherics/plumbing in world)
|
||||
if (plumbing.nodealert)
|
||||
usr << "Unconnected [plumbing.name] located at [plumbing.x],[plumbing.y],[plumbing.z] ([get_area(plumbing.loc)])"
|
||||
to_chat(usr, "Unconnected [plumbing.name] located at [plumbing.x],[plumbing.y],[plumbing.z] ([get_area(plumbing.loc)])")
|
||||
|
||||
//Manifolds
|
||||
for (var/obj/machinery/atmospherics/pipe/manifold/pipe in world)
|
||||
if (!pipe.node1 || !pipe.node2 || !pipe.node3)
|
||||
usr << "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])"
|
||||
to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
|
||||
|
||||
//Pipes
|
||||
for (var/obj/machinery/atmospherics/pipe/simple/pipe in world)
|
||||
if (!pipe.node1 || !pipe.node2)
|
||||
usr << "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])"
|
||||
to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
|
||||
|
||||
usr << "Checking for overlapping pipes..."
|
||||
to_chat(usr, "Checking for overlapping pipes...")
|
||||
next_turf:
|
||||
for(var/turf/T in turfs)
|
||||
for(var/dir in cardinal)
|
||||
@@ -36,15 +36,15 @@
|
||||
for(var/connect_type in pipe.connect_types)
|
||||
connect_types[connect_type] += 1
|
||||
if(connect_types[1] > 1 || connect_types[2] > 1 || connect_types[3] > 1)
|
||||
usr << "Overlapping pipe ([pipe.name]) located at [T.x],[T.y],[T.z] ([get_area(T)])"
|
||||
to_chat(usr, "Overlapping pipe ([pipe.name]) located at [T.x],[T.y],[T.z] ([get_area(T)])")
|
||||
continue next_turf
|
||||
usr << "Done"
|
||||
to_chat(usr, "Done")
|
||||
|
||||
/client/proc/powerdebug()
|
||||
set category = "Mapping"
|
||||
set name = "Check Power"
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
feedback_add_details("admin_verb","CPOW") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -52,9 +52,9 @@
|
||||
if (!PN.nodes || !PN.nodes.len)
|
||||
if(PN.cables && (PN.cables.len > 1))
|
||||
var/obj/structure/cable/C = PN.cables[1]
|
||||
usr << "Powernet with no nodes! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]"
|
||||
to_chat(usr, "Powernet with no nodes! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]")
|
||||
|
||||
if (!PN.cables || (PN.cables.len < 10))
|
||||
if(PN.cables && (PN.cables.len > 1))
|
||||
var/obj/structure/cable/C = PN.cables[1]
|
||||
usr << "Powernet with fewer than 10 cables! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]"
|
||||
to_chat(usr, "Powernet with fewer than 10 cables! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]")
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
set desc = "Spawns a Bluespace Tech to debug stuff"
|
||||
|
||||
if (bst_cooldown)
|
||||
src << "You've used this verb too recently, please wait a moment before trying again."
|
||||
to_chat(src, "You've used this verb too recently, please wait a moment before trying again.")
|
||||
return
|
||||
|
||||
if(!check_rights(R_DEV|R_ADMIN)) return
|
||||
@@ -30,7 +30,7 @@
|
||||
return //how did they get here?
|
||||
|
||||
if(!ROUND_IS_STARTED)
|
||||
src << span("alert", "The game hasn't started yet!")
|
||||
to_chat(src, span("alert", "The game hasn't started yet!"))
|
||||
return
|
||||
|
||||
bst_cooldown = TRUE
|
||||
@@ -137,7 +137,7 @@
|
||||
var/fall_override = TRUE
|
||||
|
||||
/mob/living/carbon/human/bst/can_inject(var/mob/user, var/error_msg, var/target_zone)
|
||||
user << span("alert", "The [src] disarms you before you can inject them.")
|
||||
to_chat(user, span("alert", "The [src] disarms you before you can inject them."))
|
||||
user.drop_item()
|
||||
return 0
|
||||
|
||||
@@ -311,10 +311,10 @@
|
||||
|
||||
if(!src.incorporeal_move)
|
||||
src.incorporeal_move = 2
|
||||
src << span("notice", "You will now phase through solid matter.")
|
||||
to_chat(src, span("notice", "You will now phase through solid matter."))
|
||||
else
|
||||
src.incorporeal_move = 0
|
||||
src << span("notice", "You will no-longer phase through solid matter.")
|
||||
to_chat(src, span("notice", "You will no-longer phase through solid matter."))
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/bst/verb/bstrecover()
|
||||
@@ -354,7 +354,7 @@
|
||||
set category = "BST"
|
||||
|
||||
status_flags ^= GODMODE
|
||||
src << span("notice", "God mode is now [status_flags & GODMODE ? "enabled" : "disabled"]")
|
||||
to_chat(src, span("notice", "God mode is now [status_flags & GODMODE ? "enabled" : "disabled"]"))
|
||||
|
||||
//Equipment. All should have canremove set to 0
|
||||
//All items with a /bst need the attack_hand() proc overrided to stop people getting overpowered items.
|
||||
@@ -369,7 +369,7 @@
|
||||
if(!usr)
|
||||
return
|
||||
if(!istype(usr, /mob/living/carbon/human/bst))
|
||||
usr << span("alert", "Your hand seems to go right through the [src]. It's like it doesn't exist.")
|
||||
to_chat(usr, span("alert", "Your hand seems to go right through the [src]. It's like it doesn't exist."))
|
||||
return
|
||||
else
|
||||
..()
|
||||
@@ -388,7 +388,7 @@
|
||||
if(!usr)
|
||||
return
|
||||
if(!istype(usr, /mob/living/carbon/human/bst))
|
||||
usr << span("alert", "Your hand seems to go right through the [src]. It's like it doesn't exist.")
|
||||
to_chat(usr, span("alert", "Your hand seems to go right through the [src]. It's like it doesn't exist."))
|
||||
return
|
||||
else
|
||||
..()
|
||||
@@ -415,7 +415,7 @@
|
||||
if(!usr)
|
||||
return
|
||||
if(!istype(usr, /mob/living/carbon/human/bst))
|
||||
usr << span("alert", "Your hand seems to go right through the [src]. It's like it doesn't exist.")
|
||||
to_chat(usr, span("alert", "Your hand seems to go right through the [src]. It's like it doesn't exist."))
|
||||
return
|
||||
else
|
||||
..()
|
||||
@@ -432,7 +432,7 @@
|
||||
if(!usr)
|
||||
return
|
||||
if(!istype(usr, /mob/living/carbon/human/bst))
|
||||
usr << span("alert", "Your hand seems to go right through the [src]. It's like it doesn't exist.")
|
||||
to_chat(usr, span("alert", "Your hand seems to go right through the [src]. It's like it doesn't exist."))
|
||||
return
|
||||
else
|
||||
..()
|
||||
@@ -464,7 +464,7 @@
|
||||
vision_flags = 0
|
||||
see_invisible = -1
|
||||
|
||||
usr << "<span class='notice'>\The [src]'s vision mode is now <b>[mode]</b>.</span>"
|
||||
to_chat(usr, "<span class='notice'>\The [src]'s vision mode is now <b>[mode]</b>.</span>")
|
||||
|
||||
/* New()
|
||||
..()
|
||||
@@ -476,7 +476,7 @@
|
||||
if(!usr)
|
||||
return
|
||||
if(!istype(usr, /mob/living/carbon/human/bst))
|
||||
usr << span("alert", "Your hand seems to go right through the [src]. It's like it doesn't exist.")
|
||||
to_chat(usr, span("alert", "Your hand seems to go right through the [src]. It's like it doesn't exist."))
|
||||
return
|
||||
else
|
||||
..()
|
||||
@@ -493,7 +493,7 @@
|
||||
if(!usr)
|
||||
return
|
||||
if(!istype(usr, /mob/living/carbon/human/bst))
|
||||
usr << span("alert", "Your hand seems to go right through the [src]. It's like it doesn't exist.")
|
||||
to_chat(usr, span("alert", "Your hand seems to go right through the [src]. It's like it doesn't exist."))
|
||||
return
|
||||
else
|
||||
..()
|
||||
@@ -512,7 +512,7 @@
|
||||
if(!usr)
|
||||
return
|
||||
if(!istype(usr, /mob/living/carbon/human/bst))
|
||||
usr << span("alert", "Your hand seems to go right through the [src]. It's like it doesn't exist.")
|
||||
to_chat(usr, span("alert", "Your hand seems to go right through the [src]. It's like it doesn't exist."))
|
||||
return
|
||||
else
|
||||
..()
|
||||
@@ -526,7 +526,7 @@
|
||||
if(!usr)
|
||||
return
|
||||
if(!istype(usr, /mob/living/carbon/human/bst))
|
||||
usr << span("alert", "Your hand seems to go right through the [src]. It's like it doesn't exist.")
|
||||
to_chat(usr, span("alert", "Your hand seems to go right through the [src]. It's like it doesn't exist."))
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -72,37 +72,37 @@
|
||||
Click()
|
||||
switch(master.cl.buildmode)
|
||||
if(1)
|
||||
usr << "<span class='notice'>***********************************************************</span>"
|
||||
usr << "<span class='notice'>Left Mouse Button = Construct / Upgrade</span>"
|
||||
usr << "<span class='notice'>Right Mouse Button = Deconstruct / Delete / Downgrade</span>"
|
||||
usr << "<span class='notice'>Left Mouse Button + ctrl = R-Window</span>"
|
||||
usr << "<span class='notice'>Left Mouse Button + alt = Airlock</span>"
|
||||
usr << ""
|
||||
usr << "<span class='notice'>Use the button in the upper left corner to</span>"
|
||||
usr << "<span class='notice'>change the direction of built objects.</span>"
|
||||
usr << "<span class='notice'>***********************************************************</span>"
|
||||
to_chat(usr, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(usr, "<span class='notice'>Left Mouse Button = Construct / Upgrade</span>")
|
||||
to_chat(usr, "<span class='notice'>Right Mouse Button = Deconstruct / Delete / Downgrade</span>")
|
||||
to_chat(usr, "<span class='notice'>Left Mouse Button + ctrl = R-Window</span>")
|
||||
to_chat(usr, "<span class='notice'>Left Mouse Button + alt = Airlock</span>")
|
||||
to_chat(usr, "")
|
||||
to_chat(usr, "<span class='notice'>Use the button in the upper left corner to</span>")
|
||||
to_chat(usr, "<span class='notice'>change the direction of built objects.</span>")
|
||||
to_chat(usr, "<span class='notice'>***********************************************************</span>")
|
||||
if(2)
|
||||
usr << "<span class='notice'>***********************************************************</span>"
|
||||
usr << "<span class='notice'>Right Mouse Button on buildmode button = Set object type</span>"
|
||||
usr << "<span class='notice'>Middle Mouse Button on buildmode button= On/Off object type saying</span>"
|
||||
usr << "<span class='notice'>Middle Mouse Button on turf/obj = Capture object type</span>"
|
||||
usr << "<span class='notice'>Left Mouse Button on turf/obj = Place objects</span>"
|
||||
usr << "<span class='notice'>Right Mouse Button = Delete objects</span>"
|
||||
usr << ""
|
||||
usr << "<span class='notice'>Use the button in the upper left corner to</span>"
|
||||
usr << "<span class='notice'>change the direction of built objects.</span>"
|
||||
usr << "<span class='notice'>***********************************************************</span>"
|
||||
to_chat(usr, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(usr, "<span class='notice'>Right Mouse Button on buildmode button = Set object type</span>")
|
||||
to_chat(usr, "<span class='notice'>Middle Mouse Button on buildmode button= On/Off object type saying</span>")
|
||||
to_chat(usr, "<span class='notice'>Middle Mouse Button on turf/obj = Capture object type</span>")
|
||||
to_chat(usr, "<span class='notice'>Left Mouse Button on turf/obj = Place objects</span>")
|
||||
to_chat(usr, "<span class='notice'>Right Mouse Button = Delete objects</span>")
|
||||
to_chat(usr, "")
|
||||
to_chat(usr, "<span class='notice'>Use the button in the upper left corner to</span>")
|
||||
to_chat(usr, "<span class='notice'>change the direction of built objects.</span>")
|
||||
to_chat(usr, "<span class='notice'>***********************************************************</span>")
|
||||
if(3)
|
||||
usr << "<span class='notice'>***********************************************************</span>"
|
||||
usr << "<span class='notice'>Right Mouse Button on buildmode button = Select var(type) & value</span>"
|
||||
usr << "<span class='notice'>Left Mouse Button on turf/obj/mob = Set var(type) & value</span>"
|
||||
usr << "<span class='notice'>Right Mouse Button on turf/obj/mob = Reset var's value</span>"
|
||||
usr << "<span class='notice'>***********************************************************</span>"
|
||||
to_chat(usr, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(usr, "<span class='notice'>Right Mouse Button on buildmode button = Select var(type) & value</span>")
|
||||
to_chat(usr, "<span class='notice'>Left Mouse Button on turf/obj/mob = Set var(type) & value</span>")
|
||||
to_chat(usr, "<span class='notice'>Right Mouse Button on turf/obj/mob = Reset var's value</span>")
|
||||
to_chat(usr, "<span class='notice'>***********************************************************</span>")
|
||||
if(4)
|
||||
usr << "<span class='notice'>***********************************************************</span>"
|
||||
usr << "<span class='notice'>Left Mouse Button on turf/obj/mob = Select</span>"
|
||||
usr << "<span class='notice'>Right Mouse Button on turf/obj/mob = Throw</span>"
|
||||
usr << "<span class='notice'>***********************************************************</span>"
|
||||
to_chat(usr, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(usr, "<span class='notice'>Left Mouse Button on turf/obj/mob = Select</span>")
|
||||
to_chat(usr, "<span class='notice'>Right Mouse Button on turf/obj/mob = Throw</span>")
|
||||
to_chat(usr, "<span class='notice'>***********************************************************</span>")
|
||||
return 1
|
||||
|
||||
/obj/effect/bmode/buildquit
|
||||
@@ -272,7 +272,7 @@
|
||||
if(isobj(object)) qdel(object)
|
||||
if(pa.Find("middle"))
|
||||
holder.buildmode.objholder = text2path("[object.type]")
|
||||
if(holder.buildmode.objsay) usr << "[object.type]"
|
||||
if(holder.buildmode.objsay) to_chat(usr, "[object.type]")
|
||||
|
||||
|
||||
if(3)
|
||||
@@ -281,13 +281,13 @@
|
||||
log_admin("[key_name(usr)] modified [object.name]'s [holder.buildmode.varholder] to [holder.buildmode.valueholder]",admin_key=key_name(usr))
|
||||
object.vars[holder.buildmode.varholder] = holder.buildmode.valueholder
|
||||
else
|
||||
usr << "<span class='warning'>[initial(object.name)] does not have a var called '[holder.buildmode.varholder]'</span>"
|
||||
to_chat(usr, "<span class='warning'>[initial(object.name)] does not have a var called '[holder.buildmode.varholder]'</span>")
|
||||
if(pa.Find("right"))
|
||||
if(object.vars.Find(holder.buildmode.varholder))
|
||||
log_admin("[key_name(usr)] modified [object.name]'s [holder.buildmode.varholder] to [holder.buildmode.valueholder]",admin_key=key_name(usr))
|
||||
object.vars[holder.buildmode.varholder] = initial(object.vars[holder.buildmode.varholder])
|
||||
else
|
||||
usr << "<span class='warning'>[initial(object.name)] does not have a var called '[holder.buildmode.varholder]'</span>"
|
||||
to_chat(usr, "<span class='warning'>[initial(object.name)] does not have a var called '[holder.buildmode.varholder]'</span>")
|
||||
|
||||
if(4)
|
||||
if(pa.Find("left"))
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
set name = "Change Custom Event"
|
||||
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
var/input = sanitize(input(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", custom_event_msg) as message|null, MAX_BOOK_MESSAGE_LEN, extra = 0)
|
||||
@@ -30,11 +30,11 @@
|
||||
set name = "Custom Event Info"
|
||||
|
||||
if(!custom_event_msg || custom_event_msg == "")
|
||||
src << "There currently is no known custom event taking place."
|
||||
src << "Keep in mind: it is possible that an admin has not properly set this."
|
||||
to_chat(src, "There currently is no known custom event taking place.")
|
||||
to_chat(src, "Keep in mind: it is possible that an admin has not properly set this.")
|
||||
return
|
||||
|
||||
src << "<h1 class='alert'>Custom Event</h1>"
|
||||
src << "<h2 class='alert'>A custom event is taking place. OOC Info:</h2>"
|
||||
src << "<span class='alert'>[custom_event_msg]</span>"
|
||||
src << "<br>"
|
||||
to_chat(src, "<h1 class='alert'>Custom Event</h1>")
|
||||
to_chat(src, "<h2 class='alert'>A custom event is taking place. OOC Info:</h2>")
|
||||
to_chat(src, "<span class='alert'>[custom_event_msg]</span>")
|
||||
to_chat(src, "<br>")
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
set name = "Dsay" //Gave this shit a shorter name so you only have to time out "dsay" rather than "dead say" to use it --NeoFite
|
||||
set hidden = 1
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
if(!src.mob)
|
||||
return
|
||||
if(prefs.muted & MUTE_DEADCHAT)
|
||||
src << "<span class='danger'>You cannot send DSAY messages (muted).</span>"
|
||||
to_chat(src, "<span class='danger'>You cannot send DSAY messages (muted).</span>")
|
||||
return
|
||||
|
||||
if(!(prefs.toggles & CHAT_DEAD))
|
||||
src << "<span class='warning'>You have deadchat muted.</span>"
|
||||
to_chat(src, "<span class='warning'>You have deadchat muted.</span>")
|
||||
return
|
||||
|
||||
if (src.handle_spam_prevention(msg,MUTE_DEADCHAT))
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
set category = null
|
||||
set name = "Make Abomination"
|
||||
|
||||
usr << "Ruby Mode disabled. Command aborted."
|
||||
to_chat(usr, "Ruby Mode disabled. Command aborted.")
|
||||
return
|
||||
if(!ROUND_IS_STARTED)
|
||||
alert("Wait until the game starts.")
|
||||
@@ -168,33 +168,33 @@
|
||||
return
|
||||
else
|
||||
if(alert("Spawn that person a tome?",,"Yes","No")=="Yes")
|
||||
M << "\red You catch a glimpse of the Realm of Nar-Sie, The Geometer of Blood. You now see how flimsy the world is, you see that it should be open to the knowledge of Nar-Sie. A tome, a message from your new master, appears on the ground."
|
||||
to_chat(M, "\red You catch a glimpse of the Realm of Nar-Sie, The Geometer of Blood. You now see how flimsy the world is, you see that it should be open to the knowledge of Nar-Sie. A tome, a message from your new master, appears on the ground.")
|
||||
new /obj/item/weapon/book/tome(M.loc)
|
||||
else
|
||||
M << "\red You catch a glimpse of the Realm of Nar-Sie, The Geometer of Blood. You now see how flimsy the world is, you see that it should be open to the knowledge of Nar-Sie."
|
||||
to_chat(M, "\red You catch a glimpse of the Realm of Nar-Sie, The Geometer of Blood. You now see how flimsy the world is, you see that it should be open to the knowledge of Nar-Sie.")
|
||||
var/glimpse=pick("1","2","3","4","5","6","7","8")
|
||||
switch(glimpse)
|
||||
if("1")
|
||||
M << "\red You remembered one thing from the glimpse... [cultwords["travel"]] is travel..."
|
||||
to_chat(M, "\red You remembered one thing from the glimpse... [cultwords["travel"]] is travel...")
|
||||
if("2")
|
||||
M << "\red You remembered one thing from the glimpse... [cultwords["blood"]] is blood..."
|
||||
to_chat(M, "\red You remembered one thing from the glimpse... [cultwords["blood"]] is blood...")
|
||||
if("3")
|
||||
M << "\red You remembered one thing from the glimpse... [cultwords["join"]] is join..."
|
||||
to_chat(M, "\red You remembered one thing from the glimpse... [cultwords["join"]] is join...")
|
||||
if("4")
|
||||
M << "\red You remembered one thing from the glimpse... [cultwords["hell"]] is Hell..."
|
||||
to_chat(M, "\red You remembered one thing from the glimpse... [cultwords["hell"]] is Hell...")
|
||||
if("5")
|
||||
M << "\red You remembered one thing from the glimpse... [cultwords["destroy"]] is destroy..."
|
||||
to_chat(M, "\red You remembered one thing from the glimpse... [cultwords["destroy"]] is destroy...")
|
||||
if("6")
|
||||
M << "\red You remembered one thing from the glimpse... [cultwords["technology"]] is technology..."
|
||||
to_chat(M, "\red You remembered one thing from the glimpse... [cultwords["technology"]] is technology...")
|
||||
if("7")
|
||||
M << "\red You remembered one thing from the glimpse... [cultwords["self"]] is self..."
|
||||
to_chat(M, "\red You remembered one thing from the glimpse... [cultwords["self"]] is self...")
|
||||
if("8")
|
||||
M << "\red You remembered one thing from the glimpse... [cultwords["see"]] is see..."
|
||||
to_chat(M, "\red You remembered one thing from the glimpse... [cultwords["see"]] is see...")
|
||||
|
||||
if(M.mind)
|
||||
M.mind.special_role = "Cultist"
|
||||
SSticker.mode.cult += M.mind
|
||||
src << "Made [M] a cultist."
|
||||
to_chat(src, "Made [M] a cultist.")
|
||||
*/
|
||||
|
||||
//TODO: merge the vievars version into this or something maybe mayhaps
|
||||
@@ -504,17 +504,17 @@
|
||||
|
||||
switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs", "Clients"))
|
||||
if("Players")
|
||||
usr << jointext(player_list,",")
|
||||
to_chat(usr, jointext(player_list,","))
|
||||
if("Admins")
|
||||
usr << jointext(admins,",")
|
||||
to_chat(usr, jointext(admins,","))
|
||||
if("Mobs")
|
||||
usr << jointext(mob_list,",")
|
||||
to_chat(usr, jointext(mob_list,","))
|
||||
if("Living Mobs")
|
||||
usr << jointext(living_mob_list,",")
|
||||
to_chat(usr, jointext(living_mob_list,","))
|
||||
if("Dead Mobs")
|
||||
usr << jointext(dead_mob_list,",")
|
||||
to_chat(usr, jointext(dead_mob_list,","))
|
||||
if("Clients")
|
||||
usr << jointext(clients,",")
|
||||
to_chat(usr, jointext(clients,","))
|
||||
|
||||
// DNA2 - Admin Hax
|
||||
/client/proc/cmd_admin_toggle_block(var/mob/M,var/block)
|
||||
|
||||
@@ -124,11 +124,11 @@
|
||||
set category = "Debug"
|
||||
/*
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
if(!SSair)
|
||||
usr << "Cannot find air_system"
|
||||
to_chat(usr, "Cannot find air_system")
|
||||
return
|
||||
var/datum/air_group/dead_groups = list()
|
||||
for(var/datum/air_group/group in SSair.air_groups)
|
||||
@@ -146,11 +146,11 @@
|
||||
set category = "Debug"
|
||||
/*
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
if(!SSair)
|
||||
usr << "Cannot find air_system"
|
||||
to_chat(usr, "Cannot find air_system")
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(usr)
|
||||
@@ -159,7 +159,7 @@
|
||||
AG.next_check = 30
|
||||
AG.group_processing = 0
|
||||
else
|
||||
usr << "Local airgroup is unsimulated!"
|
||||
to_chat(usr, "Local airgroup is unsimulated!")
|
||||
feedback_add_details("admin_verb","KLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
*/
|
||||
|
||||
@@ -168,9 +168,9 @@
|
||||
set desc = "This spams all the active jobban entries for the current round to standard output."
|
||||
set category = "Debug"
|
||||
|
||||
usr << "<b>Jobbans active in this round.</b>"
|
||||
to_chat(usr, "<b>Jobbans active in this round.</b>")
|
||||
for(var/t in jobban_keylist)
|
||||
usr << "[t]"
|
||||
to_chat(usr, "[t]")
|
||||
|
||||
/client/proc/print_jobban_old_filter()
|
||||
set name = "Search Jobban Log"
|
||||
@@ -181,7 +181,7 @@
|
||||
if(!filter)
|
||||
return
|
||||
|
||||
usr << "<b>Jobbans active in this round.</b>"
|
||||
to_chat(usr, "<b>Jobbans active in this round.</b>")
|
||||
for(var/t in jobban_keylist)
|
||||
if(findtext(t, filter))
|
||||
usr << "[t]"
|
||||
to_chat(usr, "[t]")
|
||||
|
||||
@@ -24,16 +24,16 @@
|
||||
set category = null
|
||||
|
||||
if(!src.holder)
|
||||
src << "<font color='red'>Only Admins may use this command.</font>"
|
||||
to_chat(src, "<font color='red'>Only Admins may use this command.</font>")
|
||||
return
|
||||
|
||||
var/client/target = input(src,"Choose somebody to grant access to the server's runtime logs (permissions expire at the end of each round):","Grant Permissions",null) as null|anything in clients
|
||||
if(!istype(target,/client))
|
||||
src << "<font color='red'>Error: giveruntimelog(): Client not found.</font>"
|
||||
to_chat(src, "<font color='red'>Error: giveruntimelog(): Client not found.</font>")
|
||||
return
|
||||
|
||||
target.verbs |= /client/proc/getruntimelog
|
||||
target << "<font color='red'>You have been granted access to runtime logs. Please use them responsibly or risk being banned.</font>"
|
||||
to_chat(target, "<font color='red'>You have been granted access to runtime logs. Please use them responsibly or risk being banned.</font>")
|
||||
return
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
message_admins("[key_name_admin(src)] accessed file: [path]")
|
||||
src << run( file(path) )
|
||||
src << "Attempting to send file, this may take a fair few minutes if the file is very large."
|
||||
to_chat(src, "Attempting to send file, this may take a fair few minutes if the file is very large.")
|
||||
return
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
message_admins("[key_name_admin(src)] accessed file: [path]")
|
||||
src << run( file(path) )
|
||||
src << "Attempting to send file, this may take a fair few minutes if the file is very large."
|
||||
to_chat(src, "Attempting to send file, this may take a fair few minutes if the file is very large.")
|
||||
return
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
if( fexists(path) )
|
||||
src << run( file(path) )
|
||||
else
|
||||
src << "<font color='red'>Error: view_txt_log(): File not found/Invalid path([path]).</font>"
|
||||
to_chat(src, "<font color='red'>Error: view_txt_log(): File not found/Invalid path([path]).</font>")
|
||||
return
|
||||
feedback_add_details("admin_verb","VTL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
@@ -104,7 +104,7 @@
|
||||
if( fexists(path) )
|
||||
src << run( file(path) )
|
||||
else
|
||||
src << "<font color='red'>Error: view_atk_log(): File not found/Invalid path([path]).</font>"
|
||||
to_chat(src, "<font color='red'>Error: view_atk_log(): File not found/Invalid path([path]).</font>")
|
||||
return
|
||||
usr << run( file(path) )
|
||||
feedback_add_details("admin_verb","SSAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -223,7 +223,7 @@ var/list/debug_verbs = list (
|
||||
var/turf/simulated/location = get_turf(usr)
|
||||
|
||||
if(!istype(location, /turf/simulated)) // We're in space, let's not cause runtimes.
|
||||
usr << "<span class='warning'>this debug tool cannot be used from space</span>"
|
||||
to_chat(usr, "<span class='warning'>this debug tool cannot be used from space</span>")
|
||||
return
|
||||
|
||||
var/icon/red = new('icons/misc/debug_group.dmi', "red") //created here so we don't have to make thousands of these.
|
||||
@@ -231,11 +231,11 @@ var/list/debug_verbs = list (
|
||||
var/icon/blue = new('icons/misc/debug_group.dmi', "blue")
|
||||
|
||||
if(!usedZAScolors)
|
||||
usr << "ZAS Test Colors"
|
||||
usr << "Green = Zone you are standing in"
|
||||
usr << "Blue = Connected zone to the zone you are standing in"
|
||||
usr << "Yellow = A zone that is connected but not one adjacent to your connected zone"
|
||||
usr << "Red = Not connected"
|
||||
to_chat(usr, "ZAS Test Colors")
|
||||
to_chat(usr, "Green = Zone you are standing in")
|
||||
to_chat(usr, "Blue = Connected zone to the zone you are standing in")
|
||||
to_chat(usr, "Yellow = A zone that is connected but not one adjacent to your connected zone")
|
||||
to_chat(usr, "Red = Not connected")
|
||||
usedZAScolors = 1
|
||||
|
||||
testZAScolors_zones += location.zone
|
||||
@@ -349,7 +349,7 @@ var/global/prevent_airgroup_regroup = 0
|
||||
set category = "Mapping"
|
||||
set name = "Regroup All Airgroups Attempt"
|
||||
|
||||
usr << "<span class='warning'>Proc disabled.</span>"
|
||||
to_chat(usr, "<span class='warning'>Proc disabled.</span>")
|
||||
|
||||
/*prevent_airgroup_regroup = 0
|
||||
for(var/datum/air_group/AG in SSair.air_groups)
|
||||
@@ -360,7 +360,7 @@ var/global/prevent_airgroup_regroup = 0
|
||||
set category = "Mapping"
|
||||
set name = "Kill pipe processing"
|
||||
|
||||
usr << "<span class='warning'>Proc disabled.</span>"
|
||||
to_chat(usr, "<span class='warning'>Proc disabled.</span>")
|
||||
|
||||
/*pipe_processing_killed = !pipe_processing_killed
|
||||
if(pipe_processing_killed)
|
||||
@@ -372,7 +372,7 @@ var/global/prevent_airgroup_regroup = 0
|
||||
set category = "Mapping"
|
||||
set name = "Kill air processing"
|
||||
|
||||
usr << "<span class='warning'>Proc disabled.</span>"
|
||||
to_chat(usr, "<span class='warning'>Proc disabled.</span>")
|
||||
|
||||
//This proc is intended to detect lag problems relating to communication procs
|
||||
var/global/say_disabled = 0
|
||||
@@ -380,7 +380,7 @@ var/global/say_disabled = 0
|
||||
set category = "Mapping"
|
||||
set name = "Disable all communication verbs"
|
||||
|
||||
usr << "<span class='warning'>Proc disabled.</span>"
|
||||
to_chat(usr, "<span class='warning'>Proc disabled.</span>")
|
||||
|
||||
/*say_disabled = !say_disabled
|
||||
if(say_disabled)
|
||||
@@ -395,7 +395,7 @@ var/global/movement_disabled_exception //This is the client that calls the proc,
|
||||
set category = "Mapping"
|
||||
set name = "Disable all movement"
|
||||
|
||||
usr << "<span class='warning'>Proc disabled.</span>"
|
||||
to_chat(usr, "<span class='warning'>Proc disabled.</span>")
|
||||
|
||||
/*movement_disabled = !movement_disabled
|
||||
if(movement_disabled)
|
||||
@@ -411,7 +411,7 @@ var/global/movement_disabled_exception //This is the client that calls the proc,
|
||||
for(var/obj/machinery/door/airlock/A in world)
|
||||
var/turf/T = get_turf(A)
|
||||
if(istype(T, /turf/space) || istype(T, /turf/simulated/floor/asteroid) || isopenturf(T) || T.density)
|
||||
usr << "Airlock [A] with bad turf at ([A.x],[A.y],[A.z]) in [T.loc]."
|
||||
to_chat(usr, "Airlock [A] with bad turf at ([A.x],[A.y],[A.z]) in [T.loc].")
|
||||
|
||||
/client/proc/get_bad_fdoors()
|
||||
set category = "Mapping"
|
||||
@@ -423,4 +423,4 @@ var/global/movement_disabled_exception //This is the client that calls the proc,
|
||||
for(var/obj/machinery/door/firedoor/FD in T)
|
||||
firelock_increment += 1
|
||||
if(firelock_increment > 1)
|
||||
usr << "Double firedoor [F] at ([F.x],[F.y],[F.z]) in [T.loc]."
|
||||
to_chat(usr, "Double firedoor [F] at ([F.x],[F.y],[F.z]) in [T.loc].")
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
for(var/p in forbidden_varedit_object_types)
|
||||
if( istype(O,p) )
|
||||
usr << "<span class='danger'>It is forbidden to edit this object's variables.</span>"
|
||||
to_chat(usr, "<span class='danger'>It is forbidden to edit this object's variables.</span>")
|
||||
return
|
||||
|
||||
var/list/names = list()
|
||||
@@ -55,43 +55,43 @@
|
||||
if(!check_rights(R_DEBUG|R_DEV)) return
|
||||
|
||||
if(isnull(var_value))
|
||||
usr << "Unable to determine variable type."
|
||||
to_chat(usr, "Unable to determine variable type.")
|
||||
|
||||
else if(isnum(var_value))
|
||||
usr << "Variable appears to be <b>NUM</b>."
|
||||
to_chat(usr, "Variable appears to be <b>NUM</b>.")
|
||||
default = "num"
|
||||
dir = 1
|
||||
|
||||
else if(istext(var_value))
|
||||
usr << "Variable appears to be <b>TEXT</b>."
|
||||
to_chat(usr, "Variable appears to be <b>TEXT</b>.")
|
||||
default = "text"
|
||||
|
||||
else if(isloc(var_value))
|
||||
usr << "Variable appears to be <b>REFERENCE</b>."
|
||||
to_chat(usr, "Variable appears to be <b>REFERENCE</b>.")
|
||||
default = "reference"
|
||||
|
||||
else if(isicon(var_value))
|
||||
usr << "Variable appears to be <b>ICON</b>."
|
||||
to_chat(usr, "Variable appears to be <b>ICON</b>.")
|
||||
var_value = "\icon[var_value]"
|
||||
default = "icon"
|
||||
|
||||
else if(istype(var_value,/atom) || istype(var_value,/datum))
|
||||
usr << "Variable appears to be <b>TYPE</b>."
|
||||
to_chat(usr, "Variable appears to be <b>TYPE</b>.")
|
||||
default = "type"
|
||||
|
||||
else if(istype(var_value,/list))
|
||||
usr << "Variable appears to be <b>LIST</b>."
|
||||
to_chat(usr, "Variable appears to be <b>LIST</b>.")
|
||||
default = "list"
|
||||
|
||||
else if(istype(var_value,/client))
|
||||
usr << "Variable appears to be <b>CLIENT</b>."
|
||||
to_chat(usr, "Variable appears to be <b>CLIENT</b>.")
|
||||
default = "cancel"
|
||||
|
||||
else
|
||||
usr << "Variable appears to be <b>FILE</b>."
|
||||
to_chat(usr, "Variable appears to be <b>FILE</b>.")
|
||||
default = "file"
|
||||
|
||||
usr << "Variable contains: [var_value]"
|
||||
to_chat(usr, "Variable contains: [var_value]")
|
||||
if(dir)
|
||||
switch(var_value)
|
||||
if(1)
|
||||
@@ -113,7 +113,7 @@
|
||||
else
|
||||
dir = null
|
||||
if(dir)
|
||||
usr << "If a direction, direction is: [dir]"
|
||||
to_chat(usr, "If a direction, direction is: [dir]")
|
||||
|
||||
var/class = input("What kind of variable?","Variable Type",default) as null|anything in list("text",
|
||||
"num","type","icon","file","edit referenced object","restore to default")
|
||||
|
||||
@@ -61,7 +61,7 @@ var/list/VVdynamic_lock = list(
|
||||
var/object = input("Enter typepath:","Typepath") as null|text
|
||||
if(!object)
|
||||
return
|
||||
|
||||
|
||||
var/list/types = typesof(/atom)
|
||||
var/list/matches = new()
|
||||
|
||||
@@ -127,7 +127,7 @@ var/list/VVdynamic_lock = list(
|
||||
var/object = input("Enter typepath:","Typepath") as null|text
|
||||
if(!object)
|
||||
return
|
||||
|
||||
|
||||
var/list/types = typesof(/atom)
|
||||
var/list/matches = new()
|
||||
|
||||
@@ -166,13 +166,13 @@ var/list/VVdynamic_lock = list(
|
||||
L[var_value] = mod_list_add_ass() //haha
|
||||
if("No")
|
||||
L += var_value
|
||||
world.log << "### ListVarEdit by [src]: [O.type] [objectvar]: ADDED=[var_value]"
|
||||
world.log << "### ListVarEdit by [src]: [O.type] [objectvar]: ADDED=[var_value]"
|
||||
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: ADDED=[var_value]",admin_key=key_name(src))
|
||||
message_admins("[key_name_admin(src)] modified [original_name]'s [objectvar]: ADDED=[var_value]")
|
||||
|
||||
/client/proc/mod_list(var/list/L, atom/O, original_name, objectvar)
|
||||
if(!check_rights(R_VAREDIT|R_DEV)) return
|
||||
if(!istype(L,/list)) src << "Not a List."
|
||||
if(!istype(L,/list)) to_chat(src, "Not a List.")
|
||||
|
||||
if(L.len > 1000)
|
||||
var/confirm = alert(src, "The list you're trying to edit is very long, continuing may crash the server.", "Warning", "Continue", "Abort")
|
||||
@@ -184,7 +184,7 @@ var/list/VVdynamic_lock = list(
|
||||
var/a = L[1]
|
||||
if(istext(a) && L[a] != null)
|
||||
assoc = 1 //This is pretty weak test but i can't think of anything else
|
||||
usr << "List appears to be associative."
|
||||
to_chat(usr, "List appears to be associative.")
|
||||
|
||||
var/list/names = null
|
||||
if(!assoc)
|
||||
@@ -222,43 +222,43 @@ var/list/VVdynamic_lock = list(
|
||||
if(!check_rights(VVdynamic_lock[variable])) return
|
||||
|
||||
if(isnull(variable))
|
||||
usr << "Unable to determine variable type."
|
||||
to_chat(usr, "Unable to determine variable type.")
|
||||
|
||||
else if(isnum(variable))
|
||||
usr << "Variable appears to be <b>NUM</b>."
|
||||
to_chat(usr, "Variable appears to be <b>NUM</b>.")
|
||||
default = "num"
|
||||
dir = 1
|
||||
|
||||
else if(istext(variable))
|
||||
usr << "Variable appears to be <b>TEXT</b>."
|
||||
to_chat(usr, "Variable appears to be <b>TEXT</b>.")
|
||||
default = "text"
|
||||
|
||||
else if(isloc(variable))
|
||||
usr << "Variable appears to be <b>REFERENCE</b>."
|
||||
to_chat(usr, "Variable appears to be <b>REFERENCE</b>.")
|
||||
default = "reference"
|
||||
|
||||
else if(isicon(variable))
|
||||
usr << "Variable appears to be <b>ICON</b>."
|
||||
to_chat(usr, "Variable appears to be <b>ICON</b>.")
|
||||
variable = "\icon[variable]"
|
||||
default = "icon"
|
||||
|
||||
else if(istype(variable,/atom) || istype(variable,/datum))
|
||||
usr << "Variable appears to be <b>TYPE</b>."
|
||||
to_chat(usr, "Variable appears to be <b>TYPE</b>.")
|
||||
default = "type"
|
||||
|
||||
else if(istype(variable,/list))
|
||||
usr << "Variable appears to be <b>LIST</b>."
|
||||
to_chat(usr, "Variable appears to be <b>LIST</b>.")
|
||||
default = "list"
|
||||
|
||||
else if(istype(variable,/client))
|
||||
usr << "Variable appears to be <b>CLIENT</b>."
|
||||
to_chat(usr, "Variable appears to be <b>CLIENT</b>.")
|
||||
default = "cancel"
|
||||
|
||||
else
|
||||
usr << "Variable appears to be <b>FILE</b>."
|
||||
to_chat(usr, "Variable appears to be <b>FILE</b>.")
|
||||
default = "file"
|
||||
|
||||
usr << "Variable contains: [variable]"
|
||||
to_chat(usr, "Variable contains: [variable]")
|
||||
if(dir)
|
||||
switch(variable)
|
||||
if(1)
|
||||
@@ -281,7 +281,7 @@ var/list/VVdynamic_lock = list(
|
||||
dir = null
|
||||
|
||||
if(dir)
|
||||
usr << "If a direction, direction is: [dir]"
|
||||
to_chat(usr, "If a direction, direction is: [dir]")
|
||||
|
||||
var/class = "text"
|
||||
if(src.holder && src.holder.marked_datum)
|
||||
@@ -320,7 +320,7 @@ var/list/VVdynamic_lock = list(
|
||||
modify_variables(variable)
|
||||
|
||||
if("DELETE FROM LIST")
|
||||
world.log << "### ListVarEdit by [src]: [O.type] [objectvar]: REMOVED=[html_encode("[variable]")]"
|
||||
world.log << "### ListVarEdit by [src]: [O.type] [objectvar]: REMOVED=[html_encode("[variable]")]"
|
||||
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: REMOVED=[variable]",admin_key=key_name(src))
|
||||
message_admins("[key_name_admin(src)] modified [original_name]'s [objectvar]: REMOVED=[variable]")
|
||||
L -= variable
|
||||
@@ -344,7 +344,7 @@ var/list/VVdynamic_lock = list(
|
||||
var/object = input("Enter typepath:","Typepath") as null|text
|
||||
if(!object)
|
||||
return
|
||||
|
||||
|
||||
var/list/types = typesof(/atom)
|
||||
var/list/matches = new()
|
||||
|
||||
@@ -400,7 +400,7 @@ var/list/VVdynamic_lock = list(
|
||||
else
|
||||
L[L.Find(variable)] = new_var
|
||||
|
||||
world.log << "### ListVarEdit by [src]: [O.type] [objectvar]: [original_var]=[new_var]"
|
||||
world.log << "### ListVarEdit by [src]: [O.type] [objectvar]: [original_var]=[new_var]"
|
||||
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: [original_var]=[new_var]",admin_key=key_name(src))
|
||||
message_admins("[key_name_admin(src)] modified [original_name]'s varlist [objectvar]: [original_var]=[new_var]")
|
||||
|
||||
@@ -409,11 +409,11 @@ var/list/VVdynamic_lock = list(
|
||||
|
||||
for(var/p in forbidden_varedit_object_types)
|
||||
if( istype(O,p) )
|
||||
usr << "<span class='danger'>It is forbidden to edit this object's variables.</span>"
|
||||
to_chat(usr, "<span class='danger'>It is forbidden to edit this object's variables.</span>")
|
||||
return
|
||||
|
||||
if(istype(O, /client) && (param_var_name == "ckey" || param_var_name == "key"))
|
||||
usr << "<span class='danger'>You cannot edit ckeys on client objects.</span>"
|
||||
to_chat(usr, "<span class='danger'>You cannot edit ckeys on client objects.</span>")
|
||||
return
|
||||
|
||||
var/class
|
||||
@@ -422,7 +422,7 @@ var/list/VVdynamic_lock = list(
|
||||
|
||||
if(param_var_name)
|
||||
if(!param_var_name in O.vars)
|
||||
src << "A variable with this name ([param_var_name]) doesn't exist in this atom ([O])"
|
||||
to_chat(src, "A variable with this name ([param_var_name]) doesn't exist in this atom ([O])")
|
||||
return
|
||||
|
||||
if(param_var_name in VVlocked)
|
||||
@@ -440,41 +440,41 @@ var/list/VVdynamic_lock = list(
|
||||
|
||||
if(autodetect_class)
|
||||
if(isnull(var_value))
|
||||
usr << "Unable to determine variable type."
|
||||
to_chat(usr, "Unable to determine variable type.")
|
||||
class = null
|
||||
autodetect_class = null
|
||||
else if(isnum(var_value))
|
||||
usr << "Variable appears to be <b>NUM</b>."
|
||||
to_chat(usr, "Variable appears to be <b>NUM</b>.")
|
||||
class = "num"
|
||||
dir = 1
|
||||
|
||||
else if(istext(var_value))
|
||||
usr << "Variable appears to be <b>TEXT</b>."
|
||||
to_chat(usr, "Variable appears to be <b>TEXT</b>.")
|
||||
class = "text"
|
||||
|
||||
else if(isloc(var_value))
|
||||
usr << "Variable appears to be <b>REFERENCE</b>."
|
||||
to_chat(usr, "Variable appears to be <b>REFERENCE</b>.")
|
||||
class = "reference"
|
||||
|
||||
else if(isicon(var_value))
|
||||
usr << "Variable appears to be <b>ICON</b>."
|
||||
to_chat(usr, "Variable appears to be <b>ICON</b>.")
|
||||
var_value = "\icon[var_value]"
|
||||
class = "icon"
|
||||
|
||||
else if(istype(var_value,/atom) || istype(var_value,/datum))
|
||||
usr << "Variable appears to be <b>TYPE</b>."
|
||||
to_chat(usr, "Variable appears to be <b>TYPE</b>.")
|
||||
class = "type"
|
||||
|
||||
else if(istype(var_value,/list))
|
||||
usr << "Variable appears to be <b>LIST</b>."
|
||||
to_chat(usr, "Variable appears to be <b>LIST</b>.")
|
||||
class = "list"
|
||||
|
||||
else if(istype(var_value,/client))
|
||||
usr << "Variable appears to be <b>CLIENT</b>."
|
||||
to_chat(usr, "Variable appears to be <b>CLIENT</b>.")
|
||||
class = "cancel"
|
||||
|
||||
else
|
||||
usr << "Variable appears to be <b>FILE</b>."
|
||||
to_chat(usr, "Variable appears to be <b>FILE</b>.")
|
||||
class = "file"
|
||||
|
||||
else
|
||||
@@ -503,43 +503,43 @@ var/list/VVdynamic_lock = list(
|
||||
var/dir
|
||||
var/default
|
||||
if(isnull(var_value))
|
||||
usr << "Unable to determine variable type."
|
||||
to_chat(usr, "Unable to determine variable type.")
|
||||
|
||||
else if(isnum(var_value))
|
||||
usr << "Variable appears to be <b>NUM</b>."
|
||||
to_chat(usr, "Variable appears to be <b>NUM</b>.")
|
||||
default = "num"
|
||||
dir = 1
|
||||
|
||||
else if(istext(var_value))
|
||||
usr << "Variable appears to be <b>TEXT</b>."
|
||||
to_chat(usr, "Variable appears to be <b>TEXT</b>.")
|
||||
default = "text"
|
||||
|
||||
else if(isloc(var_value))
|
||||
usr << "Variable appears to be <b>REFERENCE</b>."
|
||||
to_chat(usr, "Variable appears to be <b>REFERENCE</b>.")
|
||||
default = "reference"
|
||||
|
||||
else if(isicon(var_value))
|
||||
usr << "Variable appears to be <b>ICON</b>."
|
||||
to_chat(usr, "Variable appears to be <b>ICON</b>.")
|
||||
var_value = "\icon[var_value]"
|
||||
default = "icon"
|
||||
|
||||
else if(istype(var_value,/atom) || istype(var_value,/datum))
|
||||
usr << "Variable appears to be <b>TYPE</b>."
|
||||
to_chat(usr, "Variable appears to be <b>TYPE</b>.")
|
||||
default = "type"
|
||||
|
||||
else if(istype(var_value,/list))
|
||||
usr << "Variable appears to be <b>LIST</b>."
|
||||
to_chat(usr, "Variable appears to be <b>LIST</b>.")
|
||||
default = "list"
|
||||
|
||||
else if(istype(var_value,/client))
|
||||
usr << "Variable appears to be <b>CLIENT</b>."
|
||||
to_chat(usr, "Variable appears to be <b>CLIENT</b>.")
|
||||
default = "cancel"
|
||||
|
||||
else
|
||||
usr << "Variable appears to be <b>FILE</b>."
|
||||
to_chat(usr, "Variable appears to be <b>FILE</b>.")
|
||||
default = "file"
|
||||
|
||||
usr << "Variable contains: [var_value]"
|
||||
to_chat(usr, "Variable contains: [var_value]")
|
||||
if(dir)
|
||||
switch(var_value)
|
||||
if(1)
|
||||
@@ -561,7 +561,7 @@ var/list/VVdynamic_lock = list(
|
||||
else
|
||||
dir = null
|
||||
if(dir)
|
||||
usr << "If a direction, direction is: [dir]"
|
||||
to_chat(usr, "If a direction, direction is: [dir]")
|
||||
|
||||
if(src.holder && src.holder.marked_datum)
|
||||
class = input("What kind of variable?","Variable Type",default) as null|anything in list("text",
|
||||
@@ -624,7 +624,7 @@ var/list/VVdynamic_lock = list(
|
||||
var/object = input("Enter typepath:","Type",O.vars[variable]) as null|text
|
||||
if(!object)
|
||||
return
|
||||
|
||||
|
||||
var/list/types = typesof(/atom)
|
||||
var/list/matches = new()
|
||||
|
||||
@@ -641,7 +641,7 @@ var/list/VVdynamic_lock = list(
|
||||
var_new = matches[1]
|
||||
else
|
||||
var_new = input("Select an atom type", "Spawn Atom", matches[1]) as null|anything in matches
|
||||
|
||||
|
||||
if(var_new==null) return
|
||||
O.vars[variable] = var_new
|
||||
|
||||
@@ -668,6 +668,6 @@ var/list/VVdynamic_lock = list(
|
||||
if("marked datum")
|
||||
O.vars[variable] = holder.marked_datum
|
||||
|
||||
world.log << "### VarEdit by [src]: [O.type] [variable]=[html_encode("[O.vars[variable]]")]"
|
||||
world.log << "### VarEdit by [src]: [O.type] [variable]=[html_encode("[O.vars[variable]]")]"
|
||||
log_admin("[key_name(src)] modified [original_name]'s [variable] to [O.vars[variable]]",admin_key=key_name(src))
|
||||
message_admins("[key_name_admin(src)] modified [original_name]'s [variable] to [O.vars[variable]]")
|
||||
|
||||
@@ -17,7 +17,7 @@ var/list/sounds_cache = list()
|
||||
message_admins("[key_name_admin(src)] played sound [S]", 1)
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client.prefs.toggles & SOUND_MIDI)
|
||||
M << uploaded_sound
|
||||
sound_to(M, uploaded_sound)
|
||||
|
||||
feedback_add_details("admin_verb","PGS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
if(istype(O,/obj/singularity))
|
||||
if(config.forbid_singulo_possession)
|
||||
usr << "It is forbidden to possess singularities."
|
||||
to_chat(usr, "It is forbidden to possess singularities.")
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(O)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
set name = "Pray"
|
||||
|
||||
if(say_disabled) //This is here to try to identify lag problems
|
||||
usr << "<span class='warning'>Speech is currently admin-disabled.</span>"
|
||||
to_chat(usr, "<span class='warning'>Speech is currently admin-disabled.</span>")
|
||||
return
|
||||
|
||||
msg = sanitize(msg)
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
if(usr.client)
|
||||
if(usr.client.prefs.muted & MUTE_PRAY)
|
||||
usr << "<span class='warning'>You cannot pray (muted).</span>"
|
||||
to_chat(usr, "<span class='warning'>You cannot pray (muted).</span>")
|
||||
return
|
||||
if(src.client.handle_spam_prevention(msg,MUTE_PRAY))
|
||||
return
|
||||
@@ -22,8 +22,8 @@
|
||||
for(var/client/C in admins)
|
||||
if(C.holder.rights & (R_ADMIN|R_MOD|R_FUN))
|
||||
if(C.prefs.toggles & CHAT_PRAYER)
|
||||
C << msg
|
||||
usr << "Your prayers have been received by the gods."
|
||||
to_chat(C, msg)
|
||||
to_chat(usr, "Your prayers have been received by the gods.")
|
||||
|
||||
feedback_add_details("admin_verb","PR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("PRAYER: [key_name(src)]: [msg]")
|
||||
@@ -37,13 +37,13 @@
|
||||
|
||||
for(var/client/C in admins)
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
C << msg_admin
|
||||
to_chat(C, msg_admin)
|
||||
else if (R_CCIAA & C.holder.rights)
|
||||
cciaa_present++
|
||||
if (C.is_afk())
|
||||
cciaa_afk++
|
||||
|
||||
C << msg_cciaa
|
||||
to_chat(C, msg_cciaa)
|
||||
|
||||
discord_bot.send_to_cciaa("Emergency message from the station: `[msg]`, sent by [Sender]! Gamemode: [SSticker.mode]")
|
||||
|
||||
@@ -61,4 +61,4 @@
|
||||
msg = "<span class='notice'><b><font color=crimson>ILLEGAL:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, src)]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;SyndicateReply=\ref[Sender]'>RPLY</A>):</b> [msg]</span>"
|
||||
for(var/client/C in admins)
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
C << msg
|
||||
to_chat(C, msg)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set category = null
|
||||
set name = "Drop Everything"
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
var/confirm = alert(src, "Make [M] drop everything?", "Message", "Yes", "No")
|
||||
@@ -20,7 +20,7 @@
|
||||
set category = "Admin"
|
||||
set name = "Prison"
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
if (ismob(M))
|
||||
if(istype(M, /mob/living/silicon/ai))
|
||||
@@ -38,7 +38,7 @@
|
||||
prisoner.equip_to_slot_or_del(new /obj/item/clothing/under/color/orange(prisoner), slot_w_uniform)
|
||||
prisoner.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(prisoner), slot_shoes)
|
||||
spawn(50)
|
||||
M << "<span class='danger'>You have been sent to the prison station!</span>"
|
||||
to_chat(M, "<span class='danger'>You have been sent to the prison station!</span>")
|
||||
log_admin("[key_name(usr)] sent [key_name(M)] to the prison station.",admin_key=key_name(usr),ckey=key_name(M))
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] sent [key_name_admin(M)] to the prison station.</span>", 1)
|
||||
feedback_add_details("admin_verb","PRISON") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
if(!ismob(M)) return
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
var/msg = sanitize(input("Message:", text("Subtle PM to [M.key]")) as text)
|
||||
@@ -59,7 +59,7 @@
|
||||
if(usr)
|
||||
if (usr.client)
|
||||
if(usr.client.holder)
|
||||
M << "\bold You hear a voice in your head... \italic [msg]"
|
||||
to_chat(M, "\bold You hear a voice in your head... \italic [msg]")
|
||||
|
||||
log_admin("SubtlePM: [key_name(usr)] -> [key_name(M)] : [msg]",admin_key=key_name(usr),ckey=key_name(M))
|
||||
message_admins("<span class='notice'><b>SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] : [msg]</b></span>", 1)
|
||||
@@ -69,7 +69,7 @@
|
||||
set category = "Admin"
|
||||
set name = "Check new Players"
|
||||
if(!holder)
|
||||
src << "Only staff members may use this command."
|
||||
to_chat(src, "Only staff members may use this command.")
|
||||
|
||||
var/age = alert(src, "Age check", "Show accounts yonger then _____ days","7", "30" , "All")
|
||||
|
||||
@@ -93,12 +93,12 @@
|
||||
msg += "[key_name(C, 1, 1, highlight_special_characters)]: account is [C.player_age] days old<br>"
|
||||
|
||||
if(missing_ages)
|
||||
src << "Some accounts did not have proper ages set in their clients. This function requires database to be present"
|
||||
to_chat(src, "Some accounts did not have proper ages set in their clients. This function requires database to be present")
|
||||
|
||||
if(msg != "")
|
||||
src << browse(msg, "window=Player_age_check")
|
||||
else
|
||||
src << "No matches for that age range found."
|
||||
to_chat(src, "No matches for that age range found.")
|
||||
|
||||
|
||||
/client/proc/cmd_admin_world_narrate() // Allows administrators to fluff events a little easier -- TLE
|
||||
@@ -106,7 +106,7 @@
|
||||
set name = "Global Narrate"
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
var/msg = html_decode(sanitize(input("Message:", text("Enter the text you wish to appear to everyone:")) as text))
|
||||
@@ -123,7 +123,7 @@
|
||||
set name = "Direct Narrate"
|
||||
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
if(!M)
|
||||
@@ -137,7 +137,7 @@
|
||||
if( !msg )
|
||||
return
|
||||
|
||||
M << msg
|
||||
to_chat(M, msg)
|
||||
log_admin("DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]",admin_key=key_name(usr),ckey=key_name(M))
|
||||
message_admins("<span class='notice'>\bold DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]<BR></span>", 1)
|
||||
feedback_add_details("admin_verb","DIRN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -146,10 +146,10 @@
|
||||
set category = "Special Verbs"
|
||||
set name = "Godmode"
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
M.status_flags ^= GODMODE
|
||||
usr << "<span class='notice'>Toggled [(M.status_flags & GODMODE) ? "ON" : "OFF"]</span>"
|
||||
to_chat(usr, "<span class='notice'>Toggled [(M.status_flags & GODMODE) ? "ON" : "OFF"]</span>")
|
||||
|
||||
log_admin("[key_name(usr)] has toggled [key_name(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]",admin_key=key_name(usr),ckey=key_name(M))
|
||||
message_admins("[key_name_admin(usr)] has toggled [key_name_admin(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]", 1)
|
||||
@@ -163,12 +163,12 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
|
||||
if(!usr || !usr.client)
|
||||
return
|
||||
if(!usr.client.holder)
|
||||
usr << "<font color='red'>Error: cmd_admin_mute: You don't have permission to do this.</font>"
|
||||
to_chat(usr, "<font color='red'>Error: cmd_admin_mute: You don't have permission to do this.</font>")
|
||||
return
|
||||
if(!M.client)
|
||||
usr << "<font color='red'>Error: cmd_admin_mute: This mob doesn't have a client tied to it.</font>"
|
||||
to_chat(usr, "<font color='red'>Error: cmd_admin_mute: This mob doesn't have a client tied to it.</font>")
|
||||
if(M.client.holder)
|
||||
usr << "<font color='red'>Error: cmd_admin_mute: You cannot mute an admin/mod.</font>"
|
||||
to_chat(usr, "<font color='red'>Error: cmd_admin_mute: You cannot mute an admin/mod.</font>")
|
||||
if(!M.client) return
|
||||
if(M.client.holder) return
|
||||
|
||||
@@ -190,7 +190,7 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
|
||||
M.client.prefs.muted |= mute_type
|
||||
log_admin("SPAM AUTOMUTE: [muteunmute] [key_name(M)] from [mute_string]",ckey=key_name(M))
|
||||
message_admins("SPAM AUTOMUTE: [muteunmute] [key_name_admin(M)] from [mute_string].", 1)
|
||||
M << "You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin."
|
||||
to_chat(M, "You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin.")
|
||||
feedback_add_details("admin_verb","AUTOMUTE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
@@ -204,14 +204,14 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
|
||||
|
||||
log_admin("[key_name(usr)] has [muteunmute] [key_name(M)] from [mute_string]",admin_key=key_name(usr),ckey=key_name(M))
|
||||
message_admins("[key_name_admin(usr)] has [muteunmute] [key_name_admin(M)] from [mute_string].", 1)
|
||||
M << "You have been [muteunmute] from [mute_string]."
|
||||
to_chat(M, "You have been [muteunmute] from [mute_string].")
|
||||
feedback_add_details("admin_verb","MUTE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_add_random_ai_law()
|
||||
set category = "Fun"
|
||||
set name = "Add Random AI Law"
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
||||
if(confirm != "Yes") return
|
||||
@@ -243,7 +243,7 @@ proc/get_ghosts(var/notify = 0,var/what = 2, var/client/C = null)
|
||||
any = 1 //if no ghosts show up, any will just be 0
|
||||
if(!any)
|
||||
if(notify && C)
|
||||
C << "There doesn't appear to be any ghosts for you to select."
|
||||
to_chat(C, "There doesn't appear to be any ghosts for you to select.")
|
||||
return
|
||||
|
||||
for(var/mob/M in mobs)
|
||||
@@ -260,12 +260,12 @@ proc/get_ghosts(var/notify = 0,var/what = 2, var/client/C = null)
|
||||
set name = "Allow player to respawn"
|
||||
set desc = "Let's the player bypass the 30 minute wait to respawn or allow them to re-enter their corpse."
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
var/list/ghosts = get_ghosts(1,1,src)
|
||||
|
||||
var/target = input("Please, select a ghost!", "COME BACK TO LIFE!", null, null) as null|anything in ghosts
|
||||
if(!target)
|
||||
src << "Hrm, appears you didn't select a ghost" // Sanity check, if no ghosts in the list we don't want to edit a null variable and cause a runtime error.
|
||||
to_chat(src, "Hrm, appears you didn't select a ghost") // Sanity check, if no ghosts in the list we don't want to edit a null variable and cause a runtime error.)
|
||||
return
|
||||
|
||||
var/mob/abstract/observer/G = ghosts[target]
|
||||
@@ -283,7 +283,7 @@ proc/get_ghosts(var/notify = 0,var/what = 2, var/client/C = null)
|
||||
else if (G.ckey)
|
||||
P = preferences_datums[G.ckey]
|
||||
else
|
||||
src << "Something went wrong, couldn't find the target's preferences datum"
|
||||
to_chat(src, "Something went wrong, couldn't find the target's preferences datum")
|
||||
return 0
|
||||
|
||||
for (var/entry in P.time_of_death)//Set all the prefs' times of death to a huge negative value so any respawn timers will be fine
|
||||
@@ -303,7 +303,7 @@ proc/get_ghosts(var/notify = 0,var/what = 2, var/client/C = null)
|
||||
set desc = "Toggles antagHUD usage for observers"
|
||||
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
var/action=""
|
||||
if(config.antag_hud_allowed)
|
||||
for(var/mob/abstract/observer/g in get_ghosts())
|
||||
@@ -312,18 +312,18 @@ proc/get_ghosts(var/notify = 0,var/what = 2, var/client/C = null)
|
||||
if(g.antagHUD)
|
||||
g.antagHUD = 0 // Disable it on those that have it enabled
|
||||
g.has_enabled_antagHUD = 2 // We'll allow them to respawn
|
||||
g << "<span class='warning'>The Administrator has disabled AntagHUD.</span> "
|
||||
to_chat(g, "<span class='warning'>The Administrator has disabled AntagHUD.</span> ")
|
||||
config.antag_hud_allowed = 0
|
||||
src << "<span class='danger'>AntagHUD usage has been disabled.</span>"
|
||||
to_chat(src, "<span class='danger'>AntagHUD usage has been disabled.</span>")
|
||||
action = "disabled"
|
||||
else
|
||||
for(var/mob/abstract/observer/g in get_ghosts())
|
||||
if(!g.client.holder) // Add the verb back for all non-admin ghosts
|
||||
g.verbs += /mob/abstract/observer/verb/toggle_antagHUD
|
||||
g << "<span class='notice'><B>The Administrator has enabled AntagHUD.</B></span>" // Notify all observers they can now use AntagHUD
|
||||
to_chat(g, "<span class='notice'><B>The Administrator has enabled AntagHUD.</B></span>") // Notify all observers they can now use AntagHUD)
|
||||
config.antag_hud_allowed = 1
|
||||
action = "enabled"
|
||||
src << "<span class='notice'><B>AntagHUD usage has been enabled.</B></span>"
|
||||
to_chat(src, "<span class='notice'><B>AntagHUD usage has been enabled.</B></span>")
|
||||
|
||||
|
||||
log_admin("[key_name(usr)] has [action] antagHUD usage for observers",admin_key=key_name(usr))
|
||||
@@ -336,23 +336,23 @@ proc/get_ghosts(var/notify = 0,var/what = 2, var/client/C = null)
|
||||
set name = "Toggle antagHUD Restrictions"
|
||||
set desc = "Restricts players that have used antagHUD from being able to join this round."
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
var/action=""
|
||||
if(config.antag_hud_restricted)
|
||||
for(var/mob/abstract/observer/g in get_ghosts())
|
||||
g << "<span class='notice'><B>The administrator has lifted restrictions on joining the round if you use AntagHUD</B></span>"
|
||||
to_chat(g, "<span class='notice'><B>The administrator has lifted restrictions on joining the round if you use AntagHUD</B></span>")
|
||||
action = "lifted restrictions"
|
||||
config.antag_hud_restricted = 0
|
||||
src << "<span class='notice'><B>AntagHUD restrictions have been lifted</B></span>"
|
||||
to_chat(src, "<span class='notice'><B>AntagHUD restrictions have been lifted</B></span>")
|
||||
else
|
||||
for(var/mob/abstract/observer/g in get_ghosts())
|
||||
g << "<span class='danger'>The administrator has placed restrictions on joining the round if you use AntagHUD</span>"
|
||||
g << "<span class='danger'>Your AntagHUD has been disabled, you may choose to re-enabled it but will be under restrictions </span>"
|
||||
to_chat(g, "<span class='danger'>The administrator has placed restrictions on joining the round if you use AntagHUD</span>")
|
||||
to_chat(g, "<span class='danger'>Your AntagHUD has been disabled, you may choose to re-enabled it but will be under restrictions </span>")
|
||||
g.antagHUD = 0
|
||||
g.has_enabled_antagHUD = 0
|
||||
action = "placed restrictions"
|
||||
config.antag_hud_restricted = 1
|
||||
src << "<span class='danger'>AntagHUD restrictions have been enabled</span>"
|
||||
to_chat(src, "<span class='danger'>AntagHUD restrictions have been enabled</span>")
|
||||
|
||||
log_admin("[key_name(usr)] has [action] on joining the round if they use AntagHUD",admin_key=key_name(usr))
|
||||
message_admins("Admin [key_name_admin(usr)] has [action] on joining the round if they use AntagHUD", 1)
|
||||
@@ -367,7 +367,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set name = "Respawn Character"
|
||||
set desc = "Respawn a person that has been gibbed/dusted/killed. They must be a ghost for this to work and preferably should not have a body to go back into."
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
var/input = ckey(input(src, "Please specify which key will be respawned.", "Key", ""))
|
||||
if(!input)
|
||||
@@ -380,7 +380,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
break
|
||||
|
||||
if(!G_found)//If a ghost was not found.
|
||||
usr << "<font color='red'>There is no active key like that in the game or the person is not currently a ghost.</font>"
|
||||
to_chat(usr, "<font color='red'>There is no active key like that in the game or the person is not currently a ghost.</font>")
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/new_character = new(pick(latejoin))//The mob being spawned.
|
||||
@@ -475,20 +475,20 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set category = "Fun"
|
||||
set name = "Add Custom AI law"
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
var/input = sanitize(input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null)
|
||||
if(!input)
|
||||
return
|
||||
for(var/mob/living/silicon/ai/M in mob_list)
|
||||
if (M.stat == 2)
|
||||
usr << "Upload failed. No signal is being detected from the AI."
|
||||
to_chat(usr, "Upload failed. No signal is being detected from the AI.")
|
||||
else if (M.see_in_dark == 0)
|
||||
usr << "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power."
|
||||
to_chat(usr, "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power.")
|
||||
else
|
||||
M.add_ion_law(input)
|
||||
for(var/mob/living/silicon/ai/O in mob_list)
|
||||
O << "<span class='danger'>" + input + "...LAWS UPDATED</span>"
|
||||
to_chat(O, "<span class='danger'>" + input + "...LAWS UPDATED</span>")
|
||||
O.show_laws()
|
||||
|
||||
log_admin("Admin [key_name(usr)] has added a new AI law - [input]",admin_key=key_name(usr))
|
||||
@@ -503,7 +503,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set category = "Special Verbs"
|
||||
set name = "Rejuvenate"
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
if(!mob)
|
||||
return
|
||||
@@ -523,7 +523,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set category = "Special Verbs"
|
||||
set name = "Create Command Report"
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
var/reporttitle
|
||||
var/reportbody
|
||||
@@ -533,7 +533,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if("Template")
|
||||
establish_db_connection(dbcon)
|
||||
if (!dbcon.IsConnected())
|
||||
src << "<span class='notice'>Unable to connect to the database.</span>"
|
||||
to_chat(src, "<span class='notice'>Unable to connect to the database.</span>")
|
||||
return
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT title, message FROM ss13_ccia_general_notice_list WHERE deleted_at IS NULL")
|
||||
query.Execute()
|
||||
@@ -547,7 +547,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
// Catch empty list
|
||||
if (!templates.len)
|
||||
src << "<span class='notice'>There are no templates in the database.</span>"
|
||||
to_chat(src, "<span class='notice'>There are no templates in the database.</span>")
|
||||
return
|
||||
|
||||
reporttitle = input(usr, "Please select a command report template.", "Create Command Report") in template_names
|
||||
@@ -589,7 +589,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set name = "Delete"
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
var/action = alert(src, "Are you sure you want to delete:\n[O]\nat ([O.x], [O.y], [O.z])?", "Confirmation", "Yes", "No", "Hard Delete")
|
||||
@@ -622,11 +622,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set name = "List free slots"
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
for(var/datum/job/job in SSjobs.occupations)
|
||||
src << "[job.title]: [job.total_positions]"
|
||||
to_chat(src, "[job.title]: [job.total_positions]")
|
||||
feedback_add_details("admin_verb","LFS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_explosion(atom/O as obj|mob|turf in range(world.view))
|
||||
@@ -719,7 +719,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set name = "Manual Ban"
|
||||
set category = "Special Verbs"
|
||||
if(!authenticated || !holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
var/mob/M = null
|
||||
switch(alert("How would you like to ban someone today?", "Manual Ban", "Key List", "Enter Manually", "Cancel"))
|
||||
@@ -746,9 +746,9 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
return
|
||||
if(M)
|
||||
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins)
|
||||
M << "\red<BIG><B>You have been banned by [usr.client.ckey].\nReason: [reason].</B></BIG>"
|
||||
M << "\red This is a temporary ban, it will be removed in [mins] minutes."
|
||||
M << "\red To try to resolve this matter head to http://ss13.donglabs.com/forum/"
|
||||
to_chat(M, "\red<BIG><B>You have been banned by [usr.client.ckey].\nReason: [reason].</B></BIG>")
|
||||
to_chat(M, "\red This is a temporary ban, it will be removed in [mins] minutes.")
|
||||
to_chat(M, "\red To try to resolve this matter head to http://ss13.donglabs.com/forum/")
|
||||
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
|
||||
message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
|
||||
world.Export("http://216.38.134.132/adminlog.php?type=ban&key=[usr.client.key]&key2=[M.key]&msg=[html_decode(reason)]&time=[mins]&server=[replacetext(config.server_name, "#", "")]")
|
||||
@@ -761,9 +761,9 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!reason)
|
||||
return
|
||||
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0)
|
||||
M << "\red<BIG><B>You have been banned by [usr.client.ckey].\nReason: [reason].</B></BIG>"
|
||||
M << "\red This is a permanent ban."
|
||||
M << "\red To try to resolve this matter head to http://ss13.donglabs.com/forum/"
|
||||
to_chat(M, "\red<BIG><B>You have been banned by [usr.client.ckey].\nReason: [reason].</B></BIG>")
|
||||
to_chat(M, "\red This is a permanent ban.")
|
||||
to_chat(M, "\red To try to resolve this matter head to http://ss13.donglabs.com/forum/")
|
||||
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
|
||||
message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
|
||||
world.Export("http://216.38.134.132/adminlog.php?type=ban&key=[usr.client.key]&key2=[M.key]&msg=[html_decode(reason)]&time=perma&server=[replacetext(config.server_name, "#", "")]")
|
||||
@@ -782,7 +782,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
var/list/L = M.get_contents()
|
||||
for(var/t in L)
|
||||
usr << "[t]"
|
||||
to_chat(usr, "[t]")
|
||||
feedback_add_details("admin_verb","CC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/* This proc is DEFERRED. Does not do anything.
|
||||
@@ -790,7 +790,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set category = "Debug"
|
||||
set name = "Stabilize Atmos."
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
feedback_add_details("admin_verb","STATM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
// DEFERRED
|
||||
@@ -900,9 +900,9 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set category = "Special Verbs"
|
||||
set name = "Attack Log"
|
||||
|
||||
usr << text("<span class='danger'>Attack Log for []</span>", mob)
|
||||
to_chat(usr, text("<span class='danger'>Attack Log for []</span>", mob))
|
||||
for(var/t in M.attack_log)
|
||||
usr << t
|
||||
to_chat(usr, t)
|
||||
feedback_add_details("admin_verb","ATTL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -914,13 +914,13 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!check_rights(R_FUN)) return
|
||||
|
||||
if (SSticker.mode)
|
||||
usr << "Nope you can't do this, the game's already started. This only works before rounds!"
|
||||
to_chat(usr, "Nope you can't do this, the game's already started. This only works before rounds!")
|
||||
return
|
||||
|
||||
if(SSticker.random_players)
|
||||
SSticker.random_players = 0
|
||||
message_admins("Admin [key_name_admin(usr)] has disabled \"Everyone is Special\" mode.", 1)
|
||||
usr << "Disabled."
|
||||
to_chat(usr, "Disabled.")
|
||||
return
|
||||
|
||||
|
||||
@@ -934,7 +934,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(notifyplayers == "Yes")
|
||||
to_world("<span class='notice'><b>Admin [usr.key] has forced the players to have completely random identities!</b></span>")
|
||||
|
||||
usr << "<i>Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet</i>."
|
||||
to_chat(usr, "<i>Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet</i>.")
|
||||
|
||||
SSticker.random_players = 1
|
||||
feedback_add_details("admin_verb","MER") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -949,11 +949,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
if(!config.allow_random_events)
|
||||
config.allow_random_events = 1
|
||||
usr << "Random events enabled"
|
||||
to_chat(usr, "Random events enabled")
|
||||
message_admins("Admin [key_name_admin(usr)] has enabled random events.", 1)
|
||||
else
|
||||
config.allow_random_events = 0
|
||||
usr << "Random events disabled"
|
||||
to_chat(usr, "Random events disabled")
|
||||
message_admins("Admin [key_name_admin(usr)] has disabled random events.", 1)
|
||||
feedback_add_details("admin_verb","TRE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -7,15 +7,15 @@ var/const/commandos_possible = 6 //if more Commandos are needed in the future
|
||||
set desc = "Spawns a strike team if you want to run an admin event."
|
||||
|
||||
if(!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
|
||||
if(!ROUND_IS_STARTED)
|
||||
usr << "<font color='red'>The game hasn't started yet!</font>"
|
||||
to_chat(usr, "<font color='red'>The game hasn't started yet!</font>")
|
||||
return
|
||||
|
||||
if(world.time < 6000)
|
||||
usr << "<font color='red'>There are [(6000-world.time)/10] seconds remaining before it may be called.</font>"
|
||||
to_chat(usr, "<font color='red'>There are [(6000-world.time)/10] seconds remaining before it may be called.</font>")
|
||||
return
|
||||
|
||||
var/datum/antagonist/deathsquad/team
|
||||
@@ -33,7 +33,7 @@ var/const/commandos_possible = 6 //if more Commandos are needed in the future
|
||||
return
|
||||
|
||||
if(team.deployed)
|
||||
usr << "<font color='red'>Someone is already sending a team.</font>"
|
||||
to_chat(usr, "<font color='red'>Someone is already sending a team.</font>")
|
||||
return
|
||||
|
||||
if(alert("Do you want to send in a strike team? Once enabled, this is irreversible.",,"Yes","No")!="Yes")
|
||||
@@ -49,7 +49,7 @@ var/const/commandos_possible = 6 //if more Commandos are needed in the future
|
||||
return
|
||||
|
||||
if(team.deployed)
|
||||
usr << "Looks like someone beat you to it."
|
||||
to_chat(usr, "Looks like someone beat you to it.")
|
||||
return
|
||||
|
||||
team.attempt_random_spawn()
|
||||
|
||||
@@ -19,4 +19,4 @@
|
||||
if("Yes") config.Tickcomp = 1
|
||||
else config.Tickcomp = 0
|
||||
else
|
||||
src << "<span class='warning'>Error: ticklag(): Invalid world.ticklag value. No changes made.</span>"
|
||||
to_chat(src, "<span class='warning'>Error: ticklag(): Invalid world.ticklag value. No changes made.</span>")
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
set name = "Create AI Triumvirate"
|
||||
|
||||
if(ROUND_IS_STARTED)
|
||||
usr << "This option is currently only usable during pregame. This may change at a later date."
|
||||
to_chat(usr, "This option is currently only usable during pregame. This may change at a later date.")
|
||||
return
|
||||
|
||||
var/datum/job/job = SSjobs.GetJob("AI")
|
||||
if(!job)
|
||||
usr << "Unable to locate the AI job"
|
||||
to_chat(usr, "Unable to locate the AI job")
|
||||
return
|
||||
if(SSticker.triai)
|
||||
SSticker.triai = 0
|
||||
usr << "Only one AI will be spawned at round start."
|
||||
to_chat(usr, "Only one AI will be spawned at round start.")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] has toggled off triple AIs at round start.</span>", 1)
|
||||
else
|
||||
SSticker.triai = 1
|
||||
usr << "There will be an AI Triumvirate at round start."
|
||||
to_chat(usr, "There will be an AI Triumvirate at round start.")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] has toggled on triple AIs at round start.</span>", 1)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
establish_db_connection(dbcon)
|
||||
if (!dbcon.IsConnected())
|
||||
usr << "<font color='red'>Error: warn(): Database Connection failed, reverting to legacy systems.</font>"
|
||||
to_chat(usr, "<font color='red'>Error: warn(): Database Connection failed, reverting to legacy systems.</font>")
|
||||
usr.client.warn_legacy(warned_ckey)
|
||||
return
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
feedback_add_details("admin_verb", "WARN-DB")
|
||||
if (C)
|
||||
C << "<font color='red'><BIG><B>You have been warned by an administrator.</B></BIG><br>Click <a href='byond://?src=\ref[src];warnview=1'>here</a> to review and acknowledge them!</font>"
|
||||
to_chat(C, "<font color='red'><BIG><B>You have been warned by an administrator.</B></BIG><br>Click <a href='byond://?src=\ref[src];warnview=1'>here</a> to review and acknowledge them!</font>")
|
||||
|
||||
message_admins("[key_name_admin(src)] has warned [warned_ckey] for: [warning_reason].")
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
/client/proc/warn_legacy(warned_ckey)
|
||||
if (!warned_ckey)
|
||||
usr << "<font color='red'>Error: warn_legacy(): No ckey passed!</font>"
|
||||
to_chat(usr, "<font color='red'>Error: warn_legacy(): No ckey passed!</font>")
|
||||
return
|
||||
|
||||
var/datum/preferences/D
|
||||
@@ -72,14 +72,14 @@
|
||||
else D = preferences_datums[warned_ckey]
|
||||
|
||||
if(!D)
|
||||
src << "<font color='red'>Error: warn_legacy(): No such ckey found.</font>"
|
||||
to_chat(src, "<font color='red'>Error: warn_legacy(): No such ckey found.</font>")
|
||||
return
|
||||
|
||||
if(++D.warns >= MAX_WARNS) //uh ohhhh...you'reee iiiiin trouuuubble O:)
|
||||
ban_unban_log_save("[ckey] warned [warned_ckey], resulting in a [AUTOBANTIME] minute autoban.")
|
||||
if(C)
|
||||
message_admins("[key_name_admin(src)] has warned [key_name_admin(C)] resulting in a [AUTOBANTIME] minute ban.")
|
||||
C << "<font color='red'><BIG><B>You have been autobanned due to a warning by [ckey].</B></BIG><br>This is a temporary ban, it will be removed in [AUTOBANTIME] minutes.</font>"
|
||||
to_chat(C, "<font color='red'><BIG><B>You have been autobanned due to a warning by [ckey].</B></BIG><br>This is a temporary ban, it will be removed in [AUTOBANTIME] minutes.</font>")
|
||||
qdel(C)
|
||||
else
|
||||
message_admins("[key_name_admin(src)] has warned [warned_ckey] resulting in a [AUTOBANTIME] minute ban.")
|
||||
@@ -87,7 +87,7 @@
|
||||
feedback_inc("ban_warn",1)
|
||||
else
|
||||
if(C)
|
||||
C << "<font color='red'><BIG><B>You have been warned by an administrator.</B></BIG><br>Further warnings will result in an autoban.</font>"
|
||||
to_chat(C, "<font color='red'><BIG><B>You have been warned by an administrator.</B></BIG><br>Further warnings will result in an autoban.</font>")
|
||||
message_admins("[key_name_admin(src)] has warned [key_name_admin(C)]. They have [MAX_WARNS-D.warns] strikes remaining.")
|
||||
else
|
||||
message_admins("[key_name_admin(src)] has warned [warned_ckey] (DC). They have [MAX_WARNS-D.warns] strikes remaining.")
|
||||
@@ -124,8 +124,8 @@
|
||||
var/DBQuery/notification_query = dbcon.NewQuery({"SELECT
|
||||
id, message, created_by
|
||||
FROM ss13_player_notifications
|
||||
WHERE
|
||||
acked_at IS NULL
|
||||
WHERE
|
||||
acked_at IS NULL
|
||||
AND ckey = :ckey:
|
||||
AND type IN ('player_greeting','player_greeting_chat')
|
||||
"})
|
||||
@@ -142,7 +142,7 @@
|
||||
dat += "<th width='60%'>TEXT</th>"
|
||||
dat += "<th width='20%'>ACKNOWLEDGE</th>"
|
||||
dat += "</tr>"
|
||||
|
||||
|
||||
dat += "<tr bgcolor='90ee90' align='center'>"
|
||||
dat += "<td>[notification_query.item[3]]</td>"
|
||||
dat += "<td>[notification_query.item[2]]</td>"
|
||||
@@ -434,7 +434,7 @@
|
||||
var/DBQuery/addquery = dbcon.NewQuery("INSERT INTO ss13_player_notifications (`ckey`, `type`, `message`, `created_by`) VALUES (:ckey:, :type:, :message:, :a_ckey:)")
|
||||
addquery.Execute(list("ckey" = ckey, "type" = type, "message" = message, "a_ckey" = usr.ckey))
|
||||
to_chat(usr,"Notification added.")
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* A proc for editing and deleting warnings issued
|
||||
@@ -464,12 +464,12 @@
|
||||
count++
|
||||
|
||||
if (count == 0)
|
||||
usr << "<span class='warning'>Database update failed due to a warning id not being present in the database.</span>"
|
||||
to_chat(usr, "<span class='warning'>Database update failed due to a warning id not being present in the database.</span>")
|
||||
error("Database update failed due to a warning id not being present in the database.")
|
||||
return
|
||||
|
||||
if (count > 1)
|
||||
usr << "<span class='warning'>Database update failed due to multiple warnings having the same ID. Contact the database admin.</span>"
|
||||
to_chat(usr, "<span class='warning'>Database update failed due to multiple warnings having the same ID. Contact the database admin.</span>")
|
||||
error("Database update failed due to multiple warnings having the same ID. Contact the database admin.")
|
||||
return
|
||||
|
||||
@@ -482,14 +482,14 @@
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] deleted one of [ckey]'s warnings.</span>")
|
||||
log_admin("[key_name(usr)] deleted one of [ckey]'s warnings.", admin_key=key_name(usr), ckey=ckey)
|
||||
else
|
||||
usr << "Cancelled"
|
||||
to_chat(usr, "Cancelled")
|
||||
return
|
||||
|
||||
if ("editReason")
|
||||
query_details["new_reason"] = input("Edit this warning's reason.", "New Reason", reason, null) as null|text
|
||||
|
||||
if(!query_details["new_reason"] || query_details["new_reason"] == reason)
|
||||
usr << "Cancelled"
|
||||
to_chat(usr, "Cancelled")
|
||||
return
|
||||
|
||||
var/DBQuery/reason_query = dbcon.NewQuery("UPDATE ss13_warnings SET reason = :new_reason:, edited = 1, lasteditor = :a_ckey:, lasteditdate = NOW() WHERE id = :warning_id:")
|
||||
@@ -502,7 +502,7 @@
|
||||
query_details["new_notes"] = input("Edit this warning's notes.", "New Notes", notes, null) as null|text
|
||||
|
||||
if(!query_details["new_notes"] || query_details["new_notes"] == notes)
|
||||
usr << "Cancelled"
|
||||
to_chat(usr, "Cancelled")
|
||||
return
|
||||
|
||||
var/DBQuery/notes_query = dbcon.NewQuery("UPDATE ss13_warnings SET notes = :new_notes:, edited = 1, lasteditor = :a_ckey:, lasteditdate = NOW() WHERE id = :warning_id:")
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
var/mob/M = locate(href_list["rename"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
to_chat(usr, "This can only be used on instances of type /mob")
|
||||
return
|
||||
|
||||
var/new_name = sanitize(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null, MAX_NAME_LEN)
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
var/D = locate(href_list["datumedit"])
|
||||
if(!istype(D,/datum) && !istype(D,/client))
|
||||
usr << "This can only be used on instances of types /client or /datum"
|
||||
to_chat(usr, "This can only be used on instances of types /client or /datum")
|
||||
return
|
||||
|
||||
modify_variables(D, href_list["varnameedit"], 1)
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
var/D = locate(href_list["datumchange"])
|
||||
if(!istype(D,/datum) && !istype(D,/client))
|
||||
usr << "This can only be used on instances of types /client or /datum"
|
||||
to_chat(usr, "This can only be used on instances of types /client or /datum")
|
||||
return
|
||||
|
||||
modify_variables(D, href_list["varnamechange"], 0)
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
var/atom/A = locate(href_list["datummass"])
|
||||
if(!istype(A))
|
||||
usr << "This can only be used on instances of type /atom"
|
||||
to_chat(usr, "This can only be used on instances of type /atom")
|
||||
return
|
||||
|
||||
cmd_mass_modify_object_variables(A, href_list["varnamemass"])
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
var/mob/M = locate(href_list["mob_player_panel"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
to_chat(usr, "This can only be used on instances of type /mob")
|
||||
return
|
||||
|
||||
src.holder.show_player_panel(M)
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
var/mob/M = locate(href_list["give_spell"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
to_chat(usr, "This can only be used on instances of type /mob")
|
||||
return
|
||||
|
||||
src.give_spell(M)
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
var/mob/M = locate(href_list["give_disease"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
to_chat(usr, "This can only be used on instances of type /mob")
|
||||
return
|
||||
|
||||
src.give_disease(M)
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
var/mob/M = locate(href_list["give_disease2"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
to_chat(usr, "This can only be used on instances of type /mob")
|
||||
return
|
||||
|
||||
src.give_disease2(M)
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
var/mob/M = locate(href_list["godmode"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
to_chat(usr, "This can only be used on instances of type /mob")
|
||||
return
|
||||
|
||||
src.cmd_admin_godmode(M)
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
var/mob/M = locate(href_list["gib"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
to_chat(usr, "This can only be used on instances of type /mob")
|
||||
return
|
||||
|
||||
src.cmd_admin_gib(M)
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
var/mob/M = locate(href_list["build_mode"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
to_chat(usr, "This can only be used on instances of type /mob")
|
||||
return
|
||||
|
||||
togglebuildmode(M)
|
||||
@@ -139,7 +139,7 @@
|
||||
|
||||
var/mob/M = locate(href_list["drop_everything"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
to_chat(usr, "This can only be used on instances of type /mob")
|
||||
return
|
||||
|
||||
if(usr.client)
|
||||
@@ -150,7 +150,7 @@
|
||||
|
||||
var/mob/M = locate(href_list["direct_control"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
to_chat(usr, "This can only be used on instances of type /mob")
|
||||
return
|
||||
|
||||
if(usr.client)
|
||||
@@ -161,7 +161,7 @@
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["make_skeleton"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human"
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
||||
return
|
||||
|
||||
H.ChangeToSkeleton()
|
||||
@@ -172,7 +172,7 @@
|
||||
|
||||
var/obj/O = locate(href_list["delall"])
|
||||
if(!isobj(O))
|
||||
usr << "This can only be used on instances of type /obj"
|
||||
to_chat(usr, "This can only be used on instances of type /obj")
|
||||
return
|
||||
|
||||
var/action_type = alert("Strict type ([O.type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel")
|
||||
@@ -199,7 +199,7 @@
|
||||
else
|
||||
qdel(Obj)
|
||||
if(!i)
|
||||
usr << "No objects of this type exist"
|
||||
to_chat(usr, "No objects of this type exist")
|
||||
return
|
||||
log_admin("[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted)", admin_key=key_name(usr))
|
||||
message_admins("<span class='notice'>[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted)</span>")
|
||||
@@ -214,7 +214,7 @@
|
||||
else
|
||||
qdel(Obj, TRUE)
|
||||
if(!i)
|
||||
usr << "No objects of this type exist"
|
||||
to_chat(usr, "No objects of this type exist")
|
||||
return
|
||||
log_admin("[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted)", admin_key=key_name(usr))
|
||||
message_admins("<span class='notice'>[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted)</span>")
|
||||
@@ -224,7 +224,7 @@
|
||||
|
||||
var/atom/A = locate(href_list["explode"])
|
||||
if(!isobj(A) && !ismob(A) && !isturf(A))
|
||||
usr << "This can only be done to instances of type /obj, /mob and /turf"
|
||||
to_chat(usr, "This can only be done to instances of type /obj, /mob and /turf")
|
||||
return
|
||||
|
||||
src.cmd_admin_explosion(A)
|
||||
@@ -235,7 +235,7 @@
|
||||
|
||||
var/atom/A = locate(href_list["emp"])
|
||||
if(!isobj(A) && !ismob(A) && !isturf(A))
|
||||
usr << "This can only be done to instances of type /obj, /mob and /turf"
|
||||
to_chat(usr, "This can only be done to instances of type /obj, /mob and /turf")
|
||||
return
|
||||
|
||||
src.cmd_admin_emp(A)
|
||||
@@ -246,7 +246,7 @@
|
||||
|
||||
var/datum/D = locate(href_list["mark_object"])
|
||||
if(!istype(D))
|
||||
usr << "This can only be done to instances of type /datum"
|
||||
to_chat(usr, "This can only be done to instances of type /datum")
|
||||
return
|
||||
|
||||
src.holder.marked_datum = D
|
||||
@@ -257,7 +257,7 @@
|
||||
|
||||
var/atom/A = locate(href_list["rotatedatum"])
|
||||
if(!istype(A))
|
||||
usr << "This can only be done to instances of type /atom"
|
||||
to_chat(usr, "This can only be done to instances of type /atom")
|
||||
return
|
||||
|
||||
switch(href_list["rotatedir"])
|
||||
@@ -270,12 +270,12 @@
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makemonkey"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human")
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
to_chat(usr, "Mob doesn't exist anymore")
|
||||
return
|
||||
holder.Topic(href, list("monkeyone"=href_list["makemonkey"]))
|
||||
|
||||
@@ -284,12 +284,12 @@
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makerobot"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human")
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
to_chat(usr, "Mob doesn't exist anymore")
|
||||
return
|
||||
holder.Topic(href, list("makerobot"=href_list["makerobot"]))
|
||||
|
||||
@@ -298,12 +298,12 @@
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makeslime"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human")
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
to_chat(usr, "Mob doesn't exist anymore")
|
||||
return
|
||||
holder.Topic(href, list("makeslime"=href_list["makeslime"]))
|
||||
|
||||
@@ -312,12 +312,12 @@
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makeai"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human")
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
to_chat(usr, "Mob doesn't exist anymore")
|
||||
return
|
||||
holder.Topic(href, list("makeai"=href_list["makeai"]))
|
||||
|
||||
@@ -326,26 +326,26 @@
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["setspecies"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human")
|
||||
return
|
||||
|
||||
var/new_species = input("Please choose a new species.","Species",null) as null|anything in all_species
|
||||
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
to_chat(usr, "Mob doesn't exist anymore")
|
||||
return
|
||||
|
||||
if(H.set_species(new_species))
|
||||
usr << "Set species of [H] to [H.species]."
|
||||
to_chat(usr, "Set species of [H] to [H.species].")
|
||||
else
|
||||
usr << "Failed! Something went wrong."
|
||||
to_chat(usr, "Failed! Something went wrong.")
|
||||
|
||||
else if(href_list["addlanguage"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/H = locate(href_list["addlanguage"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob"
|
||||
to_chat(usr, "This can only be done to instances of type /mob")
|
||||
return
|
||||
|
||||
var/new_language = input("Please choose a language to add.","Language",null) as null|anything in all_languages
|
||||
@@ -354,24 +354,24 @@
|
||||
return
|
||||
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
to_chat(usr, "Mob doesn't exist anymore")
|
||||
return
|
||||
|
||||
if(H.add_language(new_language))
|
||||
usr << "Added [new_language] to [H]."
|
||||
to_chat(usr, "Added [new_language] to [H].")
|
||||
else
|
||||
usr << "Mob already knows that language."
|
||||
to_chat(usr, "Mob already knows that language.")
|
||||
|
||||
else if(href_list["remlanguage"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/H = locate(href_list["remlanguage"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob"
|
||||
to_chat(usr, "This can only be done to instances of type /mob")
|
||||
return
|
||||
|
||||
if(!H.languages.len)
|
||||
usr << "This mob knows no languages."
|
||||
to_chat(usr, "This mob knows no languages.")
|
||||
return
|
||||
|
||||
var/datum/language/rem_language = input("Please choose a language to remove.","Language",null) as null|anything in H.languages
|
||||
@@ -380,13 +380,13 @@
|
||||
return
|
||||
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
to_chat(usr, "Mob doesn't exist anymore")
|
||||
return
|
||||
|
||||
if(H.remove_language(rem_language.name))
|
||||
usr << "Removed [rem_language] from [H]."
|
||||
to_chat(usr, "Removed [rem_language] from [H].")
|
||||
else
|
||||
usr << "Mob doesn't know that language."
|
||||
to_chat(usr, "Mob doesn't know that language.")
|
||||
|
||||
else if(href_list["addverb"])
|
||||
if(!check_rights(R_DEBUG|R_DEV)) return
|
||||
@@ -394,7 +394,7 @@
|
||||
var/mob/living/H = locate(href_list["addverb"])
|
||||
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living"
|
||||
to_chat(usr, "This can only be done to instances of type /mob/living")
|
||||
return
|
||||
var/list/possibleverbs = list()
|
||||
possibleverbs += "Cancel" // One for the top...
|
||||
@@ -411,7 +411,7 @@
|
||||
|
||||
var/verb = input("Select a verb!", "Verbs",null) as anything in possibleverbs
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
to_chat(usr, "Mob doesn't exist anymore")
|
||||
return
|
||||
if(!verb || verb == "Cancel")
|
||||
return
|
||||
@@ -424,11 +424,11 @@
|
||||
var/mob/H = locate(href_list["remverb"])
|
||||
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob"
|
||||
to_chat(usr, "This can only be done to instances of type /mob")
|
||||
return
|
||||
var/verb = input("Please choose a verb to remove.","Verbs",null) as null|anything in H.verbs
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
to_chat(usr, "Mob doesn't exist anymore")
|
||||
return
|
||||
if(!verb)
|
||||
return
|
||||
@@ -440,18 +440,18 @@
|
||||
|
||||
var/mob/living/carbon/M = locate(href_list["addorgan"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon"
|
||||
to_chat(usr, "This can only be done to instances of type /mob/living/carbon")
|
||||
return
|
||||
|
||||
var/new_organ = input("Please choose an organ to add.","Organ",null) as null|anything in typesof(/obj/item/organ)-/obj/item/organ
|
||||
if(!new_organ) return
|
||||
|
||||
if(!M)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
to_chat(usr, "Mob doesn't exist anymore")
|
||||
return
|
||||
|
||||
if(locate(new_organ) in M.internal_organs)
|
||||
usr << "Mob already has that organ."
|
||||
to_chat(usr, "Mob already has that organ.")
|
||||
return
|
||||
|
||||
new new_organ(M)
|
||||
@@ -462,20 +462,20 @@
|
||||
|
||||
var/mob/living/carbon/M = locate(href_list["remorgan"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon"
|
||||
to_chat(usr, "This can only be done to instances of type /mob/living/carbon")
|
||||
return
|
||||
|
||||
var/obj/item/organ/rem_organ = input("Please choose an organ to remove.","Organ",null) as null|anything in M.internal_organs
|
||||
|
||||
if(!M)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
to_chat(usr, "Mob doesn't exist anymore")
|
||||
return
|
||||
|
||||
if(!(locate(rem_organ) in M.internal_organs))
|
||||
usr << "Mob does not have that organ."
|
||||
to_chat(usr, "Mob does not have that organ.")
|
||||
return
|
||||
|
||||
usr << "Removed [rem_organ] from [M]."
|
||||
to_chat(usr, "Removed [rem_organ] from [M].")
|
||||
rem_organ.removed()
|
||||
qdel(rem_organ)
|
||||
|
||||
@@ -485,14 +485,14 @@
|
||||
var/mob/H = locate(href_list["fix_nano"])
|
||||
|
||||
if(!istype(H) || !H.client)
|
||||
usr << "This can only be done on mobs with clients"
|
||||
to_chat(usr, "This can only be done on mobs with clients")
|
||||
return
|
||||
|
||||
usr << span("alert", "This command is temporarily disabled.")
|
||||
to_chat(usr, span("alert", "This command is temporarily disabled."))
|
||||
//SSnanoui.send_resources(H.client)
|
||||
|
||||
//usr << "Resource files sent"
|
||||
//H << "Your NanoUI Resource files have been refreshed"
|
||||
//to_chat(usr, "Resource files sent")
|
||||
//to_chat(H, "Your NanoUI Resource files have been refreshed")
|
||||
|
||||
//log_admin("[key_name(usr)] resent the NanoUI resource files to [key_name(H)] ", admin_key=key_name(usr), ckey=key_name(H))
|
||||
|
||||
@@ -501,7 +501,7 @@
|
||||
|
||||
var/mob/M = locate(href_list["regenerateicons"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be done to instances of type /mob"
|
||||
to_chat(usr, "This can only be done to instances of type /mob")
|
||||
return
|
||||
M.regenerate_icons()
|
||||
|
||||
@@ -516,7 +516,7 @@
|
||||
var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num
|
||||
|
||||
if(!L)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
to_chat(usr, "Mob doesn't exist anymore")
|
||||
return
|
||||
|
||||
switch(Text)
|
||||
@@ -527,7 +527,7 @@
|
||||
if("brain") L.adjustBrainLoss(amount)
|
||||
if("clone") L.adjustCloneLoss(amount)
|
||||
else
|
||||
usr << "You caused an error. DEBUG: Text:[Text] Mob:[L]"
|
||||
to_chat(usr, "You caused an error. DEBUG: Text:[Text] Mob:[L]")
|
||||
return
|
||||
|
||||
if(amount != 0)
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
var/atom/A = D
|
||||
if(A.icon && A.icon_state)
|
||||
sprite = icon(A.icon, A.icon_state)
|
||||
usr << browse_rsc(sprite, "view_vars_sprite.png")
|
||||
to_chat(usr, browse_rsc(sprite, "view_vars_sprite.png"))
|
||||
|
||||
usr << browse_rsc('code/js/view_variables.js', "view_variables.js")
|
||||
to_chat(usr, browse_rsc('code/js/view_variables.js', "view_variables.js"))
|
||||
|
||||
var/html = {"
|
||||
<html>
|
||||
|
||||
Reference in New Issue
Block a user