Fix MT v5.4 issues #52 and #53

master
Joachim Stolberg 2021-03-17 19:36:47 +01:00
parent be9080b27b
commit 29ad918960
36 changed files with 78 additions and 4 deletions

View File

@ -79,11 +79,13 @@ local function del_pos(pos, player)
end
local function get_pos_list(player)
return minetest.deserialize(player:get_attribute("techage_forceload_blocks")) or {}
local meta = player:get_meta()
return minetest.deserialize(meta:get_string("techage_forceload_blocks")) or {}
end
local function set_pos_list(player, lPos)
player:set_attribute("techage_forceload_blocks", minetest.serialize(lPos))
local meta = player:get_meta()
meta:set_string("techage_forceload_blocks", minetest.serialize(lPos))
end
local function shoe_flbs(pos, name, range)

View File

@ -70,7 +70,6 @@ function techage.recipes.add(rtype, recipe)
local inp = recipe.input[idx] or ""
name, num = unpack(string.split(inp, " "))
item.input[idx] = {name = name or "", num = tonumber(num) or 0}
name2 = name
end
if recipe.waste then
name, num = unpack(string.split(recipe.waste, " "))

View File

@ -88,6 +88,7 @@ minetest.register_node("techage:tubeS", {
},
on_rotate = screwdriver.disallow,
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
groups = {choppy=2, cracky=3},
@ -128,6 +129,7 @@ minetest.register_node("techage:tubeA", {
},
on_rotate = screwdriver.disallow,
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
groups = {choppy=2, cracky=3, not_in_creative_inventory=1},

View File

@ -55,6 +55,7 @@ minetest.register_node("techage:ta4_tubeS", {
},
on_rotate = screwdriver.disallow,
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
groups = {choppy=2, cracky=3},
@ -95,6 +96,7 @@ minetest.register_node("techage:ta4_tubeA", {
},
on_rotate = screwdriver.disallow,
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
groups = {choppy=2, cracky=3, not_in_creative_inventory=1},

View File

@ -80,6 +80,7 @@ minetest.register_node("techage:chest_cart", {
},
paramtype2 = "facedir",
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
groups = {cracky = 2, crumbly = 2, choppy = 2},

View File

@ -111,6 +111,7 @@ minetest.register_node("techage:tank_cart", {
},
paramtype2 = "facedir",
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
groups = {cracky = 2, crumbly = 2, choppy = 2},

View File

@ -111,6 +111,7 @@ minetest.register_node("techage:ta4_liquid_filter_filler", {
paramtype = "light",
paramtype2 = "facedir",
use_texture_alpha = "clip",
on_rotate = screwdriver.disallow,
groups = {cracky=2},
is_ground_content = false,
@ -189,6 +190,7 @@ minetest.register_node("techage:ta4_liquid_filter_sink", {
end,
paramtype = "light",
use_texture_alpha = "clip",
paramtype2 = "facedir",
on_rotate = screwdriver.disallow,
groups = {cracky=2},

View File

@ -56,6 +56,7 @@ minetest.register_node("techage:ta4_reactor_fillerpipe", {
end,
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
paramtype2 = "facedir",
on_rotate = screwdriver.disallow,
@ -167,6 +168,7 @@ minetest.register_node("techage:ta4_reactor", {
allow_metadata_inventory_take = allow_metadata_inventory_take,
paramtype = "light",
use_texture_alpha = "clip",
paramtype2 = "facedir",
on_rotate = screwdriver.disallow,
groups = {cracky=2},

View File

@ -122,6 +122,7 @@ minetest.register_node("techage:ta4_reactor_stand", {
end,
paramtype = "light",
use_texture_alpha = "clip",
paramtype2 = "facedir",
on_rotate = screwdriver.disallow,
groups = {cracky=2},

View File

@ -148,6 +148,7 @@ minetest.register_node("techage:construction_board", {
paramtype2 = "wallmounted",
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
@ -199,6 +200,7 @@ minetest.register_node("techage:construction_board_EN", {
paramtype2 = "wallmounted",
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},

View File

@ -99,6 +99,7 @@ minetest.register_node("techage:ta4_battery", {
end,
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
paramtype2 = "facedir",
groups = {choppy=1, cracky=1, crumbly=1},
@ -132,6 +133,7 @@ minetest.register_node("techage:ta4_battery_empty", {
end,
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
paramtype2 = "facedir",
groups = {choppy=1, cracky=1, crumbly=1, not_in_creative_inventory=1},

View File

@ -395,6 +395,7 @@ minetest.register_node("techage:ta4_icta_controller", {
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
use_texture_alpha = "clip",
groups = {choppy=1, cracky=1, crumbly=1},
is_ground_content = false,
sounds = default.node_sound_stone_defaults(),

View File

@ -90,6 +90,7 @@ minetest.register_node("techage:ta4_display", {
tiles = {"techage_display.png"},
drawtype = "nodebox",
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
paramtype2 = "wallmounted",
node_box = techage.display.lcd_box,
@ -137,6 +138,7 @@ minetest.register_node("techage:ta4_displayXL", {
tiles = {"techage_displayXL.png"},
drawtype = "nodebox",
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
paramtype2 = "wallmounted",
node_box = techage.display.lcd_boxXL,

View File

@ -61,6 +61,7 @@ minetest.register_node("techage:ta4_signaltower", {
end,
paramtype = "light",
use_texture_alpha = "clip",
light_source = 0,
sunlight_propagates = true,
paramtype2 = "facedir",
@ -92,6 +93,7 @@ for _,color in ipairs({"green", "amber", "red"}) do
end,
paramtype = "light",
use_texture_alpha = "clip",
light_source = 10,
sunlight_propagates = true,
paramtype2 = "facedir",

View File

@ -147,6 +147,7 @@ for idx = 0,3 do
minecart_hopper_untakeitem = minecart_hopper_untakeitem,
paramtype = "light",
use_texture_alpha = "clip",
sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir",
sunlight_propagates = true,

View File

@ -146,6 +146,7 @@ function techage.register_lamp(basename, ndef_off, ndef_on)
ndef_off.on_rotate = ndef_off.on_rotate or on_rotate
ndef_off.on_timer = node_timer
ndef_off.paramtype = "light"
ndef_off.use_texture_alpha = "clip"
ndef_off.light_source = 0
ndef_off.sunlight_propagates = true
ndef_off.paramtype2 = "facedir"
@ -165,6 +166,7 @@ function techage.register_lamp(basename, ndef_off, ndef_on)
ndef_on.on_rotate = ndef_on.on_rotate or on_rotate
ndef_on.on_timer = ndef_on.on_timer or node_timer
ndef_on.paramtype = "light"
ndef_on.use_texture_alpha = "clip"
ndef_on.light_source = minetest.LIGHT_MAX
ndef_on.sunlight_propagates = true
ndef_on.paramtype2 = "facedir"

View File

@ -77,6 +77,7 @@ minetest.register_node("techage:ta3_pipeS", {
},
on_rotate = screwdriver.disallow, -- important!
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
groups = {crumbly = 2, cracky = 2, snappy = 2},
@ -111,6 +112,7 @@ minetest.register_node("techage:ta3_pipeA", {
},
on_rotate = screwdriver.disallow, -- important!
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
groups = {crumbly = 2, cracky = 2, snappy = 2, not_in_creative_inventory=1},

View File

@ -128,6 +128,7 @@ minetest.register_node("techage:ta3_valve_open", {
},
on_rotate = screwdriver.disallow, -- important!
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
groups = {crumbly = 2, cracky = 2, snappy = 2},
@ -167,6 +168,7 @@ minetest.register_node("techage:ta3_valve_closed", {
},
on_rotate = screwdriver.disallow, -- important!
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
groups = {crumbly = 2, cracky = 2, snappy = 2, not_in_creative_inventory = 1},

View File

@ -237,6 +237,9 @@ minetest.register_node("techage:ta4_button_off", {
after_dig_node = after_dig_node,
on_rotate = screwdriver.disallow,
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
paramtype2 = "facedir",
groups = {choppy=2, cracky=2, crumbly=2},
is_ground_content = false,
@ -269,7 +272,9 @@ minetest.register_node("techage:ta4_button_on", {
on_rotate = screwdriver.disallow,
techage_set_numbers = techage_set_numbers,
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
paramtype2 = "facedir",
groups = {choppy=2, cracky=2, crumbly=2, not_in_creative_inventory=1},
is_ground_content = false,

View File

@ -224,6 +224,7 @@ local function register_terminal(num, tiles, node_box, selection_box)
end,
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
paramtype2 = "facedir",
groups = {choppy=2, cracky=2, crumbly=2},

View File

@ -553,6 +553,7 @@ minetest.register_node("techage:ta4_lua_controller", {
on_timer = on_timer,
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
paramtype2 = "facedir",
groups = {choppy=1, cracky=1, crumbly=1},

View File

@ -104,6 +104,7 @@ on_timer = function(pos, elasped)
paramtype = "light",
sunlight_propagates = true,
use_texture_alpha = "clip",
paramtype2 = "facedir",
groups = {choppy=1, cracky=1, crumbly=1},
is_ground_content = false,

View File

@ -179,6 +179,7 @@ minetest.register_node("techage:ta4_terminal", {
end,
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
paramtype2 = "facedir",
groups = {choppy=2, cracky=2, crumbly=2},

View File

@ -38,6 +38,7 @@ minetest.register_node("techage:oiltower1", {
diggable = false,
paramtype2 = "facedir",
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
groups = {not_in_creative_inventory = 1},
is_ground_content = false,
@ -70,6 +71,7 @@ minetest.register_node("techage:oiltower2", {
diggable = false,
paramtype2 = "facedir",
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
groups = {not_in_creative_inventory = 1},
is_ground_content = false,
@ -102,6 +104,7 @@ minetest.register_node("techage:oiltower3", {
diggable = false,
paramtype2 = "facedir",
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
groups = {not_in_creative_inventory = 1},
is_ground_content = false,
@ -134,6 +137,7 @@ minetest.register_node("techage:oiltower4", {
diggable = false,
paramtype2 = "facedir",
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
groups = {not_in_creative_inventory = 1},
is_ground_content = false,
@ -156,6 +160,7 @@ minetest.register_node("techage:oiltower5", {
diggable = false,
paramtype2 = "facedir",
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
groups = {not_in_creative_inventory = 1},
is_ground_content = false,
@ -169,6 +174,7 @@ minetest.register_node("techage:oil_drillbit", {
wield_image = "techage_oil_drillbit_inv.png",
visual_scale = 1,
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
groups = {cracky = 1},
is_ground_content = false,
@ -182,6 +188,7 @@ minetest.register_node("techage:oil_drillbit2", {
wield_image = "techage_oil_drillbit_inv.png",
visual_scale = 1,
paramtype = "light",
use_texture_alpha = "clip",
drop = "",
diggable = false,
sunlight_propagates = true,

View File

@ -67,6 +67,7 @@ minetest.register_node("techage:axle", {
},
on_rotate = screwdriver.disallow, -- important!
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
groups = {crumbly = 3, cracky = 3, snappy = 3},
@ -160,6 +161,7 @@ minetest.register_node("techage:axle_on", {
},
on_rotate = screwdriver.disallow, -- important!
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
diggable = false,

View File

@ -117,6 +117,7 @@ minetest.register_node("techage:electric_cableS", {
},
on_rotate = screwdriver.disallow, -- important!
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3, techage_trowel = 1},
@ -153,6 +154,7 @@ minetest.register_node("techage:electric_cableA", {
},
on_rotate = screwdriver.disallow, -- important!
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3,

View File

@ -64,6 +64,7 @@ minetest.register_node("techage:power_line", {
},
on_rotate = screwdriver.disallow, -- important!
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
drop = "techage:power_lineS",
@ -105,6 +106,7 @@ minetest.register_node("techage:power_lineS", {
},
on_rotate = screwdriver.disallow, -- important!
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
drop = "techage:power_lineS",
@ -168,6 +170,7 @@ minetest.register_node("techage:power_lineA", {
},
on_rotate = screwdriver.disallow, -- important!
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
drop = "techage:power_lineS",
@ -222,6 +225,7 @@ minetest.register_node("techage:power_pole2", {
on_rotate = screwdriver.disallow, -- important!
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
groups = {cracky=2, crumbly=2, choppy=2},
@ -267,6 +271,7 @@ minetest.register_node("techage:power_pole", {
on_rotate = screwdriver.disallow, -- important!
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
groups = {cracky=2, crumbly=2, choppy=2},
@ -317,6 +322,7 @@ minetest.register_node("techage:power_pole_conn", {
drop = "techage:power_pole",
on_rotate = screwdriver.disallow, -- important!
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
groups = {cracky=2, crumbly=2, choppy=2, not_in_creative_inventory = 1},
@ -344,6 +350,7 @@ minetest.register_node("techage:power_pole3", {
},
on_rotate = screwdriver.disallow, -- important!
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
groups = {cracky=2, crumbly=2, choppy=2},

View File

@ -209,6 +209,7 @@ minetest.register_node("techage:power_terminal", {
paramtype2 = "facedir",
paramtype = "light",
use_texture_alpha = "clip",
on_rotate = screwdriver.disallow,
sunlight_propagates = true,
is_ground_content = false,

View File

@ -555,6 +555,7 @@ minetest.register_node("techage:ta3_power_terminal", {
paramtype2 = "facedir",
paramtype = "light",
use_texture_alpha = "clip",
on_rotate = screwdriver.disallow,
sunlight_propagates = true,
is_ground_content = false,

View File

@ -114,6 +114,7 @@ minetest.register_node("techage:powerswitch", {
on_rotate = screwdriver.disallow,
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
paramtype2 = "wallmounted",
groups = {choppy=2, cracky=2, crumbly=2},
@ -145,6 +146,7 @@ minetest.register_node("techage:powerswitch_on", {
drop = "techage:powerswitch",
on_rotate = screwdriver.disallow,
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
paramtype2 = "wallmounted",
groups = {choppy=2, cracky=2, crumbly=2, not_in_creative_inventory = 1},
@ -184,6 +186,7 @@ minetest.register_node("techage:powerswitchsmall", {
on_rotate = screwdriver.disallow,
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
paramtype2 = "wallmounted",
groups = {choppy=2, cracky=2, crumbly=2},
@ -215,6 +218,7 @@ minetest.register_node("techage:powerswitchsmall_on", {
drop = "techage:powerswitchsmall",
on_rotate = screwdriver.disallow,
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
paramtype2 = "wallmounted",
groups = {choppy=2, cracky=2, crumbly=2, not_in_creative_inventory = 1},

View File

@ -54,6 +54,7 @@ minetest.register_node("techage:powerswitch_box", {
end,
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
on_rotate = screwdriver.disallow, -- important!
paramtype2 = "facedir",

View File

@ -63,6 +63,7 @@ minetest.register_node("techage:steam_pipeS", {
},
on_rotate = screwdriver.disallow, -- important!
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
groups = {crumbly=3, cracky=3, snappy=3},
@ -95,6 +96,7 @@ minetest.register_node("techage:steam_pipeA", {
},
on_rotate = screwdriver.disallow, -- important!
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
groups = {crumbly=3, cracky=3, snappy=3, not_in_creative_inventory=1},

View File

@ -76,6 +76,7 @@ minetest.register_node("techage:ta4_power_cableS", {
},
on_rotate = screwdriver.disallow, -- important!
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3},
@ -109,6 +110,7 @@ minetest.register_node("techage:ta4_power_cableA", {
},
on_rotate = screwdriver.disallow, -- important!
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3, not_in_creative_inventory = 1},
@ -159,6 +161,7 @@ minetest.register_node("techage:ta4_power_box", {
on_rotate = screwdriver.disallow, -- important!
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
is_ground_content = false,
groups = {cracky=2, crumbly=2, choppy=2},

View File

@ -109,6 +109,7 @@ minetest.register_node("techage:ta4_solar_minicell", {
paramtype2 = "facedir",
groups = {cracky=2, crumbly=2, choppy=2},
is_ground_content = false,
use_texture_alpha = "clip",
after_place_node = after_place_node,
after_dig_node = after_dig_node,

View File

@ -133,6 +133,7 @@ minetest.register_node("techage:ta4_solar_module", {
return S("power").." = "..power..", "..S("light").." = "..light
end,
paramtype = "light",
use_texture_alpha = "clip",
paramtype2 = "facedir",
on_rotate = screwdriver.disallow,
groups = {cracky=2, crumbly=2, choppy=2},
@ -172,6 +173,7 @@ minetest.register_node("techage:ta4_solar_carrier", {
networks = net_def1,
paramtype = "light",
use_texture_alpha = "clip",
paramtype2 = "facedir",
on_rotate = screwdriver.disallow,
groups = {cracky=2, crumbly=2, choppy=2},
@ -211,6 +213,7 @@ minetest.register_node("techage:ta4_solar_carrierB", {
networks = net_def2,
paramtype = "light",
use_texture_alpha = "clip",
paramtype2 = "facedir",
on_rotate = screwdriver.disallow,
groups = {cracky=2, crumbly=2, choppy=2},
@ -239,6 +242,7 @@ minetest.register_node("techage:ta4_solar_carrierT", {
},
paramtype = "light",
use_texture_alpha = "clip",
paramtype2 = "facedir",
groups = {cracky=2, crumbly=2, choppy=2},
is_ground_content = false,

View File

@ -52,6 +52,7 @@ minetest.register_node("techage:rotor_signal_lamp_off", {
end,
paramtype = "light",
use_texture_alpha = "clip",
paramtype2 = "glasslikeliquidlevel",
sunlight_propagates = true,
sounds = default.node_sound_glass_defaults(),
@ -77,6 +78,7 @@ minetest.register_node("techage:rotor_signal_lamp_on", {
end,
paramtype = "light",
use_texture_alpha = "clip",
light_source = 8,
paramtype2 = "glasslikeliquidlevel",
sunlight_propagates = true,