Skip to content

Commit

Permalink
fix/feat: Cyrilic fixes by Gaxer & Support by Larentoun. ULTIMATE SS2…
Browse files Browse the repository at this point in the history
…20 EDIT EDITION (#211)

<!-- Пишите **НИЖЕ** заголовков и **ВЫШЕ** комментариев, иначе что то
может пойти не так. -->
<!-- Вы можете прочитать Contributing.MD, если хотите узнать больше. -->

## Что этот PR делает
Фиксы кириллицы от @Gaxeer и @larentoun собранные в кучу и
промаркированные как **// SS220 EDIT**
К сожалению оффы не приняли то что делал сику так что... довольствуемся
тем что есть 😞

<!-- Вкратце опишите изменения, которые вносите. -->
<!-- Опишите **все** изменения, так как противное может сказаться на
рассмотрении этого PR'а! -->
<!-- Если вы исправляете Issue, добавьте "Fixes #1234" (где 1234 - номер
Issue) где-нибудь в описании PR'а. Это автоматически закроет Issue после
принятия PR'а. -->

## Почему это хорошо для игры
Никаких больше знаков вопроса.

<!-- Опишите, почему, по вашему, следует добавить эти изменения в игру.
-->

## Изображения изменений

![image](https://github.com/ss220club/Paradise-SS220/assets/69762909/200e7a34-72a4-4b52-8025-3265b30ebcac)

![image](https://github.com/ss220club/Paradise-SS220/assets/69762909/b53a086c-266f-4d6d-9260-2edfcc46d577)

![image](https://github.com/ss220club/Paradise-SS220/assets/69762909/313a6a10-e5cb-4740-b2a8-bd961aa9601f)

![image](https://github.com/ss220club/Paradise-SS220/assets/69762909/5b6d2e3b-8902-49c8-8354-9479904bce71)

<!-- Если вы не меняли карту или спрайты, можете опустить эту секцию.
Если хотите, можете вставить видео. -->

## Тестирование
В процессе, многое думаю ингейм всплывёт
<!-- Как вы тестировали свой PR, если делали это вовсе? -->

## Changelog

:cl:
fix: Фиксы кириллицы
/:cl:

<!-- Оба :cl:'а должны быть на месте, что-бы чейнджлог работал! Вы
можете написать свой ник справа от первого :cl:, если хотите. Иначе
будет использован ваш ник на ГитХабе. -->
<!-- Вы можете использовать несколько записей с одинаковым префиксом
(Они используются только для иконки в игре) и удалить ненужные. Помните,
что чейнджлог должен быть понятен обычным игроком. -->
<!-- Если чейнджлог не влияет на игроков(например, это рефактор), вы
можете исключить всю секцию. -->

---------

Co-authored-by: DGamerL <[email protected]>
Co-authored-by: gaxeer <[email protected]>
Co-authored-by: Furior <[email protected]>
  • Loading branch information
4 people authored Sep 27, 2023
1 parent 25ded92 commit 2433508
Show file tree
Hide file tree
Showing 90 changed files with 7,558 additions and 13,729 deletions.
16 changes: 8 additions & 8 deletions code/__HELPERS/name_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ GLOBAL_VAR(syndicate_code_response) //Code response for traitors.
)

var/safety[] = list(1,2,3)//Tells the proc which options to remove later on.
var/nouns[] = list("love","hate","anger","peace","pride","sympathy","bravery","loyalty","honesty","integrity","compassion","charity","success","courage","deceit","skill","beauty","brilliance","pain","misery","beliefs","dreams","justice","truth","faith","liberty","knowledge","thought","information","culture","trust","dedication","progress","education","hospitality","leisure","trouble","friendships", "relaxation")
var/drinks[] = list("vodka and tonic","gin fizz","bahama mama","manhattan","black Russian","whiskey soda","long island tea","margarita","Irish coffee"," manly dwarf","Irish cream","doctor's delight","Beepksy Smash","tequila sunrise","brave bull","gargle blaster","bloody mary","whiskey cola","white Russian","vodka martini","martini","Cuba libre","kahlua","vodka","wine","moonshine")
var/locations[] = length(SSmapping.teleportlocs) ? SSmapping.teleportlocs : drinks//if null, defaults to drinks instead.

// var/nouns[] = list("love","hate","anger","peace","pride","sympathy","bravery","loyalty","honesty","integrity","compassion","charity","success","courage","deceit","skill","beauty","brilliance","pain","misery","beliefs","dreams","justice","truth","faith","liberty","knowledge","thought","information","culture","trust","dedication","progress","education","hospitality","leisure","trouble","friendships", "relaxation")
// var/drinks[] = list("vodka and tonic","gin fizz","bahama mama","manhattan","black Russian","whiskey soda","long island tea","margarita","Irish coffee"," manly dwarf","Irish cream","doctor's delight","Beepksy Smash","tequila sunrise","brave bull","gargle blaster","bloody mary","whiskey cola","white Russian","vodka martini","martini","Cuba libre","kahlua","vodka","wine","moonshine")
// var/locations[] = length(SSmapping.teleportlocs) ? SSmapping.teleportlocs : drinks//if null, defaults to drinks instead.
// SS220 DELETE
var/names[] = list()
for(var/datum/data/record/t in GLOB.data_core.general)//Picks from crew manifest.
names += t.fields["name"]
Expand All @@ -157,19 +157,19 @@ GLOBAL_VAR(syndicate_code_response) //Code response for traitors.
if(names.len)
code_phrase += pick(names)
if(2)
code_phrase += pick(GLOB.joblist)//Returns a job.
code_phrase += pick(GLOB.jobs)//Returns a job. // SS220 EDIT - ORIGINAL: (GLOB.joblist)
safety -= 1
if(2)
switch(rand(1,2))//Places or things.
if(1)
code_phrase += pick(drinks)
code_phrase += pick(GLOB.cocktails) // SS220 EDIT - ORIGINAL: (drinks)
if(2)
code_phrase += pick(locations)
code_phrase += pick(GLOB.locations) // SS220 EDIT - ORIGINAL: (locations)
safety -= 2
if(3)
switch(rand(1,3))//Nouns, adjectives, verbs. Can be selected more than once.
if(1)
code_phrase += pick(nouns)
code_phrase += pick(GLOB.nouns) // SS220 EDIT - ORIGINAL: (nouns)
if(2)
code_phrase += pick(GLOB.adjectives)
if(3)
Expand Down
38 changes: 19 additions & 19 deletions code/__HELPERS/text.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@

//Returns null if there is any bad text in the string
/proc/reject_bad_text(text, max_length=512)
if(length(text) > max_length) return //message too long
if(length_char(text) > max_length) return //message too long // SS220 EDIT - ORIGINAL: (length(text)
var/non_whitespace = 0
for(var/i=1, i<=length(text), i++)
switch(text2ascii(text,i))
for(var/i=1, i<=length_char(text), i++) // ORIGINAL: length(text)
switch(text2ascii_char(text,i)) // ORIGINAL: text2ascii
if(62,60,92,47) return //rejects the text if it contains these bad characters: <, >, \ or /
if(127 to 255) return //rejects weird letters like �
if(0 to 31) return //more weird stuff
Expand Down Expand Up @@ -105,25 +105,25 @@
/proc/reject_bad_name(t_in, allow_numbers=0, max_length=MAX_NAME_LEN)
// Decode so that names with characters like < are still rejected
t_in = html_decode(t_in)
if(!t_in || length(t_in) > max_length)
if(!t_in || length_char(t_in) > max_length) // SS220 EDIT - ORIGINAL: length
return //Rejects the input if it is null or if it is longer than 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)
for(var/i=1, i<=length_char(t_in), i++) // SS220 EDIT - ORIGINAL: for(var/i=1, i<=length(t_in), i++)
var/ascii_char = text2ascii_char(t_in,i) // ORIGINAL: var/ascii_char = text2ascii(t_in,i)
switch(ascii_char)
// A .. Z
if(65 to 90) //Uppercase Letters
// A .. Z, // SS220 ADDITION: А .. Я, Ё | 1040 to 1071, 1025
if(65 to 90, 1040 to 1071, 1025) //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
// a .. z, // SS220 ADDITION: а .. я, ё | 1072 to 1103, 1105
if(97 to 122, 1072 to 1103, 1105) //Lowercase Letters
if(last_char_group<2) t_out += uppertext(ascii2text(ascii_char)) //Force uppercase first character
else t_out += ascii2text(ascii_char)
number_of_alphanumeric++
last_char_group = 4
Expand Down Expand Up @@ -194,37 +194,37 @@
/proc/dd_hasprefix(text, prefix)
var/start = 1
var/end = length(prefix) + 1
return findtext(text, prefix, start, end)
return findtext_char(text, prefix, start, end) // SS220 EDIT - ORIGINAL: findtext

//Checks the beginning of a string for a specified sub-string. This proc is case sensitive
//Returns the position of the substring or 0 if it was not found
/proc/dd_hasprefix_case(text, prefix)
var/start = 1
var/end = length(prefix) + 1
return findtextEx(text, prefix, start, end)
return findtextEx_char(text, prefix, start, end) // SS220 EDIT - ORIGINAL: findtext

//Checks the end of a string for a specified substring.
//Returns the position of the substring or 0 if it was not found
/proc/dd_hassuffix(text, suffix)
var/start = length(text) - length(suffix)
if(start)
return findtext(text, suffix, start, null)
return findtext_char(text, suffix, start, null) // SS220 EDIT - ORIGINAL: findtext
return

//Checks the end of a string for a specified substring. This proc is case sensitive
//Returns the position of the substring or 0 if it was not found
/proc/dd_hassuffix_case(text, suffix)
var/start = length(text) - length(suffix)
if(start)
return findtextEx(text, suffix, start, null)
return findtextEx_char(text, suffix, start, null)// SS220 EDIT - ORIGINAL: findtext

/*
* Text modification
*/
// See bygex.dm
/proc/replace_characters(t, list/repl_chars)
for(var/char in repl_chars)
t = replacetext(t, char, repl_chars[char])
t = replacetext_char(t, char, repl_chars[char]) // SS220 EDIT - ORIGINAL: replacetext
return t

//Strips the first char and returns it and the new string as a list
Expand Down Expand Up @@ -274,7 +274,7 @@

//Returns a string with the first element of the string capitalized.
/proc/capitalize(t as text)
return uppertext(copytext(t, 1, 2)) + copytext(t, 2)
return uppertext(copytext_char(t, 1, 2)) + copytext_char(t, 2) // SS220 EDIT - ORIGINAL: copytext

//Centers text by adding spaces to either side of the string.
/proc/dd_centertext(message, length)
Expand Down Expand Up @@ -364,7 +364,7 @@
else
break
if(max_length)
input = copytext(input,1,max_length)
input = copytext_char(input,1,max_length) // SS220 EDIT - ORIGINAL: copytext
return sanitize(input, allow_lines ? list("\t" = " ") : list("\n" = " ", "\t" = " "))

/proc/trim_strip_html_properly(input, max_length = MAX_MESSAGE_LEN, allow_lines = 0)
Expand All @@ -383,7 +383,7 @@

//alternative copytext() for encoded text, doesn't break html entities (&#34; and other)
/proc/copytext_preserve_html(text, first, last)
return html_encode(copytext(html_decode(text), first, last))
return html_encode(copytext_char(html_decode(text), first, last)) // SS220 EDIT - ORIGINAL: copytext

//Run sanitize(), but remove <, >, " first to prevent displaying them as &gt; &lt; &34; in some places, after html_encode().
//Best used for sanitize object names, window titles.
Expand Down
5 changes: 5 additions & 0 deletions code/_globalvars/lists/names.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,8 @@ GLOBAL_LIST_INIT(dream_strings, file2list("config/names/dreams.txt"))
GLOBAL_LIST_INIT(nightmare_strings, file2list("config/names/nightmares.txt"))
//loaded on startup because of "
//would include in rsc if ' was used

// SS220 ADDITION - CYRILLIC SUPPORT
GLOBAL_LIST_INIT(cocktails, file2list("config/names/cocktails.txt"))
GLOBAL_LIST_INIT(jobs, file2list("config/names/jobs.txt"))
GLOBAL_LIST_INIT(locations, file2list("config/names/locations.txt"))
3 changes: 2 additions & 1 deletion code/datums/datumvars.dm
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@

var/html = {"
<html>
<meta charset="UTF-8"> <!-- SS220 ADDITION-->
<head>
<title>[title]</title>
<style>
Expand Down Expand Up @@ -571,7 +572,7 @@
to_chat(usr, "This can only be used on instances of type /mob")
return

var/new_name = reject_bad_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)), allow_numbers = TRUE)
var/new_name = reject_bad_name(sanitize(copytext_char(input(usr, "What would you like to name this mob?", "Input a name", M.real_name) as text|null, 1, MAX_NAME_LEN)), allow_numbers = TRUE) // SS220 EDIT - ORIGINAL: copytext
if( !new_name || !M ) return

message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].")
Expand Down
6 changes: 3 additions & 3 deletions code/datums/mind.dm
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
/datum/mind/proc/show_memory(mob/recipient, window = 1)
if(!recipient)
recipient = current
var/output = "<B>[current.real_name]'s Memories:</B><HR>"
var/output = "<meta charset='UTF-8'><B>[current.real_name]'s Memories:</B><HR>" // SS220 EDIT - ORIGINAL: "<B>[current.real_name]'s Memories:</B><HR>"
output += memory

var/antag_datum_objectives = FALSE
Expand Down Expand Up @@ -468,7 +468,7 @@
alert("Not before round-start!", "Alert")
return

var/out = "<B>[name]</B>[(current && (current.real_name != name))?" (as [current.real_name])" : ""]<br>"
var/out = "<meta charset='UTF-8'><B>[name]</B>[(current && (current.real_name != name))?" (as [current.real_name])" : ""]<br>" // SS220 EDIT - ORIGINAL: "<B>[name]</B>[(current && (current.real_name != name))?" (as [current.real_name])" : ""]<br>"
out += "Mind currently owned by key: [key] [active ? "(synced)" : "(not synced)"]<br>"
out += "Assigned role: [assigned_role]. <a href='?src=[UID()];role_edit=1'>Edit</a><br>"
out += "Factions and special roles:<br>"
Expand Down Expand Up @@ -736,7 +736,7 @@
var/datum/objective/escape/escape_with_identity/O = new_objective
O.target_real_name = new_objective.target.current.real_name
if("custom")
var/expl = sanitize(copytext(input("Custom objective:", "Objective", objective ? objective.explanation_text : "") as text|null,1,MAX_MESSAGE_LEN))
var/expl = sanitize(copytext_char(input("Custom objective:", "Objective", objective ? objective.explanation_text : "") as text|null,1,MAX_MESSAGE_LEN)) // SS220 EDIT - ORIGINAL: copytext
if(!expl)
return
new_objective = new /datum/objective
Expand Down
4 changes: 2 additions & 2 deletions code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
if(!use_prefix)
default_value = name
else if(findtext(name, prefix) != 0)
default_value = copytext(name, length(prefix) + 1)
default_value = copytext_char(name, length_char(prefix) + 1) // SS220 EDIT - ORIGINAL: copytext | length
else
// Either the thing has a non-conforming name due to being set in the map
// OR (much more likely) the thing is unlabeled yet.
Expand All @@ -1230,7 +1230,7 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
return null


t = sanitize(copytext(t, 1, MAX_NAME_LEN))
t = sanitize(copytext_char(t, 1, MAX_NAME_LEN)) // SS220 EDIT - ORIGINAL: copytext

// Logging
var/logged_name = initial(name)
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/nuclear/nuclear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@

/proc/nukelastname(mob/M as mob) //--All praise goes to NEO|Phyte, all blame goes to DH, and it was Cindi-Kate's idea. Also praise Urist for copypasta ho.
var/randomname = pick(GLOB.last_names)
var/newname = sanitize(copytext(input(M,"You are the nuke operative [pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord")]. Please choose a last name for your family.", "Name change",randomname),1,MAX_NAME_LEN))
var/newname = sanitize(copytext_char(input(M,"You are the nuke operative [pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord")]. Please choose a last name for your family.", "Name change",randomname),1,MAX_NAME_LEN)) // SS220 EDIT - ORIGINAL: copytext

if(!newname)
newname = randomname
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/objective.dm
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective)
var/tmp_obj = new O.typepath
var/custom_name = tmp_obj:name
qdel(tmp_obj)
O.name = sanitize(copytext(input("Enter target name:", "Objective target", custom_name) as text|null,1,MAX_NAME_LEN))
O.name = sanitize(copytext_char(input("Enter target name:", "Objective target", custom_name) as text|null,1,MAX_NAME_LEN)) // SS220 EDIT - ORIGINAL: copytext
if(!O.name) return
steal_target = O
explanation_text = "Steal [O.name]."
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/scoreboard.dm
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ GLOBAL_VAR(scoreboard) // Variable to save the scoreboard string once it's been


// Generate the score panel
var/list/dat = list("<b>Round Statistics and Score</b><br><hr>")
var/list/dat = list("<meta charset='UTF-8'><b>Round Statistics and Score</b><br><hr>") // SS220 EDIT - ORIGINAL: ("<b>Round Statistics and Score</b><br><hr>")
if(SSticker.mode)
dat += SSticker.mode.get_scoreboard_stats()

Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/wizard/artefact.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
var/wizard_name_first = pick(GLOB.wizard_first)
var/wizard_name_second = pick(GLOB.wizard_second)
var/randomname = "[wizard_name_first] [wizard_name_second]"
var/newname = sanitize(copytext(input(M, "You are the wizard's apprentice. Would you like to change your name to something else?", "Name change", randomname) as null|text,1,MAX_NAME_LEN))
var/newname = sanitize(copytext_char(input(M, "You are the wizard's apprentice. Would you like to change your name to something else?", "Name change", randomname) as null|text,1,MAX_NAME_LEN)) // SS220 EDIT - ORIGINAL: copytext

if(!newname)
newname = randomname
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/wizard/wizard.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
var/wizard_name_first = pick(GLOB.wizard_first)
var/wizard_name_second = pick(GLOB.wizard_second)
var/randomname = "[wizard_name_first] [wizard_name_second]"
var/newname = sanitize(copytext(input(wizard_mob, "You are the Space Wizard. Would you like to change your name to something else?", "Name change", randomname) as null|text,1,MAX_NAME_LEN))
var/newname = sanitize(copytext_char(input(wizard_mob, "You are the Space Wizard. Would you like to change your name to something else?", "Name change", randomname) as null|text,1,MAX_NAME_LEN)) // SS220 EDIT - ORIGINAL: copytext

if(!newname)
newname = randomname
Expand Down
8 changes: 4 additions & 4 deletions code/game/machinery/computer/card.dm
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
if(!job_in_department(SSjobs.GetJob(t1)))
return FALSE
if(t1 == "Custom")
var/temp_t = sanitize(reject_bad_name(copytext(input("Enter a custom job assignment.", "Assignment"), 1, MAX_MESSAGE_LEN), TRUE))
var/temp_t = sanitize(reject_bad_name(copytext_char(input("Enter a custom job assignment.", "Assignment"), 1, MAX_MESSAGE_LEN), TRUE)) // SS220 EDIT - ORIGINAL: copytext
//let custom jobs function as an impromptu alt title, mainly for sechuds
if(temp_t && scan && modify)
var/oldrank = modify.getRankAndAssignment()
Expand Down Expand Up @@ -523,7 +523,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, 0)
visible_message("<span class='warning'>[src]: Heads may only demote members of their own department.</span>")
return FALSE
var/reason = sanitize(copytext(input("Enter legal reason for demotion. Enter nothing to cancel.","Legal Demotion"), 1, MAX_MESSAGE_LEN))
var/reason = sanitize(copytext_char(input("Enter legal reason for demotion. Enter nothing to cancel.","Legal Demotion"), 1, MAX_MESSAGE_LEN)) // SS220 EDIT - ORIGINAL: copytext
if(!reason || !is_authenticated(usr) || !modify)
return FALSE
var/list/access = list()
Expand All @@ -550,7 +550,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
visible_message("<span class='warning'>[src]: Only the Captain or HOP may completely terminate the employment of a crew member.</span>")
return FALSE
var/jobnamedata = modify.getRankAndAssignment()
var/reason = sanitize(copytext(input("Enter legal reason for termination. Enter nothing to cancel.", "Employment Termination"), 1, MAX_MESSAGE_LEN))
var/reason = sanitize(copytext_char(input("Enter legal reason for termination. Enter nothing to cancel.", "Employment Termination"), 1, MAX_MESSAGE_LEN)) // SS220 EDIT - ORIGINAL: copytext
if(!reason || !has_idchange_access() || !modify)
return FALSE
var/m_ckey = modify.getPlayerCkey()
Expand Down Expand Up @@ -599,7 +599,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
message_admins("[key_name_admin(usr)] has closed a job slot for job \"[j.title]\".")
return
if("remote_demote")
var/reason = sanitize(copytext(input("Enter legal reason for demotion. Enter nothing to cancel.","Legal Demotion"), 1, MAX_MESSAGE_LEN))
var/reason = sanitize(copytext_char(input("Enter legal reason for demotion. Enter nothing to cancel.","Legal Demotion"), 1, MAX_MESSAGE_LEN)) // SS220 EDIT - ORIGINAL: copytext
if(!reason || !is_authenticated(usr) || !scan)
return FALSE
for(var/datum/data/record/E in GLOB.data_core.general)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/doors/brigdoors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@
update_icon(UPDATE_ICON_STATE)
if("restart_timer")
if(timing)
var/reset_reason = sanitize(copytext(input(usr, "Reason for resetting timer:", name, "") as text|null, 1, MAX_MESSAGE_LEN))
var/reset_reason = sanitize(copytext_char(input(usr, "Reason for resetting timer:", name, "") as text|null, 1, MAX_MESSAGE_LEN)) // SS220 EDIT - ORIGINAL: copytext
if(!reset_reason)
to_chat(usr, "<span class='warning'>Cancelled reset: reason field is required.</span>")
return FALSE
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/magnetic_module.dm
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,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(copytext_char(input(usr, "Please define a new path!",,path) as text|null,1,MAX_MESSAGE_LEN)) // SS220 EDIT - ORIGINAL: copytext
if(newpath && newpath != "")
moving = 0 // stop moving
path = newpath
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/portable_turret.dm
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ GLOBAL_LIST_EMPTY(turret_icons)

if(is_pen(I)) //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(copytext_char(t, 1, MAX_MESSAGE_LEN)) // SS220 EDIT - ORIGINAL: copytext
if(!t)
return
if(!in_range(src, usr) && loc != usr)
Expand Down
Loading

0 comments on commit 2433508

Please sign in to comment.