NanoUI Goes To Brazil

This commit is contained in:
ShadowLarkens
2020-09-20 02:20:55 -07:00
parent e18fb0fd7e
commit 3f191e4204
150 changed files with 102 additions and 17465 deletions

View File

@@ -433,45 +433,6 @@
// Insert("polycrystal", 'icons/obj/telescience.dmi', "polycrystal")
// ..()
/datum/asset/nanoui
var/list/common = list()
var/list/common_dirs = list(
"nano/css/",
"nano/images/",
"nano/images/modular_computers/",
"nano/js/"
)
var/list/template_dirs = list(
"nano/templates/"
)
/datum/asset/nanoui/register()
// Crawl the directories to find files.
for(var/path in common_dirs)
var/list/filenames = flist(path)
for(var/filename in filenames)
if(copytext(filename, length(filename)) != "/") // Ignore directories.
if(fexists(path + filename))
common[filename] = fcopy_rsc(path + filename)
register_asset(filename, common[filename])
// Combine all templates into a single bundle.
var/list/template_data = list()
for(var/path in template_dirs)
var/list/filenames = flist(path)
for(var/filename in filenames)
if(copytext(filename, length(filename) - 4) == ".tmpl") // Ignore directories.
template_data[filename] = file2text(path + filename)
var/template_bundle = "function nanouiTemplateBundle(){return [json_encode(template_data)];}"
var/fname = "data/nano_templates_bundle.js"
fdel(fname)
text2file(template_bundle, fname)
register_asset("nano_templates_bundle.js", fcopy_rsc(fname))
fdel(fname)
/datum/asset/nanoui/send(client)
send_asset_list(client, common)
//Pill sprites for UIs
/datum/asset/chem_master
var/assets = list()
@@ -522,4 +483,29 @@
/datum/asset/spritesheet/sheetmaterials/register()
InsertAll("", 'icons/obj/stacks.dmi')
..()
..()
// Nanomaps
/datum/asset/simple/nanomaps
// It REALLY doesnt matter too much if these arent up to date
// They are relatively big
assets = list(
"southern_cross_nanomap_z1.png" = 'icons/_nanomaps/southern_cross_nanomap_z1.png',
"southern_cross_nanomap_z10.png" = 'icons/_nanomaps/southern_cross_nanomap_z10.png',
"southern_cross_nanomap_z2.png" = 'icons/_nanomaps/southern_cross_nanomap_z2.png',
"southern_cross_nanomap_z3.png" = 'icons/_nanomaps/southern_cross_nanomap_z3.png',
"southern_cross_nanomap_z5.png" = 'icons/_nanomaps/southern_cross_nanomap_z5.png',
"southern_cross_nanomap_z6.png" = 'icons/_nanomaps/southern_cross_nanomap_z6.png',
"tether_nanomap_z1.png" = 'icons/_nanomaps/tether_nanomap_z1.png',
"tether_nanomap_z10.png" = 'icons/_nanomaps/tether_nanomap_z10.png',
"tether_nanomap_z13.png" = 'icons/_nanomaps/tether_nanomap_z13.png',
"tether_nanomap_z14.png" = 'icons/_nanomaps/tether_nanomap_z14.png',
"tether_nanomap_z2.png" = 'icons/_nanomaps/tether_nanomap_z2.png',
"tether_nanomap_z3.png" = 'icons/_nanomaps/tether_nanomap_z3.png',
"tether_nanomap_z4.png" = 'icons/_nanomaps/tether_nanomap_z4.png',
"tether_nanomap_z5.png" = 'icons/_nanomaps/tether_nanomap_z5.png',
"tether_nanomap_z6.png" = 'icons/_nanomaps/tether_nanomap_z6.png',
"tether_nanomap_z7.png" = 'icons/_nanomaps/tether_nanomap_z7.png',
"tether_nanomap_z8.png" = 'icons/_nanomaps/tether_nanomap_z8.png',
"tether_nanomap_z9.png" = 'icons/_nanomaps/tether_nanomap_z9.png',
)