summaryrefslogtreecommitdiff
path: root/streetsmod
diff options
context:
space:
mode:
authorwebdesigner97 <Christian_D_97@gmx.de>2014-05-19 21:27:47 +0200
committerwebdesigner97 <Christian_D_97@gmx.de>2014-05-19 21:27:47 +0200
commit946d833d2e3277dd43536ffd6b3300554081e56a (patch)
tree2712ff880cfc3a0ee924904107ee347c2dae64c1 /streetsmod
parent09c1f038f50404b136ab746a04c93c0b63b78429 (diff)
downloadroads-946d833d2e3277dd43536ffd6b3300554081e56a.tar
roads-946d833d2e3277dd43536ffd6b3300554081e56a.tar.gz
roads-946d833d2e3277dd43536ffd6b3300554081e56a.tar.bz2
roads-946d833d2e3277dd43536ffd6b3300554081e56a.tar.xz
roads-946d833d2e3277dd43536ffd6b3300554081e56a.zip
Many changed files from the last weeks where I don't know what I chenged
Diffstat (limited to 'streetsmod')
-rw-r--r--streetsmod/forms.lua8
-rw-r--r--streetsmod/init.lua23
2 files changed, 16 insertions, 15 deletions
diff --git a/streetsmod/forms.lua b/streetsmod/forms.lua
index f412610..28ceb31 100644
--- a/streetsmod/forms.lua
+++ b/streetsmod/forms.lua
@@ -2,9 +2,9 @@ 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))
+ for k, v in pairstreets.S(streets.extendedBy) do
+ tlist:addItem(tostring(k) .. " " .. streets.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")
+ state:label(6.5, 1, "streets:chatcmd_version", streets.S("Running version") .. ": " .. streets.version)
+ state:label(6.5, 1.5, "streets:chatcmd_loadtime", streets.S("Load time") .. ": " .. round(streets.load.fin - streets.load.start,4) .. "s")
end) \ No newline at end of file
diff --git a/streetsmod/init.lua b/streetsmod/init.lua
index fd43645..02cb238 100644
--- a/streetsmod/init.lua
+++ b/streetsmod/init.lua
@@ -5,19 +5,18 @@
Forum : http://bit.ly/12cPMeo
Depends : default
]]
--- kaeza: intllib
+streets = {}
+
+-- Kaeza intllib
-- Boilerplate to support localized strings if intllib mod is installed.
- --local S
- if (minetest.get_modpath("intllib")) then
- dofile(minetest.get_modpath("intllib").."/intllib.lua")
- S = intllib.Getter(minetest.get_current_modname())
+ if minetest.get_modpath("intllib") then
+ streets.S = intllib.Getter()
else
- S = function ( s ) return s end
+ streets.S = function(s) return s end
end
-- Create variable and tables
- print("Streets: " .. S("Creating variables and tables..."))
- streets = {}
+ print("Streets: " .. streets.S("Creating variables and tables..."))
streets.version = "1.4.4dev"
streets.modpath = minetest.get_modpath("streetsmod")
streets.extendedBy = {}
@@ -27,6 +26,8 @@
}
streets.forms = {}
+
+
-- Support for mimnetest_next's fancy inventories
if gui_bg and gui_bg_img and gui_slots and type(default.get_hotbar_bg) == "function" then
-- Everything fine :)
@@ -47,7 +48,7 @@
dofile(streets.modpath .. "/forms.lua")
-- Check for mods which change this mod's beahaviour
- print("Streets: " .. S("Checking installed mods..."))
+ print("Streets: " .. streets.S("Checking installed mods..."))
if minetest.get_modpath("wool") then
streets.extendedBy.wool = true
else
@@ -90,12 +91,12 @@
return math.floor(num * mult + 0.5) / mult
end
minetest.register_chatcommand("streets",{
- description = S("Check version of your installed StreetsMod and find information"),
+ description = streets.S("Check version of your installed StreetsMod and find information"),
func = function(name,param)
streets.forms.chatcmd:show(name);
end
})
-- Done
- print("Streets: " .. S("Setup completed, have fun with StreetsMod") .. " " .. streets.version .. "!")
+ print("Streets: " .. streets.S("Setup completed, have fun with StreetsMod") .. " " .. streets.version .. "!")
streets.load.fin = os.clock()