mirror of
https://github.com/goonstation/goonstation-2016.git
synced 2026-07-19 13:02:20 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user