Various bugfixes and improvements
parent
97266a5748
commit
138eb8fed4
|
@ -63,7 +63,7 @@ minetest.register_node("streets:fence_chainlink", {
|
||||||
sound = default.node_sound_stone_defaults()
|
sound = default.node_sound_stone_defaults()
|
||||||
})
|
})
|
||||||
|
|
||||||
function toggleDoor(pos, node, player, action)
|
local function toggleDoor(pos, node, player, action)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, { protection_bypass = true }) then
|
if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, { protection_bypass = true }) then
|
||||||
minetest.record_protection_violation(pos, name)
|
minetest.record_protection_violation(pos, name)
|
||||||
|
@ -103,8 +103,10 @@ minetest.register_node("streets:fence_chainlink_door_open", {
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{ -16 / 32, -0.5, -1 / 32, -14 / 32, 0.5, 1 / 32 }, { 16 / 32, -0.5, -1 / 32, 14 / 32, 0.5, 1 / 32 },
|
{ -16 / 32, -0.5, -1 / 32, -14 / 32, 0.5, 1 / 32 },
|
||||||
{ -15 / 32, -0.5, 0, -15 / 32, 0.5, 0.5 }, { 15 / 32, -0.5, 0, 15 / 32, 0.5, 0.5 }
|
{ 14 / 32, -0.5, -1 / 32, 16 / 32, 0.5, 1 / 32 },
|
||||||
|
{ -15 / 32, -0.5, 0, -15 / 32, 0.5, 0.5 },
|
||||||
|
{ 15 / 32, -0.5, 0, 15 / 32, 0.5, 0.5 }
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
sound = default.node_sound_stone_defaults(),
|
sound = default.node_sound_stone_defaults(),
|
||||||
|
@ -125,7 +127,8 @@ minetest.register_node("streets:fence_chainlink_door_closed", {
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{ -16 / 32, -0.5, -1 / 32, -14 / 32, 0.5, 1 / 32 }, { 16 / 32, -0.5, -1 / 32, 14 / 32, 0.5, 1 / 32 },
|
{ -16 / 32, -0.5, -1 / 32, -14 / 32, 0.5, 1 / 32 },
|
||||||
|
{ 14 / 32, -0.5, -1 / 32, 16 / 32, 0.5, 1 / 32 },
|
||||||
{ -15 / 32, -0.5, 0, 15 / 32, 0.5, 0 }
|
{ -15 / 32, -0.5, 0, 15 / 32, 0.5, 0 }
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -164,16 +167,18 @@ minetest.register_node("streets:guardrail", {
|
||||||
groups = { cracky = 1, wall = 1 },
|
groups = { cracky = 1, wall = 1 },
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "connected",
|
type = "connected",
|
||||||
fixed = { { -0.1, -0.5, -0.1, 0.1, 0.5, 0.1 }, },
|
fixed = {
|
||||||
|
{ -0.1, -0.5, -0.1, 0.1, 0.5, 0.1 },
|
||||||
|
},
|
||||||
connect_front = {
|
connect_front = {
|
||||||
{ 0, -0.1875, -0.5, 0, 0.4375, 0 },
|
{ 0, -0.1875, -0.5, 0, 0.4375, 0 },
|
||||||
{ -0.0625, 0.1875, -0.5, 0.0625, 0.3125, 0 },
|
{ -0.0625, 0.1875, -0.5, 0.0625, 0.3125, 0 },
|
||||||
{ -0.0625, -0.0625, -0.5, 0.0625, 0.0625, 0 },
|
{ -0.0625, -0.0625, -0.5, 0.0625, 0.0625, 0 },
|
||||||
}, -- z-
|
}, -- z-
|
||||||
connect_back = {
|
connect_back = {
|
||||||
{ 0, -0.1875, 0.5, 0, 0.4375, 0 },
|
{ 0, -0.1875, 0, 0, 0.4375, 0.5 },
|
||||||
{ -0.0625, 0.1875, 0.5, 0.0625, 0.3125, 0 },
|
{ -0.0625, 0.1875, 0, 0.0625, 0.3125, 0.5 },
|
||||||
{ -0.0625, -0.0625, 0.5, 0.0625, 0.0625, 0 },
|
{ -0.0625, -0.0625, 0, 0.0625, 0.0625, 0.5 },
|
||||||
}, -- z+
|
}, -- z+
|
||||||
connect_left = {
|
connect_left = {
|
||||||
{ -0.5, -0.1875, 0, 0, 0.4375, 0 },
|
{ -0.5, -0.1875, 0, 0, 0.4375, 0 },
|
||||||
|
@ -181,9 +186,9 @@ minetest.register_node("streets:guardrail", {
|
||||||
{ -0.5, -0.0625, -0.0625, 0, 0.0625, 0.0625 },
|
{ -0.5, -0.0625, -0.0625, 0, 0.0625, 0.0625 },
|
||||||
}, -- x-
|
}, -- x-
|
||||||
connect_right = {
|
connect_right = {
|
||||||
{ 0.5, -0.1875, 0, 0, 0.4375, 0 },
|
{ 0, -0.1875, 0, 0.5, 0.4375, 0 },
|
||||||
{ 0.5, 0.1875, -0.0625, 0, 0.3125, 0.0625 },
|
{ 0, 0.1875, -0.0625, 0.5, 0.3125, 0.0625 },
|
||||||
{ 0.5, -0.0625, -0.0625, 0, 0.0625, 0.0625 },
|
{ 0, -0.0625, -0.0625, 0.5, 0.0625, 0.0625 },
|
||||||
}, -- x+
|
}, -- x+
|
||||||
},
|
},
|
||||||
connects_to = { "group:wall", "group:stone", "group:wood", "group:tree", "group:concrete" },
|
connects_to = { "group:wall", "group:stone", "group:wood", "group:tree", "group:concrete" },
|
||||||
|
|
|
@ -11,16 +11,38 @@ minetest.register_node("streets:roadwork_traffic_barrier", {
|
||||||
description = "Traffic Barrier",
|
description = "Traffic Barrier",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = { streets.concrete_texture, streets.concrete_texture, streets.concrete_texture .. "^streets_roadwork_traffic_barrier.png" },
|
tiles = {
|
||||||
|
streets.concrete_texture .. "^" .. streets.concrete_texture, --Workaround, see minetest/minestest#5582
|
||||||
|
streets.concrete_texture,
|
||||||
|
streets.concrete_texture .. "^streets_roadwork_traffic_barrier.png",
|
||||||
|
streets.concrete_texture .. "^streets_roadwork_traffic_barrier.png",
|
||||||
|
streets.concrete_texture .. "^streets_roadwork_traffic_barrier.png",
|
||||||
|
streets.concrete_texture .. "^streets_roadwork_traffic_barrier.png"
|
||||||
|
},
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
groups = { cracky = 1, level = 2, wall = 1 },
|
groups = { cracky = 1, level = 2, wall = 1 },
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "connected",
|
type = "connected",
|
||||||
fixed = { { -0.35, -0.5, -0.35, 0.35, -0.4, 0.35 }, { -0.15, -0.5, -0.15, 0.15, 0.5, 0.15 } },
|
fixed = {
|
||||||
connect_front = { { -0.35, -0.5, -0.5, 0.35, -0.4, 0.35 }, { -0.15, -0.5, -0.5, 0.15, 0.5, 0.15 } }, -- z-
|
{ -0.35, -0.5, -0.35, 0.35, -0.4, 0.35 },
|
||||||
connect_back = { { -0.35, -0.5, -0.35, 0.35, -0.4, 0.5 }, { -0.15, -0.5, -0.15, 0.15, 0.5, 0.5 } }, -- z+
|
{ -0.15, -0.5, -0.15, 0.15, 0.5, 0.15 }
|
||||||
connect_left = { { -0.5, -0.5, -0.35, 0.35, -0.4, 0.35 }, { -0.5, -0.5, -0.15, 0.15, 0.5, 0.15 } }, -- x-
|
},
|
||||||
connect_right = { { -0.35, -0.5, -0.35, 0.5, -0.4, 0.35 }, { -0.15, -0.5, -0.15, 0.5, 0.5, 0.15 } }, -- x+
|
connect_front = {
|
||||||
|
{ -0.35, -0.5, -0.5, 0.35, -0.4, 0.35 },
|
||||||
|
{ -0.15, -0.5, -0.5, 0.15, 0.5, 0.15 }
|
||||||
|
}, -- z-
|
||||||
|
connect_back = {
|
||||||
|
{ -0.35, -0.5, -0.35, 0.35, -0.4, 0.5 },
|
||||||
|
{ -0.15, -0.5, -0.15, 0.15, 0.5, 0.5 }
|
||||||
|
}, -- z+
|
||||||
|
connect_left = {
|
||||||
|
{ -0.5, -0.5, -0.35, 0.35, -0.4, 0.35 },
|
||||||
|
{ -0.5, -0.5, -0.15, 0.15, 0.5, 0.15 }
|
||||||
|
}, -- x-
|
||||||
|
connect_right = {
|
||||||
|
{ -0.35, -0.5, -0.35, 0.5, -0.4, 0.35 },
|
||||||
|
{ -0.15, -0.5, -0.15, 0.5, 0.5, 0.15 }
|
||||||
|
}, -- x+
|
||||||
},
|
},
|
||||||
connects_to = { "group:wall", "group:stone", "group:wood", "group:tree", "group:concrete" },
|
connects_to = { "group:wall", "group:stone", "group:wood", "group:tree", "group:concrete" },
|
||||||
sound = default.node_sound_stone_defaults()
|
sound = default.node_sound_stone_defaults()
|
||||||
|
@ -172,7 +194,7 @@ minetest.register_node("streets:roadwork_blinking_light_off", {
|
||||||
minetest.set_node(pos, { name = "streets:roadwork_blinking_light_on", param2 = minetest.get_node(pos).param2 })
|
minetest.set_node(pos, { name = "streets:roadwork_blinking_light_on", param2 = minetest.get_node(pos).param2 })
|
||||||
end,
|
end,
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
timer = minetest.get_node_timer(pos)
|
local timer = minetest.get_node_timer(pos)
|
||||||
timer:start(1)
|
timer:start(1)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
@ -197,7 +219,7 @@ minetest.register_node("streets:roadwork_blinking_light_on", {
|
||||||
minetest.set_node(pos, { name = "streets:roadwork_blinking_light_off", param2 = minetest.get_node(pos).param2 })
|
minetest.set_node(pos, { name = "streets:roadwork_blinking_light_off", param2 = minetest.get_node(pos).param2 })
|
||||||
end,
|
end,
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
timer = minetest.get_node_timer(pos)
|
local timer = minetest.get_node_timer(pos)
|
||||||
timer:start(1)
|
timer:start(1)
|
||||||
end,
|
end,
|
||||||
drop = "streets:roadwork_blinking_light_off",
|
drop = "streets:roadwork_blinking_light_off",
|
||||||
|
@ -219,7 +241,7 @@ minetest.register_abm({
|
||||||
interval = 10,
|
interval = 10,
|
||||||
chance = 1,
|
chance = 1,
|
||||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
timer = minetest.get_node_timer(pos)
|
local timer = minetest.get_node_timer(pos)
|
||||||
if not timer:is_started() then
|
if not timer:is_started() then
|
||||||
timer:start(1)
|
timer:start(1)
|
||||||
end
|
end
|
||||||
|
@ -332,7 +354,7 @@ minetest.register_node("streets:roadwork_delineator_light_off_top", {
|
||||||
minetest.set_node(pos, { name = "streets:roadwork_delineator_light_on_top", param2 = minetest.get_node(pos).param2 })
|
minetest.set_node(pos, { name = "streets:roadwork_delineator_light_on_top", param2 = minetest.get_node(pos).param2 })
|
||||||
end,
|
end,
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
timer = minetest.get_node_timer(pos)
|
local timer = minetest.get_node_timer(pos)
|
||||||
timer:start(1)
|
timer:start(1)
|
||||||
end,
|
end,
|
||||||
node_box = {
|
node_box = {
|
||||||
|
@ -365,7 +387,7 @@ minetest.register_node("streets:roadwork_delineator_light_on_top", {
|
||||||
minetest.set_node(pos, { name = "streets:roadwork_delineator_light_off_top", param2 = minetest.get_node(pos).param2 })
|
minetest.set_node(pos, { name = "streets:roadwork_delineator_light_off_top", param2 = minetest.get_node(pos).param2 })
|
||||||
end,
|
end,
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
timer = minetest.get_node_timer(pos)
|
local timer = minetest.get_node_timer(pos)
|
||||||
timer:start(1)
|
timer:start(1)
|
||||||
end,
|
end,
|
||||||
drop = "streets:roadwork_delineator_light_off_top",
|
drop = "streets:roadwork_delineator_light_off_top",
|
||||||
|
|
Loading…
Reference in New Issue