Merge branch 'master' of https://git.cubesoftware.xyz/mrkubax10/industrialtest into craftguide
This commit is contained in:
commit
a6bbc0d1d8
1
api.lua
1
api.lua
@ -672,6 +672,7 @@ industrialtest.api.registerPlate=function(name,displayName,resources,color,regis
|
||||
minetest.register_craftitem("industrialtest:"..name,{
|
||||
description=displayName,
|
||||
inventory_image="industrialtest_plate.png",
|
||||
inventory_overlay="industrialtest_plate_overlay.png",
|
||||
color=color
|
||||
})
|
||||
if registerCompressorRecipe then
|
||||
|
@ -15,6 +15,23 @@
|
||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
local S=minetest.get_translator("industrialtest")
|
||||
local colors={
|
||||
bronze="#be4325ff",
|
||||
clay="#707070ff",
|
||||
coal="#262523ff",
|
||||
copper="#bf644aff",
|
||||
diamond="#77cefbff",
|
||||
gold="#eac162ff",
|
||||
iron="#afaca5ff",
|
||||
lapis_lazuli="#3a4cceff",
|
||||
lead="#6d6393ff",
|
||||
mese="#909000ff",
|
||||
obsidian="#292843ff",
|
||||
refined_iron="#94bab9ff",
|
||||
sulfur="#b88805ff",
|
||||
tin="#ebd182ff",
|
||||
uranium="#3b8c09ff",
|
||||
}
|
||||
|
||||
-- Power storage items
|
||||
minetest.register_tool("industrialtest:re_battery",{
|
||||
@ -197,13 +214,13 @@ if industrialtest.mclAvailable then
|
||||
count=2
|
||||
})
|
||||
end
|
||||
industrialtest.api.registerResourceDust("coal","Coal",resources,"#262523ff",true)
|
||||
industrialtest.api.registerResourceDust("coal","Coal",resources,colors.coal,true)
|
||||
industrialtest.api.registerResourceDust("clay","Clay",{
|
||||
{
|
||||
resource=industrialtest.elementKeys.clayBlock,
|
||||
count=2
|
||||
}
|
||||
},"#707070ff",true)
|
||||
},colors.clay,true)
|
||||
resources={
|
||||
{
|
||||
resource=industrialtest.elementKeys.diamondBlock,
|
||||
@ -221,7 +238,7 @@ if industrialtest.mclAvailable then
|
||||
count=2
|
||||
})
|
||||
end
|
||||
industrialtest.api.registerResourceDust("diamond","Diamond",resources,"#77cefbff",true)
|
||||
industrialtest.api.registerResourceDust("diamond","Diamond",resources,colors.diamond,true)
|
||||
minetest.register_craft({
|
||||
type="cooking",
|
||||
output=industrialtest.elementKeys.diamond,
|
||||
@ -248,7 +265,7 @@ if industrialtest.mclAvailable then
|
||||
count=2
|
||||
})
|
||||
end
|
||||
industrialtest.api.registerResourceDust("iron","Iron",resources,"#afaca5ff",true)
|
||||
industrialtest.api.registerResourceDust("iron","Iron",resources,colors.iron,true)
|
||||
minetest.register_craft({
|
||||
type="cooking",
|
||||
output=industrialtest.elementKeys.ironIngot,
|
||||
@ -269,9 +286,9 @@ if industrialtest.mclAvailable then
|
||||
count=9
|
||||
},
|
||||
{resource="mcl_core:lapis_lazuli"}
|
||||
},"#3a4cceff",true)
|
||||
},colors.lapis_lazuli,true)
|
||||
end
|
||||
industrialtest.api.registerResourceDust("obsidian","Obsidian",{{resource=industrialtest.elementKeys.obsidian}},"#292843ff",true)
|
||||
industrialtest.api.registerResourceDust("obsidian","Obsidian",{{resource=industrialtest.elementKeys.obsidian}},colors.obsidian,true)
|
||||
resources={
|
||||
{
|
||||
resource=industrialtest.elementKeys.goldBlock,
|
||||
@ -293,7 +310,7 @@ if industrialtest.mclAvailable then
|
||||
count=2
|
||||
})
|
||||
end
|
||||
industrialtest.api.registerResourceDust("gold","Gold",resources,"#eac162ff",true)
|
||||
industrialtest.api.registerResourceDust("gold","Gold",resources,colors.gold,true)
|
||||
minetest.register_craft({
|
||||
type="cooking",
|
||||
output=industrialtest.elementKeys.goldIngot,
|
||||
@ -320,7 +337,7 @@ if industrialtest.mclAvailable then
|
||||
count=2
|
||||
})
|
||||
end
|
||||
industrialtest.api.registerResourceDust("copper","Copper",resources,"#bf644aff",true)
|
||||
industrialtest.api.registerResourceDust("copper","Copper",resources,colors.copper,true)
|
||||
minetest.register_craft({
|
||||
type="cooking",
|
||||
output=industrialtest.elementKeys.copperIngot,
|
||||
@ -347,7 +364,7 @@ if industrialtest.mclAvailable then
|
||||
count=2
|
||||
})
|
||||
end
|
||||
industrialtest.api.registerResourceDust("tin","Tin",resources,"#ebd182ff",true)
|
||||
industrialtest.api.registerResourceDust("tin","Tin",resources,colors.tin,true)
|
||||
minetest.register_craft({
|
||||
type="cooking",
|
||||
output=industrialtest.elementKeys.tinIngot,
|
||||
@ -374,7 +391,7 @@ if industrialtest.mclAvailable then
|
||||
count=2
|
||||
})
|
||||
end
|
||||
industrialtest.api.registerResourceDust("uranium","Uranium",resources,"#3b8c09ff",true)
|
||||
industrialtest.api.registerResourceDust("uranium","Uranium",resources,colors.uranium,true)
|
||||
minetest.register_craft({
|
||||
type="cooking",
|
||||
output="industrialtest:uranium_ingot",
|
||||
@ -391,7 +408,7 @@ if industrialtest.mtgAvailable then
|
||||
count=2
|
||||
},
|
||||
{resource="default:mese_crystal"}
|
||||
},"#909000ff",true)
|
||||
},colors.mese,true)
|
||||
minetest.register_craft({
|
||||
type="cooking",
|
||||
output="default:mese_crystal",
|
||||
@ -404,7 +421,7 @@ industrialtest.api.registerResourceDust("bronze","Bronze",{
|
||||
count=9
|
||||
},
|
||||
{resource=industrialtest.elementKeys.bronzeIngot}
|
||||
},"#be4325ff",true)
|
||||
},colors.bronze,true)
|
||||
minetest.register_craft({
|
||||
type="shaped",
|
||||
output="industrialtest:bronze_dust 9",
|
||||
@ -431,7 +448,7 @@ industrialtest.api.registerRotaryMaceratorModifier({
|
||||
output="industrialtest:bronze_dust",
|
||||
uses=4
|
||||
})
|
||||
industrialtest.api.registerResourceDust("sulfur","Sulfur",{},"#b88805ff",false)
|
||||
industrialtest.api.registerResourceDust("sulfur","Sulfur",{},colors.sulfur,false)
|
||||
industrialtest.api.registerExtractorRecipe({
|
||||
output="industrialtest:sulfur_dust",
|
||||
recipe=industrialtest.elementKeys.gunpowder
|
||||
@ -450,7 +467,7 @@ industrialtest.api.registerResourceDust("lead","Lead",{
|
||||
count=2
|
||||
},
|
||||
{resource="industrialtest:lead_ingot"}
|
||||
},"#6d6393ff",true)
|
||||
},colors.lead,true)
|
||||
minetest.register_craft({
|
||||
type="cooking",
|
||||
output="industrialtest:lead_ingot",
|
||||
@ -461,7 +478,7 @@ industrialtest.api.registerResourceDust("refined_iron","Refined Iron",{
|
||||
resource="industrialtest:refined_iron_ingot",
|
||||
count=1
|
||||
}
|
||||
},"#94bab9ff",true)
|
||||
},colors.refined_iron,true)
|
||||
industrialtest.api.registerRotaryMaceratorModifier({
|
||||
name=industrialtest.elementKeys.ironLump,
|
||||
modifier=industrialtest.elementKeys.coal,
|
||||
@ -524,14 +541,14 @@ industrialtest.api.registerPlate("bronze_plate",S("Bronze Plate"),{
|
||||
resource=industrialtest.elementKeys.bronzeIngot,
|
||||
count=1
|
||||
}
|
||||
},"#e48e88ff",true)
|
||||
},colors.bronze,true)
|
||||
|
||||
industrialtest.api.registerPlate("copper_plate",S("Copper Plate"),{
|
||||
{
|
||||
resource=industrialtest.elementKeys.copperIngot,
|
||||
count=1
|
||||
}
|
||||
},"#f48e44ff",true)
|
||||
},colors.copper,true)
|
||||
|
||||
industrialtest.api.registerPlate("advanced_alloy",S("Advanced Alloy"),{
|
||||
{
|
||||
@ -552,14 +569,14 @@ industrialtest.api.registerPlate("tin_plate",S("Tin Plate"),{
|
||||
resource=industrialtest.elementKeys.tinIngot,
|
||||
count=1
|
||||
}
|
||||
},"#e0e0e0ff",true)
|
||||
},colors.tin,true)
|
||||
|
||||
industrialtest.api.registerPlate("lead_plate",S("Lead Plate"),{
|
||||
{
|
||||
resource="industrialtest:lead_ingot",
|
||||
count=1
|
||||
}
|
||||
},"#eafef8ff",true)
|
||||
},colors.lead,true)
|
||||
|
||||
industrialtest.api.registerPlate("iridium_plate",S("Iridium Plate"),{},false,"#ffffffff")
|
||||
minetest.register_craft({
|
||||
|
@ -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(industrialtest.updateDelay)
|
||||
end
|
||||
end
|
||||
definition.groups._industrialtest_wrenchUnmountable=1
|
||||
if config.requiresWrench then
|
||||
|
@ -293,12 +293,21 @@ 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,
|
||||
container=2
|
||||
}
|
||||
definition.after_dig_node=function(pos,oldnode,oldmeta)
|
||||
industrialtest.internal.mclAfterDigNode(pos,oldmeta,{"src","fuel","dst"})
|
||||
end
|
||||
definition.sounds=mcl_sounds.node_sound_metal_defaults()
|
||||
definition._mcl_blast_resistance=3
|
||||
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
|
||||
minetest.register_node("industrialtest:iron_furnace",definition)
|
||||
definition=table.copy(definition)
|
||||
@ -317,7 +326,9 @@ definition.drop="industrialtest:iron_furnace"
|
||||
definition.on_timer=ironFurnace.activeOnTimer
|
||||
if industrialtest.mclAvailable then
|
||||
definition.groups={
|
||||
not_in_creative_inventory=1
|
||||
not_in_creative_inventory=1,
|
||||
pickaxey=1,
|
||||
container=2
|
||||
}
|
||||
definition._doc_items_create_entry=false
|
||||
end
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 851 B After Width: | Height: | Size: 229 B |
BIN
textures/industrialtest_plate_overlay.png
Normal file
BIN
textures/industrialtest_plate_overlay.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 144 B |
Loading…
Reference in New Issue
Block a user