1 Commits

Author SHA1 Message Date
71edb454bc Saving work 2024-03-28 17:48:12 +01:00
9 changed files with 45 additions and 296 deletions

View File

@@ -647,7 +647,7 @@ end
-- \returns nil
industrialtest.api.registerResourceDust=function(name,displayName,resources,color,registerMaceratorRecipe)
minetest.register_craftitem("industrialtest:"..name.."_dust",{
description=S("@1 Dust", displayName),
description=S(displayName.." Dust"),
inventory_image="industrialtest_dust.png",
color=color
})
@@ -693,7 +693,7 @@ industrialtest.api.registerStorageCell=function(name,displayName,node,modname)
modname="industrialtest"
end
minetest.register_craftitem("industrialtest:"..name.."_cell",{
description=S("@1 Cell", displayName),
description=S(displayName.." Cell"),
inventory_image=modname.."_"..name.."_cell.png",
on_place=function(itemstack,user,pointed)
if pointed.type~="node" or not user or not user:is_player() then

View File

@@ -47,7 +47,7 @@ end
local function registerCable(name,displayName,size,flow,registerInsulated)
local definition={
description=S("@1 Cable", displayName),
description=S(displayName.." Cable"),
inventory_image="industrialtest_"..name.."_cable_inv.png",
tiles={"industrialtest_"..name.."_cable.png"},
wield_image="industrialtest_"..name.."_cable_inv.png",
@@ -142,7 +142,7 @@ local function registerCable(name,displayName,size,flow,registerInsulated)
minetest.register_node("industrialtest:"..name.."_cable",definition)
if registerInsulated then
definition=table.copy(definition)
definition.description=S("Insulated @1 Cable", displayName)
definition.description=S("Insulated "..displayName.." Cable")
definition.inventory_image="industrialtest_insulated_"..name.."_cable_inv.png"
definition.tiles={"industrialtest_insulated_"..name.."_cable.png"}
definition.wield_image="industrialtest_insulated_"..name.."_cable_inv.png"

View File

@@ -93,11 +93,13 @@ override={
if meta:get_int("meseconPowered")==1 then
return
end
local chambers=minetest.deserialize(meta:get_string("chambers"))
for _,chamber in ipairs(chambers) do
local chamberMeta=minetest.get_meta(chamber)
if chamberMeta:get_int("meseconPowered")==1 then
return
if meta:contains("chambers") then
local chambers=minetest.deserialize(meta:get_string("chambers"))
for _,chamber in ipairs(chambers) do
local chamberMeta=minetest.get_meta(chamber)
if chamberMeta:get_int("meseconPowered")==1 then
return
end
end
end

View File

@@ -94,15 +94,15 @@ end
if industrialtest.mclAvailable then
industrialtest.internal.registerMetal=function(name,displayName,oreBlastResistance,oreHardness,rawBlockBlastResistance,rawBlockHardness,blockBlastResistance,blockHardness)
minetest.register_craftitem("industrialtest:raw_"..name,{
description=S("Raw @1", displayName),
description=S("Raw "..displayName),
inventory_image="industrialtest_mcl_raw_"..name..".png"
})
minetest.register_craftitem("industrialtest:"..name.."_ingot",{
description=S("@1 Ingot", displayName),
description=S(displayName.." Ingot"),
inventory_image="industrialtest_mcl_"..name.."_ingot.png"
})
minetest.register_node("industrialtest:stone_with_"..name,{
description=S("@1 Ore", displayName),
description=S(displayName.." Ore"),
tiles={"default_stone.png^industrialtest_mcl_stone_with_"..name..".png"},
sounds=mcl_sounds.node_sound_stone_defaults(),
drop="industrialtest:raw_"..name,
@@ -114,7 +114,7 @@ if industrialtest.mclAvailable then
_mcl_fortune_drop = mcl_core.fortune_drop_ore,
})
minetest.register_node("industrialtest:deepslate_with_"..name,{
description=S("Deepslate with @1", displayName),
description=S("Deepslate with "..displayName),
tiles={"mcl_deepslate_top.png^industrialtest_mcl_stone_with_"..name..".png","mcl_deepslate_top.png^industrialtest_mcl_stone_with_"..name..".png","mcl_deepslate.png^industrialtest_mcl_stone_with_"..name..".png"},
sounds=mcl_sounds.node_sound_stone_defaults(),
drop="industrialtest:raw_"..name,
@@ -128,7 +128,7 @@ if industrialtest.mclAvailable then
_mcl_fortune_drop = mcl_core.fortune_drop_ore,
})
minetest.register_node("industrialtest:raw_"..name.."_block",{
description=S("Raw @1 Block", displayName),
description=S("Raw "..displayName.." Block"),
tiles={"industrialtest_mcl_raw_"..name.."_block.png"},
groups={pickaxey=2,building_block=1,blast_furnace_smeltable=1},
sounds=mcl_sounds.node_sound_metal_defaults(),
@@ -136,7 +136,7 @@ if industrialtest.mclAvailable then
_mcl_hardness=rawBlockHardness,
})
minetest.register_node("industrialtest:"..name.."_block",{
description=S("Block of @1", displayName),
description=S("Block of "..displayName),
tiles={"industrialtest_"..name.."_block.png"},
groups={pickaxey=2,building_block=1},
sounds=mcl_sounds.node_sound_metal_defaults(),
@@ -192,7 +192,7 @@ if industrialtest.mclAvailable then
end
industrialtest.registerToolset=function(material,materialItem,materialDisplayName,config)
minetest.register_tool("industrialtest:"..material.."_pickaxe",{
description=S("@1 Pickaxe", materialDisplayName),
description=S(materialDisplayName.." Pickaxe"),
inventory_image="industrialtest_mcl_"..material.."_pickaxe.png",
groups={tool=1,pickaxe=1,dig_speed_class=config.digSpeedClass},
tool_capabilities={
@@ -208,7 +208,7 @@ if industrialtest.mclAvailable then
}
})
minetest.register_tool("industrialtest:"..material.."_shovel",{
description=S("@1 Shovel", materialDisplayName),
description=S(materialDisplayName.." Shovel"),
inventory_image="industrialtest_mcl_"..material.."_shovel.png",
groups={tool=1,shovel=1,dig_speed_class=config.digSpeedClass},
tool_capabilities={
@@ -260,7 +260,7 @@ if industrialtest.mclAvailable then
}
})
minetest.register_tool("industrialtest:"..material.."_axe",{
description=S("@1 Axe", materialDisplayName),
description=S(materialDisplayName.." Axe"),
inventory_image="industrialtest_mcl_"..material.."_axe.png",
groups={tool=1,axe=1,dig_speed_class=config.digSpeedClass},
tool_capabilities={
@@ -277,7 +277,7 @@ if industrialtest.mclAvailable then
}
})
minetest.register_tool("industrialtest:"..material.."_sword",{
description=S("@1 Sword", materialDisplayName),
description=S(materialDisplayName.." Sword"),
inventory_image="industrialtest_mcl_"..material.."_sword.png",
groups={weapon=1,sword=1,dig_speed_class=config.digSpeedClass},
tool_capabilities={
@@ -294,7 +294,7 @@ if industrialtest.mclAvailable then
}
})
minetest.register_tool("industrialtest:"..material.."_hoe",{
description=S("@1 Hoe", materialDisplayName),
description=S(materialDisplayName.." Hoe"),
inventory_image="industrialtest_mcl_"..material.."_hoe.png",
groups={tool=1,hoe=1},
tool_capabilities={
@@ -358,12 +358,6 @@ if industrialtest.mclAvailable then
mcl_armor.register_set({
name=material,
description=materialDisplayName,
descriptions = {
head = "Helmet",
torso = "Chestplate",
legs = "Leggings",
feet = "Boots",
},
durability=config.uses,
points=config.armorPoints,
craft_material="industrialtest:"..material,
@@ -558,7 +552,7 @@ if industrialtest.mclAvailable then
}
})
industrialtest.elementKeys.bronzeIngot="industrialtest:bronze_ingot"
industrialtest.registerToolset("bronze","bronze_ingot",S("Bronze"),{
industrialtest.registerToolset("bronze","bronze_ingot","Bronze",{
digSpeedClass=4,
dropLevel=4,
speed=6,
@@ -623,22 +617,22 @@ elseif industrialtest.mtgAvailable then
industrialtest.internal.registerMetal=function(name,displayName,hardness)
minetest.register_craftitem("industrialtest:"..name.."_lump",{
description=S("@1 Lump", displayName),
description=S(displayName.." Lump"),
inventory_image="industrialtest_mtg_"..name.."_lump.png"
})
minetest.register_craftitem("industrialtest:"..name.."_ingot",{
description=S("@1 Ingot", displayName),
description=S(displayName.." Ingot"),
inventory_image="industrialtest_mtg_"..name.."_ingot.png"
})
minetest.register_node("industrialtest:stone_with_"..name,{
description=S("@1 Ore", displayName),
description=S(displayName.." Ore"),
tiles={"default_stone.png^industrialtest_mtg_stone_with_"..name..".png"},
sounds=default.node_sound_stone_defaults(),
drop="industrialtest:"..name.."_lump",
groups={cracky=hardness},
})
minetest.register_node("industrialtest:"..name.."_block",{
description=S("Block of @1", displayName),
description=S("Block of "..displayName),
tiles={"industrialtest_"..name.."_block.png"},
groups={cracky=hardness,level=2},
sounds=default.node_sound_metal_defaults(),

View File

@@ -1,140 +0,0 @@
# textdomain: industrialtest
@1@n@2 / @3 EU=
@1@n@2 / @3 mB=
@1 Dust=
@1 Cell=
@1 Cable=
Insulated @1 Cable=
Raw @1=
@1 Ingot=
@1 Ore=
Deepslate with @1=
Raw @1 Block=
Block of @1=
@1 Pickaxe=
@1 Shovel=
@1 Axe=
@1 Sword=
@1 Hoe=
Bronze Ingot=
Bronze Nugget=
Bronze=
Block of Bronze=
@1 Lump=
RE-Battery=
Advanced RE-Battery=
Energy Crystal=
Lapotron Crystal=
Refined Iron Ingot=
Mixed Metal Ingot=
Sticky Resin=
Rubber=
Raw Carbon Fibre=
Raw Carbon Mesh=
Hydrated Coal Dust=
Hydrated Coal=
Bronze Plate=
Copper Plate=
Advanced Alloy=
Carbon Plate=
Tin Plate=
Lead Plate=
Empty Cell=
Uranium Cell=
Coolant Cell=
Bio Cell=
Biofuel Cell=
Hydrated Coal Cell=
Coalfuel Cell=
Electronic Circuit=
Advanced Electronic Circuit=
Scrap=
UU-Matter=
Plantball=
Compressed Plantball=
Fuel Can=
Cable Former=
Canning Machine=
BatBox Chargepad=
CESU Chargepad=
MFE Chargepad=
MFSU Chargepad=
Charge=
Discharge=
Compressor=
Electric Furnace=
Extractor=
Geothermal Generator=
Water Mill=
Generator=
Heat: @1 %=
Induction Furnace=
Iron Furnace=
Macerator=
Mass Fabricator=
Start=
Stop=
Nuclear Reactor=
Nuclear Reactor Chamber=
BatBox=
CESU=
MFE=
MFSU=
Recycler=
Don't maintain speed=
Maintain speed=
Speed: @1=
Rotary Macerator=
Solar Panel=
LV Solar Array=
MV Solar Array=
HV Solar Array=
Tool Workshop=
LV Transformer=
MV Transformer=
HV Transformer=
EV Transformer=
Wind Mill=
Machine Block=
Advanced Machine Block=
Rubber Wood=
Rubber Leaves=
Rubber Sapling=
BatPack=
LapPack=
Electric Chainsaw=
Diamond Electric Chainsaw=
Electric Drill=
Diamond Electric Drill=
Electric Hoe=
Diamond Electric Hoe=
Electric Saber=
Diamond Electric Saber=
Jetpack=
Electric Jetpack=
Mining Laser (Mode @1)=
Mining Laser (Mode 1)=
Nano Helmet=
Nano Bodyarmor=
Nano Leggings=
Nano Boots=
Solar Helmet=
Static Boots=
Treetap=
Electric Treetap=
Wrench=
Electric Wrench=
Overclocker Upgrade=
Transformer Upgrade=
Power Storage Upgrade=
Power Storage Inspector=
Power Capacity: @1=
Power Flow: @1=
Power Amount: @1=
Power IO Config: @1=
Power Capacity=
Power Flow=
Power Amount=
Power IO Config=
Update=
Connections:=

116
nodes.lua
View File

@@ -379,25 +379,23 @@ if not industrialtest.mods.mclRubber then
end
end
})
if mcl_dye.register_on_bone_meal_apply then
mcl_dye.register_on_bone_meal_apply(function(pointed)
local node=minetest.get_node(pointed.under)
if node.name~="industrialtest:rubber_sapling" then
return
end
if industrialtest.random:next(1,100)>45 then
return
end
local meta=minetest.get_meta(pointed.under)
local stage=meta:get_int("stage") or 0
stage=stage+1
if stage>=3 then
mcl_dye.register_on_bone_meal_apply(function(pointed)
local node=minetest.get_node(pointed.under)
if node.name~="industrialtest:rubber_sapling" then
return
end
if industrialtest.random:next(1,100)>45 then
return
end
local meta=minetest.get_meta(pointed.under)
local stage=meta:get_int("stage") or 0
stage=stage+1
if stage>=3 then
industrialtest.internal.makeRubberTree(pointed.under)
else
meta:set_int("stage",stage)
end
end)
end
else
meta:set_int("stage",stage)
end
end)
end
definition.groups.attached_node=1
definition.groups.dig_immediate=3
@@ -413,85 +411,3 @@ if not industrialtest.mods.mclRubber then
})
end
end
definition={
description=S("Reinforced Stone"),
tiles={"industrialtest_reinforced_stone.png"}
}
if industrialtest.mtgAvailable then
definition.groups={cracky=3}
definition.sounds=default.node_sound_stone_defaults()
definition.on_blast=function(pos,intensity)
if intensity>20 then
minetest.remove_node(pos)
minetest.add_item(pos,ItemStack("industrialtest:reinforced_stone"))
end
end
elseif industrialtest.mclAvailable then
definition.groups={
pickaxey=1,
stone=1,
building_block=1,
material_stone=1
}
definition.sounds=mcl_sounds.node_sound_stone_defaults()
definition._mcl_blast_resistance=1200
definition._mcl_hardness=5
end
minetest.register_node("industrialtest:reinforced_stone",definition)
minetest.register_craft({
type="shaped",
output="industrialtest:reinforced_stone 8",
recipe={
{industrialtest.elementKeys.stone,industrialtest.elementKeys.stone,industrialtest.elementKeys.stone},
{industrialtest.elementKeys.stone,"industrialtest:advanced_alloy",industrialtest.elementKeys.stone},
{industrialtest.elementKeys.stone,industrialtest.elementKeys.stone,industrialtest.elementKeys.stone}
}
})
definition={
description=S("Reinforced Glass"),
drawtype="glasslike_framed_optional",
tiles={"industrialtest_reinforced_glass.png"},
use_texture_alpha="clip",
paramtype="light",
sunlight_propagates=true
}
if industrialtest.mtgAvailable then
definition.groups={cracky=3}
definition.sounds=default.node_sound_glass_defaults()
definition.on_blast=function(pos,intensity)
if intensity>10 then
minetest.remove_node(pos)
minetest.add_item(pos,ItemStack("industrialtest:reinforced_glass"))
end
end
elseif industrialtest.mclAvailable then
definition.groups={
glass=1,
building_block=1,
material_glass=1
}
definition.sounds=mcl_sounds.node_sound_glass_defaults()
definition._mcl_blast_resistance=15
definition._mcl_hardness=1.5
end
minetest.register_node("industrialtest:reinforced_glass",definition)
minetest.register_craft({
type="shaped",
output="industrialtest:reinforced_glass 7",
recipe={
{industrialtest.elementKeys.glass,industrialtest.elementKeys.glass,industrialtest.elementKeys.glass},
{"industrialtest:advanced_alloy",industrialtest.elementKeys.glass,"industrialtest:advanced_alloy"},
{industrialtest.elementKeys.glass,industrialtest.elementKeys.glass,industrialtest.elementKeys.glass}
}
})
minetest.register_craft({
type="shaped",
output="industrialtest:reinforced_glass 7",
recipe={
{industrialtest.elementKeys.glass,"industrialtest:advanced_alloy",industrialtest.elementKeys.glass},
{industrialtest.elementKeys.glass,industrialtest.elementKeys.glass,industrialtest.elementKeys.glass},
{industrialtest.elementKeys.glass,"industrialtest:advanced_alloy",industrialtest.elementKeys.glass}
}
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 869 B

View File

@@ -17,7 +17,6 @@
local S=minetest.get_translator("industrialtest")
local quantumSuit={}
quantumSuit.helmetBreathRefillOpPower=1000
quantumSuit.leggingsSpeedOpPower=125
quantumSuit.leggingsSpeedMaxVel=4
quantumSuit.bootsJumpOpPower=50
@@ -103,15 +102,6 @@ registerQuantumSuitPart({
element="head",
damageReduction=0.15
})
minetest.register_craft({
type="shaped",
output="industrialtest:quantum_helmet",
recipe={
{"industrialtest:reinforced_glass","industrialtest:nano_helmet","industrialtest:reinforced_glass"},
{"industrialtest:iridium_plate","industrialtest:lapotron_crystal","industrialtest:iridium_plate"},
{"industrialtest:advanced_electronic_circuit","industrialtest:empty_cell","industrialtest:advanced_electronic_circuit"}
}
})
registerQuantumSuitPart({
name="quantum_bodyarmor",
@@ -157,14 +147,6 @@ registerQuantumSuitPart({
element="feet",
damageReduction=0.15
})
minetest.register_craft({
type="shaped",
output="industrialtest:quantum_boots",
recipe={
{"industrialtest:iridium_plate","industrialtest:nano_boots","industrialtest:iridium_plate"},
{industrialtest.elementKeys.ironBoots,"industrialtest:lapotron_crystal",industrialtest.elementKeys.ironBoots}
}
})
minetest.register_globalstep(function(dtime)
local players=minetest.get_connected_players()
@@ -239,15 +221,10 @@ minetest.register_globalstep(function(dtime)
end
if player:get_breath()<10 then
minetest.debug(player:get_breath())
local index,stack,inv=findInPlayerArmorList(player,"industrialtest:quantum_helmet")
if index and stack and inv then
local meta=stack:get_meta()
local refilled=math.min(9-player:get_breath(),math.floor(meta:get_int("industrialtest.powerAmount")/quantumSuit.helmetBreathRefillOpPower))
if refilled>0 then
player:set_breath(player:get_breath()+refilled)
industrialtest.api.addPowerToItem(stack,-refilled*quantumSuit.helmetBreathRefillOpPower)
inv:set_stack("armor",index,stack)
end
end
end