list2text() -> jointext() (#4342)

The DM jointext() function is more or less equivalent to list2text(), but is faster. Might as well.

Seems to make VV faster.
This commit is contained in:
Lohikar
2018-03-03 00:36:44 +02:00
committed by Erki
parent bb87563e6d
commit 2c1229a9b2
17 changed files with 29 additions and 114 deletions
+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]\"")
+3 -3
View File
@@ -3,7 +3,7 @@
/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]\"")
@@ -22,8 +22,8 @@
if (!quick_create_object_html)
var/objectjs = null
objectjs = list2text(typesof(path), ";")
objectjs = jointext(typesof(path), ";")
quick_create_object_html = file2text('html/create_object.html')
quick_create_object_html = replacetext(quick_create_object_html, "null /* object types */", "\"[objectjs]\"")
user << browse(replacetext(quick_create_object_html, "/* ref src */", "\ref[src]"), "window=quick_create_object;size=425x475")
user << browse(replacetext(quick_create_object_html, "/* ref src */", "\ref[src]"), "window=quick_create_object;size=425x475")
+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]\"")
+1 -1
View File
@@ -1217,7 +1217,7 @@
alert("Select fewer object types, (max 5)")
return
else if(length(removed_paths))
alert("Removed:\n" + list2text(removed_paths, "\n"))
alert("Removed:\n" + jointext(removed_paths, "\n"))
var/list/offset = text2list(href_list["offset"],",")
var/number = dd_range(1, 100, text2num(href_list["object_count"]))
+6 -6
View File
@@ -926,17 +926,17 @@
switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs", "Clients"))
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("Clients")
usr << list2text(clients,",")
usr << jointext(clients,",")
// DNA2 - Admin Hax
/client/proc/cmd_admin_toggle_block(var/mob/M,var/block)
@@ -150,7 +150,7 @@
else
vtext = "[value]"
return "<span class=value>[vtext]</span>[list2text(extra)]"
return "<span class=value>[vtext]</span>[jointext(extra, "")]"
/proc/make_view_variables_var_entry(datum/D, varname, value, level=0)
var/ecm = null