From d55f9ce03093983e91e26e0721ab873d8e407e5f Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Tue, 30 Apr 2019 22:45:28 +0200 Subject: [PATCH] funnel added, gravel sieve adapter --- basic_machines/gravelsieve.lua | 31 +- basis/gravel_lib.lua | 83 ++++ init.lua | 2 + iron_age/funnel.lua | 140 +++++++ iron_age/gravelsieve.lua | 361 +++++------------- textures/techage_appl_blackhole.png | Bin 171 -> 156 bytes textures/techage_appl_forceload.png | Bin 1310 -> 656 bytes textures/techage_appl_funnel.png | Bin 0 -> 159 bytes textures/techage_appl_funnel_right.png | Bin 0 -> 169 bytes textures/techage_appl_funnel_top.png | Bin 0 -> 273 bytes textures/techage_appl_sieve.png | Bin 246 -> 243 bytes textures/techage_appl_sieve4.png | Bin 352 -> 0 bytes textures/techage_cube_mark.png | Bin 305 -> 216 bytes textures/techage_handsieve_sieve.png | Bin 467 -> 0 bytes textures/techage_inv_powerT2.png | Bin 1309 -> 380 bytes textures/techage_inv_powerT3.png | Bin 291 -> 250 bytes textures/techage_iron_ingot.png | Bin 1335 -> 485 bytes ...ravel.png => techage_sieve_gravel_ta1.png} | Bin textures/techage_sieve_sieve_ta1.png | Bin 0 -> 452 bytes ...ieve_top.png => techage_sieve_top_ta1.png} | Bin 20 files changed, 323 insertions(+), 294 deletions(-) create mode 100644 basis/gravel_lib.lua create mode 100644 iron_age/funnel.lua create mode 100644 textures/techage_appl_funnel.png create mode 100644 textures/techage_appl_funnel_right.png create mode 100644 textures/techage_appl_funnel_top.png delete mode 100644 textures/techage_appl_sieve4.png delete mode 100644 textures/techage_handsieve_sieve.png rename textures/{techage_handsieve_gravel.png => techage_sieve_gravel_ta1.png} (100%) create mode 100644 textures/techage_sieve_sieve_ta1.png rename textures/{techage_handsieve_top.png => techage_sieve_top_ta1.png} (100%) diff --git a/basic_machines/gravelsieve.lua b/basic_machines/gravelsieve.lua index cb57faa..9e0b5bc 100644 --- a/basic_machines/gravelsieve.lua +++ b/basic_machines/gravelsieve.lua @@ -27,6 +27,10 @@ local STANDBY_TICKS = 10 local COUNTDOWN_TICKS = 10 local CYCLE_TIME = 4 +local get_random_gravel_ore = techage.gravelsieve_get_random_gravel_ore +local get_random_basalt_ore = techage.gravelsieve_get_random_basalt_ore + + local function formspec(self, pos, mem) return "size[8,8]".. default.gui_bg.. @@ -74,33 +78,6 @@ local function allow_metadata_inventory_take(pos, listname, index, stack, player return stack:get_count() end - --- determine ore based on the calculated probability -local function get_random_gravel_ore() - for ore, probability in pairs(techage.ore_probability) do - if math.random(probability) == 1 then - return ItemStack(ore) - end - end - if math.random(2) == 1 then - return ItemStack("default:gravel") - else - return ItemStack("techage:sieved_gravel") - end -end - -local function get_random_basalt_ore() - if math.random(40) == 1 then - return ItemStack("default:coal_lump") - elseif math.random(40) == 1 then - return ItemStack("default:iron_lump") - elseif math.random(2) == 1 then - return ItemStack("techage:basalt_gravel") - else - return ItemStack("techage:sieved_basalt_gravel") - end -end - local function sieving(pos, trd, mem, inv) local src, dst if inv:contains_item("src", ItemStack("techage:basalt_gravel")) then diff --git a/basis/gravel_lib.lua b/basis/gravel_lib.lua new file mode 100644 index 0000000..4ffc005 --- /dev/null +++ b/basis/gravel_lib.lua @@ -0,0 +1,83 @@ +--[[ + + TechAge + ======= + + Copyright (C) 2019 Joachim Stolberg + + LGPLv2.1+ + See LICENSE.txt for more information + + Gravel Sieve basis functions + +]]-- + +-- Increase the probability over the natural occurrence +local PROBABILITY_FACTOR = 2 + +-- Ore probability table (1/n) +local ore_probability = { +} + +-- collect all registered ores and calculate the probability +local function add_ores() + for _,item in pairs(minetest.registered_ores) do + if minetest.registered_nodes[item.ore] then + local drop = minetest.registered_nodes[item.ore].drop + if type(drop) == "string" + and drop ~= item.ore + and drop ~= "" + and item.ore_type == "scatter" + and item.wherein == "default:stone" + and item.clust_scarcity ~= nil and item.clust_scarcity > 0 + and item.clust_num_ores ~= nil and item.clust_num_ores > 0 + and item.y_max ~= nil and item.y_min ~= nil then + local probability = (techage.ore_rarity / PROBABILITY_FACTOR) * item.clust_scarcity / + (item.clust_num_ores * ((item.y_max - item.y_min) / 65535)) + if ore_probability[drop] == nil then + ore_probability[drop] = probability + else + -- harmonic sum + ore_probability[drop] = 1.0 / ((1.0 / ore_probability[drop]) + + (1.0 / probability)) + end + end + end + end + local overall_probability = 0.0 + for name,probability in pairs(ore_probability) do + minetest.log("info", string.format("[techage] %-32s %u", name, probability)) + overall_probability = overall_probability + 1.0/probability + end + minetest.log("info", string.format("[techage] Overall probability %g", overall_probability)) +end + +minetest.after(1, add_ores) + + +-- determine ore based on the calculated probability +function techage.gravelsieve_get_random_gravel_ore() + for ore, probability in pairs(ore_probability) do + if math.random(probability) == 1 then + return ItemStack(ore) + end + end + if math.random(2) == 1 then + return ItemStack("default:gravel") + else + return ItemStack("techage:sieved_gravel") + end +end + +function techage.gravelsieve_get_random_basalt_ore() + if math.random(40) == 1 then + return ItemStack("default:coal_lump") + elseif math.random(40) == 1 then + return ItemStack("default:iron_lump") + elseif math.random(2) == 1 then + return ItemStack("techage:basalt_gravel") + else + return ItemStack("techage:sieved_basalt_gravel") + end +end + diff --git a/init.lua b/init.lua index 4cc2038..1d8d3d9 100644 --- a/init.lua +++ b/init.lua @@ -22,6 +22,7 @@ else -- Basis features dofile(MP.."/basis/lib.lua") -- helper functions + dofile(MP.."/basis/gravel_lib.lua") -- ore probability dofile(MP.."/basis/guide.lua") -- construction guide dofile(MP.."/basis/power.lua") -- power distribution dofile(MP.."/basis/node_states.lua") -- state model @@ -44,6 +45,7 @@ else -- Iron Age dofile(MP.."/iron_age/main.lua") dofile(MP.."/iron_age/gravelsieve.lua") + dofile(MP.."/iron_age/funnel.lua") dofile(MP.."/iron_age/hammer.lua") dofile(MP.."/iron_age/lighter.lua") dofile(MP.."/iron_age/charcoalpile.lua") diff --git a/iron_age/funnel.lua b/iron_age/funnel.lua new file mode 100644 index 0000000..8e1163b --- /dev/null +++ b/iron_age/funnel.lua @@ -0,0 +1,140 @@ +--[[ + + TechAge + ======= + + Copyright (C) 2019 Joachim Stolberg + + LGPLv2.1+ + See LICENSE.txt for more information + + Simple TA1 Funnel + +]]-- + +-- for lazy programmers +local S = function(pos) if pos then return minetest.pos_to_string(pos) end end +local P = minetest.string_to_pos +local M = minetest.get_meta + +-- Load support for intllib. +local MP = minetest.get_modpath("techage") +local I,_ = dofile(MP.."/intllib.lua") + +local function scan_for_objects(pos, inv) + for _, object in pairs(minetest.get_objects_inside_radius(pos, 1)) do + local lua_entity = object:get_luaentity() + if not object:is_player() and lua_entity and lua_entity.name == "__builtin:item" then + if lua_entity.itemstring ~= "" then + local stack = ItemStack(lua_entity.itemstring) + if inv:room_for_item("main", stack) then + inv:add_item("main", stack) + object:remove() + end + end + end + end +end + +local function push_item(pos, inv, meta) + if not inv:is_empty("main") then + local stack = inv:get_stack("main", 1) + local taken = stack:take_item(1) + if techage.push_items(pos, meta:get_int("push_dir"), taken) then + inv:set_stack("main", 1, stack) + end + end +end + +local function node_timer(pos, elapsed) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + if inv then + scan_for_objects(pos, inv) + push_item(pos, inv, meta) + end + return true +end + +minetest.register_node("techage:funnel_ta1", { + description = I("TA1 Funnel"), + tiles = { + -- up, down, right, left, back, front + "default_cobble.png^techage_appl_funnel_top.png", + "default_cobble.png^techage_appl_funnel.png", + "default_cobble.png^techage_appl_funnel_right.png", + "default_cobble.png^techage_appl_funnel.png", + "default_cobble.png^techage_appl_funnel.png", + "default_cobble.png^techage_appl_funnel.png", + }, + + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-8/16, 2/16, -8/16, 8/16, 8/16, -6/16}, + {-8/16, 2/16, 6/16, 8/16, 8/16, 8/16}, + {-8/16, 2/16, -8/16, -6/16, 8/16, 8/16}, + { 6/16, 2/16, -8/16, 8/16, 8/16, 8/16}, + {-6/16, 0/16, -6/16, 6/16, 3/16, 6/16}, + {-5/16, -4/16, -5/16, 5/16, 0/16, 5/16}, + { 0/16, -4/16, -3/16, 11/16, 2/16, 3/16}, + }, + }, + selection_box = { + type = "fixed", + fixed = { + {-8/16, 2/16, -8/16, 8/16, 8/16, 8/16}, + {-5/16, -4/16, -5/16, 5/16, 0/16, 5/16}, + { 0/16, -4/16, -3/16, 11/16, 2/16, 3/16}, + }, + }, + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + inv:set_size('main', 1) + end, + + after_place_node = function(pos, placer) + techage.add_node(pos, "techage:funnel_ta1") + local node = minetest.get_node(pos) + M(pos):set_int("push_dir", techage.side_to_indir("L", node.param2)) + minetest.get_node_timer(pos):start(2) + end, + + on_timer = node_timer, + + after_dig_node = function(pos, oldnode, oldmetadata, digger) + techage.remove_node(pos) + end, + + on_rotate = screwdriver.disallow, + paramtype = "light", + sunlight_propagates = true, + paramtype2 = "facedir", + groups = {choppy=2, cracky=2, crumbly=2}, + is_ground_content = false, + sounds = default.node_sound_wood_defaults(), +}) + + +--minetest.register_craft({ +-- output = "techage:funnel_ta1", +-- recipe = { +-- {"group:wood", "", "group:wood"}, +-- {"default:steel_ingot", "default:mese_crystal", "tubelib:tubeS"}, +-- {"group:wood", "", "group:wood"}, +-- }, +--}) + +techage.register_node("techage:funnel_ta1", {}, { + on_pull_item = nil, -- not needed + on_unpull_item = nil, -- not needed + + on_push_item = function(pos, in_dir, stack) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + return techage.put_items(inv, "main", stack) + end, +}) diff --git a/iron_age/gravelsieve.lua b/iron_age/gravelsieve.lua index 5dfa2c8..f8c56e7 100644 --- a/iron_age/gravelsieve.lua +++ b/iron_age/gravelsieve.lua @@ -16,303 +16,142 @@ local S = function(pos) if pos then return minetest.pos_to_string(pos) end end local P = minetest.string_to_pos local M = minetest.get_meta --- Techage Related Data -local TRD = function(pos) return (minetest.registered_nodes[minetest.get_node(pos).name] or {}).techage end -- Load support for intllib. local MP = minetest.get_modpath("techage") local I,_ = dofile(MP.."/intllib.lua") --- Increase the probability over the natural occurrence -local PROBABILITY_FACTOR = 3 - --- Ore probability table (1/n) -techage.ore_probability = { -} - --- collect all registered ores and calculate the probability -local function add_ores() - for _,item in pairs(minetest.registered_ores) do - if minetest.registered_nodes[item.ore] then - local drop = minetest.registered_nodes[item.ore].drop - if type(drop) == "string" - and drop ~= item.ore - and drop ~= "" - and item.ore_type == "scatter" - and item.wherein == "default:stone" - and item.clust_scarcity ~= nil and item.clust_scarcity > 0 - and item.clust_num_ores ~= nil and item.clust_num_ores > 0 - and item.y_max ~= nil and item.y_min ~= nil then - local probability = (techage.ore_rarity / PROBABILITY_FACTOR) * item.clust_scarcity / - (item.clust_num_ores * ((item.y_max - item.y_min) / 65535)) - if techage.ore_probability[drop] == nil then - techage.ore_probability[drop] = probability - else - -- harmonic sum - techage.ore_probability[drop] = 1.0 / ((1.0 / techage.ore_probability[drop]) + - (1.0 / probability)) - end - end - end - end - local overall_probability = 0.0 - for name,probability in pairs(techage.ore_probability) do - minetest.log("info", string.format("[techage] %-32s %u", name, probability)) - overall_probability = overall_probability + 1.0/probability - end - minetest.log("info", string.format("[techage] Overall probability %g", overall_probability)) -end - -minetest.after(1, add_ores) - -local sieve_formspec = - "size[8,8]".. - default.gui_bg.. - default.gui_bg_img.. - default.gui_slots.. - "list[context;src;1,1.5;1,1;]".. - "image[3,1.5;1,1;techage_form_arrow.png]".. - "list[context;dst;4,0;4,4;]".. - "list[current_player;main;0,4.2;8,4;]".. - "listring[context;dst]".. - "listring[current_player;main]".. - "listring[context;src]".. - "listring[current_player;main]" - - -local function allow_metadata_inventory_put(pos, listname, index, stack, player) - if minetest.is_protected(pos, player:get_player_name()) then - return 0 - end - local meta = minetest.get_meta(pos) - local inv = meta:get_inventory() - if listname == "src" then - return stack:get_count() - elseif listname == "dst" then - return 0 - end -end - -local function allow_metadata_inventory_move(pos, from_list, from_index, to_list, to_index, count, player) - local meta = minetest.get_meta(pos) - local inv = meta:get_inventory() - local stack = inv:get_stack(from_list, from_index) - return allow_metadata_inventory_put(pos, to_list, to_index, stack, player) -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 +local get_random_gravel_ore = techage.gravelsieve_get_random_gravel_ore +local get_random_basalt_ore = techage.gravelsieve_get_random_basalt_ore -- handle the sieve animation -local function swap_node(pos, meta, start) +local function swap_node(pos) local node = minetest.get_node(pos) - local idx = meta:get_int("idx") - if start then - if idx == 3 then - idx = 0 + local idx = string.byte(node.name, -1) - 48 + idx = (idx + 1) % 4 + minetest.swap_node(pos, {name = "techage:sieve"..idx, param2 = node.param2}) + return idx == 3 -- true if done +end + +local function push_items(pos, items) + local pos1 = {x=pos.x, y=pos.y-1, z=pos.z} + local node = minetest.get_node(pos1) + minetest.add_item({x=pos.x, y=pos.y-0.4, z=pos.z}, items) +end + +local function keep_running(pos, elapsed) + local inv = M(pos):get_inventory() + if swap_node(pos) then + local src, dst + + if inv:contains_item("src", ItemStack("techage:basalt_gravel")) then + dst, src = get_random_basalt_ore(), ItemStack("techage:basalt_gravel") + elseif inv:contains_item("src", ItemStack("default:gravel")) then + dst, src = get_random_gravel_ore(), ItemStack("default:gravel") + else + return false end - else - idx = (idx + 1) % 4 + push_items(pos, dst) + inv:remove_item("src", src) end - meta:set_int("idx", idx) - node.name = meta:get_string("node_name")..idx - minetest.swap_node(pos, node) - return idx == 3 + return not inv:is_empty("src") end --- place ores to dst according to the calculated probability -local function random_ore(inv, src) - local num - for ore, probability in pairs(techage.ore_probability) do - if math.random(probability) == 1 then - local item = ItemStack(ore) - if inv:room_for_item("dst", item) then - inv:add_item("dst", item) - return true -- ore placed - end - end - end - return false -- gravel has to be moved -end - - -local function add_gravel_to_dst(meta, inv) - -- maintain a counter for gravel kind selection - local gravel_cnt = meta:get_int("gravel_cnt") + 1 - meta:set_int("gravel_cnt", gravel_cnt) - - if (gravel_cnt % 2) == 0 then -- gravel or sieved gravel? - inv:add_item("dst", ItemStack("default:gravel")) -- add to dest - else - inv:add_item("dst", ItemStack("techage:sieved_gravel")) -- add to dest - end -end - - --- move gravel and ores to dst -local function move_src2dst(meta, pos, inv, src, dst) - if inv:room_for_item("dst", dst) and inv:contains_item("src", src) then - local res = swap_node(pos, meta, false) - if res then -- time to move one item? - if src:get_name() == "default:gravel" then -- will we find ore? - if not random_ore(inv, src) then -- no ore found? - add_gravel_to_dst(meta, inv) - end - else - inv:add_item("dst", ItemStack("techage:sieved_gravel")) -- add to dest - end - inv:remove_item("src", src) - end - return true -- process finished - end - return false -- process still running -end - --- timer callback, alternatively called by on_punch -local function sieve_node_timer(pos, elapsed) +local function on_construct(pos) local meta = minetest.get_meta(pos) + meta:set_string("infotext", I("TA1 Gravel Sieve")) local inv = meta:get_inventory() - local gravel = ItemStack("default:gravel") - local gravel_sieved = ItemStack("techage:sieved_gravel") + inv:set_size('src', 1) +end - if move_src2dst(meta, pos, inv, gravel) then - return true - elseif move_src2dst(meta, pos, inv, gravel_sieved) then - return true - else - minetest.get_node_timer(pos):stop() - return false +local function on_punch(pos, node, puncher, pointed_thing) + local wielded_item = puncher:get_wielded_item():get_name() + if wielded_item == "default:gravel" or wielded_item == "techage:basalt_gravel" then + local inv = M(pos):get_inventory() + local stack = ItemStack(wielded_item) + if inv:room_for_item("src", stack) then + inv:add_item("src", stack) + minetest.swap_node(pos, {name = "techage:sieve0"}) + minetest.get_node_timer(pos):start(1) + local w = puncher:get_wielded_item() + if not(minetest.setting_getbool("creative_mode")) then + w:take_item(1) + puncher:set_wielded_item(w) + end + end end end +local tiles_data = { + -- up, down, right, left, back, front + "techage_sieve_gravel_ta1.png", + "techage_sieve_gravel_ta1.png", + "techage_sieve_sieve_ta1.png", + "techage_sieve_sieve_ta1.png", + "techage_sieve_sieve_ta1.png", + "techage_sieve_sieve_ta1.png", +} -for idx = 0,4 do - local nodebox_data = { - { -8/16, -8/16, -8/16, 8/16, 4/16, -6/16 }, - { -8/16, -8/16, 6/16, 8/16, 4/16, 8/16 }, - { -8/16, -8/16, -8/16, -6/16, 4/16, 8/16 }, - { 6/16, -8/16, -8/16, 8/16, 4/16, 8/16 }, - { -6/16, -2/16, -6/16, 6/16, 8/16, 6/16 }, - } - nodebox_data[5][5] = (8 - 2*idx) / 16 - - local node_name - local description - local tiles_data - local tube_info - local not_in_creative_inventory - node_name = "techage:sieve" - description = I("TA1 Gravel Sieve") - tiles_data = { - -- up, down, right, left, back, front - "techage_handsieve_gravel.png", - "techage_handsieve_gravel.png", - "techage_handsieve_sieve.png", - "techage_handsieve_sieve.png", - "techage_handsieve_sieve.png", - "techage_handsieve_sieve.png", - } +local nodebox_data = { + { -8/16, -3/16, -8/16, 8/16, 4/16, -6/16 }, + { -8/16, -3/16, 6/16, 8/16, 4/16, 8/16 }, + { -8/16, -3/16, -8/16, -6/16, 4/16, 8/16 }, + { 6/16, -3/16, -8/16, 8/16, 4/16, 8/16 }, + + { -8/16, -8/16, -8/16, -6/16, -3/16, -6/16 }, + { 6/16, -8/16, -8/16, 8/16, -3/16, -6/16 }, + { -8/16, -8/16, 6/16, -6/16, -3/16, 8/16 }, + { 6/16, -8/16, 6/16, 8/16, -3/16, 8/16 }, + + { -6/16, -2/16, -6/16, 6/16, 8/16, 6/16 }, +} +for idx = 0,3 do + nodebox_data[9][5] = (8 - 2*idx) / 16 if idx == 3 then - tiles_data[1] = "techage_handsieve_top.png" - not_in_creative_inventory = 0 - else - not_in_creative_inventory = 1 + tiles_data[1] = "techage_sieve_top_ta1.png" end - - minetest.register_node(node_name..idx, { - description = description, + minetest.register_node("techage:sieve"..idx, { + description = I("TA1 Gravel Sieve"), tiles = tiles_data, drawtype = "nodebox", - drop = node_name, - - tube = tube_info, -- NEW - node_box = { type = "fixed", fixed = nodebox_data, }, selection_box = { type = "fixed", - fixed = { -8/16, -8/16, -8/16, 8/16, 4/16, 8/16 }, + fixed = { -8/16, -3/16, -8/16, 8/16, 4/16, 8/16 }, }, - on_timer = sieve_node_timer, - - on_construct = function(pos) - local meta = minetest.get_meta(pos) - meta:set_int("idx", idx) -- for the 4 sieve phases - meta:set_int("gravel_cnt", 0) -- counter to switch between gravel and sieved gravel - meta:set_string("node_name", node_name) - meta:set_string("formspec", sieve_formspec) - local inv = meta:get_inventory() - inv:set_size('src', 1) - inv:set_size('dst', 16) - end, - - after_place_node = function(pos, placer) - local meta = minetest.get_meta(pos) - meta:set_string("infotext", I("TA1 Gravel Sieve")) - end, - - on_metadata_inventory_move = function(pos) - local meta = minetest.get_meta(pos) - swap_node(pos, meta, true) - end, - - on_metadata_inventory_take = function(pos) - local meta = minetest.get_meta(pos) - local inv = meta:get_inventory() - if inv:is_empty("src") then - -- sieve should be empty - meta:set_int("idx", 2) - swap_node(pos, meta, false) - meta:set_int("gravel_cnt", 0) - end - end, - - on_metadata_inventory_put = function(pos) - local meta = minetest.get_meta(pos) - swap_node(pos, meta, true) - end, - - on_punch = function(pos, node, puncher, pointed_thing) - local meta = minetest.get_meta(pos) - local inv = meta:get_inventory() - if inv:is_empty("dst") and inv:is_empty("src") then - minetest.node_punch(pos, node, puncher, pointed_thing) - else - sieve_node_timer(pos, 0) - end - end, - - on_dig = function(pos, node, puncher, pointed_thing) - local meta = minetest.get_meta(pos) - local inv = meta:get_inventory() - if inv:is_empty("dst") and inv:is_empty("src") then - minetest.node_dig(pos, node, puncher, pointed_thing) - end - end, - - allow_metadata_inventory_put = allow_metadata_inventory_put, - allow_metadata_inventory_move = allow_metadata_inventory_move, - allow_metadata_inventory_take = allow_metadata_inventory_take, + on_construct = idx == 3 and on_construct or nil, + on_punch = idx == 3 and on_punch or nil, + on_timer = keep_running, paramtype = "light", sounds = default.node_sound_wood_defaults(), paramtype2 = "facedir", sunlight_propagates = true, is_ground_content = false, - groups = {choppy=2, cracky=1, not_in_creative_inventory=not_in_creative_inventory}, - drop = node_name.."3", + groups = {choppy = 2, cracky = 1}, + drop = "techage:sieve3", }) end +techage.register_node("techage:sieve0", {"techage:sieve1", "techage:sieve2", "techage:sieve3"}, { + on_push_item = function(pos, in_dir, stack) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + if inv:room_for_item("src", stack) then + inv:add_item("src", stack) + minetest.get_node_timer(pos):start(1) + return true + end + return false + end, +}) + minetest.register_node("techage:sieved_gravel", { description = I("Sieved Gravel"), tiles = {"default_gravel.png"}, @@ -354,15 +193,3 @@ minetest.register_craft({ minetest.register_alias("techage:sieve", "techage:sieve3") minetest.register_alias("techage:auto_sieve", "techage:auto_sieve3") --- adaption to Circular Saw ---if minetest.get_modpath("moreblocks") then - --- stairsplus:register_all("techage", "compressed_gravel", "techage:compressed_gravel", { --- description= I("Compressed Gravel"), --- groups={cracky=2, crumbly=2, choppy=2, not_in_creative_inventory=1}, --- tiles = {"techage_compressed_gravel.png"}, --- sounds = default.node_sound_stone_defaults(), --- }) ---end - - diff --git a/textures/techage_appl_blackhole.png b/textures/techage_appl_blackhole.png index b85a201ffbaa67893d28001c715e16185a6c8abd..6fe6b969bfd5974eb114ded1f91a16cf6c6b759a 100644 GIT binary patch delta 140 zcmZ3@IEQh9L_H%j0|SHSmKWQB6id3JuOkD)#(wTUiL5|AV{wqX6T`Z5GB1G~&H|6f zVg?3oVGw3ym^DWND99Gz6XNQVSqNm#idiTN(o+)T7tG-B>_!@pBjoAg7{YNqIpF}) hKjwoD0uc-hPlDqYI()r+4=Bsv>FUSovd$@?2>`8XCD#A| delta 134 zcmbQkxSDZ-gfs^m0|P^GRn-?D#g^pl?!xdN1Q+aGK6#>@L;`z>r>`sfV-^{HYr%J- ztaE^>EIeHtLn02pz3wQ;;K0GWvFP90g`JZRHitN-{krw)UCz7IN`|Q^F+i12P_UbO c%fre8>~n0{xV_KHdV+*KUHx3vIVCg!0K<1JEC2ui diff --git a/textures/techage_appl_forceload.png b/textures/techage_appl_forceload.png index b45f8d251427404e38f8295b3938ae58a76c955f..cc3f5f26ed5e41cfdfc37e69e1c1a6e98799f13a 100644 GIT binary patch delta 623 zcmbQoHGy@4gc=Jo0|Ubhk1|al#ggvm>&U>cv7h@-A}f&3SRCZ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diff --git a/textures/techage_appl_funnel.png b/textures/techage_appl_funnel.png new file mode 100644 index 0000000000000000000000000000000000000000..7c703e21e06e1906b9037f3311a9058ed6eabeb6 GIT binary patch literal 159 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnL3?x0byx0z;SkfJR9T^xl_H+M9WCijWi-X*q z7}lMWc?slj7I;J!Gca%qgD@k*tT_@uLAC&&5LchfLLhTi%tBcp#Z(gH7tBz^N? uAWy{8#W95Adh!o`7M_Hr2!~yKKnFNS%G}U;vjb? zhIQv;UIICs1s;*b3=G`DAk4@xYmNj+Fu*6o)hDwM$OHnry2?91im4>XFPNczo94o) zK%TUxi(`ny<>&pI^MNWi~zx!m;9H7uVPZ!6Kh{JEE8}c`OYde@;+NNJ~l+ZV{=x#=DnUiX(e_+S(1Fm%SIPw3?U5z|tVia6q6pn{UgDpH8!d z8IJin0mV#~P1(N2FVBjpTRCdWoW+6RkK6+`rcIX5YdAOX0A0%9 M>FVdQ&MBb@07x}oe*gdg literal 0 HcmV?d00001 diff --git a/textures/techage_appl_sieve.png b/textures/techage_appl_sieve.png index 6cdfee62a3e4eb6cdd4d2a596afe898447c2d7f7..17c995fedce26bf892e53d5e4352b64f2b46760f 100644 GIT binary patch delta 94 zcmeyy_?dBnN(f83qpu?a!^VE@KZ&di3=E9LLGDfr>(0r%1af!+d_r7(G7FuYoPfN< q#Kh7$tD8WIN`m}?862M7NCR>>3p^r=85p>QL70(Y)*Ok6)ztt7k{P4` delta 97 zcmey&_>FObN;pq|Pl#)(Zn~3`69WT7Vq)SR)r*=y7Gp_}UoeBivm0q3PLj8~3quF1 ttOt<8S>O>_%)r1c48n{Iv*t(u1=&kHeO=ifvq8&}@b7EpeH2~RX81Mi9 diff --git a/textures/techage_appl_sieve4.png b/textures/techage_appl_sieve4.png deleted file mode 100644 index 50061a61115fb313764a55e9b2cfdb83fcc76e00..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 352 zcmeAS@N?(olHy`uVBq!ia0vp^3P9Yz#0(_GIhs3x6id3JuOkD)#(wTUiL5|AV{wqX z6T`Z5GB1G~o&cW^SD(y6CnqN$FEKH(bk6D~kfM?xzhDN3XE)M-9L@rd$YKTtZeb8+ zWSBKa0w{RF)5S5w;`Gr;8~F|?2($@KU)DXj`moE48fI&2%PA7>;`5sgOz+;6Uf%Zo zowtL rgSju?x{`KTN2XQh$BD+~Js(f;YjuiRR!8cCoXp_q>gTe~DWM4fb$UZU delta 269 zcmV+o0rLLX0kHy*7#j!%0000V^Z#K0000JJOGiWi{{a60|De66laW3ce+P6)O+^Rd z3>OMB8k_iwk^lezzDYzuR5;6>(>)HuAPfcIm$XCY9)k&~-aDn&>Bt$p^*mLNz`(>2 zqDUEfg)Wd#g2|5;24dbPM{ch77n4@7&g010Jf3g1&I5qKzG47qV>4;RJDUw@g_g7e z09fZue6>~~$b_Cr5Nl1sXCWv)HVa}&k~BH_b|H`?f5}xrE-58%5ljhd_o5(Si-Q#f zIlD60qM$gil4K#M4Xh-|1yZsovCiZ4z1%v|s_Tbw^D_0r_zAxl=VUec$V&eJFKwEc T(07&|00000NkvXXu0mjf%l>ko diff --git a/textures/techage_handsieve_sieve.png b/textures/techage_handsieve_sieve.png deleted file mode 100644 index 109f3577b53618ba9ee3dd941a2a95d7cc04e467..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 467 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfvmUKs7M+SzC{oH>NS%G}U;vjb? zhIQv;UIICs1s;*b3=G`DAk4@xYmNj^P(8pW#MLLWa7L8Iv014HCx!3r@{S60+t%!w z9vc|oVRwF!@0tpmirfTe8)Nx)SCFAhB|(0{3@4*g&9l zef`rErZ`o>6H(mGo4Gk>=^kn>S8m?SRlRQE1p5Vw)ddQ%+&?3yif|P1&#QR<_?{v| zf%oz`o4ig=Zm~H1MO!^ne7X2^hwmHqO21L~x#YY9PBe3DB*VfA9gi+5ig<11iwvf3mgb5s5|SN5A4abIO%05W*G`njxg HN@xNATwJv^ diff --git a/textures/techage_inv_powerT2.png b/textures/techage_inv_powerT2.png index 4a0f0d025578ef6cd1566f6a88b0034b766d2a86..a038fad86aa060a7070d6f56e1b2d0ad477d4eb3 100644 GIT binary patch delta 326 zcmbQs^@nMKgc=Jo0|P^2NcwRg#ggvm>&U>cv7h@-A}f&3SRCZ;#IWw1%*%<<+Vu>a z1s;*b3=G`DAk4@xYmNj^ja-0Fh%1mbGB6Mm6Z3F$3keE3d-m+IB};O%v!_g&)YZ|! zD_M{YGQA|oFZlnDpMRE{EIR=|Ji-k!f&R$WTFz54%wXY>DxvM!BE V^gVUD;0@6244$rjF6*2UngAR;d|dzl delta 1262 zcmVX`_OWLL5M8F18cfan`$D z@0>oAq$!uS4i&s`-gY#X-_E(r|4_YNXM9Ez_{{d%0o2itbLY-|l0)nD`WF|x-vuAA zJpgvff3~%qN_F$OTrz#)#7HS+2_X~!5eC72-}mKKvl;I7dMXS<8-V=30Mc`Fb2xkU zY@D)fGZ+jktu;$2B>*rpnAwiwn5L$t^v=#sys^27R;$GT=%WD&g#y02coCIKMUfC{ ztb10>dPN(5{9%g4} zA;i1Oi3mzc%49Mqm&>t}PLBYj#?AsMWspcDbQDGSb$J=ruV2T?$_kWHa2yAo=V4}M ze+ESKq4hMG$>?l0+Z95DV*})Jxk0s3VcWJ5jYjxoc^UKb^H^P7g;ENx>%#Lq6bgm+ zLJ$#5(^Q2*!LTih#|FqajxLuJ^ky$Ye6`JP-MN z{v8M+LNbw%PC7k)8VV^DGm~kWD3?lLW~{t;fglL5w6p{%1TI{-fZ5quOioV1^E@y! zn$0Gd|GIG!LL^Po9veVw9fO&f83zzrYpgaJ2!a4VJ$wj%Fu?bhE@5tN4o8X-e_E~9 zAp`-CLddZJ!Y~|at<8gtEz3fsTm~~^wb4KrhFE&^2-$2F-=04YcVYrlQ&V7OXsxlc zvvUX($MFb2Vyqb0>-S|8Mf%`Rm>IThqgtt;R4gKq_;bH|_wVD%)vIVWn@~z2m&>76 zt09xgfQZ1%JRAtw6lc6N4mMI6U}D7Sh*P|!`0DN=i49ey5;rPPB z0xn;^jDEk5-=01dtBr;|8jXzOyoL@lV{>zprIcivCMOIdHVlJ^=n&j>U7R_68ogc* z?RFde{e9fLbqkhd;lbh}e{FAX1HdkT%y9(?t*@`^FbwtV%*=jva#A{uV@oNSh$sw0 zA|iZ!>Xd%=>>2&Ou|dpCKU}$jH(G!`bohS-0D!R7YFT@Gd%|_yD4)xPwrvkB%Svdi zB{Q>*V?U8hCWR129LL5HIq}hw3;?V*#VNhLy^S~5YP~fl`K2@ZAZS^Bv}5_woPH|% Y16{WZ#=;J8Z2$lO07*qoM6N<$g7_RkApigX diff --git a/textures/techage_inv_powerT3.png b/textures/techage_inv_powerT3.png index c7867093c0853d31b5ef9251fd2339193b1804c7..34e11d73591a6864be5681aaf5508e9585b1f0ab 100644 GIT binary patch delta 194 zcmZ3?^owzVgc=Jo0|P^2NcwRg#ggvm>&U>cv7h@-A}f&3SRCZ;#IWw1%*%<_w)W|Rc^ z1v5B2yO9RuSa`ZPhG?8mPEcSr;8J2_RATLU*igZ!tZEQ&OnHHn)T>92Tv8cD#iwuC oqN2qu@P+#&qf3#=1RjQCi;M+NEI;q24K#$o)78&qol`;+0L7R*Q2+n{ delta 235 zcmeyxxR_~zgfj;l0|P^GRn-?D#g^pl?!xdN1Q+aGJ{c&&S>O>_%)r1c48n{Iv*t(u z1=&kHeO=ifvqxT!d+&j@ur@r0O#W5t}aB_kKD>IM8M9ZJ4qW@nezC5yyZ^vFA zW?3fYcMM`NLYak(AzL%9E#hr9W?{=0QE0xr{QSh!9V=H}G~i^Ec(Kn!)Hz2`Ub*c? zYU`SXliA#44Ymj=Zev+KFE_)H2LJ#83Q0skR5;7sQpt7$Aq*Si)I-d^ z!~g$ioi>L_J4vp6)#HYck*sa|L)hQkf6(jK06_FYhKh60;3{#Y> zRrPg0P+}5Jsxzv+xN3#0cC(_k_bHO2T}Ah*;n-h^7c(l?e?GW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handsieve_gravel.png b/textures/techage_sieve_gravel_ta1.png similarity index 100% rename from textures/techage_handsieve_gravel.png rename to textures/techage_sieve_gravel_ta1.png diff --git a/textures/techage_sieve_sieve_ta1.png b/textures/techage_sieve_sieve_ta1.png new file mode 100644 index 0000000000000000000000000000000000000000..abc9eb26f7fb48e71785c97de5317918655b3c3f GIT binary patch literal 452 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfvl>na**BMb7$7ZD-oD{yd%R4I2 zZCkTzdTd~Thu!%_zH2IMDsmH?ZH&b@ZkqtrGnNGT1v5B2yO9RsBze2LFm$lWdH^|` z1s;*b3=G`DAk4@xYmNj^kiEpy*OmP-i=2qKfui}ZGN2wwPZ!4!jq_{!4YLm$2(-S} zpW}02bt==`QkGeNCoH(BWK&^oWU+d~b1AN$%u<`!*)MIKus=MqanT#wisRMt-&vR# z_LtnsUT!*H;#%Y~`FS^V@9EezzI#|@zoYSNhR}~0>*juccJ7$He%n8T8P3ON-TfLV zDW7MOc4hBn&JD@uZSL;Mj}wyEDL?n!^xrS5x(l@ng5#qCU2*qx6M+oC18;p;pn;Sh!0s@`Hvle~h2MZ<&}rnoG86?(E^?Xyptr>vgT z=rHM9S$Obmx!|Yv_ad}ePjY3i{HGPaYRx%|<#I846MTKvo^{;aJ^ys$)`l6)GXnN7 rFfKad=yNriFX@oDz~#Va4>al-r>;mk)OE=Z6qpR2u6{1-oD!M<(|of+ literal 0 HcmV?d00001 diff --git a/textures/techage_handsieve_top.png b/textures/techage_sieve_top_ta1.png similarity index 100% rename from textures/techage_handsieve_top.png rename to textures/techage_sieve_top_ta1.png