forked from mrkubax10/industrialtest
Compare commits
2 Commits
b91e3a882e
...
1732d6a651
Author | SHA1 | Date | |
---|---|---|---|
|
1732d6a651 | ||
|
ffd61dcc2b |
@ -357,9 +357,29 @@ function industrialtest.internal.registerMachine(config)
|
|||||||
if config.sounds=="metal" then
|
if config.sounds=="metal" then
|
||||||
definition.sounds=mcl_sounds.node_sound_metal_defaults()
|
definition.sounds=mcl_sounds.node_sound_metal_defaults()
|
||||||
end
|
end
|
||||||
definition.groups={pickaxey=1}
|
definition.groups={
|
||||||
|
pickaxey=1,
|
||||||
|
container=2
|
||||||
|
}
|
||||||
definition._mcl_blast_resistance=3.5
|
definition._mcl_blast_resistance=3.5
|
||||||
definition._mcl_hardness=3.9
|
definition._mcl_hardness=3.9
|
||||||
|
definition._mcl_hoppers_on_try_pull=function(pos, hop_pos, hop_inv, hop_list)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
local stack = inv:get_stack("dst", 1)
|
||||||
|
if not stack:is_empty() and hop_inv:room_for_item(hop_list, stack) then
|
||||||
|
return inv, "dst", 1
|
||||||
|
end
|
||||||
|
return nil, nil, nil
|
||||||
|
end
|
||||||
|
definition._mcl_hoppers_on_try_push=function(pos, hop_pos, hop_inv, hop_list)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
return inv, "src", mcl_util.select_stack(hop_inv, hop_list, inv, "src")
|
||||||
|
end
|
||||||
|
definition._mcl_hoppers_on_after_push=function(pos)
|
||||||
|
minetest.get_node_timer(pos):start(1.0)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
definition.groups._industrialtest_wrenchUnmountable=1
|
definition.groups._industrialtest_wrenchUnmountable=1
|
||||||
if config.requiresWrench then
|
if config.requiresWrench then
|
||||||
|
@ -292,6 +292,7 @@ if industrialtest.mtgAvailable then
|
|||||||
return not (inv:get_list("src")[1]:get_count()>0 or inv:get_list("fuel")[1]:get_count()>0 or inv:get_list("dst")[1]:get_count()>0)
|
return not (inv:get_list("src")[1]:get_count()>0 or inv:get_list("fuel")[1]:get_count()>0 or inv:get_list("dst")[1]:get_count()>0)
|
||||||
end
|
end
|
||||||
elseif industrialtest.mclAvailable then
|
elseif industrialtest.mclAvailable then
|
||||||
|
definition.groups={pickaxey=1}
|
||||||
definition.after_dig_node=function(pos,oldnode,oldmeta)
|
definition.after_dig_node=function(pos,oldnode,oldmeta)
|
||||||
industrialtest.internal.mclAfterDigNode(pos,oldmeta,{"src","fuel","dst"})
|
industrialtest.internal.mclAfterDigNode(pos,oldmeta,{"src","fuel","dst"})
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user