Improvements

This commit is contained in:
2022-11-26 13:52:38 -05:00
parent 512918f24c
commit cf67a8046b
46 changed files with 56 additions and 79 deletions

View File

@@ -1367,14 +1367,14 @@
}
minetest.register_node("infrastructure:traffic_cone", {
description = "Traffic cone",
description = "Traffic Cone",
tiles = { "infrastructure_traffic_cone.png" },
drawtype = "mesh",
mesh = "infrastructure_traffic_cone.obj",
paramtype = "light",
groups = {cracky = 2},
walkable = false,
light_source = ENERGY_ABSORBING_TERMINAL_LIGHT_RANGE,
collision_box = cbox,
selection_box = cbox,
after_place_node = function(pos, placer)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 762 B

After

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 811 B

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 B

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 600 B

After

Width:  |  Height:  |  Size: 387 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 359 B

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 550 B

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 527 B

After

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 979 B

After

Width:  |  Height:  |  Size: 555 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 892 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 924 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 820 B

After

Width:  |  Height:  |  Size: 555 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 660 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 660 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 698 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 742 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 817 B

After

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 649 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 800 B

View File

@@ -1,7 +1,6 @@
--[[
StreetsMod: inDev Trafficlights
]]
dofile(streets.modpath .. "/../trafficlight/old2new.lua")
streets.tlBox = {
{-0.1875,-0.5,0.5,0.1875,0.5,0.75}, --Box

View File

@@ -1,58 +0,0 @@
--[[
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
})