Compare commits
13 Commits
craftguide
...
1.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 2a607bedfe | |||
| 4ac7210f40 | |||
| 5b5816a65c | |||
| 36549e9a49 | |||
| bea76ecc62 | |||
| fd569985da | |||
| 67f503758f | |||
| 3fcefc5888 | |||
| b2df6edeaf | |||
| 37e0662640 | |||
| bd40cea113 | |||
| c1728ec7ec | |||
| 6a705dbb01 |
59
api.lua
@@ -32,15 +32,6 @@ industrialtest.api.hvPowerFlow=10200
|
|||||||
industrialtest.api.evPowerFlow=40800
|
industrialtest.api.evPowerFlow=40800
|
||||||
industrialtest.api.ivPowerFlow=163800
|
industrialtest.api.ivPowerFlow=163800
|
||||||
|
|
||||||
industrialtest.api.craftingMethods={
|
|
||||||
macerating="industrialtest.macerating",
|
|
||||||
compressing="industrialtest.compressing",
|
|
||||||
extracting="industrialtest.extracting",
|
|
||||||
recycling="industrialtest.recycling",
|
|
||||||
cableForming="industrialtest.cable_forming",
|
|
||||||
massFabricating="industrialtest.mass_fabricating",
|
|
||||||
}
|
|
||||||
|
|
||||||
industrialtest.internal.clamp=function(num,min,max)
|
industrialtest.internal.clamp=function(num,min,max)
|
||||||
return math.max(math.min(num,max),min)
|
return math.max(math.min(num,max),min)
|
||||||
end
|
end
|
||||||
@@ -523,6 +514,9 @@ end
|
|||||||
|
|
||||||
industrialtest.api.removeNodeFromNetwork=function(pos,nodePos)
|
industrialtest.api.removeNodeFromNetwork=function(pos,nodePos)
|
||||||
local meta=minetest.get_meta(pos)
|
local meta=minetest.get_meta(pos)
|
||||||
|
if not meta:contains("industrialtest.network") then
|
||||||
|
return
|
||||||
|
end
|
||||||
local network=minetest.deserialize(meta:get_string("industrialtest.network"))
|
local network=minetest.deserialize(meta:get_string("industrialtest.network"))
|
||||||
local removed=false
|
local removed=false
|
||||||
for key,node in ipairs(network) do
|
for key,node in ipairs(network) do
|
||||||
@@ -698,13 +692,16 @@ end
|
|||||||
-- \param displayName Display name of cell
|
-- \param displayName Display name of cell
|
||||||
-- \param node Node which can be picked up with this cell
|
-- \param node Node which can be picked up with this cell
|
||||||
-- \returns nil
|
-- \returns nil
|
||||||
industrialtest.api.registerStorageCell=function(name,displayName,node,modname)
|
industrialtest.api.registerStorageCell=function(name,displayName,node,modname,color)
|
||||||
|
color = color or "#ffffffff"
|
||||||
if not modname then
|
if not modname then
|
||||||
modname="industrialtest"
|
modname="industrialtest"
|
||||||
end
|
end
|
||||||
minetest.register_craftitem("industrialtest:"..name.."_cell",{
|
minetest.register_craftitem("industrialtest:"..name.."_cell",{
|
||||||
description=S(displayName.." Cell"),
|
description=S(displayName.." Cell"),
|
||||||
inventory_image=modname.."_"..name.."_cell.png",
|
inventory_image="industrialtest_cell_fluid.png",
|
||||||
|
inventory_overlay="industrialtest_cell_casing.png",
|
||||||
|
color=color,
|
||||||
on_place=function(itemstack,user,pointed)
|
on_place=function(itemstack,user,pointed)
|
||||||
if pointed.type~="node" or not user or not user:is_player() then
|
if pointed.type~="node" or not user or not user:is_player() then
|
||||||
return nil
|
return nil
|
||||||
@@ -759,16 +756,6 @@ 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.api.craftingMethods.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
|
||||||
@@ -787,16 +774,6 @@ industrialtest.api.registerCompressorRecipe=function(config)
|
|||||||
time=config.time or 2,
|
time=config.time or 2,
|
||||||
count=config.count or 1
|
count=config.count or 1
|
||||||
}
|
}
|
||||||
|
|
||||||
if mcl_craftguide ~= nil then
|
|
||||||
mcl_craftguide.register_craft({
|
|
||||||
type = industrialtest.api.craftingMethods.compressing,
|
|
||||||
width = 1,
|
|
||||||
output = definition.output,
|
|
||||||
items = {definition.recipe}
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
industrialtest.api.compressorRecipes[definition.recipe]=definition
|
industrialtest.api.compressorRecipes[definition.recipe]=definition
|
||||||
end
|
end
|
||||||
-- \brief Returns macerator recipe result
|
-- \brief Returns macerator recipe result
|
||||||
@@ -811,16 +788,6 @@ industrialtest.api.registerExtractorRecipe=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.api.craftingMethods.extracting,
|
|
||||||
width = 1,
|
|
||||||
output = definition.output,
|
|
||||||
items = {definition.recipe}
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
industrialtest.api.extractorRecipes[definition.recipe]=definition
|
industrialtest.api.extractorRecipes[definition.recipe]=definition
|
||||||
end
|
end
|
||||||
industrialtest.api.getExtractorRecipeResult=function(recipe)
|
industrialtest.api.getExtractorRecipeResult=function(recipe)
|
||||||
@@ -833,16 +800,6 @@ industrialtest.api.registerCableFormerRecipe=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.api.craftingMethods.cableForming,
|
|
||||||
width = 1,
|
|
||||||
output = definition.output,
|
|
||||||
items = {definition.recipe}
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
industrialtest.api.cableFormerRecipes[definition.recipe]=definition
|
industrialtest.api.cableFormerRecipes[definition.recipe]=definition
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ if industrialtest.mclAvailable then
|
|||||||
minetest.register_tool("industrialtest:"..material.."_pickaxe",{
|
minetest.register_tool("industrialtest:"..material.."_pickaxe",{
|
||||||
description=S(materialDisplayName.." Pickaxe"),
|
description=S(materialDisplayName.." Pickaxe"),
|
||||||
inventory_image="industrialtest_mcl_"..material.."_pickaxe.png",
|
inventory_image="industrialtest_mcl_"..material.."_pickaxe.png",
|
||||||
groups={tool=1,pickaxe=1,dig_speed_class=config.digSpeedClass},
|
groups={tool=1,pickaxe=1,dig_speed_class=config.digSpeedClass,enchantability=config.enchantability},
|
||||||
tool_capabilities={
|
tool_capabilities={
|
||||||
full_punch_interval=1,
|
full_punch_interval=1,
|
||||||
max_drop_level=config.dropLevel,
|
max_drop_level=config.dropLevel,
|
||||||
@@ -218,7 +218,7 @@ if industrialtest.mclAvailable then
|
|||||||
minetest.register_tool("industrialtest:"..material.."_shovel",{
|
minetest.register_tool("industrialtest:"..material.."_shovel",{
|
||||||
description=S(materialDisplayName.." Shovel"),
|
description=S(materialDisplayName.." Shovel"),
|
||||||
inventory_image="industrialtest_mcl_"..material.."_shovel.png",
|
inventory_image="industrialtest_mcl_"..material.."_shovel.png",
|
||||||
groups={tool=1,shovel=1,dig_speed_class=config.digSpeedClass},
|
groups={tool=1,shovel=1,dig_speed_class=config.digSpeedClass,enchantability=config.enchantability},
|
||||||
tool_capabilities={
|
tool_capabilities={
|
||||||
full_punch_interval=1,
|
full_punch_interval=1,
|
||||||
max_drop_level=config.dropLevel,
|
max_drop_level=config.dropLevel,
|
||||||
@@ -270,7 +270,7 @@ if industrialtest.mclAvailable then
|
|||||||
minetest.register_tool("industrialtest:"..material.."_axe",{
|
minetest.register_tool("industrialtest:"..material.."_axe",{
|
||||||
description=S(materialDisplayName.." Axe"),
|
description=S(materialDisplayName.." Axe"),
|
||||||
inventory_image="industrialtest_mcl_"..material.."_axe.png",
|
inventory_image="industrialtest_mcl_"..material.."_axe.png",
|
||||||
groups={tool=1,axe=1,dig_speed_class=config.digSpeedClass},
|
groups={tool=1,axe=1,dig_speed_class=config.digSpeedClass,enchantability=config.enchantability},
|
||||||
tool_capabilities={
|
tool_capabilities={
|
||||||
full_punch_interval=1,
|
full_punch_interval=1,
|
||||||
max_level_drop=config.levelDrop,
|
max_level_drop=config.levelDrop,
|
||||||
@@ -287,7 +287,7 @@ if industrialtest.mclAvailable then
|
|||||||
minetest.register_tool("industrialtest:"..material.."_sword",{
|
minetest.register_tool("industrialtest:"..material.."_sword",{
|
||||||
description=S(materialDisplayName.." Sword"),
|
description=S(materialDisplayName.." Sword"),
|
||||||
inventory_image="industrialtest_mcl_"..material.."_sword.png",
|
inventory_image="industrialtest_mcl_"..material.."_sword.png",
|
||||||
groups={weapon=1,sword=1,dig_speed_class=config.digSpeedClass},
|
groups={weapon=1,sword=1,dig_speed_class=config.digSpeedClass,enchantability=config.enchantability},
|
||||||
tool_capabilities={
|
tool_capabilities={
|
||||||
full_punch_interval=0.625,
|
full_punch_interval=0.625,
|
||||||
max_drop_level=config.maxDropLevel,
|
max_drop_level=config.maxDropLevel,
|
||||||
@@ -304,7 +304,7 @@ if industrialtest.mclAvailable then
|
|||||||
minetest.register_tool("industrialtest:"..material.."_hoe",{
|
minetest.register_tool("industrialtest:"..material.."_hoe",{
|
||||||
description=S(materialDisplayName.." Hoe"),
|
description=S(materialDisplayName.." Hoe"),
|
||||||
inventory_image="industrialtest_mcl_"..material.."_hoe.png",
|
inventory_image="industrialtest_mcl_"..material.."_hoe.png",
|
||||||
groups={tool=1,hoe=1},
|
groups={tool=1,hoe=1,enchantability=config.enchantability},
|
||||||
tool_capabilities={
|
tool_capabilities={
|
||||||
full_punch_interval=1,
|
full_punch_interval=1,
|
||||||
damage_groups={fleshy=1}
|
damage_groups={fleshy=1}
|
||||||
@@ -372,6 +372,7 @@ if industrialtest.mclAvailable then
|
|||||||
cook_material=config.armorCookMaterial,
|
cook_material=config.armorCookMaterial,
|
||||||
sound_equip=config.armorEquipSound,
|
sound_equip=config.armorEquipSound,
|
||||||
sound_unequip=config.armorUnequipSound,
|
sound_unequip=config.armorUnequipSound,
|
||||||
|
enchantability=config.enchantability,
|
||||||
textures={
|
textures={
|
||||||
head="industrialtest_mcl_"..material.."_helmet.png",
|
head="industrialtest_mcl_"..material.."_helmet.png",
|
||||||
torso="industrialtest_mcl_"..material.."_chestplate.png",
|
torso="industrialtest_mcl_"..material.."_chestplate.png",
|
||||||
@@ -529,7 +530,7 @@ if industrialtest.mclAvailable then
|
|||||||
})
|
})
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type="shaped",
|
type="shaped",
|
||||||
output="industrialcraft:bronze_ingot 9",
|
output="industrialtest:bronze_ingot 9",
|
||||||
recipe={
|
recipe={
|
||||||
{"mcl_copper:copper_ingot","mcl_copper:copper_ingot","mcl_copper:copper_ingot"},
|
{"mcl_copper:copper_ingot","mcl_copper:copper_ingot","mcl_copper:copper_ingot"},
|
||||||
{"mcl_copper:copper_ingot","industrialtest:tin_ingot","mcl_copper:copper_ingot"},
|
{"mcl_copper:copper_ingot","industrialtest:tin_ingot","mcl_copper:copper_ingot"},
|
||||||
@@ -575,7 +576,8 @@ if industrialtest.mclAvailable then
|
|||||||
},
|
},
|
||||||
armorCookMaterial="industrialtest:bronze_nugget",
|
armorCookMaterial="industrialtest:bronze_nugget",
|
||||||
armorEquipSound="mcl_armor_equip_iron",
|
armorEquipSound="mcl_armor_equip_iron",
|
||||||
armorUnequipSound="mcl_armor_unequip_iron"
|
armorUnequipSound="mcl_armor_unequip_iron",
|
||||||
|
enchantability=15,
|
||||||
})
|
})
|
||||||
|
|
||||||
--register other blocks that are not availabe in MCL
|
--register other blocks that are not availabe in MCL
|
||||||
@@ -618,32 +620,6 @@ 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"
|
|
||||||
})
|
|
||||||
mcl_craftguide.register_craft_type("industrialtest.compressing", {
|
|
||||||
description = S("Compressing"),
|
|
||||||
icon = "industrialtest_machine_block.png^industrialtest_compressor_front_active.png"
|
|
||||||
})
|
|
||||||
mcl_craftguide.register_craft_type("industrialtest.extracting", {
|
|
||||||
description = S("Extracting"),
|
|
||||||
icon = "industrialtest_machine_block.png^industrialtest_extractor_front_active.png"
|
|
||||||
})
|
|
||||||
mcl_craftguide.register_craft_type("industrialtest.recycling", {
|
|
||||||
description = S("Recycling"),
|
|
||||||
icon = "industrialtest_machine_block.png^industrialtest_recycler_top_active.png"
|
|
||||||
})
|
|
||||||
mcl_craftguide.register_craft_type("industrialtest.cable_forming", {
|
|
||||||
description = S("Cable Forming"),
|
|
||||||
icon = "industrialtest_machine_block.png^industrialtest_cable_former_front_active.png"
|
|
||||||
})
|
|
||||||
mcl_craftguide.register_craft_type("industrialtest.mass_fabricating", {
|
|
||||||
description = S("Mass Fabricating"),
|
|
||||||
icon = "industrialtest_machine_block.png^industrialtest_mass_fabricator_front_active.png"
|
|
||||||
})
|
|
||||||
|
|
||||||
elseif industrialtest.mtgAvailable then
|
elseif industrialtest.mtgAvailable then
|
||||||
industrialtest.internal.registerMetal=function(name,displayName,hardness)
|
industrialtest.internal.registerMetal=function(name,displayName,hardness)
|
||||||
minetest.register_craftitem("industrialtest:"..name.."_lump",{
|
minetest.register_craftitem("industrialtest:"..name.."_lump",{
|
||||||
|
|||||||
@@ -31,6 +31,14 @@ local colors={
|
|||||||
sulfur="#b88805ff",
|
sulfur="#b88805ff",
|
||||||
tin="#ebd182ff",
|
tin="#ebd182ff",
|
||||||
uranium="#3b8c09ff",
|
uranium="#3b8c09ff",
|
||||||
|
-- fluid colors
|
||||||
|
lava="#ff5712ff",
|
||||||
|
water="#277bbcff",
|
||||||
|
river_water="#0ebfc2ff",
|
||||||
|
biomass="#2a8626ff",
|
||||||
|
biofuel="#4eba49ff",
|
||||||
|
coalfuel="#462228ff",
|
||||||
|
coolant="#188676ff"
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Power storage items
|
-- Power storage items
|
||||||
@@ -626,12 +634,12 @@ minetest.register_craft({
|
|||||||
{"",industrialtest.elementKeys.tinIngot,""}
|
{"",industrialtest.elementKeys.tinIngot,""}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
industrialtest.api.registerStorageCell("water","Water",industrialtest.elementKeys.waterSource)
|
industrialtest.api.registerStorageCell("water","Water",industrialtest.elementKeys.waterSource,nil,colors.water)
|
||||||
if industrialtest.mtgAvailable then
|
if industrialtest.mtgAvailable then
|
||||||
industrialtest.api.registerStorageCell("river_water","River Water","default:river_water_source")
|
industrialtest.api.registerStorageCell("river_water","River Water","default:river_water_source",nil,colors.river_water)
|
||||||
end
|
end
|
||||||
|
|
||||||
industrialtest.api.registerStorageCell("lava","Lava",industrialtest.elementKeys.lavaSource)
|
industrialtest.api.registerStorageCell("lava","Lava",industrialtest.elementKeys.lavaSource,nil,colors.lava)
|
||||||
|
|
||||||
minetest.register_tool("industrialtest:uranium_cell",{
|
minetest.register_tool("industrialtest:uranium_cell",{
|
||||||
description=S("Uranium Cell"),
|
description=S("Uranium Cell"),
|
||||||
@@ -639,7 +647,9 @@ minetest.register_tool("industrialtest:uranium_cell",{
|
|||||||
_industrialtest_placedInNuclearReactor=1,
|
_industrialtest_placedInNuclearReactor=1,
|
||||||
_industrialtest_nuclearReactorFuel=1
|
_industrialtest_nuclearReactorFuel=1
|
||||||
},
|
},
|
||||||
inventory_image="industrialtest_uranium_cell.png",
|
inventory_image="industrialtest_cell_fluid.png",
|
||||||
|
inventory_overlay="industrialtest_cell_casing.png",
|
||||||
|
color=colors.uranium,
|
||||||
})
|
})
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type="shapeless",
|
type="shapeless",
|
||||||
@@ -656,7 +666,9 @@ minetest.register_tool("industrialtest:coolant_cell",{
|
|||||||
_industrialtest_placedInNuclearReactor=1,
|
_industrialtest_placedInNuclearReactor=1,
|
||||||
_industrialtest_nuclearReactorCoolant=1
|
_industrialtest_nuclearReactorCoolant=1
|
||||||
},
|
},
|
||||||
inventory_image="industrialtest_coolant_cell.png",
|
inventory_image="industrialtest_cell_fluid.png",
|
||||||
|
inventory_overlay="industrialtest_cell_casing.png",
|
||||||
|
color=colors.coolant,
|
||||||
})
|
})
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type="shaped",
|
type="shaped",
|
||||||
@@ -681,7 +693,9 @@ end
|
|||||||
|
|
||||||
minetest.register_craftitem("industrialtest:bio_cell",{
|
minetest.register_craftitem("industrialtest:bio_cell",{
|
||||||
description=S("Bio Cell"),
|
description=S("Bio Cell"),
|
||||||
inventory_image="industrialtest_bio_cell.png"
|
inventory_image="industrialtest_cell_fluid.png",
|
||||||
|
inventory_overlay="industrialtest_cell_casing.png",
|
||||||
|
color=colors.biomass,
|
||||||
})
|
})
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type="shapeless",
|
type="shapeless",
|
||||||
@@ -694,7 +708,9 @@ minetest.register_craft({
|
|||||||
|
|
||||||
minetest.register_craftitem("industrialtest:biofuel_cell",{
|
minetest.register_craftitem("industrialtest:biofuel_cell",{
|
||||||
description=S("Biofuel Cell"),
|
description=S("Biofuel Cell"),
|
||||||
inventory_image="industrialtest_bio_cell.png",
|
inventory_image="industrialtest_cell_fluid.png",
|
||||||
|
inventory_overlay="industrialtest_cell_casing.png",
|
||||||
|
color=colors.biofuel,
|
||||||
groups={
|
groups={
|
||||||
_industrialtest_fuel=1
|
_industrialtest_fuel=1
|
||||||
},
|
},
|
||||||
@@ -709,7 +725,9 @@ industrialtest.api.registerExtractorRecipe({
|
|||||||
|
|
||||||
minetest.register_craftitem("industrialtest:hydrated_coal_cell",{
|
minetest.register_craftitem("industrialtest:hydrated_coal_cell",{
|
||||||
description=S("Hydrated Coal Cell"),
|
description=S("Hydrated Coal Cell"),
|
||||||
inventory_image="industrialtest_hydrated_coal_cell.png"
|
inventory_image="industrialtest_cell_fluid.png",
|
||||||
|
inventory_overlay="industrialtest_cell_casing.png",
|
||||||
|
color=colors.coal,
|
||||||
})
|
})
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type="shapeless",
|
type="shapeless",
|
||||||
@@ -722,7 +740,9 @@ minetest.register_craft({
|
|||||||
|
|
||||||
minetest.register_craftitem("industrialtest:coalfuel_cell",{
|
minetest.register_craftitem("industrialtest:coalfuel_cell",{
|
||||||
description=S("Coalfuel Cell"),
|
description=S("Coalfuel Cell"),
|
||||||
inventory_image="industrialtest_coalfuel_cell.png",
|
inventory_image="industrialtest_cell_fluid.png",
|
||||||
|
inventory_overlay="industrialtest_cell_casing.png",
|
||||||
|
color=colors.coalfuel,
|
||||||
groups={
|
groups={
|
||||||
_industrialtest_fuel=1
|
_industrialtest_fuel=1
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ industrialtest.internal.registerSimpleElectricItemProcessor({
|
|||||||
capacity=1400,
|
capacity=1400,
|
||||||
flow=industrialtest.api.lvPowerFlow,
|
flow=industrialtest.api.lvPowerFlow,
|
||||||
opPower=80,
|
opPower=80,
|
||||||
method=industrialtest.api.craftingMethods.cableForming,
|
method="industrialtest.cable_forming",
|
||||||
efficiency=1
|
efficiency=1
|
||||||
})
|
})
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
|||||||
@@ -455,7 +455,7 @@ local function craftResultProxy(method,item)
|
|||||||
time=output.time,
|
time=output.time,
|
||||||
src=after.items[1]
|
src=after.items[1]
|
||||||
}
|
}
|
||||||
elseif method==industrialtest.api.craftingMethods.macerating then
|
elseif method=="industrialtest.macerating" then
|
||||||
local output=industrialtest.api.getMaceratorRecipeResult(item:get_name())
|
local output=industrialtest.api.getMaceratorRecipeResult(item:get_name())
|
||||||
if not output then
|
if not output then
|
||||||
return {
|
return {
|
||||||
@@ -471,7 +471,7 @@ local function craftResultProxy(method,item)
|
|||||||
time=output.time,
|
time=output.time,
|
||||||
src=srcAfter
|
src=srcAfter
|
||||||
}
|
}
|
||||||
elseif method==industrialtest.api.craftingMethods.compressing then
|
elseif method=="industrialtest.compressing" then
|
||||||
local output=industrialtest.api.getCompressorRecipeResult(item:get_name())
|
local output=industrialtest.api.getCompressorRecipeResult(item:get_name())
|
||||||
if not output or item:get_count()<output.count then
|
if not output or item:get_count()<output.count then
|
||||||
return {
|
return {
|
||||||
@@ -487,7 +487,7 @@ local function craftResultProxy(method,item)
|
|||||||
time=output.time,
|
time=output.time,
|
||||||
src=srcAfter
|
src=srcAfter
|
||||||
}
|
}
|
||||||
elseif method==industrialtest.api.craftingMethods.extracting then
|
elseif method=="industrialtest.extracting" then
|
||||||
local output=industrialtest.api.getExtractorRecipeResult(item:get_name())
|
local output=industrialtest.api.getExtractorRecipeResult(item:get_name())
|
||||||
if not output then
|
if not output then
|
||||||
return {
|
return {
|
||||||
@@ -503,7 +503,7 @@ local function craftResultProxy(method,item)
|
|||||||
time=output.time,
|
time=output.time,
|
||||||
src=srcAfter
|
src=srcAfter
|
||||||
}
|
}
|
||||||
elseif method==industrialtest.api.craftingMethods.recycling then
|
elseif method=="industrialtest.recycling" then
|
||||||
local srcAfter=ItemStack(item:get_name())
|
local srcAfter=ItemStack(item:get_name())
|
||||||
srcAfter:set_count(item:get_count()-1)
|
srcAfter:set_count(item:get_count()-1)
|
||||||
return {
|
return {
|
||||||
@@ -511,7 +511,7 @@ local function craftResultProxy(method,item)
|
|||||||
time=2,
|
time=2,
|
||||||
src=srcAfter
|
src=srcAfter
|
||||||
}
|
}
|
||||||
elseif method==industrialtest.api.craftingMethods.cableForming then
|
elseif method=="industrialtest.cable_forming" then
|
||||||
local output=industrialtest.api.getCableFormerRecipeResult(item:get_name())
|
local output=industrialtest.api.getCableFormerRecipeResult(item:get_name())
|
||||||
if not output then
|
if not output then
|
||||||
return {
|
return {
|
||||||
@@ -527,7 +527,7 @@ local function craftResultProxy(method,item)
|
|||||||
time=output.time,
|
time=output.time,
|
||||||
src=srcAfter
|
src=srcAfter
|
||||||
}
|
}
|
||||||
elseif method==industrialtest.api.craftingMethods.massFabricating then
|
elseif method=="industrialtest.mass_fabricating" then
|
||||||
if item:get_count()<34 then
|
if item:get_count()<34 then
|
||||||
return {
|
return {
|
||||||
item=ItemStack(),
|
item=ItemStack(),
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ industrialtest.internal.registerSimpleElectricItemProcessor({
|
|||||||
capacity=1400,
|
capacity=1400,
|
||||||
flow=industrialtest.api.lvPowerFlow,
|
flow=industrialtest.api.lvPowerFlow,
|
||||||
opPower=120,
|
opPower=120,
|
||||||
method=industrialtest.api.craftingMethods.compressing,
|
method="industrialtest.compressing",
|
||||||
efficiency=1
|
efficiency=1
|
||||||
})
|
})
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ industrialtest.internal.registerSimpleElectricItemProcessor({
|
|||||||
capacity=1200,
|
capacity=1200,
|
||||||
flow=industrialtest.api.lvPowerFlow,
|
flow=industrialtest.api.lvPowerFlow,
|
||||||
opPower=100,
|
opPower=100,
|
||||||
method=industrialtest.api.craftingMethods.macerating,
|
method="industrialtest.macerating",
|
||||||
efficiency=1
|
efficiency=1
|
||||||
})
|
})
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ local transformer={}
|
|||||||
transformer.onPowerFlow=function(pos,side,amount)
|
transformer.onPowerFlow=function(pos,side,amount)
|
||||||
local normalized=industrialtest.api.normalizeSide(pos,side)
|
local normalized=industrialtest.api.normalizeSide(pos,side)
|
||||||
local def=minetest.registered_nodes[minetest.get_node(pos).name]
|
local def=minetest.registered_nodes[minetest.get_node(pos).name]
|
||||||
if normalized~=5 and amount>=def._industrialtest_lowerFlow then
|
if normalized~=5 and amount>def._industrialtest_lowerFlow then
|
||||||
minetest.remove_node(pos)
|
minetest.remove_node(pos)
|
||||||
industrialtest.internal.explode(pos,2)
|
industrialtest.internal.explode(pos,2)
|
||||||
end
|
end
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
BIN
textures/industrialtest_cell_casing.png
Normal file
|
After Width: | Height: | Size: 290 B |
BIN
textures/industrialtest_cell_fluid.png
Normal file
|
After Width: | Height: | Size: 121 B |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 863 B |
|
Before Width: | Height: | Size: 815 B After Width: | Height: | Size: 282 B |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 867 B |
|
Before Width: | Height: | Size: 878 B |
|
Before Width: | Height: | Size: 859 B |
|
Before Width: | Height: | Size: 862 B |
@@ -31,6 +31,10 @@ local function registerElectricChainsaw(config)
|
|||||||
local definition={
|
local definition={
|
||||||
description=config.displayName,
|
description=config.displayName,
|
||||||
inventory_image="industrialtest_"..config.name..".png",
|
inventory_image="industrialtest_"..config.name..".png",
|
||||||
|
after_use=function(itemstack)
|
||||||
|
-- Hack to make sure that chainsaw won't be destroyed when has 0 EU
|
||||||
|
return nil
|
||||||
|
end,
|
||||||
_industrialtest_powerStorage=true,
|
_industrialtest_powerStorage=true,
|
||||||
_industrialtest_powerCapacity=10000,
|
_industrialtest_powerCapacity=10000,
|
||||||
_industrialtest_powerFlow=industrialtest.api.lvPowerFlow,
|
_industrialtest_powerFlow=industrialtest.api.lvPowerFlow,
|
||||||
@@ -70,10 +74,6 @@ local function registerElectricChainsaw(config)
|
|||||||
end
|
end
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
definition.after_use=function(itemstack)
|
|
||||||
-- Hack to make sure that chainsaw won't be destroyed when has 0 EU in MCL
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
definition._mcl_diggroups={
|
definition._mcl_diggroups={
|
||||||
axey={
|
axey={
|
||||||
speed=config.inactiveDigSpeed,
|
speed=config.inactiveDigSpeed,
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ local function registerElectricDrill(config)
|
|||||||
local definition={
|
local definition={
|
||||||
description=config.displayName,
|
description=config.displayName,
|
||||||
inventory_image="industrialtest_"..config.name..".png",
|
inventory_image="industrialtest_"..config.name..".png",
|
||||||
|
after_use=function()
|
||||||
|
-- Hack to make sure that drill won't be destroyed when has 0 EU
|
||||||
|
return nil
|
||||||
|
end,
|
||||||
_industrialtest_powerStorage=true,
|
_industrialtest_powerStorage=true,
|
||||||
_industrialtest_powerCapacity=10000,
|
_industrialtest_powerCapacity=10000,
|
||||||
_industrialtest_powerFlow=industrialtest.api.lvPowerFlow,
|
_industrialtest_powerFlow=industrialtest.api.lvPowerFlow,
|
||||||
@@ -64,10 +68,6 @@ local function registerElectricDrill(config)
|
|||||||
tool=1,
|
tool=1,
|
||||||
dig_speed_class=config.digSpeedClass
|
dig_speed_class=config.digSpeedClass
|
||||||
}
|
}
|
||||||
definition.after_use=function()
|
|
||||||
-- Hack to make sure that drill won't be destroyed when has 0 EU in MCL
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
definition._mcl_diggroups={
|
definition._mcl_diggroups={
|
||||||
pickaxey={
|
pickaxey={
|
||||||
speed=config.inactiveDigSpeed,
|
speed=config.inactiveDigSpeed,
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ local function registerElectricSaber(config)
|
|||||||
local definition={
|
local definition={
|
||||||
description=config.displayName,
|
description=config.displayName,
|
||||||
inventory_image="industrialtest_"..config.name..".png",
|
inventory_image="industrialtest_"..config.name..".png",
|
||||||
|
after_use=function()
|
||||||
|
-- Hack to make sure that saber won't be destroyed when has 0 EU
|
||||||
|
return nil
|
||||||
|
end,
|
||||||
_industrialtest_powerStorage=true,
|
_industrialtest_powerStorage=true,
|
||||||
_industrialtest_powerCapacity=10000,
|
_industrialtest_powerCapacity=10000,
|
||||||
_industrialtest_powerFlow=industrialtest.api.lvPowerFlow,
|
_industrialtest_powerFlow=industrialtest.api.lvPowerFlow,
|
||||||
@@ -62,10 +66,6 @@ local function registerElectricSaber(config)
|
|||||||
max_drop_level=config.maxDropLevel,
|
max_drop_level=config.maxDropLevel,
|
||||||
damage_groups={fleshy=config.inactiveDamage}
|
damage_groups={fleshy=config.inactiveDamage}
|
||||||
}
|
}
|
||||||
definition.after_use=function()
|
|
||||||
-- Hack to make sure that saber won't be destroyed when has 0 EU in MCL
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
definition._mcl_toollike_wield=true
|
definition._mcl_toollike_wield=true
|
||||||
definition._mcl_diggroups={
|
definition._mcl_diggroups={
|
||||||
swordy={
|
swordy={
|
||||||
|
|||||||