pandemic fixes

This commit is contained in:
Artur
2020-02-10 10:20:57 +02:00
parent 4e45525a26
commit 816f94bd61
3 changed files with 13 additions and 5 deletions
+7 -1
View File
@@ -44,6 +44,12 @@
index = findtext(t, char, index + length(char))
return t
/proc/sanitize_name(t,list/repl_chars = null)
if(t == "space" || t == "floor" || t == "wall" || t == "r-wall" || t == "monkey" || t == "unknown" || t == "inactive ai") //prevents these common metagamey names
alert("Invalid name.")
return ""
return sanitize(t)
/proc/sanitize_filename(t)
return sanitize_simple(t, list("\n"="", "\t"="", "/"="", "\\"="", "?"="", "%"="", "*"="", ":"="", "|"="", "\""="", "<"="", ">"=""))
@@ -775,4 +781,4 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
#define is_alpha(X) ((text2ascii(X) <= 122) && (text2ascii(X) >= 97))
#define is_digit(X) ((length(X) == 1) && (length(text2num(X)) == 1))
#define is_digit(X) ((length(X) == 1) && (length(text2num(X)) == 1))
@@ -448,9 +448,11 @@
symptom_delay_max = 1
passive_message = "<span class='notice'>Your skin glows faintly for a moment.</span>"
var/cellular_damage = FALSE
threshold_desc = "<b>Transmission 6:</b> Additionally heals cellular damage and toxin lovers.<br>\
<b>Resistance 7:</b> Increases healing speed."
threshold_desc = list(
"Transmission 6" = "Additionally heals cellular damage and toxin lovers.",
"Resistance 7" = "Increases healing speed.",
)
/datum/symptom/heal/radiation/Start(datum/disease/advance/A)
if(!..())
return
@@ -170,7 +170,7 @@
if(!A.mutable)
return
if(A)
var/new_name = stripped_input(usr, "Name the disease", "New name", "", MAX_NAME_LEN)
var/new_name = sanitize_name(html_encode(params["name"]))
if(!new_name || ..())
return
A.AssignName(new_name)