Replace text2list and list2text

This commit is contained in:
Tigercat2000
2016-02-28 12:07:19 -08:00
parent 18779eef4d
commit 976887b2e0
56 changed files with 144 additions and 287 deletions
+2 -2
View File
@@ -58,9 +58,9 @@ var/global/nologevent = 0
body += "<b>Mob type:</b> [M.type]<br>"
if(M.client)
if(M.client.related_accounts_cid.len)
body += "<b>Related accounts by CID:</b> [list2text(M.client.related_accounts_cid, " - ")]<br>"
body += "<b>Related accounts by CID:</b> [jointext(M.client.related_accounts_cid, " - ")]<br>"
if(M.client.related_accounts_ip.len)
body += "<b>Related accounts by IP:</b> [list2text(M.client.related_accounts_ip, " - ")]<br><br>"
body += "<b>Related accounts by IP:</b> [jointext(M.client.related_accounts_ip, " - ")]<br><br>"
body += "<A href='?_src_=holder;boot2=\ref[M]'>Kick</A> | "
body += "<A href='?_src_=holder;warn=[M.ckey]'>Warn</A> | "
+2 -2
View File
@@ -14,7 +14,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
if(!length(line)) continue
if(copytext(line,1,2) == "#") continue
var/list/List = text2list(line,"+")
var/list/List = splittext(line,"+")
if(!List.len) continue
var/rank = ckeyEx(List[1])
@@ -78,7 +78,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
if(copytext(line,1,2) == "#") continue
//Split the line at every "-"
var/list/List = text2list(line, "-")
var/list/List = splittext(line, "-")
if(!List.len) continue
//ckey is before the first "-"
+2 -2
View File
@@ -446,7 +446,7 @@ var/list/admin_verbs_proccall = list (
/client/proc/big_brother()
set category = "Admin"
set name = "Big Brother Mode"
if(!check_rights(R_PERMISSIONS))
return
@@ -705,7 +705,7 @@ var/list/admin_verbs_proccall = list (
//load text from file
var/list/Lines = file2list("config/admins.txt")
for(var/line in Lines)
var/list/splitline = text2list(line, " - ")
var/list/splitline = splittext(line, " - ")
if(n_lower(splitline[1]) == ckey)
if(splitline.len >= 2)
rank = ckeyEx(splitline[2])
+1 -1
View File
@@ -2,7 +2,7 @@
/datum/admins/proc/create_mob(var/mob/user)
if (!create_mob_html)
var/mobjs = null
mobjs = list2text(typesof(/mob), ";")
mobjs = jointext(typesof(/mob), ";")
create_mob_html = file2text('html/create_object.html')
create_mob_html = replacetext(create_mob_html, "null /* object types */", "\"[mobjs]\"")
+2 -2
View File
@@ -4,7 +4,7 @@ var/list/create_object_forms = list(/obj, /obj/structure, /obj/machinery, /obj/e
/datum/admins/proc/create_object(var/mob/user)
if (!create_object_html)
var/objectjs = null
objectjs = list2text(typesof(/obj), ";")
objectjs = jointext(typesof(/obj), ";")
create_object_html = file2text('html/create_object.html')
create_object_html = replacetext(create_object_html, "null /* object types */", "\"[objectjs]\"")
@@ -15,7 +15,7 @@ var/list/create_object_forms = list(/obj, /obj/structure, /obj/machinery, /obj/e
var/html_form = create_object_forms[path]
if (!html_form)
var/objectjs = list2text(typesof(path), ";")
var/objectjs = jointext(typesof(path), ";")
html_form = file2text('html/create_object.html')
html_form = replacetext(html_form, "null /* object types */", "\"[objectjs]\"")
create_object_forms[path] = html_form
+1 -1
View File
@@ -2,7 +2,7 @@
/datum/admins/proc/create_turf(var/mob/user)
if (!create_turf_html)
var/turfjs = null
turfjs = list2text(typesof(/turf), ";")
turfjs = jointext(typesof(/turf), ";")
create_turf_html = file2text('html/create_object.html')
create_turf_html = replacetext(create_turf_html, "null /* object types */", "\"[turfjs]\"")
+11 -12
View File
@@ -126,7 +126,7 @@
log_admin("[key_name(usr)] has edited [ckey]'s sticky ban reason from [oldreason] to [reason]")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has edited [ckey]'s sticky ban reason from [oldreason] to [reason]</span>")
spawn(10)
stickyban_show()
@@ -147,7 +147,7 @@
/datum/admins/proc/stickyban_show()
if(!check_rights(R_BAN))
return
var/list/bans = sortList(world.GetConfig("ban"))
var/banhtml = ""
for(var/key in bans)
@@ -181,23 +181,23 @@
if (!ban)
return null
. = params2list(ban)
.["keys"] = text2list(.["keys"], ",")
.["type"] = text2list(.["type"], ",")
.["IP"] = text2list(.["IP"], ",")
.["computer_id"] = text2list(.["computer_id"], ",")
.["keys"] = splittext(.["keys"], ",")
.["type"] = splittext(.["type"], ",")
.["IP"] = splittext(.["IP"], ",")
.["computer_id"] = splittext(.["computer_id"], ",")
/proc/list2stickyban(var/list/ban)
if (!ban || !islist(ban))
return null
. = ban.Copy()
if (.["keys"])
.["keys"] = list2text(.["keys"], ",")
.["keys"] = jointext(.["keys"], ",")
if (.["type"])
.["type"] = list2text(.["type"], ",")
.["type"] = jointext(.["type"], ",")
if (.["IP"])
.["IP"] = list2text(.["IP"], ",")
.["IP"] = jointext(.["IP"], ",")
if (.["computer_id"])
.["computer_id"] = list2text(.["computer_id"], ",")
.["computer_id"] = jointext(.["computer_id"], ",")
. = list2params(.)
/client/proc/stickybanpanel()
@@ -206,6 +206,5 @@
if(!check_rights(R_BAN))
return
holder.stickyban_show()
+2 -2
View File
@@ -1019,7 +1019,7 @@
message_admins("\blue [key_name_admin(usr)] removed [t]", 1)
jobban_remove(t)
href_list["ban"] = 1 // lets it fall through and refresh
var/t_split = text2list(t, " - ")
var/t_split = splittext(t, " - ")
var/key = t_split[1]
var/job = t_split[2]
DB_ban_unban(ckey(key), BANTYPE_JOB_PERMA, job)
@@ -2066,7 +2066,7 @@
alert("Select fewer object types, (max 5)")
return
var/list/offset = text2list(href_list["offset"],",")
var/list/offset = splittext(href_list["offset"],",")
var/number = dd_range(1, 100, text2num(href_list["object_count"]))
var/X = offset.len > 0 ? text2num(offset[1]) : 0
var/Y = offset.len > 1 ? text2num(offset[2]) : 0
+2 -2
View File
@@ -32,7 +32,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
var/original_msg = msg
//explode the input msg into a list
var/list/msglist = text2list(msg, " ")
var/list/msglist = splittext(msg, " ")
//generate keywords lookup
var/list/surnames = list()
@@ -43,7 +43,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
if(M.mind) indexing += M.mind.name
for(var/string in indexing)
var/list/L = text2list(string, " ")
var/list/L = splittext(string, " ")
var/surname_found = 0
//surnames
for(var/i=L.len, i>=1, i--)
+2 -2
View File
@@ -11,10 +11,10 @@
dat += "<p>[C.ckey] (Player Age: <font color = 'red'>[C.player_age]</font>) - <b>[C.computer_id]</b> / <b>[C.address]</b><br>"
if(C.related_accounts_cid.len)
dat += "--Accounts associated with CID: "
dat += "<b>[list2text(C.related_accounts_cid, " - ")]</b><br>"
dat += "<b>[jointext(C.related_accounts_cid, " - ")]</b><br>"
if(C.related_accounts_ip.len)
dat += "--Accounts associated with IP: "
dat += "<b>[list2text(C.related_accounts_ip, " - ")]</b> "
dat += "<b>[jointext(C.related_accounts_ip, " - ")]</b> "
usr << browse(dat, "window=alt_panel;size=640x480")
return
+8 -8
View File
@@ -1166,21 +1166,21 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Silicons","Clients","Respawnable Mobs"))
if("Players")
usr << list2text(player_list,",")
usr << jointext(player_list,",")
if("Admins")
usr << list2text(admins,",")
usr << jointext(admins,",")
if("Mobs")
usr << list2text(mob_list,",")
usr << jointext(mob_list,",")
if("Living Mobs")
usr << list2text(living_mob_list,",")
usr << jointext(living_mob_list,",")
if("Dead Mobs")
usr << list2text(dead_mob_list,",")
usr << jointext(dead_mob_list,",")
if("Silicons")
usr << list2text(silicon_mob_list,",")
usr << jointext(silicon_mob_list,",")
if("Clients")
usr << list2text(clients,",")
usr << jointext(clients,",")
if("Respawnable Mobs")
usr << list2text(respawnable_list,",")
usr << jointext(respawnable_list,",")
/client/proc/cmd_admin_toggle_block(var/mob/M,var/block)
@@ -143,7 +143,7 @@ var/global/dmm_suite/preloader/_preloader = null
var/variables_start = findtext(full_def,"{")
if(variables_start)//if there's any variable
full_def = copytext(full_def,variables_start+1,length(full_def))//removing the last '}'
fields = text2list(full_def,";")
fields = dmm_splittext(full_def,";")
//then fill the members_attributes list with the corresponding variables
members_attributes.len++
@@ -245,7 +245,7 @@ var/global/dmm_suite/preloader/_preloader = null
//build a list from variables in text form (e.g {var1="derp"; var2; var3=7} => list(var1="derp", var2, var3=7))
//return the filled list
/dmm_suite/proc/text2list(var/text as text,var/delimiter=",")
/dmm_suite/proc/dmm_splittext(var/text as text,var/delimiter=",")
var/list/to_return = list()
@@ -279,7 +279,7 @@ var/global/dmm_suite/preloader/_preloader = null
//Check for list
else if(copytext(trim_right,1,5) == "list")
trim_right = text2list(copytext(trim_right,6,length(trim_right)))
trim_right = dmm_splittext(copytext(trim_right,6,length(trim_right)))
//Check for file
else if(copytext(trim_right,1,2) == "'")
+1 -1
View File
@@ -365,7 +365,7 @@
//Log all the alts
if(related_accounts_cid.len)
log_access("Alts: [key_name(src)]:[list2text(related_accounts_cid, " - ")]")
log_access("Alts: [key_name(src)]:[jointext(related_accounts_cid, " - ")]")
var/watchreason = check_watchlist(sql_ckey)
if(watchreason)
+1 -1
View File
@@ -305,7 +305,7 @@ What a mess.*/
return
Perp = new/list()
t1 = lowertext(t1)
var/list/components = text2list(t1, " ")
var/list/components = splittext(t1, " ")
if(components.len > 5)
return //Lets not let them search too greedily.
for(var/datum/data/record/R in data_core.general)
+4 -4
View File
@@ -12,7 +12,7 @@
var/jobmask = query.item[3]
var/ok = 0
if(jobmask != "*")
var/list/allowed_jobs = text2list(jobmask,",")
var/list/allowed_jobs = splittext(jobmask,",")
for(var/i = 1, i <= allowed_jobs.len, i++)
if(istext(allowed_jobs[i]))
allowed_jobs[i] = trim(allowed_jobs[i])
@@ -66,13 +66,13 @@
// This is hacky, but since it's difficult as fuck to make a proper parser in BYOND without killing the server, here it is. - N3X
/proc/HackProperties(var/mob/living/carbon/human/M,var/obj/item/I,var/script)
var/list/statements = text2list(script,";")
var/list/statements = splittext(script,";")
if(statements.len == 0)
return
for(var/statement in statements)
var/list/assignmentChunks = text2list(statement,"=")
var/list/assignmentChunks = splittext(statement,"=")
var/varname = assignmentChunks[1]
var/list/typeChunks=text2list(script,":")
var/list/typeChunks=splittext(script,":")
var/desiredType=typeChunks[1]
switch(desiredType)
if("string")
+1 -1
View File
@@ -25,7 +25,7 @@
var/obj/item/weapon/paper/P = new(get_turf(src))
P.name = "paper- 'Scanner Report'"
P.info = "<center><font size='6'><B>Scanner Report</B></font></center><HR><BR>"
P.info += list2text(log, "<BR>")
P.info += jointext(log, "<BR>")
P.info += "<HR><B>Notes:</B><BR>"
P.info_links = P.info
+2 -2
View File
@@ -427,8 +427,8 @@ var/const/POS_HEADER = {"<html>
if("Add to Order")
AddToOrder(href_list["preset"],text2num(href_list["units"]))
if("Add Products")
for(var/list/line in text2list(href_list["csv"],"\n"))
var/list/cells = text2list(line,",")
for(var/list/line in splittext(href_list["csv"],"\n"))
var/list/cells = splittext(line,",")
if(cells.len<2)
usr << "\red The CSV must have at least two columns: Product Name, followed by Price (as a number)."
src.attack_hand(usr)
+4 -4
View File
@@ -26,7 +26,7 @@ proc/Intoxicated(phrase)
proc/NewStutter(phrase,stunned)
phrase = html_decode(phrase)
var/list/split_phrase = text2list(phrase," ") //Split it up into words.
var/list/split_phrase = splittext(phrase," ") //Split it up into words.
var/list/unstuttered_words = split_phrase.Copy()
var/i = rand(1,3)
@@ -57,7 +57,7 @@ proc/NewStutter(phrase,stunned)
split_phrase[index] = word
return sanitize(list2text(split_phrase," "))
return sanitize(jointext(split_phrase," "))
proc/Stagger(mob/M,d) //Technically not a filter, but it relates to drunkenness.
step(M, pick(d,turn(d,90),turn(d,-90)))
@@ -67,7 +67,7 @@ proc/Ellipsis(original_msg, chance = 50)
if(chance >= 100) return original_msg
var/list
words = text2list(original_msg," ")
words = splittext(original_msg," ")
new_words = list()
var/new_msg = ""
@@ -78,6 +78,6 @@ proc/Ellipsis(original_msg, chance = 50)
else
new_words += w
new_msg = list2text(new_words," ")
new_msg = jointext(new_words," ")
return new_msg
+9 -9
View File
@@ -270,10 +270,10 @@ You've gained <b>[totalkarma]</b> total karma in your time here.<br>"}
karmacharge(cost)
if(dbckey)
var/list/joblist = text2list(dbjob,",")
var/list/joblist = splittext(dbjob,",")
if(!(job in joblist))
joblist += job
var/newjoblist = list2text(joblist,",")
var/newjoblist = jointext(joblist,",")
query = dbcon.NewQuery("UPDATE [format_table_name("whitelist")] SET job='[newjoblist]' WHERE ckey='[dbckey]'")
if(!query.Execute())
var/err = query.ErrorMsg()
@@ -310,10 +310,10 @@ You've gained <b>[totalkarma]</b> total karma in your time here.<br>"}
karmacharge(cost)
if(dbckey)
var/list/specieslist = text2list(dbspecies,",")
var/list/specieslist = splittext(dbspecies,",")
if(!(species in specieslist))
specieslist += species
var/newspecieslist = list2text(specieslist,",")
var/newspecieslist = jointext(specieslist,",")
query = dbcon.NewQuery("UPDATE [format_table_name("whitelist")] SET species='[newspecieslist]' WHERE ckey='[dbckey]'")
if(!query.Execute())
var/err = query.ErrorMsg()
@@ -388,15 +388,15 @@ You've gained <b>[totalkarma]</b> total karma in your time here.<br>"}
if(dbckey)
var/list/typelist = list()
if(type == "job")
typelist = text2list(dbjob,",")
typelist = splittext(dbjob,",")
else if(type == "species")
typelist = text2list(dbspecies,",")
typelist = splittext(dbspecies,",")
else
usr << "\red Type [type] is not a valid column."
if(name in typelist)
typelist -= name
var/newtypelist = list2text(typelist,",")
var/newtypelist = jointext(typelist,",")
query = dbcon.NewQuery("UPDATE [format_table_name("whitelist")] SET [type]='[newtypelist]' WHERE ckey='[dbckey]'")
if(!query.Execute())
var/err = query.ErrorMsg()
@@ -426,8 +426,8 @@ You've gained <b>[totalkarma]</b> total karma in your time here.<br>"}
dbspecies = query.item[4]
if(dbckey)
var/list/joblist = text2list(dbjob,",")
var/list/specieslist = text2list(dbspecies,",")
var/list/joblist = splittext(dbjob,",")
var/list/specieslist = splittext(dbspecies,",")
var/list/combinedlist = joblist + specieslist
if(name)
if(name in combinedlist)
+2 -2
View File
@@ -114,7 +114,7 @@
message = stars(message)
var/speaker_name = "unknown"
if(speaker)
if(speaker)
speaker_name = speaker.name
if(vname)
@@ -203,7 +203,7 @@
var/heard = ""
if(prob(15))
var/list/punctuation = list(",", "!", ".", ";", "?")
var/list/messages = text2list(message, " ")
var/list/messages = splittext(message, " ")
var/R = rand(1, messages.len)
var/heardword = messages[R]
if(copytext(heardword,1, 1) in punctuation)
+1 -1
View File
@@ -102,7 +102,7 @@
. += pick(map[min_char])
message = copytext(message, min_index + 1)
return list2text(.)
return jointext(., "")
#undef AUTOHISS_OFF
#undef AUTOHISS_BASIC
+2 -2
View File
@@ -268,11 +268,11 @@ var/list/ai_verbs_default = list(
return
if(!custom_sprite) //Check to see if custom sprite time, checking the appopriate file to change a var
var/file = file2text("config/custom_sprites.txt")
var/lines = text2list(file, "\n")
var/lines = splittext(file, "\n")
for(var/line in lines)
// split & clean up
var/list/Entry = text2list(line, ":")
var/list/Entry = splittext(line, ":")
for(var/i = 1 to Entry.len)
Entry[i] = trim(Entry[i])
+3 -3
View File
@@ -30,7 +30,7 @@ var/const/VOX_PATH = "sound/vox_fem/"
/mob/living/silicon/ai/proc/ai_announcement()
if(check_unable(AI_CHECK_WIRELESS | AI_CHECK_RADIO))
return
if(announcing_vox > world.time)
src << "<span class='warning'>Please wait [round((announcing_vox - world.time) / 10)] seconds.</span>"
return
@@ -38,14 +38,14 @@ var/const/VOX_PATH = "sound/vox_fem/"
var/message = input(src, "WARNING: Misuse of this verb can result in you being job banned. More help is available in 'Announcement Help'", "Announcement", last_announcement) as text|null
last_announcement = message
if(check_unable(AI_CHECK_WIRELESS | AI_CHECK_RADIO))
return
if(!message || announcing_vox > world.time)
return
var/list/words = text2list(trim(message), " ")
var/list/words = splittext(trim(message), " ")
var/list/incorrect_words = list()
if(words.len > 30)
@@ -175,11 +175,11 @@ var/list/robot_verbs_default = list(
//Check for custom sprite
if(!custom_sprite)
var/file = file2text("config/custom_sprites.txt")
var/lines = text2list(file, "\n")
var/lines = splittext(file, "\n")
for(var/line in lines)
// split & clean up
var/list/Entry = text2list(line, ";")
var/list/Entry = splittext(line, ";")
for(var/i = 1 to Entry.len)
Entry[i] = trim(Entry[i])
+1 -1
View File
@@ -25,7 +25,7 @@
var/virusstats[0]
virusstats["antigen"] = antigens2string(curr_virus.antigen)
virusstats["spreadType"] = curr_virus.spreadtype
virusstats["affectedSpecies"] = list2text(curr_virus.affected_species, ", ")
virusstats["affectedSpecies"] = jointext(curr_virus.affected_species, ", ")
virusstats["speed"] = curr_virus.speed
data["virusStats"] = virusstats
+2 -2
View File
@@ -106,8 +106,8 @@
active=on
var/statestr=on?"on":"off"
// Spammy message_admins("Emitter turned [statestr] by radio signal ([signal.data["command"]] @ [frequency]) in [formatJumpTo(src)]",0,1)
log_game("Emitter turned [statestr] by radio signal ([signal.data["command"]] @ [frequency]) in ([x], [y], [z]) AAC prints: [list2text(signal.data["hiddenprints"])]")
investigate_log("turned <font color='orange'>[statestr]</font> by radio signal ([signal.data["command"]] @ [frequency]) AAC prints: [list2text(signal.data["hiddenprints"])]","singulo")
log_game("Emitter turned [statestr] by radio signal ([signal.data["command"]] @ [frequency]) in ([x], [y], [z]) AAC prints: [jointext(signal.data["hiddenprints"], "")]")
investigate_log("turned <font color='orange'>[statestr]</font> by radio signal ([signal.data["command"]] @ [frequency]) AAC prints: [jointext(signal.data["hiddenprints"], "")]","singulo")
update_icon()
/obj/machinery/power/emitter/Destroy()
@@ -156,8 +156,8 @@
src << "Missing Input"
return
var/list/startCoords = text2list(startInput, ";")
var/list/endCoords = text2list(endInput, ";")
var/list/startCoords = splittext(startInput, ";")
var/list/endCoords = splittext(endInput, ";")
if(!startCoords || !endCoords)
src << "Invalid Coords"
src << "Start Input: [startInput]"
@@ -178,7 +178,7 @@
var/moduleClusters = input("Cluster Flags (Cancel to leave unchanged from defaults)","Map Gen Settings") as null|anything in clusters
//null for default
var/theCluster = 0
if(moduleClusters != "None")
if(!clusters[moduleClusters])
@@ -187,7 +187,7 @@
theCluster = clusters[moduleClusters]
else
theCluster = CLUSTER_CHECK_NONE
if(theCluster)
for(var/datum/mapGeneratorModule/M in N.modules)
M.clusterCheckFlags = theCluster
+3 -3
View File
@@ -226,13 +226,13 @@
in_chamber.p_y = text2num(mouse_control["icon-y"])
if(mouse_control["screen-loc"])
//Split screen-loc up into X+Pixel_X and Y+Pixel_Y
var/list/screen_loc_params = text2list(mouse_control["screen-loc"], ",")
var/list/screen_loc_params = splittext(mouse_control["screen-loc"], ",")
//Split X+Pixel_X up into list(X, Pixel_X)
var/list/screen_loc_X = text2list(screen_loc_params[1],":")
var/list/screen_loc_X = splittext(screen_loc_params[1],":")
//Split Y+Pixel_Y up into list(Y, Pixel_Y)
var/list/screen_loc_Y = text2list(screen_loc_params[2],":")
var/list/screen_loc_Y = splittext(screen_loc_params[2],":")
var/x = text2num(screen_loc_X[1]) * 32 + text2num(screen_loc_X[2]) - 32
var/y = text2num(screen_loc_Y[1]) * 32 + text2num(screen_loc_Y[2]) - 32
+2 -2
View File
@@ -48,12 +48,12 @@
var/list/temp_list
if(!id_with_upload.len)
temp_list = list()
temp_list = text2list(id_with_upload_string, ";")
temp_list = splittext(id_with_upload_string, ";")
for(var/N in temp_list)
id_with_upload += text2num(N)
if(!id_with_download.len)
temp_list = list()
temp_list = text2list(id_with_download_string, ";")
temp_list = splittext(id_with_download_string, ";")
for(var/N in temp_list)
id_with_download += text2num(N)
@@ -40,7 +40,7 @@
/*var/l = lentext(msg)
if(findtext(msg," ",l,l+1)==0)
msg+=" "*/
seperate = text2list(msg, " ")
seperate = splittext(msg, " ")
for(var/Xa = 1,Xa<seperate.len,Xa++)
var/next = Xa + 1
@@ -81,7 +81,7 @@
if(!word)
text = "[pick(heard_words)]"
else
text = pick(text2list(word, " "))
text = pick(splittext(word, " "))
if(lentext(text)==1)
text=uppertext(text)
else
@@ -180,16 +180,15 @@
interpreter.SetProc("shuffle", /proc/shuffle)
interpreter.SetProc("uniquevector", /proc/uniquelist)
interpreter.SetProc("text2vector", /proc/text2list)
interpreter.SetProc("text2vectorEx",/proc/text2listEx)
interpreter.SetProc("vector2text", /proc/list2text)
interpreter.SetProc("text2vector", /proc/n_splittext)
interpreter.SetProc("vector2text", /proc/n_jointext)
// Donkie~
// Strings
interpreter.SetProc("lower", /proc/n_lower)
interpreter.SetProc("upper", /proc/n_upper)
interpreter.SetProc("explode", /proc/string_explode)
interpreter.SetProc("implode", /proc/list2text)
interpreter.SetProc("implode", /proc/n_jointext)
interpreter.SetProc("repeat", /proc/n_repeat)
interpreter.SetProc("reverse", /proc/reverse_text)
interpreter.SetProc("tonum", /proc/n_str2num)
@@ -167,12 +167,12 @@
proc/string_explode(var/string, var/separator = "")
//writepanic("[__FILE__].[__LINE__] \\/proc/string_explode() called tick#: [world.time]")
if(istext(string) && (istext(separator) || isnull(separator)))
return text2list(string, separator)
return splittext(string, separator)
//Converts a list to a string
/proc/list_implode(var/list/li, var/separator)
if(istype(li) && (istext(separator) || isnull(separator)))
return list2text(li, separator)
return jointext(li, separator)
proc/n_repeat(var/string, var/amount)
//writepanic("[__FILE__].[__LINE__] \\/proc/n_repeat() called tick#: [world.time]")
@@ -266,4 +266,10 @@ proc/n_round(var/num)
return replacetext(text, r, with)
/proc/n_replacetextEx(text, r, with)
return replacetextEx(text, r, with)
return replacetextEx(text, r, with)
/proc/n_jointext(list, glue)
return jointext(list, glue)
/proc/n_splittext(text, delim)
return splittext(text, delim)
@@ -87,7 +87,7 @@ var/list/z_levels_list = list()
var/datum/space_level/D
var/list/config_settings[SLS.len][]
for(var/A in SLS)
config_settings[SLS.Find(A)] = text2list(A, ";")
config_settings[SLS.Find(A)] = splittext(A, ";")
var/conf_set_len = SLS.len
SLS.Cut()
for(var/A in config_settings)
+1 -1
View File
@@ -212,7 +212,7 @@ var/global/list/virusDB = list()
<u>Antigen:</u> [antigens2string(antigen)]<br>
<u>Transmitted By:</u> [spreadtype]<br>
<u>Rate of Progression:</u> [stageprob * 10]<br>
<u>Species Affected:</u> [list2text(affected_species, ", ")]<br>
<u>Species Affected:</u> [jointext(affected_species, ", ")]<br>
"}
r += "<u>Symptoms:</u><br>"
+3 -3
View File
@@ -52,7 +52,7 @@
if (memorybank)
data["buffer"] = list("name" = (analysed ? memorybank.effect.name : "Unknown Symptom"), "stage" = memorybank.stage)
if (species_buffer)
data["species_buffer"] = analysed ? list2text(species_buffer, ", ") : "Unknown Species"
data["species_buffer"] = analysed ? jointext(species_buffer, ", ") : "Unknown Species"
if (splicing)
data["busy"] = "Splicing..."
@@ -65,7 +65,7 @@
if (dish.virus2)
if (dish.virus2.affected_species)
data["affected_species"] = dish.analysed ? list2text(dish.virus2.affected_species, ", ") : "Unknown"
data["affected_species"] = dish.analysed ? jointext(dish.virus2.affected_species, ", ") : "Unknown"
if (dish.growth >= 50)
var/list/effects[0]
@@ -109,7 +109,7 @@
d.name = "[memorybank.effect.name] GNA disk (Stage: [memorybank.effect.stage])"
d.effect = memorybank
else if (species_buffer)
d.name = "[list2text(species_buffer, ", ")] GNA disk"
d.name = "[jointext(species_buffer, ", ")] GNA disk"
d.species = species_buffer
else
if (memorybank)