Merge pull request #367 from Markolie/master

Switch copytext and sanitize proc
This commit is contained in:
ZomgPonies
2015-02-20 16:22:32 -05:00
62 changed files with 117 additions and 117 deletions
+1 -1
View File
@@ -47,7 +47,7 @@
return
if (!in_range(src, user) && src.loc != user)
return
t = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if (t)
src.name = "body bag - "
src.name += t
+2 -2
View File
@@ -689,7 +689,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
U << "The PDA softly beeps."
ui.close()
else
t = copytext(sanitize(t), 1, 20)
t = sanitize(copytext(t, 1, 20))
ttone = t
else
ui.close()
@@ -897,7 +897,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/proc/create_message(var/mob/living/U = usr, var/obj/item/device/pda/P)
var/t = input(U, "Please enter message", name, null) as text
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN))
t = readd_quotes(t)
if (!t || !istype(P))
return
+3 -2
View File
@@ -66,10 +66,11 @@
if(user && convert)
terrible_conversion_proc(M, user)
M.Stun(1)
user.visible_message("<span class='disarm'>[user] blinds [M] with the flash!</span>")
user.visible_message("<span class='disarm'>[user] blinds [M] with the flash!</span>")
return 1
else
user.visible_message("<span class='disarm'>[user] fails to blind [M] with the flash!</span>")
if(user)
user.visible_message("<span class='disarm'>[user] fails to blind [M] with the flash!</span>")
return 0
/obj/item/device/flash/attack(mob/living/M, mob/user)
+1 -1
View File
@@ -26,7 +26,7 @@
user << "\red \The [src] needs to recharge!"
return
var/message = copytext(sanitize(input(user, "Shout a message?", "Megaphone", null) as text),1,MAX_MESSAGE_LEN)
var/message = sanitize(copytext(input(user, "Shout a message?", "Megaphone", null) as text,1,MAX_MESSAGE_LEN))
if(!message)
return
message = capitalize(message)
+1 -1
View File
@@ -265,7 +265,7 @@
if(2)
radio.ToggleReception()
if(href_list["setlaws"])
var/newlaws = copytext(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),1,MAX_MESSAGE_LEN)
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))
if(newlaws)
pai.pai_laws = newlaws
pai << "Your supplemental directives have been updated. Your new directives are:"
+3 -3
View File
@@ -250,7 +250,7 @@
return
src.registered_name = t
var u = copytext(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", "Civilian")),1,MAX_MESSAGE_LEN)
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", "Civilian"),1,MAX_MESSAGE_LEN))
if(!u)
alert("Invalid assignment.")
src.registered_name = ""
@@ -265,13 +265,13 @@
switch(alert("Would you like to display the ID, or retitle it?","Choose.","Rename","Show"))
if("Rename")
var t = copytext(sanitize(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(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))
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 = copytext(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", "Civilian")),1,MAX_MESSAGE_LEN)
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", "Civilian"),1,MAX_MESSAGE_LEN))
if(!u)
alert("Invalid assignment.")
src.registered_name = ""
@@ -29,7 +29,7 @@
return
if((!in_range(src, usr) && src.loc != user))
return
t = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if(t)
src.name = text("Glass Case- '[]'", t)
else
+2 -2
View File
@@ -111,7 +111,7 @@
return
if ((!in_range(src, usr) && src.loc != user))
return
t = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if (t)
src.name = text("Morgue- '[]'", t)
src.overlays += image(src.icon, "morgue_label")
@@ -285,7 +285,7 @@
return
if ((!in_range(src, usr) > 1 && src.loc != user))
return
t = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
if (t)
src.name = text("Crematorium- '[]'", t)
else