mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-26 13:36:48 +01:00
Merge pull request #8380 from volas/sanitize_procs
[DNM] sanitize() and text.dm refactoring
This commit is contained in:
@@ -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].")
|
||||
@@ -875,7 +875,7 @@ client
|
||||
return
|
||||
|
||||
if(organ_slot != "default")
|
||||
organ_slot = sanitize(copytext(organ_slot,1,MAX_MESSAGE_LEN))
|
||||
organ_slot = sanitize(organ_slot)
|
||||
else
|
||||
if(I.removed_type)
|
||||
var/obj/item/organ/O = new I.removed_type()
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user