build old_signs table from signs_equiv instead of declaring it outright.
This commit is contained in:
parent
9f4116e3e1
commit
27276e4036
@ -3,15 +3,6 @@
|
|||||||
local S = street_signs.gettext
|
local S = street_signs.gettext
|
||||||
|
|
||||||
if minetest.get_modpath("infrastructure") then
|
if minetest.get_modpath("infrastructure") then
|
||||||
local old_signs = {
|
|
||||||
"infrastructure:road_sign_stop",
|
|
||||||
"infrastructure:road_sign_stop_on_post",
|
|
||||||
"infrastructure:road_sign_yield",
|
|
||||||
"infrastructure:road_sign_yield_on_post",
|
|
||||||
"infrastructure:road_sign_crosswalk",
|
|
||||||
"infrastructure:road_sign_crosswalk_on_post"
|
|
||||||
}
|
|
||||||
|
|
||||||
local signs_equiv = {
|
local signs_equiv = {
|
||||||
["infrastructure:road_sign_stop"] = "street_signs:sign_stop",
|
["infrastructure:road_sign_stop"] = "street_signs:sign_stop",
|
||||||
["infrastructure:road_sign_stop_on_post"] = "street_signs:sign_stop_onpole",
|
["infrastructure:road_sign_stop_on_post"] = "street_signs:sign_stop_onpole",
|
||||||
@ -21,11 +12,14 @@ if minetest.get_modpath("infrastructure") then
|
|||||||
["infrastructure:road_sign_crosswalk_on_post"] = "street_signs:sign_pedestrian_crossing_onpole",
|
["infrastructure:road_sign_crosswalk_on_post"] = "street_signs:sign_pedestrian_crossing_onpole",
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, name in ipairs(old_signs) do
|
local old_signs = {}
|
||||||
minetest.unregister_item(name)
|
|
||||||
if not string.find(name, "on_post") then
|
for old, new in pairs(signs_equiv) do
|
||||||
minetest.clear_craft({output = name})
|
minetest.unregister_item(old)
|
||||||
|
if not string.find(old, "on_post") then
|
||||||
|
minetest.clear_craft({output = old})
|
||||||
end
|
end
|
||||||
|
old_signs[#old_signs+1] = old
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_alias_force("infrastructure:road_sign_retroreflective_surface", "air")
|
minetest.register_alias_force("infrastructure:road_sign_retroreflective_surface", "air")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user