built on 28/01/2022 18:22:52
@ -47,6 +47,12 @@ ta4_jetpack requires the modpack 3d_armor. 3d_armor is itself a modpack and can'
|
|||||||
### History
|
### History
|
||||||
|
|
||||||
|
|
||||||
|
#### 2022-01-28
|
||||||
|
|
||||||
|
Updated Mods:
|
||||||
|
- techage (fusion reactor added)
|
||||||
|
|
||||||
|
|
||||||
#### 2022-01-04
|
#### 2022-01-04
|
||||||
|
|
||||||
Updated Mods:
|
Updated Mods:
|
||||||
|
@ -104,7 +104,7 @@ local function control_player(player_name)
|
|||||||
if player then
|
if player then
|
||||||
local pos = player:get_pos()
|
local pos = player:get_pos()
|
||||||
if pos then
|
if pos then
|
||||||
--pos.y = math.floor(pos.y)
|
pos.y = math.floor(pos.y)
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
if string.sub(node.name,1,13) == "autobahn:node" then
|
if string.sub(node.name,1,13) == "autobahn:node" then
|
||||||
minetest.after(0.5, control_player, player_name)
|
minetest.after(0.5, control_player, player_name)
|
||||||
@ -114,7 +114,13 @@ local function control_player(player_name)
|
|||||||
if string.sub(node.name,1,13) == "autobahn:node" then
|
if string.sub(node.name,1,13) == "autobahn:node" then
|
||||||
minetest.after(0.5, control_player, player_name)
|
minetest.after(0.5, control_player, player_name)
|
||||||
else
|
else
|
||||||
reset_player_privs(player)
|
pos.y = pos.y + 2
|
||||||
|
node = minetest.get_node(pos)
|
||||||
|
if string.sub(node.name,1,13) == "autobahn:node" then
|
||||||
|
minetest.after(0.5, control_player, player_name)
|
||||||
|
else
|
||||||
|
reset_player_privs(player)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
3
basic_materials/.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "sound_api_core"]
|
||||||
|
path = sound_api_core
|
||||||
|
url = https://github.com/mt-mods/sound_api_core.git
|
@ -1,30 +1,7 @@
|
|||||||
std = "lua51+minetest"
|
globals = {
|
||||||
unused_args = false
|
"minetest", "basic_materials",
|
||||||
allow_defined_top = true
|
|
||||||
max_line_length = 999
|
|
||||||
|
|
||||||
stds.minetest = {
|
|
||||||
read_globals = {
|
|
||||||
"DIR_DELIM",
|
|
||||||
"minetest",
|
|
||||||
"core",
|
|
||||||
"dump",
|
|
||||||
"vector",
|
|
||||||
"nodeupdate",
|
|
||||||
"VoxelManip",
|
|
||||||
"VoxelArea",
|
|
||||||
"PseudoRandom",
|
|
||||||
"ItemStack",
|
|
||||||
"default",
|
|
||||||
table = {
|
|
||||||
fields = {
|
|
||||||
"copy",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
read_globals = {
|
read_globals = {
|
||||||
"default",
|
"default",
|
||||||
"moreores",
|
|
||||||
}
|
}
|
34
basic_materials/aliases.lua
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
minetest.register_alias("homedecor:plastic_sheeting", "basic_materials:plastic_sheet")
|
||||||
|
minetest.register_alias("homedecor:plastic_strips", "basic_materials:plastic_strip")
|
||||||
|
minetest.register_alias("homedecor:empty_spool", "basic_materials:empty_spool")
|
||||||
|
minetest.register_alias("homedecor:oil_extract", "basic_materials:oil_extract")
|
||||||
|
minetest.register_alias("homedecor:paraffin", "basic_materials:paraffin")
|
||||||
|
minetest.register_alias("homedecor:plastic_base", "basic_materials:paraffin")
|
||||||
|
minetest.register_alias("homedecor:terracotta_base", "basic_materials:terracotta_base")
|
||||||
|
minetest.register_alias("gloopblocks:wet_cement", "basic_materials:wet_cement")
|
||||||
|
minetest.register_alias("gloopblocks:cement", "basic_materials:cement_block")
|
||||||
|
minetest.register_alias("technic:concrete", "basic_materials:concrete_block")
|
||||||
|
minetest.register_alias("homedecor:ic", "basic_materials:ic")
|
||||||
|
minetest.register_alias("homedecor:motor", "basic_materials:motor")
|
||||||
|
minetest.register_alias("technic:motor", "basic_materials:motor")
|
||||||
|
minetest.register_alias("homedecor:heating_element", "basic_materials:heating_element")
|
||||||
|
minetest.register_alias("homedecor:power_crystal", "basic_materials:energy_crystal_simple")
|
||||||
|
minetest.register_alias("homedecor:copper_wire", "basic_materials:copper_wire")
|
||||||
|
minetest.register_alias("technic:fine_copper_wire", "basic_materials:copper_wire")
|
||||||
|
minetest.register_alias("technic:fine_silver_wire", "basic_materials:silver_wire")
|
||||||
|
minetest.register_alias("technic:fine_gold_wire", "basic_materials:gold_wire")
|
||||||
|
minetest.register_alias("homedecor:steel_wire", "basic_materials:steel_wire")
|
||||||
|
minetest.register_alias("homedecor:brass_ingot", "basic_materials:brass_ingot")
|
||||||
|
minetest.register_alias("technic:brass_ingot", "basic_materials:brass_ingot")
|
||||||
|
minetest.register_alias("technic:brass_block", "basic_materials:brass_block")
|
||||||
|
minetest.register_alias("homedecor:copper_strip", "basic_materials:copper_strip")
|
||||||
|
minetest.register_alias("homedecor:steel_strip", "basic_materials:steel_strip")
|
||||||
|
minetest.register_alias("homedecor:chainlink_brass", "basic_materials:chainlink_brass")
|
||||||
|
minetest.register_alias("chains:chain", "basic_materials:chain_steel")
|
||||||
|
minetest.register_alias("chains:chain_brass", "basic_materials:chain_brass")
|
||||||
|
minetest.register_alias("pipeworks:gear", "basic_materials:gear_steel")
|
||||||
|
minetest.register_alias("technic:rebar", "basic_materials:steel_bar")
|
||||||
|
|
||||||
|
minetest.register_alias_force("mesecons_materials:silicon", "basic_materials:silicon")
|
||||||
|
minetest.register_alias_force("glooptest:chainlink", "basic_materials:chainlink_steel")
|
||||||
|
minetest.register_alias_force("homedecor:chainlink_steel", "basic_materials:chainlink_steel")
|
130
basic_materials/craftitems.lua
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
local S = minetest.get_translator("basic_materials")
|
||||||
|
|
||||||
|
minetest.register_craftitem("basic_materials:plastic_sheet", {
|
||||||
|
description = S("Plastic sheet"),
|
||||||
|
inventory_image = "basic_materials_plastic_sheet.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("basic_materials:plastic_strip", {
|
||||||
|
description = S("Plastic strips"),
|
||||||
|
groups = { strip = 1 },
|
||||||
|
inventory_image = "basic_materials_plastic_strip.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("basic_materials:empty_spool", {
|
||||||
|
description = S("Empty wire spool"),
|
||||||
|
inventory_image = "basic_materials_empty_spool.png"
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("basic_materials:oil_extract", {
|
||||||
|
description = S("Oil extract"),
|
||||||
|
inventory_image = "basic_materials_oil_extract.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("basic_materials:paraffin", {
|
||||||
|
description = S("Unprocessed paraffin"),
|
||||||
|
inventory_image = "basic_materials_paraffin.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("basic_materials:terracotta_base", {
|
||||||
|
description = S("Uncooked Terracotta Base"),
|
||||||
|
inventory_image = "basic_materials_terracotta_base.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("basic_materials:wet_cement", {
|
||||||
|
description = S("Wet Cement"),
|
||||||
|
inventory_image = "basic_materials_wet_cement.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("basic_materials:silicon", {
|
||||||
|
description = S("Silicon lump"),
|
||||||
|
inventory_image = "basic_materials_silicon.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("basic_materials:ic", {
|
||||||
|
description = S("Simple Integrated Circuit"),
|
||||||
|
inventory_image = "basic_materials_ic.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("basic_materials:motor", {
|
||||||
|
description = S("Simple Motor"),
|
||||||
|
inventory_image = "basic_materials_motor.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("basic_materials:heating_element", {
|
||||||
|
description = S("Heating element"),
|
||||||
|
inventory_image = "basic_materials_heating_element.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("basic_materials:energy_crystal_simple", {
|
||||||
|
description = S("Simple energy crystal"),
|
||||||
|
inventory_image = "basic_materials_energy_crystal.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("basic_materials:steel_wire", {
|
||||||
|
description = S("Spool of steel wire"),
|
||||||
|
groups = { wire = 1 },
|
||||||
|
inventory_image = "basic_materials_steel_wire.png"
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("basic_materials:copper_wire", {
|
||||||
|
description = S("Spool of copper wire"),
|
||||||
|
groups = { wire = 1 },
|
||||||
|
inventory_image = "basic_materials_copper_wire.png"
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("basic_materials:silver_wire", {
|
||||||
|
description = S("Spool of silver wire"),
|
||||||
|
groups = { wire = 1 },
|
||||||
|
inventory_image = "basic_materials_silver_wire.png"
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("basic_materials:gold_wire", {
|
||||||
|
description = S("Spool of gold wire"),
|
||||||
|
groups = { wire = 1 },
|
||||||
|
inventory_image = "basic_materials_gold_wire.png"
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("basic_materials:steel_strip", {
|
||||||
|
description = S("Steel Strip"),
|
||||||
|
groups = { strip = 1 },
|
||||||
|
inventory_image = "basic_materials_steel_strip.png"
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("basic_materials:copper_strip", {
|
||||||
|
description = S("Copper Strip"),
|
||||||
|
groups = { strip = 1 },
|
||||||
|
inventory_image = "basic_materials_copper_strip.png"
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("basic_materials:steel_bar", {
|
||||||
|
description = S("Steel Bar"),
|
||||||
|
inventory_image = "basic_materials_steel_bar.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("basic_materials:chainlink_brass", {
|
||||||
|
description = S("Chainlinks (brass)"),
|
||||||
|
groups = { chainlinks = 1 },
|
||||||
|
inventory_image = "basic_materials_chainlink_brass.png"
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("basic_materials:chainlink_steel", {
|
||||||
|
description = S("Chainlinks (steel)"),
|
||||||
|
groups = { chainlinks = 1 },
|
||||||
|
inventory_image = "basic_materials_chainlink_steel.png"
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("basic_materials:brass_ingot", {
|
||||||
|
description = S("Brass Ingot"),
|
||||||
|
inventory_image = "basic_materials_brass_ingot.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("basic_materials:gear_steel", {
|
||||||
|
description = S("Steel gear"),
|
||||||
|
inventory_image = "basic_materials_gear_steel.png"
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("basic_materials:padlock", {
|
||||||
|
description = S("Padlock"),
|
||||||
|
inventory_image = "basic_materials_padlock.png"
|
||||||
|
})
|
303
basic_materials/crafts.lua
Normal file
@ -0,0 +1,303 @@
|
|||||||
|
--craft recipes
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "basic_materials:chainlink_brass 12",
|
||||||
|
recipe = {
|
||||||
|
{"", "basic_materials:brass_ingot", "basic_materials:brass_ingot"},
|
||||||
|
{ "basic_materials:brass_ingot", "", "basic_materials:brass_ingot" },
|
||||||
|
{ "basic_materials:brass_ingot", "basic_materials:brass_ingot", "" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'basic_materials:chain_steel 2',
|
||||||
|
recipe = {
|
||||||
|
{"basic_materials:chainlink_steel"},
|
||||||
|
{"basic_materials:chainlink_steel"},
|
||||||
|
{"basic_materials:chainlink_steel"}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'basic_materials:chain_brass 2',
|
||||||
|
recipe = {
|
||||||
|
{"basic_materials:chainlink_brass"},
|
||||||
|
{"basic_materials:chainlink_brass"},
|
||||||
|
{"basic_materials:chainlink_brass"}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
type = "shapeless",
|
||||||
|
output = "basic_materials:brass_ingot 9",
|
||||||
|
recipe = { "basic_materials:brass_block" },
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "basic_materials:brass_block",
|
||||||
|
recipe = {
|
||||||
|
{ "basic_materials:brass_ingot", "basic_materials:brass_ingot", "basic_materials:brass_ingot" },
|
||||||
|
{ "basic_materials:brass_ingot", "basic_materials:brass_ingot", "basic_materials:brass_ingot" },
|
||||||
|
{ "basic_materials:brass_ingot", "basic_materials:brass_ingot", "basic_materials:brass_ingot" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "basic_materials:plastic_strip 9",
|
||||||
|
recipe = {
|
||||||
|
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" }
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "basic_materials:empty_spool 3",
|
||||||
|
recipe = {
|
||||||
|
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
|
||||||
|
{ "", "basic_materials:plastic_sheet", "" },
|
||||||
|
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" }
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = "basic_materials:oil_extract 2",
|
||||||
|
recipe = {"group:leaves", "group:leaves", "group:leaves", "group:leaves", "group:leaves", "group:leaves"}
|
||||||
|
})
|
||||||
|
|
||||||
|
--cooking recipes
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "cooking",
|
||||||
|
output = "basic_materials:plastic_sheet",
|
||||||
|
recipe = "basic_materials:paraffin",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "cooking",
|
||||||
|
output = "basic_materials:paraffin",
|
||||||
|
recipe = "basic_materials:oil_extract",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "cooking",
|
||||||
|
output = "basic_materials:cement_block",
|
||||||
|
recipe = "basic_materials:wet_cement",
|
||||||
|
cooktime = 8
|
||||||
|
})
|
||||||
|
|
||||||
|
--fuel recipes
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "fuel",
|
||||||
|
recipe = "basic_materials:plastic_sheet",
|
||||||
|
burntime = 30,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "fuel",
|
||||||
|
recipe = "basic_materials:oil_extract",
|
||||||
|
burntime = 30,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "fuel",
|
||||||
|
recipe = "basic_materials:paraffin",
|
||||||
|
burntime = 30,
|
||||||
|
})
|
||||||
|
|
||||||
|
if minetest.get_modpath("default") then
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'basic_materials:concrete_block 6',
|
||||||
|
recipe = {
|
||||||
|
{'group:sand', 'basic_materials:wet_cement', 'default:gravel'},
|
||||||
|
{'basic_materials:steel_bar', 'basic_materials:wet_cement', 'basic_materials:steel_bar'},
|
||||||
|
{'default:gravel', 'basic_materials:wet_cement', 'group:sand'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "basic_materials:motor 2",
|
||||||
|
recipe = {
|
||||||
|
{ "default:mese_crystal_fragment", "basic_materials:copper_wire", "basic_materials:plastic_sheet" },
|
||||||
|
{ "default:copper_ingot", "default:steel_ingot", "default:steel_ingot" },
|
||||||
|
{ "default:mese_crystal_fragment", "basic_materials:copper_wire", "basic_materials:plastic_sheet" }
|
||||||
|
},
|
||||||
|
replacements = {
|
||||||
|
{ "basic_materials:copper_wire", "basic_materials:empty_spool" },
|
||||||
|
{ "basic_materials:copper_wire", "basic_materials:empty_spool" },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "basic_materials:heating_element 2",
|
||||||
|
recipe = {
|
||||||
|
{ "default:copper_ingot", "default:mese_crystal_fragment", "default:copper_ingot" }
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
--type = "shapeless",
|
||||||
|
output = "basic_materials:energy_crystal_simple 2",
|
||||||
|
recipe = {
|
||||||
|
{ "default:mese_crystal_fragment", "default:torch", "default:mese_crystal_fragment" },
|
||||||
|
{ "default:diamond", "default:gold_ingot", "default:diamond" }
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "basic_materials:copper_wire 2",
|
||||||
|
type = "shapeless",
|
||||||
|
recipe = {
|
||||||
|
"default:copper_ingot",
|
||||||
|
"basic_materials:empty_spool",
|
||||||
|
"basic_materials:empty_spool",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "basic_materials:gold_wire 2",
|
||||||
|
type = "shapeless",
|
||||||
|
recipe = {
|
||||||
|
"default:gold_ingot",
|
||||||
|
"basic_materials:empty_spool",
|
||||||
|
"basic_materials:empty_spool",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "basic_materials:steel_wire 2",
|
||||||
|
type = "shapeless",
|
||||||
|
recipe = {
|
||||||
|
"default:steel_ingot",
|
||||||
|
"basic_materials:empty_spool",
|
||||||
|
"basic_materials:empty_spool",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "basic_materials:steel_strip 12",
|
||||||
|
recipe = {
|
||||||
|
{ "", "default:steel_ingot", "" },
|
||||||
|
{ "default:steel_ingot", "", "" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "basic_materials:copper_strip 12",
|
||||||
|
recipe = {
|
||||||
|
{ "", "default:copper_ingot", "" },
|
||||||
|
{ "default:copper_ingot", "", "" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "basic_materials:steel_bar 6",
|
||||||
|
recipe = {
|
||||||
|
{ "", "", "default:steel_ingot" },
|
||||||
|
{ "", "default:steel_ingot", "" },
|
||||||
|
{ "default:steel_ingot", "", "" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "basic_materials:padlock 2",
|
||||||
|
recipe = {
|
||||||
|
{ "basic_materials:steel_bar" },
|
||||||
|
{ "default:steel_ingot" },
|
||||||
|
{ "default:steel_ingot" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "basic_materials:chainlink_steel 12",
|
||||||
|
recipe = {
|
||||||
|
{"", "default:steel_ingot", "default:steel_ingot"},
|
||||||
|
{ "default:steel_ingot", "", "default:steel_ingot" },
|
||||||
|
{ "default:steel_ingot", "default:steel_ingot", "" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "basic_materials:gear_steel 6",
|
||||||
|
recipe = {
|
||||||
|
{ "", "default:steel_ingot", "" },
|
||||||
|
{ "default:steel_ingot","basic_materials:chainlink_steel", "default:steel_ingot" },
|
||||||
|
{ "", "default:steel_ingot", "" }
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
if minetest.get_modpath("bucket") then
|
||||||
|
minetest.register_craft( {
|
||||||
|
type = "shapeless",
|
||||||
|
output = "basic_materials:terracotta_base 8",
|
||||||
|
recipe = {
|
||||||
|
"bucket:bucket_water",
|
||||||
|
"default:clay_lump",
|
||||||
|
"default:gravel",
|
||||||
|
},
|
||||||
|
replacements = { {"bucket:bucket_water", "bucket:bucket_empty"}, },
|
||||||
|
})
|
||||||
|
|
||||||
|
if minetest.get_modpath("dye") then
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = "basic_materials:wet_cement 3",
|
||||||
|
recipe = {
|
||||||
|
"default:dirt",
|
||||||
|
"dye:dark_grey",
|
||||||
|
"dye:dark_grey",
|
||||||
|
"dye:dark_grey",
|
||||||
|
"bucket:bucket_water"
|
||||||
|
},
|
||||||
|
replacements = {{'bucket:bucket_water', 'bucket:bucket_empty'},},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.get_modpath("mesecons_materials") then
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "mesecons_materials:silicon 4",
|
||||||
|
recipe = {
|
||||||
|
{ "default:sand", "default:sand" },
|
||||||
|
{ "default:sand", "default:steel_ingot" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "basic_materials:ic 4",
|
||||||
|
recipe = {
|
||||||
|
{ "mesecons_materials:silicon", "mesecons_materials:silicon" },
|
||||||
|
{ "mesecons_materials:silicon", "default:copper_ingot" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
if not minetest.get_modpath("moreores") then
|
||||||
|
-- Without moreores, there still should be a way to create brass.
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "basic_materials:brass_ingot 9",
|
||||||
|
recipe = {
|
||||||
|
{"default:copper_ingot", "default:tin_ingot", "default:copper_ingot"},
|
||||||
|
{"default:gold_ingot", "default:copper_ingot", "default:gold_ingot"},
|
||||||
|
{"default:copper_ingot", "default:tin_ingot", "default:copper_ingot"},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
elseif minetest.get_modpath("moreores") then
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "basic_materials:silver_wire 2",
|
||||||
|
type = "shapeless",
|
||||||
|
recipe = {
|
||||||
|
"moreores:silver_ingot",
|
||||||
|
"basic_materials:empty_spool",
|
||||||
|
"basic_materials:empty_spool",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
type = "shapeless",
|
||||||
|
output = "basic_materials:brass_ingot 3",
|
||||||
|
recipe = {
|
||||||
|
"default:copper_ingot",
|
||||||
|
"default:copper_ingot",
|
||||||
|
"moreores:silver_ingot",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
@ -1,86 +0,0 @@
|
|||||||
-- Translation support
|
|
||||||
local S = minetest.get_translator("basic_materials")
|
|
||||||
|
|
||||||
-- items
|
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:silicon", {
|
|
||||||
description = S("Silicon lump"),
|
|
||||||
inventory_image = "basic_materials_silicon.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:ic", {
|
|
||||||
description = S("Simple Integrated Circuit"),
|
|
||||||
inventory_image = "basic_materials_ic.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:motor", {
|
|
||||||
description = S("Simple Motor"),
|
|
||||||
inventory_image = "basic_materials_motor.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:heating_element", {
|
|
||||||
description = S("Heating element"),
|
|
||||||
inventory_image = "basic_materials_heating_element.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:energy_crystal_simple", {
|
|
||||||
description = S("Simple energy crystal"),
|
|
||||||
inventory_image = "basic_materials_energy_crystal.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
-- crafts
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "mesecons_materials:silicon 4",
|
|
||||||
recipe = {
|
|
||||||
{ "default:sand", "default:sand" },
|
|
||||||
{ "default:sand", "default:steel_ingot" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "basic_materials:ic 4",
|
|
||||||
recipe = {
|
|
||||||
{ "mesecons_materials:silicon", "mesecons_materials:silicon" },
|
|
||||||
{ "mesecons_materials:silicon", "default:copper_ingot" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "basic_materials:motor 2",
|
|
||||||
recipe = {
|
|
||||||
{ "default:mese_crystal_fragment", "basic_materials:copper_wire", "basic_materials:plastic_sheet" },
|
|
||||||
{ "default:copper_ingot", "default:steel_ingot", "default:steel_ingot" },
|
|
||||||
{ "default:mese_crystal_fragment", "basic_materials:copper_wire", "basic_materials:plastic_sheet" }
|
|
||||||
},
|
|
||||||
replacements = {
|
|
||||||
{ "basic_materials:copper_wire", "basic_materials:empty_spool" },
|
|
||||||
{ "basic_materials:copper_wire", "basic_materials:empty_spool" },
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "basic_materials:heating_element 2",
|
|
||||||
recipe = {
|
|
||||||
{ "default:copper_ingot", "default:mese_crystal_fragment", "default:copper_ingot" }
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
--type = "shapeless",
|
|
||||||
output = "basic_materials:energy_crystal_simple 2",
|
|
||||||
recipe = {
|
|
||||||
{ "default:mese_crystal_fragment", "default:torch", "default:mese_crystal_fragment" },
|
|
||||||
{ "default:diamond", "default:gold_ingot", "default:diamond" }
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- aliases
|
|
||||||
|
|
||||||
minetest.register_alias("homedecor:ic", "basic_materials:ic")
|
|
||||||
minetest.register_alias("homedecor:motor", "basic_materials:motor")
|
|
||||||
minetest.register_alias("technic:motor", "basic_materials:motor")
|
|
||||||
minetest.register_alias("homedecor:heating_element", "basic_materials:heating_element")
|
|
||||||
minetest.register_alias("homedecor:power_crystal", "basic_materials:energy_crystal_simple")
|
|
||||||
|
|
||||||
minetest.register_alias_force("mesecons_materials:silicon", "basic_materials:silicon")
|
|
@ -4,12 +4,11 @@
|
|||||||
-- This mod supplies all those little random craft items that everyone always
|
-- This mod supplies all those little random craft items that everyone always
|
||||||
-- seems to need, such as metal bars (ala rebar), plastic, wire, and so on.
|
-- seems to need, such as metal bars (ala rebar), plastic, wire, and so on.
|
||||||
|
|
||||||
local modpath = minetest.get_modpath("basic_materials")
|
|
||||||
|
|
||||||
basic_materials = {}
|
basic_materials = {}
|
||||||
basic_materials.mod = { author = "Vanessa Dannenberg" }
|
basic_materials.mod = { author = "Vanessa Dannenberg" }
|
||||||
|
basic_materials.modpath = minetest.get_modpath("basic_materials")
|
||||||
|
|
||||||
dofile(modpath.."/metals.lua")
|
dofile(basic_materials.modpath .. "/nodes.lua")
|
||||||
dofile(modpath.."/plastics.lua")
|
dofile(basic_materials.modpath .. "/craftitems.lua")
|
||||||
dofile(modpath.."/electrical-electronic.lua")
|
dofile(basic_materials.modpath .. "/crafts.lua")
|
||||||
dofile(modpath.."/misc.lua")
|
dofile(basic_materials.modpath .. "/aliases.lua")
|
@ -1,300 +0,0 @@
|
|||||||
-- Translation support
|
|
||||||
local S = minetest.get_translator("basic_materials")
|
|
||||||
|
|
||||||
-- items
|
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:steel_wire", {
|
|
||||||
description = S("Spool of steel wire"),
|
|
||||||
groups = { wire = 1 },
|
|
||||||
inventory_image = "basic_materials_steel_wire.png"
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:copper_wire", {
|
|
||||||
description = S("Spool of copper wire"),
|
|
||||||
groups = { wire = 1 },
|
|
||||||
inventory_image = "basic_materials_copper_wire.png"
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:silver_wire", {
|
|
||||||
description = S("Spool of silver wire"),
|
|
||||||
groups = { wire = 1 },
|
|
||||||
inventory_image = "basic_materials_silver_wire.png"
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:gold_wire", {
|
|
||||||
description = S("Spool of gold wire"),
|
|
||||||
groups = { wire = 1 },
|
|
||||||
inventory_image = "basic_materials_gold_wire.png"
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:steel_strip", {
|
|
||||||
description = S("Steel Strip"),
|
|
||||||
groups = { strip = 1 },
|
|
||||||
inventory_image = "basic_materials_steel_strip.png"
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:copper_strip", {
|
|
||||||
description = S("Copper Strip"),
|
|
||||||
groups = { strip = 1 },
|
|
||||||
inventory_image = "basic_materials_copper_strip.png"
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:steel_bar", {
|
|
||||||
description = S("Steel Bar"),
|
|
||||||
inventory_image = "basic_materials_steel_bar.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:chainlink_brass", {
|
|
||||||
description = S("Chainlinks (brass)"),
|
|
||||||
groups = { chainlinks = 1 },
|
|
||||||
inventory_image = "basic_materials_chainlink_brass.png"
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:chainlink_steel", {
|
|
||||||
description = S("Chainlinks (steel)"),
|
|
||||||
groups = { chainlinks = 1 },
|
|
||||||
inventory_image = "basic_materials_chainlink_steel.png"
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:brass_ingot", {
|
|
||||||
description = S("Brass Ingot"),
|
|
||||||
inventory_image = "basic_materials_brass_ingot.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:gear_steel", {
|
|
||||||
description = S("Steel gear"),
|
|
||||||
inventory_image = "basic_materials_gear_steel.png"
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:padlock", {
|
|
||||||
description = S("Padlock"),
|
|
||||||
inventory_image = "basic_materials_padlock.png"
|
|
||||||
})
|
|
||||||
|
|
||||||
-- nodes
|
|
||||||
|
|
||||||
local chains_sbox = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = { -0.1, -0.5, -0.1, 0.1, 0.5, 0.1 }
|
|
||||||
}
|
|
||||||
|
|
||||||
minetest.register_node("basic_materials:chain_steel", {
|
|
||||||
description = S("Chain (steel, hanging)"),
|
|
||||||
drawtype = "mesh",
|
|
||||||
mesh = "basic_materials_chains.obj",
|
|
||||||
tiles = {"basic_materials_chain_steel.png"},
|
|
||||||
walkable = false,
|
|
||||||
climbable = true,
|
|
||||||
sunlight_propagates = true,
|
|
||||||
paramtype = "light",
|
|
||||||
inventory_image = "basic_materials_chain_steel_inv.png",
|
|
||||||
groups = {cracky=3},
|
|
||||||
selection_box = chains_sbox,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("basic_materials:chain_brass", {
|
|
||||||
description = S("Chain (brass, hanging)"),
|
|
||||||
drawtype = "mesh",
|
|
||||||
mesh = "basic_materials_chains.obj",
|
|
||||||
tiles = {"basic_materials_chain_brass.png"},
|
|
||||||
walkable = false,
|
|
||||||
climbable = true,
|
|
||||||
sunlight_propagates = true,
|
|
||||||
paramtype = "light",
|
|
||||||
inventory_image = "basic_materials_chain_brass_inv.png",
|
|
||||||
groups = {cracky=3},
|
|
||||||
selection_box = chains_sbox,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("basic_materials:brass_block", {
|
|
||||||
description = S("Brass Block"),
|
|
||||||
tiles = { "basic_materials_brass_block.png" },
|
|
||||||
is_ground_content = false,
|
|
||||||
groups = {cracky=1, level=2},
|
|
||||||
sounds = default.node_sound_metal_defaults()
|
|
||||||
})
|
|
||||||
|
|
||||||
-- crafts
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "basic_materials:copper_wire 2",
|
|
||||||
type = "shapeless",
|
|
||||||
recipe = {
|
|
||||||
"default:copper_ingot",
|
|
||||||
"basic_materials:empty_spool",
|
|
||||||
"basic_materials:empty_spool",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "basic_materials:silver_wire 2",
|
|
||||||
type = "shapeless",
|
|
||||||
recipe = {
|
|
||||||
"moreores:silver_ingot",
|
|
||||||
"basic_materials:empty_spool",
|
|
||||||
"basic_materials:empty_spool",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "basic_materials:gold_wire 2",
|
|
||||||
type = "shapeless",
|
|
||||||
recipe = {
|
|
||||||
"default:gold_ingot",
|
|
||||||
"basic_materials:empty_spool",
|
|
||||||
"basic_materials:empty_spool",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "basic_materials:steel_wire 2",
|
|
||||||
type = "shapeless",
|
|
||||||
recipe = {
|
|
||||||
"default:steel_ingot",
|
|
||||||
"basic_materials:empty_spool",
|
|
||||||
"basic_materials:empty_spool",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "basic_materials:steel_strip 12",
|
|
||||||
recipe = {
|
|
||||||
{ "", "default:steel_ingot", "" },
|
|
||||||
{ "default:steel_ingot", "", "" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "basic_materials:copper_strip 12",
|
|
||||||
recipe = {
|
|
||||||
{ "", "default:copper_ingot", "" },
|
|
||||||
{ "default:copper_ingot", "", "" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "basic_materials:steel_bar 6",
|
|
||||||
recipe = {
|
|
||||||
{ "", "", "default:steel_ingot" },
|
|
||||||
{ "", "default:steel_ingot", "" },
|
|
||||||
{ "default:steel_ingot", "", "" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "basic_materials:padlock 2",
|
|
||||||
recipe = {
|
|
||||||
{ "basic_materials:steel_bar" },
|
|
||||||
{ "default:steel_ingot" },
|
|
||||||
{ "default:steel_ingot" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "basic_materials:chainlink_steel 12",
|
|
||||||
recipe = {
|
|
||||||
{"", "default:steel_ingot", "default:steel_ingot"},
|
|
||||||
{ "default:steel_ingot", "", "default:steel_ingot" },
|
|
||||||
{ "default:steel_ingot", "default:steel_ingot", "" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "basic_materials:chainlink_brass 12",
|
|
||||||
recipe = {
|
|
||||||
{"", "basic_materials:brass_ingot", "basic_materials:brass_ingot"},
|
|
||||||
{ "basic_materials:brass_ingot", "", "basic_materials:brass_ingot" },
|
|
||||||
{ "basic_materials:brass_ingot", "basic_materials:brass_ingot", "" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = 'basic_materials:chain_steel 2',
|
|
||||||
recipe = {
|
|
||||||
{"basic_materials:chainlink_steel"},
|
|
||||||
{"basic_materials:chainlink_steel"},
|
|
||||||
{"basic_materials:chainlink_steel"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = 'basic_materials:chain_brass 2',
|
|
||||||
recipe = {
|
|
||||||
{"basic_materials:chainlink_brass"},
|
|
||||||
{"basic_materials:chainlink_brass"},
|
|
||||||
{"basic_materials:chainlink_brass"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "basic_materials:gear_steel 6",
|
|
||||||
recipe = {
|
|
||||||
{ "", "default:steel_ingot", "" },
|
|
||||||
{ "default:steel_ingot","basic_materials:chainlink_steel", "default:steel_ingot" },
|
|
||||||
{ "", "default:steel_ingot", "" }
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
type = "shapeless",
|
|
||||||
output = "basic_materials:brass_ingot 3",
|
|
||||||
recipe = {
|
|
||||||
"default:copper_ingot",
|
|
||||||
"default:copper_ingot",
|
|
||||||
"moreores:silver_ingot",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
if not minetest.get_modpath("moreores") then
|
|
||||||
-- Without moreores, there still should be a way to create brass.
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "basic_materials:brass_ingot 9",
|
|
||||||
recipe = {
|
|
||||||
{"default:copper_ingot", "default:tin_ingot", "default:copper_ingot"},
|
|
||||||
{"default:gold_ingot", "default:copper_ingot", "default:gold_ingot"},
|
|
||||||
{"default:copper_ingot", "default:tin_ingot", "default:copper_ingot"},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
type = "shapeless",
|
|
||||||
output = "basic_materials:brass_ingot 9",
|
|
||||||
recipe = { "basic_materials:brass_block" },
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "basic_materials:brass_block",
|
|
||||||
recipe = {
|
|
||||||
{ "basic_materials:brass_ingot", "basic_materials:brass_ingot", "basic_materials:brass_ingot" },
|
|
||||||
{ "basic_materials:brass_ingot", "basic_materials:brass_ingot", "basic_materials:brass_ingot" },
|
|
||||||
{ "basic_materials:brass_ingot", "basic_materials:brass_ingot", "basic_materials:brass_ingot" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- aliases
|
|
||||||
|
|
||||||
minetest.register_alias("homedecor:copper_wire", "basic_materials:copper_wire")
|
|
||||||
minetest.register_alias("technic:fine_copper_wire", "basic_materials:copper_wire")
|
|
||||||
minetest.register_alias("technic:fine_silver_wire", "basic_materials:silver_wire")
|
|
||||||
minetest.register_alias("technic:fine_gold_wire", "basic_materials:gold_wire")
|
|
||||||
|
|
||||||
minetest.register_alias("homedecor:steel_wire", "basic_materials:steel_wire")
|
|
||||||
|
|
||||||
minetest.register_alias("homedecor:brass_ingot", "basic_materials:brass_ingot")
|
|
||||||
minetest.register_alias("technic:brass_ingot", "basic_materials:brass_ingot")
|
|
||||||
minetest.register_alias("technic:brass_block", "basic_materials:brass_block")
|
|
||||||
|
|
||||||
minetest.register_alias("homedecor:copper_strip", "basic_materials:copper_strip")
|
|
||||||
minetest.register_alias("homedecor:steel_strip", "basic_materials:steel_strip")
|
|
||||||
|
|
||||||
minetest.register_alias_force("glooptest:chainlink", "basic_materials:chainlink_steel")
|
|
||||||
minetest.register_alias_force("homedecor:chainlink_steel", "basic_materials:chainlink_steel")
|
|
||||||
minetest.register_alias("homedecor:chainlink_brass", "basic_materials:chainlink_brass")
|
|
||||||
minetest.register_alias("chains:chain", "basic_materials:chain_steel")
|
|
||||||
minetest.register_alias("chains:chain_brass", "basic_materials:chain_brass")
|
|
||||||
|
|
||||||
minetest.register_alias("pipeworks:gear", "basic_materials:gear_steel")
|
|
||||||
|
|
||||||
minetest.register_alias("technic:rebar", "basic_materials:steel_bar")
|
|
||||||
|
|
@ -1,126 +0,0 @@
|
|||||||
-- Translation support
|
|
||||||
local S = minetest.get_translator("basic_materials")
|
|
||||||
|
|
||||||
-- items
|
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:oil_extract", {
|
|
||||||
description = S("Oil extract"),
|
|
||||||
inventory_image = "basic_materials_oil_extract.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:paraffin", {
|
|
||||||
description = S("Unprocessed paraffin"),
|
|
||||||
inventory_image = "basic_materials_paraffin.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:terracotta_base", {
|
|
||||||
description = S("Uncooked Terracotta Base"),
|
|
||||||
inventory_image = "basic_materials_terracotta_base.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:wet_cement", {
|
|
||||||
description = S("Wet Cement"),
|
|
||||||
inventory_image = "basic_materials_wet_cement.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
-- nodes
|
|
||||||
|
|
||||||
minetest.register_node("basic_materials:cement_block", {
|
|
||||||
description = S("Cement"),
|
|
||||||
tiles = {"basic_materials_cement_block.png"},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky=2},
|
|
||||||
sounds = default.node_sound_stone_defaults(),
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("basic_materials:concrete_block", {
|
|
||||||
description = S("Concrete Block"),
|
|
||||||
tiles = {"basic_materials_concrete_block.png",},
|
|
||||||
groups = {cracky=1, level=2, concrete=1},
|
|
||||||
sounds = default.node_sound_stone_defaults(),
|
|
||||||
})
|
|
||||||
|
|
||||||
-- crafts
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = "basic_materials:oil_extract 2",
|
|
||||||
recipe = {
|
|
||||||
"group:leaves",
|
|
||||||
"group:leaves",
|
|
||||||
"group:leaves",
|
|
||||||
"group:leaves",
|
|
||||||
"group:leaves",
|
|
||||||
"group:leaves"
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "cooking",
|
|
||||||
output = "basic_materials:paraffin",
|
|
||||||
recipe = "basic_materials:oil_extract",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "fuel",
|
|
||||||
recipe = "basic_materials:oil_extract",
|
|
||||||
burntime = 30,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "fuel",
|
|
||||||
recipe = "basic_materials:paraffin",
|
|
||||||
burntime = 30,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
type = "shapeless",
|
|
||||||
output = "basic_materials:terracotta_base 8",
|
|
||||||
recipe = {
|
|
||||||
"bucket:bucket_water",
|
|
||||||
"default:clay_lump",
|
|
||||||
"default:gravel",
|
|
||||||
},
|
|
||||||
replacements = { {"bucket:bucket_water", "bucket:bucket_empty"}, },
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = "basic_materials:wet_cement 3",
|
|
||||||
recipe = {
|
|
||||||
"default:dirt",
|
|
||||||
"dye:dark_grey",
|
|
||||||
"dye:dark_grey",
|
|
||||||
"dye:dark_grey",
|
|
||||||
"bucket:bucket_water"
|
|
||||||
},
|
|
||||||
replacements = {{'bucket:bucket_water', 'bucket:bucket_empty'},},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "cooking",
|
|
||||||
output = "basic_materials:cement_block",
|
|
||||||
recipe = "basic_materials:wet_cement",
|
|
||||||
cooktime = 8
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = 'basic_materials:concrete_block 6',
|
|
||||||
recipe = {
|
|
||||||
{'group:sand', 'basic_materials:wet_cement', 'default:gravel'},
|
|
||||||
{'basic_materials:steel_bar', 'basic_materials:wet_cement', 'basic_materials:steel_bar'},
|
|
||||||
{'default:gravel', 'basic_materials:wet_cement', 'group:sand'},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- aliases
|
|
||||||
|
|
||||||
minetest.register_alias("homedecor:oil_extract", "basic_materials:oil_extract")
|
|
||||||
minetest.register_alias("homedecor:paraffin", "basic_materials:paraffin")
|
|
||||||
minetest.register_alias("homedecor:plastic_base", "basic_materials:paraffin")
|
|
||||||
minetest.register_alias("homedecor:terracotta_base", "basic_materials:terracotta_base")
|
|
||||||
|
|
||||||
minetest.register_alias("gloopblocks:wet_cement", "basic_materials:wet_cement")
|
|
||||||
minetest.register_alias("gloopblocks:cement", "basic_materials:cement_block")
|
|
||||||
|
|
||||||
minetest.register_alias("technic:concrete", "basic_materials:concrete_block")
|
|
@ -1,4 +1,3 @@
|
|||||||
name = basic_materials
|
name = basic_materials
|
||||||
depends = default
|
optional_depends = moreores, default, mesecons_materials, dye, bucket, fl_stone, fl_trees, mcl_sounds
|
||||||
optional_depends = moreores
|
|
||||||
min_minetest_version = 5.2.0
|
min_minetest_version = 5.2.0
|
||||||
|
54
basic_materials/nodes.lua
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
local S = minetest.get_translator("basic_materials")
|
||||||
|
local sound_api = dofile(basic_materials.modpath .. "/sound_api_core/init.lua")
|
||||||
|
local chains_sbox = {type = "fixed",fixed = { -0.1, -0.5, -0.1, 0.1, 0.5, 0.1 }}
|
||||||
|
|
||||||
|
minetest.register_node("basic_materials:cement_block", {
|
||||||
|
description = S("Cement"),
|
||||||
|
tiles = {"basic_materials_cement_block.png"},
|
||||||
|
is_ground_content = true,
|
||||||
|
groups = {cracky=2, dig_stone = 1},
|
||||||
|
sounds = sound_api.node_sound_stone_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("basic_materials:concrete_block", {
|
||||||
|
description = S("Concrete Block"),
|
||||||
|
tiles = {"basic_materials_concrete_block.png",},
|
||||||
|
groups = {cracky=1, concrete=1, dig_stone = 1},
|
||||||
|
sounds = sound_api.node_sound_stone_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("basic_materials:chain_steel", {
|
||||||
|
description = S("Chain (steel, hanging)"),
|
||||||
|
drawtype = "mesh",
|
||||||
|
mesh = "basic_materials_chains.obj",
|
||||||
|
tiles = {"basic_materials_chain_steel.png"},
|
||||||
|
walkable = false,
|
||||||
|
climbable = true,
|
||||||
|
sunlight_propagates = true,
|
||||||
|
paramtype = "light",
|
||||||
|
inventory_image = "basic_materials_chain_steel_inv.png",
|
||||||
|
groups = {cracky=3, dig_stone = 1},
|
||||||
|
selection_box = chains_sbox,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("basic_materials:chain_brass", {
|
||||||
|
description = S("Chain (brass, hanging)"),
|
||||||
|
drawtype = "mesh",
|
||||||
|
mesh = "basic_materials_chains.obj",
|
||||||
|
tiles = {"basic_materials_chain_brass.png"},
|
||||||
|
walkable = false,
|
||||||
|
climbable = true,
|
||||||
|
sunlight_propagates = true,
|
||||||
|
paramtype = "light",
|
||||||
|
inventory_image = "basic_materials_chain_brass_inv.png",
|
||||||
|
groups = {cracky=3, dig_stone = 1},
|
||||||
|
selection_box = chains_sbox,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("basic_materials:brass_block", {
|
||||||
|
description = S("Brass Block"),
|
||||||
|
tiles = { "basic_materials_brass_block.png" },
|
||||||
|
is_ground_content = false,
|
||||||
|
groups = {cracky=1, dig_stone = 1},
|
||||||
|
sounds = sound_api.node_sound_metal_defaults()
|
||||||
|
})
|
@ -1,56 +0,0 @@
|
|||||||
-- Translation support
|
|
||||||
local S = minetest.get_translator("basic_materials")
|
|
||||||
|
|
||||||
-- items
|
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:plastic_sheet", {
|
|
||||||
description = S("Plastic sheet"),
|
|
||||||
inventory_image = "basic_materials_plastic_sheet.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:plastic_strip", {
|
|
||||||
description = S("Plastic strips"),
|
|
||||||
groups = { strip = 1 },
|
|
||||||
inventory_image = "basic_materials_plastic_strip.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("basic_materials:empty_spool", {
|
|
||||||
description = S("Empty wire spool"),
|
|
||||||
inventory_image = "basic_materials_empty_spool.png"
|
|
||||||
})
|
|
||||||
|
|
||||||
-- crafts
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "cooking",
|
|
||||||
output = "basic_materials:plastic_sheet",
|
|
||||||
recipe = "basic_materials:paraffin",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "fuel",
|
|
||||||
recipe = "basic_materials:plastic_sheet",
|
|
||||||
burntime = 30,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "basic_materials:plastic_strip 9",
|
|
||||||
recipe = {
|
|
||||||
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" }
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
output = "basic_materials:empty_spool 3",
|
|
||||||
recipe = {
|
|
||||||
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" },
|
|
||||||
{ "", "basic_materials:plastic_sheet", "" },
|
|
||||||
{ "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" }
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- aliases
|
|
||||||
|
|
||||||
minetest.register_alias("homedecor:plastic_sheeting", "basic_materials:plastic_sheet")
|
|
||||||
minetest.register_alias("homedecor:plastic_strips", "basic_materials:plastic_strip")
|
|
||||||
minetest.register_alias("homedecor:empty_spool", "basic_materials:empty_spool")
|
|
@ -73,6 +73,7 @@ end
|
|||||||
-- door command based on the station data table
|
-- door command based on the station data table
|
||||||
function hyperloop.open_pod_door(tStation)
|
function hyperloop.open_pod_door(tStation)
|
||||||
if tStation ~= nil then
|
if tStation ~= nil then
|
||||||
|
tStation.facedir = tStation.facedir or 0
|
||||||
local door_pos = hyperloop.new_pos(tStation.pos, tStation.facedir, "1F1L", 1)
|
local door_pos = hyperloop.new_pos(tStation.pos, tStation.facedir, "1F1L", 1)
|
||||||
local door_facedir = (tStation.facedir + 1) % 4
|
local door_facedir = (tStation.facedir + 1) % 4
|
||||||
door_command(door_pos, door_facedir, "open")
|
door_command(door_pos, door_facedir, "open")
|
||||||
@ -82,6 +83,7 @@ end
|
|||||||
-- door command based on the station data table
|
-- door command based on the station data table
|
||||||
function hyperloop.close_pod_door(tStation)
|
function hyperloop.close_pod_door(tStation)
|
||||||
if tStation ~= nil then
|
if tStation ~= nil then
|
||||||
|
tStation.facedir = tStation.facedir or 0
|
||||||
local door_pos = hyperloop.new_pos(tStation.pos, tStation.facedir, "1F1L", 1)
|
local door_pos = hyperloop.new_pos(tStation.pos, tStation.facedir, "1F1L", 1)
|
||||||
local door_facedir = (tStation.facedir + 1) % 4
|
local door_facedir = (tStation.facedir + 1) % 4
|
||||||
door_command(door_pos, door_facedir, "close")
|
door_command(door_pos, door_facedir, "close")
|
||||||
@ -91,6 +93,7 @@ end
|
|||||||
-- door command based on the station data table
|
-- door command based on the station data table
|
||||||
function hyperloop.animate_pod_door(tStation)
|
function hyperloop.animate_pod_door(tStation)
|
||||||
if tStation ~= nil then
|
if tStation ~= nil then
|
||||||
|
tStation.facedir = tStation.facedir or 0
|
||||||
local door_pos = hyperloop.new_pos(tStation.pos, tStation.facedir, "1F1L", 1)
|
local door_pos = hyperloop.new_pos(tStation.pos, tStation.facedir, "1F1L", 1)
|
||||||
local door_facedir = (tStation.facedir + 1) % 4
|
local door_facedir = (tStation.facedir + 1) % 4
|
||||||
door_command(door_pos, door_facedir, "animate")
|
door_command(door_pos, door_facedir, "animate")
|
||||||
|
@ -21,7 +21,7 @@ local NS = hyperloop.NS
|
|||||||
|
|
||||||
-- To store elevator floors and formspecs
|
-- To store elevator floors and formspecs
|
||||||
local Cache = {}
|
local Cache = {}
|
||||||
|
local PlayerNameTags = {}
|
||||||
local kPLAYER_OVER_GROUND = 0.5
|
local kPLAYER_OVER_GROUND = 0.5
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
@ -381,8 +381,9 @@ local function on_arrival_floor(tDeparture, tArrival, player_name, snd)
|
|||||||
if player ~= nil then
|
if player ~= nil then
|
||||||
tArrival.pos.y = tArrival.pos.y - kPLAYER_OVER_GROUND
|
tArrival.pos.y = tArrival.pos.y - kPLAYER_OVER_GROUND
|
||||||
player:set_pos(tArrival.pos)
|
player:set_pos(tArrival.pos)
|
||||||
if tArrival.attributes then
|
if PlayerNameTags[player_name] then
|
||||||
player:set_nametag_attributes(tArrival.attributes)
|
player:set_nametag_attributes(PlayerNameTags[player_name])
|
||||||
|
PlayerNameTags[player_name] = nil
|
||||||
end
|
end
|
||||||
tArrival.pos.y = tArrival.pos.y + kPLAYER_OVER_GROUND
|
tArrival.pos.y = tArrival.pos.y + kPLAYER_OVER_GROUND
|
||||||
end
|
end
|
||||||
@ -395,10 +396,8 @@ local function on_travel(tDeparture, tArrival, player_name, seconds)
|
|||||||
door_command(tDeparture.pos, tDeparture.facedir, "darken", false)
|
door_command(tDeparture.pos, tDeparture.facedir, "darken", false)
|
||||||
door_command(tArrival.pos, tArrival.facedir, "darken", false)
|
door_command(tArrival.pos, tArrival.facedir, "darken", false)
|
||||||
if player ~= nil then
|
if player ~= nil then
|
||||||
tArrival.attributes = player:get_nametag_attributes()
|
PlayerNameTags[player_name] = player:get_nametag_attributes()
|
||||||
player:set_nametag_attributes({text = " "})
|
player:set_nametag_attributes({text = " "})
|
||||||
else
|
|
||||||
tArrival.attributes = nil
|
|
||||||
end
|
end
|
||||||
local snd = minetest.sound_play("ele_norm", {
|
local snd = minetest.sound_play("ele_norm", {
|
||||||
pos = tDeparture.pos,
|
pos = tDeparture.pos,
|
||||||
|
@ -21,6 +21,7 @@ local NS = hyperloop.NS
|
|||||||
local I, _ = dofile( minetest.get_modpath("hyperloop").."/intllib.lua")
|
local I, _ = dofile( minetest.get_modpath("hyperloop").."/intllib.lua")
|
||||||
|
|
||||||
local Stations = hyperloop.Stations
|
local Stations = hyperloop.Stations
|
||||||
|
local PlayerNameTags = {}
|
||||||
|
|
||||||
local function enter_display(tStation, text)
|
local function enter_display(tStation, text)
|
||||||
-- determine position
|
-- determine position
|
||||||
@ -76,8 +77,9 @@ local function on_arrival(tDeparture, tArrival, player_name, sound)
|
|||||||
player:set_look_yaw(yaw)
|
player:set_look_yaw(yaw)
|
||||||
end
|
end
|
||||||
-- set player name again
|
-- set player name again
|
||||||
if tArrival.attributes then
|
if PlayerNameTags[player_name] then
|
||||||
player:set_nametag_attributes(tArrival.attributes)
|
player:set_nametag_attributes(PlayerNameTags[player_name])
|
||||||
|
PlayerNameTags[player_name] = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- play arrival sound
|
-- play arrival sound
|
||||||
@ -136,10 +138,11 @@ end
|
|||||||
local function on_start_travel(pos, node, clicker)
|
local function on_start_travel(pos, node, clicker)
|
||||||
-- arrival data
|
-- arrival data
|
||||||
local meta = M(pos)
|
local meta = M(pos)
|
||||||
|
local player_name = clicker:get_player_name()
|
||||||
local tDeparture, departure_pos = hyperloop.get_base_station(pos)
|
local tDeparture, departure_pos = hyperloop.get_base_station(pos)
|
||||||
local arrival_pos = hyperloop.get_arrival(departure_pos)
|
local arrival_pos = hyperloop.get_arrival(departure_pos)
|
||||||
if arrival_pos == nil then
|
if arrival_pos == nil then
|
||||||
minetest.chat_send_player(clicker:get_player_name(), S("[Hyperloop] No booking entered!"))
|
minetest.chat_send_player(player_name, S("[Hyperloop] No booking entered!"))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local tArrival = hyperloop.get_station(arrival_pos)
|
local tArrival = hyperloop.get_station(arrival_pos)
|
||||||
@ -160,8 +163,8 @@ local function on_start_travel(pos, node, clicker)
|
|||||||
clicker:set_pos(pos)
|
clicker:set_pos(pos)
|
||||||
-- rotate player to look in move direction
|
-- rotate player to look in move direction
|
||||||
clicker:set_look_horizontal(hyperloop.facedir_to_rad(tDeparture.facedir))
|
clicker:set_look_horizontal(hyperloop.facedir_to_rad(tDeparture.facedir))
|
||||||
-- hide player name
|
-- hide player name
|
||||||
tArrival.attributes = clicker:get_nametag_attributes()
|
PlayerNameTags[player_name] = clicker:get_nametag_attributes()
|
||||||
clicker:set_nametag_attributes({text = " "})
|
clicker:set_nametag_attributes({text = " "})
|
||||||
|
|
||||||
-- activate display
|
-- activate display
|
||||||
@ -188,7 +191,7 @@ local function on_start_travel(pos, node, clicker)
|
|||||||
hyperloop.close_pod_door(tDeparture)
|
hyperloop.close_pod_door(tDeparture)
|
||||||
|
|
||||||
atime = atime - 7 -- substract start/arrival time
|
atime = atime - 7 -- substract start/arrival time
|
||||||
minetest.after(4.9, on_travel, tDeparture, tArrival, clicker:get_player_name(), atime)
|
minetest.after(4.9, on_travel, tDeparture, tArrival, player_name, atime)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Hyperloop Seat
|
-- Hyperloop Seat
|
||||||
|
@ -37,7 +37,7 @@ local function remote_station_name(pos)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function on_punch(pos, node, puncher)
|
function minecart.update_buffer_infotext(pos)
|
||||||
local name = M(pos):get_string("name")
|
local name = M(pos):get_string("name")
|
||||||
local dest = remote_station_name(pos)
|
local dest = remote_station_name(pos)
|
||||||
if dest then
|
if dest then
|
||||||
@ -45,6 +45,10 @@ local function on_punch(pos, node, puncher)
|
|||||||
else
|
else
|
||||||
M(pos):set_string("infotext", name .. ": " .. S("Not connected!"))
|
M(pos):set_string("infotext", name .. ": " .. S("Not connected!"))
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_punch(pos, node, puncher)
|
||||||
|
minecart.update_buffer_infotext(pos)
|
||||||
M(pos):set_string("formspec", formspec(pos))
|
M(pos):set_string("formspec", formspec(pos))
|
||||||
minetest.get_node_timer(pos):start(CYCLE_TIME)
|
minetest.get_node_timer(pos):start(CYCLE_TIME)
|
||||||
|
|
||||||
|
@ -125,6 +125,7 @@ function minecart.stop_recording(self, pos, force_exit)
|
|||||||
local length = speed * self.runtime
|
local length = speed * self.runtime
|
||||||
local fmt = S("[minecart] Speed = %u m/s, Time = %u s, Route length = %u m")
|
local fmt = S("[minecart] Speed = %u m/s, Time = %u s, Route length = %u m")
|
||||||
minetest.chat_send_player(self.driver, string.format(fmt, speed, self.runtime, length))
|
minetest.chat_send_player(self.driver, string.format(fmt, speed, self.runtime, length))
|
||||||
|
minecart.update_buffer_infotext(self.start_pos)
|
||||||
end
|
end
|
||||||
elseif #self.checkpoints <= 3 then
|
elseif #self.checkpoints <= 3 then
|
||||||
minetest.chat_send_player(self.driver, S("[minecart] Your route is too short to record!"))
|
minetest.chat_send_player(self.driver, S("[minecart] Your route is too short to record!"))
|
||||||
|
@ -125,3 +125,6 @@ Required: tubelib2
|
|||||||
|
|
||||||
**2021-09-18 V0.10**
|
**2021-09-18 V0.10**
|
||||||
- Add support for colored cables (PR #1 by Thomas--S)
|
- Add support for colored cables (PR #1 by Thomas--S)
|
||||||
|
|
||||||
|
**2022-01-06 V0.11**
|
||||||
|
- Support for junction rotation added
|
||||||
|
@ -13,10 +13,10 @@
|
|||||||
networks = {}
|
networks = {}
|
||||||
|
|
||||||
-- Version for compatibility checks, see readme.md/history
|
-- Version for compatibility checks, see readme.md/history
|
||||||
networks.version = 0.10
|
networks.version = 0.11
|
||||||
|
|
||||||
if not minetest.global_exists("tubelib2") or tubelib2.version < 2.1 then
|
if not minetest.global_exists("tubelib2") or tubelib2.version < 2.2 then
|
||||||
minetest.log("error", "[networks] Networks requires tubelib2 version 2.1 or newer!")
|
minetest.log("error", "[networks] Networks requires tubelib2 version 2.2 or newer!")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -10,6 +10,9 @@
|
|||||||
|
|
||||||
]]--
|
]]--
|
||||||
|
|
||||||
|
local SideToDir = {B=1, R=2, F=3, L=4, D=5, U=6}
|
||||||
|
local tubelib2_dir_to_side = tubelib2.dir_to_side
|
||||||
|
|
||||||
local function bit(p)
|
local function bit(p)
|
||||||
return 2 ^ (p - 1) -- 1-based indexing
|
return 2 ^ (p - 1) -- 1-based indexing
|
||||||
end
|
end
|
||||||
@ -65,20 +68,6 @@ function networks.register_junction(name, size, boxes, tlib2, node, index)
|
|||||||
return names
|
return names
|
||||||
end
|
end
|
||||||
|
|
||||||
local SideToDir = {B=1, R=2, F=3, L=4}
|
|
||||||
local function dir_to_dir2(dir, param2)
|
|
||||||
if param2 == 0 then
|
|
||||||
return dir
|
|
||||||
elseif param2 == 1 then
|
|
||||||
return ({4,1,2,3,5,6})[dir]
|
|
||||||
elseif param2 == 2 then
|
|
||||||
return ({3,4,1,2,5,6})[dir]
|
|
||||||
elseif param2 == 3 then
|
|
||||||
return ({2,3,4,1,5,6})[dir]
|
|
||||||
end
|
|
||||||
return dir
|
|
||||||
end
|
|
||||||
|
|
||||||
function networks.junction_type(pos, network, default_side, param2)
|
function networks.junction_type(pos, network, default_side, param2)
|
||||||
local connected = function(self, pos, dir)
|
local connected = function(self, pos, dir)
|
||||||
if network:is_primary_node(pos, dir) then
|
if network:is_primary_node(pos, dir) then
|
||||||
@ -96,7 +85,7 @@ function networks.junction_type(pos, network, default_side, param2)
|
|||||||
val = setbit(val, bit(SideToDir[default_side]))
|
val = setbit(val, bit(SideToDir[default_side]))
|
||||||
end
|
end
|
||||||
for dir = 1,6 do
|
for dir = 1,6 do
|
||||||
local dir2 = dir_to_dir2(dir, param2)
|
local dir2 = SideToDir[tubelib2_dir_to_side(dir, param2 or 0)]
|
||||||
if network.force_to_use_tubes then
|
if network.force_to_use_tubes then
|
||||||
if connected(network, pos, dir) then
|
if connected(network, pos, dir) then
|
||||||
val = setbit(val, bit(dir2))
|
val = setbit(val, bit(dir2))
|
||||||
@ -107,7 +96,10 @@ function networks.junction_type(pos, network, default_side, param2)
|
|||||||
if connected(network, pos, dir) then
|
if connected(network, pos, dir) then
|
||||||
val = setbit(val, bit(dir2))
|
val = setbit(val, bit(dir2))
|
||||||
elseif network:is_secondary_node(pos, dir) then
|
elseif network:is_secondary_node(pos, dir) then
|
||||||
val = setbit(val, bit(dir2))
|
local node = network:get_secondary_node(pos, dir)
|
||||||
|
if network:is_valid_dir(node, networks.Flip[dir]) then
|
||||||
|
val = setbit(val, bit(dir2))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -27,6 +27,8 @@ local NumNodes = 0 -- Used to determine the number of network nodes
|
|||||||
local Flip = tubelib2.Turn180Deg
|
local Flip = tubelib2.Turn180Deg
|
||||||
local get_nodename = networks.get_nodename
|
local get_nodename = networks.get_nodename
|
||||||
local get_node = networks.get_node
|
local get_node = networks.get_node
|
||||||
|
local tubelib2_get_pos = tubelib2.get_pos
|
||||||
|
local tubelib2_side_to_dir = tubelib2.side_to_dir
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
-- Debugging
|
-- Debugging
|
||||||
@ -426,6 +428,17 @@ networks.net_def = net_def
|
|||||||
-- F |
|
-- F |
|
||||||
-- D
|
-- D
|
||||||
--
|
--
|
||||||
|
|
||||||
|
-- Determine the pos relative to the given 'pos', 'param2'
|
||||||
|
-- and the path based on 'sides' like "FUL"
|
||||||
|
function networks.get_relpos(pos, sides, param2)
|
||||||
|
local pos1 = {x = pos.x, y = pos.y, z = pos.z}
|
||||||
|
for side in sides:gmatch(".") do
|
||||||
|
pos1 = tubelib2_get_pos(pos1, tubelib2_side_to_dir(side, param2))
|
||||||
|
end
|
||||||
|
return pos1
|
||||||
|
end
|
||||||
|
|
||||||
-- networks.side_to_outdir(pos, side)
|
-- networks.side_to_outdir(pos, side)
|
||||||
networks.side_to_outdir = side_to_outdir
|
networks.side_to_outdir = side_to_outdir
|
||||||
|
|
||||||
|
@ -52,24 +52,32 @@ local function print_sides(pos, api, netw_type)
|
|||||||
print("# " .. api .. " - " .. netw_type .. " dirs: " .. table.concat(t, ", "))
|
print("# " .. api .. " - " .. netw_type .. " dirs: " .. table.concat(t, ", "))
|
||||||
end
|
end
|
||||||
|
|
||||||
local function print_power_network_data(pos, api, netw, netw_type)
|
local function print_power_network_data(pos, api, netw_type, outdir)
|
||||||
local tlib2 = networks.registered_networks[api][netw_type]
|
local tlib2 = networks.registered_networks[api][netw_type]
|
||||||
local outdir = netw[netw_type].ntype == "junc" and 0 or nil
|
|
||||||
local data = power.get_network_data(pos, tlib2, outdir)
|
local data = power.get_network_data(pos, tlib2, outdir)
|
||||||
|
local netw = networks.get_network_table(pos, tlib2, outdir)
|
||||||
if netw then
|
if netw then
|
||||||
print("- Number of network nodes: " .. (netw.num_nodes or 0))
|
print(" - Number of network nodes: " .. (netw.num_nodes or 0))
|
||||||
print("- Number of generators: " .. #(netw.gen or {}))
|
print(" - Number of generators: " .. #(netw.gen or {}))
|
||||||
print("- Number of consumers: " .. #(netw.con or {}))
|
print(" - Number of consumers: " .. #(netw.con or {}))
|
||||||
print("- Number of storage systems: " .. #(netw.sto or {}))
|
print(" - Number of storage systems: " .. #(netw.sto or {}))
|
||||||
end
|
end
|
||||||
if data then
|
if data then
|
||||||
local s = string.format("- Netw %u: generated = %u/%u, consumed = %u, storage load = %u/%u",
|
local s = string.format(" - Netw %u: generated = %u/%u, consumed = %u, storage load = %u/%u",
|
||||||
data.netw_num, round(data.provided),
|
data.netw_num, round(data.provided),
|
||||||
data.available, round(data.consumed),
|
data.available, round(data.consumed),
|
||||||
round(data.curr_load), round(data.max_capa))
|
round(data.curr_load), round(data.max_capa))
|
||||||
print(s)
|
print(s)
|
||||||
else
|
end
|
||||||
print("- Node has no '" .. netw_type .. "' network!!!")
|
end
|
||||||
|
|
||||||
|
local function print_liquid_network_data(pos, api, netw_type, outdir)
|
||||||
|
local tlib2 = networks.registered_networks[api][netw_type]
|
||||||
|
local netw = networks.get_network_table(pos, tlib2, outdir)
|
||||||
|
if netw then
|
||||||
|
print(" - Number of network nodes: " .. (netw.num_nodes or 0))
|
||||||
|
print(" - Number of pumps: " .. #(netw.pump or {}))
|
||||||
|
print(" - Number of tanks: " .. #(netw.tank or {}))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -80,6 +88,11 @@ local function print_netID(pos, api, netw_type)
|
|||||||
local s = tubelib2.dir_to_string(outdir)
|
local s = tubelib2.dir_to_string(outdir)
|
||||||
if netID then
|
if netID then
|
||||||
print("- " .. s .. ": netwNum for '" .. netw_type .. "': " .. networks.netw_num(netID))
|
print("- " .. s .. ": netwNum for '" .. netw_type .. "': " .. networks.netw_num(netID))
|
||||||
|
if api == "liquid" then
|
||||||
|
print_liquid_network_data(pos, api, netw_type, outdir)
|
||||||
|
elseif api == "power" then
|
||||||
|
print_power_network_data(pos, api, netw_type, outdir)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
print("- " .. s .. ": Node has no '" .. netw_type .. "' netID!!!")
|
print("- " .. s .. ": Node has no '" .. netw_type .. "' netID!!!")
|
||||||
end
|
end
|
||||||
@ -105,6 +118,19 @@ local function print_valid_sides(name, api, netw_type)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function print_connected_nodes(pos, api, netw_type)
|
||||||
|
local tlib2 = networks.registered_networks[api][netw_type]
|
||||||
|
for outdir = 1,6 do
|
||||||
|
local destpos, indir = tlib2:get_connected_node_pos(pos, outdir)
|
||||||
|
if destpos and tlib2:connected(destpos) then
|
||||||
|
local s1 = tubelib2.dir_to_string(outdir)
|
||||||
|
local s2 = tubelib2.dir_to_string(indir)
|
||||||
|
local node = minetest.get_node(destpos)
|
||||||
|
print("- " .. s1 .. ": Node connected to " .. node.name .. " at " .. P2S(destpos) .. " from " .. s2)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- debug print of node related data
|
-- debug print of node related data
|
||||||
local function debug_print(pos)
|
local function debug_print(pos)
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
@ -124,14 +150,10 @@ local function debug_print(pos)
|
|||||||
for netw_type,api in pairs(NetwTypes) do
|
for netw_type,api in pairs(NetwTypes) do
|
||||||
if ndef.networks[netw_type] then
|
if ndef.networks[netw_type] then
|
||||||
print_sides(pos, api, netw_type)
|
print_sides(pos, api, netw_type)
|
||||||
if api == "power" then
|
|
||||||
print_power_network_data(pos, api, ndef.networks, netw_type)
|
|
||||||
elseif api == "liquid" then
|
|
||||||
--print_liquid_network_data(pos, api, netw_type)
|
|
||||||
end
|
|
||||||
print_netID(pos, api, netw_type)
|
print_netID(pos, api, netw_type)
|
||||||
print_secondary_node(pos, api, netw_type)
|
print_secondary_node(pos, api, netw_type)
|
||||||
print_valid_sides(node.name, api, netw_type)
|
print_valid_sides(node.name, api, netw_type)
|
||||||
|
print_connected_nodes(pos, api, netw_type)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ In contrast to TechPack, the resources are more limited and it is much more diff
|
|||||||
|
|
||||||
|
|
||||||
### License
|
### License
|
||||||
Copyright (C) 2019-2021 Joachim Stolberg
|
Copyright (C) 2019-2022 Joachim Stolberg
|
||||||
Code: Licensed under the GNU AGPL version 3 or later. See LICENSE.txt
|
Code: Licensed under the GNU AGPL version 3 or later. See LICENSE.txt
|
||||||
Textures: CC BY-SA 3.0
|
Textures: CC BY-SA 3.0
|
||||||
|
|
||||||
@ -80,6 +80,9 @@ Available worlds will be converted to 'lsqlite3', but there is no way back, so:
|
|||||||
|
|
||||||
### History
|
### History
|
||||||
|
|
||||||
|
**2022-01-22 V1.07**
|
||||||
|
- TA5 fusion reactor added
|
||||||
|
|
||||||
**2022-01-03 V1.06**
|
**2022-01-03 V1.06**
|
||||||
- TA5 teleport blocks added
|
- TA5 teleport blocks added
|
||||||
- Many improvements
|
- Many improvements
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
TechAge
|
TechAge
|
||||||
=======
|
=======
|
||||||
|
|
||||||
Copyright (C) 2019-2021 Joachim Stolberg
|
Copyright (C) 2019-2022 Joachim Stolberg
|
||||||
|
|
||||||
AGPL v3
|
AGPL v3
|
||||||
See LICENSE.txt for more information
|
See LICENSE.txt for more information
|
||||||
@ -54,6 +54,12 @@ local names = networks.register_junction("techage:concentrator", 2/8, Boxes, Tub
|
|||||||
local name = "techage:concentrator"..networks.junction_type(pos, Tube, "R", node.param2)
|
local name = "techage:concentrator"..networks.junction_type(pos, Tube, "R", node.param2)
|
||||||
minetest.swap_node(pos, {name = name, param2 = node.param2})
|
minetest.swap_node(pos, {name = name, param2 = node.param2})
|
||||||
end,
|
end,
|
||||||
|
ta_rotate_node = function(pos, node, new_param2)
|
||||||
|
Tube:after_dig_node(pos)
|
||||||
|
minetest.swap_node(pos, {name = node.name, param2 = new_param2})
|
||||||
|
Tube:after_place_node(pos)
|
||||||
|
M(pos):set_int("push_dir", techage.side_to_outdir("R", new_param2))
|
||||||
|
end,
|
||||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||||
Tube:after_dig_node(pos)
|
Tube:after_dig_node(pos)
|
||||||
end,
|
end,
|
||||||
@ -93,6 +99,12 @@ names = networks.register_junction("techage:ta4_concentrator", 2/8, Boxes, Tube,
|
|||||||
local name = "techage:ta4_concentrator"..networks.junction_type(pos, Tube, "R", node.param2)
|
local name = "techage:ta4_concentrator"..networks.junction_type(pos, Tube, "R", node.param2)
|
||||||
minetest.swap_node(pos, {name = name, param2 = node.param2})
|
minetest.swap_node(pos, {name = name, param2 = node.param2})
|
||||||
end,
|
end,
|
||||||
|
ta_rotate_node = function(pos, node, new_param2)
|
||||||
|
Tube:after_dig_node(pos)
|
||||||
|
minetest.swap_node(pos, {name = node.name, param2 = new_param2})
|
||||||
|
Tube:after_place_node(pos)
|
||||||
|
M(pos):set_int("push_dir", techage.side_to_outdir("R", new_param2))
|
||||||
|
end,
|
||||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||||
Tube:after_dig_node(pos)
|
Tube:after_dig_node(pos)
|
||||||
end,
|
end,
|
||||||
|
@ -229,6 +229,7 @@ function techage.register_consumer(base_name, inv_name, tiles, tNode, validState
|
|||||||
on_metadata_inventory_move = tNode.on_metadata_inventory_move,
|
on_metadata_inventory_move = tNode.on_metadata_inventory_move,
|
||||||
on_metadata_inventory_put = tNode.on_metadata_inventory_put,
|
on_metadata_inventory_put = tNode.on_metadata_inventory_put,
|
||||||
on_metadata_inventory_take = tNode.on_metadata_inventory_take,
|
on_metadata_inventory_take = tNode.on_metadata_inventory_take,
|
||||||
|
ta_rotate_node = tNode.ta_rotate_node,
|
||||||
|
|
||||||
paramtype = tNode.paramtype,
|
paramtype = tNode.paramtype,
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
@ -269,6 +270,7 @@ function techage.register_consumer(base_name, inv_name, tiles, tNode, validState
|
|||||||
on_metadata_inventory_move = tNode.on_metadata_inventory_move,
|
on_metadata_inventory_move = tNode.on_metadata_inventory_move,
|
||||||
on_metadata_inventory_put = tNode.on_metadata_inventory_put,
|
on_metadata_inventory_put = tNode.on_metadata_inventory_put,
|
||||||
on_metadata_inventory_take = tNode.on_metadata_inventory_take,
|
on_metadata_inventory_take = tNode.on_metadata_inventory_take,
|
||||||
|
ta_rotate_node = tNode.ta_rotate_node,
|
||||||
|
|
||||||
paramtype = tNode.paramtype,
|
paramtype = tNode.paramtype,
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
|
@ -197,7 +197,7 @@ local tiles = {}
|
|||||||
-- '{power}' will be replaced by the power PNG
|
-- '{power}' will be replaced by the power PNG
|
||||||
tiles.pas = {
|
tiles.pas = {
|
||||||
"techage_filling_ta#.png^techage_frame_ta#_top.png^techage_appl_arrow.png",
|
"techage_filling_ta#.png^techage_frame_ta#_top.png^techage_appl_arrow.png",
|
||||||
"techage_filling_ta#.png^techage_frame_ta#.png",
|
"techage_filling_ta#.png^techage_frame_ta#_bottom.png^techage_appl_arrow.png",
|
||||||
"techage_filling_ta#.png^techage_frame_ta#.png^techage_appl_outp.png",
|
"techage_filling_ta#.png^techage_frame_ta#.png^techage_appl_outp.png",
|
||||||
"techage_filling_ta#.png^techage_frame_ta#.png^techage_appl_inp.png",
|
"techage_filling_ta#.png^techage_frame_ta#.png^techage_appl_inp.png",
|
||||||
"techage_appl_pusher.png^[transformR180]^techage_frame_ta#.png",
|
"techage_appl_pusher.png^[transformR180]^techage_frame_ta#.png",
|
||||||
@ -206,7 +206,7 @@ tiles.pas = {
|
|||||||
tiles.act = {
|
tiles.act = {
|
||||||
-- up, down, right, left, back, front
|
-- up, down, right, left, back, front
|
||||||
"techage_filling_ta#.png^techage_frame_ta#_top.png^techage_appl_arrow.png",
|
"techage_filling_ta#.png^techage_frame_ta#_top.png^techage_appl_arrow.png",
|
||||||
"techage_filling_ta#.png^techage_frame_ta#.png",
|
"techage_filling_ta#.png^techage_frame_ta#_bottom.png^techage_appl_arrow.png",
|
||||||
"techage_filling_ta#.png^techage_frame_ta#.png^techage_appl_outp.png",
|
"techage_filling_ta#.png^techage_frame_ta#.png^techage_appl_outp.png",
|
||||||
"techage_filling_ta#.png^techage_frame_ta#.png^techage_appl_inp.png",
|
"techage_filling_ta#.png^techage_frame_ta#.png^techage_appl_inp.png",
|
||||||
{
|
{
|
||||||
@ -277,7 +277,14 @@ local node_name_ta2, node_name_ta3, node_name_ta4 =
|
|||||||
M(pos):set_string("formspec", ta4_formspec(CRD(pos).State, pos, nvm))
|
M(pos):set_string("formspec", ta4_formspec(CRD(pos).State, pos, nvm))
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
ta_rotate_node = function(pos, node, new_param2)
|
||||||
|
Tube:after_dig_node(pos)
|
||||||
|
minetest.swap_node(pos, {name = node.name, param2 = new_param2})
|
||||||
|
Tube:after_place_node(pos)
|
||||||
|
local meta = M(pos)
|
||||||
|
meta:set_int("pull_dir", techage.side_to_outdir("L", new_param2))
|
||||||
|
meta:set_int("push_dir", techage.side_to_outdir("R", new_param2))
|
||||||
|
end,
|
||||||
allow_metadata_inventory_put = allow_metadata_inventory_put,
|
allow_metadata_inventory_put = allow_metadata_inventory_put,
|
||||||
allow_metadata_inventory_take = allow_metadata_inventory_take,
|
allow_metadata_inventory_take = allow_metadata_inventory_take,
|
||||||
on_rightclick = on_rightclick,
|
on_rightclick = on_rightclick,
|
||||||
|
@ -28,6 +28,7 @@ local NodeDef = techage.NodeDef
|
|||||||
local Tube = techage.Tube
|
local Tube = techage.Tube
|
||||||
local is_cart_available = minecart.is_nodecart_available
|
local is_cart_available = minecart.is_nodecart_available
|
||||||
local techage_counting_hit = techage.counting_hit
|
local techage_counting_hit = techage.counting_hit
|
||||||
|
local tubelib2_side_to_dir = tubelib2.side_to_dir
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
-- Database
|
-- Database
|
||||||
@ -125,11 +126,7 @@ end
|
|||||||
local SideToDir = {B=1, R=2, F=3, L=4, D=5, U=6}
|
local SideToDir = {B=1, R=2, F=3, L=4, D=5, U=6}
|
||||||
|
|
||||||
local function side_to_dir(side, param2)
|
local function side_to_dir(side, param2)
|
||||||
local dir = SideToDir[side]
|
return tubelib2_side_to_dir(side, param2)
|
||||||
if dir < 5 then
|
|
||||||
dir = (((dir - 1) + (param2 % 4)) % 4) + 1
|
|
||||||
end
|
|
||||||
return dir
|
|
||||||
end
|
end
|
||||||
|
|
||||||
techage.side_to_outdir = side_to_dir
|
techage.side_to_outdir = side_to_dir
|
||||||
|
@ -242,9 +242,8 @@ local function attach_objects(pos, offs, parent, yoffs)
|
|||||||
local dir = vector.subtract(obj:get_pos(), pos)
|
local dir = vector.subtract(obj:get_pos(), pos)
|
||||||
local entity = obj:get_luaentity()
|
local entity = obj:get_luaentity()
|
||||||
if entity then
|
if entity then
|
||||||
if entity.name == "__builtin:item" then -- dropped items
|
local mod = entity.name:gmatch("(.-):")()
|
||||||
--obj:set_attach(objref, "", {x=0, y=0, z=0}, {x=0, y=0, z=0}, true) -- hier kracht es
|
if techage.RegisteredMobsMods[mod] then
|
||||||
elseif entity.name ~= "techage:move_item" then
|
|
||||||
dir.y = dir.y + yoffs
|
dir.y = dir.y + yoffs
|
||||||
attach_single_object(parent, obj, dir)
|
attach_single_object(parent, obj, dir)
|
||||||
end
|
end
|
||||||
@ -694,11 +693,11 @@ function flylib.rotate_nodes(pos, posses1, rot)
|
|||||||
for i, pos1 in ipairs(posses1) do
|
for i, pos1 in ipairs(posses1) do
|
||||||
local node = techage.get_node_lvm(pos1)
|
local node = techage.get_node_lvm(pos1)
|
||||||
if rot == "l" then
|
if rot == "l" then
|
||||||
param2 = techage.param2_turn_left(node.param2)
|
|
||||||
elseif rot == "r" then
|
|
||||||
param2 = techage.param2_turn_right(node.param2)
|
param2 = techage.param2_turn_right(node.param2)
|
||||||
|
elseif rot == "r" then
|
||||||
|
param2 = techage.param2_turn_left(node.param2)
|
||||||
else
|
else
|
||||||
param2 = techage.param2_turn_left(techage.param2_turn_left(node.param2))
|
param2 = techage.param2_turn_right(techage.param2_turn_right(node.param2))
|
||||||
end
|
end
|
||||||
if not minetest.is_protected(pos1, owner) and is_simple_node(pos1) then
|
if not minetest.is_protected(pos1, owner) and is_simple_node(pos1) then
|
||||||
minetest.remove_node(pos1)
|
minetest.remove_node(pos1)
|
||||||
|
@ -80,13 +80,56 @@ function techage.facedir_to_rotation(facedir)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function techage.param2_turn_left(param2)
|
function techage.param2_turn_left(param2)
|
||||||
return (RotationViaYAxis[param2] or RotationViaYAxis[0])[1]
|
return (RotationViaYAxis[param2] or RotationViaYAxis[0])[2]
|
||||||
end
|
end
|
||||||
|
|
||||||
function techage.param2_turn_right(param2)
|
function techage.param2_turn_right(param2)
|
||||||
return (RotationViaYAxis[param2] or RotationViaYAxis[0])[2]
|
return (RotationViaYAxis[param2] or RotationViaYAxis[0])[1]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Roll a block in north direction (south is vice versa)
|
||||||
|
local RollNorth = {
|
||||||
|
{0,4,22,8},
|
||||||
|
{1,5,23,9},
|
||||||
|
{2,6,20,10},
|
||||||
|
{3,7,21,11},
|
||||||
|
{12,13,14,15},
|
||||||
|
{16,19,18,17},
|
||||||
|
}
|
||||||
|
-- Roll a block in east direction (west is vice versa)
|
||||||
|
local RollEast = {
|
||||||
|
{0,12,20,16},
|
||||||
|
{1,13,21,17},
|
||||||
|
{2,14,22,18},
|
||||||
|
{3,15,23,19},
|
||||||
|
{4,7,6,5},
|
||||||
|
{8,9,10,11},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Generate a table for all facedir and param2 values:
|
||||||
|
-- TurnUp[facedir][param2] = new_param2
|
||||||
|
local TurnUp = {[0] = {}, {}, {}, {}}
|
||||||
|
|
||||||
|
for i = 1,6 do
|
||||||
|
for j = 1,4 do
|
||||||
|
local idx = RollNorth[i][j]
|
||||||
|
TurnUp[0][idx] = RollNorth[i][j == 4 and 1 or j + 1] -- north
|
||||||
|
TurnUp[2][idx] = RollNorth[i][j == 1 and 4 or j - 1] -- south
|
||||||
|
|
||||||
|
idx = RollEast[i][j]
|
||||||
|
TurnUp[1][idx] = RollEast[i][j == 4 and 1 or j + 1] -- east
|
||||||
|
TurnUp[3][idx] = RollEast[i][j == 1 and 4 or j - 1] -- west
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- facedir is from the players (0..3)
|
||||||
|
-- param2 is from the node (0..23)
|
||||||
|
function techage.param2_turn_up(facedir, param2)
|
||||||
|
return TurnUp[facedir % 4][param2 % 24]
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
-- Rotate nodes around the center
|
-- Rotate nodes around the center
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
@ -221,25 +264,6 @@ function techage.get_node_lvm(pos)
|
|||||||
return {name="ignore", param2=0}
|
return {name="ignore", param2=0}
|
||||||
end
|
end
|
||||||
|
|
||||||
--
|
|
||||||
-- Functions used to hide electric cable and biogas pipes
|
|
||||||
--
|
|
||||||
-- Overridden method of tubelib2!
|
|
||||||
function techage.get_primary_node_param2(pos, dir)
|
|
||||||
local npos = vector.add(pos, tubelib2.Dir6dToVector[dir or 0])
|
|
||||||
local param2 = M(npos):get_int("tl2_param2")
|
|
||||||
if param2 ~= 0 then
|
|
||||||
return param2, npos
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Overridden method of tubelib2!
|
|
||||||
function techage.is_primary_node(pos, dir)
|
|
||||||
local npos = vector.add(pos, tubelib2.Dir6dToVector[dir or 0])
|
|
||||||
local param2 = M(npos):get_int("tl2_param2")
|
|
||||||
return param2 ~= 0
|
|
||||||
end
|
|
||||||
|
|
||||||
function techage.is_air_like(name)
|
function techage.is_air_like(name)
|
||||||
local ndef = minetest.registered_nodes[name]
|
local ndef = minetest.registered_nodes[name]
|
||||||
if ndef and ndef.buildable_to then
|
if ndef and ndef.buildable_to then
|
||||||
@ -462,6 +486,14 @@ function techage.wrench_tooltip(x, y)
|
|||||||
"tooltip["..x..","..y..";0.5,0.5;"..tooltip..";#0C3D32;#FFFFFF]"
|
"tooltip["..x..","..y..";0.5,0.5;"..tooltip..";#0C3D32;#FFFFFF]"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
techage.RegisteredMobsMods = {}
|
||||||
|
|
||||||
|
-- Register mobs mods for the move/fly controllers
|
||||||
|
function techage.register_mobs_mods(mod)
|
||||||
|
techage.RegisteredMobsMods[mod] = true
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
-- Terminal history buffer
|
-- Terminal history buffer
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
@ -547,3 +579,50 @@ function techage.set_expoints(player, ex_points)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
-- Scheduler for a table-based, cyclic call of functions
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
local TABLE_SIZE = 256
|
||||||
|
techage.scheduler = {}
|
||||||
|
|
||||||
|
local function add_to_table(tbl, i, func)
|
||||||
|
while i < TABLE_SIZE do
|
||||||
|
if not tbl[i] then
|
||||||
|
tbl[i] = func
|
||||||
|
return i + 1
|
||||||
|
end
|
||||||
|
i = i + 1
|
||||||
|
end
|
||||||
|
return i
|
||||||
|
end
|
||||||
|
|
||||||
|
function techage.scheduler.init(pos)
|
||||||
|
local mem = techage.get_mem(pos)
|
||||||
|
mem.sched_idx = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
-- tFunc : (empty) table of functions
|
||||||
|
-- call_rate : (2,4,8,16,32,64 or 128)
|
||||||
|
-- offset : 0-128
|
||||||
|
-- func : function to be called
|
||||||
|
function techage.scheduler.register(tFunc, call_rate, offset, func)
|
||||||
|
local i= 0
|
||||||
|
while i < TABLE_SIZE do
|
||||||
|
if (i % call_rate) == offset then
|
||||||
|
i = add_to_table(tFunc, i, func)
|
||||||
|
else
|
||||||
|
i = i + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return tFunc
|
||||||
|
end
|
||||||
|
|
||||||
|
-- tFunc : table of functions
|
||||||
|
-- default : default function (optional)
|
||||||
|
-- Returns a function to be called be the callee
|
||||||
|
function techage.scheduler.get(pos, tFunc, default)
|
||||||
|
local mem = techage.get_mem(pos)
|
||||||
|
mem.sched_idx = ((mem.sched_idx or 0) + 1) % TABLE_SIZE
|
||||||
|
return tFunc[mem.sched_idx] or default or function() end
|
||||||
|
end
|
||||||
|
@ -190,7 +190,7 @@ local function fill_on_punch(nvm, empty_container, item_count, puncher)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function legacy_items(full_container, item_count)
|
local function legacy_items(full_container, item_count)
|
||||||
if full_container == "techage:hydrogen" then
|
if full_container == "techage:isobutane" then
|
||||||
return {container = "", size = item_count, inv_item = full_container}
|
return {container = "", size = item_count, inv_item = full_container}
|
||||||
elseif full_container == "techage:oil_source" then
|
elseif full_container == "techage:oil_source" then
|
||||||
return {container = "", size = item_count, inv_item = full_container}
|
return {container = "", size = item_count, inv_item = full_container}
|
||||||
|
@ -221,7 +221,7 @@ end
|
|||||||
|
|
||||||
function techage.menu.generate_formspec(pos, ndef, form_def, player_name)
|
function techage.menu.generate_formspec(pos, ndef, form_def, player_name)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local number = techage.get_node_number(pos)
|
local number = techage.get_node_number(pos) or "-"
|
||||||
local mem = techage.get_mem(pos)
|
local mem = techage.get_mem(pos)
|
||||||
mem.star = ((mem.star or 0) + 1) % 2
|
mem.star = ((mem.star or 0) + 1) % 2
|
||||||
local star = mem.star == 1 and "*" or ""
|
local star = mem.star == 1 and "*" or ""
|
||||||
|
@ -15,6 +15,8 @@ local function tooltip(item)
|
|||||||
return "", name
|
return "", name
|
||||||
elseif img == "10x10" then -- huge image for the plan?
|
elseif img == "10x10" then -- huge image for the plan?
|
||||||
return "10x10", name
|
return "10x10", name
|
||||||
|
elseif img == "5x4" then -- huge image for the plan?
|
||||||
|
return "5x4", name
|
||||||
end
|
end
|
||||||
local ndef = minetest.registered_nodes[name]
|
local ndef = minetest.registered_nodes[name]
|
||||||
if ndef and ndef.description then
|
if ndef and ndef.description then
|
||||||
@ -40,12 +42,17 @@ local function plan(images)
|
|||||||
tbl[#tbl+1] = "label["..x_offs..","..y_offs..";"..S("Top view").."]"
|
tbl[#tbl+1] = "label["..x_offs..","..y_offs..";"..S("Top view").."]"
|
||||||
elseif img == "side_view" then
|
elseif img == "side_view" then
|
||||||
tbl[#tbl+1] = "label["..x_offs..","..y_offs..";"..S("Side view").."]"
|
tbl[#tbl+1] = "label["..x_offs..","..y_offs..";"..S("Side view").."]"
|
||||||
|
elseif img == "sectional_view" then
|
||||||
|
tbl[#tbl+1] = "label["..x_offs..","..y_offs..";"..S("Sectional view").."]"
|
||||||
elseif img == "" then
|
elseif img == "" then
|
||||||
img = tooltip -- use tooltip for bigger image
|
img = tooltip -- use tooltip for bigger image
|
||||||
tbl[#tbl+1] = "image["..x_offs..","..y_offs..";2.2,2.2;"..img.."]"
|
tbl[#tbl+1] = "image["..x_offs..","..y_offs..";2.2,2.2;"..img.."]"
|
||||||
elseif img == "10x10" then
|
elseif img == "10x10" then
|
||||||
img = tooltip -- use tooltip for bigger image
|
img = tooltip -- use tooltip for bigger image
|
||||||
tbl[#tbl+1] = "image["..x_offs..","..y_offs..";10,10;"..img.."]"
|
tbl[#tbl+1] = "image["..x_offs..","..y_offs..";10,10;"..img.."]"
|
||||||
|
elseif img == "5x4" then
|
||||||
|
img = tooltip -- use tooltip for bigger image
|
||||||
|
tbl[#tbl+1] = "image["..x_offs..","..y_offs..";5,4;"..img.."]"
|
||||||
elseif string.find(img, ":") then
|
elseif string.find(img, ":") then
|
||||||
tbl[#tbl+1] = "item_image["..x_offs..","..y_offs..";1,1;"..img.."]"
|
tbl[#tbl+1] = "item_image["..x_offs..","..y_offs..";1,1;"..img.."]"
|
||||||
else
|
else
|
||||||
|
@ -85,6 +85,7 @@ techage.Items = {
|
|||||||
ta3_powerswitchbox = "techage:powerswitch_box",
|
ta3_powerswitchbox = "techage:powerswitch_box",
|
||||||
ta3_powerterminal = "techage:ta3_power_terminal",
|
ta3_powerterminal = "techage:ta3_power_terminal",
|
||||||
ta3_trowel = "techage:trowel",
|
ta3_trowel = "techage:trowel",
|
||||||
|
ta3_screwdriver = "techage:screwdriver",
|
||||||
ta3_tinygenerator = "techage:tiny_generator",
|
ta3_tinygenerator = "techage:tiny_generator",
|
||||||
ta3_akkublock = "techage:ta3_akku",
|
ta3_akkublock = "techage:ta3_akku",
|
||||||
ta3_furnace = "techage:ta3_furnace_pas",
|
ta3_furnace = "techage:ta3_furnace_pas",
|
||||||
@ -203,13 +204,18 @@ techage.Items = {
|
|||||||
ta4_autocrafter = "techage:ta4_autocrafter_pas",
|
ta4_autocrafter = "techage:ta4_autocrafter_pas",
|
||||||
ta4_recipeblock = "techage:ta4_recipeblock",
|
ta4_recipeblock = "techage:ta4_recipeblock",
|
||||||
----------------------------
|
----------------------------
|
||||||
|
techage_ta5 = "techage:ta5_fr_nucleus",
|
||||||
ta5_flycontroller = "techage:ta5_flycontroller",
|
ta5_flycontroller = "techage:ta5_flycontroller",
|
||||||
ta5_aichip = "techage:ta5_aichip",
|
ta5_aichip = "techage:ta5_aichip",
|
||||||
ta5_tele_pipe = "techage:ta5_tele_pipe",
|
ta5_tele_pipe = "techage:ta5_tele_pipe",
|
||||||
ta5_tele_tube = "techage:ta5_tele_tube",
|
ta5_tele_tube = "techage:ta5_tele_tube",
|
||||||
ta5_chest = "techage:ta5_hl_chest",
|
ta5_chest = "techage:ta5_hl_chest",
|
||||||
ta5_tank = "techage:ta5_hl_tank",
|
ta5_tank = "techage:ta5_hl_tank",
|
||||||
|
ta5_magnet = "techage:ta5_magnet1",
|
||||||
|
ta5_pump = "techage:ta5_pump",
|
||||||
|
ta5_fr_shell = "techage:ta5_fr_shell",
|
||||||
|
ta5_fr_nucleus = "techage:ta5_fr_nucleus",
|
||||||
|
ta5_fr_controller = "techage:ta5_fr_controller_pas",
|
||||||
}
|
}
|
||||||
|
|
||||||
function techage.add_manual_items(table_with_items)
|
function techage.add_manual_items(table_with_items)
|
||||||
|
@ -139,6 +139,7 @@ techage.manual_DE.aTitel = {
|
|||||||
"3,TechAge Programmer",
|
"3,TechAge Programmer",
|
||||||
"3,TechAge Kelle / Trowel",
|
"3,TechAge Kelle / Trowel",
|
||||||
"3,TA3 Bohrgestängezange / TA3 Drill Pipe Wrench",
|
"3,TA3 Bohrgestängezange / TA3 Drill Pipe Wrench",
|
||||||
|
"3,Techage Schraubendreher",
|
||||||
"1,TA4: Gegenwart",
|
"1,TA4: Gegenwart",
|
||||||
"2,Windkraftanlage",
|
"2,Windkraftanlage",
|
||||||
"3,TA4 Windkraftanlage / Wind Turbine",
|
"3,TA4 Windkraftanlage / Wind Turbine",
|
||||||
@ -229,7 +230,13 @@ techage.manual_DE.aTitel = {
|
|||||||
"3,TA4 Recycler",
|
"3,TA4 Recycler",
|
||||||
"1,TA5: Zukunft",
|
"1,TA5: Zukunft",
|
||||||
"2,Energiequellen",
|
"2,Energiequellen",
|
||||||
"3,TA5 Fusionsreaktor (geplant)",
|
"3,TA5 Fusionsreaktor",
|
||||||
|
"4,TA5 Fusionreaktor Magnet",
|
||||||
|
"4,TA5 Pumpe",
|
||||||
|
"4,TA5 Wärmetauscher",
|
||||||
|
"4,TA5 Fusionreaktor Controller",
|
||||||
|
"4,TA5 Fusionreaktor Hülle",
|
||||||
|
"4,TA5 Fusionreaktor Kern",
|
||||||
"2,Energiespeicher",
|
"2,Energiespeicher",
|
||||||
"3,TA5 Hybrid-Speicher (geplant)",
|
"3,TA5 Hybrid-Speicher (geplant)",
|
||||||
"2,Logik Blöcke",
|
"2,Logik Blöcke",
|
||||||
@ -1268,6 +1275,15 @@ techage.manual_DE.aText = {
|
|||||||
"\n"..
|
"\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"\n",
|
"\n",
|
||||||
|
"Der Techage Schraubendreher dient als Ersatz für den normalen Schraubendreher. Es besitzt folgende Funktionen:\n"..
|
||||||
|
"\n"..
|
||||||
|
" - Linksklick: Den Block nach links drehen\n"..
|
||||||
|
" - Rechtsklick: Die sichtbare Seite des Blockes nach oben drehen\n"..
|
||||||
|
" - Shift+Linksklick: Ausrichtung des angeklickten Blockes speichern\n"..
|
||||||
|
" - Shift+Rechtsklick: Die gespeicherte Ausrichtung auf den angeklickten Block anwenden\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n",
|
||||||
"Regenerative Energiequellen wie Wind\\, Sonne und Biokraft helfen dir\\, das Ölzeitalter zu verlassen. Mit modernen Technologien und intelligenten Maschinen machst du dich auf in die Zukunft.\n"..
|
"Regenerative Energiequellen wie Wind\\, Sonne und Biokraft helfen dir\\, das Ölzeitalter zu verlassen. Mit modernen Technologien und intelligenten Maschinen machst du dich auf in die Zukunft.\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
@ -1985,7 +2001,48 @@ techage.manual_DE.aText = {
|
|||||||
"\n"..
|
"\n"..
|
||||||
"\n",
|
"\n",
|
||||||
"",
|
"",
|
||||||
"",
|
"Kernfusion bedeutet das Verschmelzen zweier Atomkerne. Dabei können\\, je nach Reaktion\\, große Mengen von Energie freigesetzt werden. Kernfusionen\\, bei denen Energie frei wird\\, laufen in Form von Kettenreaktionen ab. Sie sind die Quelle der Energie der Sterne\\, zum Beispiel auch unserer Sonne. Ein Fusionsreaktor wandelt die Energie\\, die bei einer kontrollierten Kernfusion frei wird\\, in elektrischen Strom um.\n"..
|
||||||
|
"\n"..
|
||||||
|
"*Wie funktionieren ein Fusionsreaktor?*\n"..
|
||||||
|
"\n"..
|
||||||
|
"Ein Fusionsreaktor funktioniert nach dem klassischen Prinzip eines Wärmekraftwerks: Wasser wird erhitzt und treibt eine Dampfturbine an\\, deren Bewegungsenergie von einem Generator in Strom gewandelt wird.\n"..
|
||||||
|
"\n"..
|
||||||
|
"Ein Fusionskraftwerk benötigt zunächst eine hohe Menge an Energie\\, da ein Plasma erzeugt werden muss. „Plasma“ nennt man den vierten Zustand von Stoffen\\, nach fest\\, flüssig und gasförmig. Dafür wird viel Strom benötigt. Erst durch diese extreme Energiekonzentration zündet die Fusionsreaktion und mit der abgegebenen Wärme wird über den Wärmetauscher Strom erzeugt. Der Generator liefert dann 800 ku an Strom.\n"..
|
||||||
|
"\n"..
|
||||||
|
"Der Plan rechts zeigt einen Schnitt durch den Fusionsreaktor.\n"..
|
||||||
|
"\n"..
|
||||||
|
"Für den Betrieb des Fusionsreaktors werden 60 Erfahrungspunkte benötigt. Der Fusionsreaktur muss komplett in einem Forceload Block Bereich aufgebaut werden.\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n",
|
||||||
|
"Für den Aufbau des Fusionsreaktor werden insgesamt 60 TA5 Fusionreaktor Magnete benötigt. Diese bilden den Ring\\, in dem sich das Plasma bildet. Der TA5 Fusionsreaktor Magnete benötigt Strom und hat zwei Anschlüsse für die Kühlung.\n"..
|
||||||
|
"\n"..
|
||||||
|
"Es gibt zwei Typen von Magneten\\, so dass auch alle Seiten des Magnets\\, die zum Plasmaring zeigen\\, mit einem Hitzeschild geschützt werden können.\n"..
|
||||||
|
"\n"..
|
||||||
|
"Bei den Eckmagneten auf der Innenseite des Rings ist jeweils eine Anschlussseite verdeckt (Strom oder Kühlung) und kann daher nicht angeschlossen werden. Dies ist technisch nicht machbar und hat daher keinen Einfluß auf die Funktion des Fusionsreaktor. \n"..
|
||||||
|
"\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n",
|
||||||
|
"Die Pumpe wird benötigt\\, um den Kühlkreislauf mit Isobutan zu füllen. Es werden ca. 350 Einheiten Isobutan benötigt.\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n",
|
||||||
|
"Der TA5 Wärmetauscher wird benötigt\\, um die im Fusionsreaktor erzeugte Hitze zuerst in Dampf und dann in Strom umzuwandeln. Der Wärmetauscher selbst benötigt dazu 5 ku Strom. Der Aufbau gleicht dem Wärmetauscher des Energiespeichers aus TA4.\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n",
|
||||||
|
"Über den TA5 Fusionreaktor Controller wird der Fusionreaktors eingeschaltet. Dabei muss zuerst die Kühlung/Wärmetauscher und dann der Controller eingeschaltet werden. Es dauert ca. 2 min\\, bis der Reaktor in Gang kommt und Strom liefert. Der Fusionreaktor und damit der Controller benötigt 400 ku an Strom\\, um das Plasma aufrecht zu erhalten.\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n",
|
||||||
|
"Der komplette Reaktor muss mit einer Hülle umgeben werden\\, die den enormen Druck\\, den die Magnete auf das Plasma ausüben\\, abfängt und die Umgebung vor Strahlung schützt. Ohne diese Hülle kann der Reaktor nicht gestartet werden. Mit der TechAge Kelle können auch Stromkabel und Kühlleitungen des Fusionreaktors in die Hülle integriert werden.\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n",
|
||||||
|
"Der Kern muss in der Mitte des Reaktors sitzen. Siehe Abbildung unter \"TA5 Fusionsreaktor\". Auch hierfür wird die TechAge Kelle benötigt.\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
@ -2198,6 +2255,7 @@ techage.manual_DE.aItemName = {
|
|||||||
"ta3_programmer",
|
"ta3_programmer",
|
||||||
"ta3_trowel",
|
"ta3_trowel",
|
||||||
"ta3_drill_pipe_wrench",
|
"ta3_drill_pipe_wrench",
|
||||||
|
"ta3_screwdriver",
|
||||||
"techage_ta4",
|
"techage_ta4",
|
||||||
"",
|
"",
|
||||||
"ta4_windturbine",
|
"ta4_windturbine",
|
||||||
@ -2289,6 +2347,12 @@ techage.manual_DE.aItemName = {
|
|||||||
"techage_ta5",
|
"techage_ta5",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
|
"ta5_magnet",
|
||||||
|
"ta5_pump",
|
||||||
|
"",
|
||||||
|
"ta5_fr_controller",
|
||||||
|
"ta5_fr_shell",
|
||||||
|
"ta5_fr_nucleus",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
@ -2446,6 +2510,7 @@ techage.manual_DE.aPlanTable = {
|
|||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
|
"",
|
||||||
"ta4_windturbine",
|
"ta4_windturbine",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
@ -2535,6 +2600,12 @@ techage.manual_DE.aPlanTable = {
|
|||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
|
"ta5_fusion_reactor",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"ta5_heatexchanger",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
@ -2552,3 +2623,4 @@ techage.manual_DE.aPlanTable = {
|
|||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,6 +139,7 @@ techage.manual_EN.aTitel = {
|
|||||||
"3,TechAge Programmer",
|
"3,TechAge Programmer",
|
||||||
"3,TechAge Trowel / Trowel",
|
"3,TechAge Trowel / Trowel",
|
||||||
"3,TA3 drill pipe wrench",
|
"3,TA3 drill pipe wrench",
|
||||||
|
"3,Techage Screwdriver",
|
||||||
"1,TA4: Present",
|
"1,TA4: Present",
|
||||||
"2,Wind Turbine",
|
"2,Wind Turbine",
|
||||||
"3,TA4 Wind Turbine",
|
"3,TA4 Wind Turbine",
|
||||||
@ -229,7 +230,13 @@ techage.manual_EN.aTitel = {
|
|||||||
"3,TA4 Recycler",
|
"3,TA4 Recycler",
|
||||||
"1,TA5: Future",
|
"1,TA5: Future",
|
||||||
"2,Energy Sources",
|
"2,Energy Sources",
|
||||||
"3,TA5 Fusion Reactor (planned)",
|
"3,TA5 Fusion Reactor",
|
||||||
|
"4,TA5 Fusion Reactor Magnet",
|
||||||
|
"4,TA5 Pump",
|
||||||
|
"4,TA5 Heat Exchanger",
|
||||||
|
"4,TA5 Fusion Reactor Controller",
|
||||||
|
"4,TA5 Fusion Reactor Shell",
|
||||||
|
"4,TA5 Fusion Reactor Core",
|
||||||
"2,Energy Storage",
|
"2,Energy Storage",
|
||||||
"3,TA5 Hybrid Storage (planned)",
|
"3,TA5 Hybrid Storage (planned)",
|
||||||
"2,Logic blocks",
|
"2,Logic blocks",
|
||||||
@ -1266,6 +1273,15 @@ techage.manual_EN.aText = {
|
|||||||
"\n"..
|
"\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"\n",
|
"\n",
|
||||||
|
"The Techage Screwdriver serves as a replacement for the normal screwdriver. It has the following functions:\n"..
|
||||||
|
"\n"..
|
||||||
|
" - Left click: turn the block to the left\n"..
|
||||||
|
" - Right click: turn the visible side of the block upwards\n"..
|
||||||
|
" - Shift + left click: save the alignment of the clicked block\n"..
|
||||||
|
" - Shift + right click: apply the saved alignment to the clicked block\n"..
|
||||||
|
"\n"..
|
||||||
|
" \n"..
|
||||||
|
"\n",
|
||||||
"Renewable energy sources such as wind\\, sun and biofuels help you to leave the oil age. With modern technologies and intelligent machines you set out into the future.\n"..
|
"Renewable energy sources such as wind\\, sun and biofuels help you to leave the oil age. With modern technologies and intelligent machines you set out into the future.\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
"\n"..
|
"\n"..
|
||||||
@ -1982,7 +1998,48 @@ techage.manual_EN.aText = {
|
|||||||
"\n"..
|
"\n"..
|
||||||
"\n",
|
"\n",
|
||||||
"",
|
"",
|
||||||
"",
|
"Nuclear fusion means the fusing of two atomic nuclei. Depending on the reaction\\, large amounts of energy can be released. Nuclear fusions\\, in which energy is released\\, take place in the form of chain reactions. They are the source of the energy of the stars\\, including our sun\\, for example. A fusion reactor converts the energy released during controlled nuclear fusion into electricity.\n"..
|
||||||
|
"\n"..
|
||||||
|
"*How do fusion reactors work?*\n"..
|
||||||
|
"\n"..
|
||||||
|
"A fusion reactor works according to the classic principle of a thermal power plant: water is heated and drives a steam turbine\\, whose kinetic energy is converted into electricity by a generator.\n"..
|
||||||
|
"\n"..
|
||||||
|
"A fusion power plant initially requires a large amount of energy\\, since a plasma has to be generated. \"Plasma\" is the name given to the fourth state of matter\\, after solid\\, liquid and gaseous. This requires a lot of electricity. Only through this extreme concentration of energy does the fusion reaction ignite and the heat given off is used to generate electricity via the heat exchanger. The generator then delivers 800 ku of electricity.\n"..
|
||||||
|
"\n"..
|
||||||
|
"The plan on the right shows a section through the fusion reactor.\n"..
|
||||||
|
"\n"..
|
||||||
|
"60 experience points are required to operate the fusion reactor. The fusion reactor must be built entirely in a forceload block area.\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n",
|
||||||
|
"A total of 60 TA5 Fusion Reactor Magnets are required to set up the fusion reactor. These form the ring in which the plasma forms. The TA5 Fusion Reactor Magnets requires power and has two ports for cooling.\n"..
|
||||||
|
"\n"..
|
||||||
|
"There are two types of magnets\\, so all sides of the magnet that face the plasma ring can also be protected with a heat shield.\n"..
|
||||||
|
"\n"..
|
||||||
|
"With the corner magnets on the inside of the ring\\, one connection side is covered (power or cooling) and can therefore not be connected. This is technically not feasible and therefore has no influence on the function of the fusion reactor. \n"..
|
||||||
|
"\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n",
|
||||||
|
"The pump is required to fill the cooling circuit with isobutane. About 350 units of isobutane are required.\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n",
|
||||||
|
"The TA5 Heat Exchanger is required to convert the heat generated in the fusion reactor first to steam and then to electricity. The Heat Exchanger itself requires 5 ku electricity. The structure is similar to the Heat Exchanger of the energy store from TA4.\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n",
|
||||||
|
"The fusion reactor is switched on via the TA5 Fusion Reactor Controller. The cooling/Heat Exchanger must be switched on first and then the controller. It takes about 2 minutes for the reactor to start up and supply electricity. The fusion reactor and thus the controller requires 400 ku of electricity to maintain the plasma.\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n",
|
||||||
|
"The entire reactor must be surrounded by a shell that absorbs the enormous pressure that the magnets exert on the plasma and protects the environment from radiation. Without this shell\\, the reactor cannot be started. With the TechAge Trowel\\, power cables and cooling pipes of the fusion reactor can also be integrated into the shell.\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n",
|
||||||
|
"The core must sit in the center of the reactor. See illustration under \"TA5 Fusion Reactor\". The TechAge Trowel is also required for this.\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n"..
|
||||||
|
"\n",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
@ -2193,6 +2250,7 @@ techage.manual_EN.aItemName = {
|
|||||||
"ta3_programmer",
|
"ta3_programmer",
|
||||||
"ta3_trowel",
|
"ta3_trowel",
|
||||||
"ta3_drill_pipe_wrench",
|
"ta3_drill_pipe_wrench",
|
||||||
|
"ta3_screwdriver",
|
||||||
"techage_ta4",
|
"techage_ta4",
|
||||||
"",
|
"",
|
||||||
"ta4_windturbine",
|
"ta4_windturbine",
|
||||||
@ -2284,6 +2342,12 @@ techage.manual_EN.aItemName = {
|
|||||||
"techage_ta5",
|
"techage_ta5",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
|
"ta5_magnet",
|
||||||
|
"ta5_pump",
|
||||||
|
"",
|
||||||
|
"ta5_fr_controller",
|
||||||
|
"ta5_fr_shell",
|
||||||
|
"ta5_fr_nucleus",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
@ -2440,6 +2504,7 @@ techage.manual_EN.aPlanTable = {
|
|||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
|
"",
|
||||||
"ta4_windturbine",
|
"ta4_windturbine",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
@ -2529,6 +2594,12 @@ techage.manual_EN.aPlanTable = {
|
|||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
|
"ta5_fusion_reactor",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"ta5_heatexchanger",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
@ -2545,3 +2616,4 @@ techage.manual_EN.aPlanTable = {
|
|||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,9 +25,11 @@ local IMG42 = {"", "techage_ta4_solar.png"}
|
|||||||
local IMG43 = {"", "techage_reactor_inv.png"}
|
local IMG43 = {"", "techage_reactor_inv.png"}
|
||||||
local IMG44 = {"", "techage_ta4_filter.png"}
|
local IMG44 = {"", "techage_ta4_filter.png"}
|
||||||
local IMG45 = {"10x10", "techage_collider_plan.png"}
|
local IMG45 = {"10x10", "techage_collider_plan.png"}
|
||||||
|
local IMG46 = {"5x4", "techage_fusion_reactor.png"}
|
||||||
|
|
||||||
local TOP_V = {"top_view", ""}
|
local TOP_V = {"top_view", ""}
|
||||||
local SIDEV = {"side_view", ""}
|
local SIDEV = {"side_view", ""}
|
||||||
|
local SECTV = {"sectional_view", ""}
|
||||||
|
|
||||||
--
|
--
|
||||||
-- TA1: Coal Pile
|
-- TA1: Coal Pile
|
||||||
@ -513,6 +515,52 @@ techage.ConstructionPlans["ta5_teleport"] = {
|
|||||||
{false, TANK4, PIPEH, TELEP, false, ARROW, false, TELEP, PUMP4, TANK4, false},
|
{false, TANK4, PIPEH, TELEP, false, ARROW, false, TELEP, PUMP4, TANK4, false},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
-- TA5 Fusion Reactor
|
||||||
|
--
|
||||||
|
local SHELL = {"techage_reactor_shell.png", "techage:ta5_fr_shell"}
|
||||||
|
local NUCLS = {"techage_reactor_shell.png^techage_collider_detector_core.png", "techage:ta5_fr_nucleus"}
|
||||||
|
local MAGN1 = {"techage_collider_magnet.png^techage_steel_tiles_top3.png", "techage:ta5_magnet1"}
|
||||||
|
local MAGN2 = {"techage_collider_magnet.png^techage_steel_tiles_top3.png^[transformR90]", "techage:ta5_magnet1"}
|
||||||
|
local MAGN3 = {"techage_collider_magnet.png^techage_steel_tiles_top3.png^[transformR180]", "techage:ta5_magnet1"}
|
||||||
|
local MAGN4 = {"techage_collider_magnet.png^techage_steel_tiles_top3.png^[transformR270]", "techage:ta5_magnet1"}
|
||||||
|
|
||||||
|
techage.ConstructionPlans["ta5_fusion_reactor"] = {
|
||||||
|
{false, false, false, false, false, false, IMG46, false, false, false, false},
|
||||||
|
{false, false, false, false, false, false, false, false, false, false, false},
|
||||||
|
{false, false, false, false, false, false, false, false, false, false, false},
|
||||||
|
{false, false, false, false, false, false, false, false, false, false, false},
|
||||||
|
{false, SECTV, false, false, false, false, false, false, false, false, false},
|
||||||
|
{false, false, SHELL, SHELL, SHELL, false, SHELL, SHELL, SHELL, false, false},
|
||||||
|
{false, SHELL, SHELL, MAGN3, SHELL, SHELL, SHELL, MAGN3, SHELL, SHELL, false},
|
||||||
|
{false, SHELL, MAGN4, false, MAGN2, NUCLS, MAGN4, false, MAGN2, SHELL, false},
|
||||||
|
{false, SHELL, SHELL, MAGN1, SHELL, SHELL, SHELL, MAGN1, SHELL, SHELL, false},
|
||||||
|
{false, false, SHELL, SHELL, SHELL, false, SHELL, SHELL, SHELL, false, false},
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
-- TA5 Heat Exchanger
|
||||||
|
--
|
||||||
|
local PIPEG = {"techage_ta5_gaspipe.png", "techage:ta5_pipe1S"}
|
||||||
|
local PIPEB = {"techage_ta5_gaspipeB.png", "techage:ta5_pipe2S"}
|
||||||
|
local HEX51 = {"techage_filling_ta4.png^techage_frameT_ta5.png^techage_appl_ribsT.png", "techage:ta5_heatexchanger3"}
|
||||||
|
local HEX52 = {"techage_filling_ta4.png^techage_frameM_ta4.png^techage_appl_ribsB.png", "techage:ta5_heatexchanger2"}
|
||||||
|
local HEX53 = {"techage_filling_ta4.png^techage_frameB_ta4.png^techage_appl_hole_electric.png", "techage:ta5_heatexchanger1"}
|
||||||
|
local TURB5 = {"techage_filling_ta4.png^techage_appl_turbine.png^techage_frame_ta5.png", "techage:ta5_turbine"}
|
||||||
|
local GENE5 = {"techage_filling_ta4.png^techage_frame_ta5.png^techage_appl_generator.png^[transformFX]", "techage:ta5_generator"}
|
||||||
|
|
||||||
|
techage.ConstructionPlans["ta5_heatexchanger"] = {
|
||||||
|
{false, false, false, false, SIDEV, false, false, false},
|
||||||
|
{false, false, false, false, false, false, false, false},
|
||||||
|
{false, false, false, false, false, false, false, false},
|
||||||
|
{false, false, PIPEG, PIPEG, HEX51, PIPEH, PN270, false},
|
||||||
|
{false, false, false, false, HEX52, false, PIPEV, false},
|
||||||
|
{false, false, PIPEB, PIPEB, HEX53, PIPEH, TURB5, GENE5},
|
||||||
|
{false, false, false, false, false, false, false, false},
|
||||||
|
{false, false, false, false, false, false, false, false},
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function techage.add_manual_plans(table_with_plans)
|
function techage.add_manual_plans(table_with_plans)
|
||||||
for name, tbl in pairs(table_with_plans) do
|
for name, tbl in pairs(table_with_plans) do
|
||||||
techage.ConstructionPlans[name] = tbl
|
techage.ConstructionPlans[name] = tbl
|
||||||
|
283
techage/fusion_reactor/controller.lua
Normal file
@ -0,0 +1,283 @@
|
|||||||
|
--[[
|
||||||
|
|
||||||
|
TechAge
|
||||||
|
=======
|
||||||
|
|
||||||
|
Copyright (C) 2019-2022 Joachim Stolberg
|
||||||
|
|
||||||
|
AGPL v3
|
||||||
|
See LICENSE.txt for more information
|
||||||
|
|
||||||
|
TA5 Fusion Reactor Controller
|
||||||
|
|
||||||
|
]]--
|
||||||
|
|
||||||
|
-- for lazy programmers
|
||||||
|
local S2P = minetest.string_to_pos
|
||||||
|
local P2S = minetest.pos_to_string
|
||||||
|
local M = minetest.get_meta
|
||||||
|
local S = techage.S
|
||||||
|
|
||||||
|
local Cable = techage.ElectricCable
|
||||||
|
local sched = techage.scheduler
|
||||||
|
local power = networks.power
|
||||||
|
local control = networks.control
|
||||||
|
|
||||||
|
local CYCLE_TIME = 2
|
||||||
|
local STANDBY_TICKS = 0
|
||||||
|
local COUNTDOWN_TICKS = 1
|
||||||
|
local PWR_NEEDED = 400
|
||||||
|
local EXPECTED_PLASMA_NUM = 56
|
||||||
|
local EXPECTED_SHELL_NUM = 56
|
||||||
|
local EXPECTED_MAGNET_NUM = 56
|
||||||
|
local CALL_RATE1 = 16 -- 2s * 16 = 32s
|
||||||
|
local CALL_RATE2 = 8 -- 2s * 8 = 16s
|
||||||
|
local DESCRIPTION = S("TA5 Fusion Reactor Controller")
|
||||||
|
local EX_POINTS = 60
|
||||||
|
|
||||||
|
local function count_trues(t)
|
||||||
|
local cnt = 0
|
||||||
|
for _,v in ipairs(t) do
|
||||||
|
if v then
|
||||||
|
cnt = cnt + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return cnt
|
||||||
|
end
|
||||||
|
|
||||||
|
local function nucleus(t)
|
||||||
|
if #t == 4 then
|
||||||
|
if vector.equals(t[1], t[2]) and vector.equals(t[3], t[4]) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return S("Nucleus detection error")
|
||||||
|
end
|
||||||
|
|
||||||
|
local tSched = {}
|
||||||
|
|
||||||
|
sched.register(tSched, CALL_RATE1, 0, function(pos, outdir)
|
||||||
|
local resp = control.request(pos, Cable, outdir, "con", "connect")
|
||||||
|
local cnt = count_trues(resp)
|
||||||
|
if cnt ~= EXPECTED_MAGNET_NUM then
|
||||||
|
return S("Magnet detection error\n(@1% found / 100% expected)", math.floor(cnt* 100 / EXPECTED_MAGNET_NUM))
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end)
|
||||||
|
|
||||||
|
sched.register(tSched, CALL_RATE1, 1, function(pos, outdir)
|
||||||
|
local resp = control.request(pos, Cable, outdir, "con", "test_plasma")
|
||||||
|
local cnt = count_trues(resp)
|
||||||
|
if cnt ~= EXPECTED_PLASMA_NUM then
|
||||||
|
return S("Plasma ring shape error")
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end)
|
||||||
|
|
||||||
|
sched.register(tSched, CALL_RATE1, 2, function(pos, outdir)
|
||||||
|
local resp = control.request(pos, Cable, outdir, "con", "test_shell")
|
||||||
|
local cnt = count_trues(resp)
|
||||||
|
if cnt ~= EXPECTED_SHELL_NUM then
|
||||||
|
return S("Shell shape error\n(@1% found / 100% expected)", math.floor(cnt* 100 / EXPECTED_SHELL_NUM))
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end)
|
||||||
|
|
||||||
|
sched.register(tSched, CALL_RATE1, 3, function(pos, outdir)
|
||||||
|
local resp = control.request(pos, Cable, outdir, "con", "test_nucleus")
|
||||||
|
return nucleus(resp)
|
||||||
|
end)
|
||||||
|
|
||||||
|
sched.register(tSched, CALL_RATE2, 4, function(pos, outdir)
|
||||||
|
local resp = control.request(pos, Cable, outdir, "con", "inc_power")
|
||||||
|
local cnt = count_trues(resp)
|
||||||
|
--print("inc_power", cnt)
|
||||||
|
if cnt < 52 then
|
||||||
|
return S("Cooling failed")
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end)
|
||||||
|
|
||||||
|
local function can_start(pos, nvm)
|
||||||
|
local outdir = networks.side_to_outdir(pos, "L")
|
||||||
|
if not power.power_available(pos, Cable, outdir) then
|
||||||
|
return S("No power")
|
||||||
|
end
|
||||||
|
outdir = networks.side_to_outdir(pos, "R")
|
||||||
|
control.request(pos, Cable, outdir, "con", "rst_power")
|
||||||
|
for i = 0,4 do
|
||||||
|
local res = tSched[i](pos, outdir)
|
||||||
|
if res ~= true then return res end
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
local function start_node(pos, nvm)
|
||||||
|
sched.init(pos)
|
||||||
|
local outdir = networks.side_to_outdir(pos, "R")
|
||||||
|
control.send(pos, Cable, outdir, "con", "on")
|
||||||
|
sched.init(pos)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function stop_node(pos, nvm)
|
||||||
|
local outdir = networks.side_to_outdir(pos, "R")
|
||||||
|
control.send(pos, Cable, outdir, "con", "off")
|
||||||
|
end
|
||||||
|
|
||||||
|
local function formspec(self, pos, nvm)
|
||||||
|
return "size[5,3]"..
|
||||||
|
"box[0,-0.1;4.8,0.5;#c6e8ff]" ..
|
||||||
|
"label[0.2,-0.1;" .. minetest.colorize( "#000000", DESCRIPTION) .. "]" ..
|
||||||
|
"image_button[2,1.5;1,1;".. self:get_state_button_image(nvm) ..";state_button;]"..
|
||||||
|
"tooltip[2,1.5;1,1;"..self:get_state_tooltip(nvm).."]"
|
||||||
|
end
|
||||||
|
|
||||||
|
local State = techage.NodeStates:new({
|
||||||
|
node_name_passive = "techage:ta5_fr_controller_pas",
|
||||||
|
node_name_active = "techage:ta5_fr_controller_act",
|
||||||
|
cycle_time = CYCLE_TIME,
|
||||||
|
infotext_name = DESCRIPTION,
|
||||||
|
standby_ticks = STANDBY_TICKS,
|
||||||
|
can_start = can_start,
|
||||||
|
start_node = start_node,
|
||||||
|
stop_node = stop_node,
|
||||||
|
formspec_func = formspec,
|
||||||
|
})
|
||||||
|
|
||||||
|
local function after_place_node(pos, placer, itemstack)
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
local meta = M(pos)
|
||||||
|
local own_num = techage.add_node(pos, "techage:ta5_fr_controller_pas")
|
||||||
|
State:node_init(pos, nvm, own_num)
|
||||||
|
meta:set_string("owner", placer:get_player_name())
|
||||||
|
Cable:after_place_node(pos)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function consume_power(pos, nvm, outdir)
|
||||||
|
if techage.needs_power(nvm) then
|
||||||
|
local taken = power.consume_power(pos, Cable, outdir, PWR_NEEDED)
|
||||||
|
if techage.is_running(nvm) then
|
||||||
|
if taken < PWR_NEEDED then
|
||||||
|
State:nopower(pos, nvm, "No power")
|
||||||
|
stop_node(pos, nvm)
|
||||||
|
else
|
||||||
|
return true -- keep running
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function node_timer(pos)
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
local outdir = networks.side_to_outdir(pos, "L")
|
||||||
|
if consume_power(pos, nvm, outdir) then
|
||||||
|
local resp = sched.get(pos, tSched, function()
|
||||||
|
return true end)(pos, networks.Flip[outdir])
|
||||||
|
if resp ~= true then
|
||||||
|
State:fault(pos, nvm, resp)
|
||||||
|
stop_node(pos, nvm)
|
||||||
|
else
|
||||||
|
State:keep_running(pos, nvm, COUNTDOWN_TICKS)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return State:is_active(nvm)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function after_dig_node(pos, oldnode, oldmetadata)
|
||||||
|
Cable:after_dig_node(pos)
|
||||||
|
techage.remove_node(pos, oldnode, oldmetadata)
|
||||||
|
techage.del_mem(pos)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_receive_fields(pos, formname, fields, player)
|
||||||
|
if minetest.is_protected(pos, player:get_player_name()) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if techage.get_expoints(player) >= EX_POINTS then
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
State:state_button_event(pos, nvm, fields)
|
||||||
|
--M(pos):set_string("formspec", formspec(State, pos, nvm))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_node("techage:ta5_fr_controller_pas", {
|
||||||
|
description = S("TA5 Fusion Reactor Controller"),
|
||||||
|
tiles = {
|
||||||
|
-- up, down, right, left, back, front
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta5_top.png^techage_appl_arrow.png",
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta4_bottom.png",
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta5.png^techage_appl_hole_electric.png",
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta5.png^techage_appl_hole_electric.png",
|
||||||
|
"techage_filling_ta4.png^techage_appl_plasma.png^techage_frame_ta5.png",
|
||||||
|
"techage_filling_ta4.png^techage_appl_plasma.png^techage_frame_ta5.png",
|
||||||
|
},
|
||||||
|
after_place_node = after_place_node,
|
||||||
|
on_timer = node_timer,
|
||||||
|
after_dig_node = after_dig_node,
|
||||||
|
on_receive_fields = on_receive_fields,
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {choppy=2, cracky=2, crumbly=2},
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = default.node_sound_metal_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("techage:ta5_fr_controller_act", {
|
||||||
|
description = S("TA5 Fusion Reactor Controller"),
|
||||||
|
tiles = {
|
||||||
|
-- up, down, right, left, back, front
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta5_top.png^techage_appl_arrow.png",
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta4_bottom.png",
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta5.png^techage_appl_hole_electric.png",
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta5.png^techage_appl_hole_electric.png",
|
||||||
|
{
|
||||||
|
image = "techage_filling4_ta4.png^techage_appl_plasma4.png^techage_frame4_ta5.png",
|
||||||
|
backface_culling = false,
|
||||||
|
animation = {
|
||||||
|
type = "vertical_frames",
|
||||||
|
aspect_w = 64,
|
||||||
|
aspect_h = 64,
|
||||||
|
length = 0.5,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
image = "techage_filling4_ta4.png^techage_appl_plasma4.png^techage_frame4_ta5.png",
|
||||||
|
backface_culling = false,
|
||||||
|
animation = {
|
||||||
|
type = "vertical_frames",
|
||||||
|
aspect_w = 64,
|
||||||
|
aspect_h = 64,
|
||||||
|
length = 0.5,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
after_place_node = after_place_node,
|
||||||
|
on_timer = node_timer,
|
||||||
|
after_dig_node = after_dig_node,
|
||||||
|
on_receive_fields = on_receive_fields,
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {choppy=2, cracky=2, crumbly=2, not_in_creative_inventory=1},
|
||||||
|
drop = "",
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = default.node_sound_metal_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
techage.register_node({"techage:ta5_fr_controller_pas", "techage:ta5_fr_controller_act"}, {
|
||||||
|
on_recv_message = function(pos, src, topic, payload)
|
||||||
|
return State:on_receive_message(pos, topic, payload)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
power.register_nodes({"techage:ta5_fr_controller_pas", "techage:ta5_fr_controller_act"}, Cable, "con", {"L", "R"})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "techage:ta5_fr_controller_pas",
|
||||||
|
recipe = {
|
||||||
|
{'techage:aluminum', 'basic_materials:gold_wire', 'default:steel_ingot'},
|
||||||
|
{'techage:electric_cableS', 'techage:ta5_aichip2', 'techage:electric_cableS'},
|
||||||
|
{'default:steel_ingot', 'default:diamond', 'techage:aluminum'},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
331
techage/fusion_reactor/gas_pipe.lua
Normal file
@ -0,0 +1,331 @@
|
|||||||
|
--[[
|
||||||
|
|
||||||
|
TechAge
|
||||||
|
=======
|
||||||
|
|
||||||
|
Copyright (C) 2019-2022 Joachim Stolberg
|
||||||
|
|
||||||
|
AGPL v3
|
||||||
|
See LICENSE.txt for more information
|
||||||
|
|
||||||
|
TA5 Gas Pipes
|
||||||
|
|
||||||
|
]]--
|
||||||
|
|
||||||
|
-- for lazy programmers
|
||||||
|
local S2P = minetest.string_to_pos
|
||||||
|
local P2S = minetest.pos_to_string
|
||||||
|
local M = minetest.get_meta
|
||||||
|
local S = techage.S
|
||||||
|
|
||||||
|
local MAX_PIPE_LENGHT = 100
|
||||||
|
|
||||||
|
local liquid = networks.liquid
|
||||||
|
|
||||||
|
local Pipe = tubelib2.Tube:new({
|
||||||
|
dirs_to_check = {1,2,3,4,5,6},
|
||||||
|
max_tube_length = MAX_PIPE_LENGHT,
|
||||||
|
show_infotext = false,
|
||||||
|
force_to_use_tubes = false,
|
||||||
|
tube_type = "pipe3",
|
||||||
|
primary_node_names = {
|
||||||
|
"techage:ta5_pipe1S", "techage:ta5_pipe1A",
|
||||||
|
"techage:ta5_pipe2S", "techage:ta5_pipe2A",
|
||||||
|
},
|
||||||
|
secondary_node_names = {},
|
||||||
|
after_place_tube = function(pos, param2, tube_type, num_tubes)
|
||||||
|
local name = minetest.get_node(pos).name
|
||||||
|
if not networks.hidden_name(pos) then
|
||||||
|
local name = minetest.get_node(pos).name
|
||||||
|
if name == "techage:ta5_pipe1S" or name == "techage:ta5_pipe1A" then
|
||||||
|
minetest.swap_node(pos, {name = "techage:ta5_pipe1"..tube_type, param2 = param2 % 32})
|
||||||
|
else
|
||||||
|
minetest.swap_node(pos, {name = "techage:ta5_pipe2"..tube_type, param2 = param2 % 32})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
M(pos):set_int("netw_param2", param2)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Enable hidden cables
|
||||||
|
networks.use_metadata(Pipe)
|
||||||
|
|
||||||
|
-- Use global callback instead of node related functions
|
||||||
|
Pipe:register_on_tube_update2(function(pos, outdir, tlib2, node)
|
||||||
|
liquid.update_network(pos, outdir, tlib2, node)
|
||||||
|
end)
|
||||||
|
|
||||||
|
minetest.register_node("techage:ta5_pipe1S", {
|
||||||
|
description = S("TA5 Pipe"),
|
||||||
|
tiles = {
|
||||||
|
"techage_ta5_gaspipe.png^[transformR90^[colorize:#000080:160",
|
||||||
|
"techage_ta5_gaspipe.png^[transformR90^[colorize:#000080:160",
|
||||||
|
"techage_ta5_gaspipe.png^[colorize:#000080:160",
|
||||||
|
"techage_ta5_gaspipe.png^[colorize:#000080:160",
|
||||||
|
"techage_ta5_gaspipe_hole2.png^[colorize:#000080:160",
|
||||||
|
"techage_ta5_gaspipe_hole2.png^[colorize:#000080:160",
|
||||||
|
},
|
||||||
|
|
||||||
|
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||||
|
if not Pipe:after_place_tube(pos, placer, pointed_thing) then
|
||||||
|
minetest.remove_node(pos)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end,
|
||||||
|
|
||||||
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||||
|
Pipe:after_dig_tube(pos, oldnode, oldmetadata)
|
||||||
|
end,
|
||||||
|
|
||||||
|
paramtype2 = "facedir", -- important!
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-1/16, -1/16, -8/16, 1/16, 1/16, 8/16},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
on_rotate = screwdriver.disallow, -- important!
|
||||||
|
paramtype = "light",
|
||||||
|
use_texture_alpha = techage.CLIP,
|
||||||
|
sunlight_propagates = true,
|
||||||
|
is_ground_content = false,
|
||||||
|
groups = {crumbly = 2, cracky = 2, snappy = 2, techage_trowel = 1},
|
||||||
|
sounds = default.node_sound_metal_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("techage:ta5_pipe1A", {
|
||||||
|
description = S("TA5 Pipe"),
|
||||||
|
tiles = {
|
||||||
|
"techage_ta5_gaspipe_knee2.png^[colorize:#000080:160",
|
||||||
|
"techage_ta5_gaspipe_hole2.png^[transformR180^[colorize:#000080:160",
|
||||||
|
"techage_ta5_gaspipe_knee.png^[transformR270^[colorize:#000080:160",
|
||||||
|
"techage_ta5_gaspipe_knee.png^[colorize:#000080:160",
|
||||||
|
"techage_ta5_gaspipe_knee2.png^[colorize:#000080:160",
|
||||||
|
"techage_ta5_gaspipe_hole2.png^[colorize:#000080:160",
|
||||||
|
},
|
||||||
|
|
||||||
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||||
|
Pipe:after_dig_tube(pos, oldnode, oldmetadata)
|
||||||
|
end,
|
||||||
|
|
||||||
|
paramtype2 = "facedir", -- important!
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-1/16, -8/16, -1/16, 1/16, 1/16, 1/16},
|
||||||
|
{-2/16, -0.5, -2/16, 2/16, -13/32, 2/16},
|
||||||
|
{-1/16, -1/16, -8/16, 1/16, 1/16, -1/16},
|
||||||
|
{-2/16, -2/16, -0.5, 2/16, 2/16, -13/32},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
on_rotate = screwdriver.disallow, -- important!
|
||||||
|
paramtype = "light",
|
||||||
|
use_texture_alpha = techage.CLIP,
|
||||||
|
sunlight_propagates = true,
|
||||||
|
is_ground_content = false,
|
||||||
|
groups = {crumbly = 2, cracky = 2, snappy = 2,
|
||||||
|
not_in_creative_inventory=1, techage_trowel = 1},
|
||||||
|
sounds = default.node_sound_metal_defaults(),
|
||||||
|
drop = "techage:ta5_pipe1S",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("techage:ta5_pipe2S", {
|
||||||
|
description = S("TA5 Pipe"),
|
||||||
|
tiles = {
|
||||||
|
"techage_ta5_gaspipe.png^[transformR90^[colorize:#008000:160",
|
||||||
|
"techage_ta5_gaspipe.png^[transformR90^[colorize:#008000:160",
|
||||||
|
"techage_ta5_gaspipe.png^[colorize:#008000:160",
|
||||||
|
"techage_ta5_gaspipe.png^[colorize:#008000:160",
|
||||||
|
"techage_ta5_gaspipe_hole2.png^[colorize:#008000:160",
|
||||||
|
"techage_ta5_gaspipe_hole2.png^[colorize:#008000:160",
|
||||||
|
},
|
||||||
|
|
||||||
|
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||||
|
if not Pipe:after_place_tube(pos, placer, pointed_thing) then
|
||||||
|
minetest.remove_node(pos)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end,
|
||||||
|
|
||||||
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||||
|
Pipe:after_dig_tube(pos, oldnode, oldmetadata)
|
||||||
|
end,
|
||||||
|
|
||||||
|
paramtype2 = "facedir", -- important!
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-1/16, -1/16, -8/16, 1/16, 1/16, 8/16},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
on_rotate = screwdriver.disallow, -- important!
|
||||||
|
paramtype = "light",
|
||||||
|
use_texture_alpha = techage.CLIP,
|
||||||
|
sunlight_propagates = true,
|
||||||
|
is_ground_content = false,
|
||||||
|
groups = {crumbly = 2, cracky = 2, snappy = 2, techage_trowel = 1},
|
||||||
|
sounds = default.node_sound_metal_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("techage:ta5_pipe2A", {
|
||||||
|
description = S("TA5 Pipe"),
|
||||||
|
tiles = {
|
||||||
|
"techage_ta5_gaspipe_knee2.png^[colorize:#008000:160",
|
||||||
|
"techage_ta5_gaspipe_hole2.png^[transformR180^[colorize:#008000:160",
|
||||||
|
"techage_ta5_gaspipe_knee.png^[transformR270^[colorize:#008000:160",
|
||||||
|
"techage_ta5_gaspipe_knee.png^[colorize:#008000:160",
|
||||||
|
"techage_ta5_gaspipe_knee2.png^[colorize:#008000:160",
|
||||||
|
"techage_ta5_gaspipe_hole2.png^[colorize:#008000:160",
|
||||||
|
},
|
||||||
|
|
||||||
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||||
|
Pipe:after_dig_tube(pos, oldnode, oldmetadata)
|
||||||
|
end,
|
||||||
|
|
||||||
|
paramtype2 = "facedir", -- important!
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-1/16, -8/16, -1/16, 1/16, 1/16, 1/16},
|
||||||
|
{-2/16, -0.5, -2/16, 2/16, -13/32, 2/16},
|
||||||
|
{-1/16, -1/16, -8/16, 1/16, 1/16, -1/16},
|
||||||
|
{-2/16, -2/16, -0.5, 2/16, 2/16, -13/32},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
on_rotate = screwdriver.disallow, -- important!
|
||||||
|
paramtype = "light",
|
||||||
|
use_texture_alpha = techage.CLIP,
|
||||||
|
sunlight_propagates = true,
|
||||||
|
is_ground_content = false,
|
||||||
|
groups = {crumbly = 2, cracky = 2, snappy = 2,
|
||||||
|
not_in_creative_inventory=1, techage_trowel = 1},
|
||||||
|
sounds = default.node_sound_metal_defaults(),
|
||||||
|
drop = "techage:ta5_pipe2S",
|
||||||
|
})
|
||||||
|
|
||||||
|
local size1 = 1/16
|
||||||
|
local size2 = 2/16
|
||||||
|
local size3 = 13/32
|
||||||
|
local Boxes = {
|
||||||
|
{
|
||||||
|
{-size1, -size1, size1, size1, size1, 0.5 }, -- z+
|
||||||
|
{-size2, -size2, size3, size2, size2, 0.5 }, -- z+
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{-size1, -size1, -size1, 0.5, size1, size1}, -- x+
|
||||||
|
{ size3, -size2, -size2, 0.5, size2, size2}, -- x+
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{-size1, -size1, -0.5, size1, size1, size1}, -- z-
|
||||||
|
{-size2, -size2, -0.5, size2, size2, -size3}, -- z-
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{-0.5, -size1, -size1, size1, size1, size1}, -- x-
|
||||||
|
{-0.5, -size2, -size2, -size3, size2, size2}, -- x-
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{-size1, -0.5, -size1, size1, size1, size1}, -- y-
|
||||||
|
{-size2, -0.5, -size2, size2, -size3, size2}, -- y-
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{-size1, -size1, -size1, size1, 0.5, size1}, -- y+
|
||||||
|
{-size2, size3, -size2, size2, 0.5, size2}, -- y+
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
local names1 = networks.register_junction("techage:ta5_junctionpipe1", 1/8, Boxes, Pipe, {
|
||||||
|
description = S("TA5 Junction Pipe"),
|
||||||
|
tiles = {"techage_ta5_gaspipe_junction.png^[colorize:#000080:160"},
|
||||||
|
use_texture_alpha = techage.CLIP,
|
||||||
|
is_ground_content = false,
|
||||||
|
groups = {crumbly = 2, cracky = 2, snappy = 2, techage_trowel = 1},
|
||||||
|
sounds = default.node_sound_metal_defaults(),
|
||||||
|
|
||||||
|
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||||
|
local name = "techage:ta5_junctionpipe1" .. networks.junction_type(pos, Pipe)
|
||||||
|
minetest.swap_node(pos, {name = name, param2 = 0})
|
||||||
|
Pipe:after_place_node(pos)
|
||||||
|
end,
|
||||||
|
tubelib2_on_update2 = function(pos, dir1, tlib2, node)
|
||||||
|
if not networks.hidden_name(pos) then
|
||||||
|
local name = "techage:ta5_junctionpipe1" .. networks.junction_type(pos, Pipe)
|
||||||
|
minetest.swap_node(pos, {name = name, param2 = 0})
|
||||||
|
end
|
||||||
|
liquid.update_network(pos, 0, tlib2, node)
|
||||||
|
end,
|
||||||
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||||
|
Pipe:after_dig_node(pos)
|
||||||
|
end,
|
||||||
|
}, 25)
|
||||||
|
|
||||||
|
local names2 = networks.register_junction("techage:ta5_junctionpipe2", 1/8, Boxes, Pipe, {
|
||||||
|
description = S("TA5 Junction Pipe"),
|
||||||
|
tiles = {"techage_ta5_gaspipe_junction.png^[colorize:#008000:160"},
|
||||||
|
use_texture_alpha = techage.CLIP,
|
||||||
|
is_ground_content = false,
|
||||||
|
groups = {crumbly = 2, cracky = 2, snappy = 2, techage_trowel = 1},
|
||||||
|
sounds = default.node_sound_metal_defaults(),
|
||||||
|
|
||||||
|
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||||
|
local name = "techage:ta5_junctionpipe2" .. networks.junction_type(pos, Pipe)
|
||||||
|
minetest.swap_node(pos, {name = name, param2 = 0})
|
||||||
|
Pipe:after_place_node(pos)
|
||||||
|
end,
|
||||||
|
tubelib2_on_update2 = function(pos, dir1, tlib2, node)
|
||||||
|
if not networks.hidden_name(pos) then
|
||||||
|
local name = "techage:ta5_junctionpipe2" .. networks.junction_type(pos, Pipe)
|
||||||
|
minetest.swap_node(pos, {name = name, param2 = 0})
|
||||||
|
end
|
||||||
|
liquid.update_network(pos, 0, tlib2, node)
|
||||||
|
end,
|
||||||
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||||
|
Pipe:after_dig_node(pos)
|
||||||
|
end,
|
||||||
|
}, 25)
|
||||||
|
|
||||||
|
liquid.register_nodes(names1, Pipe, "junc")
|
||||||
|
liquid.register_nodes(names2, Pipe, "junc")
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "techage:ta5_pipe1S 6",
|
||||||
|
recipe = {
|
||||||
|
{'', '', "default:steel_ingot"},
|
||||||
|
{'', 'dye:blue', 'techage:ta4_carbon_fiber'},
|
||||||
|
{"", '', 'techage:aluminum'},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "techage:ta5_pipe2S 6",
|
||||||
|
recipe = {
|
||||||
|
{'', '', "default:steel_ingot"},
|
||||||
|
{'', 'dye:green', 'techage:ta4_carbon_fiber'},
|
||||||
|
{"", '', 'techage:aluminum'},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "techage:ta5_junctionpipe125 2",
|
||||||
|
recipe = {
|
||||||
|
{"", "techage:ta5_pipe1S", ""},
|
||||||
|
{"techage:ta5_pipe1S", "", "techage:ta5_pipe1S"},
|
||||||
|
{"", "techage:ta5_pipe1S", ""},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "techage:ta5_junctionpipe225 2",
|
||||||
|
recipe = {
|
||||||
|
{"", "techage:ta5_pipe2S", ""},
|
||||||
|
{"techage:ta5_pipe2S", "", "techage:ta5_pipe2S"},
|
||||||
|
{"", "techage:ta5_pipe2S", ""},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
techage.GasPipe = Pipe
|
204
techage/fusion_reactor/generator.lua
Normal file
@ -0,0 +1,204 @@
|
|||||||
|
--[[
|
||||||
|
|
||||||
|
TechAge
|
||||||
|
=======
|
||||||
|
|
||||||
|
Copyright (C) 2019-2022 Joachim Stolberg
|
||||||
|
|
||||||
|
AGPL v3
|
||||||
|
See LICENSE.txt for more information
|
||||||
|
|
||||||
|
TA5 Fusion Reactor Generator
|
||||||
|
]]--
|
||||||
|
|
||||||
|
-- for lazy programmers
|
||||||
|
local M = minetest.get_meta
|
||||||
|
local S = techage.S
|
||||||
|
|
||||||
|
local Cable = techage.ElectricCable
|
||||||
|
local power = networks.power
|
||||||
|
local control = networks.control
|
||||||
|
|
||||||
|
local CYCLE_TIME = 2
|
||||||
|
local PWR_PERF = 800
|
||||||
|
|
||||||
|
local function swap_node(pos, name)
|
||||||
|
local node = techage.get_node_lvm(pos)
|
||||||
|
if node.name == name then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
node.name = name
|
||||||
|
minetest.swap_node(pos, node)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function start_node(pos, nvm)
|
||||||
|
local meta = M(pos)
|
||||||
|
nvm.provided = 0
|
||||||
|
nvm.alive_cnt = 5
|
||||||
|
techage.evaluate_charge_termination(nvm, meta)
|
||||||
|
local outdir = meta:get_int("outdir")
|
||||||
|
power.start_storage_calc(pos, Cable, outdir)
|
||||||
|
swap_node(pos, "techage:ta5_generator_on")
|
||||||
|
minetest.get_node_timer(pos):start(CYCLE_TIME)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function stop_node(pos, nvm)
|
||||||
|
nvm.provided = 0
|
||||||
|
nvm.alive_cnt = 0
|
||||||
|
local outdir = M(pos):get_int("outdir")
|
||||||
|
power.start_storage_calc(pos, Cable, outdir)
|
||||||
|
swap_node(pos, "techage:ta5_generator")
|
||||||
|
end
|
||||||
|
|
||||||
|
local function get_generator_data(pos, outdir, tlib2)
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
if (nvm.alive_cnt or 0) > 0 then
|
||||||
|
return {level = (nvm.load or 0) / PWR_PERF, perf = PWR_PERF, capa = PWR_PERF * 2}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function node_timer(pos, elapsed)
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
nvm.alive_cnt = (nvm.alive_cnt or 0) - 1
|
||||||
|
if nvm.alive_cnt > 0 then
|
||||||
|
local meta = M(pos)
|
||||||
|
local outdir = meta:get_int("outdir")
|
||||||
|
local tp1 = tonumber(meta:get_string("termpoint1"))
|
||||||
|
local tp2 = tonumber(meta:get_string("termpoint2"))
|
||||||
|
nvm.provided = power.provide_power(pos, Cable, outdir, PWR_PERF, tp1, tp2)
|
||||||
|
local val = power.get_storage_load(pos, Cable, outdir, PWR_PERF)
|
||||||
|
if val > 0 then
|
||||||
|
nvm.load = val
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
swap_node(pos, "techage:ta5_generator")
|
||||||
|
stop_node(pos, nvm)
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_node("techage:ta5_generator", {
|
||||||
|
description = S("TA5 Generator"),
|
||||||
|
tiles = {
|
||||||
|
-- up, down, right, left, back, front
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta5_top.png",
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta4_bottom.png",
|
||||||
|
"techage_filling_ta4.png^techage_appl_hole_electric.png^techage_frame_ta5.png",
|
||||||
|
"techage_filling_ta4.png^techage_appl_open.png^techage_frame_ta5.png",
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta5.png^techage_appl_generator.png",
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta5.png^techage_appl_generator.png^[transformFX]",
|
||||||
|
},
|
||||||
|
|
||||||
|
after_place_node = function(pos, placer)
|
||||||
|
M(pos):set_int("outdir", networks.side_to_outdir(pos, "R"))
|
||||||
|
Cable:after_place_node(pos)
|
||||||
|
end,
|
||||||
|
after_dig_node = function(pos, oldnode)
|
||||||
|
Cable:after_dig_node(pos)
|
||||||
|
techage.del_mem(pos)
|
||||||
|
end,
|
||||||
|
|
||||||
|
get_generator_data = get_generator_data,
|
||||||
|
ta4_formspec = techage.generator_settings("ta4", PWR_PERF),
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {cracky=2, crumbly=2, choppy=2},
|
||||||
|
on_rotate = screwdriver.disallow,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("techage:ta5_generator_on", {
|
||||||
|
description = S("TA5 Generator"),
|
||||||
|
tiles = {
|
||||||
|
-- up, down, right, left, back, front
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta5_top.png",
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta4_bottom.png",
|
||||||
|
"techage_filling_ta4.png^techage_appl_hole_electric.png^techage_frame_ta5.png",
|
||||||
|
"techage_filling_ta4.png^techage_appl_open.png^techage_frame_ta5.png",
|
||||||
|
{
|
||||||
|
image = "techage_filling4_ta4.png^techage_appl_generator4.png^techage_frame4_ta5.png",
|
||||||
|
backface_culling = false,
|
||||||
|
animation = {
|
||||||
|
type = "vertical_frames",
|
||||||
|
aspect_w = 32,
|
||||||
|
aspect_h = 32,
|
||||||
|
length = 0.3,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
image = "techage_filling4_ta4.png^techage_appl_generator4.png^[transformFX]^techage_frame4_ta5.png",
|
||||||
|
backface_culling = false,
|
||||||
|
animation = {
|
||||||
|
type = "vertical_frames",
|
||||||
|
aspect_w = 32,
|
||||||
|
aspect_h = 32,
|
||||||
|
length = 0.3,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
get_generator_data = get_generator_data,
|
||||||
|
ta4_formspec = techage.generator_settings("ta4", PWR_PERF),
|
||||||
|
on_timer = node_timer,
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
drop = "",
|
||||||
|
groups = {not_in_creative_inventory=1},
|
||||||
|
diggable = false,
|
||||||
|
on_rotate = screwdriver.disallow,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
power.register_nodes({"techage:ta5_generator", "techage:ta5_generator_on"}, Cable, "gen", {"R"})
|
||||||
|
|
||||||
|
-- controlled by the turbine
|
||||||
|
techage.register_node({"techage:ta5_generator", "techage:ta5_generator_on"}, {
|
||||||
|
on_transfer = function(pos, in_dir, topic, payload)
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
if topic == "trigger" then
|
||||||
|
nvm.alive_cnt = 5
|
||||||
|
elseif topic == "start" then
|
||||||
|
start_node(pos, nvm)
|
||||||
|
elseif topic == "stop" then
|
||||||
|
stop_node(pos, nvm)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
on_recv_message = function(pos, src, topic, payload)
|
||||||
|
return "unsupported"
|
||||||
|
end,
|
||||||
|
on_node_load = function(pos)
|
||||||
|
-- remove legacy formspec
|
||||||
|
M(pos):set_string("formspec", "")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
control.register_nodes({"techage:ta5_generator", "techage:ta5_generator_on"}, {
|
||||||
|
on_receive = function(pos, tlib2, topic, payload)
|
||||||
|
end,
|
||||||
|
on_request = function(pos, tlib2, topic)
|
||||||
|
if topic == "info" then
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
local meta = M(pos)
|
||||||
|
return {
|
||||||
|
type = S("TA5 Generator"),
|
||||||
|
number = "-",
|
||||||
|
running = (nvm.alive_cnt or 0) > 0,
|
||||||
|
available = PWR_PERF,
|
||||||
|
provided = nvm.provided or 0,
|
||||||
|
termpoint = meta:get_string("termpoint"),
|
||||||
|
}
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "techage:ta5_generator",
|
||||||
|
recipe = {
|
||||||
|
{"", "dye:red", ""},
|
||||||
|
{"", "techage:ta4_generator", ""},
|
||||||
|
{"", "techage:baborium_ingot", ""},
|
||||||
|
},
|
||||||
|
})
|
109
techage/fusion_reactor/heatexchanger1.lua
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
--[[
|
||||||
|
|
||||||
|
TechAge
|
||||||
|
=======
|
||||||
|
|
||||||
|
Copyright (C) 2019-2022 Joachim Stolberg
|
||||||
|
|
||||||
|
AGPL v3
|
||||||
|
See LICENSE.txt for more information
|
||||||
|
|
||||||
|
TA5 Heat Exchanger1 (bottom part)
|
||||||
|
- has a connection to storage and turbine (via pipes)
|
||||||
|
- acts as a cable junction for Exchanger2
|
||||||
|
]]--
|
||||||
|
|
||||||
|
-- for lazy programmers
|
||||||
|
local S2P = minetest.string_to_pos
|
||||||
|
local P2S = minetest.pos_to_string
|
||||||
|
local M = minetest.get_meta
|
||||||
|
local S = techage.S
|
||||||
|
|
||||||
|
local Cable = techage.ElectricCable
|
||||||
|
local Pipe2 = techage.LiquidPipe
|
||||||
|
local Pipe3 = techage.GasPipe
|
||||||
|
local power = networks.power
|
||||||
|
local liquid = networks.liquid
|
||||||
|
local control = networks.control
|
||||||
|
|
||||||
|
local function turbine_cmnd(pos, topic, payload)
|
||||||
|
return techage.transfer(pos, "R", topic, payload, Pipe2,
|
||||||
|
{"techage:ta5_turbine", "techage:ta5_turbine_on"})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Send to the magnets
|
||||||
|
local function control_cmnd(pos, topic)
|
||||||
|
local outdir = networks.side_to_outdir(pos, "L")
|
||||||
|
return control.request(pos, Pipe3, outdir, "tank", topic)
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_node("techage:ta5_heatexchanger1", {
|
||||||
|
description = S("TA5 Heat Exchanger 1"),
|
||||||
|
tiles = {
|
||||||
|
-- up, down, right, left, back, front
|
||||||
|
"techage_hole_ta4.png^techage_appl_arrow_white.png",
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta4.png",
|
||||||
|
"techage_filling_ta4.png^techage_frameB_ta4.png^techage_appl_hole_pipe.png",
|
||||||
|
"techage_filling_ta4.png^techage_frameB_ta4.png^techage_appl_hole_ta5_pipe2.png",
|
||||||
|
"techage_filling_ta4.png^techage_frameB_ta4.png^techage_appl_hole_electric.png",
|
||||||
|
"techage_filling_ta4.png^techage_frameB_ta4.png^techage_appl_hole_electric.png",
|
||||||
|
},
|
||||||
|
|
||||||
|
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||||
|
Cable:after_place_node(pos)
|
||||||
|
Pipe2:after_place_node(pos)
|
||||||
|
Pipe3:after_place_node(pos)
|
||||||
|
end,
|
||||||
|
tubelib2_on_update2 = function(pos, outdir, tlib2, node)
|
||||||
|
if tlib2 == Cable then
|
||||||
|
power.update_network(pos, 0, Cable, node) -- junction!!!
|
||||||
|
elseif tlib2 == Pipe2 then
|
||||||
|
power.update_network(pos, outdir, Pipe2, node)
|
||||||
|
else
|
||||||
|
power.update_network(pos, outdir, Pipe3, node)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
can_dig = function(pos, player)
|
||||||
|
if minetest.is_protected(pos, player:get_player_name()) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
pos.y = pos.y + 1
|
||||||
|
return minetest.get_node(pos).name ~= "techage:ta5_heatexchanger2"
|
||||||
|
end,
|
||||||
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||||
|
Cable:after_dig_node(pos)
|
||||||
|
Pipe2:after_dig_node(pos)
|
||||||
|
Pipe3:after_dig_node(pos)
|
||||||
|
end,
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {crumbly = 2, cracky = 2, snappy = 2},
|
||||||
|
on_rotate = screwdriver.disallow,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = default.node_sound_metal_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
liquid.register_nodes({"techage:ta5_heatexchanger1"}, Pipe2, "tank", {"R"}, {})
|
||||||
|
liquid.register_nodes({"techage:ta5_heatexchanger1"}, Pipe3, "tank", {"L"}, {})
|
||||||
|
power.register_nodes({"techage:ta5_heatexchanger1"}, Cable, "junc", {"F", "B", "U"})
|
||||||
|
|
||||||
|
-- command interface
|
||||||
|
techage.register_node({"techage:ta5_heatexchanger1"}, {
|
||||||
|
on_transfer = function(pos, indir, topic, payload)
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
-- used by heatexchanger2
|
||||||
|
if topic == "test_gas_blue" then
|
||||||
|
return control_cmnd(pos, topic)
|
||||||
|
else
|
||||||
|
return turbine_cmnd(pos, topic, payload)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "techage:ta5_heatexchanger1",
|
||||||
|
recipe = {
|
||||||
|
{"default:tin_ingot", "techage:electric_cableS", "default:steel_ingot"},
|
||||||
|
{"techage:ta5_pipe1S", "basic_materials:gear_steel", "techage:ta4_pipeS"},
|
||||||
|
{"", "techage:baborium_ingot", ""},
|
||||||
|
},
|
||||||
|
})
|
378
techage/fusion_reactor/heatexchanger2.lua
Normal file
@ -0,0 +1,378 @@
|
|||||||
|
--[[
|
||||||
|
|
||||||
|
TechAge
|
||||||
|
=======
|
||||||
|
|
||||||
|
Copyright (C) 2019-2022 Joachim Stolberg
|
||||||
|
|
||||||
|
AGPL v3
|
||||||
|
See LICENSE.txt for more information
|
||||||
|
|
||||||
|
TA5 Heat Exchanger2 (middle part)
|
||||||
|
|
||||||
|
]]--
|
||||||
|
|
||||||
|
-- for lazy programmers
|
||||||
|
local S2P = minetest.string_to_pos
|
||||||
|
local P2S = minetest.pos_to_string
|
||||||
|
local M = minetest.get_meta
|
||||||
|
local S = techage.S
|
||||||
|
|
||||||
|
local Cable = techage.ElectricCable
|
||||||
|
local power = networks.power
|
||||||
|
local control = networks.control
|
||||||
|
local sched = techage.scheduler
|
||||||
|
|
||||||
|
local CYCLE_TIME = 2
|
||||||
|
local PWR_NEEDED = 5
|
||||||
|
local COUNTDOWN_TICKS = 1
|
||||||
|
local DOWN = 5 -- dir
|
||||||
|
local DESCRIPTION = S("TA5 Heat Exchanger 2")
|
||||||
|
local EXPECT_BLUE = 56
|
||||||
|
local EXPECT_GREEN = 52
|
||||||
|
local CALL_RATE1 = 16 -- 2s * 16 = 32s
|
||||||
|
local CALL_RATE2 = 8 -- 2s * 8 = 16s
|
||||||
|
local EX_POINTS = 60
|
||||||
|
|
||||||
|
local function heatexchanger1_cmnd(pos, topic, payload)
|
||||||
|
return techage.transfer({x = pos.x, y = pos.y - 1, z = pos.z},
|
||||||
|
nil, topic, payload, nil,
|
||||||
|
{"techage:ta5_heatexchanger1"})
|
||||||
|
end
|
||||||
|
|
||||||
|
local function heatexchanger3_cmnd(pos, topic, payload)
|
||||||
|
return techage.transfer({x = pos.x, y = pos.y + 1, z = pos.z},
|
||||||
|
nil, topic, payload, nil,
|
||||||
|
{"techage:ta5_heatexchanger3"})
|
||||||
|
end
|
||||||
|
|
||||||
|
local function play_sound(pos)
|
||||||
|
local mem = techage.get_mem(pos)
|
||||||
|
if not mem.handle or mem.handle == -1 then
|
||||||
|
mem.handle = minetest.sound_play("techage_booster", {
|
||||||
|
pos = pos,
|
||||||
|
gain = 0.3,
|
||||||
|
max_hear_distance = 10,
|
||||||
|
loop = true})
|
||||||
|
if mem.handle == -1 then
|
||||||
|
minetest.after(1, play_sound, pos)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function stop_sound(pos)
|
||||||
|
local mem = techage.get_mem(pos)
|
||||||
|
if mem.handle then
|
||||||
|
minetest.sound_stop(mem.handle)
|
||||||
|
mem.handle = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function count_trues(t)
|
||||||
|
local cnt = 0
|
||||||
|
for _,v in ipairs(t) do
|
||||||
|
if v then
|
||||||
|
cnt = cnt + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return cnt
|
||||||
|
end
|
||||||
|
|
||||||
|
local tSched = {}
|
||||||
|
|
||||||
|
sched.register(tSched, CALL_RATE1, 0, function(pos)
|
||||||
|
if not heatexchanger1_cmnd(pos, "turbine") then
|
||||||
|
return S("Turbine error")
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end)
|
||||||
|
sched.register(tSched, CALL_RATE1, 1, function(pos)
|
||||||
|
if not heatexchanger3_cmnd(pos, "turbine") then
|
||||||
|
return S("Cooler error")
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end)
|
||||||
|
sched.register(tSched, CALL_RATE1, 2, function(pos)
|
||||||
|
local resp = heatexchanger1_cmnd(pos, "test_gas_blue")
|
||||||
|
local cnt = count_trues(resp)
|
||||||
|
if cnt ~= EXPECT_BLUE then
|
||||||
|
return S("Blue pipe connection error\n(@1 found / @2 expected)", cnt, EXPECT_BLUE)
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end)
|
||||||
|
sched.register(tSched, CALL_RATE1, 3, function(pos)
|
||||||
|
local resp = heatexchanger3_cmnd(pos, "test_gas_green")
|
||||||
|
local cnt = count_trues(resp)
|
||||||
|
if cnt ~= EXPECT_GREEN then
|
||||||
|
return S("Green pipe connection error\n(@1 found / @2 expected)", cnt, EXPECT_GREEN)
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end)
|
||||||
|
sched.register(tSched, CALL_RATE2, 4, function(pos)
|
||||||
|
local resp = heatexchanger3_cmnd(pos, "dec_power")
|
||||||
|
local cnt = count_trues(resp)
|
||||||
|
--print("dec_power", cnt)
|
||||||
|
if cnt < 52 then
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
return 1
|
||||||
|
end)
|
||||||
|
|
||||||
|
local function can_start(pos, nvm)
|
||||||
|
if not power.power_available(pos, Cable, DOWN) then
|
||||||
|
return S("No power")
|
||||||
|
end
|
||||||
|
heatexchanger3_cmnd(pos, "rst_power")
|
||||||
|
for i = 0,4 do
|
||||||
|
local res = tSched[i](pos)
|
||||||
|
if res ~= true and res ~= 1 then return res end
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
local function start_node(pos, nvm)
|
||||||
|
play_sound(pos)
|
||||||
|
sched.init(pos)
|
||||||
|
nvm.temperature = nvm.temperature or 0
|
||||||
|
local mem = techage.get_mem(pos)
|
||||||
|
local t = minetest.get_gametime() - (mem.stopped_at or 0)
|
||||||
|
nvm.temperature = math.max(nvm.temperature - math.floor(t/2), 0)
|
||||||
|
nvm.temperature = math.min(nvm.temperature, 70)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function stop_node(pos, nvm)
|
||||||
|
stop_sound(pos)
|
||||||
|
heatexchanger1_cmnd(pos, "stop")
|
||||||
|
local mem = techage.get_mem(pos)
|
||||||
|
mem.stopped_at = minetest.get_gametime()
|
||||||
|
end
|
||||||
|
|
||||||
|
local function temp_indicator (nvm, x, y)
|
||||||
|
local temp = techage.is_running(nvm) and nvm.temperature or 0
|
||||||
|
return "image[" .. x .. "," .. y .. ";1,2;techage_form_temp_bg.png^[lowpart:" ..
|
||||||
|
temp .. ":techage_form_temp_fg.png]" ..
|
||||||
|
"tooltip[" .. x .. "," .. y .. ";1,2;" .. S("water temperature") .. ";#0C3D32;#FFFFFF]"
|
||||||
|
end
|
||||||
|
|
||||||
|
local function formspec(self, pos, nvm)
|
||||||
|
return "size[5,3]"..
|
||||||
|
"box[0,-0.1;4.8,0.5;#c6e8ff]" ..
|
||||||
|
"label[0.2,-0.1;" .. minetest.colorize( "#000000", DESCRIPTION) .. "]" ..
|
||||||
|
temp_indicator (nvm, 1, 1) ..
|
||||||
|
"image_button[3.2,1.5;1,1;".. self:get_state_button_image(nvm) ..";state_button;]"..
|
||||||
|
"tooltip[3.2,1.5;1,1;"..self:get_state_tooltip(nvm).."]"
|
||||||
|
end
|
||||||
|
|
||||||
|
local State = techage.NodeStates:new({
|
||||||
|
node_name_passive = "techage:ta5_heatexchanger2",
|
||||||
|
cycle_time = CYCLE_TIME,
|
||||||
|
infotext_name = DESCRIPTION,
|
||||||
|
standby_ticks = 0,
|
||||||
|
can_start = can_start,
|
||||||
|
start_node = start_node,
|
||||||
|
stop_node = stop_node,
|
||||||
|
formspec_func = formspec,
|
||||||
|
})
|
||||||
|
|
||||||
|
local function steam_management(pos, nvm)
|
||||||
|
local resp = sched.get(pos, tSched, function() return true end)(pos)
|
||||||
|
|
||||||
|
if resp == 0 then -- has no power
|
||||||
|
nvm.temperature = math.max(nvm.temperature - 10, 0)
|
||||||
|
elseif resp == 1 then -- has power
|
||||||
|
nvm.temperature = math.min(nvm.temperature + 10, 100)
|
||||||
|
elseif resp ~= true then
|
||||||
|
State:fault(pos, nvm, resp)
|
||||||
|
stop_node(pos, nvm)
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
if resp == 0 and nvm.temperature == 70 then
|
||||||
|
heatexchanger1_cmnd(pos, "stop")
|
||||||
|
elseif nvm.temperature == 80 then
|
||||||
|
if resp == 1 then
|
||||||
|
heatexchanger1_cmnd(pos, "start")
|
||||||
|
local owner = M(pos):get_string("owner")
|
||||||
|
minetest.log("action", "[techage] " .. owner .. " starts the TA5 Fusion Reactor at " .. P2S(pos))
|
||||||
|
else
|
||||||
|
heatexchanger1_cmnd(pos, "trigger")
|
||||||
|
end
|
||||||
|
elseif nvm.temperature > 80 then
|
||||||
|
heatexchanger1_cmnd(pos, "trigger")
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
local function consume_power(pos, nvm)
|
||||||
|
if techage.needs_power(nvm) then
|
||||||
|
local taken = power.consume_power(pos, Cable, DOWN, PWR_NEEDED)
|
||||||
|
if techage.is_running(nvm) then
|
||||||
|
if taken < PWR_NEEDED then
|
||||||
|
State:nopower(pos, nvm, S("No power"))
|
||||||
|
stop_sound(pos)
|
||||||
|
heatexchanger1_cmnd(pos, "stop")
|
||||||
|
else
|
||||||
|
return true -- keep running
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function node_timer(pos, elapsed)
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
nvm.temperature = nvm.temperature or 0
|
||||||
|
--print("node_timer", nvm.temperature)
|
||||||
|
if consume_power(pos, nvm) then
|
||||||
|
if steam_management(pos, nvm) then
|
||||||
|
State:keep_running(pos, nvm, COUNTDOWN_TICKS)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if techage.is_activeformspec(pos) then
|
||||||
|
M(pos):set_string("formspec", formspec(State, pos, nvm))
|
||||||
|
end
|
||||||
|
return State:is_active(nvm) or nvm.temperature > 0
|
||||||
|
end
|
||||||
|
|
||||||
|
local function can_dig(pos, player)
|
||||||
|
if minetest.is_protected(pos, player:get_player_name()) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
return not techage.is_running(nvm)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_rightclick(pos, node, clicker)
|
||||||
|
techage.set_activeformspec(pos, clicker)
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
M(pos):set_string("formspec", formspec(State, pos, nvm))
|
||||||
|
end
|
||||||
|
|
||||||
|
local function after_place_node(pos, placer)
|
||||||
|
if techage.orientate_node(pos, "techage:ta5_heatexchanger1") then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
local meta = M(pos)
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
local own_num = techage.add_node(pos, "techage:ta5_heatexchanger2")
|
||||||
|
meta:set_string("owner", placer:get_player_name())
|
||||||
|
meta:set_string("infotext", DESCRIPTION..": "..own_num)
|
||||||
|
meta:set_string("formspec", formspec(State, pos, nvm))
|
||||||
|
Cable:after_place_node(pos, {DOWN})
|
||||||
|
State:node_init(pos, nvm, own_num)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function after_dig_node(pos, oldnode, oldmetadata, digger)
|
||||||
|
Cable:after_dig_node(pos)
|
||||||
|
techage.del_mem(pos)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_receive_fields(pos, formname, fields, player)
|
||||||
|
if minetest.is_protected(pos, player:get_player_name()) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if techage.get_expoints(player) >= EX_POINTS then
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
State:state_button_event(pos, nvm, fields)
|
||||||
|
--M(pos):set_string("formspec", formspec(State, pos, nvm))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Middle node with the formspec from the bottom node
|
||||||
|
minetest.register_node("techage:ta5_heatexchanger2", {
|
||||||
|
description = DESCRIPTION,
|
||||||
|
tiles = {
|
||||||
|
-- up, down, right, left, back, front
|
||||||
|
"techage_hole_ta4.png",
|
||||||
|
"techage_hole_ta4.png",
|
||||||
|
"techage_filling_ta4.png^techage_frameM_ta4.png^techage_appl_tes_turb.png",
|
||||||
|
"techage_filling_ta4.png^techage_frameM_ta4.png",
|
||||||
|
"techage_filling_ta4.png^techage_frameM_ta4.png^techage_appl_ribsB.png",
|
||||||
|
"techage_filling_ta4.png^techage_frameM_ta4.png^techage_appl_ribsB.png",
|
||||||
|
},
|
||||||
|
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-1/2, -1.5/2, -1/2, 1/2, 1/2, 1/2},
|
||||||
|
},
|
||||||
|
|
||||||
|
on_receive_fields = on_receive_fields,
|
||||||
|
on_rightclick = on_rightclick,
|
||||||
|
on_timer = node_timer,
|
||||||
|
after_place_node = after_place_node,
|
||||||
|
can_dig = can_dig,
|
||||||
|
after_dig_node = after_dig_node,
|
||||||
|
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {crumbly = 2, cracky = 2, snappy = 2},
|
||||||
|
on_rotate = screwdriver.disallow,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = default.node_sound_metal_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
power.register_nodes({"techage:ta5_heatexchanger2"}, Cable, "con", {"D"})
|
||||||
|
|
||||||
|
techage.register_node({"techage:ta5_heatexchanger2"}, {
|
||||||
|
on_recv_message = function(pos, src, topic, payload)
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
if topic == "state" then
|
||||||
|
if techage.is_running(nvm) then
|
||||||
|
return "running"
|
||||||
|
else
|
||||||
|
return "stopped"
|
||||||
|
end
|
||||||
|
elseif topic == "delivered" then
|
||||||
|
local data = power.get_network_data(pos, Cable, DOWN)
|
||||||
|
return data.consumed - data.provided
|
||||||
|
elseif topic == "on" then
|
||||||
|
start_node(pos, techage.get_nvm(pos))
|
||||||
|
return true
|
||||||
|
elseif topic == "off" then
|
||||||
|
stop_node(pos, techage.get_nvm(pos))
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
return "unsupported"
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
on_node_load = function(pos, node)
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
if techage.is_running(nvm) then
|
||||||
|
play_sound(pos)
|
||||||
|
else
|
||||||
|
stop_sound(pos)
|
||||||
|
end
|
||||||
|
-- Attempt to restart the system as the heat exchanger goes into error state
|
||||||
|
-- when parts of the storage block are unloaded.
|
||||||
|
if nvm.techage_state == techage.FAULT then
|
||||||
|
start_node(pos, nvm)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
control.register_nodes({"techage:ta5_heatexchanger2"}, {
|
||||||
|
on_receive = function(pos, tlib2, topic, payload)
|
||||||
|
end,
|
||||||
|
on_request = function(pos, tlib2, topic)
|
||||||
|
if topic == "info" then
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
return {
|
||||||
|
type = DESCRIPTION,
|
||||||
|
number = M(pos):get_string("node_number") or "",
|
||||||
|
running = techage.is_running(nvm) or false,
|
||||||
|
capa = nvm.capa_max or 1,
|
||||||
|
load = nvm.capa or 0,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "techage:ta5_heatexchanger2",
|
||||||
|
recipe = {
|
||||||
|
{"default:tin_ingot", "", "default:steel_ingot"},
|
||||||
|
{"", "techage:ta5_aichip2", ""},
|
||||||
|
{"", "techage:baborium_ingot", ""},
|
||||||
|
},
|
||||||
|
})
|
106
techage/fusion_reactor/heatexchanger3.lua
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
--[[
|
||||||
|
|
||||||
|
TechAge
|
||||||
|
=======
|
||||||
|
|
||||||
|
Copyright (C) 2019-2022 Joachim Stolberg
|
||||||
|
|
||||||
|
AGPL v3
|
||||||
|
See LICENSE.txt for more information
|
||||||
|
|
||||||
|
TA5 Heat Exchanger3 (top part)
|
||||||
|
|
||||||
|
]]--
|
||||||
|
|
||||||
|
-- for lazy programmers
|
||||||
|
local M = minetest.get_meta
|
||||||
|
local S = techage.S
|
||||||
|
|
||||||
|
local Pipe2 = techage.LiquidPipe
|
||||||
|
local Pipe3 = techage.GasPipe
|
||||||
|
local liquid = networks.liquid
|
||||||
|
local control = networks.control
|
||||||
|
|
||||||
|
local function orientate_node(pos, name)
|
||||||
|
local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z})
|
||||||
|
if node.name == name then
|
||||||
|
local param2 = node.param2
|
||||||
|
node = minetest.get_node(pos)
|
||||||
|
node.param2 = param2
|
||||||
|
minetest.swap_node(pos, node)
|
||||||
|
else
|
||||||
|
minetest.remove_node(pos)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function after_place_node(pos)
|
||||||
|
if orientate_node(pos, "techage:ta5_heatexchanger2") then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
Pipe2:after_place_node(pos)
|
||||||
|
Pipe3:after_place_node(pos)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function after_dig_node(pos, oldnode)
|
||||||
|
Pipe2:after_dig_node(pos)
|
||||||
|
Pipe3:after_dig_node(pos)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function turbine_cmnd(pos, topic, payload)
|
||||||
|
return techage.transfer(pos, "R", topic, payload, Pipe2,
|
||||||
|
{"techage:ta5_turbine", "techage:ta5_turbine_on"})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Send to the magnets
|
||||||
|
local function control_cmnd(pos, topic)
|
||||||
|
local outdir = networks.side_to_outdir(pos, "L")
|
||||||
|
return control.request(pos, Pipe3, outdir, "tank", topic)
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_node("techage:ta5_heatexchanger3", {
|
||||||
|
description = S("TA5 Heat Exchanger 3"),
|
||||||
|
tiles = {
|
||||||
|
-- up, down, right, left, back, front
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta5_top.png",
|
||||||
|
"techage_hole_ta4.png",
|
||||||
|
"techage_filling_ta4.png^techage_frameT_ta5.png^techage_appl_hole_pipe.png",
|
||||||
|
"techage_filling_ta4.png^techage_frameT_ta5.png^techage_appl_hole_ta5_pipe1.png",
|
||||||
|
"techage_filling_ta4.png^techage_frameT_ta5.png^techage_appl_ribsT.png",
|
||||||
|
"techage_filling_ta4.png^techage_frameT_ta5.png^techage_appl_ribsT.png",
|
||||||
|
},
|
||||||
|
|
||||||
|
after_place_node = after_place_node,
|
||||||
|
after_dig_node = after_dig_node,
|
||||||
|
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {crumbly = 2, cracky = 2, snappy = 2},
|
||||||
|
on_rotate = screwdriver.disallow,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = default.node_sound_metal_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
liquid.register_nodes({"techage:ta5_heatexchanger3"}, Pipe2, "tank", {"R"}, {})
|
||||||
|
liquid.register_nodes({"techage:ta5_heatexchanger3"}, Pipe3, "tank", {"L"}, {})
|
||||||
|
|
||||||
|
-- command interface, used by heatexchanger2
|
||||||
|
techage.register_node({"techage:ta5_heatexchanger3"}, {
|
||||||
|
on_transfer = function(pos, indir, topic, payload)
|
||||||
|
if topic == "turbine" then
|
||||||
|
return turbine_cmnd(pos, topic, payload)
|
||||||
|
else
|
||||||
|
return control_cmnd(pos, topic)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "techage:ta5_heatexchanger3",
|
||||||
|
recipe = {
|
||||||
|
{"default:tin_ingot", "dye:red", "default:steel_ingot"},
|
||||||
|
{"techage:ta5_pipe2S", "basic_materials:gear_steel", "techage:ta4_pipeS"},
|
||||||
|
{"", "techage:baborium_ingot", ""},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
techage.orientate_node = orientate_node
|
266
techage/fusion_reactor/magnet.lua
Normal file
@ -0,0 +1,266 @@
|
|||||||
|
--[[
|
||||||
|
|
||||||
|
TechAge
|
||||||
|
=======
|
||||||
|
|
||||||
|
Copyright (C) 2019-2022 Joachim Stolberg
|
||||||
|
|
||||||
|
AGPL v3
|
||||||
|
See LICENSE.txt for more information
|
||||||
|
|
||||||
|
TA5 Fusion Reactor Magnet
|
||||||
|
|
||||||
|
]]--
|
||||||
|
|
||||||
|
-- for lazy programmers
|
||||||
|
local S2P = minetest.string_to_pos
|
||||||
|
local P2S = minetest.pos_to_string
|
||||||
|
local M = minetest.get_meta
|
||||||
|
local S = techage.S
|
||||||
|
|
||||||
|
local Cable = techage.ElectricCable
|
||||||
|
local Pipe = techage.GasPipe
|
||||||
|
local power = networks.power
|
||||||
|
local liquid = networks.liquid
|
||||||
|
local control = networks.control
|
||||||
|
|
||||||
|
local CAPACITY = 6
|
||||||
|
local SHELLBLOCKS = {"techage:ta5_fr_shell", "techage:ta5_fr_nucleus", "techage:ta5_magnet1", "techage:ta5_magnet2"}
|
||||||
|
|
||||||
|
minetest.register_node("techage:ta5_magnet1", {
|
||||||
|
description = S("TA5 Fusion Reactor Magnet 1"),
|
||||||
|
tiles = {
|
||||||
|
-- up, down, right, left, back, front
|
||||||
|
"techage_collider_magnet.png^techage_appl_hole_ta5_pipe1.png^techage_steel_tiles_top.png^[transformR180]",
|
||||||
|
"techage_collider_magnet.png^techage_appl_hole_ta5_pipe2.png^techage_steel_tiles_top.png",
|
||||||
|
"techage_collider_magnet.png^techage_steel_tiles_side.png",
|
||||||
|
"techage_collider_magnet.png^techage_steel_tiles_side.png^[transformR180]",
|
||||||
|
"techage_collider_magnet.png^techage_appl_hole_electric.png",
|
||||||
|
"techage_steel_tiles.png",
|
||||||
|
},
|
||||||
|
after_place_node = function(pos, placer, itemstack)
|
||||||
|
Pipe:after_place_node(pos)
|
||||||
|
Cable:after_place_node(pos)
|
||||||
|
end,
|
||||||
|
ta_rotate_node = function(pos, node, new_param2)
|
||||||
|
Pipe:after_dig_node(pos)
|
||||||
|
Cable:after_dig_node(pos)
|
||||||
|
minetest.swap_node(pos, {name = node.name, param2 = new_param2})
|
||||||
|
Pipe:after_place_node(pos)
|
||||||
|
Cable:after_place_node(pos)
|
||||||
|
end,
|
||||||
|
after_dig_node = function(pos, oldnode)
|
||||||
|
Pipe:after_dig_node(pos)
|
||||||
|
Cable:after_dig_node(pos)
|
||||||
|
techage.del_mem(pos)
|
||||||
|
end,
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {choppy=2, cracky=2, crumbly=2},
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = default.node_sound_metal_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("techage:ta5_magnet2", {
|
||||||
|
description = S("TA5 Fusion Reactor Magnet 2"),
|
||||||
|
tiles = {
|
||||||
|
-- up, down, right, left, back, front
|
||||||
|
"techage_collider_magnet.png^techage_appl_hole_ta5_pipe1.png^techage_steel_tiles_top2.png^[transformR180]",
|
||||||
|
"techage_collider_magnet.png^techage_appl_hole_ta5_pipe2.png^techage_steel_tiles_top2.png^[transformR270]",
|
||||||
|
"techage_steel_tiles.png",
|
||||||
|
"techage_collider_magnet.png^techage_steel_tiles_side.png^[transformR180]",
|
||||||
|
"techage_collider_magnet.png^techage_steel_tiles_side.png",
|
||||||
|
"techage_steel_tiles.png",
|
||||||
|
},
|
||||||
|
after_place_node = function(pos, placer, itemstack)
|
||||||
|
Pipe:after_place_node(pos)
|
||||||
|
Cable:after_place_node(pos)
|
||||||
|
end,
|
||||||
|
ta_rotate_node = function(pos, node, new_param2)
|
||||||
|
Pipe:after_dig_node(pos)
|
||||||
|
Cable:after_dig_node(pos)
|
||||||
|
minetest.swap_node(pos, {name = node.name, param2 = new_param2})
|
||||||
|
Pipe:after_place_node(pos)
|
||||||
|
Cable:after_place_node(pos)
|
||||||
|
end,
|
||||||
|
after_dig_node = function(pos, oldnode)
|
||||||
|
Pipe:after_dig_node(pos)
|
||||||
|
Cable:after_dig_node(pos)
|
||||||
|
techage.del_mem(pos)
|
||||||
|
end,
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {choppy=2, cracky=2, crumbly=2},
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = default.node_sound_metal_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
power.register_nodes({"techage:ta5_magnet1"}, Cable, "con", {"B"})
|
||||||
|
liquid.register_nodes({"techage:ta5_magnet1", "techage:ta5_magnet2"}, Pipe, "tank", {"U", "D"}, {
|
||||||
|
capa = CAPACITY,
|
||||||
|
peek = function(pos, indir)
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
return liquid.srv_peek(nvm)
|
||||||
|
end,
|
||||||
|
put = function(pos, indir, name, amount)
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
return liquid.srv_put(nvm, name, amount, CAPACITY)
|
||||||
|
end,
|
||||||
|
take = function(pos, indir, name, amount)
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
return liquid.srv_take(nvm, name, amount)
|
||||||
|
end,
|
||||||
|
untake = function(pos, indir, name, amount)
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
liquid.srv_put(nvm, name, amount, CAPACITY)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
local function check_plasma(pos, param2)
|
||||||
|
local pos1 = networks.get_relpos(pos, "F", param2)
|
||||||
|
local node = minetest.get_node(pos1) or {}
|
||||||
|
return node.name == "air"
|
||||||
|
end
|
||||||
|
|
||||||
|
local function swap_plasma(pos, name, param2)
|
||||||
|
local pos1 = networks.get_relpos(pos, "F", param2)
|
||||||
|
minetest.swap_node(pos1, {name = name, param2 = param2})
|
||||||
|
end
|
||||||
|
|
||||||
|
local function check_shell(pos, param2)
|
||||||
|
local pos1 = networks.get_relpos(pos, "D", param2)
|
||||||
|
local pos2 = networks.get_relpos(pos, "BU", param2)
|
||||||
|
local _,t = minetest.find_nodes_in_area(pos1, pos2, SHELLBLOCKS)
|
||||||
|
local cnt = 0
|
||||||
|
for k,v in pairs(t) do
|
||||||
|
cnt = cnt + v
|
||||||
|
end
|
||||||
|
return cnt == 6
|
||||||
|
end
|
||||||
|
|
||||||
|
local function check_nucleus(pos, param2)
|
||||||
|
local pos1 = networks.get_relpos(pos, "B", param2)
|
||||||
|
local node = minetest.get_node(pos1) or {}
|
||||||
|
if node.name == "techage:ta5_fr_nucleus" then
|
||||||
|
return pos1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_receive(pos, tlib2, topic, payload)
|
||||||
|
--print("on_receive", topic)
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
if topic == "on" then
|
||||||
|
nvm.running = true
|
||||||
|
elseif topic == "off" then
|
||||||
|
nvm.running = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function rst_power(nvm)
|
||||||
|
nvm.power = 0
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
local function inc_power(nvm)
|
||||||
|
nvm.power = nvm.power or 0
|
||||||
|
if nvm.power < 0 then nvm.power = 0 end
|
||||||
|
nvm.power = nvm.power + 1
|
||||||
|
return nvm.power <= 2
|
||||||
|
end
|
||||||
|
|
||||||
|
local function dec_power(nvm)
|
||||||
|
nvm.power = nvm.power or 0
|
||||||
|
if nvm.power > 0 then nvm.power = 0 end
|
||||||
|
nvm.power = nvm.power - 1
|
||||||
|
return nvm.power >= -2
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_request(pos, tlib2, topic)
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
nvm.liquid = nvm.liquid or {}
|
||||||
|
nvm.liquid.amount = nvm.liquid.amount or 0
|
||||||
|
if tlib2 == Cable then
|
||||||
|
if topic == "connect" then
|
||||||
|
return true
|
||||||
|
elseif topic == "inc_power" then
|
||||||
|
return inc_power(nvm)
|
||||||
|
elseif topic == "test_plasma" then
|
||||||
|
local node = minetest.get_node(pos) or {}
|
||||||
|
return check_plasma(pos, node.param2)
|
||||||
|
elseif topic == "test_shell" then
|
||||||
|
local node = minetest.get_node(pos) or {}
|
||||||
|
return check_shell(pos, node.param2)
|
||||||
|
elseif topic == "test_nucleus" then
|
||||||
|
local node = minetest.get_node(pos) or {}
|
||||||
|
return check_nucleus(pos, node.param2)
|
||||||
|
elseif topic == "no_gas" then
|
||||||
|
nvm.liquid.amount = 0
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
else -- Pipe
|
||||||
|
if topic == "dec_power" then
|
||||||
|
return dec_power(nvm)
|
||||||
|
elseif topic == "test_gas_blue" then
|
||||||
|
nvm.has_gas = true
|
||||||
|
return nvm.liquid.amount == CAPACITY
|
||||||
|
elseif topic == "test_gas_green" then
|
||||||
|
local res = nvm.has_gas
|
||||||
|
nvm.has_gas = false
|
||||||
|
return res
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if topic == "rst_power" then
|
||||||
|
return rst_power(nvm)
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
control.register_nodes({"techage:ta5_magnet1", "techage:ta5_magnet2"}, {
|
||||||
|
on_receive = on_receive,
|
||||||
|
on_request = on_request,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
minetest.register_craftitem("techage:ta5_magnet_blank", {
|
||||||
|
description = S("TA5 Fusion Reactor Magnet Blank"),
|
||||||
|
inventory_image = "techage_collider_magnet.png^techage_appl_hole_electric.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("techage:ta5_magnet_shield", {
|
||||||
|
description = S("TA5 Fusion Reactor Magnet Shield"),
|
||||||
|
inventory_image = "techage_steel_tiles.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
techage.furnace.register_recipe({
|
||||||
|
output = "techage:ta5_magnet_shield 2",
|
||||||
|
recipe = {"default:steel_ingot", "techage:usmium_powder", "techage:graphite_powder"},
|
||||||
|
time = 2,
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "techage:ta5_magnet_blank 2",
|
||||||
|
recipe = {
|
||||||
|
{'default:steel_ingot', 'techage:electric_cableS', 'techage:aluminum'},
|
||||||
|
{'techage:ta5_pipe1S', 'basic_materials:gold_wire', 'techage:ta5_pipe2S'},
|
||||||
|
{'techage:aluminum', 'dye:brown', 'default:steel_ingot'},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "techage:ta5_magnet1",
|
||||||
|
recipe = {
|
||||||
|
{'', 'techage:ta5_magnet_shield', 'techage:ta5_magnet_blank'},
|
||||||
|
{'', '', ''},
|
||||||
|
{'', '', ''},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "techage:ta5_magnet2",
|
||||||
|
recipe = {
|
||||||
|
{'', 'techage:ta5_magnet_shield', 'techage:ta5_magnet_blank'},
|
||||||
|
{'', '', 'techage:ta5_magnet_shield'},
|
||||||
|
{'', '', ''},
|
||||||
|
},
|
||||||
|
})
|
63
techage/fusion_reactor/shell.lua
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
--[[
|
||||||
|
|
||||||
|
TechAge
|
||||||
|
=======
|
||||||
|
|
||||||
|
Copyright (C) 2019-2022 Joachim Stolberg
|
||||||
|
|
||||||
|
AGPL v3
|
||||||
|
See LICENSE.txt for more information
|
||||||
|
|
||||||
|
TA5 Fusion Reactor Shell
|
||||||
|
|
||||||
|
]]--
|
||||||
|
|
||||||
|
-- for lazy programmers
|
||||||
|
local S2P = minetest.string_to_pos
|
||||||
|
local P2S = minetest.pos_to_string
|
||||||
|
local M = minetest.get_meta
|
||||||
|
local S = techage.S
|
||||||
|
|
||||||
|
minetest.register_node("techage:ta5_fr_shell", {
|
||||||
|
description = S("TA5 Fusion Reactor Shell"),
|
||||||
|
tiles = {
|
||||||
|
"techage_reactor_shell.png",
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
paramtype = "light",
|
||||||
|
use_texture_alpha = "blend",
|
||||||
|
groups = {choppy=2, cracky=2, crumbly=2},
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = default.node_sound_metal_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("techage:ta5_fr_nucleus", {
|
||||||
|
description = S("TA5 Fusion Reactor Nucleus"),
|
||||||
|
tiles = {
|
||||||
|
"techage_reactor_shell.png^techage_collider_detector_core.png",
|
||||||
|
},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
paramtype = "light",
|
||||||
|
use_texture_alpha = "blend",
|
||||||
|
groups = {choppy=2, cracky=2, crumbly=2},
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = default.node_sound_metal_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
techage.furnace.register_recipe({
|
||||||
|
output = "techage:ta5_fr_shell 3",
|
||||||
|
recipe = {'techage:ta4_colliderblock', 'techage:ta4_colliderblock', "techage:graphite_powder"},
|
||||||
|
time = 24,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "techage:ta5_fr_nucleus",
|
||||||
|
recipe = {
|
||||||
|
{"", "techage:ta5_aichip2", ""},
|
||||||
|
{"techage:electric_cableS", "techage:cylinder_large_hydrogen", "techage:ta3_valve_open"},
|
||||||
|
{"", "techage:ta5_fr_shell", ""},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
191
techage/fusion_reactor/ta5_pump.lua
Normal file
@ -0,0 +1,191 @@
|
|||||||
|
--[[
|
||||||
|
|
||||||
|
TechAge
|
||||||
|
=======
|
||||||
|
|
||||||
|
Copyright (C) 2019-2022 Joachim Stolberg
|
||||||
|
|
||||||
|
AGPL v3
|
||||||
|
See LICENSE.txt for more information
|
||||||
|
|
||||||
|
TA5 Pump
|
||||||
|
|
||||||
|
]]--
|
||||||
|
|
||||||
|
local S2P = minetest.string_to_pos
|
||||||
|
local P2S = minetest.pos_to_string
|
||||||
|
local M = minetest.get_meta
|
||||||
|
local S = techage.S
|
||||||
|
local Pipe2 = techage.LiquidPipe
|
||||||
|
local Pipe3 = techage.GasPipe
|
||||||
|
local liquid = networks.liquid
|
||||||
|
local Flip = networks.Flip
|
||||||
|
|
||||||
|
local STANDBY_TICKS = 16
|
||||||
|
local COUNTDOWN_TICKS = 4
|
||||||
|
local CYCLE_TIME = 2
|
||||||
|
local CAPA = 4
|
||||||
|
|
||||||
|
local WRENCH_MENU = {{
|
||||||
|
type = "output",
|
||||||
|
name = "flowrate",
|
||||||
|
label = S("Total flow rate"),
|
||||||
|
tooltip = S("Total flow rate in liquid units"),
|
||||||
|
}}
|
||||||
|
|
||||||
|
local State = techage.NodeStates:new({
|
||||||
|
node_name_passive = "techage:ta5_pump",
|
||||||
|
node_name_active = "techage:ta5_pump_on",
|
||||||
|
infotext_name = S("TA5 Pump"),
|
||||||
|
cycle_time = CYCLE_TIME,
|
||||||
|
standby_ticks = STANDBY_TICKS,
|
||||||
|
})
|
||||||
|
|
||||||
|
local function pumping(pos, nvm)
|
||||||
|
local outdir = M(pos):get_int("outdir")
|
||||||
|
local taken, name = liquid.take(pos, Pipe2, Flip[outdir], nil, CAPA)
|
||||||
|
if taken > 0 then
|
||||||
|
local leftover = liquid.put(pos, Pipe3, outdir, name, taken)
|
||||||
|
if leftover and leftover > 0 then
|
||||||
|
liquid.untake(pos, Pipe2, Flip[outdir], name, leftover)
|
||||||
|
if leftover == taken then
|
||||||
|
State:blocked(pos, nvm)
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
State:keep_running(pos, nvm, COUNTDOWN_TICKS)
|
||||||
|
return taken - leftover
|
||||||
|
end
|
||||||
|
State:keep_running(pos, nvm, COUNTDOWN_TICKS)
|
||||||
|
return taken
|
||||||
|
end
|
||||||
|
State:idle(pos, nvm)
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
local function after_place_node(pos, placer)
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
local number = techage.add_node(pos, "techage:ta5_pump")
|
||||||
|
State:node_init(pos, nvm, number)
|
||||||
|
M(pos):set_int("outdir", networks.side_to_outdir(pos, "R"))
|
||||||
|
Pipe2:after_place_node(pos)
|
||||||
|
Pipe3:after_place_node(pos)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function node_timer(pos, elapsed)
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
nvm.flowrate = (nvm.flowrate or 0) + pumping(pos, nvm)
|
||||||
|
return State:is_active(nvm)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_rightclick(pos, node, clicker)
|
||||||
|
if minetest.is_protected(pos, clicker:get_player_name()) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
if node.name == "techage:ta5_pump" then
|
||||||
|
State:start(pos, nvm)
|
||||||
|
elseif node.name == "techage:ta5_pump_on" then
|
||||||
|
State:stop(pos, nvm)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function after_dig_node(pos, oldnode, oldmetadata, digger)
|
||||||
|
Pipe2:after_dig_node(pos)
|
||||||
|
Pipe3:after_dig_node(pos)
|
||||||
|
techage.del_mem(pos)
|
||||||
|
end
|
||||||
|
|
||||||
|
local tiles_pas = {
|
||||||
|
-- up, down, right, left, back, front
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta5_top.png^techage_appl_arrow.png",
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta4_bottom.png",
|
||||||
|
"techage_filling_ta4.png^techage_appl_hole_ta5_pipe2.png^techage_frame_ta5.png",
|
||||||
|
"techage_filling_ta4.png^techage_appl_hole_pipe.png^techage_frame_ta5.png",
|
||||||
|
"techage_filling_ta4.png^techage_appl_pump.png^techage_frame_ta5.png^[transformFX",
|
||||||
|
"techage_filling_ta4.png^techage_appl_pump.png^techage_frame_ta5.png",
|
||||||
|
}
|
||||||
|
|
||||||
|
local tiles_act = {
|
||||||
|
-- up, down, right, left, back, front
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta5_top.png^techage_appl_arrow.png",
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta4_bottom.png",
|
||||||
|
"techage_filling_ta4.png^techage_appl_hole_ta5_pipe2.png^techage_frame_ta5.png",
|
||||||
|
"techage_filling_ta4.png^techage_appl_hole_pipe.png^techage_frame_ta5.png",
|
||||||
|
{
|
||||||
|
image = "techage_filling8_ta4.png^techage_appl_pump8.png^techage_frame8_ta5.png^[transformFX",
|
||||||
|
backface_culling = false,
|
||||||
|
animation = {
|
||||||
|
type = "vertical_frames",
|
||||||
|
aspect_w = 32,
|
||||||
|
aspect_h = 32,
|
||||||
|
length = 2.0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
image = "techage_filling8_ta4.png^techage_appl_pump8.png^techage_frame8_ta5.png",
|
||||||
|
backface_culling = false,
|
||||||
|
animation = {
|
||||||
|
type = "vertical_frames",
|
||||||
|
aspect_w = 32,
|
||||||
|
aspect_h = 32,
|
||||||
|
length = 2.0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
minetest.register_node("techage:ta5_pump", {
|
||||||
|
description = S("TA5 Pump"),
|
||||||
|
tiles = tiles_pas,
|
||||||
|
after_place_node = after_place_node,
|
||||||
|
on_rightclick = on_rightclick,
|
||||||
|
on_timer = node_timer,
|
||||||
|
after_dig_node = after_dig_node,
|
||||||
|
on_rotate = screwdriver.disallow,
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
on_rotate = screwdriver.disallow,
|
||||||
|
groups = {cracky=2},
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = default.node_sound_metal_defaults(),
|
||||||
|
ta4_formspec = WRENCH_MENU,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("techage:ta5_pump_on", {
|
||||||
|
description = S("TA5 Pump"),
|
||||||
|
tiles = tiles_act,
|
||||||
|
--after_place_node = after_place_node4,
|
||||||
|
on_rightclick = on_rightclick,
|
||||||
|
on_timer = node_timer,
|
||||||
|
after_dig_node = after_dig_node,
|
||||||
|
on_rotate = screwdriver.disallow,
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
on_rotate = screwdriver.disallow,
|
||||||
|
diggable = false,
|
||||||
|
groups = {not_in_creative_inventory=1},
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = default.node_sound_metal_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
techage.register_node({"techage:ta5_pump", "techage:ta5_pump_on"}, {
|
||||||
|
on_recv_message = function(pos, src, topic, payload)
|
||||||
|
return State:on_receive_message(pos, topic, payload)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Pumps have to provide one output and one input side
|
||||||
|
liquid.register_nodes({
|
||||||
|
"techage:ta5_pump", "techage:ta5_pump_on",
|
||||||
|
}, Pipe2, "pump", {"L"}, {})
|
||||||
|
|
||||||
|
liquid.register_nodes({
|
||||||
|
"techage:ta5_pump", "techage:ta5_pump_on",
|
||||||
|
}, Pipe3, "pump", {"R"}, {})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "techage:ta5_pump",
|
||||||
|
recipe = {
|
||||||
|
{"techage:aluminum", "dye:red", "default:steel_ingot"},
|
||||||
|
{"techage:ta4_pipeS", "techage:ta5_ceramic_turbine", "techage:ta5_pipe1S"},
|
||||||
|
{"default:steel_ingot", "basic_materials:motor", "techage:aluminum"},
|
||||||
|
},
|
||||||
|
})
|
170
techage/fusion_reactor/turbine.lua
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
--[[
|
||||||
|
|
||||||
|
TechAge
|
||||||
|
=======
|
||||||
|
|
||||||
|
Copyright (C) 2019-2022 Joachim Stolberg
|
||||||
|
|
||||||
|
AGPL v3
|
||||||
|
See LICENSE.txt for more information
|
||||||
|
|
||||||
|
TA5 Gas Turbine
|
||||||
|
|
||||||
|
]]--
|
||||||
|
|
||||||
|
-- for lazy programmers
|
||||||
|
local M = minetest.get_meta
|
||||||
|
local S = techage.S
|
||||||
|
|
||||||
|
local Pipe = techage.LiquidPipe
|
||||||
|
|
||||||
|
local function generator_cmnd(pos, topic, payload)
|
||||||
|
return techage.transfer(pos, "R", topic, payload, nil,
|
||||||
|
{"techage:ta5_generator", "techage:ta5_generator_on"})
|
||||||
|
end
|
||||||
|
|
||||||
|
local function swap_node(pos, name)
|
||||||
|
local node = techage.get_node_lvm(pos)
|
||||||
|
if node.name == name then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
node.name = name
|
||||||
|
minetest.swap_node(pos, node)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function play_sound(pos)
|
||||||
|
local mem = techage.get_mem(pos)
|
||||||
|
if not mem.handle or mem.handle == -1 then
|
||||||
|
mem.handle = minetest.sound_play("techage_turbine", {
|
||||||
|
pos = pos,
|
||||||
|
gain = 0.4,
|
||||||
|
max_hear_distance = 10,
|
||||||
|
loop = true})
|
||||||
|
if mem.handle == -1 then
|
||||||
|
minetest.after(1, play_sound, pos)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function stop_sound(pos)
|
||||||
|
local mem = techage.get_mem(pos)
|
||||||
|
if mem.handle then
|
||||||
|
minetest.sound_stop(mem.handle)
|
||||||
|
mem.handle = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_node("techage:ta5_turbine", {
|
||||||
|
description = S("TA5 Turbine"),
|
||||||
|
tiles = {
|
||||||
|
-- up, down, right, left, back, front
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta5_top.png^techage_appl_hole_pipe.png",
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta4_bottom.png",
|
||||||
|
"techage_filling_ta4.png^techage_appl_open.png^techage_frame_ta5.png",
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta5.png^techage_appl_hole_pipe.png",
|
||||||
|
"techage_filling_ta4.png^techage_appl_turbine.png^techage_frame_ta5.png",
|
||||||
|
"techage_filling_ta4.png^techage_appl_turbine.png^techage_frame_ta5.png",
|
||||||
|
},
|
||||||
|
|
||||||
|
after_place_node = function(pos)
|
||||||
|
Pipe:after_place_node(pos)
|
||||||
|
end,
|
||||||
|
after_dig_node = function(pos, oldnode)
|
||||||
|
stop_sound(pos)
|
||||||
|
Pipe:after_dig_node(pos)
|
||||||
|
techage.del_mem(pos)
|
||||||
|
end,
|
||||||
|
networks = {
|
||||||
|
pipe2 = {},
|
||||||
|
},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {cracky=2, crumbly=2, choppy=2},
|
||||||
|
on_rotate = screwdriver.disallow,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("techage:ta5_turbine_on", {
|
||||||
|
tiles = {
|
||||||
|
-- up, down, right, left, back, front
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta5_top.png^techage_appl_hole_pipe.png",
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta4_bottom.png",
|
||||||
|
"techage_filling_ta4.png^techage_appl_open.png^techage_frame_ta5.png",
|
||||||
|
"techage_filling_ta4.png^techage_frame_ta5.png^techage_appl_hole_pipe.png",
|
||||||
|
{
|
||||||
|
image = "techage_filling4_ta4.png^techage_appl_turbine4.png^techage_frame4_ta5.png",
|
||||||
|
backface_culling = false,
|
||||||
|
animation = {
|
||||||
|
type = "vertical_frames",
|
||||||
|
aspect_w = 32,
|
||||||
|
aspect_h = 32,
|
||||||
|
length = 0.4,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
image = "techage_filling4_ta4.png^techage_appl_turbine4.png^techage_frame4_ta5.png",
|
||||||
|
backface_culling = false,
|
||||||
|
animation = {
|
||||||
|
type = "vertical_frames",
|
||||||
|
aspect_w = 32,
|
||||||
|
aspect_h = 32,
|
||||||
|
length = 0.4,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
tubelib2_on_update2 = function(pos, outdir, tlib2, node)
|
||||||
|
swap_node(pos, "techage:ta5_turbine")
|
||||||
|
stop_sound(pos)
|
||||||
|
generator_cmnd(pos, "stop")
|
||||||
|
end,
|
||||||
|
networks = {
|
||||||
|
pipe2 = {},
|
||||||
|
},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {not_in_creative_inventory=1},
|
||||||
|
diggable = false,
|
||||||
|
on_rotate = screwdriver.disallow,
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
Pipe:add_secondary_node_names({"techage:ta5_turbine", "techage:ta5_turbine_on"})
|
||||||
|
Pipe:set_valid_sides("techage:ta5_turbine", {"L", "U"})
|
||||||
|
Pipe:set_valid_sides("techage:ta5_turbine_on", {"L", "U"})
|
||||||
|
|
||||||
|
techage.register_node({"techage:ta5_turbine", "techage:ta5_turbine_on"}, {
|
||||||
|
-- used by heatexchanger1
|
||||||
|
on_transfer = function(pos, in_dir, topic, payload)
|
||||||
|
local nvm = techage.get_nvm(pos)
|
||||||
|
if topic == "trigger" then
|
||||||
|
return generator_cmnd(pos, topic, payload)
|
||||||
|
elseif topic == "start" then
|
||||||
|
swap_node(pos, "techage:ta5_turbine_on")
|
||||||
|
play_sound(pos)
|
||||||
|
return generator_cmnd(pos, topic, payload)
|
||||||
|
elseif topic == "stop" then
|
||||||
|
swap_node(pos, "techage:ta5_turbine")
|
||||||
|
stop_sound(pos)
|
||||||
|
return generator_cmnd(pos, topic, payload)
|
||||||
|
elseif topic == "turbine" then
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
return generator_cmnd(pos, topic, payload)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
on_node_load = function(pos, node)
|
||||||
|
if node.name == "techage:ta5_turbine_on" then
|
||||||
|
play_sound(pos)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "techage:ta5_turbine",
|
||||||
|
recipe = {
|
||||||
|
{"", "dye:red", ""},
|
||||||
|
{"", "techage:turbine", ""},
|
||||||
|
{"", "techage:ta5_ceramic_turbine", ""},
|
||||||
|
},
|
||||||
|
})
|
Before Width: | Height: | Size: 347 KiB After Width: | Height: | Size: 134 KiB |
Before Width: | Height: | Size: 395 KiB After Width: | Height: | Size: 139 KiB |
Before Width: | Height: | Size: 318 KiB After Width: | Height: | Size: 127 KiB |
BIN
techage/images/fusion_reactor.png
Normal file
After Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 164 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 452 KiB After Width: | Height: | Size: 186 KiB |
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 341 KiB After Width: | Height: | Size: 127 KiB |
Before Width: | Height: | Size: 453 KiB After Width: | Height: | Size: 172 KiB |
Before Width: | Height: | Size: 379 KiB After Width: | Height: | Size: 141 KiB |
@ -13,7 +13,7 @@
|
|||||||
techage = {}
|
techage = {}
|
||||||
|
|
||||||
-- Version for compatibility checks, see readme.md/history
|
-- Version for compatibility checks, see readme.md/history
|
||||||
techage.version = 1.06
|
techage.version = 1.07
|
||||||
|
|
||||||
if minetest.global_exists("tubelib") then
|
if minetest.global_exists("tubelib") then
|
||||||
minetest.log("error", "[techage] Techage can't be used together with the mod tubelib!")
|
minetest.log("error", "[techage] Techage can't be used together with the mod tubelib!")
|
||||||
@ -24,8 +24,8 @@ elseif minetest.global_exists("ironage") then
|
|||||||
elseif minetest.global_exists("techpack") then
|
elseif minetest.global_exists("techpack") then
|
||||||
minetest.log("error", "[techage] Techage can't be used together with the modpack techpack!")
|
minetest.log("error", "[techage] Techage can't be used together with the modpack techpack!")
|
||||||
return
|
return
|
||||||
elseif minetest.global_exists("tubelib2") and tubelib2.version < 1.9 then
|
elseif minetest.global_exists("tubelib2") and tubelib2.version < 2.2 then
|
||||||
minetest.log("error", "[techage] Techage requires tubelib2 version 1.9 or newer!")
|
minetest.log("error", "[techage] Techage requires tubelib2 version 2.2 or newer!")
|
||||||
return
|
return
|
||||||
elseif minetest.global_exists("minecart") and minecart.version < 1.08 then
|
elseif minetest.global_exists("minecart") and minecart.version < 1.08 then
|
||||||
minetest.log("error", "[techage] Techage requires minecart version 1.08 or newer!")
|
minetest.log("error", "[techage] Techage requires minecart version 1.08 or newer!")
|
||||||
@ -172,6 +172,8 @@ dofile(MP.."/ta2_energy_storage/ta2_weight_chest.lua")
|
|||||||
dofile(MP.."/liquids/liquid_pipe.lua")
|
dofile(MP.."/liquids/liquid_pipe.lua")
|
||||||
dofile(MP.."/liquids/valve.lua")
|
dofile(MP.."/liquids/valve.lua")
|
||||||
dofile(MP.."/liquids/pipe_wall_entry.lua")
|
dofile(MP.."/liquids/pipe_wall_entry.lua")
|
||||||
|
dofile(MP.."/fusion_reactor/gas_pipe.lua")
|
||||||
|
|
||||||
|
|
||||||
-- Basic Machines
|
-- Basic Machines
|
||||||
dofile(MP.."/basic_machines/consumer.lua") -- consumer base model
|
dofile(MP.."/basic_machines/consumer.lua") -- consumer base model
|
||||||
@ -228,6 +230,7 @@ dofile(MP.."/tools/repairkit.lua")
|
|||||||
dofile(MP.."/tools/pipe_wrench.lua")
|
dofile(MP.."/tools/pipe_wrench.lua")
|
||||||
dofile(MP.."/basic_machines/blackhole.lua")
|
dofile(MP.."/basic_machines/blackhole.lua")
|
||||||
dofile(MP.."/basic_machines/forceload.lua")
|
dofile(MP.."/basic_machines/forceload.lua")
|
||||||
|
dofile(MP.."/tools/screwdriver.lua")
|
||||||
|
|
||||||
-- Lamps
|
-- Lamps
|
||||||
dofile(MP.."/lamps/lib.lua")
|
dofile(MP.."/lamps/lib.lua")
|
||||||
@ -386,7 +389,7 @@ dofile(MP.."/items/moreblocks.lua")
|
|||||||
dofile(MP.."/carts/tank_cart.lua")
|
dofile(MP.."/carts/tank_cart.lua")
|
||||||
dofile(MP.."/carts/chest_cart.lua")
|
dofile(MP.."/carts/chest_cart.lua")
|
||||||
|
|
||||||
-- Collider
|
-- TA4 Collider
|
||||||
dofile(MP.."/collider/vacuumtube.lua")
|
dofile(MP.."/collider/vacuumtube.lua")
|
||||||
dofile(MP.."/collider/magnet.lua")
|
dofile(MP.."/collider/magnet.lua")
|
||||||
dofile(MP.."/collider/inlets.lua")
|
dofile(MP.."/collider/inlets.lua")
|
||||||
@ -394,9 +397,20 @@ dofile(MP.."/collider/cooler.lua")
|
|||||||
dofile(MP.."/collider/detector.lua")
|
dofile(MP.."/collider/detector.lua")
|
||||||
dofile(MP.."/collider/worker.lua")
|
dofile(MP.."/collider/worker.lua")
|
||||||
|
|
||||||
|
-- TA5 Teleport
|
||||||
dofile(MP.."/teleport/teleport_tube.lua")
|
dofile(MP.."/teleport/teleport_tube.lua")
|
||||||
dofile(MP.."/teleport/teleport_pipe.lua")
|
dofile(MP.."/teleport/teleport_pipe.lua")
|
||||||
|
|
||||||
|
-- TA5 Fusion Reactor
|
||||||
|
dofile(MP.."/fusion_reactor/shell.lua")
|
||||||
|
dofile(MP.."/fusion_reactor/magnet.lua")
|
||||||
|
dofile(MP.."/fusion_reactor/controller.lua")
|
||||||
|
dofile(MP.."/fusion_reactor/heatexchanger3.lua")
|
||||||
|
dofile(MP.."/fusion_reactor/heatexchanger2.lua")
|
||||||
|
dofile(MP.."/fusion_reactor/heatexchanger1.lua")
|
||||||
|
dofile(MP.."/fusion_reactor/generator.lua")
|
||||||
|
dofile(MP.."/fusion_reactor/turbine.lua")
|
||||||
|
dofile(MP.."/fusion_reactor/ta5_pump.lua")
|
||||||
|
|
||||||
-- Prevent other mods from using IE
|
-- Prevent other mods from using IE
|
||||||
techage.IE = nil
|
techage.IE = nil
|
||||||
|
@ -59,6 +59,11 @@ minetest.register_craftitem("techage:ta4_round_ceramic", {
|
|||||||
inventory_image = "techage_round_ceramic.png",
|
inventory_image = "techage_round_ceramic.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("techage:ta5_ceramic_turbine", {
|
||||||
|
description = S("TA5 Ceramic Turbine"),
|
||||||
|
inventory_image = "techage_ceramic_turbine.png",
|
||||||
|
})
|
||||||
|
|
||||||
techage.furnace.register_recipe({
|
techage.furnace.register_recipe({
|
||||||
output = "techage:ta4_round_ceramic 2",
|
output = "techage:ta4_round_ceramic 2",
|
||||||
recipe = {
|
recipe = {
|
||||||
@ -67,3 +72,13 @@ techage.furnace.register_recipe({
|
|||||||
},
|
},
|
||||||
time = 16,
|
time = 16,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
techage.furnace.register_recipe({
|
||||||
|
output = "techage:ta5_ceramic_turbine",
|
||||||
|
recipe = {
|
||||||
|
"techage:ta4_ceramic_material",
|
||||||
|
"techage:ta4_ceramic_material",
|
||||||
|
"techage:graphite_powder",
|
||||||
|
},
|
||||||
|
time = 16,
|
||||||
|
})
|
||||||
|
@ -41,7 +41,12 @@ minetest.register_craftitem("techage:ta4_leds", {
|
|||||||
|
|
||||||
minetest.register_craftitem("techage:ta5_aichip", {
|
minetest.register_craftitem("techage:ta5_aichip", {
|
||||||
description = S("TA5 AI Chip"),
|
description = S("TA5 AI Chip"),
|
||||||
inventory_image = "techage_aichip.png",
|
inventory_image = "techage_aichip.png^[colorize:#48b9de:40",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("techage:ta5_aichip2", {
|
||||||
|
description = S("TA5 AI Chip II"),
|
||||||
|
inventory_image = "techage_aichip.png^[colorize:#de486c:40",
|
||||||
})
|
})
|
||||||
|
|
||||||
techage.recipes.add("ta2_electronic_fab", {
|
techage.recipes.add("ta2_electronic_fab", {
|
||||||
@ -84,3 +89,9 @@ techage.recipes.add("ta4_electronic_fab", {
|
|||||||
input = {"techage:ta4_leds 8", "basic_materials:copper_wire 1", "basic_materials:gold_wire 1", "techage:ta4_silicon_wafer 1"},
|
input = {"techage:ta4_leds 8", "basic_materials:copper_wire 1", "basic_materials:gold_wire 1", "techage:ta4_silicon_wafer 1"},
|
||||||
ex_points = 10,
|
ex_points = 10,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
techage.recipes.add("ta4_electronic_fab", {
|
||||||
|
output = "techage:ta5_aichip2 2",
|
||||||
|
input = {"techage:ta4_leds 8", "basic_materials:copper_wire 1", "basic_materials:gold_wire 1", "techage:ta4_silicon_wafer 1"},
|
||||||
|
ex_points = 50,
|
||||||
|
})
|
||||||
|
@ -50,6 +50,12 @@ minetest.register_craftitem("techage:silver_sandstone_powder", {
|
|||||||
groups = {powder = 1},
|
groups = {powder = 1},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("techage:graphite_powder", {
|
||||||
|
description = S("Graphite Powder"),
|
||||||
|
inventory_image = "techage_powder_inv.png^[colorize:#000000:160",
|
||||||
|
groups = {powder = 1},
|
||||||
|
})
|
||||||
|
|
||||||
techage.add_grinder_recipe({input="default:acacia_bush_leaves", output="techage:leave_powder"})
|
techage.add_grinder_recipe({input="default:acacia_bush_leaves", output="techage:leave_powder"})
|
||||||
techage.add_grinder_recipe({input="default:acacia_leaves", output="techage:leave_powder"})
|
techage.add_grinder_recipe({input="default:acacia_leaves", output="techage:leave_powder"})
|
||||||
techage.add_grinder_recipe({input="default:aspen_leaves", output="techage:leave_powder"})
|
techage.add_grinder_recipe({input="default:aspen_leaves", output="techage:leave_powder"})
|
||||||
@ -62,4 +68,5 @@ techage.add_grinder_recipe({input="default:iron_lump", output="techage:iron_powd
|
|||||||
techage.add_grinder_recipe({input="default:clay", output="techage:clay_powder"})
|
techage.add_grinder_recipe({input="default:clay", output="techage:clay_powder"})
|
||||||
techage.add_grinder_recipe({input="techage:aluminum", output="techage:aluminum_powder"})
|
techage.add_grinder_recipe({input="techage:aluminum", output="techage:aluminum_powder"})
|
||||||
techage.add_grinder_recipe({input="default:silver_sandstone", output="techage:silver_sandstone_powder"})
|
techage.add_grinder_recipe({input="default:silver_sandstone", output="techage:silver_sandstone_powder"})
|
||||||
|
techage.add_grinder_recipe({input="default:coal_lump", output="techage:graphite_powder"})
|
||||||
|
|
||||||
|
@ -38,3 +38,30 @@ minetest.register_on_mods_loaded(function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
minetest.override_item("default:gravel", {groups = {crumbly = 2, gravel = 1, falling_node = 1}})
|
minetest.override_item("default:gravel", {groups = {crumbly = 2, gravel = 1, falling_node = 1}})
|
||||||
|
|
||||||
|
-- Register all known mobs mods for the move/fly controllers
|
||||||
|
techage.register_mobs_mods("ts_skins_dummies")
|
||||||
|
techage.register_mobs_mods("mobs")
|
||||||
|
techage.register_mobs_mods("draconis")
|
||||||
|
techage.register_mobs_mods("mobkit")
|
||||||
|
techage.register_mobs_mods("animalia")
|
||||||
|
techage.register_mobs_mods("mobs_animal")
|
||||||
|
techage.register_mobs_mods("mobs_monster")
|
||||||
|
techage.register_mobs_mods("dmobs")
|
||||||
|
techage.register_mobs_mods("mob_horse")
|
||||||
|
techage.register_mobs_mods("petz")
|
||||||
|
techage.register_mobs_mods("mobs_npc")
|
||||||
|
techage.register_mobs_mods("livingnether")
|
||||||
|
techage.register_mobs_mods("extra_mobs")
|
||||||
|
techage.register_mobs_mods("nssm")
|
||||||
|
techage.register_mobs_mods("goblins")
|
||||||
|
techage.register_mobs_mods("animalworld")
|
||||||
|
techage.register_mobs_mods("aliveai")
|
||||||
|
techage.register_mobs_mods("people")
|
||||||
|
techage.register_mobs_mods("paleotest")
|
||||||
|
techage.register_mobs_mods("mobs_balrog")
|
||||||
|
techage.register_mobs_mods("wildlife")
|
||||||
|
techage.register_mobs_mods("mobs_skeletons")
|
||||||
|
techage.register_mobs_mods("mobs_dwarves")
|
||||||
|
techage.register_mobs_mods("mobf_trader")
|
||||||
|
techage.register_mobs_mods("ts_vehicles")
|
||||||
|
@ -20,7 +20,7 @@ local S = techage.S
|
|||||||
|
|
||||||
local MAX_PIPE_LENGHT = 100
|
local MAX_PIPE_LENGHT = 100
|
||||||
|
|
||||||
local power = networks.power
|
local liquid = networks.liquid
|
||||||
|
|
||||||
local Pipe = tubelib2.Tube:new({
|
local Pipe = tubelib2.Tube:new({
|
||||||
dirs_to_check = {1,2,3,4,5,6},
|
dirs_to_check = {1,2,3,4,5,6},
|
||||||
@ -47,7 +47,7 @@ local Pipe = tubelib2.Tube:new({
|
|||||||
|
|
||||||
-- Use global callback instead of node related functions
|
-- Use global callback instead of node related functions
|
||||||
Pipe:register_on_tube_update2(function(pos, outdir, tlib2, node)
|
Pipe:register_on_tube_update2(function(pos, outdir, tlib2, node)
|
||||||
power.update_network(pos, outdir, tlib2, node)
|
liquid.update_network(pos, outdir, tlib2, node)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
minetest.register_node("techage:ta3_pipeS", {
|
minetest.register_node("techage:ta3_pipeS", {
|
||||||
@ -172,14 +172,14 @@ local names = networks.register_junction("techage:ta3_junctionpipe", 1/8, Boxes,
|
|||||||
tubelib2_on_update2 = function(pos, dir1, tlib2, node)
|
tubelib2_on_update2 = function(pos, dir1, tlib2, node)
|
||||||
local name = "techage:ta3_junctionpipe" .. networks.junction_type(pos, Pipe)
|
local name = "techage:ta3_junctionpipe" .. networks.junction_type(pos, Pipe)
|
||||||
minetest.swap_node(pos, {name = name, param2 = 0})
|
minetest.swap_node(pos, {name = name, param2 = 0})
|
||||||
power.update_network(pos, 0, tlib2, node)
|
liquid.update_network(pos, 0, tlib2, node)
|
||||||
end,
|
end,
|
||||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||||
Pipe:after_dig_node(pos)
|
Pipe:after_dig_node(pos)
|
||||||
end,
|
end,
|
||||||
}, 25)
|
}, 25)
|
||||||
|
|
||||||
power.register_nodes(names, Pipe, "junc")
|
liquid.register_nodes(names, Pipe, "junc")
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "techage:ta3_junctionpipe25 2",
|
output = "techage:ta3_junctionpipe25 2",
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
TechAge
|
TechAge
|
||||||
=======
|
=======
|
||||||
|
|
||||||
Copyright (C) 2019-2021 Joachim Stolberg
|
Copyright (C) 2019-2022 Joachim Stolberg
|
||||||
|
|
||||||
AGPL v3
|
AGPL v3
|
||||||
See LICENSE.txt for more information
|
See LICENSE.txt for more information
|
||||||
@ -66,7 +66,7 @@ local function pumping(pos, nvm, state, capa)
|
|||||||
state:blocked(pos, nvm)
|
state:blocked(pos, nvm)
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
state:keep_running(pos, nvm, COUNTDOWN_TICKS)
|
state:keep_running(pos, nvm, COUNTDOWN_TICKS)
|
||||||
return taken - leftover
|
return taken - leftover
|
||||||
end
|
end
|
||||||
state:keep_running(pos, nvm, COUNTDOWN_TICKS)
|
state:keep_running(pos, nvm, COUNTDOWN_TICKS)
|
||||||
@ -133,7 +133,7 @@ end
|
|||||||
local ta3_tiles_pas = {
|
local ta3_tiles_pas = {
|
||||||
-- up, down, right, left, back, front
|
-- up, down, right, left, back, front
|
||||||
"techage_filling_ta3.png^techage_frame_ta3_top.png^techage_appl_arrow.png",
|
"techage_filling_ta3.png^techage_frame_ta3_top.png^techage_appl_arrow.png",
|
||||||
"techage_filling_ta3.png^techage_frame_ta3.png",
|
"techage_filling_ta3.png^techage_frame_ta3_bottom.png",
|
||||||
"techage_filling_ta3.png^techage_appl_hole_pipe.png^techage_frame_ta3.png",
|
"techage_filling_ta3.png^techage_appl_hole_pipe.png^techage_frame_ta3.png",
|
||||||
"techage_filling_ta3.png^techage_appl_hole_pipe.png^techage_frame_ta3.png",
|
"techage_filling_ta3.png^techage_appl_hole_pipe.png^techage_frame_ta3.png",
|
||||||
"techage_filling_ta3.png^techage_appl_pump.png^techage_frame_ta3.png^[transformFX",
|
"techage_filling_ta3.png^techage_appl_pump.png^techage_frame_ta3.png^[transformFX",
|
||||||
@ -143,7 +143,7 @@ local ta3_tiles_pas = {
|
|||||||
local ta4_tiles_pas = {
|
local ta4_tiles_pas = {
|
||||||
-- up, down, right, left, back, front
|
-- up, down, right, left, back, front
|
||||||
"techage_filling_ta4.png^techage_frame_ta4_top.png^techage_appl_arrow.png",
|
"techage_filling_ta4.png^techage_frame_ta4_top.png^techage_appl_arrow.png",
|
||||||
"techage_filling_ta4.png^techage_frame_ta4.png",
|
"techage_filling_ta4.png^techage_frame_ta4_bottom.png",
|
||||||
"techage_filling_ta4.png^techage_appl_hole_pipe.png^techage_frame_ta4.png",
|
"techage_filling_ta4.png^techage_appl_hole_pipe.png^techage_frame_ta4.png",
|
||||||
"techage_filling_ta4.png^techage_appl_hole_pipe.png^techage_frame_ta4.png",
|
"techage_filling_ta4.png^techage_appl_hole_pipe.png^techage_frame_ta4.png",
|
||||||
"techage_filling_ta4.png^techage_appl_pump.png^techage_frame_ta4.png^[transformFX",
|
"techage_filling_ta4.png^techage_appl_pump.png^techage_frame_ta4.png^[transformFX",
|
||||||
@ -153,7 +153,7 @@ local ta4_tiles_pas = {
|
|||||||
local ta3_tiles_act = {
|
local ta3_tiles_act = {
|
||||||
-- up, down, right, left, back, front
|
-- up, down, right, left, back, front
|
||||||
"techage_filling_ta3.png^techage_frame_ta3_top.png^techage_appl_arrow.png",
|
"techage_filling_ta3.png^techage_frame_ta3_top.png^techage_appl_arrow.png",
|
||||||
"techage_filling_ta3.png^techage_frame_ta3.png",
|
"techage_filling_ta3.png^techage_frame_ta3_bottom.png",
|
||||||
"techage_filling_ta3.png^techage_appl_hole_pipe.png^techage_frame_ta3.png",
|
"techage_filling_ta3.png^techage_appl_hole_pipe.png^techage_frame_ta3.png",
|
||||||
"techage_filling_ta3.png^techage_appl_hole_pipe.png^techage_frame_ta3.png",
|
"techage_filling_ta3.png^techage_appl_hole_pipe.png^techage_frame_ta3.png",
|
||||||
{
|
{
|
||||||
@ -181,7 +181,7 @@ local ta3_tiles_act = {
|
|||||||
local ta4_tiles_act = {
|
local ta4_tiles_act = {
|
||||||
-- up, down, right, left, back, front
|
-- up, down, right, left, back, front
|
||||||
"techage_filling_ta4.png^techage_frame_ta4_top.png^techage_appl_arrow.png",
|
"techage_filling_ta4.png^techage_frame_ta4_top.png^techage_appl_arrow.png",
|
||||||
"techage_filling_ta4.png^techage_frame_ta4.png",
|
"techage_filling_ta4.png^techage_frame_ta4_bottom.png",
|
||||||
"techage_filling_ta4.png^techage_appl_hole_pipe.png^techage_frame_ta4.png",
|
"techage_filling_ta4.png^techage_appl_hole_pipe.png^techage_frame_ta4.png",
|
||||||
"techage_filling_ta4.png^techage_appl_hole_pipe.png^techage_frame_ta4.png",
|
"techage_filling_ta4.png^techage_appl_hole_pipe.png^techage_frame_ta4.png",
|
||||||
{
|
{
|
||||||
|
@ -91,7 +91,7 @@ minetest.register_node("techage:ta3_tank", {
|
|||||||
tiles = {
|
tiles = {
|
||||||
-- up, down, right, left, back, front
|
-- up, down, right, left, back, front
|
||||||
"techage_filling_ta3.png^techage_frame_ta3_top.png",
|
"techage_filling_ta3.png^techage_frame_ta3_top.png",
|
||||||
"techage_filling_ta3.png^techage_frame_ta3.png",
|
"techage_filling_ta3.png^techage_frame_ta3_bottom.png",
|
||||||
"techage_filling_ta3.png^techage_frame_ta3.png^techage_appl_tank.png",
|
"techage_filling_ta3.png^techage_frame_ta3.png^techage_appl_tank.png",
|
||||||
"techage_filling_ta3.png^techage_frame_ta3.png^techage_appl_tank.png",
|
"techage_filling_ta3.png^techage_frame_ta3.png^techage_appl_tank.png",
|
||||||
"techage_filling_ta3.png^techage_frame_ta3.png^techage_appl_tank.png",
|
"techage_filling_ta3.png^techage_frame_ta3.png^techage_appl_tank.png",
|
||||||
@ -197,7 +197,7 @@ minetest.register_node("techage:ta4_tank", {
|
|||||||
tiles = {
|
tiles = {
|
||||||
-- up, down, right, left, back, front
|
-- up, down, right, left, back, front
|
||||||
"techage_filling_ta4.png^techage_frame_ta4_top.png",
|
"techage_filling_ta4.png^techage_frame_ta4_top.png",
|
||||||
"techage_filling_ta4.png^techage_frame_ta4.png",
|
"techage_filling_ta4.png^techage_frame_ta4_bottom.png",
|
||||||
"techage_filling_ta4.png^techage_frame_ta4.png^techage_appl_tank.png",
|
"techage_filling_ta4.png^techage_frame_ta4.png^techage_appl_tank.png",
|
||||||
"techage_filling_ta4.png^techage_frame_ta4.png^techage_appl_tank.png",
|
"techage_filling_ta4.png^techage_frame_ta4.png^techage_appl_tank.png",
|
||||||
"techage_filling_ta4.png^techage_frame_ta4.png^techage_appl_tank.png",
|
"techage_filling_ta4.png^techage_frame_ta4.png^techage_appl_tank.png",
|
||||||
|
@ -97,6 +97,10 @@ TA3 Boiler Base=TA3 Boiler unten
|
|||||||
|
|
||||||
To add water punch@nthe boiler@nwith a water bucket=Um Wasser nachzufüllen,@nschlage mit einem Wassereimer@nauf den Block
|
To add water punch@nthe boiler@nwith a water bucket=Um Wasser nachzufüllen,@nschlage mit einem Wassereimer@nauf den Block
|
||||||
Water Boiler=Wasserboiler
|
Water Boiler=Wasserboiler
|
||||||
|
|
||||||
|
### boiler_lib.lua ###
|
||||||
|
### heatexchanger2.lua ###
|
||||||
|
|
||||||
water temperature=Wassertemperatur
|
water temperature=Wassertemperatur
|
||||||
|
|
||||||
### boiler_top.lua ###
|
### boiler_top.lua ###
|
||||||
@ -197,6 +201,7 @@ Cement Powder=Zement Pulver
|
|||||||
TA4 Ceramic Material=TA4 Keramik Material
|
TA4 Ceramic Material=TA4 Keramik Material
|
||||||
TA4 Furnace Ceramic=TA4 Ofen Keramik
|
TA4 Furnace Ceramic=TA4 Ofen Keramik
|
||||||
TA4 Round Ceramic=TA4 Rund-Keramik
|
TA4 Round Ceramic=TA4 Rund-Keramik
|
||||||
|
TA5 Ceramic Turbine=TA5 Keramikturbine
|
||||||
|
|
||||||
### charcoalpile.lua ###
|
### charcoalpile.lua ###
|
||||||
|
|
||||||
@ -232,6 +237,20 @@ TA4 State Collector=TA4 Zuständesammler
|
|||||||
TA4 Tube Concentrator=TA4 Röhren Konzentrator
|
TA4 Tube Concentrator=TA4 Röhren Konzentrator
|
||||||
Tube Concentrator=Röhren Konzentrator
|
Tube Concentrator=Röhren Konzentrator
|
||||||
|
|
||||||
|
### controller.lua ###
|
||||||
|
|
||||||
|
Cooling failed=Kühlung ausgefallen
|
||||||
|
Magnet detection error@n(@1% found / 100% expected)=Magneterkennungsfehler@n(@1% erkannt / 100% erwartet)
|
||||||
|
Nucleus detection error=Kern nicht erkannt
|
||||||
|
Plasma ring shape error=Formfehler des Plasmarings
|
||||||
|
Shell shape error@n(@1% found / 100% expected)=Hüllenformfehler@n(@1% erkannt / 100% erwartet)
|
||||||
|
TA5 Fusion Reactor Controller=TA5 Fusionsreaktor Controller
|
||||||
|
|
||||||
|
### controller.lua ###
|
||||||
|
### heatexchanger2.lua ###
|
||||||
|
|
||||||
|
No power=Kein Strom
|
||||||
|
|
||||||
### cooking.lua ###
|
### cooking.lua ###
|
||||||
|
|
||||||
TA3 Melting=TA3 Schmelzen
|
TA3 Melting=TA3 Schmelzen
|
||||||
@ -383,6 +402,7 @@ TA4 LEDs=TA4 LEDs
|
|||||||
TA4 RAM Chip=RAM Chip
|
TA4 RAM Chip=RAM Chip
|
||||||
TA4 WLAN Chip=TA4 WLAN Chip
|
TA4 WLAN Chip=TA4 WLAN Chip
|
||||||
TA5 AI Chip=TA5 KI Chip
|
TA5 AI Chip=TA5 KI Chip
|
||||||
|
TA5 AI Chip II=TA5 KI Chip II
|
||||||
WLAN Chip=WLAN Chip
|
WLAN Chip=WLAN Chip
|
||||||
|
|
||||||
### electronic_fab.lua ###
|
### electronic_fab.lua ###
|
||||||
@ -523,6 +543,11 @@ Furnace Top=Ofenoberteil
|
|||||||
Outp=Ergeb.
|
Outp=Ergeb.
|
||||||
no fuel or no power=kein Strom oder Brennstoff
|
no fuel or no power=kein Strom oder Brennstoff
|
||||||
|
|
||||||
|
### gas_pipe.lua ###
|
||||||
|
|
||||||
|
TA5 Junction Pipe=TA5 Leitungskupplung
|
||||||
|
TA5 Pipe=TA5 Leitung
|
||||||
|
|
||||||
### gateblock.lua ###
|
### gateblock.lua ###
|
||||||
|
|
||||||
TechAge Gate Block=TechAge Torblock
|
TechAge Gate Block=TechAge Torblock
|
||||||
@ -535,6 +560,7 @@ TA2 Gearbox=TA2 Getriebeblock
|
|||||||
|
|
||||||
TA3 Generator=TA3 Generator
|
TA3 Generator=TA3 Generator
|
||||||
TA4 Generator=TA4 Generator
|
TA4 Generator=TA4 Generator
|
||||||
|
TA5 Generator=TA5 Generator
|
||||||
|
|
||||||
### generator.lua ###
|
### generator.lua ###
|
||||||
### power_terminal2.lua ###
|
### power_terminal2.lua ###
|
||||||
@ -571,6 +597,7 @@ TA4 LED Grow Light=TA4 LED Pflanzenlampe
|
|||||||
|
|
||||||
No plan available=Kein Plan verfügar
|
No plan available=Kein Plan verfügar
|
||||||
Plan=Plan
|
Plan=Plan
|
||||||
|
Sectional view=Schnittbild
|
||||||
Side view=Seitenansicht
|
Side view=Seitenansicht
|
||||||
Top view=Draufsicht
|
Top view=Draufsicht
|
||||||
|
|
||||||
@ -590,13 +617,18 @@ TA4 Furnace Heater=TA4 Ofenheizung
|
|||||||
### heatexchanger1.lua ###
|
### heatexchanger1.lua ###
|
||||||
|
|
||||||
TA4 Heat Exchanger 1=TA4 Wärmetauscher 1
|
TA4 Heat Exchanger 1=TA4 Wärmetauscher 1
|
||||||
|
TA5 Heat Exchanger 1=TA5 Wärmetauscher 1
|
||||||
|
|
||||||
### heatexchanger2.lua ###
|
### heatexchanger2.lua ###
|
||||||
|
|
||||||
No power=Kein Strom
|
Blue pipe connection error@n(@1 found / @2 expected)=Verbindungsfehler blaue Leitung@n(@1 erkannt / @2 erwartet)
|
||||||
|
Cooler error=Kühlungsfehler
|
||||||
|
Green pipe connection error@n(@1 found / @2 expected)=Verbindungsfehler grüne Leitung@n(@1 erkannt / @2 erwartet)
|
||||||
Power network connection error=Stromnetz Verbindungsfehler
|
Power network connection error=Stromnetz Verbindungsfehler
|
||||||
TA4 Heat Exchanger=TA4 Wärmetauscher
|
TA4 Heat Exchanger=TA4 Wärmetauscher
|
||||||
TA4 Heat Exchanger 2=TA4 Wärmetauscher 2
|
TA4 Heat Exchanger 2=TA4 Wärmetauscher 2
|
||||||
|
TA5 Heat Exchanger 2=TA5 Wärmetauscher 2
|
||||||
|
Turbine error=
|
||||||
did you check the plan?=hast du den Plan geprüft?
|
did you check the plan?=hast du den Plan geprüft?
|
||||||
inlet/pipe error=Einlass/Leitungsfehler
|
inlet/pipe error=Einlass/Leitungsfehler
|
||||||
wrong storage diameter=Falscher Wärmespeicher-Durchmesser
|
wrong storage diameter=Falscher Wärmespeicher-Durchmesser
|
||||||
@ -604,6 +636,7 @@ wrong storage diameter=Falscher Wärmespeicher-Durchmesser
|
|||||||
### heatexchanger3.lua ###
|
### heatexchanger3.lua ###
|
||||||
|
|
||||||
TA4 Heat Exchanger 3=TA4 Wärmetauscher 3
|
TA4 Heat Exchanger 3=TA4 Wärmetauscher 3
|
||||||
|
TA5 Heat Exchanger 3=TA5 Wärmetauscher 3
|
||||||
|
|
||||||
### hydrogen.lua ###
|
### hydrogen.lua ###
|
||||||
|
|
||||||
@ -770,6 +803,10 @@ TA4 Collider Detector Magnet=TA4 Collider Detektormagnet
|
|||||||
TA4 Collider Magnet=TA4 Collider Magnet
|
TA4 Collider Magnet=TA4 Collider Magnet
|
||||||
TA4 Collider Magnet Base=TA4 Collider Magnetfuß
|
TA4 Collider Magnet Base=TA4 Collider Magnetfuß
|
||||||
TA4 Collider Steel Block=TA4 Collider Stahlblock
|
TA4 Collider Steel Block=TA4 Collider Stahlblock
|
||||||
|
TA5 Fusion Reactor Magnet 1=TA5 Fusionsreaktor Magnet 1
|
||||||
|
TA5 Fusion Reactor Magnet 2=TA5 Fusionsreaktor Magnet 2
|
||||||
|
TA5 Fusion Reactor Magnet Blank=TA5 Fusionsreaktor Magnetrohling
|
||||||
|
TA5 Fusion Reactor Magnet Shield=TA5 Fusionsreaktor Magnetschild
|
||||||
|
|
||||||
### mba_detector.lua ###
|
### mba_detector.lua ###
|
||||||
|
|
||||||
@ -906,6 +943,7 @@ TA4 Player Detector=TA4 Spieler Detektor
|
|||||||
|
|
||||||
Aluminum Powder=Aluminium Pulver
|
Aluminum Powder=Aluminium Pulver
|
||||||
Clay Powder=Ton Pulver
|
Clay Powder=Ton Pulver
|
||||||
|
Graphite Powder=Graphitpulver
|
||||||
Iron Powder=Eisen Pulver
|
Iron Powder=Eisen Pulver
|
||||||
Leave Powder=Laub Pulver
|
Leave Powder=Laub Pulver
|
||||||
Needle Powder=Nadel Pulver
|
Needle Powder=Nadel Pulver
|
||||||
@ -967,6 +1005,10 @@ Allow to dig/place Techage power lines nearby power poles=Erlaubt TODO
|
|||||||
|
|
||||||
TA3 Pump=TA3 Pumpe
|
TA3 Pump=TA3 Pumpe
|
||||||
TA4 Pump=TA4 Pumpe
|
TA4 Pump=TA4 Pumpe
|
||||||
|
|
||||||
|
### pump.lua ###
|
||||||
|
### ta5_pump.lua ###
|
||||||
|
|
||||||
Total flow rate=Gesamtdurchfluss
|
Total flow rate=Gesamtdurchfluss
|
||||||
Total flow rate in liquid units=Gesamtdurchfluss in Flüssigkeitseinheiten
|
Total flow rate in liquid units=Gesamtdurchfluss in Flüssigkeitseinheiten
|
||||||
|
|
||||||
@ -1049,6 +1091,11 @@ TA4 Rotor Blade=TA4 Rotorblatt
|
|||||||
TA4 Wind Turbine=TA4 Windkraftanlage
|
TA4 Wind Turbine=TA4 Windkraftanlage
|
||||||
TA4 Wind Turbine Nacelle=TA4 Windkraftanlagengondel
|
TA4 Wind Turbine Nacelle=TA4 Windkraftanlagengondel
|
||||||
|
|
||||||
|
### screwdriver.lua ###
|
||||||
|
|
||||||
|
Block alignment stored!=Blockausrichtung gespeichert!
|
||||||
|
Techage Screwdriver@n(See: TA3 > Tools)=Techage Schraubendreher@n(Siehe: TA3 > Werkzeuge)
|
||||||
|
|
||||||
### sensorchest.lua ###
|
### sensorchest.lua ###
|
||||||
|
|
||||||
Allow public chest access=Erlaube öffentlichen Zugriff
|
Allow public chest access=Erlaube öffentlichen Zugriff
|
||||||
@ -1089,6 +1136,11 @@ the timeslot when the command is executed.@n=der Zeitpunkt, wenn der Befehl ausg
|
|||||||
|
|
||||||
Cancel=Abbruch
|
Cancel=Abbruch
|
||||||
|
|
||||||
|
### shell.lua ###
|
||||||
|
|
||||||
|
TA5 Fusion Reactor Nucleus=TA5 Fusionsreaktor Kern
|
||||||
|
TA5 Fusion Reactor Shell=TA5 Fusionsreaktor Hülle
|
||||||
|
|
||||||
### signallamp.lua ###
|
### signallamp.lua ###
|
||||||
|
|
||||||
TA4 Wind Turbine Signal Lamp=TA4 Windkraftanlagenlampe
|
TA4 Wind Turbine Signal Lamp=TA4 Windkraftanlagenlampe
|
||||||
@ -1257,6 +1309,10 @@ no power=kein Strom
|
|||||||
|
|
||||||
TA5 Hyperloop Chest=TA5 Hyperloop Kiste
|
TA5 Hyperloop Chest=TA5 Hyperloop Kiste
|
||||||
|
|
||||||
|
### ta5_pump.lua ###
|
||||||
|
|
||||||
|
TA5 Pump=TA5 Pumpe
|
||||||
|
|
||||||
### ta5_tank.lua ###
|
### ta5_tank.lua ###
|
||||||
|
|
||||||
TA5 Hyperloop Tank=TA5 Hyperloop Tank
|
TA5 Hyperloop Tank=TA5 Hyperloop Tank
|
||||||
@ -1343,6 +1399,7 @@ TA4 Tube=TA4 Röhre
|
|||||||
|
|
||||||
TA3 Turbine=TA3 Turbine
|
TA3 Turbine=TA3 Turbine
|
||||||
TA4 Turbine=TA4 Turbine
|
TA4 Turbine=TA4 Turbine
|
||||||
|
TA5 Turbine=TA5 Turbine
|
||||||
|
|
||||||
### turncontroller.lua ###
|
### turncontroller.lua ###
|
||||||
|
|
||||||
|
@ -97,6 +97,10 @@ TA3 Boiler Base=
|
|||||||
|
|
||||||
To add water punch@nthe boiler@nwith a water bucket=
|
To add water punch@nthe boiler@nwith a water bucket=
|
||||||
Water Boiler=
|
Water Boiler=
|
||||||
|
|
||||||
|
### boiler_lib.lua ###
|
||||||
|
### heatexchanger2.lua ###
|
||||||
|
|
||||||
water temperature=
|
water temperature=
|
||||||
|
|
||||||
### boiler_top.lua ###
|
### boiler_top.lua ###
|
||||||
@ -197,6 +201,7 @@ Cement Powder=
|
|||||||
TA4 Ceramic Material=
|
TA4 Ceramic Material=
|
||||||
TA4 Furnace Ceramic=
|
TA4 Furnace Ceramic=
|
||||||
TA4 Round Ceramic=
|
TA4 Round Ceramic=
|
||||||
|
TA5 Ceramic Turbine=
|
||||||
|
|
||||||
### charcoalpile.lua ###
|
### charcoalpile.lua ###
|
||||||
|
|
||||||
@ -232,6 +237,20 @@ TA4 State Collector=
|
|||||||
TA4 Tube Concentrator=
|
TA4 Tube Concentrator=
|
||||||
Tube Concentrator=
|
Tube Concentrator=
|
||||||
|
|
||||||
|
### controller.lua ###
|
||||||
|
|
||||||
|
Cooling failed=
|
||||||
|
Magnet detection error@n(@1% found / 100% expected)=
|
||||||
|
Nucleus detection error=
|
||||||
|
Plasma ring shape error=
|
||||||
|
Shell shape error@n(@1% found / 100% expected)=
|
||||||
|
TA5 Fusion Reactor Controller=
|
||||||
|
|
||||||
|
### controller.lua ###
|
||||||
|
### heatexchanger2.lua ###
|
||||||
|
|
||||||
|
No power=
|
||||||
|
|
||||||
### cooking.lua ###
|
### cooking.lua ###
|
||||||
|
|
||||||
TA3 Melting=
|
TA3 Melting=
|
||||||
@ -383,6 +402,7 @@ TA4 LEDs=
|
|||||||
TA4 RAM Chip=
|
TA4 RAM Chip=
|
||||||
TA4 WLAN Chip=
|
TA4 WLAN Chip=
|
||||||
TA5 AI Chip=
|
TA5 AI Chip=
|
||||||
|
TA5 AI Chip II=
|
||||||
WLAN Chip=
|
WLAN Chip=
|
||||||
|
|
||||||
### electronic_fab.lua ###
|
### electronic_fab.lua ###
|
||||||
@ -523,6 +543,11 @@ Furnace Top=
|
|||||||
Outp=
|
Outp=
|
||||||
no fuel or no power=
|
no fuel or no power=
|
||||||
|
|
||||||
|
### gas_pipe.lua ###
|
||||||
|
|
||||||
|
TA5 Junction Pipe=
|
||||||
|
TA5 Pipe=
|
||||||
|
|
||||||
### gateblock.lua ###
|
### gateblock.lua ###
|
||||||
|
|
||||||
TechAge Gate Block=
|
TechAge Gate Block=
|
||||||
@ -535,6 +560,7 @@ TA2 Gearbox=
|
|||||||
|
|
||||||
TA3 Generator=
|
TA3 Generator=
|
||||||
TA4 Generator=
|
TA4 Generator=
|
||||||
|
TA5 Generator=
|
||||||
|
|
||||||
### generator.lua ###
|
### generator.lua ###
|
||||||
### power_terminal2.lua ###
|
### power_terminal2.lua ###
|
||||||
@ -571,6 +597,7 @@ TA4 LED Grow Light=
|
|||||||
|
|
||||||
No plan available=
|
No plan available=
|
||||||
Plan=
|
Plan=
|
||||||
|
Sectional view=
|
||||||
Side view=
|
Side view=
|
||||||
Top view=
|
Top view=
|
||||||
|
|
||||||
@ -590,13 +617,18 @@ TA4 Furnace Heater=
|
|||||||
### heatexchanger1.lua ###
|
### heatexchanger1.lua ###
|
||||||
|
|
||||||
TA4 Heat Exchanger 1=
|
TA4 Heat Exchanger 1=
|
||||||
|
TA5 Heat Exchanger 1=
|
||||||
|
|
||||||
### heatexchanger2.lua ###
|
### heatexchanger2.lua ###
|
||||||
|
|
||||||
No power=
|
Blue pipe connection error@n(@1 found / @2 expected)=
|
||||||
|
Cooler error=
|
||||||
|
Green pipe connection error@n(@1 found / @2 expected)=
|
||||||
Power network connection error=
|
Power network connection error=
|
||||||
TA4 Heat Exchanger=
|
TA4 Heat Exchanger=
|
||||||
TA4 Heat Exchanger 2=
|
TA4 Heat Exchanger 2=
|
||||||
|
TA5 Heat Exchanger 2=
|
||||||
|
Turbine error=
|
||||||
did you check the plan?=
|
did you check the plan?=
|
||||||
inlet/pipe error=
|
inlet/pipe error=
|
||||||
wrong storage diameter=
|
wrong storage diameter=
|
||||||
@ -604,6 +636,7 @@ wrong storage diameter=
|
|||||||
### heatexchanger3.lua ###
|
### heatexchanger3.lua ###
|
||||||
|
|
||||||
TA4 Heat Exchanger 3=
|
TA4 Heat Exchanger 3=
|
||||||
|
TA5 Heat Exchanger 3=
|
||||||
|
|
||||||
### hydrogen.lua ###
|
### hydrogen.lua ###
|
||||||
|
|
||||||
@ -770,6 +803,10 @@ TA4 Collider Detector Magnet=
|
|||||||
TA4 Collider Magnet=
|
TA4 Collider Magnet=
|
||||||
TA4 Collider Magnet Base=
|
TA4 Collider Magnet Base=
|
||||||
TA4 Collider Steel Block=
|
TA4 Collider Steel Block=
|
||||||
|
TA5 Fusion Reactor Magnet 1=
|
||||||
|
TA5 Fusion Reactor Magnet 2=
|
||||||
|
TA5 Fusion Reactor Magnet Blank=
|
||||||
|
TA5 Fusion Reactor Magnet Shield=
|
||||||
|
|
||||||
### mba_detector.lua ###
|
### mba_detector.lua ###
|
||||||
|
|
||||||
@ -906,6 +943,7 @@ TA4 Player Detector=
|
|||||||
|
|
||||||
Aluminum Powder=
|
Aluminum Powder=
|
||||||
Clay Powder=
|
Clay Powder=
|
||||||
|
Graphite Powder=
|
||||||
Iron Powder=
|
Iron Powder=
|
||||||
Leave Powder=
|
Leave Powder=
|
||||||
Needle Powder=
|
Needle Powder=
|
||||||
@ -967,6 +1005,10 @@ Allow to dig/place Techage power lines nearby power poles=
|
|||||||
|
|
||||||
TA3 Pump=
|
TA3 Pump=
|
||||||
TA4 Pump=
|
TA4 Pump=
|
||||||
|
|
||||||
|
### pump.lua ###
|
||||||
|
### ta5_pump.lua ###
|
||||||
|
|
||||||
Total flow rate=
|
Total flow rate=
|
||||||
Total flow rate in liquid units=
|
Total flow rate in liquid units=
|
||||||
|
|
||||||
@ -1049,6 +1091,11 @@ TA4 Rotor Blade=
|
|||||||
TA4 Wind Turbine=
|
TA4 Wind Turbine=
|
||||||
TA4 Wind Turbine Nacelle=
|
TA4 Wind Turbine Nacelle=
|
||||||
|
|
||||||
|
### screwdriver.lua ###
|
||||||
|
|
||||||
|
Block alignment stored!=
|
||||||
|
Techage Screwdriver@n(See: TA3 > Tools)=
|
||||||
|
|
||||||
### sensorchest.lua ###
|
### sensorchest.lua ###
|
||||||
|
|
||||||
Allow public chest access=
|
Allow public chest access=
|
||||||
@ -1089,6 +1136,11 @@ the timeslot when the command is executed.@n=
|
|||||||
|
|
||||||
Cancel=
|
Cancel=
|
||||||
|
|
||||||
|
### shell.lua ###
|
||||||
|
|
||||||
|
TA5 Fusion Reactor Nucleus=
|
||||||
|
TA5 Fusion Reactor Shell=
|
||||||
|
|
||||||
### signallamp.lua ###
|
### signallamp.lua ###
|
||||||
|
|
||||||
TA4 Wind Turbine Signal Lamp=
|
TA4 Wind Turbine Signal Lamp=
|
||||||
@ -1257,6 +1309,10 @@ no power=
|
|||||||
|
|
||||||
TA5 Hyperloop Chest=
|
TA5 Hyperloop Chest=
|
||||||
|
|
||||||
|
### ta5_pump.lua ###
|
||||||
|
|
||||||
|
TA5 Pump=
|
||||||
|
|
||||||
### ta5_tank.lua ###
|
### ta5_tank.lua ###
|
||||||
|
|
||||||
TA5 Hyperloop Tank=
|
TA5 Hyperloop Tank=
|
||||||
@ -1343,6 +1399,7 @@ TA4 Tube=
|
|||||||
|
|
||||||
TA3 Turbine=
|
TA3 Turbine=
|
||||||
TA4 Turbine=
|
TA4 Turbine=
|
||||||
|
TA5 Turbine=
|
||||||
|
|
||||||
### turncontroller.lua ###
|
### turncontroller.lua ###
|
||||||
|
|
||||||
|
@ -836,8 +836,6 @@ Mit Shift+Rechtsklick kann bei einigen Blöcken ein erweitertes Menü geöffnet
|
|||||||
[ta3_end_wrench|image]
|
[ta3_end_wrench|image]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### TechAge Programmer
|
### TechAge Programmer
|
||||||
|
|
||||||
Mit dem Programmer können Blocknummern mit einem Rechtsklick von mehreren Blöcken eingesammelt und mit einem Linksklick in einen Block wie Taster/Schalter geschrieben werden.
|
Mit dem Programmer können Blocknummern mit einem Rechtsklick von mehreren Blöcken eingesammelt und mit einem Linksklick in einen Block wie Taster/Schalter geschrieben werden.
|
||||||
@ -845,8 +843,6 @@ Wird in die Luft geklickt, wird der interne Speicher gelöscht.
|
|||||||
|
|
||||||
[ta3_programmer|image]
|
[ta3_programmer|image]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### TechAge Kelle / Trowel
|
### TechAge Kelle / Trowel
|
||||||
|
|
||||||
Die Kelle dient zum Verputzen von Stromkabel. Siehe dazu "TA Stromkabel".
|
Die Kelle dient zum Verputzen von Stromkabel. Siehe dazu "TA Stromkabel".
|
||||||
@ -859,3 +855,14 @@ Die Kelle dient zum Verputzen von Stromkabel. Siehe dazu "TA Stromkabel".
|
|||||||
Mit diesem Werkzeug lassen sich die Bohrgestängezange Blöcke wieder entfernen, wenn dort bspw. ein Tunnel durch soll.
|
Mit diesem Werkzeug lassen sich die Bohrgestängezange Blöcke wieder entfernen, wenn dort bspw. ein Tunnel durch soll.
|
||||||
|
|
||||||
[ta3_drill_pipe_wrench|image]
|
[ta3_drill_pipe_wrench|image]
|
||||||
|
|
||||||
|
### Techage Schraubendreher
|
||||||
|
|
||||||
|
Der Techage Schraubendreher dient als Ersatz für den normalen Schraubendreher. Es besitzt folgende Funktionen:
|
||||||
|
|
||||||
|
- Linksklick: Den Block nach links drehen
|
||||||
|
- Rechtsklick: Die sichtbare Seite des Blockes nach oben drehen
|
||||||
|
- Shift+Linksklick: Ausrichtung des angeklickten Blockes speichern
|
||||||
|
- Shift+Rechtsklick: Die gespeicherte Ausrichtung auf den angeklickten Block anwenden
|
||||||
|
|
||||||
|
[ta3_screwdriver|image]
|
@ -829,7 +829,6 @@ With Shift + right click an extended menu can be opened for some blocks. Dependi
|
|||||||
|
|
||||||
[ta3_end_wrench|image]
|
[ta3_end_wrench|image]
|
||||||
|
|
||||||
|
|
||||||
### TechAge Programmer
|
### TechAge Programmer
|
||||||
|
|
||||||
With the programmer, block numbers can be collected from several blocks with a right click and written into a block like a button / switch with a left click.
|
With the programmer, block numbers can be collected from several blocks with a right click and written into a block like a button / switch with a left click.
|
||||||
@ -837,17 +836,25 @@ If you click in the air, the internal memory is deleted.
|
|||||||
|
|
||||||
[ta3_programmer|image]
|
[ta3_programmer|image]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### TechAge Trowel / Trowel
|
### TechAge Trowel / Trowel
|
||||||
|
|
||||||
The trowel is used for plastering power cables. See also "TA power cable".
|
The trowel is used for plastering power cables. See also "TA power cable".
|
||||||
|
|
||||||
[ta3_trowel|image]
|
[ta3_trowel|image]
|
||||||
|
|
||||||
|
|
||||||
### TA3 drill pipe wrench
|
### TA3 drill pipe wrench
|
||||||
|
|
||||||
This tool can be used to remove the drill pipe blocks if, for example, a tunnel is to pass through there.
|
This tool can be used to remove the drill pipe blocks if, for example, a tunnel is to pass through there.
|
||||||
|
|
||||||
[ta3_drill_pipe_wrench|image]
|
[ta3_drill_pipe_wrench|image]
|
||||||
|
|
||||||
|
### Techage Screwdriver
|
||||||
|
|
||||||
|
The Techage Screwdriver serves as a replacement for the normal screwdriver. It has the following functions:
|
||||||
|
|
||||||
|
- Left click: turn the block to the left
|
||||||
|
- Right click: turn the visible side of the block upwards
|
||||||
|
- Shift + left click: save the alignment of the clicked block
|
||||||
|
- Shift + right click: apply the saved alignment to the clicked block
|
||||||
|
|
||||||
|
[ta3_screwdriver|image]
|
||||||
|
@ -8,7 +8,61 @@ Für die Herstellung und Nutzung von TA5 Maschinen und Blöcken sind Erfahrungsp
|
|||||||
|
|
||||||
## Energiequellen
|
## Energiequellen
|
||||||
|
|
||||||
### TA5 Fusionsreaktor (geplant)
|
### TA5 Fusionsreaktor
|
||||||
|
|
||||||
|
Kernfusion bedeutet das Verschmelzen zweier Atomkerne. Dabei können, je nach Reaktion, große Mengen von Energie freigesetzt werden. Kernfusionen, bei denen Energie frei wird, laufen in Form von Kettenreaktionen ab. Sie sind die Quelle der Energie der Sterne, zum Beispiel auch unserer Sonne. Ein Fusionsreaktor wandelt die Energie, die bei einer kontrollierten Kernfusion frei wird, in elektrischen Strom um.
|
||||||
|
|
||||||
|
**Wie funktionieren ein Fusionsreaktor?**
|
||||||
|
|
||||||
|
Ein Fusionsreaktor funktioniert nach dem klassischen Prinzip eines Wärmekraftwerks: Wasser wird erhitzt und treibt eine Dampfturbine an, deren Bewegungsenergie von einem Generator in Strom gewandelt wird.
|
||||||
|
|
||||||
|
Ein Fusionskraftwerk benötigt zunächst eine hohe Menge an Energie, da ein Plasma erzeugt werden muss. „Plasma“ nennt man den vierten Zustand von Stoffen, nach fest, flüssig und gasförmig. Dafür wird viel Strom benötigt. Erst durch diese extreme Energiekonzentration zündet die Fusionsreaktion und mit der abgegebenen Wärme wird über den Wärmetauscher Strom erzeugt. Der Generator liefert dann 800 ku an Strom.
|
||||||
|
|
||||||
|
Der Plan rechts zeigt einen Schnitt durch den Fusionsreaktor.
|
||||||
|
|
||||||
|
Für den Betrieb des Fusionsreaktors werden 60 Erfahrungspunkte benötigt. Der Fusionsreaktur muss komplett in einem Forceload Block Bereich aufgebaut werden.
|
||||||
|
|
||||||
|
[ta5_fusion_reactor|plan]
|
||||||
|
|
||||||
|
#### TA5 Fusionreaktor Magnet
|
||||||
|
|
||||||
|
Für den Aufbau des Fusionsreaktor werden insgesamt 60 TA5 Fusionreaktor Magnete benötigt. Diese bilden den Ring, in dem sich das Plasma bildet. Der TA5 Fusionsreaktor Magnete benötigt Strom und hat zwei Anschlüsse für die Kühlung.
|
||||||
|
|
||||||
|
Es gibt zwei Typen von Magneten, so dass auch alle Seiten des Magnets, die zum Plasmaring zeigen, mit einem Hitzeschild geschützt werden können.
|
||||||
|
|
||||||
|
Bei den Eckmagneten auf der Innenseite des Rings ist jeweils eine Anschlussseite verdeckt (Strom oder Kühlung) und kann daher nicht angeschlossen werden. Dies ist technisch nicht machbar und hat daher keinen Einfluß auf die Funktion des Fusionsreaktor.
|
||||||
|
|
||||||
|
[ta5_magnet|image]
|
||||||
|
|
||||||
|
#### TA5 Pumpe
|
||||||
|
|
||||||
|
Die Pumpe wird benötigt, um den Kühlkreislauf mit Isobutan zu füllen. Es werden ca. 350 Einheiten Isobutan benötigt.
|
||||||
|
|
||||||
|
[ta5_pump|image]
|
||||||
|
|
||||||
|
#### TA5 Wärmetauscher
|
||||||
|
|
||||||
|
Der TA5 Wärmetauscher wird benötigt, um die im Fusionsreaktor erzeugte Hitze zuerst in Dampf und dann in Strom umzuwandeln. Der Wärmetauscher selbst benötigt dazu 5 ku Strom. Der Aufbau gleicht dem Wärmetauscher des Energiespeichers aus TA4.
|
||||||
|
|
||||||
|
[ta5_heatexchanger|plan]
|
||||||
|
|
||||||
|
#### TA5 Fusionreaktor Controller
|
||||||
|
|
||||||
|
Über den TA5 Fusionreaktor Controller wird der Fusionreaktors eingeschaltet. Dabei muss zuerst die Kühlung/Wärmetauscher und dann der Controller eingeschaltet werden. Es dauert ca. 2 min, bis der Reaktor in Gang kommt und Strom liefert. Der Fusionreaktor und damit der Controller benötigt 400 ku an Strom, um das Plasma aufrecht zu erhalten.
|
||||||
|
|
||||||
|
[ta5_fr_controller|image]
|
||||||
|
|
||||||
|
#### TA5 Fusionreaktor Hülle
|
||||||
|
|
||||||
|
Der komplette Reaktor muss mit einer Hülle umgeben werden, die den enormen Druck, den die Magnete auf das Plasma ausüben, abfängt und die Umgebung vor Strahlung schützt. Ohne diese Hülle kann der Reaktor nicht gestartet werden. Mit der TechAge Kelle können auch Stromkabel und Kühlleitungen des Fusionreaktors in die Hülle integriert werden.
|
||||||
|
|
||||||
|
[ta5_fr_shell|image]
|
||||||
|
|
||||||
|
#### TA5 Fusionreaktor Kern
|
||||||
|
|
||||||
|
Der Kern muss in der Mitte des Reaktors sitzen. Siehe Abbildung unter "TA5 Fusionsreaktor". Auch hierfür wird die TechAge Kelle benötigt.
|
||||||
|
|
||||||
|
[ta5_fr_nucleus|image]
|
||||||
|
|
||||||
## Energiespeicher
|
## Energiespeicher
|
||||||
|
|
||||||
|
@ -8,7 +8,61 @@ Experience points are required for the manufacture and use of TA5 machines and b
|
|||||||
|
|
||||||
## Energy Sources
|
## Energy Sources
|
||||||
|
|
||||||
### TA5 Fusion Reactor (planned)
|
### TA5 Fusion Reactor
|
||||||
|
|
||||||
|
Nuclear fusion means the fusing of two atomic nuclei. Depending on the reaction, large amounts of energy can be released. Nuclear fusions, in which energy is released, take place in the form of chain reactions. They are the source of the energy of the stars, including our sun, for example. A fusion reactor converts the energy released during controlled nuclear fusion into electricity.
|
||||||
|
|
||||||
|
**How do fusion reactors work?**
|
||||||
|
|
||||||
|
A fusion reactor works according to the classic principle of a thermal power plant: water is heated and drives a steam turbine, whose kinetic energy is converted into electricity by a generator.
|
||||||
|
|
||||||
|
A fusion power plant initially requires a large amount of energy, since a plasma has to be generated. "Plasma" is the name given to the fourth state of matter, after solid, liquid and gaseous. This requires a lot of electricity. Only through this extreme concentration of energy does the fusion reaction ignite and the heat given off is used to generate electricity via the heat exchanger. The generator then delivers 800 ku of electricity.
|
||||||
|
|
||||||
|
The plan on the right shows a section through the fusion reactor.
|
||||||
|
|
||||||
|
60 experience points are required to operate the fusion reactor. The fusion reactor must be built entirely in a forceload block area.
|
||||||
|
|
||||||
|
[ta5_fusion_reactor|plan]
|
||||||
|
|
||||||
|
#### TA5 Fusion Reactor Magnet
|
||||||
|
|
||||||
|
A total of 60 TA5 Fusion Reactor Magnets are required to set up the fusion reactor. These form the ring in which the plasma forms. The TA5 Fusion Reactor Magnets requires power and has two ports for cooling.
|
||||||
|
|
||||||
|
There are two types of magnets, so all sides of the magnet that face the plasma ring can also be protected with a heat shield.
|
||||||
|
|
||||||
|
With the corner magnets on the inside of the ring, one connection side is covered (power or cooling) and can therefore not be connected. This is technically not feasible and therefore has no influence on the function of the fusion reactor.
|
||||||
|
|
||||||
|
[ta5_magnet|image]
|
||||||
|
|
||||||
|
#### TA5 Pump
|
||||||
|
|
||||||
|
The pump is required to fill the cooling circuit with isobutane. About 350 units of isobutane are required.
|
||||||
|
|
||||||
|
[ta5_pump|image]
|
||||||
|
|
||||||
|
#### TA5 Heat Exchanger
|
||||||
|
|
||||||
|
The TA5 Heat Exchanger is required to convert the heat generated in the fusion reactor first to steam and then to electricity. The Heat Exchanger itself requires 5 ku electricity. The structure is similar to the Heat Exchanger of the energy store from TA4.
|
||||||
|
|
||||||
|
[ta5_heatexchanger|plan]
|
||||||
|
|
||||||
|
#### TA5 Fusion Reactor Controller
|
||||||
|
|
||||||
|
The fusion reactor is switched on via the TA5 Fusion Reactor Controller. The cooling/Heat Exchanger must be switched on first and then the controller. It takes about 2 minutes for the reactor to start up and supply electricity. The fusion reactor and thus the controller requires 400 ku of electricity to maintain the plasma.
|
||||||
|
|
||||||
|
[ta5_fr_controller|image]
|
||||||
|
|
||||||
|
#### TA5 Fusion Reactor Shell
|
||||||
|
|
||||||
|
The entire reactor must be surrounded by a shell that absorbs the enormous pressure that the magnets exert on the plasma and protects the environment from radiation. Without this shell, the reactor cannot be started. With the TechAge Trowel, power cables and cooling pipes of the fusion reactor can also be integrated into the shell.
|
||||||
|
|
||||||
|
[ta5_fr_shell|image]
|
||||||
|
|
||||||
|
#### TA5 Fusion Reactor Core
|
||||||
|
|
||||||
|
The core must sit in the center of the reactor. See illustration under "TA5 Fusion Reactor". The TechAge Trowel is also required for this.
|
||||||
|
|
||||||
|
[ta5_fr_nucleus|image]
|
||||||
|
|
||||||
## Energy Storage
|
## Energy Storage
|
||||||
|
|
||||||
|
@ -138,6 +138,7 @@
|
|||||||
- [TechAge Programmer](./manual_ta3_DE.md#techage-programmer)
|
- [TechAge Programmer](./manual_ta3_DE.md#techage-programmer)
|
||||||
- [TechAge Kelle / Trowel](./manual_ta3_DE.md#techage-kelle--trowel)
|
- [TechAge Kelle / Trowel](./manual_ta3_DE.md#techage-kelle--trowel)
|
||||||
- [TA3 Bohrgestängezange / TA3 Drill Pipe Wrench](./manual_ta3_DE.md#ta3-bohrgestängezange--ta3-drill-pipe-wrench)
|
- [TA3 Bohrgestängezange / TA3 Drill Pipe Wrench](./manual_ta3_DE.md#ta3-bohrgestängezange--ta3-drill-pipe-wrench)
|
||||||
|
- [Techage Schraubendreher](./manual_ta3_DE.md#techage-schraubendreher)
|
||||||
- [TA4: Gegenwart](./manual_ta4_DE.md#ta4:-gegenwart)
|
- [TA4: Gegenwart](./manual_ta4_DE.md#ta4:-gegenwart)
|
||||||
- [Windkraftanlage](./manual_ta4_DE.md#windkraftanlage)
|
- [Windkraftanlage](./manual_ta4_DE.md#windkraftanlage)
|
||||||
- [TA4 Windkraftanlage / Wind Turbine](./manual_ta4_DE.md#ta4-windkraftanlage--wind-turbine)
|
- [TA4 Windkraftanlage / Wind Turbine](./manual_ta4_DE.md#ta4-windkraftanlage--wind-turbine)
|
||||||
@ -228,7 +229,13 @@
|
|||||||
- [TA4 Recycler](./manual_ta4_DE.md#ta4-recycler)
|
- [TA4 Recycler](./manual_ta4_DE.md#ta4-recycler)
|
||||||
- [TA5: Zukunft](./manual_ta5_DE.md#ta5:-zukunft)
|
- [TA5: Zukunft](./manual_ta5_DE.md#ta5:-zukunft)
|
||||||
- [Energiequellen](./manual_ta5_DE.md#energiequellen)
|
- [Energiequellen](./manual_ta5_DE.md#energiequellen)
|
||||||
- [TA5 Fusionsreaktor (geplant)](./manual_ta5_DE.md#ta5-fusionsreaktor-(geplant))
|
- [TA5 Fusionsreaktor](./manual_ta5_DE.md#ta5-fusionsreaktor)
|
||||||
|
- [TA5 Fusionreaktor Magnet](./manual_ta5_DE.md#ta5-fusionreaktor-magnet)
|
||||||
|
- [TA5 Pumpe](./manual_ta5_DE.md#ta5-pumpe)
|
||||||
|
- [TA5 Wärmetauscher](./manual_ta5_DE.md#ta5-wärmetauscher)
|
||||||
|
- [TA5 Fusionreaktor Controller](./manual_ta5_DE.md#ta5-fusionreaktor-controller)
|
||||||
|
- [TA5 Fusionreaktor Hülle](./manual_ta5_DE.md#ta5-fusionreaktor-hülle)
|
||||||
|
- [TA5 Fusionreaktor Kern](./manual_ta5_DE.md#ta5-fusionreaktor-kern)
|
||||||
- [Energiespeicher](./manual_ta5_DE.md#energiespeicher)
|
- [Energiespeicher](./manual_ta5_DE.md#energiespeicher)
|
||||||
- [TA5 Hybrid-Speicher (geplant)](./manual_ta5_DE.md#ta5-hybrid-speicher-(geplant))
|
- [TA5 Hybrid-Speicher (geplant)](./manual_ta5_DE.md#ta5-hybrid-speicher-(geplant))
|
||||||
- [Logik Blöcke](./manual_ta5_DE.md#logik-blöcke)
|
- [Logik Blöcke](./manual_ta5_DE.md#logik-blöcke)
|
||||||
|
@ -138,6 +138,7 @@
|
|||||||
- [TechAge Programmer](./manual_ta3_EN.md#techage-programmer)
|
- [TechAge Programmer](./manual_ta3_EN.md#techage-programmer)
|
||||||
- [TechAge Trowel / Trowel](./manual_ta3_EN.md#techage-trowel--trowel)
|
- [TechAge Trowel / Trowel](./manual_ta3_EN.md#techage-trowel--trowel)
|
||||||
- [TA3 drill pipe wrench](./manual_ta3_EN.md#ta3-drill-pipe-wrench)
|
- [TA3 drill pipe wrench](./manual_ta3_EN.md#ta3-drill-pipe-wrench)
|
||||||
|
- [Techage Screwdriver](./manual_ta3_EN.md#techage-screwdriver)
|
||||||
- [TA4: Present](./manual_ta4_EN.md#ta4:-present)
|
- [TA4: Present](./manual_ta4_EN.md#ta4:-present)
|
||||||
- [Wind Turbine](./manual_ta4_EN.md#wind-turbine)
|
- [Wind Turbine](./manual_ta4_EN.md#wind-turbine)
|
||||||
- [TA4 Wind Turbine](./manual_ta4_EN.md#ta4-wind-turbine)
|
- [TA4 Wind Turbine](./manual_ta4_EN.md#ta4-wind-turbine)
|
||||||
@ -228,7 +229,13 @@
|
|||||||
- [TA4 Recycler](./manual_ta4_EN.md#ta4-recycler)
|
- [TA4 Recycler](./manual_ta4_EN.md#ta4-recycler)
|
||||||
- [TA5: Future](./manual_ta5_EN.md#ta5:-future)
|
- [TA5: Future](./manual_ta5_EN.md#ta5:-future)
|
||||||
- [Energy Sources](./manual_ta5_EN.md#energy-sources)
|
- [Energy Sources](./manual_ta5_EN.md#energy-sources)
|
||||||
- [TA5 Fusion Reactor (planned)](./manual_ta5_EN.md#ta5-fusion-reactor-(planned))
|
- [TA5 Fusion Reactor](./manual_ta5_EN.md#ta5-fusion-reactor)
|
||||||
|
- [TA5 Fusion Reactor Magnet](./manual_ta5_EN.md#ta5-fusion-reactor-magnet)
|
||||||
|
- [TA5 Pump](./manual_ta5_EN.md#ta5-pump)
|
||||||
|
- [TA5 Heat Exchanger](./manual_ta5_EN.md#ta5-heat-exchanger)
|
||||||
|
- [TA5 Fusion Reactor Controller](./manual_ta5_EN.md#ta5-fusion-reactor-controller)
|
||||||
|
- [TA5 Fusion Reactor Shell](./manual_ta5_EN.md#ta5-fusion-reactor-shell)
|
||||||
|
- [TA5 Fusion Reactor Core](./manual_ta5_EN.md#ta5-fusion-reactor-core)
|
||||||
- [Energy Storage](./manual_ta5_EN.md#energy-storage)
|
- [Energy Storage](./manual_ta5_EN.md#energy-storage)
|
||||||
- [TA5 Hybrid Storage (planned)](./manual_ta5_EN.md#ta5-hybrid-storage-(planned))
|
- [TA5 Hybrid Storage (planned)](./manual_ta5_EN.md#ta5-hybrid-storage-(planned))
|
||||||
- [Logic blocks](./manual_ta5_EN.md#logic-blocks)
|
- [Logic blocks](./manual_ta5_EN.md#logic-blocks)
|
||||||
|
@ -96,7 +96,7 @@ minetest.register_node("techage:ta5_flycontroller", {
|
|||||||
nvm.lpos1 = {}
|
nvm.lpos1 = {}
|
||||||
nvm.lpos2 = {}
|
nvm.lpos2 = {}
|
||||||
nvm.moveBA = false
|
nvm.moveBA = false
|
||||||
nvm.running = true
|
nvm.running = nil
|
||||||
meta:set_string("status", S("Recording..."))
|
meta:set_string("status", S("Recording..."))
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
minetest.chat_send_player(name, S("Click on all blocks that shall be moved"))
|
minetest.chat_send_player(name, S("Click on all blocks that shall be moved"))
|
||||||
@ -109,7 +109,7 @@ minetest.register_node("techage:ta5_flycontroller", {
|
|||||||
if not err then
|
if not err then
|
||||||
meta:set_string("path", fields.path)
|
meta:set_string("path", fields.path)
|
||||||
end
|
end
|
||||||
nvm.running = false
|
nvm.running = nil
|
||||||
local text = #pos_list.." "..S("block positions are stored.")
|
local text = #pos_list.." "..S("block positions are stored.")
|
||||||
meta:set_string("status", text)
|
meta:set_string("status", text)
|
||||||
nvm.lpos1 = pos_list
|
nvm.lpos1 = pos_list
|
||||||
@ -128,12 +128,12 @@ minetest.register_node("techage:ta5_flycontroller", {
|
|||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
mark.stop(name)
|
mark.stop(name)
|
||||||
nvm.moveBA = false
|
nvm.moveBA = false
|
||||||
nvm.running = true
|
nvm.running = nil
|
||||||
elseif fields.test then
|
elseif fields.test then
|
||||||
local path, err = fly.to_path(fields.path, MAX_DIST)
|
local path, err = fly.to_path(fields.path, MAX_DIST)
|
||||||
if err then
|
if err then
|
||||||
meta:set_string("status", err)
|
meta:set_string("status", err)
|
||||||
elseif path and nvm.lpos1 then
|
elseif path and nvm.lpos1 and nvm.lpos1[1] then
|
||||||
local pos = table.copy(nvm.lpos1[1])
|
local pos = table.copy(nvm.lpos1[1])
|
||||||
if pos then
|
if pos then
|
||||||
for _, offs in ipairs(path) do
|
for _, offs in ipairs(path) do
|
||||||
@ -179,8 +179,7 @@ minetest.register_node("techage:ta5_flycontroller", {
|
|||||||
meta:set_string("formspec", formspec(nvm, meta))
|
meta:set_string("formspec", formspec(nvm, meta))
|
||||||
elseif fields.move then
|
elseif fields.move then
|
||||||
meta:set_string("status", "")
|
meta:set_string("status", "")
|
||||||
nvm.moveBA = nvm.moveBA == false
|
if fly.move_to_other_pos(pos, nvm.moveBA) then
|
||||||
if fly.move_to_other_pos(pos, nvm.moveBA == false) then
|
|
||||||
nvm.moveBA = nvm.moveBA == false
|
nvm.moveBA = nvm.moveBA == false
|
||||||
nvm.running = true
|
nvm.running = true
|
||||||
meta:set_string("formspec", formspec(nvm, meta))
|
meta:set_string("formspec", formspec(nvm, meta))
|
||||||
|
@ -112,7 +112,7 @@ minetest.register_node("techage:ta4_movecontroller", {
|
|||||||
nvm.lpos1 = {}
|
nvm.lpos1 = {}
|
||||||
nvm.lpos2 = {}
|
nvm.lpos2 = {}
|
||||||
nvm.moveBA = false
|
nvm.moveBA = false
|
||||||
nvm.running = true
|
nvm.running = nil
|
||||||
meta:set_string("status", S("Recording..."))
|
meta:set_string("status", S("Recording..."))
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
minetest.chat_send_player(name, S("Click on all blocks that shall be moved"))
|
minetest.chat_send_player(name, S("Click on all blocks that shall be moved"))
|
||||||
@ -125,7 +125,7 @@ minetest.register_node("techage:ta4_movecontroller", {
|
|||||||
meta:set_string("path", fields.path)
|
meta:set_string("path", fields.path)
|
||||||
end
|
end
|
||||||
local text = #pos_list.." "..S("block positions are stored.")
|
local text = #pos_list.." "..S("block positions are stored.")
|
||||||
nvm.running = false
|
nvm.running = nil
|
||||||
meta:set_string("status", text)
|
meta:set_string("status", text)
|
||||||
nvm.lpos1 = pos_list
|
nvm.lpos1 = pos_list
|
||||||
mark.unmark_all(name)
|
mark.unmark_all(name)
|
||||||
@ -142,7 +142,7 @@ minetest.register_node("techage:ta4_movecontroller", {
|
|||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
mark.stop(name)
|
mark.stop(name)
|
||||||
nvm.moveBA = false
|
nvm.moveBA = false
|
||||||
nvm.running = true
|
nvm.running = nil
|
||||||
elseif fields.moveAB then
|
elseif fields.moveAB then
|
||||||
meta:set_string("status", "")
|
meta:set_string("status", "")
|
||||||
if fly.move_to_other_pos(pos, false) then
|
if fly.move_to_other_pos(pos, false) then
|
||||||
|
@ -127,10 +127,10 @@ local function node_timer(pos, elapsed)
|
|||||||
local fuel = has_fuel(pos, nvm)
|
local fuel = has_fuel(pos, nvm)
|
||||||
if running and not fuel then
|
if running and not fuel then
|
||||||
State:standby(pos, nvm, S("no fuel"))
|
State:standby(pos, nvm, S("no fuel"))
|
||||||
stop_node(pos, nvm, State)
|
stop_node(pos, nvm, State)
|
||||||
elseif not running and fuel then
|
elseif not running and fuel then
|
||||||
State:start(pos, nvm)
|
State:start(pos, nvm)
|
||||||
-- start_node() is called implicit
|
-- start_node() is called implicit
|
||||||
elseif running then
|
elseif running then
|
||||||
local meta = M(pos)
|
local meta = M(pos)
|
||||||
local outdir = meta:get_int("outdir")
|
local outdir = meta:get_int("outdir")
|
||||||
@ -166,7 +166,7 @@ end
|
|||||||
|
|
||||||
local function get_generator_data(pos, outdir, tlib2)
|
local function get_generator_data(pos, outdir, tlib2)
|
||||||
local nvm = techage.get_nvm(pos)
|
local nvm = techage.get_nvm(pos)
|
||||||
if nvm.running and techage.is_running(nvm) then
|
if techage.is_running(nvm) then
|
||||||
return {level = (nvm.load or 0) / PWR_PERF, perf = PWR_PERF, capa = PWR_PERF * 2}
|
return {level = (nvm.load or 0) / PWR_PERF, perf = PWR_PERF, capa = PWR_PERF * 2}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -190,7 +190,6 @@ minetest.register_node("techage:tiny_generator", {
|
|||||||
after_place_node = function(pos, placer, itemstack)
|
after_place_node = function(pos, placer, itemstack)
|
||||||
local nvm = techage.get_nvm(pos)
|
local nvm = techage.get_nvm(pos)
|
||||||
local number = techage.add_node(pos, "techage:tiny_generator")
|
local number = techage.add_node(pos, "techage:tiny_generator")
|
||||||
nvm.running = false
|
|
||||||
nvm.burn_cycles = 0
|
nvm.burn_cycles = 0
|
||||||
if itemstack then
|
if itemstack then
|
||||||
local stack_meta = itemstack:get_meta()
|
local stack_meta = itemstack:get_meta()
|
||||||
|
@ -154,16 +154,18 @@ techage.register_node({"techage:ta5_tele_tube"}, {
|
|||||||
local nvm = techage.get_nvm(pos)
|
local nvm = techage.get_nvm(pos)
|
||||||
if techage.is_operational(nvm) then
|
if techage.is_operational(nvm) then
|
||||||
local rmt_pos = teleport.get_remote_pos(pos)
|
local rmt_pos = teleport.get_remote_pos(pos)
|
||||||
local rmt_nvm = techage.get_nvm(rmt_pos)
|
if rmt_pos then
|
||||||
if techage.is_operational(rmt_nvm) then
|
local rmt_nvm = techage.get_nvm(rmt_pos)
|
||||||
local tube_dir = M(rmt_pos):get_int("tube_dir")
|
if techage.is_operational(rmt_nvm) then
|
||||||
if techage.push_items(rmt_pos, tube_dir, stack) then
|
local tube_dir = M(rmt_pos):get_int("tube_dir")
|
||||||
State:keep_running(pos, nvm, COUNTDOWN_TICKS)
|
if techage.push_items(rmt_pos, tube_dir, stack) then
|
||||||
State:keep_running(rmt_pos, rmt_nvm, COUNTDOWN_TICKS)
|
State:keep_running(pos, nvm, COUNTDOWN_TICKS)
|
||||||
return true
|
State:keep_running(rmt_pos, rmt_nvm, COUNTDOWN_TICKS)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
else
|
||||||
|
State:blocked(pos, nvm, S("Remote block error"))
|
||||||
end
|
end
|
||||||
else
|
|
||||||
State:blocked(pos, nvm, S("Remote block error"))
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
pngquant --skip-if-larger --quality=80 --strip *.png --ext .png --force
|
|
Before Width: | Height: | Size: 297 B After Width: | Height: | Size: 272 B |
BIN
techage/textures/techage_appl_hole_ta5_pipe1.png
Normal file
After Width: | Height: | Size: 134 B |
BIN
techage/textures/techage_appl_hole_ta5_pipe2.png
Normal file
After Width: | Height: | Size: 134 B |
BIN
techage/textures/techage_appl_plasma.png
Normal file
After Width: | Height: | Size: 135 B |
BIN
techage/textures/techage_appl_plasma4.png
Normal file
After Width: | Height: | Size: 617 B |
BIN
techage/textures/techage_ceramic_turbine.png
Normal file
After Width: | Height: | Size: 752 B |
Before Width: | Height: | Size: 429 B After Width: | Height: | Size: 588 B |
Before Width: | Height: | Size: 400 B After Width: | Height: | Size: 573 B |
Before Width: | Height: | Size: 399 B After Width: | Height: | Size: 515 B |
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 351 B |
BIN
techage/textures/techage_frame4_ta5.png
Normal file
After Width: | Height: | Size: 185 B |
BIN
techage/textures/techage_frame8_ta5.png
Normal file
After Width: | Height: | Size: 204 B |
BIN
techage/textures/techage_frameT_ta5.png
Normal file
After Width: | Height: | Size: 157 B |
BIN
techage/textures/techage_frame_ta2_bottom.png
Normal file
After Width: | Height: | Size: 336 B |
BIN
techage/textures/techage_frame_ta3_bottom.png
Normal file
After Width: | Height: | Size: 331 B |
BIN
techage/textures/techage_frame_ta4_bottom.png
Normal file
After Width: | Height: | Size: 111 B |
BIN
techage/textures/techage_fusion_reactor.png
Normal file
After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 664 B After Width: | Height: | Size: 514 B |
Before Width: | Height: | Size: 574 B After Width: | Height: | Size: 430 B |
BIN
techage/textures/techage_magnet_hole.png
Normal file
After Width: | Height: | Size: 109 B |