mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
[DOWNSTREAM] Cyrillic Support v2 (#24075)
* cyrillic fixes https://github.com/ss220club/Paradise/commit/cbdad6f11f0e0e16694cdb60f8ccb3d6dd23fe92 * fix: remove control characters * utf-8 support * more fixes * spellbook to utf8 * Update code/modules/research/server.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/modules/research/server.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/modules/paperwork/paper.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/modules/paperwork/folders.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/modules/mob/mob_say_base.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * update formatting * fix ai alerts * fix spaceheater * fix noticeboard --------- Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
@@ -77,7 +77,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
if(!check_rights(R_ADMIN|R_MOD))
|
||||
return
|
||||
|
||||
var/body = "<html><head><title>Options for [M.key]</title></head>"
|
||||
var/body = "<html><meta charset='UTF-8'><head><title>Options for [M.key]</title></head>"
|
||||
body += "<body>Options panel for <b>[M]</b>"
|
||||
if(M.client)
|
||||
body += " played by <b>[M.client]</b> "
|
||||
@@ -390,7 +390,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
set desc = "Instantly ends the round and brings up the scoreboard, in the same way that wizards dying do."
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
var/input = sanitize(copytext(input(usr, "What text should players see announcing the round end? Input nothing to cancel.", "Specify Announcement Text", "Shift Has Ended!"), 1, MAX_MESSAGE_LEN))
|
||||
var/input = sanitize(copytext_char(input(usr, "What text should players see announcing the round end? Input nothing to cancel.", "Specify Announcement Text", "Shift Has Ended!"), 1, MAX_MESSAGE_LEN))
|
||||
|
||||
if(!input)
|
||||
return
|
||||
|
||||
@@ -108,7 +108,7 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
|
||||
pda_select += "</select>"
|
||||
|
||||
var/dat = {"
|
||||
<html><head><title>Create Outfit</title></head><body>
|
||||
<html><meta charset='utf-8'><head><title>Create Outfit</title></head><body>
|
||||
<form name="outfit" action="byond://?src=[UID()];" method="get">
|
||||
<input type="hidden" name="src" value="[UID()]">
|
||||
<input type="hidden" name="create_outfit_finalize" value="1">
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
permissions_asset.send(usr)
|
||||
|
||||
var/output = {"<!DOCTYPE html>
|
||||
<html>
|
||||
<html><meta charset='utf-8'>
|
||||
<head>
|
||||
<title>Permissions Panel</title>
|
||||
<script type='text/javascript' src='[SSassets.transport.get_asset_url("search.js")]'></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
if(!check_rights(R_ADMIN))
|
||||
message_admins("[key_name_admin(usr)] attempted to invoke player panel without admin rights. If this is a mentor, its a chance they accidentally hit F7. If this is NOT a mentor, there is a high chance an exploit is being used")
|
||||
return
|
||||
var/dat = "<html><head><title>Admin Player Panel</title></head>"
|
||||
var/dat = "<html><meta charset='utf-8'><head><title>Admin Player Panel</title></head>"
|
||||
|
||||
//javascript, the part that does most of the work~
|
||||
dat += {"
|
||||
@@ -349,10 +349,10 @@
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
if(SSticker && SSticker.current_state >= GAME_STATE_PLAYING)
|
||||
var/dat = "<html><head><title>Round Status</title></head><body><h1><B>Round Status</B></h1>"
|
||||
dat += "Current Game Mode: <B>[SSticker.mode.name]</B><BR>"
|
||||
dat += "Round Duration: <B>[round(ROUND_TIME / 36000)]:[add_zero(num2text(ROUND_TIME / 600 % 60), 2)]:[add_zero(num2text(ROUND_TIME / 10 % 60), 2)]</B><BR>"
|
||||
dat += "<B>Emergency shuttle</B><BR>"
|
||||
var/dat = "<html><meta charset='utf-8'><head><title>Round Status</title></head><body><h1><b>Round Status</b></h1>"
|
||||
dat += "Current Game Mode: <b>[SSticker.mode.name]</b><br>"
|
||||
dat += "Round Duration: <b>[round(ROUND_TIME / 36000)]:[add_zero(num2text(ROUND_TIME / 600 % 60), 2)]:[add_zero(num2text(ROUND_TIME / 10 % 60), 2)]</b><br>"
|
||||
dat += "<b>Emergency shuttle</b><br>"
|
||||
if(SSshuttle.emergency.mode < SHUTTLE_CALL)
|
||||
dat += "<a href='?src=[UID()];call_shuttle=1'>Call Shuttle</a><br>"
|
||||
else
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
|
||||
if(!check_rights(0)) return
|
||||
var/dat = "<html><body><center>"
|
||||
var/dat = "<html><meta charset='utf-8'><body><center>"
|
||||
|
||||
dat += "<a href='?src=[UID()];secretsmenu=tab;tab=0' [current_tab == 0 ? "class='linkOn'" : ""]>Debug</a>"
|
||||
dat += "<a href='?src=[UID()];secretsmenu=tab;tab=1' [current_tab == 1 ? "class='linkOn'" : ""]>IC Events</a>"
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
var/navbar
|
||||
var/ruler
|
||||
ruler = "<hr style='background:#000000; border:0; height:3px'>"
|
||||
navbar = "<a href='?_src_=holder;nonalpha=1'>\[All\]</a>|<a href='?_src_=holder;nonalpha=2'>\[#\]</a>"
|
||||
navbar = "<meta charset='UTF-8'><a href='?_src_=holder;nonalpha=1'>\[All\]</a>|<a href='?_src_=holder;nonalpha=2'>\[#\]</a>"
|
||||
for(var/letter in GLOB.alphabet)
|
||||
navbar += "|<a href='?_src_=holder;shownote=[letter]'>\[[letter]\]</a>"
|
||||
navbar += "<br><form method='GET' name='search' action='?'>\
|
||||
|
||||
@@ -1072,9 +1072,9 @@
|
||||
var/painame = "Default"
|
||||
var/name = ""
|
||||
if(alert(usr, "Do you want to set their name or let them choose their own name?", "Name Choice", "Set Name", "Let them choose") == "Set Name")
|
||||
name = sanitize(copytext(input(usr, "Enter a name for the new pAI. Default name is [painame].", "pAI Name", painame),1,MAX_NAME_LEN))
|
||||
name = sanitize(copytext_char(input(usr, "Enter a name for the new pAI. Default name is [painame].", "pAI Name", painame), 1, MAX_NAME_LEN))
|
||||
else
|
||||
name = sanitize(copytext(input(H, "An admin wants to make you into a pAI. Choose a name. Default is [painame].", "pAI Name", painame),1,MAX_NAME_LEN))
|
||||
name = sanitize(copytext_char(input(H, "An admin wants to make you into a pAI. Choose a name. Default is [painame].", "pAI Name", painame), 1, MAX_NAME_LEN))
|
||||
|
||||
if(!name)
|
||||
name = painame
|
||||
@@ -2017,7 +2017,7 @@
|
||||
D.assignment = "Pet"
|
||||
C.access_id = D
|
||||
spawn(30)
|
||||
var/newname = sanitize(copytext(input(P, "You are [P], special event pet of [H]. Change your name to something else?", "Name change", P.name) as null|text,1,MAX_NAME_LEN))
|
||||
var/newname = sanitize(copytext_char(input(P, "You are [P], special event pet of [H]. Change your name to something else?", "Name change", P.name) as null|text, 1, MAX_NAME_LEN))
|
||||
if(newname && newname != P.name)
|
||||
P.name = newname
|
||||
if(P.mind)
|
||||
@@ -2950,7 +2950,7 @@
|
||||
return
|
||||
if(alert(usr, "Are you sure you want to do this?", "Confirmation", "Yes", "No") != "Yes")
|
||||
return
|
||||
var/objective = sanitize(copytext(input("Enter an objective"),1,MAX_MESSAGE_LEN))
|
||||
var/objective = sanitize(copytext_char(input("Enter an objective"), 1, MAX_MESSAGE_LEN))
|
||||
if(!objective)
|
||||
return
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Traitor All ([objective])")
|
||||
@@ -3345,7 +3345,7 @@
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/text = html_decode(href_list["showdetails"])
|
||||
usr << browse("<HTML><HEAD><TITLE>Details</TITLE></HEAD><BODY><TT>[replacetext(text, "\n", "<BR>")]</TT></BODY></HTML>",
|
||||
usr << browse("<html><meta charset='utf-8'><head><title>Details</title></head><body><tt>[replacetext(text, "\n", "<BR>")]</tt></body></html>",
|
||||
"window=show_details;size=500x200")
|
||||
|
||||
else if(href_list["create_outfit_finalize"])
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
if(handle_spam_prevention(msg, MUTE_ADMINHELP, OOC_COOLDOWN))
|
||||
return
|
||||
|
||||
msg = sanitize_simple(copytext(msg, 1, MAX_MESSAGE_LEN))
|
||||
msg = sanitize_simple(copytext_char(msg, 1, MAX_MESSAGE_LEN))
|
||||
if(!msg) // No message after sanitisation
|
||||
return
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
|
||||
//clean the message if it's not sent by a high-rank admin
|
||||
if(!check_rights(R_SERVER|R_DEBUG,0))
|
||||
msg = sanitize_simple(copytext(msg,1,MAX_MESSAGE_LEN))
|
||||
msg = sanitize_simple(copytext_char(msg, 1, MAX_MESSAGE_LEN))
|
||||
if(!msg)
|
||||
return
|
||||
else
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
set hidden = 1
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
|
||||
msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN))
|
||||
if(!msg) return
|
||||
|
||||
var/datum/asays/asay = new(usr.ckey, usr.client.holder.rank, msg, world.timeofday)
|
||||
@@ -60,7 +60,7 @@
|
||||
else if(!check_rights(R_ADMIN|R_MOD)) // Catch any other non-admins trying to use this proc
|
||||
return
|
||||
|
||||
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
|
||||
msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN))
|
||||
log_mentorsay(msg, src)
|
||||
mob.create_log(OOC_LOG, "MSAY: [msg]")
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
if(check_rights(R_ADMIN, 0))
|
||||
stafftype = "ADMIN"
|
||||
|
||||
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
|
||||
msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN))
|
||||
log_admin("[key_name(src)] : [msg]")
|
||||
|
||||
if(!msg)
|
||||
|
||||
@@ -19,7 +19,7 @@ GLOBAL_VAR_INIT(deathsquad_sent, FALSE)
|
||||
log_admin("[key_name_admin(proccaller)] has started to spawn a DeathSquad.")
|
||||
to_chat(proccaller, "<span class='boldwarning'>This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle or use the end round verb when appropriate. Spawned commandos have internals cameras which are viewable through a monitor inside the Spec. Ops. Office. The first one selected will be the team leader.</span>")
|
||||
|
||||
var/mission = sanitize(copytext(input(src, "Please specify which mission the Deathsquad shall undertake.", "Specify Mission", "",), 1, MAX_MESSAGE_LEN))
|
||||
var/mission = sanitize(copytext_char(input(src, "Please specify which mission the Deathsquad shall undertake.", "Specify Mission", "",), 1, MAX_MESSAGE_LEN))
|
||||
if(!mission)
|
||||
if(alert("Error, no mission set. Do you want to exit the setup process?",, "Yes", "No") == "Yes")
|
||||
message_admins("[key_name_admin(proccaller)] cancelled their Deathsquad.")
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
return
|
||||
var/themission = null
|
||||
while(!themission)
|
||||
themission = sanitize(copytext(input(src, "Please specify a briefing message for the team.", "Specify Mission", ""),1,MAX_MESSAGE_LEN))
|
||||
themission = sanitize(copytext_char(input(src, "Please specify a briefing message for the team.", "Specify Mission", ""), 1, MAX_MESSAGE_LEN))
|
||||
if(!themission)
|
||||
alert("No mission specified. Aborting.")
|
||||
return
|
||||
|
||||
@@ -28,7 +28,7 @@ GLOBAL_VAR_INIT(sent_syndicate_infiltration_team, 0)
|
||||
return
|
||||
var/input = null
|
||||
while(!input)
|
||||
input = sanitize(copytext(input(src, "Please specify which mission the syndicate infiltration team shall undertake.", "Specify Mission", ""),1,MAX_MESSAGE_LEN))
|
||||
input = sanitize(copytext_char(input(src, "Please specify which mission the syndicate infiltration team shall undertake.", "Specify Mission", ""), 1, MAX_MESSAGE_LEN))
|
||||
if(!input)
|
||||
alert("No mission specified. Aborting.")
|
||||
return
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
return
|
||||
|
||||
var/msg = input(src, "What message do you want the ping to show?", "Ping all admins") as text|null
|
||||
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
|
||||
msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN))
|
||||
|
||||
if(!msg)
|
||||
return
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set category = "IC"
|
||||
set name = "Pray"
|
||||
|
||||
msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
|
||||
msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN))
|
||||
if(!msg)
|
||||
return
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Pray") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/proc/Centcomm_announce(text, mob/Sender)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
var/msg = sanitize(copytext_char(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "<span class='boldnotice'><font color=orange>CENTCOMM: </font>[key_name(Sender, 1)] ([ADMIN_PP(Sender,"PP")]) ([ADMIN_VV(Sender,"VV")]) ([ADMIN_TP(Sender,"TP")]) ([ADMIN_SM(Sender,"SM")]) ([admin_jump_link(Sender)]) ([ADMIN_BSA(Sender,"BSA")]) ([ADMIN_CENTCOM_REPLY(Sender,"RPLY")])):</span> [msg]"
|
||||
for(var/client/X in GLOB.admins)
|
||||
if(R_EVENT & X.holder.rights)
|
||||
@@ -51,7 +51,7 @@
|
||||
SEND_SOUND(X, sound('sound/effects/adminhelp.ogg'))
|
||||
|
||||
/proc/Syndicate_announce(text, mob/Sender)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
var/msg = sanitize(copytext_char(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "<span class='boldnotice'><font color='#DC143C'>SYNDICATE: </font>[key_name(Sender, 1)] ([ADMIN_PP(Sender,"PP")]) ([ADMIN_VV(Sender,"VV")]) ([ADMIN_TP(Sender,"TP")]) ([ADMIN_SM(Sender,"SM")]) ([admin_jump_link(Sender)]) ([ADMIN_BSA(Sender,"BSA")]) ([ADMIN_SYNDICATE_REPLY(Sender,"RPLY")]):</span> [msg]"
|
||||
for(var/client/X in GLOB.admins)
|
||||
if(check_rights(R_EVENT,0,X.mob))
|
||||
@@ -79,7 +79,7 @@
|
||||
/proc/Nuke_request(text , mob/Sender)
|
||||
var/nuke_code = get_nuke_code()
|
||||
var/nuke_status = get_nuke_status()
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
var/msg = sanitize(copytext_char(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "<span class='adminnotice'><b><font color=orange>NUKE CODE REQUEST: </font>[key_name(Sender)] ([ADMIN_PP(Sender,"PP")]) ([ADMIN_VV(Sender,"VV")]) ([ADMIN_TP(Sender,"TP")]) ([ADMIN_SM(Sender,"SM")]) ([admin_jump_link(Sender)]) ([ADMIN_BSA(Sender,"BSA")]) ([ADMIN_CENTCOM_REPLY(Sender,"RPLY")]):</b> [msg]</span>"
|
||||
for(var/client/X in GLOB.admins)
|
||||
if(check_rights(R_EVENT,0,X.mob))
|
||||
|
||||
@@ -1003,9 +1003,9 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
return
|
||||
|
||||
/* ======== SSD Section ========= */
|
||||
var/msg = "<html><head><title>SSD & AFK Report</title></head><body>"
|
||||
msg += "SSD Players:<BR><TABLE border='1'>"
|
||||
msg += "<TR><TD><B>Key</B></TD><TD><B>Real Name</B></TD><TD><B>Job</B></TD><TD><B>Mins SSD</B></TD><TD><B>Special Role</B></TD><TD><B>Area</B></TD><TD><B>PPN</B></TD><TD><B>Cryo</B></TD></TR>"
|
||||
var/msg = "<html><meta charset='utf-8'><head><title>SSD & AFK Report</title></head><body>"
|
||||
msg += "SSD Players:<br><TABLE border='1'>"
|
||||
msg += "<tr><td><b>Key</b></td><td><b>Real Name</b></td><td><b>Job</b></td><td><b>Mins SSD</b></td><td><b>Special Role</b></td><td><b>Area</b></td><td><b>PPN</b></td><td><b>Cryo</b></td></tr>"
|
||||
var/mins_ssd
|
||||
var/job_string
|
||||
var/key_string
|
||||
|
||||
@@ -23,7 +23,7 @@ GLOBAL_VAR_INIT(sent_syndicate_strike_team, 0)
|
||||
|
||||
var/input = null
|
||||
while(!input)
|
||||
input = sanitize(copytext(input(src, "Please specify which mission the syndicate strike team shall undertake.", "Specify Mission", ""),1,MAX_MESSAGE_LEN))
|
||||
input = sanitize(copytext_char(input(src, "Please specify which mission the syndicate strike team shall undertake.", "Specify Mission", ""),1,MAX_MESSAGE_LEN))
|
||||
if(!input)
|
||||
if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes")
|
||||
return
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
return
|
||||
|
||||
var/dat = {"
|
||||
<html>
|
||||
<html><meta charset='utf-8'>
|
||||
<head>
|
||||
<title>Arcade Ticket Exchange</title>
|
||||
<style type="text/css">
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
var/dat = {"
|
||||
<html>
|
||||
<html><meta charset='utf-8'>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
a.green:link
|
||||
|
||||
@@ -1654,21 +1654,21 @@
|
||||
if(length(med_record) <= 40)
|
||||
HTML += "[med_record]"
|
||||
else
|
||||
HTML += "[copytext(med_record, 1, 37)]..."
|
||||
HTML += "[copytext_char(med_record, 1, 37)]..."
|
||||
|
||||
HTML += "<br><a href=\"byond://?_src_=prefs;preference=records;task=gen_record\">Employment Records</a><br>"
|
||||
|
||||
if(length(gen_record) <= 40)
|
||||
HTML += "[gen_record]"
|
||||
else
|
||||
HTML += "[copytext(gen_record, 1, 37)]..."
|
||||
HTML += "[copytext_char(gen_record, 1, 37)]..."
|
||||
|
||||
HTML += "<br><a href=\"byond://?_src_=prefs;preference=records;task=sec_record\">Security Records</a><br>"
|
||||
|
||||
if(length(sec_record) <= 40)
|
||||
HTML += "[sec_record]<br>"
|
||||
else
|
||||
HTML += "[copytext(sec_record, 1, 37)]...<br>"
|
||||
HTML += "[copytext_char(sec_record, 1, 37)]...<br>"
|
||||
|
||||
HTML += "<a href=\"byond://?_src_=prefs;preference=records;records=-1\">\[Done\]</a>"
|
||||
HTML += "</center></tt>"
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
* buttons and then builds the rest of the UI based on what page the player is turned to.
|
||||
*/
|
||||
/obj/item/book/proc/show_content(mob/user)
|
||||
var/dat = ""
|
||||
var/dat = "<meta charset='utf-8'>"
|
||||
//First, we're going to choose/generate our header buttons for switching pages and store it in var/dat
|
||||
var/header_left = "<div style='float:left; text-align:left; width:49.9%'></div>"
|
||||
var/header_right = "<div style ='float;left; text-align:right; width:49.9%'></div>"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/mob/dead/observer/say(message)
|
||||
message = sanitize(copytext(message, 1, MAX_MESSAGE_LEN))
|
||||
message = sanitize(copytext_char(message, 1, MAX_MESSAGE_LEN))
|
||||
|
||||
if(!message)
|
||||
return
|
||||
|
||||
@@ -76,11 +76,11 @@
|
||||
|
||||
. = list()
|
||||
|
||||
while(length(message))
|
||||
while(length_char(message))
|
||||
var/min_index = 10000 // if the message is longer than this, the autohiss is the least of your problems
|
||||
var/min_char = null
|
||||
for(var/char in map)
|
||||
var/i = findtext(message, char)
|
||||
var/i = findtext_char(message, char)
|
||||
if(!i) // no more of this character anywhere in the string, don't even bother searching next time
|
||||
map -= char
|
||||
else if(i < min_index)
|
||||
@@ -89,12 +89,12 @@
|
||||
if(!min_char) // we didn't find any of the mapping characters
|
||||
. += message
|
||||
break
|
||||
. += copytext(message, 1, min_index)
|
||||
if(copytext(message, min_index, min_index + 1) == uppertext(min_char))
|
||||
. += copytext_char(message, 1, min_index)
|
||||
if(copytext_char(message, min_index, min_index + 1) == uppertext(min_char))
|
||||
. += uppertext(pick(map[min_char]))
|
||||
else
|
||||
. += pick(map[min_char])
|
||||
message = copytext(message, min_index + 1)
|
||||
message = copytext_char(message, min_index + 1)
|
||||
|
||||
return jointext(., "")
|
||||
|
||||
|
||||
@@ -130,9 +130,9 @@ GLOBAL_LIST_EMPTY(channel_to_radio_key)
|
||||
//parse the radio code and consume it
|
||||
if(message_mode)
|
||||
if(message_mode == "headset")
|
||||
message = copytext(message, 2) //it would be really nice if the parse procs could do this for us.
|
||||
message = copytext_char(message, 2) //it would be really nice if the parse procs could do this for us.
|
||||
else
|
||||
message = copytext(message, 3)
|
||||
message = copytext_char(message, 3)
|
||||
|
||||
message = trim_left(message)
|
||||
|
||||
|
||||
@@ -518,7 +518,7 @@
|
||||
/mob/living/silicon/proc/place_on_head(obj/item/item_to_add, mob/user)
|
||||
if(flags_2 & HOLOGRAM_2)
|
||||
return FALSE
|
||||
|
||||
|
||||
if(!item_to_add)
|
||||
user.visible_message(
|
||||
"<span class='notice'>[user] pats [src] on the head.</span>",
|
||||
|
||||
@@ -289,13 +289,13 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
|
||||
status_tab_data = show_borg_info(status_tab_data)
|
||||
|
||||
/mob/living/silicon/ai/proc/ai_alerts()
|
||||
var/list/dat = list("<HEAD><TITLE>Current Station Alerts</TITLE><META HTTP-EQUIV='Refresh' CONTENT='10'></HEAD><BODY>\n")
|
||||
dat += "<A HREF='?src=[UID()];mach_close=aialerts'>Close</A><BR><BR>"
|
||||
var/list/dat = list("<meta charset='utf-8'><head><title>Current Station Alerts</title><meta http-equiv='Refresh' content='10'></head><body>\n")
|
||||
dat += "<a href='?src=[UID()];mach_close=aialerts'>Close</a><br><br>"
|
||||
var/list/list/temp_alarm_list = GLOB.alarm_manager.alarms.Copy()
|
||||
for(var/cat in temp_alarm_list)
|
||||
if(!(cat in alarms_listend_for))
|
||||
continue
|
||||
dat += "<B>[cat]</B><BR>\n"
|
||||
dat += "<b>[cat]</b><br>\n"
|
||||
var/list/list/L = temp_alarm_list[cat].Copy()
|
||||
for(var/alarm in L)
|
||||
var/list/list/alm = L[alarm].Copy()
|
||||
@@ -307,22 +307,22 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
|
||||
if(A && A.z != z)
|
||||
L -= alarm
|
||||
continue
|
||||
dat += "<NOBR>"
|
||||
dat += "<nobr>"
|
||||
if(C && islist(C))
|
||||
var/dat2 = ""
|
||||
for(var/cam in C)
|
||||
var/obj/machinery/camera/I = locateUID(cam)
|
||||
if(!QDELETED(I))
|
||||
dat2 += "[(dat2 == "") ? "" : " | "]<A HREF=?src=[UID()];switchcamera=[cam]>[I.c_tag]</A>"
|
||||
dat2 += "[(dat2 == "") ? "" : " | "]<a href=?src=[UID()];switchcamera=[cam]>[I.c_tag]</A>"
|
||||
dat += "-- [area_name] ([(dat2 != "") ? dat2 : "No Camera"])"
|
||||
else
|
||||
dat += "-- [area_name] (No Camera)"
|
||||
if(sources.len > 1)
|
||||
dat += "- [length(sources)] sources"
|
||||
dat += "</NOBR><BR>\n"
|
||||
dat += "</nobr><br>\n"
|
||||
if(!L.len)
|
||||
dat += "-- All Systems Nominal<BR>\n"
|
||||
dat += "<BR>\n"
|
||||
dat += "-- All Systems Nominal<br>\n"
|
||||
dat += "<br>\n"
|
||||
|
||||
viewalerts = TRUE
|
||||
var/dat_text = dat.Join("")
|
||||
|
||||
@@ -99,13 +99,13 @@ GLOBAL_DATUM_INIT(paiController, /datum/paiController, new) // Global handler fo
|
||||
candidate.reload_save(usr)
|
||||
//In case people have saved unsanitized stuff.
|
||||
if(candidate.pai_name)
|
||||
candidate.pai_name = sanitize(copytext(candidate.pai_name, 1, MAX_NAME_LEN))
|
||||
candidate.pai_name = sanitize(copytext_char(candidate.pai_name, 1, MAX_NAME_LEN))
|
||||
if(candidate.description)
|
||||
candidate.description = sanitize(copytext(candidate.description, 1, MAX_MESSAGE_LEN))
|
||||
candidate.description = sanitize(copytext_char(candidate.description, 1, MAX_MESSAGE_LEN))
|
||||
if(candidate.role)
|
||||
candidate.role = sanitize(copytext(candidate.role, 1, MAX_MESSAGE_LEN))
|
||||
candidate.role = sanitize(copytext_char(candidate.role, 1, MAX_MESSAGE_LEN))
|
||||
if(candidate.ooc_comments)
|
||||
candidate.ooc_comments = sanitize(copytext(candidate.ooc_comments, 1, MAX_MESSAGE_LEN))
|
||||
candidate.ooc_comments = sanitize(copytext_char(candidate.ooc_comments, 1, MAX_MESSAGE_LEN))
|
||||
|
||||
if("submit")
|
||||
if(candidate)
|
||||
@@ -250,7 +250,7 @@ GLOBAL_DATUM_INIT(paiController, /datum/paiController, new) // Global handler fo
|
||||
|
||||
dat += {"
|
||||
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">
|
||||
<html>
|
||||
<html><meta charset='utf-8'>
|
||||
<head>
|
||||
<style>
|
||||
body {
|
||||
|
||||
@@ -930,7 +930,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
|
||||
usr << browse(null,"window=mob\ref[src]")
|
||||
|
||||
if(href_list["flavor_more"])
|
||||
usr << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", name, replacetext(flavor_text, "\n", "<BR>")), "window=[name];size=500x200")
|
||||
usr << browse(text("<html><meta charset='utf-8'><head><title>[]</title></head><body><tt>[]</tt></body></html>", name, replacetext(flavor_text, "\n", "<br>")), "window=[name];size=500x200")
|
||||
onclose(usr, "[name]")
|
||||
if(href_list["flavor_change"])
|
||||
update_flavor_text()
|
||||
|
||||
@@ -235,12 +235,12 @@
|
||||
return n
|
||||
var/te = n
|
||||
var/t = ""
|
||||
n = length(n)
|
||||
n = length_char(n)
|
||||
var/p = null
|
||||
p = 1
|
||||
while(p <= n)
|
||||
if((copytext(te, p, p + 1) == " " || prob(pr)))
|
||||
t = "[t][copytext(te, p, p + 1)]"
|
||||
if((copytext_char(te, p, p + 1) == " " || prob(pr)))
|
||||
t = "[t][copytext_char(te, p, p + 1)]"
|
||||
else
|
||||
t = "[t]*"
|
||||
p++
|
||||
@@ -252,12 +252,12 @@
|
||||
|
||||
/proc/slur(phrase, list/slurletters = ("'"))//use a different list as an input if you want to make robots slur with $#@%! characters
|
||||
phrase = html_decode(phrase)
|
||||
var/leng=length(phrase)
|
||||
var/counter=length(phrase)
|
||||
var/newphrase=""
|
||||
var/newletter=""
|
||||
while(counter>=1)
|
||||
newletter=copytext(phrase,(leng-counter)+1,(leng-counter)+2)
|
||||
var/leng = length_char(phrase)
|
||||
var/counter = length_char(phrase)
|
||||
var/newphrase = ""
|
||||
var/newletter = ""
|
||||
while(counter >= 1)
|
||||
newletter=copytext_char(phrase, (leng - counter) + 1, (leng - counter) + 2)
|
||||
if(rand(1,3)==3)
|
||||
if(lowertext(newletter)=="o") newletter="u"
|
||||
if(lowertext(newletter)=="s") newletter="ch"
|
||||
@@ -276,12 +276,12 @@
|
||||
/proc/stutter(n)
|
||||
var/te = html_decode(n)
|
||||
var/t = "" //placed before the message. Not really sure what it's for.
|
||||
n = length(n) //length of the entire word
|
||||
n = length_char(n) //length of the entire word
|
||||
var/p = null
|
||||
p = 1 //1 is the start of any word
|
||||
while(p <= n) //while P, which starts at 1 is less or equal to N which is the length.
|
||||
var/n_letter = copytext(te, p, p + 1)//copies text from a certain distance. In this case, only one letter at a time.
|
||||
if(prob(80) && (ckey(n_letter) in list("b","c","d","f","g","h","j","k","l","m","n","p","q","r","s","t","v","w","x","y","z")))
|
||||
var/n_letter = copytext_char(te, p, p + 1)//copies text from a certain distance. In this case, only one letter at a time.
|
||||
if(prob(80) && (lowertext(n_letter) in list("b","c","d","f","g","h","j","k","l","m","n","p","q","r","s","t","v","w","x","y","z")))
|
||||
if(prob(5))
|
||||
n_letter = text("[n_letter]-[n_letter]-[n_letter]") //replaces the current letter with this instead.
|
||||
else
|
||||
@@ -291,18 +291,18 @@
|
||||
n_letter = text("[n_letter]-[n_letter]")
|
||||
t = text("[t][n_letter]") //since the above is ran through for each letter, the text just adds up back to the original word.
|
||||
p++ //for each letter p is increased to find where the next letter will be.
|
||||
return sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
return sanitize(copytext_char(t, 1, MAX_MESSAGE_LEN))
|
||||
|
||||
/proc/robostutter(n) //for robutts
|
||||
var/te = html_decode(n)
|
||||
var/t = ""//placed before the message. Not really sure what it's for.
|
||||
n = length(n)//length of the entire word
|
||||
n = length_char(n)//length of the entire word
|
||||
var/p = null
|
||||
p = 1//1 is the start of any word
|
||||
while(p <= n)//while P, which starts at 1 is less or equal to N which is the length.
|
||||
var/robotletter = pick("@", "!", "#", "$", "%", "&", "?") //for beep boop
|
||||
var/n_letter = copytext(te, p, p + 1)//copies text from a certain distance. In this case, only one letter at a time.
|
||||
if(prob(80) && (ckey(n_letter) in list("b","c","d","f","g","h","j","k","l","m","n","p","q","r","s","t","v","w","x","y","z")))
|
||||
var/n_letter = copytext_char(te, p, p + 1)//copies text from a certain distance. In this case, only one letter at a time.
|
||||
if(prob(80) && (lowertext(n_letter) in list("b","c","d","f","g","h","j","k","l","m","n","p","q","r","s","t","v","w","x","y","z")))
|
||||
if(prob(10))
|
||||
n_letter = text("[n_letter]-[robotletter]-[n_letter]-[n_letter]")//replaces the current letter with this instead.
|
||||
else
|
||||
@@ -315,15 +315,15 @@
|
||||
n_letter = text("[n_letter]-[n_letter]")
|
||||
t = text("[t][n_letter]")//since the above is ran through for each letter, the text just adds up back to the original word.
|
||||
p++//for each letter p is increased to find where the next letter will be.
|
||||
return sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
return sanitize(copytext_char(t, 1, MAX_MESSAGE_LEN))
|
||||
|
||||
|
||||
/proc/Gibberish(t, p, replace_rate = 50)//t is the inputted message, and any value higher than 70 for p will cause letters to be replaced instead of added. replace_rate is the chance a letter is corrupted.
|
||||
/* Turn text into complete gibberish! */
|
||||
var/returntext = ""
|
||||
for(var/i = 1, i <= length(t), i++)
|
||||
for(var/i = 1, i <= length_char(t), i++)
|
||||
|
||||
var/letter = copytext(t, i, i+1)
|
||||
var/letter = copytext_char(t, i, i + 1)
|
||||
if(prob(replace_rate))
|
||||
if(p >= 70)
|
||||
letter = ""
|
||||
@@ -342,12 +342,12 @@
|
||||
|
||||
/proc/muffledspeech(phrase)
|
||||
phrase = html_decode(phrase)
|
||||
var/leng=length(phrase)
|
||||
var/counter=length(phrase)
|
||||
var/newphrase=""
|
||||
var/newletter=""
|
||||
while(counter>=1)
|
||||
newletter=copytext(phrase,(leng-counter)+1,(leng-counter)+2)
|
||||
var/leng = length_char(phrase)
|
||||
var/counter = length_char(phrase)
|
||||
var/newphrase = ""
|
||||
var/newletter = ""
|
||||
while(counter >= 1)
|
||||
newletter=copytext_char(phrase, (leng - counter) + 1, (leng - counter) + 2)
|
||||
if(newletter in list(" ", "!", "?", ".", ","))
|
||||
// Skip these
|
||||
counter -= 1
|
||||
@@ -685,12 +685,12 @@
|
||||
|
||||
/proc/cultslur(n) // Inflicted on victims of a stun talisman
|
||||
var/phrase = html_decode(n)
|
||||
var/leng = length(phrase)
|
||||
var/counter=length(phrase)
|
||||
var/leng = length_char(phrase)
|
||||
var/counter = length_char(phrase)
|
||||
var/newphrase=""
|
||||
var/newletter=""
|
||||
while(counter>=1)
|
||||
newletter=copytext(phrase,(leng-counter)+1,(leng-counter)+2)
|
||||
newletter=copytext_char(phrase, (leng - counter) + 1, (leng - counter) + 2)
|
||||
if(rand(1,2)==2)
|
||||
if(lowertext(newletter)=="o")
|
||||
newletter="u"
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
return standard_mode
|
||||
|
||||
if(length(message) >= 2)
|
||||
var/channel_prefix = copytext(message, 1 ,3)
|
||||
var/channel_prefix = copytext_char(message, 1, 3)
|
||||
return GLOB.department_radio_keys[channel_prefix]
|
||||
|
||||
return null
|
||||
|
||||
@@ -439,7 +439,7 @@
|
||||
var/mins = (mills % 36000) / 600
|
||||
var/hours = mills / 36000
|
||||
|
||||
var/dat = "<html><body><center>"
|
||||
var/dat = "<html><meta charset='utf-8'><body><center>"
|
||||
dat += "Round Duration: [round(hours)]h [round(mins)]m<br>"
|
||||
dat += "<b>The station alert level is: [SSsecurity_level.get_colored_current_security_level_name()]</b><br>"
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
return
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/human_user = user
|
||||
var/dat
|
||||
var/dat = {"<meta charset="UTF-8">"}
|
||||
pages = 0
|
||||
switch(screen)
|
||||
if(SCREEN_COVER) //Cover
|
||||
|
||||
@@ -46,10 +46,10 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/folder/attack_self(mob/user as mob)
|
||||
var/dat = "<title>[name]</title>"
|
||||
var/dat = {"<meta charset="UTF-8"><title>[name]</title>"}
|
||||
|
||||
for(var/obj/item/paper/P in src)
|
||||
dat += "<A href='?src=[UID()];remove=\ref[P]'>Remove</A> - <A href='?src=[UID()];read=\ref[P]'>[P.name]</A><BR>"
|
||||
dat += "<a href='?src=[UID()];remove=\ref[P]'>Remove</a> - <a href='?src=[UID()];read=\ref[P]'>[P.name]</a><br>"
|
||||
for(var/obj/item/photo/Ph in src)
|
||||
dat += "<A href='?src=[UID()];remove=\ref[Ph]'>Remove</A> - <A href='?src=[UID()];look=\ref[Ph]'>[Ph.name]</A><BR>"
|
||||
for(var/obj/item/paper_bundle/Pa in src)
|
||||
|
||||
@@ -288,7 +288,7 @@
|
||||
|
||||
|
||||
/obj/item/paper/proc/openhelp(mob/user as mob)
|
||||
user << browse({"<HTML><HEAD><TITLE>Pen Help</TITLE></HEAD>
|
||||
user << browse({"<html><meta charset='utf-8'><head><title>Pen Help</title></head>
|
||||
<BODY>
|
||||
<b><center>Crayon&Pen commands</center></b><br>
|
||||
<br>
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
. += "<span class='notice'>It is too far away.</span>"
|
||||
|
||||
/obj/item/paper_bundle/proc/show_content(mob/user as mob)
|
||||
var/dat
|
||||
var/dat = {"<meta charset="UTF-8">"}
|
||||
var/obj/item/W = src[page]
|
||||
switch(screen)
|
||||
if(0)
|
||||
@@ -127,7 +127,7 @@
|
||||
else if(istype(src[page], /obj/item/photo))
|
||||
var/obj/item/photo/P = W
|
||||
usr << browse_rsc(P.img, "tmp_photo.png")
|
||||
usr << browse(dat + "<html><head><title>[P.name]</title></head>" \
|
||||
usr << browse(dat + "<html><meta charset='utf-8'><head><title>[P.name]</title></head>" \
|
||||
+ "<body style='overflow:hidden'>" \
|
||||
+ "<div> <img src='tmp_photo.png' width = '180'" \
|
||||
+ "[P.scribble ? "<div><br> Written on the back:<br><i>[P.scribble]</i>" : ""]"\
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
colormatrix[7], colormatrix[8], colormatrix[9],
|
||||
)
|
||||
usr << browse_rsc(img_shown, "tmp_photo.png")
|
||||
usr << browse("<html><head><title>[name]</title></head>" \
|
||||
usr << browse("<html><meta charset='utf-8'><head><title>[name]</title></head>" \
|
||||
+ "<body style='overflow:hidden;margin:0;text-align:center'>" \
|
||||
+ "<img src='tmp_photo.png' width='[64*photo_size]' style='-ms-interpolation-mode:nearest-neighbor' />" \
|
||||
+ "[scribble ? "<br>Written on the back:<br><i>[scribble]</i>" : ""]"\
|
||||
|
||||
@@ -395,7 +395,6 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
to_chat(user, "The PDA softly beeps.")
|
||||
close(user)
|
||||
return TRUE
|
||||
|
||||
ttone = new_tone
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
var/datum/data/pda/app/messenger/M = find_program(/datum/data/pda/app/messenger)
|
||||
if(!M)
|
||||
to_chat(usr, "<span class='warning'>Cannot use messenger!</span>")
|
||||
var/HTML = "<html><head><title>AI PDA Message Log</title></head><body>"
|
||||
var/HTML = "<html><meta charset='utf-8'><head><title>AI PDA Message Log</title></head><body>"
|
||||
for(var/index in M.tnote)
|
||||
if(index["sent"])
|
||||
HTML += addtext("<i><b>→ To <a href='byond://?src=[UID()];choice=Message;target=",index["src"],"'>", index["owner"],"</a>:</b></i><br>", index["message"], "<br>")
|
||||
|
||||
@@ -347,9 +347,9 @@
|
||||
dat += "[temp_server.name] Server to Server Transfer<BR><BR>"
|
||||
dat += "Send Data to what server?<BR>"
|
||||
for(var/obj/machinery/r_n_d/server/S in servers)
|
||||
dat += "[S.name] <A href='?src=[UID()];send_to=[S.server_id]'> (Transfer)</A><BR>"
|
||||
dat += "<HR><A href='?src=[UID()];main=1'>Main Menu</A>"
|
||||
user << browse("<TITLE>R&D Server Control</TITLE><HR>[dat]", "window=server_control;size=575x400")
|
||||
dat += "[S.name] <a href='?src=[UID()];send_to=[S.server_id]'> (Transfer)</a><br>"
|
||||
dat += "<hr><a href='?src=[UID()];main=1'>Main Menu</a>"
|
||||
user << browse("<title>R&D Server Control</title><hr><meta charset='UTF-8'>[dat]", "window=server_control;size=575x400")
|
||||
onclose(user, "server_control")
|
||||
return
|
||||
|
||||
|
||||
@@ -268,7 +268,7 @@
|
||||
if(world.time > timeout || !reason || (!is_public && !is_authorized(user)) || ..())
|
||||
// Cancel if they take too long, they dont give a reason, they aint authed, or if they walked away
|
||||
return
|
||||
reason = sanitize(copytext(reason, 1, 75)) // very long reasons are bad
|
||||
reason = sanitize(copytext_char(reason, 1, 75)) // very long reasons are bad
|
||||
|
||||
//===orderee identification information===
|
||||
var/idname = "*None Provided*"
|
||||
|
||||
@@ -137,7 +137,7 @@ GLOBAL_LIST_EMPTY(GPS_list)
|
||||
switch(action)
|
||||
if("tag")
|
||||
var/newtag = params["newtag"] || ""
|
||||
newtag = uppertext(paranoid_sanitize(copytext(newtag, 1, 5)))
|
||||
newtag = uppertext(paranoid_sanitize(copytext_char(newtag, 1, 5)))
|
||||
if(!length(newtag) || gpstag == newtag)
|
||||
return
|
||||
gpstag = newtag
|
||||
|
||||
Reference in New Issue
Block a user