2 Commits

Author SHA1 Message Date
10b415b735 feat: mcl hopper compat for common machines 2024-05-10 11:29:04 +03:00
36b792bd2a fix: iron furnace was unbreakable 2024-05-10 11:29:04 +03:00
19 changed files with 34 additions and 13 deletions

View File

@@ -197,13 +197,13 @@ if industrialtest.mclAvailable then
count=2
})
end
industrialtest.api.registerResourceDust("coal","Coal",resources,"#262523ff",true)
industrialtest.api.registerResourceDust("coal","Coal",resources,"#101010ff",true)
industrialtest.api.registerResourceDust("clay","Clay",{
{
resource=industrialtest.elementKeys.clayBlock,
count=2
}
},"#707070ff",true)
},"#9090a0ff",true)
resources={
{
resource=industrialtest.elementKeys.diamondBlock,
@@ -221,7 +221,7 @@ if industrialtest.mclAvailable then
count=2
})
end
industrialtest.api.registerResourceDust("diamond","Diamond",resources,"#77cefbff",true)
industrialtest.api.registerResourceDust("diamond","Diamond",resources,"#90e2c9ff",true)
minetest.register_craft({
type="cooking",
output=industrialtest.elementKeys.diamond,
@@ -248,7 +248,7 @@ if industrialtest.mclAvailable then
count=2
})
end
industrialtest.api.registerResourceDust("iron","Iron",resources,"#afaca5ff",true)
industrialtest.api.registerResourceDust("iron","Iron",resources,"#b5b5b5ff",true)
minetest.register_craft({
type="cooking",
output=industrialtest.elementKeys.ironIngot,
@@ -269,7 +269,7 @@ if industrialtest.mclAvailable then
count=9
},
{resource="mcl_core:lapis_lazuli"}
},"#3a4cceff",true)
},"#292d76ff",true)
end
industrialtest.api.registerResourceDust("obsidian","Obsidian",{{resource=industrialtest.elementKeys.obsidian}},"#292843ff",true)
resources={
@@ -293,7 +293,7 @@ if industrialtest.mclAvailable then
count=2
})
end
industrialtest.api.registerResourceDust("gold","Gold",resources,"#eac162ff",true)
industrialtest.api.registerResourceDust("gold","Gold",resources,"#e4e526ff",true)
minetest.register_craft({
type="cooking",
output=industrialtest.elementKeys.goldIngot,
@@ -320,7 +320,7 @@ if industrialtest.mclAvailable then
count=2
})
end
industrialtest.api.registerResourceDust("copper","Copper",resources,"#bf644aff",true)
industrialtest.api.registerResourceDust("copper","Copper",resources,"#a45e25ff",true)
minetest.register_craft({
type="cooking",
output=industrialtest.elementKeys.copperIngot,
@@ -347,7 +347,7 @@ if industrialtest.mclAvailable then
count=2
})
end
industrialtest.api.registerResourceDust("tin","Tin",resources,"#ebd182ff",true)
industrialtest.api.registerResourceDust("tin","Tin",resources,"#f1f1f1ff",true)
minetest.register_craft({
type="cooking",
output=industrialtest.elementKeys.tinIngot,
@@ -404,7 +404,7 @@ industrialtest.api.registerResourceDust("bronze","Bronze",{
count=9
},
{resource=industrialtest.elementKeys.bronzeIngot}
},"#be4325ff",true)
},"#e48e88ff",true)
minetest.register_craft({
type="shaped",
output="industrialtest:bronze_dust 9",
@@ -431,7 +431,7 @@ industrialtest.api.registerRotaryMaceratorModifier({
output="industrialtest:bronze_dust",
uses=4
})
industrialtest.api.registerResourceDust("sulfur","Sulfur",{},"#b88805ff",false)
industrialtest.api.registerResourceDust("sulfur","Sulfur",{},"#e3ff33ff",false)
industrialtest.api.registerExtractorRecipe({
output="industrialtest:sulfur_dust",
recipe=industrialtest.elementKeys.gunpowder
@@ -450,7 +450,7 @@ industrialtest.api.registerResourceDust("lead","Lead",{
count=2
},
{resource="industrialtest:lead_ingot"}
},"#6d6393ff",true)
},"#eafef8ff",true)
minetest.register_craft({
type="cooking",
output="industrialtest:lead_ingot",
@@ -461,7 +461,7 @@ industrialtest.api.registerResourceDust("refined_iron","Refined Iron",{
resource="industrialtest:refined_iron_ingot",
count=1
}
},"#94bab9ff",true)
},"#7c8588ff",true)
industrialtest.api.registerRotaryMaceratorModifier({
name=industrialtest.elementKeys.ironLump,
modifier=industrialtest.elementKeys.coal,

View File

@@ -357,9 +357,29 @@ function industrialtest.internal.registerMachine(config)
if config.sounds=="metal" then
definition.sounds=mcl_sounds.node_sound_metal_defaults()
end
definition.groups={pickaxey=1}
definition.groups={
pickaxey=1,
container=2
}
definition._mcl_blast_resistance=3.5
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
definition.groups._industrialtest_wrenchUnmountable=1
if config.requiresWrench then

View File

@@ -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)
end
elseif industrialtest.mclAvailable then
definition.groups={pickaxey=1}
definition.after_dig_node=function(pos,oldnode,oldmeta)
industrialtest.internal.mclAfterDigNode(pos,oldmeta,{"src","fuel","dst"})
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 B

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 405 B

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 B

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 B

After

Width:  |  Height:  |  Size: 880 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 447 B

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 B

After

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 589 B

After

Width:  |  Height:  |  Size: 571 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 790 B

After

Width:  |  Height:  |  Size: 571 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 490 B

After

Width:  |  Height:  |  Size: 776 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 732 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 471 B

After

Width:  |  Height:  |  Size: 977 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 748 B

After

Width:  |  Height:  |  Size: 953 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 414 B

After

Width:  |  Height:  |  Size: 725 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 420 B

After

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 B

After

Width:  |  Height:  |  Size: 658 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 527 B

After

Width:  |  Height:  |  Size: 834 B