added forgotten function

This commit is contained in:
Jack Harrier 2016-08-10 00:29:06 +02:00
parent aa1651f74a
commit f4680232e7

View File

@ -262,6 +262,24 @@ local function run(pos, node)
end
end
-- find least inventory size from inventory
local function least_inventory_size_index(inv)
local least = 100
local index = 1
for i=1, inv:get_size("src"), 1 do
local stack = inv:get_stack("src", i)
if stack:get_count() < least then
least = stack:get_count()
index = i
end
end
return index
end
-- sort fuel rods in equal stacks
local function sort_fuel_rods(pos, node, stack, direction)
local meta = minetest.get_meta(pos)
@ -282,6 +300,10 @@ local function sort_fuel_rods(pos, node, stack, direction)
return stack
end
minetest.register_node("technic:hv_nuclear_reactor_core", {
description = reactor_desc,
tiles = {"technic_hv_nuclear_reactor_core.png"},