mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 09:05:11 +01:00
Merge pull request #2283 from YotaXP/list2text-refactor
Optimized and refactored list2text, text2list, and replacetext.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
/datum/admins/proc/create_mob(var/mob/user)
|
||||
if (!create_mob_html)
|
||||
var/mobjs = null
|
||||
mobjs = dd_list2text(typesof(/mob), ";")
|
||||
mobjs = list2text(typesof(/mob), ";")
|
||||
create_mob_html = file2text('html/create_object.html')
|
||||
create_mob_html = replacetext(create_mob_html, "null /* object types */", "\"[mobjs]\"")
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/datum/admins/proc/create_object(var/mob/user)
|
||||
if (!create_object_html)
|
||||
var/objectjs = null
|
||||
objectjs = dd_list2text(typesof(/obj), ";")
|
||||
objectjs = list2text(typesof(/obj), ";")
|
||||
create_object_html = file2text('html/create_object.html')
|
||||
create_object_html = replacetext(create_object_html, "null /* object types */", "\"[objectjs]\"")
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
if (!quick_create_object_html)
|
||||
var/objectjs = null
|
||||
objectjs = dd_list2text(typesof(path), ";")
|
||||
objectjs = list2text(typesof(path), ";")
|
||||
quick_create_object_html = file2text('html/create_object.html')
|
||||
quick_create_object_html = replacetext(quick_create_object_html, "null /* object types */", "\"[objectjs]\"")
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/datum/admins/proc/create_turf(var/mob/user)
|
||||
if (!create_turf_html)
|
||||
var/turfjs = null
|
||||
turfjs = dd_list2text(typesof(/turf), ";")
|
||||
turfjs = list2text(typesof(/turf), ";")
|
||||
create_turf_html = file2text('html/create_object.html')
|
||||
create_turf_html = replacetext(create_turf_html, "null /* object types */", "\"[turfjs]\"")
|
||||
|
||||
|
||||
@@ -1471,7 +1471,7 @@
|
||||
alert("Select fewer object types, (max 5)")
|
||||
return
|
||||
else if(length(removed_paths))
|
||||
alert("Removed:\n" + dd_list2text(removed_paths, "\n"))
|
||||
alert("Removed:\n" + list2text(removed_paths, "\n"))
|
||||
|
||||
var/list/offset = text2list(href_list["offset"],",")
|
||||
var/number = dd_range(1, 100, text2num(href_list["object_count"]))
|
||||
|
||||
@@ -1066,16 +1066,16 @@ var/global/list/g_fancy_list_of_safe_types = null
|
||||
|
||||
switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Clients","Joined Clients"))
|
||||
if("Players")
|
||||
usr << dd_list2text(player_list,",")
|
||||
usr << list2text(player_list,",")
|
||||
if("Admins")
|
||||
usr << dd_list2text(admins,",")
|
||||
usr << list2text(admins,",")
|
||||
if("Mobs")
|
||||
usr << dd_list2text(mob_list,",")
|
||||
usr << list2text(mob_list,",")
|
||||
if("Living Mobs")
|
||||
usr << dd_list2text(living_mob_list,",")
|
||||
usr << list2text(living_mob_list,",")
|
||||
if("Dead Mobs")
|
||||
usr << dd_list2text(dead_mob_list,",")
|
||||
usr << list2text(dead_mob_list,",")
|
||||
if("Clients")
|
||||
usr << dd_list2text(clients,",")
|
||||
usr << list2text(clients,",")
|
||||
if("Joined Clients")
|
||||
usr << dd_list2text(joined_player_list,",")
|
||||
usr << list2text(joined_player_list,",")
|
||||
|
||||
Reference in New Issue
Block a user