summaryrefslogtreecommitdiff
path: root/streetsmod
diff options
context:
space:
mode:
Diffstat (limited to 'streetsmod')
-rw-r--r--streetsmod/init.lua19
m---------streetsmod/libs/smartfs0
-rw-r--r--streetsmod/nodeboxes/trafficlight.nbe18
-rw-r--r--streetsmod/textures/streets_trafficlight_template.pngbin0 -> 470 bytes
4 files changed, 26 insertions, 11 deletions
diff --git a/streetsmod/init.lua b/streetsmod/init.lua
index 2fb517f..86b7e19 100644
--- a/streetsmod/init.lua
+++ b/streetsmod/init.lua
@@ -14,6 +14,10 @@
else
S = function ( s ) return s end
end
+
+-- rubenwardy: smartfs
+ dofile(minetest.get_modpath("streetsmod").."/libs/smartfs/smartfs.lua")
+
-- Create variables and tables
print("Streets: " .. S("Creating variables and tables..."))
streets = {}
@@ -24,6 +28,7 @@
start = os.clock(),
fin = 0
}
+ streets.forms = {}
-- Check for mods which change this mod's beahaviour
print("Streets: " .. S("Checking installed mods..."))
@@ -57,12 +62,21 @@
else
streets.extendedBy.prefab = false
end
+ if minetest.get_modpath("awards") then
+ streets.extendedBy.awards = true
+ else
+ streets.extendedBy.awards = false
+ end
-- Streets chatcommand
local function round(num, idp)
local mult = 10^(idp or 0)
return math.floor(num * mult + 0.5) / mult
end
+ streets.forms.chatcmd = smartfs.create("streets:chatcmd", function(state)
+ state:size(10,6)
+
+ end)
minetest.register_chatcommand("streets",{
description = S("Check version of your installed StreetsMod and find information"),
func = function(name,param)
@@ -74,8 +88,9 @@
"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.5;Running version: " .. streets.version .. "]",
- "label[0,5;Load time: " .. round(streets.load.fin - streets.load.start,4) .. "s]"
+ "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]"
}))
end
})
diff --git a/streetsmod/libs/smartfs b/streetsmod/libs/smartfs
-Subproject c700a1234606a8b5341611748d70b6578cabc36
+Subproject 847ab09feafc1288a026e00ec0d563fe21ae91f
diff --git a/streetsmod/nodeboxes/trafficlight.nbe b/streetsmod/nodeboxes/trafficlight.nbe
index aa30fc6..7842206 100644
--- a/streetsmod/nodeboxes/trafficlight.nbe
+++ b/streetsmod/nodeboxes/trafficlight.nbe
@@ -5,13 +5,13 @@ NAME test
NODE node1
POSITION 0 0 0
NODEBOX nodebox1 -0.1875 -0.5 0.5 0.1875 0.5 0.75
-NODEBOX nodebox2 -0.0625 0.375 0.32 0.0625 0.429368 0.51
-NODEBOX nodebox3 -0.0625 0.0625 0.32 0.0625 0.125 0.51
-NODEBOX nodebox4 -0.0625 -0.25 0.32 0.0625 -0.1875 0.51
-NODEBOX nodebox5 0.0512648 0.32 0.32 0.113765 0.38 0.5
-NODEBOX nodebox6 -0.131446 0.32 0.32 -0.0689464 0.38 0.5
-NODEBOX nodebox7 0.0571587 0.001 0.32 0.119659 0.06 0.53
-NODEBOX nodebox8 -0.131446 0.001 0.32 -0.0689464 0.06 0.53
-NODEBOX nodebox9 0.0571587 -0.31 0.32 0.119659 -0.25 0.539972
-NODEBOX nodebox10 -0.125553 -0.31 0.32 -0.0630526 -0.25 0.60652
+NODEBOX nodebox2 -0.05 0.375 0.32 0.05 0.429368 0.51
+NODEBOX nodebox3 -0.05 0.0625 0.32 0.05 0.125 0.51
+NODEBOX nodebox4 -0.05 -0.25 0.32 0.05 -0.1875 0.51
+NODEBOX nodebox5 0.05 0.32 0.32 0.1 0.38 0.5
+NODEBOX nodebox6 -0.1 0.32 0.32 -0.05 0.38 0.5
+NODEBOX nodebox7 0.05 0.001 0.32 0.1 0.06 0.5
+NODEBOX nodebox8 -0.1 0.001 0.32 -0.05 0.06 0.5
+NODEBOX nodebox9 0.05 -0.31 0.32 0.1 -0.25 0.5
+NODEBOX nodebox10 -0.1 -0.31 0.32 -0.05 -0.25 0.5
END NODE \ No newline at end of file
diff --git a/streetsmod/textures/streets_trafficlight_template.png b/streetsmod/textures/streets_trafficlight_template.png
new file mode 100644
index 0000000..72b6b02
--- /dev/null
+++ b/streetsmod/textures/streets_trafficlight_template.png
Binary files differ