mirror of
https://github.com/goonstation/goonstation-2016.git
synced 2026-08-22 21:46:13 +01:00
modified process scheduler, 510 compatibility, explosions moved to process
this is all very alpha please don't hate me too much if i fucked it up
This commit is contained in:
@@ -96,7 +96,7 @@
|
||||
|
||||
/proc/honk(var/string)
|
||||
var/modded = ""
|
||||
var/list/text_tokens = dd_text2list(string, " ")
|
||||
var/list/text_tokens = splittext(string, " ")
|
||||
for(var/token in text_tokens)
|
||||
modded += "HONK "
|
||||
modded += "HONK!"
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
if (!NA)
|
||||
return null
|
||||
var/temp = copytext(str, pos, NA)
|
||||
buf += dd_replacetext(temp, " ", " ")
|
||||
buf += replacetext(temp, " ", " ")
|
||||
pos = NA + 1
|
||||
state = NONE
|
||||
|
||||
@@ -75,14 +75,14 @@
|
||||
pos = NQ + 1
|
||||
continue
|
||||
var/temp = copytext(str, qpos, NQ)
|
||||
buf += dd_replacetext(dd_replacetext(temp, " ", " "), "\\\"", "\"")
|
||||
buf += replacetext(replacetext(temp, " ", " "), "\\\"", "\"")
|
||||
pos = NQ + 1
|
||||
state = NONE
|
||||
|
||||
var/list/el = dd_text2list(buf, " ")
|
||||
var/list/el = splittext(buf, " ")
|
||||
var/list/ret = list()
|
||||
for (var/s in el)
|
||||
ret += dd_replacetext(s, " ", " ")
|
||||
ret += replacetext(s, " ", " ")
|
||||
return ret
|
||||
|
||||
#undef ESCAPE
|
||||
|
||||
@@ -107,8 +107,8 @@ var/global/list/triggerVars = list("triggersFail", "triggersTemp", "triggersChem
|
||||
/atom/proc/setMaterial(var/datum/material/mat1)
|
||||
if(!mat1 ||!istype(mat1, /datum/material)) return
|
||||
var/traitDesc = get_material_trait_desc(mat1)
|
||||
var/strPrefix = dd_list2text(mat1.prefixes, " ")
|
||||
var/strSuffix = dd_list2text(mat1.suffixes, " ")
|
||||
var/strPrefix = jointext(mat1.prefixes, " ")
|
||||
var/strSuffix = jointext(mat1.suffixes, " ")
|
||||
// Setting mat_changename/desc == 0 is almost as conspicuous as having "good gold chameleon bombs".
|
||||
// Real_desc/name is a substandard implementation, but it will prevent some midas touch exploits (Convair880).
|
||||
if (src.mat_changename) // now that I've cleaned up the name prefix/suffix stuff, let's try this, in the hopes that eveything that SHOULD override UpdateName() actually DOES - Haine
|
||||
|
||||
@@ -1068,8 +1068,8 @@ var/list/mechanics_telepads = new/list()
|
||||
var/inp = input(usr,"Please enter Expression:","Expression setting", expression) as text
|
||||
if(length(inp))
|
||||
var/regex/R = new(inp)
|
||||
if(R.error)
|
||||
boutput(usr, "<span style=\"color:red\">[R.error]</span>")
|
||||
if(!R)
|
||||
boutput(usr, "<span style=\"color:red\">Bad regex</span>")
|
||||
else
|
||||
inp = sanitize(html_encode(inp))
|
||||
expression = inp
|
||||
@@ -1128,8 +1128,8 @@ var/list/mechanics_telepads = new/list()
|
||||
var/inp = input(usr,"Please enter Expression:","Expression setting", expression) as text
|
||||
if(length(inp))
|
||||
var/regex/R = new(inp)
|
||||
if(R.error)
|
||||
boutput(usr, "<span style=\"color:red\">[R.error]</span>")
|
||||
if(!R)
|
||||
boutput(usr, "<span style=\"color:red\">Bad regex</span>")
|
||||
else
|
||||
expression = inp
|
||||
inp = sanitize(html_encode(inp))
|
||||
|
||||
@@ -21,14 +21,14 @@
|
||||
if("Add")
|
||||
var/t = input(user, "What text do you wish to add?", text("[]", src.name), null) as message
|
||||
t = copytext(html_encode(t), 1, MAX_MESSAGE_LEN)
|
||||
t = dd_replacetext(t, "\n", "<BR>")
|
||||
t = dd_replacetext(t, "\[b\]", "<B>")
|
||||
t = dd_replacetext(t, "\[/b\]", "</B>")
|
||||
t = dd_replacetext(t, "\[i\]", "<I>")
|
||||
t = dd_replacetext(t, "\[/i\]", "</I>")
|
||||
t = dd_replacetext(t, "\[u\]", "<U>")
|
||||
t = dd_replacetext(t, "\[/u\]", "</U>")
|
||||
t = dd_replacetext(t, "\[sign\]", text("<font face=vivaldi>[]</font>", user.real_name))
|
||||
t = replacetext(t, "\n", "<BR>")
|
||||
t = replacetext(t, "\[b\]", "<B>")
|
||||
t = replacetext(t, "\[/b\]", "</B>")
|
||||
t = replacetext(t, "\[i\]", "<I>")
|
||||
t = replacetext(t, "\[/i\]", "</I>")
|
||||
t = replacetext(t, "\[u\]", "<U>")
|
||||
t = replacetext(t, "\[/u\]", "</U>")
|
||||
t = replacetext(t, "\[sign\]", text("<font face=vivaldi>[]</font>", user.real_name))
|
||||
t = text("<font face=calligrapher>[]</font>", t)
|
||||
src.info += t
|
||||
|
||||
@@ -70,14 +70,14 @@
|
||||
if ((!in_range(src, usr) && src.loc != user && !( istype(src.loc, /obj/item/clipboard) ) && src.loc.loc != user && user.equipped() != P))
|
||||
return
|
||||
t = copytext(html_encode(t), 1, MAX_MESSAGE_LEN)
|
||||
t = dd_replacetext(t, "\n", "<BR>")
|
||||
t = dd_replacetext(t, "\[b\]", "<B>")
|
||||
t = dd_replacetext(t, "\[/b\]", "</B>")
|
||||
t = dd_replacetext(t, "\[i\]", "<I>")
|
||||
t = dd_replacetext(t, "\[/i\]", "</I>")
|
||||
t = dd_replacetext(t, "\[u\]", "<U>")
|
||||
t = dd_replacetext(t, "\[/u\]", "</U>")
|
||||
t = dd_replacetext(t, "\[sign\]", text("<font face=vivaldi>[]</font>", user.real_name))
|
||||
t = replacetext(t, "\n", "<BR>")
|
||||
t = replacetext(t, "\[b\]", "<B>")
|
||||
t = replacetext(t, "\[/b\]", "</B>")
|
||||
t = replacetext(t, "\[i\]", "<I>")
|
||||
t = replacetext(t, "\[/i\]", "</I>")
|
||||
t = replacetext(t, "\[u\]", "<U>")
|
||||
t = replacetext(t, "\[/u\]", "</U>")
|
||||
t = replacetext(t, "\[sign\]", text("<font face=vivaldi>[]</font>", user.real_name))
|
||||
t = text("<font face=calligrapher>[]</font>", t)
|
||||
src.info += t
|
||||
|
||||
|
||||
@@ -4,9 +4,15 @@
|
||||
set hidden = 1
|
||||
admin_only
|
||||
|
||||
boutput(world, "hi")
|
||||
//src.chui.reload()
|
||||
src.Browse(grabResource("html/wireTest.html"), "window=wireTest;size=500x650;title=Wire Test;")
|
||||
//src.Browse(grabResource("html/wireTest.html"), "window=wireTest;size=500x650;title=Wire Test;")
|
||||
//src.mob.deathConfetti()
|
||||
//var/list/testList = new("")
|
||||
var/text = "availableMail@=cogwerks01@,hubbert01@,isaidno01@,isaidno02@,isaidno03@,isaidno04@,isaidno05@,mollymillions01@,mollymillions02@,mollymillions03@,mollymillions04@,mollymillions05@,mollymillions06@,mollymillions07@,mollymillions08@,mollymillions09@,mollymillions10@,mollymillions11@,mollymillions12@,mollymillions13@,mollymillions14@,hubbert02@,cogwerks02@,cogwerks03@,cogwerks04@,isaidno03@,cogwerks05@,hubbert03@,cogwerks06@,cogwerks07@,cogwerks08@,cogwerks10@,cogwerks11@,cogwerks12@,cogwerks14@,cogwerks15@,cogwerks16@,cogwerks17@,cogwerks18@,cogwerks19@,cogwerks20@,cogwerks21@,cogwerks22@,cogwerks23@,cogwerks24@,cogwerks25@,cogwerks26@,cogwerks31@,cogwerks32@,tman02@,aphtonites01@,aphtonites02@,daunt01@,mozi01@,mozi02@,mozi03@,mozi04@,mozi05@,mozi06@,mozi07@,mozi08@,mozi09@,mozi10@,mozi11@,mozi12@,mozi13@,mozi14@,mozi15@,mozi16@,mozi17@,mozi18@,mozi19@,mozi20@,daunt02@,daunt03@,nubcake01@,nubcake02@,nubcake03@,nubcake04@,nubcake05@,nubcake06"
|
||||
var/list/stringsList = splittext(text, "@=")
|
||||
|
||||
boutput(world, "[stringsList[1]]<br><br>[stringsList[2]]")
|
||||
|
||||
|
||||
//Proc for parsing data returned by the bans API (as well as whatever else in the future)
|
||||
@@ -20,18 +26,12 @@
|
||||
data = base64str(data)
|
||||
var/list/ldata = params2list(url_decode(data))
|
||||
var/parsedList[] = new()
|
||||
var/regex/R = new("/(^\\d{1,2})/i")
|
||||
|
||||
for (var/e = 1, e <= ldata.len, e++) //each field in the format index[fieldkey]=field
|
||||
var/index = ldata[e]
|
||||
var/num
|
||||
var/num = copytext(index, 1, 2) //grab the index number e.g. the 1 from 1[ckey]=blah
|
||||
|
||||
if (R.Find(index))
|
||||
do
|
||||
num = R.GroupText(1) //grab the index number e.g. the 1 from 1[ckey]=blah
|
||||
while(R.FindNext(index))
|
||||
|
||||
if (!num) //no num found, we're assuming this was an error message response (or any kind of message really)
|
||||
if (!num || !text2num(num)) //no num found, we're assuming this was an error message response (or any kind of message really)
|
||||
ldata[index] = base64str(ldata[index])
|
||||
return ldata
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
field = copytext(field, 2, -1) //convert [ckey] to ckey
|
||||
var/val = base64str(ldata[index]) //the actual value e.g. blah
|
||||
|
||||
if (!parsedList[num]) //if a list of this num doesnt exist, create it e.g. parsedList(1 => list())
|
||||
if (!(num in parsedList)) //if a list of this num doesnt exist, create it e.g. parsedList(1 => list())
|
||||
parsedList[num] = new/list()
|
||||
parsedList[num][field] = val //shove data in appropriate list e.g. parsedList(1 => list("ckey" => "blah"))
|
||||
//boutput(world, "Index: [index]. Num: [num]. Field: [field]. Val: [val]") //DEBUG
|
||||
@@ -53,7 +53,7 @@
|
||||
if (centralConn)
|
||||
var/list/returnData = new()
|
||||
returnData["cminutes"] = CMinutes
|
||||
return list2json(returnData)
|
||||
return json_encode(returnData)
|
||||
else
|
||||
return CMinutes
|
||||
|
||||
@@ -130,15 +130,15 @@
|
||||
|
||||
var/localData = call(theProc)(query)
|
||||
if (!localData)
|
||||
logTheThing("debug", null, null, "<b>Local API Error</b> - Nothing returned from <b>[theProc]</b>")
|
||||
logTheThing("diary", null, null, "<b>Local API Error</b> - Nothing returned from [theProc]", "debug")
|
||||
//logTheThing("debug", null, null, "<b>Local API Error</b> - Nothing returned from <b>[theProc]</b>")
|
||||
//logTheThing("diary", null, null, "<b>Local API Error</b> - Nothing returned from [theProc]", "debug")
|
||||
return (centralConn ? data : 0)
|
||||
|
||||
if (istype(localData, /list))
|
||||
var/list/ldata = localData
|
||||
if (ldata["error"])
|
||||
logTheThing("debug", null, null, "<b>Local API Error</b> - Callback failed in <b>[theProc]</b> with message: <b>[ldata["error"]]</b>")
|
||||
logTheThing("diary", null, null, "<b>Local API Error</b> - Callback failed in [theProc] with message: [ldata["error"]]", "debug")
|
||||
//logTheThing("debug", null, null, "<b>Local API Error</b> - Callback failed in <b>[theProc]</b> with message: <b>[ldata["error"]]</b>")
|
||||
//logTheThing("diary", null, null, "<b>Local API Error</b> - Callback failed in [theProc] with message: [ldata["error"]]", "debug")
|
||||
if (ldata["showAdmins"])
|
||||
message_admins("<span style=\"color:blue\"><b>Failed for route [route]BanApiFallback</b>: [ldata["error"]]</span>")
|
||||
|
||||
|
||||
@@ -1306,6 +1306,7 @@
|
||||
active_spread[newspawn] = num_gens
|
||||
sleep(10 * num_delay)
|
||||
if(num_spread > 0) num_spread--
|
||||
LAGCHECK(75)
|
||||
|
||||
|
||||
/proc/is_free(var/atom/A)
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
returnData["cminutes"] = getWorldMins()
|
||||
returnData["callback"] = "updateBans"
|
||||
|
||||
return list2json(returnData)
|
||||
return json_encode(returnData)
|
||||
|
||||
|
||||
/proc/uploadLocalBans(F as file)
|
||||
|
||||
@@ -226,20 +226,6 @@
|
||||
|
||||
return
|
||||
|
||||
proc/splittext(txt as text, sep as text)
|
||||
var
|
||||
list/accum
|
||||
start;end
|
||||
|
||||
accum = new/list()
|
||||
start = 1
|
||||
do
|
||||
end = findtext(txt,sep,start)
|
||||
accum += copytext(txt,start,end)
|
||||
start = end + lentext(sep)
|
||||
while(end)
|
||||
return accum
|
||||
|
||||
/datum/objectinfo
|
||||
var/objecttype = null
|
||||
var/direction = 0
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
if("cd", "chdir") //Attempts to set current folder to directory arg1
|
||||
var/dir_string = null
|
||||
if(command_list.len)
|
||||
dir_string = dd_list2text(command_list, " ")
|
||||
dir_string = jointext(command_list, " ")
|
||||
else
|
||||
src.print_text("<b>Syntax:</b> \"cd \[directory string]\" String is relative to current directory.")
|
||||
return
|
||||
@@ -125,7 +125,7 @@
|
||||
if("run") //Runs /datum/computer/file/terminal_program with name arg1
|
||||
var/prog_name = null
|
||||
if(command_list.len)
|
||||
prog_name = dd_list2text(command_list, " ")
|
||||
prog_name = jointext(command_list, " ")
|
||||
else
|
||||
src.print_text("<b>Syntax:</b> \"run \[program filepath].\" Path is relative to current directory.")
|
||||
return
|
||||
@@ -140,7 +140,7 @@
|
||||
return
|
||||
|
||||
if("makedir","mkdir") //Creates folder in current directory with name arg1
|
||||
var/new_folder_name = strip_html(dd_list2text(command_list, " "))
|
||||
var/new_folder_name = strip_html(jointext(command_list, " "))
|
||||
new_folder_name = copytext(new_folder_name, 1, 16)
|
||||
|
||||
if(!new_folder_name)
|
||||
@@ -197,7 +197,7 @@
|
||||
if("title") //Set the title var of the current drive.
|
||||
var/new_name = null
|
||||
if(command_list.len)
|
||||
new_name = strip_html(dd_list2text(command_list, " "))
|
||||
new_name = strip_html(jointext(command_list, " "))
|
||||
new_name = copytext(new_name, 1, 16)
|
||||
else
|
||||
src.print_text("<b>Syntax:</b> \"title \[title name]\" Set name of active drive to given title.")
|
||||
@@ -212,7 +212,7 @@
|
||||
if("delete", "del","era","erase","rm") //Deletes file arg1
|
||||
var/file_name = null
|
||||
if(command_list.len)
|
||||
file_name = ckey(dd_list2text(command_list, " "))
|
||||
file_name = ckey(jointext(command_list, " "))
|
||||
else
|
||||
src.print_text("<b>Syntax:</b> \"del \[file name].\" File must be in current directory.")
|
||||
return
|
||||
@@ -234,7 +234,7 @@
|
||||
if("copy","cp") //Sets file arg1 to be copied
|
||||
var/file_name = null
|
||||
if(command_list.len)
|
||||
file_name = ckey(dd_list2text(command_list, " "))
|
||||
file_name = ckey(jointext(command_list, " "))
|
||||
else
|
||||
src.print_text("<b>Syntax:</b> \"copy \[file name].\" File must be in current directory.")
|
||||
return
|
||||
@@ -248,7 +248,7 @@
|
||||
src.print_text("File marked.")
|
||||
|
||||
if("paste","ps") //Pastes clipboard file with name arg1
|
||||
var/pasted_name = strip_html(dd_list2text(command_list, " "))
|
||||
var/pasted_name = strip_html(jointext(command_list, " "))
|
||||
pasted_name = copytext(pasted_name, 1, 16)
|
||||
|
||||
if(!pasted_name)
|
||||
@@ -470,7 +470,7 @@
|
||||
|
||||
|
||||
if("print") //Print text arg1 to screen.
|
||||
var/new_text = strip_html(dd_list2text(command_list, " "))
|
||||
var/new_text = strip_html(jointext(command_list, " "))
|
||||
if(new_text)
|
||||
src.print_text(new_text)
|
||||
else
|
||||
@@ -484,7 +484,7 @@
|
||||
|
||||
var/anger_text = "A clown? On a space station? what"
|
||||
if(istype(command_list) && (command_list.len > 0))
|
||||
anger_text = strip_html(dd_list2text(command_list, " "))
|
||||
anger_text = strip_html(jointext(command_list, " "))
|
||||
|
||||
src.print_text("<tt>[anger_text]<br>[goon]</tt>")
|
||||
|
||||
@@ -541,7 +541,7 @@
|
||||
if("read","type") //Display contents of text file arg1
|
||||
var/file_name = null
|
||||
if(command_list.len)
|
||||
file_name = ckey(dd_list2text(command_list, " "))
|
||||
file_name = ckey(jointext(command_list, " "))
|
||||
else
|
||||
src.print_text("<b>Syntax:</b> \"read \[file name].\" Text file must be in current directory.")
|
||||
return
|
||||
@@ -575,7 +575,7 @@
|
||||
|
||||
else
|
||||
//Load the program if they just entered a path I guess
|
||||
var/prog_name = dd_list2text(command_list, " ")
|
||||
var/prog_name = jointext(command_list, " ")
|
||||
prog_name = command + prog_name
|
||||
|
||||
var/datum/computer/file/terminal_program/to_run = src.parse_file_directory(prog_name, current_folder)
|
||||
@@ -747,7 +747,7 @@
|
||||
src.current_folder = src.holder.root
|
||||
|
||||
if(access_string && !all_access)
|
||||
var/list/decoding = dd_text2list(access_string, ";")
|
||||
var/list/decoding = splittext(access_string, ";")
|
||||
for(var/x in decoding)
|
||||
src.active_account.access += text2num(x)
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@
|
||||
string = copytext(string,2)
|
||||
//boutput(world, "string is now: [string]")
|
||||
|
||||
var/list/sort1 = dd_text2list(string,"/")
|
||||
var/list/sort1 = splittext(string,"/")
|
||||
if (sort1.len && copytext(sort1[1], 4, 5) == ":")
|
||||
. = lowertext( copytext(sort1[1], 1, 4) )
|
||||
if (length(sort1[1]) > 4)
|
||||
@@ -317,7 +317,7 @@
|
||||
string = copytext(string,2)
|
||||
//boutput(world, "string is now: [string]")
|
||||
|
||||
var/list/sort1 = dd_text2list(string,"/")
|
||||
var/list/sort1 = splittext(string,"/")
|
||||
if (sort1.len && copytext(sort1[1], 4, 5) == ":")
|
||||
. = lowertext( copytext(sort1[1], 1, 4) )
|
||||
if (length(sort1[1]) > 4)
|
||||
@@ -440,7 +440,7 @@
|
||||
if(!string)
|
||||
return 1
|
||||
|
||||
if(ckey(string) != dd_replacetext(lowertext(string), " ", null))
|
||||
if(ckey(string) != replacetext(lowertext(string), " ", null))
|
||||
return 1
|
||||
|
||||
if(findtext(string, "/"))
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
if (!src.link)
|
||||
return
|
||||
|
||||
var/list/report_content = list(title) + dd_text2list(message, "<BR>")
|
||||
var/list/report_content = list(title) + splittext(message, "<BR>")
|
||||
|
||||
for (var/listener_netid in src.terminals)
|
||||
var/datum/computer/file/record/report = new ()
|
||||
@@ -96,10 +96,10 @@
|
||||
|
||||
parse_string(string) //Parse commands the same way a c3 does, for terminal control.
|
||||
var/list/sort1 = list()
|
||||
sort1 = dd_text2list(string,";")
|
||||
sort1 = splittext(string,";")
|
||||
for(var/x in sort1)
|
||||
var/list/sorted = list()
|
||||
sorted = dd_text2list(x," ")
|
||||
sorted = splittext(x," ")
|
||||
return sorted
|
||||
|
||||
receive_signal(datum/signal/signal)
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
if("closeall")
|
||||
close_all()
|
||||
if("toggle")
|
||||
var/door_name = ckey(dd_list2text(command_list, " "))
|
||||
var/door_name = ckey(jointext(command_list, " "))
|
||||
if(!door_name)
|
||||
var/dat = "<b>Available Hangar Doors:</b><br>"
|
||||
for(var/turf/T in get_area_turfs(HANGAR_AREATYPE))
|
||||
@@ -77,7 +77,7 @@
|
||||
return
|
||||
src.print_text("Invalid Hangar Door!<BR>")
|
||||
if("resetpass")
|
||||
var/door_name = ckey(dd_list2text(command_list, " "))
|
||||
var/door_name = ckey(jointext(command_list, " "))
|
||||
if(!door_name)
|
||||
var/dat = "<b>Available Hangar Doors:</b><br>"
|
||||
for(var/turf/T in get_area_turfs(HANGAR_AREATYPE))
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
silent = 0
|
||||
|
||||
var/list/initlist = dd_text2list(initparams, " ")
|
||||
var/list/initlist = splittext(initparams, " ")
|
||||
|
||||
if (initlist.len && dd_hasprefix(initlist[1], "-"))
|
||||
var/flagString = lowertext(copytext(initlist[1], 2))
|
||||
@@ -378,10 +378,10 @@
|
||||
switch (lowertext(data["format"]))
|
||||
if ("values") //Multiple read, formatted as comma separated list.
|
||||
var/formatted = "|-----------|Sensor Values:|-----------||n"
|
||||
var/list/valueList = dd_text2list(data["data"], ",")
|
||||
var/list/valueList = splittext(data["data"], ",")
|
||||
if (valueList.len)
|
||||
for (var/x = 1, x <= valueList.len, x++)
|
||||
. = dd_replacetext(valueList[x], "-", " ")
|
||||
. = replacetext(valueList[x], "-", " ")
|
||||
formatted += "| \[[add_zero("[x]",4)]] | [.]|n"
|
||||
|
||||
else
|
||||
@@ -404,7 +404,7 @@
|
||||
|
||||
if ("info")
|
||||
var/formatted = "+---------------|Status|---------------+|n"
|
||||
var/list/rawDataList = dd_text2list(data["data"], ",")
|
||||
var/list/rawDataList = splittext(data["data"], ",")
|
||||
if (rawDataList && rawDataList.len > 3)
|
||||
formatted += "| Active: [(rawDataList[1] == "1") ? "YES" : "NO"]|n| ID: [rawDataList[2]]|n| Enactor: [(rawDataList[3] == "1") ? "YES" : "NO"]|n| Sensor: [(rawDataList[4] == "1") ? "YES" : "NO"]|n+--------|Configuration Values|--------+|n"
|
||||
|
||||
@@ -710,10 +710,10 @@
|
||||
switch (lowertext(data["format"]))
|
||||
if ("values") //Multiple read, formatted as comma separated list.
|
||||
var/formatted = ""//"|-----------|Sensor Values:|-----------||n"
|
||||
var/list/valueList = dd_text2list(data["data"], ",")
|
||||
var/list/valueList = splittext(data["data"], ",")
|
||||
if (valueList.len)
|
||||
for (var/x = 1, x <= valueList.len, x++)
|
||||
. = dd_replacetext(valueList[x], "-", " ")
|
||||
. = replacetext(valueList[x], "-", " ")
|
||||
formatted += "| \[[add_zero("[x]",4)]] | [.]|n"
|
||||
|
||||
else
|
||||
@@ -755,7 +755,7 @@
|
||||
|
||||
if ("info")
|
||||
var/formatted = ""//"+---------------|Status|---------------+|n"
|
||||
var/list/rawDataList = dd_text2list(data["data"], ",")
|
||||
var/list/rawDataList = splittext(data["data"], ",")
|
||||
if (mode == MODE_DEVICE_INFO)
|
||||
if (rawDataList && rawDataList.len > 3)
|
||||
formatted += "| Active: [(rawDataList[1] == "1") ? "YES" : "NO"]|n| ID: [rawDataList[2]]|n| Enactor: [(rawDataList[3] == "1") ? "YES" : "NO"]|n| Sensor: [(rawDataList[4] == "1") ? "YES" : "NO"]|n"
|
||||
@@ -1058,7 +1058,7 @@
|
||||
if (wipeRemainingLines)
|
||||
src.highlightMap = 0
|
||||
|
||||
for (var/entryInfo in dd_text2list(message_list["data"], "|n"))
|
||||
for (var/entryInfo in splittext(message_list["data"], "|n"))
|
||||
if (++entryOffset > src.entries.len)
|
||||
break
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
string = copytext(string,2)
|
||||
|
||||
var/list/sort1 = list()
|
||||
sort1 = dd_text2list(string,"/")
|
||||
sort1 = splittext(string,"/")
|
||||
if (sort1.len && !sort1[sort1.len])
|
||||
sort1.len--
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
string = copytext(string,2)
|
||||
|
||||
var/list/sort1 = list()
|
||||
sort1 = dd_text2list(string,"/")
|
||||
sort1 = splittext(string,"/")
|
||||
|
||||
var/file_name = sort1[sort1.len]
|
||||
if(!file_name)
|
||||
@@ -271,7 +271,7 @@
|
||||
string = copytext(string,2)
|
||||
|
||||
var/list/sort1 = list()
|
||||
sort1 = dd_text2list(string,"/")
|
||||
sort1 = splittext(string,"/")
|
||||
|
||||
var/datum_name = sort1[sort1.len]
|
||||
if(!datum_name)
|
||||
@@ -456,7 +456,7 @@
|
||||
if(!string)
|
||||
return 1
|
||||
//ckeyEx because it allows for - and _ and we love those!!
|
||||
if(lowertext(ckeyEx(string)) != dd_replacetext(lowertext(string), " ", null))
|
||||
if(lowertext(ckeyEx(string)) != replacetext(lowertext(string), " ", null))
|
||||
return 1
|
||||
|
||||
if(findtext(string, "/"))
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
//boutput(world, "[initparams]")
|
||||
|
||||
var/command = null
|
||||
var/list/initlist = dd_text2list(initparams, " ")
|
||||
var/list/initlist = splittext(initparams, " ")
|
||||
if (!initparams || !initlist.len)
|
||||
command = "index"
|
||||
else
|
||||
@@ -36,7 +36,7 @@
|
||||
var/list/mail_subjects = list_mail_subjects(user_name, group)
|
||||
var/message = "mail_index"
|
||||
if (mail_subjects.len)
|
||||
message += "|n" + dd_list2text(mail_subjects, "|n")
|
||||
message += "|n" + jointext(mail_subjects, "|n")
|
||||
message_user(message, "record")
|
||||
|
||||
if ("get")
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
else if (!refreshing)
|
||||
dat += "<a href='?src=\ref[src];screen=1'>Connection</a> | <a href='?src=\ref[src];screen=2'>Data</a>"
|
||||
|
||||
|
||||
|
||||
dat += "<hr><br>"
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
user << browse(dat,"window=net_logreader;size=545x302")
|
||||
onclose(user,"net_logreader")
|
||||
return
|
||||
|
||||
|
||||
Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
@@ -534,7 +534,7 @@ proc/accesslog_digest(var/datum/computer/file/record/R, formatted = 0)
|
||||
if (useracc)
|
||||
logfile.metadata["owner"] = read_user_field("name")
|
||||
logfile.metadata["permissions"] = COMP_ROWNER | COMP_RGROUP
|
||||
logfile.fields = loglist(opts["t"], opts["m"], opts["s"], dd_list2text(params, " "))
|
||||
logfile.fields = loglist(opts["t"], opts["m"], opts["s"], jointext(params, " "))
|
||||
var/datum/computer/folder/logs_dir = signal_program(1, list("command"=DWAINE_COMMAND_FGET, "path"=log_to))
|
||||
if (istype(logs_dir))
|
||||
var/idx = 0
|
||||
@@ -564,7 +564,7 @@ proc/accesslog_digest(var/datum/computer/file/record/R, formatted = 0)
|
||||
var/time_end = null
|
||||
if (opts["t"])
|
||||
var/time_filter = opts["t"]
|
||||
var/list/tf_list = dd_text2list(time_filter, ":")
|
||||
var/list/tf_list = splittext(time_filter, ":")
|
||||
if (tf_list.len != 2)
|
||||
message_user("Invalid timestamp filter format [time_filter], usage: TIMESTAMP_BEGIN:TIMESTAMP_END.")
|
||||
mainframe_prog_exit
|
||||
@@ -598,7 +598,7 @@ proc/accesslog_digest(var/datum/computer/file/record/R, formatted = 0)
|
||||
message_user("Listing the last [count] records:")
|
||||
var/paramsearch = null
|
||||
if (params.len)
|
||||
paramsearch = dd_list2text(params, " ")
|
||||
paramsearch = jointext(params, " ")
|
||||
var/list/records = logs_folder.contents.Copy()
|
||||
if (!records.len)
|
||||
message_user("No recorded data.")
|
||||
@@ -722,7 +722,7 @@ proc/accesslog_digest(var/datum/computer/file/record/R, formatted = 0)
|
||||
signal_program(1, siglist)
|
||||
// see what i did here? heh? HEH?
|
||||
// doubly so, it almost sounds like tar gz
|
||||
var/targs = dd_list2text(records, " ")
|
||||
var/targs = jointext(records, " ")
|
||||
archive_path = null
|
||||
siglist = list("command"=DWAINE_COMMAND_TSPAWN, "passusr"=1, "path"="/bin/tar", "args"="-cqt -- [targs]")
|
||||
signal_program(1, siglist)
|
||||
|
||||
@@ -607,7 +607,7 @@
|
||||
if(!string)
|
||||
return 1
|
||||
|
||||
if(ckey(string) != dd_replacetext(lowertext(string), " ", null))
|
||||
if(ckey(string) != replacetext(lowertext(string), " ", null))
|
||||
return 1
|
||||
|
||||
if(findtext(string, "/"))
|
||||
@@ -1594,7 +1594,7 @@
|
||||
src.post_status(target, "command","term_connect","data","noreply","device",src.device_tag)
|
||||
src.updateUsrDialog()
|
||||
spawn(5) //Sign up with the driver (if a mainframe contacted us)
|
||||
src.post_status(target,"command","term_message","data","command=register[(frequencies && frequencies.len) ? "&freqs=[dd_list2text(frequencies,",")]" : ""]")
|
||||
src.post_status(target,"command","term_message","data","command=register[(frequencies && frequencies.len) ? "&freqs=[jointext(frequencies,",")]" : ""]")
|
||||
return
|
||||
|
||||
if("term_message","term_file")
|
||||
@@ -1947,7 +1947,7 @@
|
||||
if(istype(signal.data_file, /datum/computer/file/record))
|
||||
var/datum/computer/file/record/rec = signal.data_file
|
||||
if (rec.fields)
|
||||
buffer_add = dd_list2text(rec.fields, "<br>")
|
||||
buffer_add = jointext(rec.fields, "<br>")
|
||||
else
|
||||
buffer_add = signal.data_file:data
|
||||
|
||||
|
||||
@@ -506,7 +506,7 @@
|
||||
contents_mirror += printFile
|
||||
to_print.Insert(1, printFile)
|
||||
|
||||
printFile.fields = dd_text2list(oldPrintFile.asText(), "|n")
|
||||
printFile.fields = splittext(oldPrintFile.asText(), "|n")
|
||||
oldPrintFile.dispose()
|
||||
|
||||
message_device("command=print", printFile)
|
||||
@@ -768,7 +768,7 @@
|
||||
mainframe_prog_exit
|
||||
return
|
||||
|
||||
var/list/initlist = dd_text2list(initparams, " ")
|
||||
var/list/initlist = splittext(initparams, " ")
|
||||
if (!initparams || !initlist.len)
|
||||
message_user("Invalid commmand argument.|nValid Commands:|n (Coords) to set target coordinates. Specify x y z.|n (Send) to send to target.|n (Receive) to receive from target.|n (Portal) to open bidirectional portal to target.|n (Scan) to scan target atmosphere.","multiline")
|
||||
mainframe_prog_exit
|
||||
@@ -1026,7 +1026,7 @@
|
||||
if (!istype(usdat) || !usdat.fields["registered"] || !usdat.fields["assignment"])
|
||||
return ESIG_GENERIC
|
||||
|
||||
var/list/accessList = dd_text2list(usdat.fields["access"], ";")
|
||||
var/list/accessList = splittext(usdat.fields["access"], ";")
|
||||
if (!("[setup_auth_access]" in accessList))
|
||||
return ESIG_NOUSR
|
||||
|
||||
@@ -1050,7 +1050,7 @@
|
||||
if (!istype(usdat))
|
||||
return ESIG_NOUSR
|
||||
|
||||
var/list/accessList = dd_text2list(usdat.fields["access"], ";")
|
||||
var/list/accessList = splittext(usdat.fields["access"], ";")
|
||||
if (!("[setup_auth_access]" in accessList))
|
||||
return ESIG_NOUSR
|
||||
|
||||
@@ -1175,7 +1175,7 @@
|
||||
mainframe_prog_exit
|
||||
return
|
||||
|
||||
var/list/initlist = dd_text2list(initparams, " ")
|
||||
var/list/initlist = splittext(initparams, " ")
|
||||
if (!initparams || !initlist.len)
|
||||
message_user("Invalid commmand argument.|nValid Commands:|n (Status) for detonator status.|n (Auth) to authorize detonation.|n (Deauth) to revoke authorizations.|n (Time) to set charge timer.|n (Activate) to activate detonation sequence|n (Abort) to halt activation sequence.","multiline")
|
||||
mainframe_prog_exit
|
||||
@@ -1579,7 +1579,7 @@
|
||||
mainframe_prog_exit
|
||||
return
|
||||
|
||||
var/list/initlist = dd_text2list(initparams, " ")
|
||||
var/list/initlist = splittext(initparams, " ")
|
||||
if (!initparams || !initlist.len)
|
||||
message_user("Invalid commmand argument.|nValid Arguments:|n \"list\" to list known docking stations.|n \"stat (PR-6 Net ID)\" to view unit status. |n \"upload (PR-6 Net ID) (task filepath) \[configuration filepath]\" to upload task.|n \"wake (PR-6 Net ID)\" to wake unit.|n \"wipe (PR-6 Net ID)\" to clear unit memory.|n \"recall (PR-6 Net ID | \'all\')\" to recall unit.","multiline")
|
||||
mainframe_prog_exit
|
||||
@@ -1689,7 +1689,7 @@
|
||||
. += initlist[i]
|
||||
|
||||
if (.)
|
||||
commandRec.fields += dd_text2list(., ";")
|
||||
commandRec.fields += splittext(., ";")
|
||||
|
||||
|
||||
//Now give the driver the actual command record.
|
||||
@@ -1865,7 +1865,7 @@
|
||||
if (cmptext(dataList["command"],"register") && !initial_reqistry_complete)
|
||||
initial_reqistry_complete = 1
|
||||
|
||||
var/list/newFreqs = dd_text2list(dataList["freqs"], ",")
|
||||
var/list/newFreqs = splittext(dataList["freqs"], ",")
|
||||
for (var/newFreq in newFreqs)
|
||||
var/datum/computer/folder/folder = new
|
||||
folder.name = newFreq
|
||||
@@ -1930,7 +1930,7 @@
|
||||
if (istext(freq))
|
||||
var/datum/computer/file/record/R = theFile
|
||||
if (R.fields.len)
|
||||
message_device("_freq=[freq]&[dd_list2text(R.fields, ";")]")
|
||||
message_device("_freq=[freq]&[jointext(R.fields, ";")]")
|
||||
|
||||
//qdel(file)
|
||||
theFile.dispose()
|
||||
@@ -2233,7 +2233,7 @@
|
||||
mainframe_prog_exit
|
||||
return
|
||||
|
||||
var/list/initlist = dd_text2list(initparams, " ")
|
||||
var/list/initlist = splittext(initparams, " ")
|
||||
if (!initparams || !initlist.len)
|
||||
message_user("Invalid commmand argument.|nValid Commands:|n (Status) for emitter status.|n (Activate) to activate emitter|n (Deactivate) to shut down emitter.","multiline")
|
||||
mainframe_prog_exit
|
||||
@@ -2608,7 +2608,7 @@
|
||||
knownReadingFields.len = 0
|
||||
else
|
||||
knownReadingFields = list()
|
||||
var/list/deviceFields = dd_text2list(datalist["readinglist"], ",")
|
||||
var/list/deviceFields = splittext(datalist["readinglist"], ",")
|
||||
var/unit_offset = 0
|
||||
for (var/reading_entry in deviceFields)
|
||||
if (!reading_entry)
|
||||
@@ -2624,7 +2624,7 @@
|
||||
knownReadingFields[reading_entry] = .
|
||||
|
||||
if (datalist["valuelist"])
|
||||
knownValues = dd_text2list(datalist["valuelist"], ",")
|
||||
knownValues = splittext(datalist["valuelist"], ",")
|
||||
|
||||
|
||||
var/waitID = sessions["[sessionID]"]
|
||||
@@ -2640,7 +2640,7 @@
|
||||
return
|
||||
|
||||
if ("read")
|
||||
var/list/readData = dd_text2list(datalist["data"], ",")
|
||||
var/list/readData = splittext(datalist["data"], ",")
|
||||
var/sessionID = datalist["session"]
|
||||
if (!sessionID || !(sessionID in sessions))
|
||||
return
|
||||
@@ -2791,7 +2791,7 @@
|
||||
|
||||
if (data["command"] == DWAINE_COMMAND_MSG_TERM)
|
||||
if (findtext(data["render"],"record"))
|
||||
var/list/dataList = dd_text2list(data["data"],"|n")
|
||||
var/list/dataList = splittext(data["data"],"|n")
|
||||
var/dataMessage = ""
|
||||
var/datum/computer/file/record/messageRec = null
|
||||
if (dataList.len)
|
||||
@@ -2822,7 +2822,7 @@
|
||||
return
|
||||
|
||||
var/command = null
|
||||
var/list/initlist = dd_text2list(initparams, " ")
|
||||
var/list/initlist = splittext(initparams, " ")
|
||||
if (!initparams || !initlist.len)
|
||||
command = "index"
|
||||
else
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
anger_text = pipetemp
|
||||
|
||||
if(istype(command_list) && (command_list.len > 0))
|
||||
anger_text += dd_list2text(command_list, " ")
|
||||
anger_text += jointext(command_list, " ")
|
||||
|
||||
if (piping && piped_list.len && (ckey(piped_list[1]) != "break") )
|
||||
pipetemp = anger_text
|
||||
@@ -208,7 +208,7 @@
|
||||
echo_text = pipetemp
|
||||
|
||||
if(istype(command_list) && (command_list.len > 0))
|
||||
echo_text += dd_list2text(command_list, " ")
|
||||
echo_text += jointext(command_list, " ")
|
||||
|
||||
if (piping && piped_list.len && (ckey(piped_list[1]) != "break") )
|
||||
pipetemp = echo_text
|
||||
@@ -286,7 +286,7 @@
|
||||
if (pipetemp)
|
||||
|
||||
if(istype(command_list))
|
||||
command_list += dd_text2list(pipetemp, " ")
|
||||
command_list += splittext(pipetemp, " ")
|
||||
|
||||
if (command_list.len < 2)
|
||||
message_user("Error: Insufficient arguments for Talk (Requires Target ID and Message).")
|
||||
@@ -295,7 +295,7 @@
|
||||
var/targetUser = lowertext(command_list[1])
|
||||
command_list.Cut(1,2)
|
||||
|
||||
switch (signal_program(1, list("command"=DWAINE_COMMAND_UMSG, "term"=targetUser, data=dd_list2text(command_list, " "))))
|
||||
switch (signal_program(1, list("command"=DWAINE_COMMAND_UMSG, "term"=targetUser, data=jointext(command_list, " "))))
|
||||
if (ESIG_SUCCESS)
|
||||
continue
|
||||
if (ESIG_NOTARGET)
|
||||
@@ -408,7 +408,7 @@
|
||||
if (!prefixroot)
|
||||
command = "[current]" + ((dd_hassuffix(current, "/") || current == "/") ? null : "/") + command
|
||||
|
||||
var/list/templist = dd_text2list(command, "/")
|
||||
var/list/templist = splittext(command, "/")
|
||||
if (!templist.len)
|
||||
message_user("Syntax error.")
|
||||
break
|
||||
@@ -418,7 +418,7 @@
|
||||
while (dd_hasprefix(recname, " "))
|
||||
recname = copytext(recname, 2)
|
||||
templist.len--
|
||||
command = dd_list2text(templist, "/")
|
||||
command = jointext(templist, "/")
|
||||
if (!recname)
|
||||
recname = "out"
|
||||
|
||||
@@ -427,7 +427,7 @@
|
||||
|
||||
//boutput(world, "here is the path: \"[command]\" and the name \"[recname]\"")
|
||||
var/datum/computer/file/record/rec = new /datum/computer/file/record( )
|
||||
rec.fields = dd_text2list(pipetemp, "|n")
|
||||
rec.fields = splittext(pipetemp, "|n")
|
||||
rec.name = recname
|
||||
rec.metadata["owner"] = read_user_field("name")
|
||||
rec.metadata["permission"] = COMP_ALLACC
|
||||
@@ -455,7 +455,7 @@
|
||||
if (istype(exec, /datum/computer/file/mainframe_program))
|
||||
var/list/siglist = list("command"=DWAINE_COMMAND_TSPAWN, "passusr"=1, "path"=fpath)//"[current][command]")
|
||||
if (command_list.len)
|
||||
siglist["args"] = strip_html(dd_list2text(command_list, " ")) + (pipetemp ? " [pipetemp]" : null)
|
||||
siglist["args"] = strip_html(jointext(command_list, " ")) + (pipetemp ? " [pipetemp]" : null)
|
||||
else if (pipetemp)
|
||||
siglist["args"] = pipetemp
|
||||
|
||||
@@ -548,7 +548,7 @@
|
||||
scriptlist.Cut(i, i+1)
|
||||
i--
|
||||
continue
|
||||
scriptlist[i] = dd_replacetext(scriptlist[i], "|", "^")
|
||||
scriptlist[i] = replacetext(scriptlist[i], "|", "^")
|
||||
|
||||
return scriptlist
|
||||
|
||||
@@ -639,7 +639,7 @@
|
||||
stack[--stack.len] = script_clampvalue( result )
|
||||
|
||||
else if (istext(stack[stack.len]) && istext(stack[stack.len-1]))
|
||||
var/list/explodedString = dd_text2list("[stack[stack.len-1]]", "[stack[stack.len]]")
|
||||
var/list/explodedString = splittext("[stack[stack.len-1]]", "[stack[stack.len]]")
|
||||
if (explodedString.len + stack.len > MAX_STACK_DEPTH)
|
||||
return ERR_STACK_OVER
|
||||
|
||||
@@ -949,7 +949,7 @@
|
||||
if (dd_hassuffix(msg, "|n"))
|
||||
msg = copytext(msg, 1, -2)
|
||||
|
||||
previous_pipeout += dd_replacetext(msg, "|n", " ")
|
||||
previous_pipeout += replacetext(msg, "|n", " ")
|
||||
|
||||
return ESIG_SUCCESS
|
||||
|
||||
|
||||
@@ -928,7 +928,7 @@ var/telesci_modifiers_set = 0
|
||||
if("term_message","term_file")
|
||||
var/message = signal.data["data"]
|
||||
if (message)
|
||||
message = dd_replacetext(message, "|n", "<br>")
|
||||
message = replacetext(message, "|n", "<br>")
|
||||
|
||||
src.readout = copytext(message,9,256)
|
||||
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
var/descriptive = 0
|
||||
|
||||
if (initparams)
|
||||
var/list/initlist = dd_text2list(initparams, " ")
|
||||
var/list/initlist = splittext(initparams, " ")
|
||||
if (initlist.len && initlist[1] == "-l")
|
||||
initparams = dd_list2text(initlist - initlist[1])
|
||||
initparams = jointext(initlist - initlist[1], "")
|
||||
descriptive = 1
|
||||
|
||||
var/current = read_user_field("curpath")
|
||||
@@ -138,7 +138,7 @@
|
||||
return
|
||||
|
||||
proc/trim_path(var/filepath)
|
||||
var/list/filelist = dd_text2list(filepath, "/")
|
||||
var/list/filelist = splittext(filepath, "/")
|
||||
var/list/newfilelist = list()
|
||||
for (var/x = 1, x <= filelist.len, x++)
|
||||
switch(filelist[x])
|
||||
@@ -153,7 +153,7 @@
|
||||
if (!newfilelist.len)
|
||||
newfilelist += "/"
|
||||
|
||||
return dd_list2text(newfilelist, "/")
|
||||
return jointext(newfilelist, "/")
|
||||
|
||||
//Delete files/directories
|
||||
/datum/computer/file/mainframe_program/utility/rm
|
||||
@@ -174,12 +174,12 @@
|
||||
|
||||
if (initparams)
|
||||
|
||||
var/list/initlist = dd_text2list(initparams, " ")
|
||||
var/list/initlist = splittext(initparams, " ")
|
||||
if (initlist.len)
|
||||
var/argstring = initlist[1]
|
||||
if (dd_hasprefix(argstring, "-"))
|
||||
initlist -= initlist[1]
|
||||
initparams = dd_list2text(initlist, " ")
|
||||
initparams = jointext(initlist, " ")
|
||||
|
||||
var/x = 2
|
||||
while (x <= length(argstring))
|
||||
@@ -267,7 +267,7 @@
|
||||
mainframe_prog_exit
|
||||
return
|
||||
|
||||
var/list/initlist = dd_text2list(initparams, " ")
|
||||
var/list/initlist = splittext(initparams, " ")
|
||||
if (!initparams || initlist.len < 2)
|
||||
message_user("Error: Filepaths of target and destination must be specified.")
|
||||
mainframe_prog_exit
|
||||
@@ -297,7 +297,7 @@
|
||||
return
|
||||
|
||||
var/prefixroot = dd_hasprefix(initlist[2], "/")
|
||||
var/list/copypath = dd_text2list(initlist[2], "/")
|
||||
var/list/copypath = splittext(initlist[2], "/")
|
||||
var/copyname = null
|
||||
if (adjust_name)
|
||||
copypath += adjust_name
|
||||
@@ -306,7 +306,7 @@
|
||||
copypath.len--
|
||||
|
||||
if (copypath.len)
|
||||
initlist[2] = dd_list2text(copypath, "/")
|
||||
initlist[2] = jointext(copypath, "/")
|
||||
if (prefixroot && !dd_hasprefix(initlist[2], "/"))
|
||||
initlist[2] = "/" + initlist[2]
|
||||
else
|
||||
@@ -334,7 +334,7 @@
|
||||
mainframe_prog_exit
|
||||
return
|
||||
|
||||
var/list/initlist = dd_text2list(initparams, " ")
|
||||
var/list/initlist = splittext(initparams, " ")
|
||||
if (!initparams || initlist.len < 2)
|
||||
message_user("Error: Filepaths of target and new location must be specified.")
|
||||
mainframe_prog_exit
|
||||
@@ -364,7 +364,7 @@
|
||||
return
|
||||
|
||||
var/prefixroot = dd_hasprefix(initlist[2], "/")
|
||||
var/list/copypath = dd_text2list(initlist[2], "/")
|
||||
var/list/copypath = splittext(initlist[2], "/")
|
||||
var/copyname = null
|
||||
if (adjust_name)
|
||||
copypath += adjust_name
|
||||
@@ -373,7 +373,7 @@
|
||||
copypath.len--
|
||||
|
||||
if (copypath.len)
|
||||
initlist[2] = dd_list2text(copypath, "/")
|
||||
initlist[2] = jointext(copypath, "/")
|
||||
if (prefixroot && !dd_hasprefix(initlist[2], "/"))
|
||||
initlist[2] = "/" + initlist[2]
|
||||
else
|
||||
@@ -403,7 +403,7 @@
|
||||
mainframe_prog_exit
|
||||
return
|
||||
|
||||
var/list/initlist = dd_text2list(initparams, " ")
|
||||
var/list/initlist = splittext(initparams, " ")
|
||||
if (!initlist.len || !initparams)
|
||||
message_user("Error: No filepath(s) specified.")
|
||||
mainframe_prog_exit
|
||||
@@ -460,7 +460,7 @@
|
||||
mainframe_prog_exit
|
||||
return
|
||||
|
||||
var/list/initlist = dd_text2list(initparams, " ")
|
||||
var/list/initlist = splittext(initparams, " ")
|
||||
if (!initparams || initlist.len < 2)
|
||||
message_user("Error: Must specify target and link paths.")
|
||||
mainframe_prog_exit
|
||||
@@ -486,14 +486,14 @@
|
||||
return
|
||||
|
||||
var/prefixroot = dd_hasprefix(initlist[2], "/")
|
||||
var/list/linkpath = dd_text2list(initlist[2], "/")
|
||||
var/list/linkpath = splittext(initlist[2], "/")
|
||||
var/linkname = null
|
||||
if (linkpath.len)
|
||||
linkname = copytext(linkpath[linkpath.len], 1, 16)
|
||||
linkpath.len--
|
||||
|
||||
if (linkpath.len)
|
||||
initlist[2] = dd_list2text(linkpath, "/")
|
||||
initlist[2] = jointext(linkpath, "/")
|
||||
if (prefixroot && !dd_hasprefix(initlist[2], "/"))
|
||||
initlist[2] = "/" + initlist[2]
|
||||
else
|
||||
@@ -521,7 +521,7 @@
|
||||
mainframe_prog_exit
|
||||
return
|
||||
|
||||
var/list/initlist = dd_text2list(initparams, " ")
|
||||
var/list/initlist = splittext(initparams, " ")
|
||||
if (!initlist.len || !initparams)
|
||||
message_user("Error: No filepath(s) specified.")
|
||||
mainframe_prog_exit
|
||||
@@ -542,14 +542,14 @@
|
||||
if (!prefixroot)
|
||||
initlist[1] = "[current]" + (current == "/" ? null : "/") + initlist[1]
|
||||
|
||||
var/list/dirpath = dd_text2list(initlist[1], "/")
|
||||
var/list/dirpath = splittext(initlist[1], "/")
|
||||
var/dirname = null
|
||||
if (dirpath.len)
|
||||
dirname = copytext(dirpath[dirpath.len], 1, 16)
|
||||
dirpath.len--
|
||||
|
||||
if (dirpath.len)
|
||||
initlist[1] = dd_list2text(dirpath, "/")
|
||||
initlist[1] = jointext(dirpath, "/")
|
||||
if (prefixroot && !dd_hasprefix(initlist[1], "/"))
|
||||
initlist[1] = "/" + initlist[1]
|
||||
|
||||
@@ -580,7 +580,7 @@
|
||||
mainframe_prog_exit
|
||||
return
|
||||
|
||||
var/list/initlist = dd_text2list(initparams, " ")
|
||||
var/list/initlist = splittext(initparams, " ")
|
||||
if (!initparams || initlist.len < 2)
|
||||
message_user("Error: Must specify permission value and target path.")
|
||||
mainframe_prog_exit
|
||||
@@ -663,7 +663,7 @@
|
||||
mainframe_prog_exit
|
||||
return
|
||||
|
||||
var/list/initlist = dd_text2list(initparams, " ")
|
||||
var/list/initlist = splittext(initparams, " ")
|
||||
if (!initparams || initlist.len < 2)
|
||||
message_user("Error: Must specify owner/group value(s) and target path.")
|
||||
mainframe_prog_exit
|
||||
@@ -672,7 +672,7 @@
|
||||
var/newowner = null
|
||||
var/newgroup = null
|
||||
|
||||
var/list/newlist = dd_text2list(initlist[1], ":") //New owner/group values should given in form owner:group
|
||||
var/list/newlist = splittext(initlist[1], ":") //New owner/group values should given in form owner:group
|
||||
if (!newlist.len || newlist.len > 2)
|
||||
message_user("Error: Input values should be of form \[owner]:\[group]")
|
||||
mainframe_prog_exit
|
||||
@@ -726,7 +726,7 @@
|
||||
if (!usdat.fields["registered"] || !usdat.fields["assignment"])
|
||||
return ESIG_GENERIC
|
||||
|
||||
var/list/accessList = dd_text2list(usdat.fields["access"] + ";", ";")
|
||||
var/list/accessList = splittext(usdat.fields["access"] + ";", ";")
|
||||
if ("[access_dwaine_superuser]" in accessList)
|
||||
if(signal_program(1, list("command"=DWAINE_COMMAND_UGROUP, "group"=0)) == ESIG_SUCCESS)
|
||||
message_user("You are now authorized.")
|
||||
@@ -758,7 +758,7 @@
|
||||
mainframe_prog_exit
|
||||
return
|
||||
|
||||
var/list/initlist = dd_text2list(initparams, " ")
|
||||
var/list/initlist = splittext(initparams, " ")
|
||||
if (!initparams || initlist.len < 2)
|
||||
message_user("Error: Must specify device file and mount point names.")
|
||||
mainframe_prog_exit
|
||||
@@ -792,7 +792,7 @@
|
||||
mainframe_prog_exit
|
||||
return
|
||||
|
||||
var/list/initlist = dd_text2list(initparams, " ")
|
||||
var/list/initlist = splittext(initparams, " ")
|
||||
if (initlist.len > 1)
|
||||
var/case_sensitive = 1
|
||||
var/print_only_match = 0
|
||||
@@ -880,7 +880,7 @@
|
||||
return
|
||||
|
||||
if(initparams)
|
||||
var/list/initlist = dd_text2list(initparams," ")
|
||||
var/list/initlist = splittext(initparams," ")
|
||||
if (initlist.len)
|
||||
for (var/x in initlist)
|
||||
x = ckey(x)
|
||||
@@ -1144,13 +1144,13 @@
|
||||
else
|
||||
var/format = opts["t"]
|
||||
var/t = ticker.round_elapsed_ticks % 10
|
||||
format = dd_replacetext(format, "%t", "[t]")
|
||||
format = replacetext(format, "%t", "[t]")
|
||||
var/s = round(ticker.round_elapsed_ticks / 10) % 60
|
||||
format = dd_replacetext(format, "%s", "[s]")
|
||||
format = replacetext(format, "%s", "[s]")
|
||||
var/m = round(ticker.round_elapsed_ticks / 600) % 60
|
||||
format = dd_replacetext(format, "%m", "[m]")
|
||||
format = replacetext(format, "%m", "[m]")
|
||||
var/h = round(ticker.round_elapsed_ticks / 36000)
|
||||
format = dd_replacetext(format, "%h", "[h]")
|
||||
format = replacetext(format, "%h", "[h]")
|
||||
message_reply_and_user(format)
|
||||
mainframe_prog_exit
|
||||
return
|
||||
@@ -1377,12 +1377,12 @@
|
||||
mainframe_prog_exit
|
||||
return
|
||||
archive.add_file(C2)
|
||||
var/list/arcparts = dd_text2list(arcfile, "/")
|
||||
var/list/arcparts = splittext(arcfile, "/")
|
||||
archive.name = arcparts[arcparts.len]
|
||||
arcparts.Cut(arcparts.len, 0)
|
||||
var/arcbase = "/"
|
||||
if (arcparts.len)
|
||||
arcbase = "[dd_list2text(arcparts, "/")]"
|
||||
arcbase = "[jointext(arcparts, "/")]"
|
||||
if (chs(arcbase, 1) != "/")
|
||||
arcbase = "/[arcbase]"
|
||||
var/outcome = signal_program(1, list("command"=DWAINE_COMMAND_FWRITE, "path"=arcbase, "mkdir"=1, "replace" = 1), archive)
|
||||
|
||||
@@ -1025,7 +1025,7 @@
|
||||
var/datum/signal/newsignal = get_free_signal()
|
||||
newsignal.data["registered"] = src.authid.registered
|
||||
newsignal.data["assignment"] = src.authid.assignment
|
||||
newsignal.data["access"] = dd_list2text(src.authid.access, ";")
|
||||
newsignal.data["access"] = jointext(src.authid.access, ";")
|
||||
newsignal.data["balance"] = src.authid.money
|
||||
|
||||
spawn(4)
|
||||
|
||||
@@ -539,7 +539,7 @@
|
||||
if(!data || !data["command"])
|
||||
return
|
||||
|
||||
var/list/commandList = dd_text2list(data["command"], "|n")
|
||||
var/list/commandList = splittext(data["command"], "|n")
|
||||
if (!commandList || !commandList.len)
|
||||
return
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
src.print_text("\[[x]] [part]")
|
||||
|
||||
if("save")
|
||||
var/new_name = strip_html(dd_list2text(command_list, " "))
|
||||
var/new_name = strip_html(jointext(command_list, " "))
|
||||
new_name = copytext(new_name, 1, 16)
|
||||
|
||||
if(!new_name)
|
||||
@@ -590,7 +590,7 @@ file_save - Save file to local disk."}
|
||||
if ("file_load")
|
||||
var/toLoadName = "temp"
|
||||
if (command_list.len)
|
||||
toLoadName = dd_list2text(command_list, "")
|
||||
toLoadName = jointext(command_list, "")
|
||||
|
||||
var/datum/computer/file/loadedFile = parse_file_directory(toLoadName,src.holding_folder)
|
||||
|
||||
@@ -609,7 +609,7 @@ file_save - Save file to local disk."}
|
||||
|
||||
var/toSaveName = "temp"
|
||||
if (command_list.len)
|
||||
toSaveName = dd_list2text(command_list, "")
|
||||
toSaveName = jointext(command_list, "")
|
||||
|
||||
var/datum/computer/file/record/saved = get_file_name(toSaveName, src.holding_folder)
|
||||
if(saved || get_folder_name(toSaveName, src.holding_folder))
|
||||
@@ -644,7 +644,7 @@ file_save - Save file to local disk."}
|
||||
|
||||
var/sendText = "login"
|
||||
if (command_list.len)
|
||||
sendText = dd_list2text(command_list, " ")
|
||||
sendText = jointext(command_list, " ")
|
||||
|
||||
src.send_term_message(sendText, 1)
|
||||
src.print_text("File sent.")
|
||||
@@ -771,11 +771,11 @@ file_save - Save file to local disk."}
|
||||
src.master.temp = null
|
||||
|
||||
if("multiline") //Oh, they want multiple lines of stuff.
|
||||
new_message = dd_replacetext(new_message, "|n", "<br>]")
|
||||
new_message = replacetext(new_message, "|n", "<br>]")
|
||||
|
||||
if ("multiline|clear","clear|multiline") //Both of the above!
|
||||
src.master.temp = null
|
||||
new_message = dd_replacetext(new_message, "|n", "<br>]")
|
||||
new_message = replacetext(new_message, "|n", "<br>]")
|
||||
|
||||
src.print_text("][new_message]")
|
||||
return
|
||||
@@ -905,7 +905,7 @@ file_save - Save file to local disk."}
|
||||
command_list -= command_list[1]
|
||||
key = copytext(lowertext(strip_html(key)), 1, 128)
|
||||
|
||||
data = dd_list2text(command_list, " ")
|
||||
data = jointext(command_list, " ")
|
||||
data = copytext(strip_html(data), 1, 256)
|
||||
|
||||
if(!ckey(key) || ckey(!data))
|
||||
@@ -970,7 +970,7 @@ file_save - Save file to local disk."}
|
||||
return
|
||||
|
||||
if ("save")
|
||||
var/new_name = strip_html(dd_list2text(command_list, " "))
|
||||
var/new_name = strip_html(jointext(command_list, " "))
|
||||
new_name = copytext(new_name, 1, 16)
|
||||
|
||||
if(!new_name)
|
||||
@@ -1001,7 +1001,7 @@ file_save - Save file to local disk."}
|
||||
src.print_text("Record \"[new_name]\" saved.")
|
||||
|
||||
if ("load")
|
||||
var/file_name = ckey(dd_list2text(command_list, " "))
|
||||
var/file_name = ckey(jointext(command_list, " "))
|
||||
|
||||
if(!file_name)
|
||||
src.print_text("Syntax: \"LOAD \[file name]\"")
|
||||
@@ -1023,7 +1023,7 @@ file_save - Save file to local disk."}
|
||||
src.print_text("Signal cleared.")
|
||||
|
||||
if ("file")
|
||||
var/file_name = ckey(dd_list2text(command_list, " "))
|
||||
var/file_name = ckey(jointext(command_list, " "))
|
||||
|
||||
if(!file_name)
|
||||
src.attached_file = null
|
||||
@@ -1093,7 +1093,7 @@ file_save - Save file to local disk."}
|
||||
command_list -= command_list[1]
|
||||
title = copytext(lowertext(strip_html(title)), 1, 16)
|
||||
|
||||
data = dd_list2text(command_list, " ")
|
||||
data = jointext(command_list, " ")
|
||||
data = copytext(strip_html(data), 1, 255)
|
||||
|
||||
if(!ckey(title) || ckey(!data))
|
||||
@@ -1128,7 +1128,7 @@ file_save - Save file to local disk."}
|
||||
src.print_half_text("Line \[[selected_line]] cleared.")
|
||||
|
||||
if("load")
|
||||
var/file_name = ckey(dd_list2text(command_list, " "))
|
||||
var/file_name = ckey(jointext(command_list, " "))
|
||||
|
||||
if(!file_name)
|
||||
src.print_half_text("Syntax: \"load \[file name]\"")
|
||||
@@ -1148,7 +1148,7 @@ file_save - Save file to local disk."}
|
||||
src.print_half_text("Load complete.")
|
||||
|
||||
if("save")
|
||||
var/new_name = strip_html(dd_list2text(command_list, " "))
|
||||
var/new_name = strip_html(jointext(command_list, " "))
|
||||
new_name = copytext(new_name, 1, 16)
|
||||
|
||||
if(!new_name)
|
||||
@@ -1186,7 +1186,7 @@ file_save - Save file to local disk."}
|
||||
src.print_half_text("Signal \"[new_name]\" saved.")
|
||||
|
||||
if("recsave")
|
||||
var/new_name = strip_html(dd_list2text(command_list, " "))
|
||||
var/new_name = strip_html(jointext(command_list, " "))
|
||||
new_name = copytext(new_name, 1, 16)
|
||||
|
||||
if(!new_name)
|
||||
@@ -1217,7 +1217,7 @@ file_save - Save file to local disk."}
|
||||
src.print_half_text("Record \"[new_name]\" saved.")
|
||||
|
||||
if("file")
|
||||
var/inc_path = dd_list2text(command_list, " ")
|
||||
var/inc_path = jointext(command_list, " ")
|
||||
if(!ckey(inc_path))
|
||||
src.print_half_text("Syntax: \"file \[filepath]\"")
|
||||
src.print_half_text("Path of file to include in signal.")
|
||||
|
||||
@@ -239,7 +239,7 @@ file_save - Save file to local disk."}
|
||||
|
||||
var/sendText = "login"
|
||||
if (command_list.len)
|
||||
sendText = dd_list2text(command_list, " ")
|
||||
sendText = jointext(command_list, " ")
|
||||
|
||||
src.send_term_message(sendText, 1)
|
||||
src.print_text("File sent.")
|
||||
@@ -256,7 +256,7 @@ file_save - Save file to local disk."}
|
||||
if("file_load")
|
||||
var/toLoadName = "temp"
|
||||
if (command_list.len)
|
||||
toLoadName = dd_list2text(command_list, "")
|
||||
toLoadName = jointext(command_list, "")
|
||||
|
||||
var/datum/computer/file/loadedFile = null
|
||||
for (var/obj/item/disk/data/drive in src.master.contents)
|
||||
@@ -289,7 +289,7 @@ file_save - Save file to local disk."}
|
||||
|
||||
var/toSaveName = "temp"
|
||||
if (command_list.len)
|
||||
toSaveName = dd_list2text(command_list, "")
|
||||
toSaveName = jointext(command_list, "")
|
||||
|
||||
for (var/obj/item/disk/data/drive in src.master.contents)
|
||||
if (drive == src.holder || !drive.root)
|
||||
@@ -528,11 +528,11 @@ file_save - Save file to local disk."}
|
||||
src.master.temp = null
|
||||
|
||||
if("multiline") //Oh, they want multiple lines of stuff.
|
||||
new_message = dd_replacetext(new_message, "|n", "<br>]")
|
||||
new_message = replacetext(new_message, "|n", "<br>]")
|
||||
|
||||
if ("multiline|clear","clear|multiline") //Both of the above!
|
||||
src.master.temp = null
|
||||
new_message = dd_replacetext(new_message, "|n", "<br>]")
|
||||
new_message = replacetext(new_message, "|n", "<br>]")
|
||||
|
||||
src.print_text("][new_message]")
|
||||
return
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
src.working_line = 0
|
||||
|
||||
if ("!load","!l")
|
||||
var/file_name = ckey(dd_list2text(command_list, " "))
|
||||
var/file_name = ckey(jointext(command_list, " "))
|
||||
|
||||
if (!file_name)
|
||||
src.print_text("Syntax: \"!load \[file name]\"")
|
||||
@@ -172,14 +172,14 @@
|
||||
|
||||
if (istype(to_load, /datum/computer/file/text))
|
||||
var/datum/computer/file/text/loadText = to_load
|
||||
src.notelist = dd_text2list(loadText.data, "<br>")
|
||||
src.notelist = splittext(loadText.data, "<br>")
|
||||
else
|
||||
src.notelist = to_load.fields.Copy()
|
||||
|
||||
src.print_text("Load successful.")
|
||||
|
||||
if ("!save", "!s")
|
||||
var/new_name = strip_html(dd_list2text(command_list, " "))
|
||||
var/new_name = strip_html(jointext(command_list, " "))
|
||||
new_name = copytext(new_name, 1, 16)
|
||||
|
||||
if(!new_name)
|
||||
@@ -213,7 +213,7 @@
|
||||
src.print_text(get_help_text())
|
||||
|
||||
if ("!print", "!p")
|
||||
var/print_name = strip_html(dd_list2text(command_list, " "))
|
||||
var/print_name = strip_html(jointext(command_list, " "))
|
||||
print_name = copytext(print_name, 1, 16)
|
||||
|
||||
var/networked = (src.connected && src.selected_printer)
|
||||
@@ -334,7 +334,7 @@
|
||||
if(!data || !data["command"])
|
||||
return
|
||||
|
||||
var/list/commandList = dd_text2list(data["command"], "|n")
|
||||
var/list/commandList = splittext(data["command"], "|n")
|
||||
if (!commandList || !commandList.len)
|
||||
return
|
||||
|
||||
@@ -468,7 +468,7 @@
|
||||
return 1
|
||||
|
||||
var/datum/signal/signal = get_free_signal()
|
||||
signal.data["data"] = dd_list2text(src.notelist, "<br>")
|
||||
signal.data["data"] = jointext(src.notelist, "<br>")
|
||||
signal.data["title"] = print_title
|
||||
src.peripheral_command("print",signal, "\ref[printcard]")
|
||||
return 0
|
||||
|
||||
@@ -367,7 +367,7 @@ var/compx_gridx_max = 5
|
||||
set name = ".compcommand"
|
||||
|
||||
//boutput(world, "compx command: \"[commandstring]\"")
|
||||
var/list/commands = dd_text2list(commandstring,"%")
|
||||
var/list/commands = splittext(commandstring,"%")
|
||||
if(commands.len < 2)
|
||||
return
|
||||
var/command = commands[2]
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
|
||||
var/datum/compx_window/grid/window = src.temp
|
||||
//If everything works out here, coords[1] should be x and coords[2] should be y of the new grid location.
|
||||
var/list/coords = dd_text2list(href_list["drag"], ",")
|
||||
var/list/coords = splittext(href_list["drag"], ",")
|
||||
if(coords.len != 2)
|
||||
return
|
||||
|
||||
|
||||
@@ -660,7 +660,7 @@
|
||||
var/datum/computer/file/record/newrec = new
|
||||
newrec.fields["registered"] = src.authid.registered
|
||||
newrec.fields["assignment"] = src.authid.assignment
|
||||
newrec.fields["access"] = dd_list2text(src.authid.access, ";")
|
||||
newrec.fields["access"] = jointext(src.authid.access, ";")
|
||||
newrec.fields["balance"] = src.authid.money
|
||||
|
||||
spawn(4)
|
||||
|
||||
@@ -692,7 +692,7 @@
|
||||
var/scramblemode = rand(1,10)
|
||||
switch(scramblemode)
|
||||
if (5)
|
||||
var/list/stutterList = dd_text2list(message, " ")
|
||||
var/list/stutterList = splittext(message, " ")
|
||||
if (stutterList.len > 1)
|
||||
var/stutterPoint = rand( round(stutterList.len/2), stutterList.len )
|
||||
stutterList.len = stutterPoint
|
||||
@@ -706,13 +706,13 @@
|
||||
message += "-[uppertext(stutterList[stutterList.len])]"
|
||||
|
||||
if (6)
|
||||
var/list/bzztList = dd_text2list(message, " ")
|
||||
var/list/bzztList = splittext(message, " ")
|
||||
if (bzztList.len > 1)
|
||||
for (var/i = 1, i <= bzztList.len, i++)
|
||||
if (prob( min(5*i, 20) ))
|
||||
bzztList[i] = pick("*BZZT*","*ERRT*","*WONK*", "*ZORT*", "*BWOP*", "BWEET")
|
||||
|
||||
message = dd_list2text(bzztList, " ")
|
||||
message = jointext(bzztList, " ")
|
||||
|
||||
if (7)
|
||||
for(var/mob/O in hearers(src, null))
|
||||
|
||||
@@ -1436,7 +1436,7 @@ datum/computer/file/embedded_program/maintpanel
|
||||
..()
|
||||
|
||||
proc/do_setup(var/setupString)
|
||||
var/list/setupList = dd_text2list(setupString, ";")
|
||||
var/list/setupList = splittext(setupString, ";")
|
||||
if (!setupList || !setupList.len)
|
||||
return
|
||||
|
||||
|
||||
@@ -409,7 +409,7 @@ var/global/list/default_meat_head_dialog = list("hello hello", "... it's not vir
|
||||
if (. == ckey(test_string))
|
||||
return 1
|
||||
|
||||
var/list/exploded_sentence = dd_text2list(message, " ")
|
||||
var/list/exploded_sentence = splittext(message, " ")
|
||||
if (!exploded_sentence || !exploded_sentence.len)
|
||||
return 1
|
||||
|
||||
@@ -423,7 +423,7 @@ var/global/list/default_meat_head_dialog = list("hello hello", "... it's not vir
|
||||
if (prob(10))
|
||||
exploded_sentence[i] = "..."
|
||||
|
||||
. = dd_list2text(exploded_sentence, " ")
|
||||
. = jointext(exploded_sentence, " ")
|
||||
dialog += .
|
||||
|
||||
if ((dialog.len - default_meat_head_dialog.len) > MEATHEAD_MAX_CUSTOM_UTTERANCES)
|
||||
|
||||
@@ -278,7 +278,7 @@ var/global/datum/numbers_station/lincolnshire = new
|
||||
var/TP = ldata["numbers"]
|
||||
if (TP == null)
|
||||
return 1
|
||||
var/list/nums = dd_text2list(TP, " ")
|
||||
var/list/nums = splittext(TP, " ")
|
||||
if (nums.len < 21)
|
||||
logTheThing("debug", null, null, "<b>Numbers station</b> got too few numbers.")
|
||||
return 2
|
||||
|
||||
@@ -122,7 +122,7 @@ datum/controller/pathogen
|
||||
|
||||
proc/patient_zero(var/datum/pathogen_cdc/CDC, var/topic_holder)
|
||||
if (CDC.patient_zero)
|
||||
return dd_replacetext(CDC.patient_zero_kname, "%holder%", "\ref[topic_holder]")
|
||||
return replacetext(CDC.patient_zero_kname, "%holder%", "\ref[topic_holder]")
|
||||
|
||||
Topic(href, href_list)
|
||||
var/key = usr.ckey
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/proc/shakespearify(var/string)
|
||||
string = dd_replacetext(string, "your ", "[pick("thy", "thine")] ")
|
||||
string = dd_replacetext(string, " your", " [pick("thy", "thine")]")
|
||||
string = dd_replacetext(string, " is ", " be ")
|
||||
string = dd_replacetext(string, "you ", "thou ")
|
||||
string = dd_replacetext(string, " you", " thou")
|
||||
string = dd_replacetext(string, "are ", "art ")
|
||||
string = dd_replacetext(string, " are", " art")
|
||||
string = dd_replacetext(string, "does ", "doth ")
|
||||
string = dd_replacetext(string, " does", " doth")
|
||||
string = dd_replacetext(string, "do ", "doth ")
|
||||
string = dd_replacetext(string, " do", " doth")
|
||||
string = dd_replacetext(string, "she ", "the lady ")
|
||||
string = dd_replacetext(string, " she", " the lady")
|
||||
string = dd_replacetext(string, "i think", "methinks")
|
||||
string = replacetext(string, "your ", "[pick("thy", "thine")] ")
|
||||
string = replacetext(string, " your", " [pick("thy", "thine")]")
|
||||
string = replacetext(string, " is ", " be ")
|
||||
string = replacetext(string, "you ", "thou ")
|
||||
string = replacetext(string, " you", " thou")
|
||||
string = replacetext(string, "are ", "art ")
|
||||
string = replacetext(string, " are", " art")
|
||||
string = replacetext(string, "does ", "doth ")
|
||||
string = replacetext(string, " does", " doth")
|
||||
string = replacetext(string, "do ", "doth ")
|
||||
string = replacetext(string, " do", " doth")
|
||||
string = replacetext(string, "she ", "the lady ")
|
||||
string = replacetext(string, " she", " the lady")
|
||||
string = replacetext(string, "i think", "methinks")
|
||||
return string
|
||||
|
||||
/mob/living/carbon/human/proc/become_ice_statue()
|
||||
|
||||
@@ -481,7 +481,7 @@
|
||||
gui.sendToSubscribers({"{"splice":{"source":[sOut],"target":[tOut],"pred":[predictive_data],"selSource":[src.manip.sel_source],"selTarget":[src.manip.sel_target],"selected":[src.manip.splicesource]}}"}, "setUIState")
|
||||
|
||||
proc/sendAnalysisData()
|
||||
var/out = {"{"analysis":{"curr":"[src.manip.analysis]","predeffect":[db.certainty],"buttons":"[dd_list2text(src.manip.analysis_list,"")]""}
|
||||
var/out = {"{"analysis":{"curr":"[src.manip.analysis]","predeffect":[db.certainty],"buttons":"[jointext(src.manip.analysis_list,"")]""}
|
||||
if(src.manip.last_analysis)
|
||||
out += {","prev":[src.manip.last_analysis]"}
|
||||
out += "}}"
|
||||
|
||||
@@ -789,9 +789,11 @@
|
||||
new_nuggets += current_nugget
|
||||
|
||||
qdel(newIngredient)
|
||||
LAGCHECK(50)
|
||||
|
||||
for (var/obj/O in new_nuggets)
|
||||
O.set_loc(H)
|
||||
LAGCHECK(50)
|
||||
|
||||
else
|
||||
var/obj/item/reagent_containers/food/snacks/prison_loaf/newLoaf = new /obj/item/reagent_containers/food/snacks/prison_loaf(src)
|
||||
@@ -799,7 +801,6 @@
|
||||
if (newIngredient.reagents)
|
||||
newIngredient.reagents.trans_to(newLoaf, 1000)
|
||||
|
||||
|
||||
if (istype(newIngredient, /obj/item/reagent_containers/food/snacks/prison_loaf))
|
||||
var/obj/item/reagent_containers/food/snacks/prison_loaf/otherLoaf = newIngredient
|
||||
newLoaf.loaf_factor += otherLoaf.loaf_factor * 1.2
|
||||
@@ -830,6 +831,7 @@
|
||||
else
|
||||
newLoaf.loaf_factor++
|
||||
qdel(newIngredient)
|
||||
LAGCHECK(50)
|
||||
|
||||
newLoaf.update()
|
||||
newLoaf.set_loc(H)
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
/proc/mysql_sanitize(var/t)
|
||||
if(!t)
|
||||
return ""
|
||||
var/tmp = dd_replacetext(t, "'", "\'")
|
||||
tmp = dd_replacetext(tmp, "\\", "/")
|
||||
var/tmp = replacetext(t, "'", "\'")
|
||||
tmp = replacetext(tmp, "\\", "/")
|
||||
return tmp
|
||||
|
||||
/mob/proc/addicted_to_reagent(var/datum/reagent/reagent)
|
||||
|
||||
Reference in New Issue
Block a user