Initial commit (version 0.1-test)

This commit is contained in:
2022-11-21 16:12:22 -05:00
commit e4e2a9116d
2062 changed files with 52261 additions and 0 deletions

View File

@@ -0,0 +1 @@
streetsmod

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,58 @@
--[[
StreetsMod: Convert old trafficlights
]]
minetest.register_node(":streets:trafficlight_bottom", {
diggable = false,
pointable = false,
drawtype = "airlike",
description = "I'm an old node, please drop me",
groups = {not_in_creative_inventory = 1}
})
minetest.register_abm({
nodenames = {"streets:trafficlight_bottom"},
interval = 1,
chance = 1,
action = function(pos, node)
minetest.log("action", "Converting trafficlight at position " .. minetest.pos_to_string(pos))
-- Replace controller with distributor
pos.y = pos.y - 2
minetest.set_node(pos, {name = "streets:digiline_distributor"})
-- Change bottom pole
pos.y = pos.y + 2
minetest.set_node(pos, {name = "streets:bigpole", param2 = 2})
-- Change middle pole
pos.y = pos.y + 1
minetest.set_node(pos, {name = "streets:bigpole", param2 = 2})
-- Change the top
pos.y = pos.y + 1
local fd = minetest.get_node(pos).param2
local ch = minetest.get_meta(pos):get_string("channel")
minetest.set_node(pos, {name = "streets:bigpole", param2 = 2})
-- Place new top
if fd == 1 then
minetest.set_node({x = pos.x - 1, y = pos.y, z = pos.z}, {name = "streets:trafficlight_top_warn", param2 = fd})
local meta = minetest.get_meta({x = pos.x - 1, y = pos.y, z = pos.z})
meta:set_string("channel", ch)
meta:set_string("state", "warn")
meta:set_string("formspec", "field[channel;Channel;${channel}]")
elseif fd == 2 then
minetest.set_node({x = pos.x, y = pos.y, z = pos.z + 1}, {name = "streets:trafficlight_top_warn", param2 = fd})
local meta = minetest.get_meta({x = pos.x, y = pos.y, z = pos.z + 1})
meta:set_string("channel", ch)
meta:set_string("state", "warn")
meta:set_string("formspec", "field[channel;Channel;${channel}]")
elseif fd == 3 then
minetest.set_node({x = pos.x + 1, y = pos.y, z = pos.z}, {name = "streets:trafficlight_top_warn", param2 = fd})
local meta = minetest.get_meta({x = pos.x + 1, y = pos.y, z = pos.z})
meta:set_string("channel", ch)
meta:set_string("state", "warn")
meta:set_string("formspec", "field[channel;Channel;${channel}]")
elseif fd == 0 then
minetest.set_node({x = pos.x, y = pos.y, z = pos.z - 1}, {name = "streets:trafficlight_top_warn", param2 = fd})
local meta = minetest.get_meta({x = pos.x, y = pos.y, z = pos.z - 1})
meta:set_string("channel", ch)
meta:set_string("state", "warn")
meta:set_string("formspec", "field[channel;Channel;${channel}]")
end
end
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 941 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 798 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 615 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 605 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 762 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 954 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 977 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 908 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 937 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 985 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 843 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 942 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 906 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 949 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 978 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 938 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1003 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 950 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 953 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 930 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 980 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B