fix ta4_injector and detector issues

This commit is contained in:
Joachim Stolberg 2021-09-17 18:57:14 +02:00
parent 9cc6b93f58
commit 3ff6ca909f
3 changed files with 4 additions and 4 deletions

View File

@ -234,7 +234,7 @@ tiles.act = {
local tubing = { local tubing = {
-- push item through the pusher in opposit direction -- push item through the pusher in opposit direction
on_push_item = function(pos, in_dir, stack) on_push_item = function(pos, in_dir, stack)
return in_dir == M(pos):get_int("pull_dir") and techage.push_items(pos, in_dir, stack) return in_dir == M(pos):get_int("pull_dir") and techage.safe_push_items(pos, in_dir, stack)
end, end,
is_pusher = true, -- is a pulling/pushing node is_pusher = true, -- is a pulling/pushing node

View File

@ -235,7 +235,7 @@ tiles.act = {
local tubing = { local tubing = {
-- push item through the injector in opposit direction -- push item through the injector in opposit direction
on_push_item = function(pos, in_dir, stack) on_push_item = function(pos, in_dir, stack)
return in_dir == M(pos):get_int("pull_dir") and techage.push_items(pos, in_dir, stack) return in_dir == M(pos):get_int("pull_dir") and techage.safe_push_items(pos, in_dir, stack)
end, end,
is_pusher = true, -- is a pulling/pushing node is_pusher = true, -- is a pulling/pushing node

View File

@ -203,7 +203,7 @@ minetest.register_craft({
techage.register_node({"techage:ta3_detector_off", "techage:ta3_detector_on"}, { techage.register_node({"techage:ta3_detector_off", "techage:ta3_detector_on"}, {
on_push_item = function(pos, in_dir, stack) on_push_item = function(pos, in_dir, stack)
if techage.push_items(pos, in_dir, stack) then if techage.safe_push_items(pos, in_dir, stack) then
switch_on(pos) switch_on(pos)
return true return true
end end
@ -214,7 +214,7 @@ techage.register_node({"techage:ta3_detector_off", "techage:ta3_detector_on"}, {
techage.register_node({"techage:ta4_detector_off", "techage:ta4_detector_on"}, { techage.register_node({"techage:ta4_detector_off", "techage:ta4_detector_on"}, {
on_push_item = function(pos, in_dir, stack) on_push_item = function(pos, in_dir, stack)
if techage.push_items(pos, in_dir, stack) then if techage.safe_push_items(pos, in_dir, stack) then
switch_on(pos) switch_on(pos)
local nvm = techage.get_nvm(pos) local nvm = techage.get_nvm(pos)
nvm.counter = (nvm.counter or 0) + stack:get_count() nvm.counter = (nvm.counter or 0) + stack:get_count()