mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge with dev.
This commit is contained in:
@@ -1052,6 +1052,10 @@
|
||||
#include "code\modules\mob\dead\observer\logout.dm"
|
||||
#include "code\modules\mob\dead\observer\observer.dm"
|
||||
#include "code\modules\mob\dead\observer\say.dm"
|
||||
#include "code\modules\mob\freelook\chunk.dm"
|
||||
#include "code\modules\mob\freelook\eye.dm"
|
||||
#include "code\modules\mob\freelook\update_triggers.dm"
|
||||
#include "code\modules\mob\freelook\visualnet.dm"
|
||||
#include "code\modules\mob\language\generic.dm"
|
||||
#include "code\modules\mob\language\language.dm"
|
||||
#include "code\modules\mob\language\monkey.dm"
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#define CONNECT_TYPE_REGULAR 1
|
||||
#define CONNECT_TYPE_SUPPLY 2
|
||||
#define CONNECT_TYPE_SCRUBBER 4
|
||||
#define CONNECT_TYPE_HE 8
|
||||
|
||||
var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_RED, "blue" = PIPE_COLOR_BLUE, "cyan" = PIPE_COLOR_CYAN, "green" = PIPE_COLOR_GREEN, "yellow" = PIPE_COLOR_YELLOW, "purple" = PIPE_COLOR_PURPLE)
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging
|
||||
pipe_icon = "hepipe"
|
||||
color = "#404040"
|
||||
level = 2
|
||||
connect_types = CONNECT_TYPE_HE
|
||||
layer = 2.41
|
||||
var/initialize_directions_he
|
||||
var/surface = 2 //surface area in m^2
|
||||
var/icon_temperature = T20C //stop small changes in temperature causing an icon refresh
|
||||
@@ -106,6 +108,7 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction
|
||||
icon_state = "intact"
|
||||
pipe_icon = "hejunction"
|
||||
level = 2
|
||||
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_HE
|
||||
minimum_temperature_difference = 300
|
||||
thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
|
||||
|
||||
|
||||
@@ -592,13 +592,13 @@ datum/proc/dd_SortValue()
|
||||
return "[src]"
|
||||
|
||||
/obj/machinery/dd_SortValue()
|
||||
return "[sanitize(name)]"
|
||||
return "[sanitize_old(name)]"
|
||||
|
||||
/obj/machinery/camera/dd_SortValue()
|
||||
return "[c_tag]"
|
||||
|
||||
/datum/alarm/dd_SortValue()
|
||||
return "[sanitize(last_name)]"
|
||||
return "[sanitize_old(last_name)]"
|
||||
|
||||
//creates every subtype of prototype (excluding prototype) and adds it to list L.
|
||||
//if no list/L is provided, one is created.
|
||||
|
||||
@@ -22,46 +22,103 @@
|
||||
* Text sanitization
|
||||
*/
|
||||
|
||||
//Simply removes < and > and limits the length of the message
|
||||
/proc/strip_html_simple(var/t,var/limit=MAX_MESSAGE_LEN)
|
||||
var/list/strip_chars = list("<",">")
|
||||
t = copytext(t,1,limit)
|
||||
for(var/char in strip_chars)
|
||||
var/index = findtext(t, char)
|
||||
while(index)
|
||||
t = copytext(t, 1, index) + copytext(t, index+1)
|
||||
index = findtext(t, char)
|
||||
return t
|
||||
//Used for preprocessing entered text
|
||||
/proc/sanitize(var/input, var/max_length = MAX_MESSAGE_LEN, var/encode = 1, var/trim = 1, var/extra = 1)
|
||||
if(!input)
|
||||
return
|
||||
|
||||
//Removes a few problematic characters
|
||||
/proc/sanitize_simple(var/t,var/list/repl_chars = list("\n"="#","\t"="#"))
|
||||
for(var/char in repl_chars)
|
||||
t = replacetext(t, char, repl_chars[char])
|
||||
return t
|
||||
if(max_length)
|
||||
input = copytext(input,1,max_length)
|
||||
|
||||
/proc/readd_quotes(var/t)
|
||||
var/list/repl_chars = list(""" = "\"")
|
||||
for(var/char in repl_chars)
|
||||
var/index = findtext(t, char)
|
||||
while(index)
|
||||
t = copytext(t, 1, index) + repl_chars[char] + copytext(t, index+5)
|
||||
index = findtext(t, char)
|
||||
return t
|
||||
if(extra)
|
||||
input = replace_characters(input, list("\n"=" ","\t"=" "))
|
||||
|
||||
//Runs byond's sanitization proc along-side sanitize_simple
|
||||
/proc/sanitize(var/t,var/list/repl_chars = null)
|
||||
return html_encode(sanitize_simple(t,repl_chars))
|
||||
if(encode)
|
||||
//In addition to processing html, html_encode removes byond formatting codes like "\red", "\i" and other.
|
||||
//It is important to avoid double-encode text, it can "break" quotes and some other characters.
|
||||
//Also, keep in mind that escaped characters don't work in the interface (window titles, lower left corner of the main window, etc.)
|
||||
input = html_encode(input)
|
||||
else
|
||||
//If not need encode text, simply remove < and >
|
||||
//note: we can also remove here byond formatting codes: 0xFF + next byte
|
||||
input = replace_characters(input, list("<"=" ", ">"=" "))
|
||||
|
||||
//Runs sanitize and strip_html_simple
|
||||
//I believe strip_html_simple() is required to run first to prevent '<' from displaying as '<' after sanitize() calls byond's html_encode()
|
||||
/proc/strip_html(var/t,var/limit=MAX_MESSAGE_LEN)
|
||||
return copytext((sanitize(strip_html_simple(t))),1,limit)
|
||||
if(trim)
|
||||
//Maybe, we need trim text twice? Here and before copytext?
|
||||
input = trim(input)
|
||||
|
||||
//Runs byond's sanitization proc along-side strip_html_simple
|
||||
//I believe strip_html_simple() is required to run first to prevent '<' from displaying as '<' that html_encode() would cause
|
||||
/proc/adminscrub(var/t,var/limit=MAX_MESSAGE_LEN)
|
||||
return copytext((html_encode(strip_html_simple(t))),1,limit)
|
||||
return input
|
||||
|
||||
//Run sanitize(), but remove <, >, " first to prevent displaying them as > < &34; in some places, after html_encode().
|
||||
//Best used for sanitize object names, window titles.
|
||||
//If you have a problem with sanitize() in chat, when quotes and >, < are displayed as html entites -
|
||||
//this is a problem of double-encode(when & becomes &), use sanitize() with encode=0, but not the sanitizeSafe()!
|
||||
/proc/sanitizeSafe(var/input, var/max_length = MAX_MESSAGE_LEN, var/encode = 1, var/trim = 1, var/extra = 1)
|
||||
return sanitize(replace_characters(input, list(">"=" ","<"=" ", "\""="'"), max_length, encode, trim, extra))
|
||||
|
||||
//Filters out undesirable characters from names
|
||||
/proc/sanitizeName(var/input, var/max_length = MAX_NAME_LEN, var/allow_numbers = 0)
|
||||
if(!input || length(input) > max_length)
|
||||
return //Rejects the input if it is null or if it is longer then the max length allowed
|
||||
|
||||
var/number_of_alphanumeric = 0
|
||||
var/last_char_group = 0
|
||||
var/output = ""
|
||||
|
||||
for(var/i=1, i<=length(input), i++)
|
||||
var/ascii_char = text2ascii(input,i)
|
||||
switch(ascii_char)
|
||||
// A .. Z
|
||||
if(65 to 90) //Uppercase Letters
|
||||
output += ascii2text(ascii_char)
|
||||
number_of_alphanumeric++
|
||||
last_char_group = 4
|
||||
|
||||
// a .. z
|
||||
if(97 to 122) //Lowercase Letters
|
||||
if(last_char_group<2) output += ascii2text(ascii_char-32) //Force uppercase first character
|
||||
else output += ascii2text(ascii_char)
|
||||
number_of_alphanumeric++
|
||||
last_char_group = 4
|
||||
|
||||
// 0 .. 9
|
||||
if(48 to 57) //Numbers
|
||||
if(!last_char_group) continue //suppress at start of string
|
||||
if(!allow_numbers) continue
|
||||
output += ascii2text(ascii_char)
|
||||
number_of_alphanumeric++
|
||||
last_char_group = 3
|
||||
|
||||
// ' - .
|
||||
if(39,45,46) //Common name punctuation
|
||||
if(!last_char_group) continue
|
||||
output += ascii2text(ascii_char)
|
||||
last_char_group = 2
|
||||
|
||||
// ~ | @ : # $ % & * +
|
||||
if(126,124,64,58,35,36,37,38,42,43) //Other symbols that we'll allow (mainly for AI)
|
||||
if(!last_char_group) continue //suppress at start of string
|
||||
if(!allow_numbers) continue
|
||||
output += ascii2text(ascii_char)
|
||||
last_char_group = 2
|
||||
|
||||
//Space
|
||||
if(32)
|
||||
if(last_char_group <= 1) continue //suppress double-spaces and spaces at start of string
|
||||
output += ascii2text(ascii_char)
|
||||
last_char_group = 1
|
||||
else
|
||||
return
|
||||
|
||||
if(number_of_alphanumeric < 2) return //protects against tiny names like "A" and also names like "' ' ' ' ' ' ' '"
|
||||
|
||||
if(last_char_group == 1)
|
||||
output = copytext(output,1,length(output)) //removes the last character (in this case a space)
|
||||
|
||||
for(var/bad_name in list("space","floor","wall","r-wall","monkey","unknown","inactive ai")) //prevents these common metagamey names
|
||||
if(cmptext(output,bad_name)) return //(not case sensitive)
|
||||
|
||||
return output
|
||||
|
||||
//Returns null if there is any bad text in the string
|
||||
/proc/reject_bad_text(var/text, var/max_length=512)
|
||||
@@ -76,97 +133,11 @@
|
||||
else non_whitespace = 1
|
||||
if(non_whitespace) return text //only accepts the text if it has some non-spaces
|
||||
|
||||
// Used to get a properly sanitized input, of max_length
|
||||
/proc/stripped_input(var/mob/user, var/message = "", var/title = "", var/default = "", var/max_length=MAX_MESSAGE_LEN)
|
||||
var/name = input(user, message, title, default)
|
||||
return strip_html_properly(name, max_length)
|
||||
|
||||
// Used to get a trimmed, properly sanitized input, of max_length
|
||||
/proc/trim_strip_input(var/mob/user, var/message = "", var/title = "", var/default = "", var/max_length=MAX_MESSAGE_LEN)
|
||||
return trim(stripped_input(user, message, title, default, max_length))
|
||||
//Old variant. Haven't dared to replace in some places.
|
||||
/proc/sanitize_old(var/t,var/list/repl_chars = list("\n"="#","\t"="#"))
|
||||
return html_encode(replace_characters(t,repl_chars))
|
||||
|
||||
//Filters out undesirable characters from names
|
||||
/proc/reject_bad_name(var/t_in, var/allow_numbers=0, var/max_length=MAX_NAME_LEN)
|
||||
if(!t_in || length(t_in) > max_length)
|
||||
return //Rejects the input if it is null or if it is longer then the max length allowed
|
||||
|
||||
var/number_of_alphanumeric = 0
|
||||
var/last_char_group = 0
|
||||
var/t_out = ""
|
||||
|
||||
for(var/i=1, i<=length(t_in), i++)
|
||||
var/ascii_char = text2ascii(t_in,i)
|
||||
switch(ascii_char)
|
||||
// A .. Z
|
||||
if(65 to 90) //Uppercase Letters
|
||||
t_out += ascii2text(ascii_char)
|
||||
number_of_alphanumeric++
|
||||
last_char_group = 4
|
||||
|
||||
// a .. z
|
||||
if(97 to 122) //Lowercase Letters
|
||||
if(last_char_group<2) t_out += ascii2text(ascii_char-32) //Force uppercase first character
|
||||
else t_out += ascii2text(ascii_char)
|
||||
number_of_alphanumeric++
|
||||
last_char_group = 4
|
||||
|
||||
// 0 .. 9
|
||||
if(48 to 57) //Numbers
|
||||
if(!last_char_group) continue //suppress at start of string
|
||||
if(!allow_numbers) continue
|
||||
t_out += ascii2text(ascii_char)
|
||||
number_of_alphanumeric++
|
||||
last_char_group = 3
|
||||
|
||||
// ' - .
|
||||
if(39,45,46) //Common name punctuation
|
||||
if(!last_char_group) continue
|
||||
t_out += ascii2text(ascii_char)
|
||||
last_char_group = 2
|
||||
|
||||
// ~ | @ : # $ % & * +
|
||||
if(126,124,64,58,35,36,37,38,42,43) //Other symbols that we'll allow (mainly for AI)
|
||||
if(!last_char_group) continue //suppress at start of string
|
||||
if(!allow_numbers) continue
|
||||
t_out += ascii2text(ascii_char)
|
||||
last_char_group = 2
|
||||
|
||||
//Space
|
||||
if(32)
|
||||
if(last_char_group <= 1) continue //suppress double-spaces and spaces at start of string
|
||||
t_out += ascii2text(ascii_char)
|
||||
last_char_group = 1
|
||||
else
|
||||
return
|
||||
|
||||
if(number_of_alphanumeric < 2) return //protects against tiny names like "A" and also names like "' ' ' ' ' ' ' '"
|
||||
|
||||
if(last_char_group == 1)
|
||||
t_out = copytext(t_out,1,length(t_out)) //removes the last character (in this case a space)
|
||||
|
||||
for(var/bad_name in list("space","floor","wall","r-wall","monkey","unknown","inactive ai")) //prevents these common metagamey names
|
||||
if(cmptext(t_out,bad_name)) return //(not case sensitive)
|
||||
|
||||
return t_out
|
||||
|
||||
//checks text for html tags
|
||||
//if tag is not in whitelist (var/list/paper_tag_whitelist in global.dm)
|
||||
//relpaces < with <
|
||||
proc/checkhtml(var/t)
|
||||
t = sanitize_simple(t, list("&#"="."))
|
||||
var/p = findtext(t,"<",1)
|
||||
while (p) //going through all the tags
|
||||
var/start = p++
|
||||
var/tag = copytext(t,p, p+1)
|
||||
if (tag != "/")
|
||||
while (reject_bad_text(copytext(t, p, p+1), 1))
|
||||
tag = copytext(t,start, p)
|
||||
p++
|
||||
tag = copytext(t,start+1, p)
|
||||
if (!(tag in paper_tag_whitelist)) //if it's unkown tag, disarming it
|
||||
t = copytext(t,1,start-1) + "<" + copytext(t,start+1)
|
||||
p = findtext(t,"<",p)
|
||||
return t
|
||||
/*
|
||||
* Text searches
|
||||
*/
|
||||
@@ -203,12 +174,18 @@ proc/checkhtml(var/t)
|
||||
/*
|
||||
* Text modification
|
||||
*/
|
||||
|
||||
/proc/replacetext(text, find, replacement)
|
||||
return list2text(text2list(text, find), replacement)
|
||||
|
||||
/proc/replacetextEx(text, find, replacement)
|
||||
return list2text(text2listEx(text, find), replacement)
|
||||
|
||||
/proc/replace_characters(var/t,var/list/repl_chars)
|
||||
for(var/char in repl_chars)
|
||||
replacetext(t, char, repl_chars[char])
|
||||
return t
|
||||
|
||||
//Adds 'u' number of zeros ahead of the text 't'
|
||||
/proc/add_zero(t, u)
|
||||
while (length(t) < u)
|
||||
@@ -239,7 +216,6 @@ proc/checkhtml(var/t)
|
||||
for (var/i = length(text), i > 0, i--)
|
||||
if (text2ascii(text, i) > 32)
|
||||
return copytext(text, 1, i + 1)
|
||||
|
||||
return ""
|
||||
|
||||
//Returns a string with reserved characters and spaces before the first word and after the last word removed.
|
||||
@@ -250,43 +226,18 @@ proc/checkhtml(var/t)
|
||||
/proc/capitalize(var/t as text)
|
||||
return uppertext(copytext(t, 1, 2)) + copytext(t, 2)
|
||||
|
||||
//Centers text by adding spaces to either side of the string.
|
||||
/proc/dd_centertext(message, length)
|
||||
var/new_message = message
|
||||
var/size = length(message)
|
||||
var/delta = length - size
|
||||
if(size == length)
|
||||
return new_message
|
||||
if(size > length)
|
||||
return copytext(new_message, 1, length + 1)
|
||||
if(delta == 1)
|
||||
return new_message + " "
|
||||
if(delta % 2)
|
||||
new_message = " " + new_message
|
||||
delta--
|
||||
var/spaces = add_lspace("",delta/2-1)
|
||||
return spaces + new_message + spaces
|
||||
|
||||
//Limits the length of the text. Note: MAX_MESSAGE_LEN and MAX_NAME_LEN are widely used for this purpose
|
||||
/proc/dd_limittext(message, length)
|
||||
var/size = length(message)
|
||||
if(size <= length)
|
||||
return message
|
||||
return copytext(message, 1, length + 1)
|
||||
|
||||
|
||||
/proc/stringmerge(var/text,var/compare,replace = "*")
|
||||
//This proc fills in all spaces with the "replace" var (* by default) with whatever
|
||||
//is in the other string at the same spot (assuming it is not a replace char).
|
||||
//This is used for fingerprints
|
||||
/proc/stringmerge(var/text,var/compare,replace = "*")
|
||||
var/newtext = text
|
||||
if(lentext(text) != lentext(compare))
|
||||
return 0
|
||||
for(var/i = 1, i < lentext(text), i++)
|
||||
var/a = copytext(text,i,i+1)
|
||||
var/b = copytext(compare,i,i+1)
|
||||
//if it isn't both the same letter, or if they are both the replacement character
|
||||
//(no way to know what it was supposed to be)
|
||||
//if it isn't both the same letter, or if they are both the replacement character
|
||||
//(no way to know what it was supposed to be)
|
||||
if(a != b)
|
||||
if(a == replace) //if A is the replacement char
|
||||
newtext = copytext(newtext,1,i) + b + copytext(newtext, i+1)
|
||||
@@ -296,9 +247,9 @@ proc/checkhtml(var/t)
|
||||
return 0
|
||||
return newtext
|
||||
|
||||
/proc/stringpercent(var/text,character = "*")
|
||||
//This proc returns the number of chars of the string that is the character
|
||||
//This is used for detective work to determine fingerprint completion.
|
||||
/proc/stringpercent(var/text,character = "*")
|
||||
if(!text || !character)
|
||||
return 0
|
||||
var/count = 0
|
||||
@@ -325,36 +276,6 @@ proc/TextPreview(var/string,var/len=40)
|
||||
else
|
||||
return "[copytext(string, 1, 37)]..."
|
||||
|
||||
//This proc strips html properly, but it's not lazy like the other procs.
|
||||
//This means that it doesn't just remove < and > and call it a day.
|
||||
//Also limit the size of the input, if specified.
|
||||
/proc/strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN)
|
||||
if(!input)
|
||||
return
|
||||
var/opentag = 1 //These store the position of < and > respectively.
|
||||
var/closetag = 1
|
||||
while(1)
|
||||
opentag = findtext(input, "<")
|
||||
closetag = findtext(input, ">")
|
||||
if(closetag && opentag)
|
||||
if(closetag < opentag)
|
||||
input = copytext(input, (closetag + 1))
|
||||
else
|
||||
input = copytext(input, 1, opentag) + copytext(input, (closetag + 1))
|
||||
else if(closetag || opentag)
|
||||
if(opentag)
|
||||
input = copytext(input, 1, opentag)
|
||||
else
|
||||
input = copytext(input, (closetag + 1))
|
||||
else
|
||||
break
|
||||
if(max_length)
|
||||
input = copytext(input,1,max_length)
|
||||
return sanitize(input)
|
||||
|
||||
/proc/trim_strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN)
|
||||
return trim(strip_html_properly(input, max_length))
|
||||
|
||||
//For generating neat chat tag-images
|
||||
//The icon var could be local in the proc, but it's a waste of resources
|
||||
// to always create it and then throw it out.
|
||||
|
||||
@@ -308,10 +308,10 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
var/newname
|
||||
|
||||
for(var/i=1,i<=3,i++) //we get 3 attempts to pick a suitable name.
|
||||
newname = input(src,"You are a [role]. Would you like to change your name to something else?", "Name change",oldname) as text
|
||||
if((world.time-time_passed)>300)
|
||||
newname = input(src,"You are \a [role]. Would you like to change your name to something else?", "Name change",oldname) as text
|
||||
if((world.time-time_passed)>3000)
|
||||
return //took too long
|
||||
newname = reject_bad_name(newname,allow_numbers) //returns null if the name doesn't meet some basic requirements. Tidies up a few other things like bad-characters.
|
||||
newname = sanitizeName(newname, ,allow_numbers) //returns null if the name doesn't meet some basic requirements. Tidies up a few other things like bad-characters.
|
||||
|
||||
for(var/mob/living/M in player_list)
|
||||
if(M == src)
|
||||
|
||||
@@ -241,10 +241,10 @@ datum/controller/vote
|
||||
choices.Add(antag.role_text)
|
||||
choices.Add("None")
|
||||
if("custom")
|
||||
question = html_encode(input(usr,"What is the vote for?") as text|null)
|
||||
question = sanitizeSafe(input(usr,"What is the vote for?") as text|null)
|
||||
if(!question) return 0
|
||||
for(var/i=1,i<=10,i++)
|
||||
var/option = capitalize(html_encode(input(usr,"Please enter an option or hit cancel to finish") as text|null))
|
||||
var/option = capitalize(sanitize(input(usr,"Please enter an option or hit cancel to finish") as text|null))
|
||||
if(!option || mode || !usr.client) break
|
||||
choices.Add(option)
|
||||
else
|
||||
|
||||
@@ -427,7 +427,7 @@ client
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
var/new_name = sanitize(copytext(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null,1,MAX_NAME_LEN))
|
||||
var/new_name = sanitize(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null, MAX_NAME_LEN)
|
||||
if( !new_name || !M ) return
|
||||
|
||||
message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].")
|
||||
|
||||
988
code/datums/datumvars.dm.orig
Normal file
988
code/datums/datumvars.dm.orig
Normal file
@@ -0,0 +1,988 @@
|
||||
|
||||
// reference: /client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0)
|
||||
|
||||
client
|
||||
proc/debug_variables(datum/D in world)
|
||||
set category = "Debug"
|
||||
set name = "View Variables"
|
||||
//set src in world
|
||||
|
||||
|
||||
if(!usr.client || !usr.client.holder)
|
||||
usr << "\red You need to be an administrator to access this."
|
||||
return
|
||||
|
||||
|
||||
var/title = ""
|
||||
var/body = ""
|
||||
|
||||
if(!D) return
|
||||
if(istype(D, /atom))
|
||||
var/atom/A = D
|
||||
title = "[A.name] (\ref[A]) = [A.type]"
|
||||
|
||||
#ifdef VARSICON
|
||||
if (A.icon)
|
||||
body += debug_variable("icon", new/icon(A.icon, A.icon_state, A.dir), 0)
|
||||
#endif
|
||||
|
||||
var/icon/sprite
|
||||
|
||||
if(istype(D,/atom))
|
||||
var/atom/AT = D
|
||||
if(AT.icon && AT.icon_state)
|
||||
sprite = new /icon(AT.icon, AT.icon_state)
|
||||
usr << browse_rsc(sprite, "view_vars_sprite.png")
|
||||
|
||||
title = "[D] (\ref[D]) = [D.type]"
|
||||
|
||||
body += {"<script type="text/javascript">
|
||||
|
||||
function updateSearch(){
|
||||
var filter_text = document.getElementById('filter');
|
||||
var filter = filter_text.value.toLowerCase();
|
||||
|
||||
if(event.keyCode == 13){ //Enter / return
|
||||
var vars_ol = document.getElementById('vars');
|
||||
var lis = vars_ol.getElementsByTagName("li");
|
||||
for ( var i = 0; i < lis.length; ++i )
|
||||
{
|
||||
try{
|
||||
var li = lis\[i\];
|
||||
if ( li.style.backgroundColor == "#ffee88" )
|
||||
{
|
||||
alist = lis\[i\].getElementsByTagName("a")
|
||||
if(alist.length > 0){
|
||||
location.href=alist\[0\].href;
|
||||
}
|
||||
}
|
||||
}catch(err) { }
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if(event.keyCode == 38){ //Up arrow
|
||||
var vars_ol = document.getElementById('vars');
|
||||
var lis = vars_ol.getElementsByTagName("li");
|
||||
for ( var i = 0; i < lis.length; ++i )
|
||||
{
|
||||
try{
|
||||
var li = lis\[i\];
|
||||
if ( li.style.backgroundColor == "#ffee88" )
|
||||
{
|
||||
if( (i-1) >= 0){
|
||||
var li_new = lis\[i-1\];
|
||||
li.style.backgroundColor = "white";
|
||||
li_new.style.backgroundColor = "#ffee88";
|
||||
return
|
||||
}
|
||||
}
|
||||
}catch(err) { }
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if(event.keyCode == 40){ //Down arrow
|
||||
var vars_ol = document.getElementById('vars');
|
||||
var lis = vars_ol.getElementsByTagName("li");
|
||||
for ( var i = 0; i < lis.length; ++i )
|
||||
{
|
||||
try{
|
||||
var li = lis\[i\];
|
||||
if ( li.style.backgroundColor == "#ffee88" )
|
||||
{
|
||||
if( (i+1) < lis.length){
|
||||
var li_new = lis\[i+1\];
|
||||
li.style.backgroundColor = "white";
|
||||
li_new.style.backgroundColor = "#ffee88";
|
||||
return
|
||||
}
|
||||
}
|
||||
}catch(err) { }
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//This part here resets everything to how it was at the start so the filter is applied to the complete list. Screw efficiency, it's client-side anyway and it only looks through 200 or so variables at maximum anyway (mobs).
|
||||
if(complete_list != null && complete_list != ""){
|
||||
var vars_ol1 = document.getElementById("vars");
|
||||
vars_ol1.innerHTML = complete_list
|
||||
}
|
||||
|
||||
if(filter.value == ""){
|
||||
return;
|
||||
}else{
|
||||
var vars_ol = document.getElementById('vars');
|
||||
var lis = vars_ol.getElementsByTagName("li");
|
||||
|
||||
for ( var i = 0; i < lis.length; ++i )
|
||||
{
|
||||
try{
|
||||
var li = lis\[i\];
|
||||
if ( li.innerText.toLowerCase().indexOf(filter) == -1 )
|
||||
{
|
||||
vars_ol.removeChild(li);
|
||||
i--;
|
||||
}
|
||||
}catch(err) { }
|
||||
}
|
||||
}
|
||||
var lis_new = vars_ol.getElementsByTagName("li");
|
||||
for ( var j = 0; j < lis_new.length; ++j )
|
||||
{
|
||||
var li1 = lis\[j\];
|
||||
if (j == 0){
|
||||
li1.style.backgroundColor = "#ffee88";
|
||||
}else{
|
||||
li1.style.backgroundColor = "white";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function selectTextField(){
|
||||
var filter_text = document.getElementById('filter');
|
||||
filter_text.focus();
|
||||
filter_text.select();
|
||||
|
||||
}
|
||||
|
||||
function loadPage(list) {
|
||||
|
||||
if(list.options\[list.selectedIndex\].value == ""){
|
||||
return;
|
||||
}
|
||||
|
||||
location.href=list.options\[list.selectedIndex\].value;
|
||||
|
||||
}
|
||||
</script> "}
|
||||
|
||||
body += "<body onload='selectTextField(); updateSearch()' onkeyup='updateSearch()'>"
|
||||
|
||||
body += "<div align='center'><table width='100%'><tr><td width='50%'>"
|
||||
|
||||
if(sprite)
|
||||
body += "<table align='center' width='100%'><tr><td><img src='view_vars_sprite.png'></td><td>"
|
||||
else
|
||||
body += "<table align='center' width='100%'><tr><td>"
|
||||
|
||||
body += "<div align='center'>"
|
||||
|
||||
if(istype(D,/atom))
|
||||
var/atom/A = D
|
||||
if(isliving(A))
|
||||
body += "<a href='?_src_=vars;rename=\ref[D]'><b>[D]</b></a>"
|
||||
if(A.dir)
|
||||
body += "<br><font size='1'><a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='?_src_=vars;datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
|
||||
var/mob/living/M = A
|
||||
body += "<br><font size='1'><a href='?_src_=vars;datumedit=\ref[D];varnameedit=ckey'>[M.ckey ? M.ckey : "No ckey"]</a> / <a href='?_src_=vars;datumedit=\ref[D];varnameedit=real_name'>[M.real_name ? M.real_name : "No real name"]</a></font>"
|
||||
body += {"
|
||||
<br><font size='1'>
|
||||
BRUTE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=brute'>[M.getBruteLoss()]</a>
|
||||
FIRE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=fire'>[M.getFireLoss()]</a>
|
||||
TOXIN:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=toxin'>[M.getToxLoss()]</a>
|
||||
OXY:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=oxygen'>[M.getOxyLoss()]</a>
|
||||
CLONE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=clone'>[M.getCloneLoss()]</a>
|
||||
BRAIN:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=brain'>[M.getBrainLoss()]</a>
|
||||
</font>
|
||||
|
||||
|
||||
"}
|
||||
else
|
||||
body += "<a href='?_src_=vars;datumedit=\ref[D];varnameedit=name'><b>[D]</b></a>"
|
||||
if(A.dir)
|
||||
body += "<br><font size='1'><a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='?_src_=vars;datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
|
||||
else
|
||||
body += "<b>[D]</b>"
|
||||
|
||||
body += "</div>"
|
||||
|
||||
body += "</tr></td></table>"
|
||||
|
||||
var/formatted_type = text("[D.type]")
|
||||
if(length(formatted_type) > 25)
|
||||
var/middle_point = length(formatted_type) / 2
|
||||
var/splitpoint = findtext(formatted_type,"/",middle_point)
|
||||
if(splitpoint)
|
||||
formatted_type = "[copytext(formatted_type,1,splitpoint)]<br>[copytext(formatted_type,splitpoint)]"
|
||||
else
|
||||
formatted_type = "Type too long" //No suitable splitpoint (/) found.
|
||||
|
||||
body += "<div align='center'><b><font size='1'>[formatted_type]</font></b>"
|
||||
|
||||
if(src.holder && src.holder.marked_datum && src.holder.marked_datum == D)
|
||||
body += "<br><font size='1' color='red'><b>Marked Object</b></font>"
|
||||
|
||||
body += "</div>"
|
||||
|
||||
body += "</div></td>"
|
||||
|
||||
body += "<td width='50%'><div align='center'><a href='?_src_=vars;datumrefresh=\ref[D]'>Refresh</a>"
|
||||
|
||||
//if(ismob(D))
|
||||
// body += "<br><a href='?_src_=vars;mob_player_panel=\ref[D]'>Show player panel</a></div></td></tr></table></div><hr>"
|
||||
|
||||
body += {" <form>
|
||||
<select name="file" size="1"
|
||||
onchange="loadPage(this.form.elements\[0\])"
|
||||
target="_parent._top"
|
||||
onmouseclick="this.focus()"
|
||||
style="background-color:#ffffff">
|
||||
"}
|
||||
|
||||
body += {" <option value>Select option</option>
|
||||
<option value> </option>
|
||||
"}
|
||||
|
||||
|
||||
body += "<option value='?_src_=vars;mark_object=\ref[D]'>Mark Object</option>"
|
||||
if(ismob(D))
|
||||
body += "<option value='?_src_=vars;mob_player_panel=\ref[D]'>Show player panel</option>"
|
||||
|
||||
body += "<option value>---</option>"
|
||||
|
||||
if(ismob(D))
|
||||
body += "<option value='?_src_=vars;give_spell=\ref[D]'>Give Spell</option>"
|
||||
body += "<option value='?_src_=vars;give_disease2=\ref[D]'>Give Disease</option>"
|
||||
body += "<option value='?_src_=vars;give_disease=\ref[D]'>Give TG-style Disease</option>"
|
||||
body += "<option value='?_src_=vars;godmode=\ref[D]'>Toggle Godmode</option>"
|
||||
body += "<option value='?_src_=vars;build_mode=\ref[D]'>Toggle Build Mode</option>"
|
||||
|
||||
body += "<option value='?_src_=vars;ninja=\ref[D]'>Make Space Ninja</option>"
|
||||
body += "<option value='?_src_=vars;make_skeleton=\ref[D]'>Make 2spooky</option>"
|
||||
|
||||
body += "<option value='?_src_=vars;direct_control=\ref[D]'>Assume Direct Control</option>"
|
||||
body += "<option value='?_src_=vars;drop_everything=\ref[D]'>Drop Everything</option>"
|
||||
|
||||
body += "<option value='?_src_=vars;regenerateicons=\ref[D]'>Regenerate Icons</option>"
|
||||
body += "<option value='?_src_=vars;addlanguage=\ref[D]'>Add Language</option>"
|
||||
body += "<option value='?_src_=vars;remlanguage=\ref[D]'>Remove Language</option>"
|
||||
body += "<option value='?_src_=vars;addorgan=\ref[D]'>Add Organ</option>"
|
||||
body += "<option value='?_src_=vars;remorgan=\ref[D]'>Remove Organ</option>"
|
||||
|
||||
body += "<option value='?_src_=vars;fix_nano=\ref[D]'>Fix NanoUI</option>"
|
||||
|
||||
body += "<option value='?_src_=vars;addverb=\ref[D]'>Add Verb</option>"
|
||||
body += "<option value='?_src_=vars;remverb=\ref[D]'>Remove Verb</option>"
|
||||
if(ishuman(D))
|
||||
body += "<option value>---</option>"
|
||||
body += "<option value='?_src_=vars;setspecies=\ref[D]'>Set Species</option>"
|
||||
body += "<option value='?_src_=vars;makeai=\ref[D]'>Make AI</option>"
|
||||
body += "<option value='?_src_=vars;makerobot=\ref[D]'>Make cyborg</option>"
|
||||
body += "<option value='?_src_=vars;makemonkey=\ref[D]'>Make monkey</option>"
|
||||
body += "<option value='?_src_=vars;makealien=\ref[D]'>Make alien</option>"
|
||||
body += "<option value='?_src_=vars;makeslime=\ref[D]'>Make slime</option>"
|
||||
body += "<option value>---</option>"
|
||||
body += "<option value='?_src_=vars;gib=\ref[D]'>Gib</option>"
|
||||
if(isobj(D))
|
||||
body += "<option value='?_src_=vars;delall=\ref[D]'>Delete all of type</option>"
|
||||
if(isobj(D) || ismob(D) || isturf(D))
|
||||
body += "<option value='?_src_=vars;explode=\ref[D]'>Trigger explosion</option>"
|
||||
body += "<option value='?_src_=vars;emp=\ref[D]'>Trigger EM pulse</option>"
|
||||
|
||||
body += "</select></form>"
|
||||
|
||||
body += "</div></td></tr></table></div><hr>"
|
||||
|
||||
body += "<font size='1'><b>E</b> - Edit, tries to determine the variable type by itself.<br>"
|
||||
body += "<b>C</b> - Change, asks you for the var type first.<br>"
|
||||
body += "<b>M</b> - Mass modify: changes this variable for all objects of this type.</font><br>"
|
||||
|
||||
body += "<hr><table width='100%'><tr><td width='20%'><div align='center'><b>Search:</b></div></td><td width='80%'><input type='text' id='filter' name='filter_text' value='' style='width:100%;'></td></tr></table><hr>"
|
||||
|
||||
body += "<ol id='vars'>"
|
||||
|
||||
var/list/names = list()
|
||||
for (var/V in D.vars)
|
||||
names += V
|
||||
|
||||
names = sortList(names)
|
||||
|
||||
for (var/V in names)
|
||||
body += debug_variable(V, D.vars[V], 0, D)
|
||||
|
||||
body += "</ol>"
|
||||
|
||||
var/html = "<html><head>"
|
||||
if (title)
|
||||
html += "<title>[title]</title>"
|
||||
html += {"<style>
|
||||
body
|
||||
{
|
||||
font-family: Verdana, sans-serif;
|
||||
font-size: 9pt;
|
||||
}
|
||||
.value
|
||||
{
|
||||
font-family: "Courier New", monospace;
|
||||
font-size: 8pt;
|
||||
}
|
||||
</style>"}
|
||||
html += "</head><body>"
|
||||
html += body
|
||||
|
||||
html += {"
|
||||
<script type='text/javascript'>
|
||||
var vars_ol = document.getElementById("vars");
|
||||
var complete_list = vars_ol.innerHTML;
|
||||
</script>
|
||||
"}
|
||||
|
||||
html += "</body></html>"
|
||||
|
||||
usr << browse(html, "window=variables\ref[D];size=475x650")
|
||||
|
||||
return
|
||||
|
||||
proc/debug_variable(name, value, level, var/datum/DA = null)
|
||||
var/html = ""
|
||||
|
||||
if(DA)
|
||||
html += "<li style='backgroundColor:white'>(<a href='?_src_=vars;datumedit=\ref[DA];varnameedit=[name]'>E</a>) (<a href='?_src_=vars;datumchange=\ref[DA];varnamechange=[name]'>C</a>) (<a href='?_src_=vars;datummass=\ref[DA];varnamemass=[name]'>M</a>) "
|
||||
else
|
||||
html += "<li>"
|
||||
|
||||
if (isnull(value))
|
||||
html += "[name] = <span class='value'>null</span>"
|
||||
|
||||
else if (istext(value))
|
||||
html += "[name] = <span class='value'>\"[value]\"</span>"
|
||||
|
||||
else if (isicon(value))
|
||||
#ifdef VARSICON
|
||||
var/icon/I = new/icon(value)
|
||||
var/rnd = rand(1,10000)
|
||||
var/rname = "tmp\ref[I][rnd].png"
|
||||
usr << browse_rsc(I, rname)
|
||||
html += "[name] = (<span class='value'>[value]</span>) <img class=icon src=\"[rname]\">"
|
||||
#else
|
||||
html += "[name] = /icon (<span class='value'>[value]</span>)"
|
||||
#endif
|
||||
|
||||
/* else if (istype(value, /image))
|
||||
#ifdef VARSICON
|
||||
var/rnd = rand(1, 10000)
|
||||
var/image/I = value
|
||||
|
||||
src << browse_rsc(I.icon, "tmp\ref[value][rnd].png")
|
||||
html += "[name] = <img src=\"tmp\ref[value][rnd].png\">"
|
||||
#else
|
||||
html += "[name] = /image (<span class='value'>[value]</span>)"
|
||||
#endif
|
||||
*/
|
||||
else if (isfile(value))
|
||||
html += "[name] = <span class='value'>'[value]'</span>"
|
||||
|
||||
else if (istype(value, /datum))
|
||||
var/datum/D = value
|
||||
html += "<a href='?_src_=vars;Vars=\ref[value]'>[name] \ref[value]</a> = [D.type]"
|
||||
|
||||
else if (istype(value, /client))
|
||||
var/client/C = value
|
||||
html += "<a href='?_src_=vars;Vars=\ref[value]'>[name] \ref[value]</a> = [C] [C.type]"
|
||||
//
|
||||
else if (istype(value, /list))
|
||||
var/list/L = value
|
||||
html += "[name] = /list ([L.len])"
|
||||
|
||||
if (L.len > 0 && !(name == "underlays" || name == "overlays" || name == "vars" || L.len > 500))
|
||||
// not sure if this is completely right...
|
||||
if(0) //(L.vars.len > 0)
|
||||
html += "<ol>"
|
||||
html += "</ol>"
|
||||
else
|
||||
html += "<ul>"
|
||||
var/index = 1
|
||||
for (var/entry in L)
|
||||
if(istext(entry))
|
||||
html += debug_variable(entry, L[entry], level + 1)
|
||||
//html += debug_variable("[index]", L[index], level + 1)
|
||||
else
|
||||
html += debug_variable(index, L[index], level + 1)
|
||||
index++
|
||||
html += "</ul>"
|
||||
|
||||
else
|
||||
html += "[name] = <span class='value'>[value]</span>"
|
||||
|
||||
html += "</li>"
|
||||
|
||||
return html
|
||||
|
||||
/client/proc/view_var_Topic(href, href_list, hsrc)
|
||||
//This should all be moved over to datum/admins/Topic() or something ~Carn
|
||||
if( (usr.client != src) || !src.holder )
|
||||
return
|
||||
if(href_list["Vars"])
|
||||
debug_variables(locate(href_list["Vars"]))
|
||||
|
||||
//~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records).
|
||||
else if(href_list["rename"])
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
|
||||
var/mob/M = locate(href_list["rename"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
var/new_name = sanitize(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null, MAX_NAME_LEN)
|
||||
if( !new_name || !M ) return
|
||||
|
||||
message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].")
|
||||
M.fully_replace_character_name(M.real_name,new_name)
|
||||
href_list["datumrefresh"] = href_list["rename"]
|
||||
|
||||
else if(href_list["varnameedit"] && href_list["datumedit"])
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
|
||||
var/D = locate(href_list["datumedit"])
|
||||
if(!istype(D,/datum) && !istype(D,/client))
|
||||
usr << "This can only be used on instances of types /client or /datum"
|
||||
return
|
||||
|
||||
modify_variables(D, href_list["varnameedit"], 1)
|
||||
|
||||
else if(href_list["varnamechange"] && href_list["datumchange"])
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
|
||||
var/D = locate(href_list["datumchange"])
|
||||
if(!istype(D,/datum) && !istype(D,/client))
|
||||
usr << "This can only be used on instances of types /client or /datum"
|
||||
return
|
||||
|
||||
modify_variables(D, href_list["varnamechange"], 0)
|
||||
|
||||
else if(href_list["varnamemass"] && href_list["datummass"])
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
|
||||
var/atom/A = locate(href_list["datummass"])
|
||||
if(!istype(A))
|
||||
usr << "This can only be used on instances of type /atom"
|
||||
return
|
||||
|
||||
cmd_mass_modify_object_variables(A, href_list["varnamemass"])
|
||||
|
||||
else if(href_list["mob_player_panel"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["mob_player_panel"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.holder.show_player_panel(M)
|
||||
href_list["datumrefresh"] = href_list["mob_player_panel"]
|
||||
|
||||
else if(href_list["give_spell"])
|
||||
if(!check_rights(R_ADMIN|R_FUN)) return
|
||||
|
||||
var/mob/M = locate(href_list["give_spell"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.give_spell(M)
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
|
||||
else if(href_list["give_disease"])
|
||||
if(!check_rights(R_ADMIN|R_FUN)) return
|
||||
|
||||
var/mob/M = locate(href_list["give_disease"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.give_disease(M)
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
|
||||
else if(href_list["give_disease2"])
|
||||
if(!check_rights(R_ADMIN|R_FUN)) return
|
||||
|
||||
var/mob/M = locate(href_list["give_disease2"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.give_disease2(M)
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
|
||||
else if(href_list["godmode"])
|
||||
if(!check_rights(R_REJUVINATE)) return
|
||||
|
||||
var/mob/M = locate(href_list["godmode"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.cmd_admin_godmode(M)
|
||||
href_list["datumrefresh"] = href_list["godmode"]
|
||||
|
||||
else if(href_list["gib"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["gib"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.cmd_admin_gib(M)
|
||||
|
||||
else if(href_list["build_mode"])
|
||||
if(!check_rights(R_BUILDMODE)) return
|
||||
|
||||
var/mob/M = locate(href_list["build_mode"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
togglebuildmode(M)
|
||||
href_list["datumrefresh"] = href_list["build_mode"]
|
||||
|
||||
else if(href_list["drop_everything"])
|
||||
if(!check_rights(R_DEBUG|R_ADMIN)) return
|
||||
|
||||
var/mob/M = locate(href_list["drop_everything"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
if(usr.client)
|
||||
usr.client.cmd_admin_drop_everything(M)
|
||||
|
||||
else if(href_list["direct_control"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["direct_control"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
if(usr.client)
|
||||
usr.client.cmd_assume_direct_control(M)
|
||||
|
||||
else if(href_list["make_skeleton"])
|
||||
if(!check_rights(R_FUN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["make_skeleton"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
H.ChangeToSkeleton()
|
||||
href_list["datumrefresh"] = href_list["make_skeleton"]
|
||||
|
||||
else if(href_list["delall"])
|
||||
if(!check_rights(R_DEBUG|R_SERVER)) return
|
||||
|
||||
var/obj/O = locate(href_list["delall"])
|
||||
if(!isobj(O))
|
||||
usr << "This can only be used on instances of type /obj"
|
||||
return
|
||||
|
||||
var/action_type = alert("Strict type ([O.type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel")
|
||||
if(action_type == "Cancel" || !action_type)
|
||||
return
|
||||
|
||||
if(alert("Are you really sure you want to delete all objects of type [O.type]?",,"Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
var/O_type = O.type
|
||||
switch(action_type)
|
||||
if("Strict type")
|
||||
var/i = 0
|
||||
for(var/obj/Obj in world)
|
||||
if(Obj.type == O_type)
|
||||
i++
|
||||
del(Obj)
|
||||
if(!i)
|
||||
usr << "No objects of this type exist"
|
||||
return
|
||||
log_admin("[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ")
|
||||
message_admins("\blue [key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ")
|
||||
if("Type and subtypes")
|
||||
var/i = 0
|
||||
for(var/obj/Obj in world)
|
||||
if(istype(Obj,O_type))
|
||||
i++
|
||||
del(Obj)
|
||||
if(!i)
|
||||
usr << "No objects of this type exist"
|
||||
return
|
||||
log_admin("[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ")
|
||||
message_admins("\blue [key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ")
|
||||
|
||||
else if(href_list["explode"])
|
||||
if(!check_rights(R_DEBUG|R_FUN)) return
|
||||
|
||||
var/atom/A = locate(href_list["explode"])
|
||||
if(!isobj(A) && !ismob(A) && !isturf(A))
|
||||
usr << "This can only be done to instances of type /obj, /mob and /turf"
|
||||
return
|
||||
|
||||
src.cmd_admin_explosion(A)
|
||||
href_list["datumrefresh"] = href_list["explode"]
|
||||
|
||||
else if(href_list["emp"])
|
||||
if(!check_rights(R_DEBUG|R_FUN)) return
|
||||
|
||||
var/atom/A = locate(href_list["emp"])
|
||||
if(!isobj(A) && !ismob(A) && !isturf(A))
|
||||
usr << "This can only be done to instances of type /obj, /mob and /turf"
|
||||
return
|
||||
|
||||
src.cmd_admin_emp(A)
|
||||
href_list["datumrefresh"] = href_list["emp"]
|
||||
|
||||
else if(href_list["mark_object"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/datum/D = locate(href_list["mark_object"])
|
||||
if(!istype(D))
|
||||
usr << "This can only be done to instances of type /datum"
|
||||
return
|
||||
|
||||
src.holder.marked_datum = D
|
||||
href_list["datumrefresh"] = href_list["mark_object"]
|
||||
|
||||
else if(href_list["rotatedatum"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["rotatedatum"])
|
||||
if(!istype(A))
|
||||
usr << "This can only be done to instances of type /atom"
|
||||
return
|
||||
|
||||
switch(href_list["rotatedir"])
|
||||
if("right") A.set_dir(turn(A.dir, -45))
|
||||
if("left") A.set_dir(turn(A.dir, 45))
|
||||
href_list["datumrefresh"] = href_list["rotatedatum"]
|
||||
|
||||
else if(href_list["makemonkey"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makemonkey"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("monkeyone"=href_list["makemonkey"]))
|
||||
|
||||
else if(href_list["makerobot"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makerobot"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makerobot"=href_list["makerobot"]))
|
||||
|
||||
else if(href_list["makealien"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makealien"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makealien"=href_list["makealien"]))
|
||||
|
||||
else if(href_list["makeslime"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makeslime"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makeslime"=href_list["makeslime"]))
|
||||
|
||||
else if(href_list["makeai"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makeai"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makeai"=href_list["makeai"]))
|
||||
|
||||
else if(href_list["setspecies"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["setspecies"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
var/new_species = input("Please choose a new species.","Species",null) as null|anything in all_species
|
||||
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
|
||||
if(H.set_species(new_species))
|
||||
usr << "Set species of [H] to [H.species]."
|
||||
else
|
||||
usr << "Failed! Something went wrong."
|
||||
|
||||
else if(href_list["addlanguage"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/H = locate(href_list["addlanguage"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob"
|
||||
return
|
||||
|
||||
var/new_language = input("Please choose a language to add.","Language",null) as null|anything in all_languages
|
||||
|
||||
if(!new_language)
|
||||
return
|
||||
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
|
||||
if(H.add_language(new_language))
|
||||
usr << "Added [new_language] to [H]."
|
||||
else
|
||||
usr << "Mob already knows that language."
|
||||
|
||||
else if(href_list["remlanguage"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/H = locate(href_list["remlanguage"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob"
|
||||
return
|
||||
|
||||
if(!H.languages.len)
|
||||
usr << "This mob knows no languages."
|
||||
return
|
||||
|
||||
var/datum/language/rem_language = input("Please choose a language to remove.","Language",null) as null|anything in H.languages
|
||||
|
||||
if(!rem_language)
|
||||
return
|
||||
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
|
||||
if(H.remove_language(rem_language.name))
|
||||
usr << "Removed [rem_language] from [H]."
|
||||
else
|
||||
usr << "Mob doesn't know that language."
|
||||
|
||||
else if(href_list["addverb"])
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
var/mob/living/H = locate(href_list["addverb"])
|
||||
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living"
|
||||
return
|
||||
var/list/possibleverbs = list()
|
||||
possibleverbs += "Cancel" // One for the top...
|
||||
possibleverbs += typesof(/mob/proc,/mob/verb,/mob/living/proc,/mob/living/verb)
|
||||
switch(H.type)
|
||||
if(/mob/living/carbon/human)
|
||||
possibleverbs += typesof(/mob/living/carbon/proc,/mob/living/carbon/verb,/mob/living/carbon/human/verb,/mob/living/carbon/human/proc)
|
||||
if(/mob/living/silicon/robot)
|
||||
possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/robot/proc,/mob/living/silicon/robot/verb)
|
||||
if(/mob/living/silicon/ai)
|
||||
possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/ai/proc,/mob/living/silicon/ai/verb)
|
||||
possibleverbs -= H.verbs
|
||||
possibleverbs += "Cancel" // ...And one for the bottom
|
||||
|
||||
var/verb = input("Select a verb!", "Verbs",null) as anything in possibleverbs
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
if(!verb || verb == "Cancel")
|
||||
return
|
||||
else
|
||||
H.verbs += verb
|
||||
|
||||
else if(href_list["remverb"])
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
var/mob/H = locate(href_list["remverb"])
|
||||
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob"
|
||||
return
|
||||
var/verb = input("Please choose a verb to remove.","Verbs",null) as null|anything in H.verbs
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
if(!verb)
|
||||
return
|
||||
else
|
||||
H.verbs -= verb
|
||||
|
||||
else if(href_list["addorgan"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/M = locate(href_list["addorgan"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon"
|
||||
return
|
||||
|
||||
var/new_organ = input("Please choose an organ to add.","Organ",null) as null|anything in typesof(/obj/item/organ)-/obj/item/organ
|
||||
if(!new_organ) return
|
||||
|
||||
if(!M)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
|
||||
if(locate(new_organ) in M.internal_organs)
|
||||
usr << "Mob already has that organ."
|
||||
return
|
||||
|
||||
<<<<<<< HEAD
|
||||
new new_organ(M)
|
||||
|
||||
=======
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/internal/I = new new_organ(H)
|
||||
|
||||
var/organ_slot = input(usr, "Which slot do you want the organ to go in ('default' for default)?") as text|null
|
||||
|
||||
if(!organ_slot)
|
||||
return
|
||||
|
||||
if(organ_slot != "default")
|
||||
organ_slot = sanitize(organ_slot)
|
||||
else
|
||||
if(I.removed_type)
|
||||
var/obj/item/organ/O = new I.removed_type()
|
||||
organ_slot = O.organ_tag
|
||||
del(O)
|
||||
else
|
||||
organ_slot = "unknown organ"
|
||||
|
||||
if(H.internal_organs_by_name[organ_slot])
|
||||
usr << "[H] already has an organ in that slot."
|
||||
del(I)
|
||||
return
|
||||
|
||||
H.internal_organs |= I
|
||||
H.internal_organs_by_name[organ_slot] = I
|
||||
usr << "Added new [new_organ] to [H] as slot [organ_slot]."
|
||||
else
|
||||
new new_organ(M)
|
||||
usr << "Added new [new_organ] to [M]."
|
||||
>>>>>>> 2aa4646fa0425bed412e2ef0e7852591ecb4bc40
|
||||
|
||||
else if(href_list["remorgan"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/M = locate(href_list["remorgan"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon"
|
||||
return
|
||||
|
||||
var/obj/item/organ/rem_organ = input("Please choose an organ to remove.","Organ",null) as null|anything in M.internal_organs
|
||||
|
||||
if(!M)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
|
||||
if(!(locate(rem_organ) in M.internal_organs))
|
||||
usr << "Mob does not have that organ."
|
||||
return
|
||||
|
||||
usr << "Removed [rem_organ] from [M]."
|
||||
rem_organ.removed()
|
||||
del(rem_organ)
|
||||
|
||||
else if(href_list["fix_nano"])
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
var/mob/H = locate(href_list["fix_nano"])
|
||||
|
||||
if(!istype(H) || !H.client)
|
||||
usr << "This can only be done on mobs with clients"
|
||||
return
|
||||
|
||||
nanomanager.send_resources(H.client)
|
||||
|
||||
usr << "Resource files sent"
|
||||
H << "Your NanoUI Resource files have been refreshed"
|
||||
|
||||
log_admin("[key_name(usr)] resent the NanoUI resource files to [key_name(H)] ")
|
||||
|
||||
else if(href_list["regenerateicons"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["regenerateicons"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be done to instances of type /mob"
|
||||
return
|
||||
M.regenerate_icons()
|
||||
|
||||
else if(href_list["adjustDamage"] && href_list["mobToDamage"])
|
||||
if(!check_rights(R_DEBUG|R_ADMIN|R_FUN)) return
|
||||
|
||||
var/mob/living/L = locate(href_list["mobToDamage"])
|
||||
if(!istype(L)) return
|
||||
|
||||
var/Text = href_list["adjustDamage"]
|
||||
|
||||
var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num
|
||||
|
||||
if(!L)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
|
||||
switch(Text)
|
||||
if("brute") L.adjustBruteLoss(amount)
|
||||
if("fire") L.adjustFireLoss(amount)
|
||||
if("toxin") L.adjustToxLoss(amount)
|
||||
if("oxygen")L.adjustOxyLoss(amount)
|
||||
if("brain") L.adjustBrainLoss(amount)
|
||||
if("clone") L.adjustCloneLoss(amount)
|
||||
else
|
||||
usr << "You caused an error. DEBUG: Text:[Text] Mob:[L]"
|
||||
return
|
||||
|
||||
if(amount != 0)
|
||||
log_admin("[key_name(usr)] dealt [amount] amount of [Text] damage to [L] ")
|
||||
message_admins("\blue [key_name(usr)] dealt [amount] amount of [Text] damage to [L] ")
|
||||
href_list["datumrefresh"] = href_list["mobToDamage"]
|
||||
|
||||
if(href_list["datumrefresh"])
|
||||
var/datum/DAT = locate(href_list["datumrefresh"])
|
||||
if(!istype(DAT, /datum))
|
||||
return
|
||||
src.debug_variables(DAT)
|
||||
|
||||
return
|
||||
|
||||
@@ -394,7 +394,7 @@ var/list/advance_cures = list(
|
||||
|
||||
if(D.symptoms.len > 0)
|
||||
|
||||
var/new_name = input(user, "Name your new disease.", "New Name")
|
||||
var/new_name = sanitizeSafe(input(user, "Name your new disease.", "New Name"), MAX_NAME_LEN)
|
||||
D.AssignName(new_name)
|
||||
D.Refresh()
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ datum/mind
|
||||
assigned_role = new_role
|
||||
|
||||
else if (href_list["memory_edit"])
|
||||
var/new_memo = sanitize(copytext(input("Write new memory", "Memory", memory) as null|message,1,MAX_MESSAGE_LEN))
|
||||
var/new_memo = sanitize(input("Write new memory", "Memory", memory) as null|message)
|
||||
if (isnull(new_memo)) return
|
||||
memory = new_memo
|
||||
|
||||
@@ -277,7 +277,7 @@ datum/mind
|
||||
new_objective.target_amount = target_number
|
||||
|
||||
if ("custom")
|
||||
var/expl = sanitize(copytext(input("Custom objective:", "Objective", objective ? objective.explanation_text : "") as text|null,1,MAX_MESSAGE_LEN))
|
||||
var/expl = sanitize(input("Custom objective:", "Objective", objective ? objective.explanation_text : "") as text|null)
|
||||
if (!expl) return
|
||||
new_objective = new /datum/objective
|
||||
new_objective.owner = src
|
||||
|
||||
@@ -58,7 +58,7 @@ var/const/CAMERA_WIRE_NOTHING2 = 32
|
||||
C.setViewRange(new_range)
|
||||
|
||||
if(CAMERA_WIRE_POWER)
|
||||
C.deactivate(null) // Deactivate the camera
|
||||
C.kick_viewers() // Kicks anyone watching the camera
|
||||
|
||||
if(CAMERA_WIRE_LIGHT)
|
||||
C.light_disabled = !C.light_disabled
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
proc/log_and_message_admins(var/message as text)
|
||||
log_admin(usr ? "[usr]([usr.ckey]) [message]" : "EVENT [message]")
|
||||
message_admins(usr ? "[usr]([usr.ckey]) [message]" : "EVENT [message]")
|
||||
log_admin(usr ? "[key_name(usr)] [message]" : "EVENT [message]")
|
||||
message_admins(usr ? "[key_name(usr)] [message]" : "EVENT [message]")
|
||||
|
||||
proc/admin_log_and_message_admins(var/message as text)
|
||||
log_admin(usr ? "[key_name(usr)] [message]" : "EVENT [message]")
|
||||
message_admins(usr ? "[key_name(usr)] [message]" : "EVENT [message]", 1)
|
||||
log_admin(usr ? "[key_name_admin(usr)] [message]" : "EVENT [message]")
|
||||
message_admins(usr ? "[key_name_admin(usr)] [message]" : "EVENT [message]", 1)
|
||||
|
||||
proc/admin_attack_log(var/mob/attacker, var/mob/victim, var/attacker_message, var/victim_message, var/admin_message)
|
||||
victim.attack_log += text("\[[time_stamp()]\] <font color='orange'>[victim_message] [key_name(attacker)]</font>")
|
||||
attacker.attack_log += text("\[[time_stamp()]\] <font color='red'>[attacker_message] [key_name(victim)]</font>")
|
||||
|
||||
msg_admin_attack("[key_name(attacker)] [admin_message] [key_name(victim)] (INTENT: [uppertext(attacker.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[attacker.x];Y=[attacker.y];Z=[attacker.z]'>JMP</a>)")
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
var/tmp/message_title = new_title ? new_title : title
|
||||
var/tmp/message_sound = new_sound ? sound(new_sound) : sound
|
||||
|
||||
message = trim_strip_html_properly(message)
|
||||
message_title = html_encode(message_title)
|
||||
message = sanitize(message, extra = 0)
|
||||
message_title = sanitizeSafe(message_title)
|
||||
|
||||
Message(message, message_title)
|
||||
if(do_newscast)
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
// Choose a name, if any.
|
||||
if(flags & ANTAG_CHOOSE_NAME)
|
||||
spawn(5)
|
||||
var/newname = sanitize(copytext(input(player.current, "You are a [role_text]. Would you like to change your name to something else?", "Name change") as null|text,1,MAX_NAME_LEN))
|
||||
var/newname = sanitize(input(player.current, "You are a [role_text]. Would you like to change your name to something else?", "Name change") as null|text, MAX_NAME_LEN)
|
||||
if (newname)
|
||||
player.current.real_name = newname
|
||||
player.current.name = player.current.real_name
|
||||
|
||||
@@ -737,7 +737,7 @@
|
||||
|
||||
if (bufferOption == "changeLabel")
|
||||
var/datum/dna2/record/buf = src.buffers[bufferId]
|
||||
var/text = sanitize(copytext(input(usr, "New Label:", "Edit Label", buf.name) as text|null, 1, MAX_NAME_LEN))
|
||||
var/text = sanitize(input(usr, "New Label:", "Edit Label", buf.name) as text|null, MAX_NAME_LEN)
|
||||
buf.name = text
|
||||
src.buffers[bufferId] = buf
|
||||
return 1
|
||||
|
||||
@@ -657,7 +657,7 @@ var/list/datum/dna/hivemind_bank = list()
|
||||
src << "<span class='notice'>We return our vocal glands to their original location.</span>"
|
||||
return
|
||||
|
||||
var/mimic_voice = stripped_input(usr, "Enter a name to mimic.", "Mimic Voice", null, MAX_NAME_LEN)
|
||||
var/mimic_voice = sanitize(input(usr, "Enter a name to mimic.", "Mimic Voice", null), MAX_NAME_LEN)
|
||||
if(!mimic_voice)
|
||||
return
|
||||
|
||||
|
||||
@@ -563,7 +563,7 @@ var/list/sacrificed = list()
|
||||
// returns 0 if the rune is not used. returns 1 if the rune is used.
|
||||
communicate()
|
||||
. = 1 // Default output is 1. If the rune is deleted it will return 1
|
||||
var/input = stripped_input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "")
|
||||
var/input = sanitize(input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", ""))
|
||||
if(!input)
|
||||
if (istype(src))
|
||||
fizzle()
|
||||
|
||||
@@ -69,7 +69,7 @@ var/global/list/additional_antag_types = list()
|
||||
new/datum/uplink_item(/obj/item/ammo_magazine/a357, 2, ".357", "RA"),
|
||||
new/datum/uplink_item(/obj/item/ammo_magazine/mc9mm, 2, "9mm", "R9"),
|
||||
new/datum/uplink_item(/obj/item/ammo_magazine/chemdart, 2, "Darts", "AD"),
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/sniperammo, 4, "14.5mm", "SA")
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/sniperammo, 2, "14.5mm", "SA")
|
||||
),
|
||||
"Highly Visible and Dangerous Weapons" = list(
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/emps, 3, "5 EMP Grenades", "EM"),
|
||||
@@ -80,7 +80,7 @@ var/global/list/additional_antag_types = list()
|
||||
new/datum/uplink_item(/obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser, 6, "Exosuit Rigged Laser", "RL"),
|
||||
new/datum/uplink_item(/obj/item/weapon/gun/projectile/revolver, 6, "Revolver", "RE"),
|
||||
new/datum/uplink_item(/obj/item/weapon/storage/box/syndicate, 10, "Mercenary Bundle", "BU"),
|
||||
new/datum/uplink_item(/obj/item/weapon/gun/projectile/heavysniper, 12, "PTRS Rifle", "BU")
|
||||
new/datum/uplink_item(/obj/item/weapon/gun/projectile/heavysniper, 12, "Anti-materiel Rifle", "AMR")
|
||||
),
|
||||
"Stealthy and Inconspicuous Weapons" = list(
|
||||
new/datum/uplink_item(/obj/item/weapon/soap/syndie, 1, "Subversive Soap", "SP"),
|
||||
|
||||
@@ -542,7 +542,7 @@ datum/objective/steal
|
||||
var/tmp_obj = new custom_target
|
||||
var/custom_name = tmp_obj:name
|
||||
del(tmp_obj)
|
||||
custom_name = sanitize(copytext(input("Enter target name:", "Objective target", custom_name) as text|null,1,MAX_MESSAGE_LEN))
|
||||
custom_name = sanitize(input("Enter target name:", "Objective target", custom_name) as text|null)
|
||||
if (!custom_name) return
|
||||
target_name = custom_name
|
||||
steal_target = custom_target
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
spawn(0)
|
||||
var/religion_name = "Christianity"
|
||||
var/new_religion = sanitize(copytext(input(H, "You are the crew services officer. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name),1,MAX_NAME_LEN))
|
||||
var/new_religion = sanitize(input(H, "You are the crew services officer. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name), MAX_NAME_LEN)
|
||||
|
||||
if (!new_religion)
|
||||
new_religion = religion_name
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
spawn(1)
|
||||
var/deity_name = "Space Jesus"
|
||||
var/new_deity = sanitize(copytext(input(H, "Would you like to change your deity? Default is Space Jesus.", "Name change", deity_name),1,MAX_NAME_LEN))
|
||||
var/new_deity = sanitize(input(H, "Would you like to change your deity? Default is Space Jesus.", "Name change", deity_name), MAX_NAME_LEN)
|
||||
|
||||
if ((length(new_deity) == 0) || (new_deity == "Space Jesus") )
|
||||
new_deity = deity_name
|
||||
|
||||
@@ -332,6 +332,12 @@
|
||||
hidden = 1
|
||||
category = "Arms and Ammunition"
|
||||
|
||||
/datum/autolathe/recipe/magazine_arifle
|
||||
name = "ammunition (7.62mm)"
|
||||
path = /obj/item/ammo_magazine/c762
|
||||
hidden = 1
|
||||
category = "Arms and Ammunition"
|
||||
|
||||
/datum/autolathe/recipe/magazine_smg
|
||||
name = "ammunition (9mm top mounted)"
|
||||
path = /obj/item/ammo_magazine/mc9mmt
|
||||
@@ -339,7 +345,7 @@
|
||||
category = "Arms and Ammunition"
|
||||
|
||||
/datum/autolathe/recipe/magazine_carbine
|
||||
name = "ammunition (5.56)"
|
||||
name = "ammunition (5.56mm)"
|
||||
path = /obj/item/ammo_magazine/a556
|
||||
hidden = 1
|
||||
category = "Arms and Ammunition"
|
||||
|
||||
@@ -355,7 +355,7 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
|
||||
del(src)
|
||||
|
||||
else if (istype(W, /obj/item/weapon/pen))
|
||||
var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN)
|
||||
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, usr) && src.loc != usr)
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
..()
|
||||
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN)
|
||||
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
|
||||
if(!t) return
|
||||
if(!in_range(src, usr) && src.loc != usr) return
|
||||
created_name = t
|
||||
|
||||
@@ -583,7 +583,7 @@
|
||||
|
||||
else if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = input(user, "Enter new robot name", src.name, src.created_name) as text
|
||||
t = sanitize(copytext(t, 1, MAX_NAME_LEN))
|
||||
t = sanitize(t, MAX_NAME_LEN)
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, usr) && src.loc != usr)
|
||||
|
||||
@@ -420,7 +420,7 @@
|
||||
del(src)
|
||||
|
||||
else if (istype(W, /obj/item/weapon/pen))
|
||||
var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN)
|
||||
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, usr) && src.loc != usr)
|
||||
@@ -439,7 +439,7 @@
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
else if (istype(W, /obj/item/weapon/pen))
|
||||
var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name)
|
||||
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
|
||||
|
||||
if (!t)
|
||||
return
|
||||
|
||||
@@ -564,7 +564,7 @@
|
||||
/obj/item/weapon/firstaid_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN)
|
||||
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, usr) && src.loc != usr)
|
||||
|
||||
@@ -307,7 +307,7 @@
|
||||
|
||||
if("setid")
|
||||
refresh=0
|
||||
var/new_id = sanitize(copytext(input("Enter new bot ID", "Mulebot [suffix ? "([suffix])" : ""]", suffix) as text|null,1,MAX_NAME_LEN))
|
||||
var/new_id = sanitize(input("Enter new bot ID", "Mulebot [suffix ? "([suffix])" : ""]", suffix) as text|null, MAX_NAME_LEN)
|
||||
refresh=1
|
||||
if(new_id)
|
||||
suffix = new_id
|
||||
|
||||
@@ -838,7 +838,7 @@ Auto Patrol: []"},
|
||||
del(src)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN)
|
||||
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
|
||||
if(!t)
|
||||
return
|
||||
if(!in_range(src, usr) && src.loc != usr)
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
if(isscrewdriver(W))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
|
||||
var/input = strip_html(input(usr, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Set Network", "SS13"))
|
||||
var/input = sanitize(input(usr, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Set Network", "SS13"))
|
||||
if(!input)
|
||||
usr << "No input found please hang up and try your call again."
|
||||
return
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
var/area/camera_area = get_area(src)
|
||||
var/temptag = "[sanitize(camera_area.name)] ([rand(1, 999)])"
|
||||
input = strip_html(input(usr, "How would you like to name the camera?", "Set Camera Name", temptag))
|
||||
input = sanitizeSafe(input(usr, "How would you like to name the camera?", "Set Camera Name", temptag))
|
||||
|
||||
state = 4
|
||||
var/obj/machinery/camera/C = new(src.loc)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
set name = "Store Camera Location"
|
||||
set desc = "Stores your current camera location by the given name"
|
||||
|
||||
loc = sanitize(copytext(loc, 1, MAX_MESSAGE_LEN))
|
||||
loc = sanitize(loc)
|
||||
if(!loc)
|
||||
src << "\red Must supply a location name"
|
||||
return
|
||||
@@ -213,7 +213,7 @@
|
||||
mob/living/proc/near_camera()
|
||||
if (!isturf(loc))
|
||||
return 0
|
||||
else if(!cameranet.checkCameraVis(src))
|
||||
else if(!cameranet.checkVis(src))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
if (is_authenticated() && modify)
|
||||
var/t1 = href_list["assign_target"]
|
||||
if(t1 == "Custom")
|
||||
var/temp_t = sanitize(copytext(input("Enter a custom job assignment.","Assignment"),1,45))
|
||||
var/temp_t = sanitize(input("Enter a custom job assignment.","Assignment"), 45)
|
||||
//let custom jobs function as an impromptu alt title, mainly for sechuds
|
||||
if(temp_t && modify)
|
||||
modify.assignment = temp_t
|
||||
@@ -222,7 +222,7 @@
|
||||
if (is_authenticated())
|
||||
var/t2 = modify
|
||||
if ((modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf)))
|
||||
var/temp_name = reject_bad_name(href_list["reg"])
|
||||
var/temp_name = sanitizeName(href_list["reg"])
|
||||
if(temp_name)
|
||||
modify.registered_name = temp_name
|
||||
else
|
||||
|
||||
@@ -175,10 +175,10 @@
|
||||
post_status(href_list["statdisp"])
|
||||
|
||||
if("setmsg1")
|
||||
stat_msg1 = reject_bad_text(trim(sanitize(copytext(input("Line 1", "Enter Message Text", stat_msg1) as text|null, 1, 40))), 40)
|
||||
stat_msg1 = reject_bad_text(sanitize(input("Line 1", "Enter Message Text", stat_msg1) as text|null, 40), 40)
|
||||
src.updateDialog()
|
||||
if("setmsg2")
|
||||
stat_msg2 = reject_bad_text(trim(sanitize(copytext(input("Line 2", "Enter Message Text", stat_msg2) as text|null, 1, 40))), 40)
|
||||
stat_msg2 = reject_bad_text(sanitize(input("Line 2", "Enter Message Text", stat_msg2) as text|null, 40), 40)
|
||||
src.updateDialog()
|
||||
|
||||
// OMG CENTCOMM LETTERHEAD
|
||||
@@ -187,7 +187,7 @@
|
||||
if(centcomm_message_cooldown)
|
||||
usr << "\red Arrays recycling. Please stand by."
|
||||
return
|
||||
var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "")
|
||||
var/input = sanitize(input("Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", ""))
|
||||
if(!input || !(usr in view(1,src)))
|
||||
return
|
||||
Centcomm_announce(input, usr)
|
||||
@@ -204,7 +204,7 @@
|
||||
if(centcomm_message_cooldown)
|
||||
usr << "\red Arrays recycling. Please stand by."
|
||||
return
|
||||
var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "")
|
||||
var/input = sanitize(input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", ""))
|
||||
if(!input || !(usr in view(1,src)))
|
||||
return
|
||||
Syndicate_announce(input, usr)
|
||||
|
||||
@@ -114,11 +114,11 @@
|
||||
if (href_list["choice"])
|
||||
switch(href_list["choice"])
|
||||
if ("giv_name")
|
||||
var/nam = strip_html_simple(input("Person pass is issued to", "Name", giv_name) as text|null)
|
||||
var/nam = sanitize(input("Person pass is issued to", "Name", giv_name) as text|null)
|
||||
if (nam)
|
||||
giv_name = nam
|
||||
if ("reason")
|
||||
var/reas = strip_html_simple(input("Reason why pass is issued", "Reason", reason) as text|null)
|
||||
var/reas = sanitize(input("Reason why pass is issued", "Reason", reason) as text|null)
|
||||
if(reas)
|
||||
reason = reas
|
||||
if ("duration")
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
switch(href_list["field"])
|
||||
if("fingerprint")
|
||||
if (istype(src.active1, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
|
||||
return
|
||||
src.active1.fields["fingerprint"] = t1
|
||||
@@ -268,55 +268,55 @@
|
||||
src.active1.fields["age"] = t1
|
||||
if("mi_dis")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["mi_dis"] = t1
|
||||
if("mi_dis_d")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["mi_dis_d"] = t1
|
||||
if("ma_dis")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["ma_dis"] = t1
|
||||
if("ma_dis_d")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["ma_dis_d"] = t1
|
||||
if("alg")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["alg"] = t1
|
||||
if("alg_d")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["alg_d"] = t1
|
||||
if("cdi")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["cdi"] = t1
|
||||
if("cdi_d")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["cdi_d"] = t1
|
||||
if("notes")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = html_encode(trim(copytext(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message, extra = 0)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["notes"] = t1
|
||||
@@ -331,21 +331,21 @@
|
||||
src.temp = text("<B>Blood Type:</B><BR>\n\t<A href='?src=\ref[];temp=1;b_type=an'>A-</A> <A href='?src=\ref[];temp=1;b_type=ap'>A+</A><BR>\n\t<A href='?src=\ref[];temp=1;b_type=bn'>B-</A> <A href='?src=\ref[];temp=1;b_type=bp'>B+</A><BR>\n\t<A href='?src=\ref[];temp=1;b_type=abn'>AB-</A> <A href='?src=\ref[];temp=1;b_type=abp'>AB+</A><BR>\n\t<A href='?src=\ref[];temp=1;b_type=on'>O-</A> <A href='?src=\ref[];temp=1;b_type=op'>O+</A><BR>", src, src, src, src, src, src, src, src)
|
||||
if("b_dna")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please input DNA hash:", "Med. records", src.active2.fields["b_dna"], null) as text,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please input DNA hash:", "Med. records", src.active2.fields["b_dna"], null) as text)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["b_dna"] = t1
|
||||
if("vir_name")
|
||||
var/datum/data/record/v = locate(href_list["edit_vir"])
|
||||
if (v)
|
||||
var/t1 = trim(sanitize(copytext(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
|
||||
return
|
||||
v.fields["name"] = t1
|
||||
if("vir_desc")
|
||||
var/datum/data/record/v = locate(href_list["edit_vir"])
|
||||
if (v)
|
||||
var/t1 = trim(sanitize(copytext(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
|
||||
return
|
||||
v.fields["description"] = t1
|
||||
@@ -450,7 +450,7 @@
|
||||
if (!( istype(src.active2, /datum/data/record) ))
|
||||
return
|
||||
var/a2 = src.active2
|
||||
var/t1 = trim(sanitize(copytext(input("Add Comment:", "Med. records", null, null) as message,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Add Comment:", "Med. records", null, null) as message)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
var/counter = 1
|
||||
|
||||
@@ -409,7 +409,7 @@
|
||||
|
||||
//Select Your Name
|
||||
if("Sender")
|
||||
customsender = input(usr, "Please enter the sender's name.") as text|null
|
||||
customsender = sanitize(input(usr, "Please enter the sender's name.") as text|null)
|
||||
|
||||
//Select Receiver
|
||||
if("Recepient")
|
||||
@@ -425,12 +425,12 @@
|
||||
|
||||
//Enter custom job
|
||||
if("RecJob")
|
||||
customjob = input(usr, "Please enter the sender's job.") as text|null
|
||||
customjob = sanitize(input(usr, "Please enter the sender's job.") as text|null)
|
||||
|
||||
//Enter message
|
||||
if("Message")
|
||||
custommessage = input(usr, "Please enter your message.") as text|null
|
||||
custommessage = sanitize(copytext(custommessage, 1, MAX_MESSAGE_LEN))
|
||||
custommessage = sanitize(custommessage)
|
||||
|
||||
//Send message
|
||||
if("Send")
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
usr << "Unauthorized Access."
|
||||
|
||||
else if(href_list["warn"])
|
||||
var/warning = sanitize(copytext(input(usr,"Message:","Enter your message here!",""),1,MAX_MESSAGE_LEN))
|
||||
var/warning = sanitize(input(usr,"Message:","Enter your message here!",""))
|
||||
if(!warning) return
|
||||
var/obj/item/weapon/implant/I = locate(href_list["warn"])
|
||||
if((I)&&(I.imp_in))
|
||||
|
||||
@@ -384,7 +384,7 @@ What a mess.*/
|
||||
if (!( istype(active2, /datum/data/record) ))
|
||||
return
|
||||
var/a2 = active2
|
||||
var/t1 = trim(sanitize(copytext(input("Add Comment:", "Secure. records", null, null) as message,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Add Comment:", "Secure. records", null, null) as message)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2))
|
||||
return
|
||||
var/counter = 1
|
||||
@@ -426,19 +426,19 @@ What a mess.*/
|
||||
switch(href_list["field"])
|
||||
if("name")
|
||||
if (istype(active1, /datum/data/record))
|
||||
var/t1 = reject_bad_name(input("Please input name:", "Secure. records", active1.fields["name"], null) as text)
|
||||
var/t1 = sanitizeName(input("Please input name:", "Secure. records", active1.fields["name"], null) as text)
|
||||
if (!t1 || active1 != a1)
|
||||
return
|
||||
active1.fields["name"] = t1
|
||||
if("id")
|
||||
if (istype(active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please input id:", "Secure. records", active1.fields["id"], null) as text,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text)
|
||||
if (!t1 || active1 != a1)
|
||||
return
|
||||
active1.fields["id"] = t1
|
||||
if("fingerprint")
|
||||
if (istype(active1, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text)
|
||||
if (!t1 || active1 != a1)
|
||||
return
|
||||
active1.fields["fingerprint"] = t1
|
||||
@@ -456,31 +456,31 @@ What a mess.*/
|
||||
active1.fields["age"] = t1
|
||||
if("mi_crim")
|
||||
if (istype(active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text)
|
||||
if (!t1 || active2 != a2)
|
||||
return
|
||||
active2.fields["mi_crim"] = t1
|
||||
if("mi_crim_d")
|
||||
if (istype(active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message)
|
||||
if (!t1 || active2 != a2)
|
||||
return
|
||||
active2.fields["mi_crim_d"] = t1
|
||||
if("ma_crim")
|
||||
if (istype(active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text)
|
||||
if (!t1 || active2 != a2)
|
||||
return
|
||||
active2.fields["ma_crim"] = t1
|
||||
if("ma_crim_d")
|
||||
if (istype(active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message)
|
||||
if (!t1 || active2 != a2)
|
||||
return
|
||||
active2.fields["ma_crim_d"] = t1
|
||||
if("notes")
|
||||
if (istype(active2, /datum/data/record))
|
||||
var/t1 = html_encode(trim(copytext(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message, extra = 0)
|
||||
if (!t1 || active2 != a2)
|
||||
return
|
||||
active2.fields["notes"] = t1
|
||||
@@ -507,7 +507,7 @@ What a mess.*/
|
||||
alert(usr, "You do not have the required rank to do this!")
|
||||
if("species")
|
||||
if (istype(active1, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please enter race:", "General records", active1.fields["species"], null) as message,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message)
|
||||
if (!t1 || active1 != a1)
|
||||
return
|
||||
active1.fields["species"] = t1
|
||||
|
||||
@@ -309,19 +309,19 @@ What a mess.*/
|
||||
switch(href_list["field"])
|
||||
if("name")
|
||||
if (istype(active1, /datum/data/record))
|
||||
var/t1 = reject_bad_name(input("Please input name:", "Secure. records", active1.fields["name"], null) as text)
|
||||
var/t1 = sanitizeName(input("Please input name:", "Secure. records", active1.fields["name"], null) as text)
|
||||
if ((!( t1 ) || !length(trim(t1)) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon)))) || active1 != a1)
|
||||
return
|
||||
active1.fields["name"] = t1
|
||||
if("id")
|
||||
if (istype(active1, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please input id:", "Secure. records", active1.fields["id"], null) as text,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
|
||||
return
|
||||
active1.fields["id"] = t1
|
||||
if("fingerprint")
|
||||
if (istype(active1, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
|
||||
return
|
||||
active1.fields["fingerprint"] = t1
|
||||
@@ -350,7 +350,7 @@ What a mess.*/
|
||||
alert(usr, "You do not have the required rank to do this!")
|
||||
if("species")
|
||||
if (istype(active1, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please enter race:", "General records", active1.fields["species"], null) as message,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
|
||||
return
|
||||
active1.fields["species"] = t1
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
if(!istype(P)) return
|
||||
|
||||
var/timeout = world.time + 600
|
||||
var/reason = sanitize(copytext(input(usr,"Reason:","Why do you require this item?","") as null|text,1,MAX_MESSAGE_LEN))
|
||||
var/reason = sanitize(input(usr,"Reason:","Why do you require this item?","") as null|text)
|
||||
if(world.time > timeout) return
|
||||
if(!reason) return
|
||||
|
||||
@@ -289,7 +289,7 @@
|
||||
if(!istype(P)) return
|
||||
|
||||
var/timeout = world.time + 600
|
||||
var/reason = sanitize(copytext(input(usr,"Reason:","Why do you require this item?","") as null|text,1,MAX_MESSAGE_LEN))
|
||||
var/reason = sanitize(input(usr,"Reason:","Why do you require this item?","") as null|text)
|
||||
if(world.time > timeout) return
|
||||
if(!reason) return
|
||||
|
||||
|
||||
@@ -304,7 +304,7 @@
|
||||
if(auth)
|
||||
var/t1 = href_list["assign"]
|
||||
if(t1 == "Custom")
|
||||
var/temp_t = sanitize(copytext(input("Enter a custom job assignment.","Assignment"),1,MAX_MESSAGE_LEN))
|
||||
var/temp_t = sanitize(input("Enter a custom job assignment.","Assignment"))
|
||||
if(temp_t)
|
||||
t1 = temp_t
|
||||
set_default_access(t1)
|
||||
|
||||
@@ -178,10 +178,10 @@
|
||||
post_status(href_list["statdisp"])
|
||||
|
||||
if("setmsg1" in href_list)
|
||||
stat_msg1 = reject_bad_text(trim(sanitize(copytext(input("Line 1", "Enter Message Text", stat_msg1) as text|null, 1, 40)), 40))
|
||||
stat_msg1 = reject_bad_text(sanitize(input("Line 1", "Enter Message Text", stat_msg1) as text|null, 40), 40)
|
||||
computer.updateDialog()
|
||||
if("setmsg2" in href_list)
|
||||
stat_msg2 = reject_bad_text(trim(sanitize(copytext(input("Line 2", "Enter Message Text", stat_msg2) as text|null, 1, 40)), 40))
|
||||
stat_msg2 = reject_bad_text(sanitize(input("Line 2", "Enter Message Text", stat_msg2) as text|null, 40), 40)
|
||||
computer.updateDialog()
|
||||
|
||||
// OMG CENTCOMM LETTERHEAD
|
||||
@@ -192,7 +192,7 @@
|
||||
if(centcomm_message_cooldown)
|
||||
usr << "Arrays recycling. Please stand by."
|
||||
return
|
||||
var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "")
|
||||
var/input = sanitize(input("Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", ""))
|
||||
if(!input || !interactable())
|
||||
return
|
||||
Centcomm_announce(input, usr)
|
||||
@@ -209,7 +209,7 @@
|
||||
if(centcomm_message_cooldown)
|
||||
usr << "Arrays recycling. Please stand by."
|
||||
return
|
||||
var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "")
|
||||
var/input = sanitize(input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", ""))
|
||||
if(!input || !interactable())
|
||||
return
|
||||
Syndicate_announce(input, usr)
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
switch(href_list["field"])
|
||||
if("fingerprint")
|
||||
if (istype(src.active1, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
|
||||
return
|
||||
src.active1.fields["fingerprint"] = t1
|
||||
@@ -282,55 +282,55 @@
|
||||
src.active1.fields["age"] = t1
|
||||
if("mi_dis")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["mi_dis"] = t1
|
||||
if("mi_dis_d")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["mi_dis_d"] = t1
|
||||
if("ma_dis")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["ma_dis"] = t1
|
||||
if("ma_dis_d")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["ma_dis_d"] = t1
|
||||
if("alg")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["alg"] = t1
|
||||
if("alg_d")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["alg_d"] = t1
|
||||
if("cdi")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["cdi"] = t1
|
||||
if("cdi_d")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["cdi_d"] = t1
|
||||
if("notes")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = html_encode(trim(copytext(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message, extra = 0)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["notes"] = t1
|
||||
@@ -345,21 +345,21 @@
|
||||
src.temp = text("<B>Blood Type:</B><BR>\n\t<A href='?src=\ref[];temp=1;b_type=an'>A-</A> <A href='?src=\ref[];temp=1;b_type=ap'>A+</A><BR>\n\t<A href='?src=\ref[];temp=1;b_type=bn'>B-</A> <A href='?src=\ref[];temp=1;b_type=bp'>B+</A><BR>\n\t<A href='?src=\ref[];temp=1;b_type=abn'>AB-</A> <A href='?src=\ref[];temp=1;b_type=abp'>AB+</A><BR>\n\t<A href='?src=\ref[];temp=1;b_type=on'>O-</A> <A href='?src=\ref[];temp=1;b_type=op'>O+</A><BR>", src, src, src, src, src, src, src, src)
|
||||
if("b_dna")
|
||||
if (istype(src.active2, /datum/data/record))
|
||||
var/t1 = sanitize(copytext(trim(input("Please input DNA hash:", "Med. records", src.active2.fields["b_dna"], null) as text),1,MAX_MESSAGE_LEN))
|
||||
var/t1 = sanitize(input("Please input DNA hash:", "Med. records", src.active2.fields["b_dna"], null) as text)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
src.active2.fields["b_dna"] = t1
|
||||
if("vir_name")
|
||||
var/datum/data/record/v = locate(href_list["edit_vir"])
|
||||
if (v)
|
||||
var/t1 = trim(sanitize(copytext(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
|
||||
return
|
||||
v.fields["name"] = t1
|
||||
if("vir_desc")
|
||||
var/datum/data/record/v = locate(href_list["edit_vir"])
|
||||
if (v)
|
||||
var/t1 = trim(sanitize(copytext(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
|
||||
return
|
||||
v.fields["description"] = t1
|
||||
@@ -464,7 +464,7 @@
|
||||
if (!( istype(src.active2, /datum/data/record) ))
|
||||
return
|
||||
var/a2 = src.active2
|
||||
var/t1 = sanitize(copytext(input("Add Comment:", "Med. records", null, null) as message,1,MAX_MESSAGE_LEN))
|
||||
var/t1 = sanitize(input("Add Comment:", "Med. records", null, null) as message)
|
||||
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
|
||||
return
|
||||
var/counter = 1
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
screen = !screen
|
||||
|
||||
else if(href_list["warn"])
|
||||
var/warning = trim(sanitize(copytext(input(usr,"Message:","Enter your message here!",""),1,MAX_MESSAGE_LEN)))
|
||||
var/warning = sanitize(input(usr,"Message:","Enter your message here!",""))
|
||||
if(!warning) return
|
||||
var/obj/item/weapon/implant/I = locate(href_list["warn"])
|
||||
if( istype(I) && I.imp_in)
|
||||
|
||||
@@ -404,7 +404,7 @@ What a mess.*/
|
||||
if (!( istype(active2, /datum/data/record) ))
|
||||
return
|
||||
var/a2 = active2
|
||||
var/t1 = sanitize(copytext(input("Add Comment:", "Secure. records", null, null) as message,1,MAX_MESSAGE_LEN))
|
||||
var/t1 = sanitize(input("Add Comment:", "Secure. records", null, null) as message)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
|
||||
return
|
||||
var/counter = 1
|
||||
@@ -444,19 +444,19 @@ What a mess.*/
|
||||
switch(href_list["field"])
|
||||
if("name")
|
||||
if (istype(active1, /datum/data/record))
|
||||
var/t1 = reject_bad_name(input("Please input name:", "Secure. records", active1.fields["name"], null) as text)
|
||||
var/t1 = sanitizeName(input("Please input name:", "Secure. records", active1.fields["name"], null) as text)
|
||||
if ((!( t1 ) || !length(trim(t1)) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon)))) || active1 != a1)
|
||||
return
|
||||
active1.fields["name"] = t1
|
||||
if("id")
|
||||
if (istype(active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please input id:", "Secure. records", active1.fields["id"], null) as text,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
|
||||
return
|
||||
active1.fields["id"] = t1
|
||||
if("fingerprint")
|
||||
if (istype(active1, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
|
||||
return
|
||||
active1.fields["fingerprint"] = t1
|
||||
@@ -474,31 +474,31 @@ What a mess.*/
|
||||
active1.fields["age"] = t1
|
||||
if("mi_crim")
|
||||
if (istype(active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
|
||||
return
|
||||
active2.fields["mi_crim"] = t1
|
||||
if("mi_crim_d")
|
||||
if (istype(active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
|
||||
return
|
||||
active2.fields["mi_crim_d"] = t1
|
||||
if("ma_crim")
|
||||
if (istype(active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
|
||||
return
|
||||
active2.fields["ma_crim"] = t1
|
||||
if("ma_crim_d")
|
||||
if (istype(active2, /datum/data/record))
|
||||
var/t1 = trim(sanitize(copytext(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
|
||||
return
|
||||
active2.fields["ma_crim_d"] = t1
|
||||
if("notes")
|
||||
if (istype(active2, /datum/data/record))
|
||||
var/t1 = html_encode(trim(copytext(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message,1,MAX_MESSAGE_LEN)))
|
||||
var/t1 = sanitize(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message, extra = 0)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
|
||||
return
|
||||
active2.fields["notes"] = t1
|
||||
@@ -525,7 +525,7 @@ What a mess.*/
|
||||
alert(usr, "You do not have the required rank to do this!")
|
||||
if("species")
|
||||
if (istype(active1, /datum/data/record))
|
||||
var/t1 = sanitize(copytext(input("Please enter race:", "General records", active1.fields["species"], null) as message,1,MAX_MESSAGE_LEN))
|
||||
var/t1 = sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message)
|
||||
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
|
||||
return
|
||||
active1.fields["species"] = t1
|
||||
|
||||
@@ -38,6 +38,10 @@ var/const/HOLOPAD_MODE = RANGE_BASED
|
||||
|
||||
layer = TURF_LAYER+0.1 //Preventing mice and drones from sneaking under them.
|
||||
|
||||
var/power_per_hologram = 500 //per usage per hologram
|
||||
idle_power_usage = 5
|
||||
use_power = 1
|
||||
|
||||
var/list/mob/living/silicon/ai/masters = new() //List of AIs that use the holopad
|
||||
var/last_request = 0 //to prevent request spam. ~Carn
|
||||
var/holo_range = 5 // Change to change how far the AI can move away from the holopad before deactivating.
|
||||
@@ -122,7 +126,6 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
SetLuminosity(2) //pad lighting
|
||||
icon_state = "holopad1"
|
||||
A.holo = src
|
||||
use_power += HOLOGRAM_POWER_USAGE
|
||||
return 1
|
||||
|
||||
/obj/machinery/hologram/holopad/proc/clear_holo(mob/living/silicon/ai/user)
|
||||
@@ -130,29 +133,31 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
user.holo = null
|
||||
del(masters[user])//Get rid of user's hologram //qdel
|
||||
masters -= user //Discard AI from the list of those who use holopad
|
||||
use_power = max(HOLOPAD_PASSIVE_POWER_USAGE, use_power - HOLOGRAM_POWER_USAGE)//Reduce power usage
|
||||
if (!masters.len)//If no users left
|
||||
SetLuminosity(0) //pad lighting (hologram lighting will be handled automatically since its owner was deleted)
|
||||
icon_state = "holopad0"
|
||||
use_power = HOLOPAD_PASSIVE_POWER_USAGE
|
||||
return 1
|
||||
|
||||
/obj/machinery/hologram/holopad/process()
|
||||
for (var/mob/living/silicon/ai/master in masters)
|
||||
if(master && !master.stat && master.client && master.eyeobj)//If there is an AI attached, it's not incapacitated, it has a client, and the client eye is centered on the projector.
|
||||
if(!(stat & NOPOWER))//If the machine has power.
|
||||
if((HOLOPAD_MODE == RANGE_BASED && (get_dist(master.eyeobj, src) <= holo_range)))
|
||||
return 1
|
||||
var/active_ai = (master && !master.stat && master.client && master.eyeobj)//If there is an AI attached, it's not incapacitated, it has a client, and the client eye is centered on the projector.
|
||||
if((stat & NOPOWER) || !active_ai)
|
||||
clear_holo(master)
|
||||
continue
|
||||
|
||||
else if (HOLOPAD_MODE == AREA_BASED)
|
||||
if((HOLOPAD_MODE == RANGE_BASED && (get_dist(master.eyeobj, src) > holo_range)))
|
||||
clear_holo(master)
|
||||
continue
|
||||
|
||||
var/area/holo_area = get_area(src)
|
||||
var/area/eye_area = get_area(master.eyeobj)
|
||||
if(HOLOPAD_MODE == AREA_BASED)
|
||||
var/area/holo_area = get_area(src)
|
||||
var/area/eye_area = get_area(master.eyeobj)
|
||||
|
||||
if(eye_area in holo_area.master.related)
|
||||
return 1
|
||||
if(!(eye_area in holo_area.master.related))
|
||||
clear_holo(master)
|
||||
continue
|
||||
|
||||
clear_holo(master)//If not, we want to get rid of the hologram.
|
||||
use_power(power_per_hologram)
|
||||
return 1
|
||||
|
||||
/obj/machinery/hologram/holopad/proc/move_hologram(mob/living/silicon/ai/user)
|
||||
|
||||
@@ -196,7 +196,7 @@ Class Procs:
|
||||
user.set_machine(src)
|
||||
|
||||
/obj/machinery/CouldNotUseTopic(var/mob/user)
|
||||
usr.unset_machine()
|
||||
user.unset_machine()
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -323,7 +323,7 @@
|
||||
if(speed <= 0)
|
||||
speed = 1
|
||||
if("setpath")
|
||||
var/newpath = sanitize(copytext(input(usr, "Please define a new path!",,path) as text|null,1,MAX_MESSAGE_LEN))
|
||||
var/newpath = sanitize(input(usr, "Please define a new path!",,path) as text|null)
|
||||
if(newpath && newpath != "")
|
||||
moving = 0 // stop moving
|
||||
path = newpath
|
||||
|
||||
@@ -194,7 +194,7 @@ Transponder Codes:<UL>"}
|
||||
updateDialog()
|
||||
|
||||
else if(href_list["locedit"])
|
||||
var/newloc = sanitize(copytext(input("Enter New Location", "Navigation Beacon", location) as text|null,1,MAX_MESSAGE_LEN))
|
||||
var/newloc = sanitize(input("Enter New Location", "Navigation Beacon", location) as text|null)
|
||||
if(newloc)
|
||||
location = newloc
|
||||
updateDialog()
|
||||
|
||||
@@ -496,9 +496,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
usr.set_machine(src)
|
||||
if(href_list["set_channel_name"])
|
||||
src.channel_name = strip_html(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""))
|
||||
while (findtext(src.channel_name," ") == 1)
|
||||
src.channel_name = copytext(src.channel_name,2,lentext(src.channel_name)+1)
|
||||
src.channel_name = sanitizeSafe(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""))
|
||||
src.updateUsrDialog()
|
||||
//src.update_icon()
|
||||
|
||||
@@ -541,9 +539,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
src.updateUsrDialog()
|
||||
|
||||
else if(href_list["set_new_message"])
|
||||
src.msg = strip_html(input(usr, "Write your Feed story", "Network Channel Handler", ""))
|
||||
while (findtext(src.msg," ") == 1)
|
||||
src.msg = copytext(src.msg,2,lentext(src.msg)+1)
|
||||
src.msg = sanitize(input(usr, "Write your Feed story", "Network Channel Handler", ""))
|
||||
src.updateUsrDialog()
|
||||
|
||||
else if(href_list["set_attachment"])
|
||||
@@ -600,15 +596,11 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
src.updateUsrDialog()
|
||||
|
||||
else if(href_list["set_wanted_name"])
|
||||
src.channel_name = strip_html(input(usr, "Provide the name of the Wanted person", "Network Security Handler", ""))
|
||||
while (findtext(src.channel_name," ") == 1)
|
||||
src.channel_name = copytext(src.channel_name,2,lentext(src.channel_name)+1)
|
||||
src.channel_name = sanitizeSafe(input(usr, "Provide the name of the Wanted person", "Network Security Handler", ""))
|
||||
src.updateUsrDialog()
|
||||
|
||||
else if(href_list["set_wanted_desc"])
|
||||
src.msg = strip_html(input(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler", ""))
|
||||
while (findtext(src.msg," ") == 1)
|
||||
src.msg = copytext(src.msg,2,lentext(src.msg)+1)
|
||||
src.msg = sanitize(input(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler", ""))
|
||||
src.updateUsrDialog()
|
||||
|
||||
else if(href_list["submit_wanted"])
|
||||
@@ -944,8 +936,8 @@ obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(src.scribble_page == src.curr_page)
|
||||
user << "<FONT COLOR='blue'>There's already a scribble in this page... You wouldn't want to make things too cluttered, would you?</FONT>"
|
||||
else
|
||||
var/s = strip_html( input(user, "Write something", "Newspaper", "") )
|
||||
s = sanitize(copytext(s, 1, MAX_MESSAGE_LEN))
|
||||
var/s = sanitize(input(user, "Write something", "Newspaper", ""))
|
||||
s = sanitize(s)
|
||||
if (!s)
|
||||
return
|
||||
if (!in_range(src, usr) && src.loc != usr)
|
||||
|
||||
@@ -78,8 +78,10 @@ Buildable meters
|
||||
is_bent = 1
|
||||
if (istype(make_from, /obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction))
|
||||
src.pipe_type = PIPE_JUNCTION
|
||||
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_HE
|
||||
else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/heat_exchanging))
|
||||
src.pipe_type = PIPE_HE_STRAIGHT + is_bent
|
||||
connect_types = CONNECT_TYPE_HE
|
||||
else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/insulated))
|
||||
src.pipe_type = PIPE_INSULATED_STRAIGHT + is_bent
|
||||
else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/visible/supply) || istype(make_from, /obj/machinery/atmospherics/pipe/simple/hidden/supply))
|
||||
@@ -190,6 +192,10 @@ Buildable meters
|
||||
else if (pipe_type == 31 || pipe_type == 32 || pipe_type == 34 || pipe_type == 36 || pipe_type == 38 || pipe_type == 40 || pipe_type == 42)
|
||||
connect_types = CONNECT_TYPE_SCRUBBER
|
||||
src.color = PIPE_COLOR_RED
|
||||
else if (pipe_type == 2 || pipe_type == 3)
|
||||
connect_types = CONNECT_TYPE_HE
|
||||
else if (pipe_type == 6)
|
||||
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_HE
|
||||
else if (pipe_type == 28)
|
||||
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_SUPPLY|CONNECT_TYPE_SCRUBBER
|
||||
//src.pipe_dir = get_pipe_dir()
|
||||
|
||||
@@ -818,7 +818,7 @@
|
||||
|
||||
if(istype(I, /obj/item/weapon/pen)) //you can rename turrets like bots!
|
||||
var/t = input(user, "Enter new turret name", name, finish_name) as text
|
||||
t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN))
|
||||
t = sanitize(t)
|
||||
if(!t)
|
||||
return
|
||||
if(!in_range(src, usr) && loc != usr)
|
||||
|
||||
@@ -223,7 +223,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
if(reject_bad_text(href_list["write"]))
|
||||
dpt = ckey(href_list["write"]) //write contains the string of the receiving department's name
|
||||
|
||||
var/new_message = copytext(reject_bad_text(input(usr, "Write your message:", "Awaiting Input", "")),1,MAX_MESSAGE_LEN)
|
||||
var/new_message = sanitize(input("Write your message:", "Awaiting Input", ""))
|
||||
if(new_message)
|
||||
message = new_message
|
||||
screen = 9
|
||||
@@ -238,7 +238,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
priority = -1
|
||||
|
||||
if(href_list["writeAnnouncement"])
|
||||
var/new_message = copytext(reject_bad_text(input(usr, "Write your message:", "Awaiting Input", "")),1,MAX_MESSAGE_LEN)
|
||||
var/new_message = sanitize(input("Write your message:", "Awaiting Input", ""))
|
||||
if(new_message)
|
||||
message = new_message
|
||||
switch(href_list["priority"])
|
||||
|
||||
@@ -1569,8 +1569,8 @@
|
||||
return
|
||||
if (href_list["change_name"])
|
||||
if(usr != src.occupant) return
|
||||
var/newname = strip_html_simple(input(occupant,"Choose new exosuit name","Rename exosuit",initial(name)) as text, MAX_NAME_LEN)
|
||||
if(newname && trim(newname))
|
||||
var/newname = sanitizeSafe(input(occupant,"Choose new exosuit name","Rename exosuit",initial(name)) as text, MAX_NAME_LEN)
|
||||
if(newname)
|
||||
name = newname
|
||||
else
|
||||
alert(occupant, "nope.avi")
|
||||
|
||||
@@ -43,9 +43,9 @@
|
||||
var/datum/topic_input/filter = new /datum/topic_input(href,href_list)
|
||||
if(href_list["send_message"])
|
||||
var/obj/item/mecha_parts/mecha_tracking/MT = filter.getObj("send_message")
|
||||
var/message = strip_html_simple(input(usr,"Input message","Transmit message") as text)
|
||||
var/message = sanitize(input(usr,"Input message","Transmit message") as text)
|
||||
var/obj/mecha/M = MT.in_mecha()
|
||||
if(trim(message) && M)
|
||||
if(message && M)
|
||||
M.occupant_message(message)
|
||||
return
|
||||
if(href_list["shock"])
|
||||
|
||||
@@ -114,7 +114,7 @@ move an amendment</a> to the drawing.</p>
|
||||
usr << "\red Error! Please notify administration!"
|
||||
return
|
||||
var/list/turf/turfs = res
|
||||
var/str = trim(stripped_input(usr,"New area name:","Blueprint Editing", "", MAX_NAME_LEN))
|
||||
var/str = sanitizeSafe(input("New area name:","Blueprint Editing", ""), MAX_NAME_LEN)
|
||||
if(!str || !length(str)) //cancel
|
||||
return
|
||||
if(length(str) > 50)
|
||||
@@ -154,7 +154,7 @@ move an amendment</a> to the drawing.</p>
|
||||
var/area/A = get_area()
|
||||
//world << "DEBUG: edit_area"
|
||||
var/prevname = "[A.name]"
|
||||
var/str = trim(stripped_input(usr,"New area name:","Blueprint Editing", prevname, MAX_NAME_LEN))
|
||||
var/str = sanitizeSafe(input("New area name:","Blueprint Editing", prevname), MAX_NAME_LEN)
|
||||
if(!str || !length(str) || str==prevname) //cancel
|
||||
return
|
||||
if(length(str) > 50)
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
return
|
||||
if (!in_range(src, user) && src.loc != user)
|
||||
return
|
||||
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
t = sanitize(t)
|
||||
if (t)
|
||||
src.name = "body bag - "
|
||||
src.name += t
|
||||
|
||||
@@ -689,7 +689,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if ("Edit")
|
||||
var/n = input(U, "Please enter message", name, notehtml) as message
|
||||
if (in_range(src, U) && loc == U)
|
||||
n = copytext(adminscrub(n), 1, MAX_MESSAGE_LEN)
|
||||
n = sanitizeSafe(n, extra = 0)
|
||||
if (mode == 1)
|
||||
note = html_decode(n)
|
||||
notehtml = note
|
||||
@@ -726,7 +726,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
U << "The PDA softly beeps."
|
||||
ui.close()
|
||||
else
|
||||
t = sanitize(copytext(t, 1, 20))
|
||||
t = sanitize(t, 20)
|
||||
ttone = t
|
||||
else
|
||||
ui.close()
|
||||
@@ -735,7 +735,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
var/t = input(U, "Please enter new news tone", name, newstone) as text
|
||||
if (in_range(src, U) && loc == U)
|
||||
if (t)
|
||||
t = sanitize(copytext(t, 1, 20))
|
||||
t = sanitize(t, 20)
|
||||
newstone = t
|
||||
else
|
||||
ui.close()
|
||||
@@ -971,8 +971,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
U.visible_message("<span class='notice'>[U] taps on \his PDA's screen.</span>")
|
||||
U.last_target_click = world.time
|
||||
var/t = input(U, "Please enter message", P.name, null) as text
|
||||
t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN))
|
||||
t = readd_quotes(t)
|
||||
t = sanitize(t)
|
||||
//t = readd_quotes(t)
|
||||
t = replace_characters(t, list(""" = "\""))
|
||||
if (!t || !istype(P))
|
||||
return
|
||||
if (!in_range(src, U) && loc != U)
|
||||
|
||||
@@ -562,10 +562,10 @@
|
||||
if("alert")
|
||||
post_status("alert", href_list["alert"])
|
||||
if("setmsg1")
|
||||
message1 = reject_bad_text(trim(sanitize(copytext(input("Line 1", "Enter Message Text", message1) as text|null, 1, 40))), 40)
|
||||
message1 = reject_bad_text(sanitize(input("Line 1", "Enter Message Text", message1) as text|null, 40), 40)
|
||||
updateSelfDialog()
|
||||
if("setmsg2")
|
||||
message2 = reject_bad_text(trim(sanitize(copytext(input("Line 2", "Enter Message Text", message2) as text|null, 1, 40))), 40)
|
||||
message2 = reject_bad_text(sanitize(input("Line 2", "Enter Message Text", message2) as text|null, 40), 40)
|
||||
updateSelfDialog()
|
||||
else
|
||||
post_status(href_list["statdisp"])
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
user << "\red \The [src] needs to recharge!"
|
||||
return
|
||||
|
||||
var/message = sanitize(copytext(input(user, "Shout a message?", "Megaphone", null) as text,1,MAX_MESSAGE_LEN))
|
||||
var/message = sanitize(input(user, "Shout a message?", "Megaphone", null) as text)
|
||||
if(!message)
|
||||
return
|
||||
message = capitalize(message)
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
if(2)
|
||||
radio.ToggleReception()
|
||||
if(href_list["setlaws"])
|
||||
var/newlaws = sanitize(copytext(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message,1,MAX_MESSAGE_LEN))
|
||||
var/newlaws = sanitize(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message)
|
||||
if(newlaws)
|
||||
pai.pai_laws = newlaws
|
||||
pai << "Your supplemental directives have been updated. Your new directives are:"
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
user << "\blue The MMI must go in after everything else!"
|
||||
|
||||
if (istype(W, /obj/item/weapon/pen))
|
||||
var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name, MAX_NAME_LEN)
|
||||
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, usr) && src.loc != usr)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
var/heldname = "default name"
|
||||
|
||||
/obj/item/borg/upgrade/rename/attack_self(mob/user as mob)
|
||||
heldname = stripped_input(user, "Enter new robot name", "Robot Reclassification", heldname, MAX_NAME_LEN)
|
||||
heldname = sanitizeSafe(input(user, "Enter new robot name", "Robot Reclassification", heldname), MAX_NAME_LEN)
|
||||
|
||||
/obj/item/borg/upgrade/rename/action(var/mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
|
||||
@@ -68,5 +68,9 @@
|
||||
name = "\improper \"LiquidFood\" ration"
|
||||
icon_state = "liquidfood"
|
||||
|
||||
/obj/item/trash/tastybread
|
||||
name = "bread tube"
|
||||
icon_state = "tastybread"
|
||||
|
||||
/obj/item/trash/attack(mob/M as mob, mob/living/user as mob)
|
||||
return
|
||||
|
||||
@@ -98,7 +98,7 @@ AI MODULES
|
||||
|
||||
/obj/item/weapon/aiModule/safeguard/attack_self(var/mob/user as mob)
|
||||
..()
|
||||
var/targName = stripped_input(usr, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name)
|
||||
var/targName = sanitize(input("Please enter the name of the person to safeguard.", "Safeguard who?", user.name))
|
||||
targetName = targName
|
||||
desc = text("A 'safeguard' AI module: 'Safeguard []. Individuals that threaten [] are not human and are a threat to humans.'", targetName, targetName)
|
||||
|
||||
@@ -127,7 +127,7 @@ AI MODULES
|
||||
|
||||
/obj/item/weapon/aiModule/oneHuman/attack_self(var/mob/user as mob)
|
||||
..()
|
||||
var/targName = stripped_input(usr, "Please enter the name of the person who is the only human.", "Who?", user.real_name)
|
||||
var/targName = sanitize(input("Please enter the name of the person who is the only human.", "Who?", user.real_name))
|
||||
targetName = targName
|
||||
desc = text("A 'one human' AI module: 'Only [] is human.'", targetName)
|
||||
|
||||
@@ -265,7 +265,7 @@ AI MODULES
|
||||
if(new_lawpos < MIN_SUPPLIED_LAW_NUMBER) return
|
||||
lawpos = min(new_lawpos, MAX_SUPPLIED_LAW_NUMBER)
|
||||
var/newlaw = ""
|
||||
var/targName = sanitize(copytext(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw),1,MAX_MESSAGE_LEN))
|
||||
var/targName = sanitize(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
|
||||
newFreeFormLaw = targName
|
||||
desc = "A 'freeform' AI module: ([lawpos]) '[newFreeFormLaw]'"
|
||||
|
||||
@@ -378,7 +378,7 @@ AI MODULES
|
||||
/obj/item/weapon/aiModule/freeformcore/attack_self(var/mob/user as mob)
|
||||
..()
|
||||
var/newlaw = ""
|
||||
var/targName = stripped_input(usr, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw)
|
||||
var/targName = sanitize(input("Please enter a new core law for the AI.", "Freeform Law Entry", newlaw))
|
||||
newFreeFormLaw = targName
|
||||
desc = "A 'freeform' Core AI module: '[newFreeFormLaw]'"
|
||||
|
||||
@@ -403,7 +403,7 @@ AI MODULES
|
||||
/obj/item/weapon/aiModule/syndicate/attack_self(var/mob/user as mob)
|
||||
..()
|
||||
var/newlaw = ""
|
||||
var/targName = stripped_input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw,MAX_MESSAGE_LEN)
|
||||
var/targName = sanitize(input("Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
|
||||
newFreeFormLaw = targName
|
||||
desc = "A hacked AI law module: '[newFreeFormLaw]'"
|
||||
|
||||
|
||||
@@ -224,13 +224,13 @@
|
||||
/obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob)
|
||||
if(!src.registered_name)
|
||||
//Stop giving the players unsanitized unputs! You are giving ways for players to intentionally crash clients! -Nodrak
|
||||
var t = reject_bad_name(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name))
|
||||
var t = sanitizeName(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name))
|
||||
if(!t) //Same as mob/new_player/prefrences.dm
|
||||
alert("Invalid name.")
|
||||
return
|
||||
src.registered_name = t
|
||||
|
||||
var u = sanitize(copytext(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Agent"),1,MAX_MESSAGE_LEN))
|
||||
var u = sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Agent"))
|
||||
if(!u)
|
||||
alert("Invalid assignment.")
|
||||
src.registered_name = ""
|
||||
@@ -245,13 +245,13 @@
|
||||
|
||||
switch(alert("Would you like to display the ID, or retitle it?","Choose.","Rename","Show"))
|
||||
if("Rename")
|
||||
var t = sanitize(copytext(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name),1,26))
|
||||
var t = sanitize(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name), 26)
|
||||
if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall") //Same as mob/new_player/prefrences.dm
|
||||
alert("Invalid name.")
|
||||
return
|
||||
src.registered_name = t
|
||||
|
||||
var u = sanitize(copytext(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant"),1,MAX_MESSAGE_LEN))
|
||||
var u = sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant"))
|
||||
if(!u)
|
||||
alert("Invalid assignment.")
|
||||
return
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
user << "\red Circuit controls are locked."
|
||||
return
|
||||
var/existing_networks = list2text(network,",")
|
||||
var/input = strip_html(input(usr, "Which networks would you like to connect this camera console circuit to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks))
|
||||
var/input = sanitize(input(usr, "Which networks would you like to connect this camera console circuit to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks))
|
||||
if(!input)
|
||||
usr << "No input found please hang up and try your call again."
|
||||
return
|
||||
|
||||
@@ -152,7 +152,7 @@ Implant Specifics:<BR>"}
|
||||
|
||||
hear(var/msg)
|
||||
var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
|
||||
msg = sanitize_simple(msg, replacechars)
|
||||
msg = replace_characters(msg, replacechars)
|
||||
if(findtext(msg,phrase))
|
||||
activate()
|
||||
del(src)
|
||||
@@ -206,7 +206,7 @@ Implant Specifics:<BR>"}
|
||||
elevel = alert("What sort of explosion would you prefer?", "Implant Intent", "Localized Limb", "Destroy Body", "Full Explosion")
|
||||
phrase = input("Choose activation phrase:") as text
|
||||
var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
|
||||
phrase = sanitize_simple(phrase, replacechars)
|
||||
phrase = replace_characters(phrase, replacechars)
|
||||
usr.mind.store_memory("Explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', <B>say [src.phrase]</B> to attempt to activate.", 0, 0)
|
||||
usr << "The implanted explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', <B>say [src.phrase]</B> to attempt to activate."
|
||||
return 1
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
return
|
||||
if((!in_range(src, usr) && src.loc != user))
|
||||
return
|
||||
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
t = sanitize(t)
|
||||
if(t)
|
||||
src.name = text("Glass Case - '[]'", t)
|
||||
else
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
|
||||
/obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = copytext(stripped_input(user, "Enter the name for the door.", src.name, src.created_name),1,MAX_NAME_LEN)
|
||||
var/t = sanitizeSafe(input(user, "Enter the name for the door.", src.name, src.created_name), MAX_NAME_LEN)
|
||||
if(!t) return
|
||||
if(!in_range(src, usr) && src.loc != usr) return
|
||||
created_name = t
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
return
|
||||
if ((!in_range(src, usr) && src.loc != user))
|
||||
return
|
||||
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
t = sanitize(t)
|
||||
if (t)
|
||||
src.name = text("Morgue- '[]'", t)
|
||||
else
|
||||
@@ -258,7 +258,7 @@
|
||||
return
|
||||
if ((!in_range(src, usr) > 1 && src.loc != user))
|
||||
return
|
||||
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
t = sanitize(t)
|
||||
if (t)
|
||||
src.name = text("Crematorium- '[]'", t)
|
||||
else
|
||||
|
||||
@@ -53,7 +53,7 @@ client/verb/JoinResponseTeam()
|
||||
|
||||
for (var/obj/effect/landmark/L in landmarks_list) if (L.name == "Commando")
|
||||
L.name = null//Reserving the place.
|
||||
var/new_name = input(usr, "Pick a name","Name") as null|text
|
||||
var/new_name = sanitizeSafe(input(usr, "Pick a name","Name") as null|text, MAX_NAME_LEN)
|
||||
if(!new_name)//Somebody changed his mind, place is available again.
|
||||
L.name = "Commando"
|
||||
return
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
src << "Guests may not use OOC."
|
||||
return
|
||||
|
||||
msg = trim(sanitize(copytext(msg, 1, MAX_MESSAGE_LEN)))
|
||||
msg = sanitize(msg)
|
||||
if(!msg) return
|
||||
|
||||
if(!(prefs.toggles & CHAT_OOC))
|
||||
@@ -77,7 +77,7 @@
|
||||
src << "Guests may not use OOC."
|
||||
return
|
||||
|
||||
msg = trim(sanitize(copytext(msg, 1, MAX_MESSAGE_LEN)))
|
||||
msg = sanitize(msg)
|
||||
if(!msg) return
|
||||
|
||||
if(!(prefs.toggles & CHAT_LOOC))
|
||||
|
||||
@@ -181,7 +181,7 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null)
|
||||
switch(param)
|
||||
if("reason")
|
||||
if(!value)
|
||||
value = input("Insert the new reason for [pckey]'s ban", "New Reason", "[reason]", null) as null|text
|
||||
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"
|
||||
|
||||
@@ -725,10 +725,10 @@ var/global/floorIsLava = 0
|
||||
set desc="Announce your desires to the world"
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/message = input("Global message to send:", "Admin Announce", null, null) as message
|
||||
var/message = input("Global message to send:", "Admin Announce", null, null) as message//todo: sanitize for all?
|
||||
if(message)
|
||||
if(!check_rights(R_SERVER,0))
|
||||
message = adminscrub(message,500)
|
||||
message = sanitize(message, 500, extra = 0)
|
||||
world << "\blue <b>[usr.client.holder.fakekey ? "Administrator" : usr.key] Announces:</b>\n \t [message]"
|
||||
log_admin("Announce: [key_name(usr)] : [message]")
|
||||
feedback_add_details("admin_verb","A") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
/client/proc/admin_memo_write()
|
||||
var/savefile/F = new(MEMOFILE)
|
||||
if(F)
|
||||
var/memo = input(src,"Type your memo\n(Leaving it blank will delete your current memo):","Write Memo",null) as null|message
|
||||
var/memo = sanitize(input(src,"Type your memo\n(Leaving it blank will delete your current memo):","Write Memo",null) as null|message, extra = 0)
|
||||
switch(memo)
|
||||
if(null)
|
||||
return
|
||||
|
||||
@@ -617,7 +617,7 @@ var/list/admin_verbs_mentor = list(
|
||||
set name = "Make Sound"
|
||||
set desc = "Display a message to everyone who can hear the target"
|
||||
if(O)
|
||||
var/message = input("What do you want the message to be?", "Make Sound") as text|null
|
||||
var/message = sanitize(input("What do you want the message to be?", "Make Sound") as text|null)
|
||||
if(!message)
|
||||
return
|
||||
for (var/mob/V in hearers(O))
|
||||
@@ -709,7 +709,7 @@ var/list/admin_verbs_mentor = list(
|
||||
return
|
||||
|
||||
if(holder)
|
||||
var/new_name = trim_strip_input(src, "Enter new name. Leave blank or as is to cancel.", "Enter new silicon name", S.real_name)
|
||||
var/new_name = sanitizeSafe(input(src, "Enter new name. Leave blank or as is to cancel.", "Enter new silicon name", S.real_name))
|
||||
if(new_name && new_name != S.real_name)
|
||||
admin_log_and_message_admins("has renamed the silicon '[S.real_name]' to '[new_name]'")
|
||||
S.SetName(new_name)
|
||||
|
||||
@@ -328,12 +328,12 @@
|
||||
mins = min(525599,mins)
|
||||
minutes = CMinutes + mins
|
||||
duration = GetExp(minutes)
|
||||
reason = input(usr,"Reason?","reason",reason2) as text|null
|
||||
reason = sanitize(input(usr,"Reason?","reason",reason2) as text|null)
|
||||
if(!reason) return
|
||||
if("No")
|
||||
temp = 0
|
||||
duration = "Perma"
|
||||
reason = input(usr,"Reason?","reason",reason2) as text|null
|
||||
reason = sanitize(input(usr,"Reason?","reason",reason2) as text|null)
|
||||
if(!reason) return
|
||||
|
||||
log_admin("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]")
|
||||
@@ -655,7 +655,7 @@
|
||||
var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null
|
||||
if(!mins)
|
||||
return
|
||||
var/reason = input(usr,"Reason?","Please State Reason","") as text|null
|
||||
var/reason = sanitize(input(usr,"Reason?","Please State Reason","") as text|null)
|
||||
if(!reason)
|
||||
return
|
||||
|
||||
@@ -680,7 +680,7 @@
|
||||
return 1
|
||||
if("No")
|
||||
if(!check_rights(R_BAN)) return
|
||||
var/reason = input(usr,"Reason?","Please State Reason","") as text|null
|
||||
var/reason = sanitize(input(usr,"Reason?","Please State Reason","") as text|null)
|
||||
if(reason)
|
||||
var/msg
|
||||
for(var/job in notbannedlist)
|
||||
@@ -737,7 +737,7 @@
|
||||
if (ismob(M))
|
||||
if(!check_if_greater_rights_than(M.client))
|
||||
return
|
||||
var/reason = input("Please enter reason")
|
||||
var/reason = sanitize(input("Please enter reason"))
|
||||
if(!reason)
|
||||
M << "\red You have been kicked from the server"
|
||||
else
|
||||
@@ -794,7 +794,7 @@
|
||||
if(!mins)
|
||||
return
|
||||
if(mins >= 525600) mins = 525599
|
||||
var/reason = input(usr,"Reason?","reason","Griefer") as text|null
|
||||
var/reason = sanitize(input(usr,"Reason?","reason","Griefer") as text|null)
|
||||
if(!reason)
|
||||
return
|
||||
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins)
|
||||
@@ -815,7 +815,7 @@
|
||||
//del(M) // See no reason why to delete mob. Important stuff can be lost. And ban can be lifted before round ends.
|
||||
if("No")
|
||||
if(!check_rights(R_BAN)) return
|
||||
var/reason = input(usr,"Reason?","reason","Griefer") as text|null
|
||||
var/reason = sanitize(input(usr,"Reason?","reason","Griefer") as text|null)
|
||||
if(!reason)
|
||||
return
|
||||
switch(alert(usr,"IP ban?",,"Yes","No","Cancel"))
|
||||
@@ -1341,7 +1341,7 @@
|
||||
usr << "The person you are trying to contact is not wearing a headset"
|
||||
return
|
||||
|
||||
var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from Centcomm", "")
|
||||
var/input = sanitize(input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from Centcomm", ""))
|
||||
if(!input) return
|
||||
|
||||
src.owner << "You sent [input] to [H] via a secure channel."
|
||||
@@ -1358,7 +1358,7 @@
|
||||
usr << "The person you are trying to contact is not wearing a headset"
|
||||
return
|
||||
|
||||
var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from a shadowy figure...", "")
|
||||
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."
|
||||
@@ -1405,6 +1405,7 @@
|
||||
var/mob/sender = locate(href_list["CentcommFaxReply"])
|
||||
var/obj/machinery/photocopier/faxmachine/fax = locate(href_list["originfax"])
|
||||
|
||||
//todo: sanitize
|
||||
var/input = input(src.owner, "Please enter a message to reply to [key_name(sender)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use <br> for line breaks.", "Outgoing message from Centcomm", "") as message|null
|
||||
if(!input) return
|
||||
|
||||
@@ -2388,9 +2389,7 @@
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_set_channel_name"])
|
||||
src.admincaster_feed_channel.channel_name = strip_html_simple(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""))
|
||||
while (findtext(src.admincaster_feed_channel.channel_name," ") == 1)
|
||||
src.admincaster_feed_channel.channel_name = copytext(src.admincaster_feed_channel.channel_name,2,lentext(src.admincaster_feed_channel.channel_name)+1)
|
||||
src.admincaster_feed_channel.channel_name = sanitizeSafe(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""))
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_set_channel_lock"])
|
||||
@@ -2423,13 +2422,11 @@
|
||||
var/list/available_channels = list()
|
||||
for(var/datum/feed_channel/F in news_network.network_channels)
|
||||
available_channels += F.channel_name
|
||||
src.admincaster_feed_channel.channel_name = adminscrub(input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels )
|
||||
src.admincaster_feed_channel.channel_name = sanitizeSafe(input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels )
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_set_new_message"])
|
||||
src.admincaster_feed_message.body = adminscrub(input(usr, "Write your Feed story", "Network Channel Handler", ""))
|
||||
while (findtext(src.admincaster_feed_message.body," ") == 1)
|
||||
src.admincaster_feed_message.body = copytext(src.admincaster_feed_message.body,2,lentext(src.admincaster_feed_message.body)+1)
|
||||
src.admincaster_feed_message.body = sanitize(input(usr, "Write your Feed story", "Network Channel Handler", ""))
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_submit_new_message"])
|
||||
@@ -2471,15 +2468,11 @@
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_set_wanted_name"])
|
||||
src.admincaster_feed_message.author = adminscrub(input(usr, "Provide the name of the Wanted person", "Network Security Handler", ""))
|
||||
while (findtext(src.admincaster_feed_message.author," ") == 1)
|
||||
src.admincaster_feed_message.author = copytext(admincaster_feed_message.author,2,lentext(admincaster_feed_message.author)+1)
|
||||
src.admincaster_feed_message.author = sanitize(input(usr, "Provide the name of the Wanted person", "Network Security Handler", ""))
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_set_wanted_desc"])
|
||||
src.admincaster_feed_message.body = adminscrub(input(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler", ""))
|
||||
while (findtext(src.admincaster_feed_message.body," ") == 1)
|
||||
src.admincaster_feed_message.body = copytext(src.admincaster_feed_message.body,2,lentext(src.admincaster_feed_message.body)+1)
|
||||
src.admincaster_feed_message.body = sanitize(input(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler", ""))
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_submit_wanted"])
|
||||
@@ -2584,7 +2577,7 @@
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_set_signature"])
|
||||
src.admincaster_signature = adminscrub(input(usr, "Provide your desired signature", "Network Identity Handler", ""))
|
||||
src.admincaster_signature = sanitize(input(usr, "Provide your desired signature", "Network Identity Handler", ""))
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["populate_inactive_customitems"])
|
||||
@@ -2622,7 +2615,7 @@
|
||||
|
||||
if(href_list["add_player_info"])
|
||||
var/key = href_list["add_player_info"]
|
||||
var/add = input("Add Player Info") as null|text
|
||||
var/add = sanitize(input("Add Player Info") as null|text)
|
||||
if(!add) return
|
||||
|
||||
notes_add(key,add,usr)
|
||||
|
||||
@@ -23,7 +23,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
//clean the input msg
|
||||
if(!msg)
|
||||
return
|
||||
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
|
||||
msg = sanitize(msg)
|
||||
if(!msg)
|
||||
return
|
||||
var/original_msg = msg
|
||||
|
||||
@@ -60,8 +60,9 @@
|
||||
return
|
||||
|
||||
//clean the message if it's not sent by a high-rank admin
|
||||
//todo: sanitize for all???
|
||||
if(!check_rights(R_SERVER|R_DEBUG,0))
|
||||
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
|
||||
msg = sanitize(msg)
|
||||
if(!msg) return
|
||||
|
||||
var/recieve_pm_type = "Player"
|
||||
@@ -91,7 +92,7 @@
|
||||
spawn(0) //so we don't hold the caller proc up
|
||||
var/sender = src
|
||||
var/sendername = key
|
||||
var/reply = input(C, msg,"[recieve_pm_type] PM from [sendername]", "") as text|null //show message and await a reply
|
||||
var/reply = sanitize(input(C, msg,"[recieve_pm_type] PM from [sendername]", "") as text|null) //show message and await a reply
|
||||
if(C && reply)
|
||||
if(sender)
|
||||
C.cmd_admin_pm(sender,reply) //sender is still about, let's reply to them
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
set hidden = 1
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
|
||||
msg = sanitize(msg)
|
||||
if(!msg) return
|
||||
|
||||
log_admin("[key_name(src)] : [msg]")
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_MENTOR)) return
|
||||
|
||||
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
|
||||
msg = sanitize(msg)
|
||||
log_admin("MOD: [key_name(src)] : [msg]")
|
||||
|
||||
if (!msg)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
|
||||
msg = sanitize(msg)
|
||||
if(!msg) return
|
||||
|
||||
var/display_name = src.key
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
|
||||
var/input = 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
|
||||
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)
|
||||
if(!input || input == "")
|
||||
custom_event_msg = null
|
||||
log_admin("[usr.key] has cleared the custom event text.")
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
world << "<h1 class='alert'>Custom Event</h1>"
|
||||
world << "<h2 class='alert'>A custom event is starting. OOC Info:</h2>"
|
||||
world << "<span class='alert'>[html_encode(custom_event_msg)]</span>"
|
||||
world << "<span class='alert'>[custom_event_msg]</span>"
|
||||
world << "<br>"
|
||||
|
||||
// normal verb for players to view info
|
||||
@@ -36,5 +36,5 @@
|
||||
|
||||
src << "<h1 class='alert'>Custom Event</h1>"
|
||||
src << "<h2 class='alert'>A custom event is taking place. OOC Info:</h2>"
|
||||
src << "<span class='alert'>[html_encode(custom_event_msg)]</span>"
|
||||
src << "<span class='alert'>[custom_event_msg]</span>"
|
||||
src << "<br>"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
if (src.holder.rights & R_ADMIN)
|
||||
stafftype = "ADMIN"
|
||||
|
||||
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
|
||||
msg = sanitize(msg)
|
||||
log_admin("[key_name(src)] : [msg]")
|
||||
|
||||
if (!msg)
|
||||
|
||||
@@ -205,7 +205,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
return 0
|
||||
var/obj/item/device/paicard/card = new(T)
|
||||
var/mob/living/silicon/pai/pai = new(card)
|
||||
pai.name = input(choice, "Enter your pAI name:", "pAI Name", "Personal AI") as text
|
||||
pai.name = sanitizeSafe(input(choice, "Enter your pAI name:", "pAI Name", "Personal AI") as text)
|
||||
pai.real_name = pai.name
|
||||
pai.key = choice.key
|
||||
card.setPersonality(pai)
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
return .(O.vars[variable])
|
||||
|
||||
if("text")
|
||||
var/new_value = input("Enter new text:","Text",O.vars[variable]) as text|null
|
||||
var/new_value = input("Enter new text:","Text",O.vars[variable]) as text|null//todo: sanitize ???
|
||||
if(new_value == null) return
|
||||
O.vars[variable] = new_value
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
switch(class)
|
||||
|
||||
if("text")
|
||||
var_value = input("Enter new text:","Text") as null|text
|
||||
var_value = input("Enter new text:","Text") as null|text//todo: sanitize ???
|
||||
|
||||
if("num")
|
||||
var_value = input("Enter new number:","Num") as null|num
|
||||
@@ -93,7 +93,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
switch(class)
|
||||
|
||||
if("text")
|
||||
var_value = input("Enter new text:","Text") as text
|
||||
var_value = input("Enter new text:","Text") as text//todo: sanitize ???
|
||||
|
||||
if("num")
|
||||
var_value = input("Enter new number:","Num") as num
|
||||
@@ -243,7 +243,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
return
|
||||
|
||||
if("text")
|
||||
L[L.Find(variable)] = input("Enter new text:","Text") as text
|
||||
L[L.Find(variable)] = input("Enter new text:","Text") as text//todo: sanitize ???
|
||||
|
||||
if("num")
|
||||
L[L.Find(variable)] = input("Enter new number:","Num") as num
|
||||
@@ -450,7 +450,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
return .(O.vars[variable])
|
||||
|
||||
if("text")
|
||||
var/var_new = input("Enter new text:","Text",O.vars[variable]) as null|text
|
||||
var/var_new = input("Enter new text:","Text",O.vars[variable]) as null|text//todo: sanitize ???
|
||||
if(var_new==null) return
|
||||
O.vars[variable] = var_new
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
usr << "\red Speech is currently admin-disabled."
|
||||
return
|
||||
|
||||
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
|
||||
msg = sanitize(msg)
|
||||
if(!msg) return
|
||||
|
||||
if(usr.client)
|
||||
@@ -29,14 +29,14 @@
|
||||
//log_admin("HELP: [key_name(src)]: [msg]")
|
||||
|
||||
/proc/Centcomm_announce(var/text , var/mob/Sender , var/iamessage)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
var/msg = sanitize(text)
|
||||
msg = "\blue <b><font color=orange>CENTCOMM[iamessage ? " IA" : ""]:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
for(var/client/C in admins)
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
C << msg
|
||||
|
||||
/proc/Syndicate_announce(var/text , var/mob/Sender)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
var/msg = sanitize(text)
|
||||
msg = "\blue <b><font color=crimson>ILLEGAL:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;SyndicateReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
for(var/client/C in admins)
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
|
||||
var/msg = input("Message:", text("Subtle PM to [M.key]")) as text
|
||||
var/msg = sanitize(input("Message:", text("Subtle PM to [M.key]")) as text)
|
||||
|
||||
if (!msg)
|
||||
return
|
||||
@@ -109,7 +109,7 @@
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
|
||||
var/msg = input("Message:", text("Enter the text you wish to appear to everyone:")) as text
|
||||
var/msg = sanitize(input("Message:", text("Enter the text you wish to appear to everyone:")) as text)
|
||||
|
||||
if (!msg)
|
||||
return
|
||||
@@ -132,7 +132,7 @@
|
||||
if(!M)
|
||||
return
|
||||
|
||||
var/msg = input("Message:", text("Enter the text you wish to appear to your target:")) as text
|
||||
var/msg = sanitize(input("Message:", text("Enter the text you wish to appear to your target:")) as text)
|
||||
|
||||
if( !msg )
|
||||
return
|
||||
@@ -462,7 +462,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
var/input = input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null
|
||||
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)
|
||||
@@ -510,8 +510,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
var/input = input(usr, "Please enter anything you want. Anything. Serious.", "What?", "") as message|null
|
||||
var/customname = input(usr, "Pick a title for the report.", "Title") as text|null
|
||||
var/input = sanitize(input(usr, "Please enter anything you want. Anything. Serious.", "What?", "") as message|null, extra = 0)
|
||||
var/customname = sanitizeSafe(input(usr, "Pick a title for the report.", "Title") as text|null)
|
||||
if(!input)
|
||||
return
|
||||
if(!customname)
|
||||
|
||||
@@ -43,7 +43,7 @@ var/const/commandos_possible = 6 //if more Commandos are needed in the future
|
||||
|
||||
choice = null
|
||||
while(!choice)
|
||||
choice = sanitize(copytext(input(src, "Please specify which mission the strike team shall undertake.", "Specify Mission", ""),1,MAX_MESSAGE_LEN))
|
||||
choice = sanitize(input(src, "Please specify which mission the strike team shall undertake.", "Specify Mission", ""))
|
||||
if(!choice)
|
||||
if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes")
|
||||
return
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
if(custom_event_msg && custom_event_msg != "")
|
||||
src << "<h1 class='alert'>Custom Event</h1>"
|
||||
src << "<h2 class='alert'>A custom event is taking place. OOC Info:</h2>"
|
||||
src << "<span class='alert'>[html_encode(custom_event_msg)]</span>"
|
||||
src << "<span class='alert'>[custom_event_msg]</span>"
|
||||
src << "<br>"
|
||||
|
||||
if( (world.address == address || !address) && !host )
|
||||
|
||||
@@ -1003,16 +1003,10 @@ datum/preferences
|
||||
ShowChoices(user)
|
||||
return
|
||||
if("general")
|
||||
var/msg = input(usr,"Give a general description of your character. This will be shown regardless of clothing, and may include OOC notes and preferences.","Flavor Text",html_decode(flavor_texts[href_list["task"]])) as message
|
||||
if(msg != null)
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
msg = html_encode(msg)
|
||||
var/msg = sanitize(input(usr,"Give a general description of your character. This will be shown regardless of clothing, and may include OOC notes and preferences.","Flavor Text",html_decode(flavor_texts[href_list["task"]])) as message, extra = 0)
|
||||
flavor_texts[href_list["task"]] = msg
|
||||
else
|
||||
var/msg = input(usr,"Set the flavor text for your [href_list["task"]].","Flavor Text",html_decode(flavor_texts[href_list["task"]])) as message
|
||||
if(msg != null)
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
msg = html_encode(msg)
|
||||
var/msg = sanitize(input(usr,"Set the flavor text for your [href_list["task"]].","Flavor Text",html_decode(flavor_texts[href_list["task"]])) as message, extra = 0)
|
||||
flavor_texts[href_list["task"]] = msg
|
||||
SetFlavorText(user)
|
||||
return
|
||||
@@ -1027,16 +1021,10 @@ datum/preferences
|
||||
ShowChoices(user)
|
||||
return
|
||||
if("Default")
|
||||
var/msg = input(usr,"Set the default flavour text for your robot. It will be used for any module without individual setting.","Flavour Text",html_decode(flavour_texts_robot["Default"])) as message
|
||||
if(msg != null)
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
msg = html_encode(msg)
|
||||
var/msg = sanitize(input(usr,"Set the default flavour text for your robot. It will be used for any module without individual setting.","Flavour Text",html_decode(flavour_texts_robot["Default"])) as message, extra = 0)
|
||||
flavour_texts_robot[href_list["task"]] = msg
|
||||
else
|
||||
var/msg = input(usr,"Set the flavour text for your robot with [href_list["task"]] module. If you leave this empty, default flavour text will be used for this module.","Flavour Text",html_decode(flavour_texts_robot[href_list["task"]])) as message
|
||||
if(msg != null)
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
msg = html_encode(msg)
|
||||
var/msg = sanitize(input(usr,"Set the flavour text for your robot with [href_list["task"]] module. If you leave this empty, default flavour text will be used for this module.","Flavour Text",html_decode(flavour_texts_robot[href_list["task"]])) as message, extra = 0)
|
||||
flavour_texts_robot[href_list["task"]] = msg
|
||||
SetFlavourTextRobot(user)
|
||||
return
|
||||
@@ -1052,41 +1040,25 @@ datum/preferences
|
||||
else
|
||||
user << browse(null, "window=records")
|
||||
if(href_list["task"] == "med_record")
|
||||
var/medmsg = input(usr,"Set your medical notes here.","Medical Records",html_decode(med_record)) as message
|
||||
|
||||
var/medmsg = sanitize(input(usr,"Set your medical notes here.","Medical Records",html_decode(med_record)) as message, MAX_PAPER_MESSAGE_LEN, extra = 0)
|
||||
if(medmsg != null)
|
||||
medmsg = copytext(medmsg, 1, MAX_PAPER_MESSAGE_LEN)
|
||||
medmsg = html_encode(medmsg)
|
||||
|
||||
med_record = medmsg
|
||||
SetRecords(user)
|
||||
|
||||
if(href_list["task"] == "sec_record")
|
||||
var/secmsg = input(usr,"Set your security notes here.","Security Records",html_decode(sec_record)) as message
|
||||
|
||||
var/secmsg = sanitize(input(usr,"Set your security notes here.","Security Records",html_decode(sec_record)) as message, MAX_PAPER_MESSAGE_LEN, extra = 0)
|
||||
if(secmsg != null)
|
||||
secmsg = copytext(secmsg, 1, MAX_PAPER_MESSAGE_LEN)
|
||||
secmsg = html_encode(secmsg)
|
||||
|
||||
sec_record = secmsg
|
||||
SetRecords(user)
|
||||
if(href_list["task"] == "gen_record")
|
||||
var/genmsg = input(usr,"Set your employment notes here.","Employment Records",html_decode(gen_record)) as message
|
||||
|
||||
var/genmsg = sanitize(input(usr,"Set your employment notes here.","Employment Records",html_decode(gen_record)) as message, MAX_PAPER_MESSAGE_LEN, extra = 0)
|
||||
if(genmsg != null)
|
||||
genmsg = copytext(genmsg, 1, MAX_PAPER_MESSAGE_LEN)
|
||||
genmsg = html_encode(genmsg)
|
||||
|
||||
gen_record = genmsg
|
||||
SetRecords(user)
|
||||
|
||||
if(href_list["task"] == "exploitable_record")
|
||||
var/exploitmsg = input(usr,"Set exploitable information about you here.","Exploitable Information",html_decode(exploit_record)) as message
|
||||
|
||||
var/exploitmsg = sanitize(input(usr,"Set exploitable information about you here.","Exploitable Information",html_decode(exploit_record)) as message, MAX_PAPER_MESSAGE_LEN, extra = 0)
|
||||
if(exploitmsg != null)
|
||||
exploitmsg = copytext(exploitmsg, 1, MAX_PAPER_MESSAGE_LEN)
|
||||
exploitmsg = html_encode(exploitmsg)
|
||||
|
||||
exploit_record = exploitmsg
|
||||
SetAntagoptions(user)
|
||||
|
||||
@@ -1213,7 +1185,7 @@ datum/preferences
|
||||
if("name")
|
||||
var/raw_name = input(user, "Choose your character's name:", "Character Preference") as text|null
|
||||
if (!isnull(raw_name)) // Check to ensure that the user entered text (rather than cancel.)
|
||||
var/new_name = reject_bad_name(raw_name)
|
||||
var/new_name = sanitizeName(raw_name)
|
||||
if(new_name)
|
||||
real_name = new_name
|
||||
else
|
||||
@@ -1299,7 +1271,7 @@ datum/preferences
|
||||
if("metadata")
|
||||
var/new_metadata = input(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , metadata) as message|null
|
||||
if(new_metadata)
|
||||
metadata = sanitize(copytext(new_metadata,1,MAX_MESSAGE_LEN))
|
||||
metadata = sanitize(new_metadata)
|
||||
|
||||
if("b_type")
|
||||
var/new_b_type = input(user, "Choose your character's blood-type:", "Character Preference") as null|anything in list( "A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-" )
|
||||
@@ -1522,7 +1494,7 @@ datum/preferences
|
||||
if(choice == "Other")
|
||||
var/raw_choice = input(user, "Please enter a home system.") as text|null
|
||||
if(raw_choice)
|
||||
home_system = sanitize(copytext(raw_choice,1,MAX_MESSAGE_LEN))
|
||||
home_system = sanitize(raw_choice)
|
||||
return
|
||||
home_system = choice
|
||||
if("citizenship")
|
||||
@@ -1532,7 +1504,7 @@ datum/preferences
|
||||
if(choice == "Other")
|
||||
var/raw_choice = input(user, "Please enter your current citizenship.", "Character Preference") as text|null
|
||||
if(raw_choice)
|
||||
citizenship = sanitize(copytext(raw_choice,1,MAX_MESSAGE_LEN))
|
||||
citizenship = sanitize(raw_choice)
|
||||
return
|
||||
citizenship = choice
|
||||
if("faction")
|
||||
@@ -1542,7 +1514,7 @@ datum/preferences
|
||||
if(choice == "Other")
|
||||
var/raw_choice = input(user, "Please enter a faction.") as text|null
|
||||
if(raw_choice)
|
||||
faction = sanitize(copytext(raw_choice,1,MAX_MESSAGE_LEN))
|
||||
faction = sanitize(raw_choice)
|
||||
return
|
||||
faction = choice
|
||||
if("religion")
|
||||
@@ -1552,7 +1524,7 @@ datum/preferences
|
||||
if(choice == "Other")
|
||||
var/raw_choice = input(user, "Please enter a religon.") as text|null
|
||||
if(raw_choice)
|
||||
religion = sanitize(copytext(raw_choice,1,MAX_MESSAGE_LEN))
|
||||
religion = sanitize(raw_choice)
|
||||
return
|
||||
religion = choice
|
||||
else
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
|
||||
//Sanitize
|
||||
metadata = sanitize_text(metadata, initial(metadata))
|
||||
real_name = reject_bad_name(real_name)
|
||||
real_name = sanitizeName(real_name)
|
||||
|
||||
if(isnull(species) || !(species in playable_species))
|
||||
species = "Human"
|
||||
|
||||
@@ -101,3 +101,34 @@
|
||||
w_class = 2
|
||||
var/voicechange = 0
|
||||
siemens_coefficient = 0.9
|
||||
|
||||
/obj/item/clothing/mask/ai
|
||||
name = "camera MIU"
|
||||
desc = "Allows for direct mental connection to accessible camera networks."
|
||||
icon_state = "s-ninja"
|
||||
item_state = "s-ninja"
|
||||
flags_inv = HIDEFACE
|
||||
body_parts_covered = 0
|
||||
var/mob/eye/aiEye/eye
|
||||
|
||||
/obj/item/clothing/mask/ai/New()
|
||||
eye = new(src)
|
||||
|
||||
/obj/item/clothing/mask/ai/equipped(var/mob/user, var/slot)
|
||||
..(user, slot)
|
||||
if(slot == slot_wear_mask)
|
||||
eye.owner = user
|
||||
user.eyeobj = eye
|
||||
|
||||
for(var/datum/chunk/c in eye.visibleChunks)
|
||||
c.remove(eye)
|
||||
eye.setLoc(user)
|
||||
|
||||
/obj/item/clothing/mask/ai/dropped(var/mob/user)
|
||||
..()
|
||||
if(eye.owner == user)
|
||||
for(var/datum/chunk/c in eye.visibleChunks)
|
||||
c.remove(eye)
|
||||
|
||||
eye.owner.eyeobj = null
|
||||
eye.owner = null
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
var/voice = sanitize(copytext(name,1,MAX_MESSAGE_LEN))
|
||||
var/voice = sanitize(name, MAX_NAME_LEN)
|
||||
if(!voice || !length(voice)) return
|
||||
changer.voice = voice
|
||||
usr << "<span class='notice'>You are now mimicking <B>[changer.voice]</B>.</span>"
|
||||
|
||||
@@ -280,10 +280,10 @@
|
||||
voice_holder.active = 0
|
||||
usr << "<font color='blue'>You disable the speech synthesiser.</font>"
|
||||
if("Set Name")
|
||||
var/raw_choice = input(usr, "Please enter a new name.") as text|null
|
||||
var/raw_choice = sanitize(input(usr, "Please enter a new name.") as text|null)
|
||||
if(!raw_choice)
|
||||
return 0
|
||||
voice_holder.voice = sanitize(copytext(raw_choice,1,MAX_MESSAGE_LEN))
|
||||
voice_holder.voice = raw_choice
|
||||
usr << "<font color='blue'>You are now mimicking <B>[voice_holder.voice]</B>.</font>"
|
||||
return 1
|
||||
|
||||
|
||||
@@ -721,7 +721,7 @@
|
||||
else
|
||||
//Want this to be roughly independant of the number of modules, meaning that X emp hits will disable Y% of the suit's modules on average.
|
||||
//that way people designing hardsuits don't have to worry (as much) about how adding that extra module will affect emp resiliance by 'soaking' hits for other modules
|
||||
chance = max(0, damage - emp_protection)*min(installed_modules.len/15, 1)
|
||||
chance = 2*max(0, damage - emp_protection)*min(installed_modules.len/15, 1)
|
||||
|
||||
if(!prob(chance))
|
||||
return
|
||||
|
||||
@@ -39,9 +39,9 @@
|
||||
flags_inv = HIDEJUMPSUIT|HIDETAIL
|
||||
flags = STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT
|
||||
slowdown = 0
|
||||
//will reach 10 breach damage after 18 laser carbine blasts, or 7 revolver hits. Completely immune to smg hits.
|
||||
breach_threshold = 28
|
||||
resilience = 0.05
|
||||
//will reach 10 breach damage after 25 laser carbine blasts, 3 revolver hits, or ~1 PTR hit. Completely immune to smg or sts hits.
|
||||
breach_threshold = 38
|
||||
resilience = 0.2
|
||||
can_breach = 1
|
||||
sprite_sheets = list("Tajara" = 'icons/mob/species/tajaran/suit.dmi',"Unathi" = 'icons/mob/species/unathi/suit.dmi')
|
||||
supporting_limbs = list()
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
/obj/item/clothing/suit/space/rig/light
|
||||
name = "suit"
|
||||
breach_threshold = 18 //comparable to voidsuits
|
||||
resilience = 0.2
|
||||
|
||||
/obj/item/clothing/gloves/rig/light
|
||||
name = "gloves"
|
||||
@@ -82,8 +81,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/clothing/suit/space/rig/light/ninja
|
||||
breach_threshold = 28 //comparable to regular hardsuits
|
||||
resilience = 0.05
|
||||
breach_threshold = 38 //comparable to regular hardsuits
|
||||
|
||||
/obj/item/weapon/rig/light/stealth
|
||||
name = "stealth suit control module"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
slot = "utility"
|
||||
var/slots = 3
|
||||
var/obj/item/weapon/storage/internal/hold
|
||||
w_class = 3.0
|
||||
|
||||
/obj/item/clothing/accessory/storage/New()
|
||||
..()
|
||||
@@ -48,7 +49,7 @@
|
||||
|
||||
/obj/item/clothing/accessory/storage/webbing
|
||||
name = "webbing"
|
||||
desc = "Strudy mess of synthcotton belts and buckles, ready to share your burden."
|
||||
desc = "Sturdy mess of synthcotton belts and buckles, ready to share your burden."
|
||||
icon_state = "webbing"
|
||||
item_color = "webbing"
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user