forked from mrkubax10/industrialtest
Compare commits
1 Commits
master
...
e879f588b6
| Author | SHA1 | Date | |
|---|---|---|---|
| e879f588b6 |
8
api.lua
8
api.lua
@@ -749,6 +749,14 @@ industrialtest.api.registerMaceratorRecipe=function(config)
|
|||||||
recipe=config.recipe or "",
|
recipe=config.recipe or "",
|
||||||
time=config.time or 2
|
time=config.time or 2
|
||||||
}
|
}
|
||||||
|
if mcl_craftguide ~= nil then
|
||||||
|
mcl_craftguide.register_craft({
|
||||||
|
type = "industrialtest.macerating",
|
||||||
|
width = 1,
|
||||||
|
output = definition.output,
|
||||||
|
items = {definition.recipe}
|
||||||
|
})
|
||||||
|
end
|
||||||
industrialtest.api.maceratorRecipes[definition.recipe]=definition
|
industrialtest.api.maceratorRecipes[definition.recipe]=definition
|
||||||
end
|
end
|
||||||
-- \brief Returns macerator recipe result
|
-- \brief Returns macerator recipe result
|
||||||
|
|||||||
@@ -610,6 +610,12 @@ if industrialtest.mclAvailable then
|
|||||||
y_max=mcl_worlds.layer_to_y(16),
|
y_max=mcl_worlds.layer_to_y(16),
|
||||||
y_min=mcl_vars.mg_overworld_min
|
y_min=mcl_vars.mg_overworld_min
|
||||||
})
|
})
|
||||||
|
|
||||||
|
mcl_craftguide.register_craft_type("industrialtest.macerating", {
|
||||||
|
description = S("Macerating"),
|
||||||
|
icon = "industrialtest_machine_block.png^industrialtest_macerator_front_active.png"
|
||||||
|
})
|
||||||
|
|
||||||
elseif industrialtest.mtgAvailable then
|
elseif industrialtest.mtgAvailable then
|
||||||
industrialtest.internal.explode=function(pos,radius)
|
industrialtest.internal.explode=function(pos,radius)
|
||||||
tnt.boom(pos,{radius=radius})
|
tnt.boom(pos,{radius=radius})
|
||||||
|
|||||||
@@ -357,29 +357,9 @@ 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={
|
definition.groups={pickaxey=1}
|
||||||
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(industrialtest.updateDelay)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
definition.groups._industrialtest_wrenchUnmountable=1
|
definition.groups._industrialtest_wrenchUnmountable=1
|
||||||
if config.requiresWrench then
|
if config.requiresWrench then
|
||||||
|
|||||||
@@ -293,21 +293,12 @@ 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,
|
|
||||||
container=2
|
|
||||||
}
|
|
||||||
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
|
||||||
definition.sounds=mcl_sounds.node_sound_metal_defaults()
|
definition.sounds=mcl_sounds.node_sound_metal_defaults()
|
||||||
definition._mcl_blast_resistance=3
|
definition._mcl_blast_resistance=3
|
||||||
definition._mcl_hardness=3.5
|
definition._mcl_hardness=3.5
|
||||||
definition._mcl_hoppers_on_try_pull = mcl_furnaces.hoppers_on_try_pull
|
|
||||||
definition._mcl_hoppers_on_try_push = mcl_furnaces.hoppers_on_try_push
|
|
||||||
definition._mcl_hoppers_on_after_push = function(pos)
|
|
||||||
minetest.get_node_timer(pos):start(industrialtest.updateDelay)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
minetest.register_node("industrialtest:iron_furnace",definition)
|
minetest.register_node("industrialtest:iron_furnace",definition)
|
||||||
definition=table.copy(definition)
|
definition=table.copy(definition)
|
||||||
@@ -326,9 +317,7 @@ definition.drop="industrialtest:iron_furnace"
|
|||||||
definition.on_timer=ironFurnace.activeOnTimer
|
definition.on_timer=ironFurnace.activeOnTimer
|
||||||
if industrialtest.mclAvailable then
|
if industrialtest.mclAvailable then
|
||||||
definition.groups={
|
definition.groups={
|
||||||
not_in_creative_inventory=1,
|
not_in_creative_inventory=1
|
||||||
pickaxey=1,
|
|
||||||
container=2
|
|
||||||
}
|
}
|
||||||
definition._doc_items_create_entry=false
|
definition._doc_items_create_entry=false
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user