growlight bugfix
This commit is contained in:
parent
7e4bf152ab
commit
8664074c45
@ -108,6 +108,34 @@ techage.register_node({"techage:ta4_reactor_fillerpipe"}, {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local function formspec()
|
||||||
|
local title = S("TA4 Reactor")
|
||||||
|
return "size[8,6]"..
|
||||||
|
default.gui_bg..
|
||||||
|
default.gui_bg_img..
|
||||||
|
default.gui_slots..
|
||||||
|
"box[0,-0.1;7.8,0.5;#c6e8ff]"..
|
||||||
|
"label[3,-0.1;"..minetest.colorize("#000000", title).."]"..
|
||||||
|
"list[context;main;3.5,1;1,1;]"..
|
||||||
|
"list[current_player;main;0,2.3;8,4;]"..
|
||||||
|
"listring[context;main]"..
|
||||||
|
"listring[current_player;main]"
|
||||||
|
end
|
||||||
|
|
||||||
|
local function allow_metadata_inventory_put(pos, listname, index, stack, player)
|
||||||
|
if minetest.is_protected(pos, player:get_player_name()) then
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
local function allow_metadata_inventory_take(pos, listname, index, stack, player)
|
||||||
|
if minetest.is_protected(pos, player:get_player_name()) then
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
return stack:get_count()
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_node("techage:ta4_reactor", {
|
minetest.register_node("techage:ta4_reactor", {
|
||||||
description = S("TA4 Reactor"),
|
description = S("TA4 Reactor"),
|
||||||
tiles = {"techage_reactor_side.png"},
|
tiles = {"techage_reactor_side.png"},
|
||||||
@ -121,7 +149,14 @@ minetest.register_node("techage:ta4_reactor", {
|
|||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-1/2, -23/32, -1/2, 1/2, 32/32, 1/2},
|
fixed = {-1/2, -23/32, -1/2, 1/2, 32/32, 1/2},
|
||||||
},
|
},
|
||||||
|
after_place_node = function(pos)
|
||||||
|
local inv = M(pos):get_inventory()
|
||||||
|
inv:set_size('main', 1)
|
||||||
|
M(pos):set_string("formspec", formspec())
|
||||||
|
end,
|
||||||
|
allow_metadata_inventory_put = allow_metadata_inventory_put,
|
||||||
|
allow_metadata_inventory_take = allow_metadata_inventory_take,
|
||||||
|
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
on_rotate = screwdriver.disallow,
|
on_rotate = screwdriver.disallow,
|
||||||
@ -149,3 +184,20 @@ minetest.register_craft({
|
|||||||
{'default:steel_ingot', 'basic_materials:motor', 'default:steel_ingot'},
|
{'default:steel_ingot', 'basic_materials:motor', 'default:steel_ingot'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_lbm({
|
||||||
|
label = "Upgrade reactor",
|
||||||
|
name = "techage:update_reactor",
|
||||||
|
|
||||||
|
nodenames = {
|
||||||
|
"techage:ta4_reactor",
|
||||||
|
},
|
||||||
|
|
||||||
|
run_at_every_load = true,
|
||||||
|
|
||||||
|
action = function(pos, node)
|
||||||
|
local inv = M(pos):get_inventory()
|
||||||
|
inv:set_size('main', 1)
|
||||||
|
M(pos):set_string("formspec", formspec())
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
2
mod.conf
2
mod.conf
@ -1,4 +1,4 @@
|
|||||||
name = techage
|
name = techage
|
||||||
depends = default,doors,tubelib2,basic_materials,bucket,stairs,screwdriver,minecart,lcdlib,safer_lua
|
depends = default,doors,flowers,tubelib2,basic_materials,bucket,stairs,screwdriver,minecart,lcdlib,safer_lua
|
||||||
optional_depends = unified_inventory,wielded_light,unifieddyes,moreores,ethereal,mesecon
|
optional_depends = unified_inventory,wielded_light,unifieddyes,moreores,ethereal,mesecon
|
||||||
description = Techage, go through 4 tech ages in search of wealth and power!
|
description = Techage, go through 4 tech ages in search of wealth and power!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user