diff options
author | webdesigner97 <Christian_D_97@gmx.de> | 2014-04-17 22:21:20 +0200 |
---|---|---|
committer | webdesigner97 <Christian_D_97@gmx.de> | 2014-04-17 22:21:20 +0200 |
commit | 232e34267bcc0f8f0864437594c0920eb09da86d (patch) | |
tree | f3ad29cb81a886ff56303b2bb24b6e85fcb2baa1 | |
parent | 3a796d991bc2510576bc21911fa9cfe7449320da (diff) | |
download | roads-232e34267bcc0f8f0864437594c0920eb09da86d.tar roads-232e34267bcc0f8f0864437594c0920eb09da86d.tar.gz roads-232e34267bcc0f8f0864437594c0920eb09da86d.tar.bz2 roads-232e34267bcc0f8f0864437594c0920eb09da86d.tar.xz roads-232e34267bcc0f8f0864437594c0920eb09da86d.zip |
finally use smartfs for streets chatcommand
-rw-r--r-- | streetsmod/init.lua | 21 | ||||
-rw-r--r-- | streetsmod/locale/de.txt | 2 | ||||
-rw-r--r-- | streetsmod/locale/template.txt.txt | 2 |
3 files changed, 12 insertions, 13 deletions
diff --git a/streetsmod/init.lua b/streetsmod/init.lua index 86b7e19..78c3bc9 100644 --- a/streetsmod/init.lua +++ b/streetsmod/init.lua @@ -75,23 +75,18 @@ end streets.forms.chatcmd = smartfs.create("streets:chatcmd", function(state) state:size(10,6) - + local tlist = state:element("list", { pos={x=0,y=1}, size={w=6,h=5}, name = "streets:chatcmd_modlist" } ) + tlist:removeItem() + for k, v in pairs(streets.extendedBy) do + tlist:addItem(tostring(k) .. " " .. S("installed") .. ": " .. tostring(v)) + end + state:label(6.5, 1, "streets:chatcmd_version", S("Running version") .. ": " .. streets.version) + state:label(6.5, 1.5, "streets:chatcmd_loadtime", S("Load time") .. ": " .. round(streets.load.fin - streets.load.start,4) .. "s") end) minetest.register_chatcommand("streets",{ description = S("Check version of your installed StreetsMod and find information"), func = function(name,param) - minetest.show_formspec(name, "streets:streetsform", table.concat({ - "size[10,6]", - "label[0,1;Wool installed: " .. tostring(streets.extendedBy.wool) .. "]", - "label[0,1.5;Technic installed: " .. tostring(streets.extendedBy.technic) .. "]", - "label[0,2;Moreblocks installed: " .. tostring(streets.extendedBy.moreblocks) .. "]", - "label[0,2.5;Mesecons installed: " .. tostring(streets.extendedBy.mesecons) .. "]", - "label[0,3;Digilines installed: " .. tostring(streets.extendedBy.digilines) .. "]", - "label[0,3.5;Prefab installed: " .. tostring(streets.extendedBy.prefab) .. "]", - "label[0,4;Awards installed: " .. tostring(streets.extendedBy.awards) .. "]", - "label[0,5;Running version: " .. streets.version .. "]", - "label[0,5.5;Load time: " .. round(streets.load.fin - streets.load.start,4) .. "s]" - })) + streets.forms.chatcmd:show(name); end }) diff --git a/streetsmod/locale/de.txt b/streetsmod/locale/de.txt index b4aca9b..a0b77d3 100644 --- a/streetsmod/locale/de.txt +++ b/streetsmod/locale/de.txt @@ -47,3 +47,5 @@ Street lamp=Strassenlampe Concrete wall=Betonwand Concrete=Beton Trafficlight=Ampel +Running version=Version +Load time=Ladezeit diff --git a/streetsmod/locale/template.txt.txt b/streetsmod/locale/template.txt.txt index 095f8fd..37299a5 100644 --- a/streetsmod/locale/template.txt.txt +++ b/streetsmod/locale/template.txt.txt @@ -47,3 +47,5 @@ Street lamp= Concrete wall= Concrete= Trafficlight= +Running version= +Load time=
\ No newline at end of file |