mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge remote-tracking branch 'upstream/dev' into NarsiePort
Conflicts: code/modules/mob/living/carbon/human/say.dm
This commit is contained in:
@@ -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:"
|
||||
|
||||
@@ -233,7 +233,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
|
||||
|
||||
Reference in New Issue
Block a user