built on 09/05/2023 18:41:56

This commit is contained in:
Joachim Stolberg 2023-05-09 18:41:56 +02:00
parent 1a8bcd3e5a
commit 1169e46dbf
100 changed files with 958 additions and 292 deletions

View File

@ -49,16 +49,7 @@ if minetest.global_exists("techage") and techage.version < 0.06 then
return return
end end
hyperloop.S = minetest.get_translator(minetest.get_current_modname())
if minetest.get_translator ~= nil then
hyperloop.S = minetest.get_translator(minetest.get_current_modname())
else
-- Load support for intllib.
local MP = minetest.get_modpath("hyperloop")
hyperloop.S, hyperloop.NS = dofile(MP.."/intllib.lua")
end
-- MT 5.4 new string mode -- MT 5.4 new string mode
hyperloop.CLIP = minetest.features.use_texture_alpha_string_modes and "clip" or false hyperloop.CLIP = minetest.features.use_texture_alpha_string_modes and "clip" or false

View File

@ -1,4 +1,4 @@
name = hyperloop name = hyperloop
depends = default, tubelib2 depends = default, tubelib2
optional_depends = techage, worldedit, intllib optional_depends = techage, worldedit
description = Hyperloop Mod, the fast and modern way of traveling. description = Hyperloop Mod, the fast and modern way of traveling.

View File

@ -420,6 +420,7 @@ minetest.register_node("signs_bot:box", {
if not placer or not placer:is_player() then if not placer or not placer:is_player() then
minetest.remove_node(pos) minetest.remove_node(pos)
minetest.add_item(pos, itemstack) minetest.add_item(pos, itemstack)
return
end end
local mem = tubelib2.init_mem(pos) local mem = tubelib2.init_mem(pos)
mem.running = false mem.running = false

View File

@ -53,7 +53,7 @@ local function takeitem(mem)
end end
if minetest.global_exists("signs_bot") then if minetest.global_exists("compost") then
signs_bot.register_botcommand("add_compost", { signs_bot.register_botcommand("add_compost", {
mod = "compost", mod = "compost",

View File

@ -140,18 +140,31 @@ local inventory_doc = table.concat({
}, "\n") }, "\n")
local sorting_data = {"start", "control", "sensor_doc", "tool", "invent",
"box", "bot_flap", "duplicator",
"bot_sensor", "node_sensor", "crop_sensor", "chest", "timer",
"changer", "sensor_extender", "and", "delayer",
"farming", "pattern", "copy3x3x3", "flowers", "aspen",
"sign_cmnd", "sign_right", "sign_left", "sign_take", "sign_add", "sign_stop", "sign_blank"}
if minetest.global_exists("minecart") then
table.insert(sorting_data, "cart_sensor")
table.insert(sorting_data, "sign_add_cart")
table.insert(sorting_data, "sign_take_cart")
end
if minetest.global_exists("xdecor") then
table.insert(sorting_data, "water")
table.insert(sorting_data, "soup")
end
doc.add_category("signs_bot", doc.add_category("signs_bot",
{ {
name = S("Signs Bot"), name = S("Signs Bot"),
description = S("A robot controlled by signs, used for automated work"), description = S("A robot controlled by signs, used for automated work"),
sorting = "custom", sorting = "custom",
sorting_data = {"start", "control", "sensor_doc", "tool",
"box", "bot_flap", "duplicator",
"bot_sensor", "cart_sensor", "node_sensor", "crop_sensor", "chest", "timer",
"changer", "sensor_extender",
"farming", "pattern", "copy3x3x3",
"sign_cmnd", "sign_right", "sign_left", "sign_take", "sign_add", "sign_stop", "sign_blank"},
build_formspec = formspec, build_formspec = formspec,
sorting_data = sorting_data,
}) })
doc.add_entry("signs_bot", "start", { doc.add_entry("signs_bot", "start", {
@ -174,7 +187,7 @@ doc.add_entry("signs_bot", "tool", {
data = {text = tool_doc, image = "signs_bot_doc_image.png"}, data = {text = tool_doc, image = "signs_bot_doc_image.png"},
}) })
doc.add_entry("signs_bot", "tool", { doc.add_entry("signs_bot", "invent", {
name = S("Bot inventory behavior"), name = S("Bot inventory behavior"),
data = {text = inventory_doc, image = "signs_bot_doc_image.png"}, data = {text = inventory_doc, image = "signs_bot_doc_image.png"},
}) })

View File

@ -1,4 +1,4 @@
name=signs_bot name=signs_bot
depends = default,farming,basic_materials,tubelib2 depends = default,farming,basic_materials,tubelib2
optional_depends = node_io,techage,doc,minecart,bucket,fire,xdecor,ethereal optional_depends = node_io,techage,doc,minecart,bucket,fire,xdecor,ethereal,compost
description = A robot controlled by signs description = A robot controlled by signs

View File

@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import re import re
import mistune # install v0.8.4 with: pip install mistune import mistune # install v0.8.4 with: pip install mistune==0.8.4
__version__ = "1.0" __version__ = "1.0"

View File

@ -34,7 +34,7 @@ Textures: CC BY-SA 3.0
The TA1 mill sound is from https://freesound.org/people/JustinBW/sounds/70200/ The TA1 mill sound is from https://freesound.org/people/JustinBW/sounds/70200/
The TA1 watermill sound is from https://freesound.org/people/bmoreno/sounds/164182/ The TA1 watermill sound is from https://freesound.org/people/bmoreno/sounds/164182/
Many thanks to Thomas-S and others for their contributions Many thanks to Thomas-S, niklp09, and others for their contributions
### Dependencies ### Dependencies
@ -61,7 +61,7 @@ It is highly recommended that you install the following mods, too:
* [compost](https://github.com/joe7575/compost): The garden soil is needed for the TA4 LED Grow Light based flower bed * [compost](https://github.com/joe7575/compost): The garden soil is needed for the TA4 LED Grow Light based flower bed
* [techpack_stairway](https://github.com/joe7575/techpack_stairway): Ladders, stairways, and bridges for your machines * [techpack_stairway](https://github.com/joe7575/techpack_stairway): Ladders, stairways, and bridges for your machines
* [autobahn](https://github.com/joe7575/autobahn): Street blocks and slopes with stripes for faster traveling * [autobahn](https://github.com/joe7575/autobahn): Street blocks and slopes with stripes for faster traveling
* [[ta4_jetpack](https://github.com/joe7575/ta4_jetpack): A Jetpack with hydrogen as fuel and TA4 recipe * [ta4_jetpack](https://github.com/joe7575/ta4_jetpack): A Jetpack with hydrogen as fuel and TA4 recipe
For large servers with many players, the following packages are recommended: For large servers with many players, the following packages are recommended:
@ -86,10 +86,47 @@ Available worlds will be converted to 'lsqlite3', but there is no way back, so:
**Never disable 'lsqlite3' for a world that has already been used!** **Never disable 'lsqlite3' for a world that has already been used!**
### History ### History
**2023-05-05 V1.15**
- Allow energy storage with up to 13x13x13 concrete blocks
- Allow registration of other buckets
- Add hyperloop chest only if the hyperloop mod is available
- Add missing 'minetest.formspec_escape' #131
- Fix bug "Trouble with flycontroller #130"
- Add optional dependency on farming mod (orwell96)
- Fix forceload formspec receiver (Niklp09)
**2023-04-16 V1.14**
- Add file "api.md"
- Add API function `register_ore_for_gravelsieve`
- Add support for the game Asuna
- Merge pull request #124 from Niklp09/drops
- Fix keep node number issue
- Fix manual issue #123
**2023-04-10 V1.13**
- Add "Teleport mode" to the ta5 fly controller
**2023-04-01 V1.12**
- Improve Transformer:
- add wrench menu for 'max. power passed through'
- Increase max. power passed through from 100 to 300 ku
- Improve Electricmeter:
- add wrench menu for 'max. power passed through' and 'power countdown'
- add commands to read the countdown value (Lua and Beduino controller)
- Improve TA3 Mesecons Converter:
- fix overload bug
- fix missing dominant 'on' issue
- Add version command to TA3/TA4 Terminal
- TA5 Hyperloop Chest: Disable inventory access on client side due to minetest core issues
**2023-03-05 V1.11** **2023-03-05 V1.11**
- Reduce the number of necessary exp points for TA5 Hyperloop Chest, - Reduce the number of necessary exp points for TA5 Hyperloop Chest,
TA5 Hyperloop Tank, and TA5 AI Chip II TA5 Hyperloop Tank, and TA5 AI Chip II
- Fix possible kernel crashes with TA5 Hyperloop Chest and autocrafter - Fix possible kernel crashes with TA5 Hyperloop Chest and autocrafter

216
techage/api.md Normal file
View File

@ -0,0 +1,216 @@
# Techage API Functions
Techage API function to adapt/prepare techage for other mods/games.
## Move/Fly Controller
Register node names for nodes allowed to be moved by fly/move controllers.
This is only necessary for undiggable/intelligent nodes with one of the following attributes:
- ```drop = ""```
- ```diggable = false```
- ```after_dig_node ~= nil```
```lua
techage.register_simple_nodes(node_names, is_valid)
```
- `is_valid = true` - Add node to the list of simple nodes
- `is_valid = false` - Remove node from the list of simple nodes
Example:
```lua
techage.register_simple_nodes({"techage:power_lineS"}, true)
```
For door nodes used as sliding doors by means of the move controller, call in addition:
```lua
techage.flylib.protect_door_from_being_opened(node_name)
```
## TA1 Hammer
Register stone/gravel name pair for the hammer blow:
```lua
techage.register_stone_gravel_pair(stone_name, gravel_name)
```
Example:
```lua
techage.register_stone_gravel_pair("default:stone", "default:gravel")
```
## TA1 Melting Pot
Register a pot recipe:
```lua
techage.ironage_register_recipe(recipe)
```
Examples:
```lua
techage.ironage_register_recipe({
output = "default:obsidian",
recipe = {"default:cobble"},
heat = 10, -- Corresponds to the tower height
time = 8, -- Cooking time in seconds
})
techage.ironage_register_recipe({
output = "default:bronze_ingot 4",
recipe = {"default:copper_ingot", "default:copper_ingot", "default:copper_ingot", "default:tin_ingot"},
heat = 4, -- Corresponds to the tower height
time = 8, -- Cooking time in seconds
})
```
## TA2/TA3/TA4 Autocrafter
Register any nodes/items that should not be crafted via the autocrafter.
```lua
techage.register_uncraftable_items(item_name)
```
## TA2/TA3/TA4 Gravel Sieve
Change the probability of ores or register new ores for sieving.
```lua
techage.register_ore_for_gravelsieve(ore_name, probability)
```
Example:
```lua
techage.register_ore_for_gravelsieve("default:iron_lump", 30)
```
Default values for MTG are:
```lua
-- higher value means less frequent occurrence
techage:baborium_lump 100000 -- hardly ever
default:mese_crystal 548 -- every 548th time
default:gold_lump 439
default:tin_lump 60
default:diamond 843
default:copper_lump 145
default:coal_lump 11
default:iron_lump 15
```
## TA2/TA3/TA4 Gravel Rinser
Add a rinser recipe.
```lua
techage.add_rinser_recipe(recipe)
```
Example:
```lua
techage.add_rinser_recipe({input = "techage:sieved_gravel", output = "techage:usmium_nuggets", probability = 30})
```
## TA2/TA3/TA4 Grinder
Add a grinder recipe.
```lua
techage.add_grinder_recipe(recipe, ta1_permitted)
```
Examples:
```lua
echage.add_grinder_recipe({input = "default:cobble", output = "default:gravel"})
techage.add_grinder_recipe({input = "default:sandstone", output = "default:sand 4"})
```
## TA3/TA4 Electronic Fab, TA4 Doser
Add recipes to an electronic fab or doser (chemical reactor):
```lua
techage.recipes.add(rtype, recipe)
```
`rtype` is one of: `ta2_electronic_fab` , `ta4_doser`
A recipe look like:
```
{
output = "<item-name> <units>", -- units = 1..n
waste = "<item-name> <units>", -- units = 1..n
input = { -- up to 4 items
"<item-name> <units>",
"<item-name> <units>",
},
}
```
Examples:
```lua
techage.recipes.add("ta2_electronic_fab", {
output = "techage:vacuum_tube 2",
waste = "basic_materials:empty_spool 1",
input = {"default:glass 1", "basic_materials:copper_wire 1", "basic_materials:plastic_sheet 1", "techage:usmium_nuggets 1"}
})
techage.recipes.add("ta4_doser", {
output = "techage:naphtha 1",
input = {
"techage:fueloil 1",
},
catalyst = "techage:gibbsite_powder",
})
```
## TA3 Furnace
Register recipe:
```lua
techage.furnace.register_recipe(recipe)
```
Example:
```lua
techage.furnace.register_recipe({
output = "default:bronze_ingot 4",
recipe = {"default:copper_ingot", "default:copper_ingot", "default:copper_ingot", "default:tin_ingot"},
time = 2, -- in seconds
})
```

View File

@ -373,7 +373,7 @@ tiles.pas = {
tiles.act = { tiles.act = {
-- up, down, right, left, back, front -- up, down, right, left, back, front
{ {
image = "techage_filling4_ta#.png^techage_appl_autocrafter4.png^techage_frame4_ta#_top.png", name = "techage_filling4_ta#.png^techage_appl_autocrafter4.png^techage_frame4_ta#_top.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -386,7 +386,7 @@ tiles.act = {
"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",
{ {
image = "techage_filling4_ta#.png^techage_appl_autocrafter4.png^techage_frame4_ta#.png", name = "techage_filling4_ta#.png^techage_appl_autocrafter4.png^techage_frame4_ta#.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -396,7 +396,7 @@ tiles.act = {
}, },
}, },
{ {
image = "techage_filling4_ta#.png^techage_appl_autocrafter4.png^techage_frame4_ta#.png", name = "techage_filling4_ta#.png^techage_appl_autocrafter4.png^techage_frame4_ta#.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -104,7 +104,7 @@ local function prepare_tiles(tiles, stage, power_png)
tbl[#tbl+1] = item:gsub("#", stage):gsub("{power}", power_png):gsub("@@", '#') tbl[#tbl+1] = item:gsub("#", stage):gsub("{power}", power_png):gsub("@@", '#')
else else
local temp = table.copy(item) local temp = table.copy(item)
temp.image = temp.image:gsub("#", stage):gsub("{power}", power_png):gsub("@@", '#') temp.name = temp.name:gsub("#", stage):gsub("{power}", power_png):gsub("@@", '#')
tbl[#tbl+1] = temp tbl[#tbl+1] = temp
end end
end end

View File

@ -475,7 +475,7 @@ local get_tiles = function(is_hp)
tiles.act = { tiles.act = {
-- up, down, right, left, back, front -- up, down, right, left, back, front
{ {
image = "techage_filling4_ta#.png^techage_appl_distri4.png^techage_frame4_ta#_top"..variant..".png^techage_appl_color_top4.png", name = "techage_filling4_ta#.png^techage_appl_distri4.png^techage_frame4_ta#_top"..variant..".png^techage_appl_color_top4.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -26,7 +26,7 @@ local recipes = techage.recipes
local RecipeType = { local RecipeType = {
[2] = "ta2_electronic_fab", [2] = "ta2_electronic_fab",
[3] = "ta3_electronic_fab", [3] = "ta3_electronic_fab",
[4] = "ta4_electronic_fab", [4] = "ta4_electronic_fab",
} }
@ -152,7 +152,7 @@ tiles.act = {
"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",
{ {
image = "techage_filling4_ta#.png^techage_appl_electronic_fab4.png^techage_frame4_ta#.png", name = "techage_filling4_ta#.png^techage_appl_electronic_fab4.png^techage_frame4_ta#.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -162,7 +162,7 @@ tiles.act = {
}, },
}, },
{ {
image = "techage_filling4_ta#.png^techage_appl_electronic_fab4.png^techage_frame4_ta#.png", name = "techage_filling4_ta#.png^techage_appl_electronic_fab4.png^techage_frame4_ta#.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -169,7 +169,7 @@ local function on_rightclick(pos, node, clicker, itemstack, pointed_thing)
if name == owner or minetest.check_player_privs(name, "server") then if name == owner or minetest.check_player_privs(name, "server") then
local s = formspec(owner) local s = formspec(owner)
if s then if s then
minetest.show_formspec(owner, "techage:forceload", s) minetest.show_formspec(name, "techage:forceload", s)
end end
end end
end end
@ -186,7 +186,7 @@ minetest.register_node("techage:forceload", {
'techage_filling_ta2.png^techage_frame_ta2_top.png', 'techage_filling_ta2.png^techage_frame_ta2_top.png',
'techage_filling_ta2.png^techage_frame_ta2_top.png', 'techage_filling_ta2.png^techage_frame_ta2_top.png',
{ {
image = "techage_filling_ta2.png^techage_frame_ta2_top.png^techage_appl_forceload.png", name = "techage_filling_ta2.png^techage_frame_ta2_top.png^techage_appl_forceload.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -217,7 +217,7 @@ minetest.register_node("techage:forceloadtile", {
tiles = { tiles = {
-- up, down, right, left, back, front -- up, down, right, left, back, front
{ {
image = "techage_filling_ta2.png^techage_frame_ta2_top.png^techage_appl_forceload.png", name = "techage_filling_ta2.png^techage_frame_ta2_top.png^techage_appl_forceload.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -207,7 +207,7 @@ tiles.pas = {
tiles.act = { tiles.act = {
-- up, down, right, left, back, front -- up, down, right, left, back, front
{ {
image = "techage_appl_rinser4_top.png^techage_frame4_ta#_top.png", name = "techage_appl_rinser4_top.png^techage_frame4_ta#_top.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -133,7 +133,7 @@ tiles.pas = {
tiles.act = { tiles.act = {
-- up, down, right, left, back, front -- up, down, right, left, back, front
{ {
image = "techage_appl_sieve4_top.png^techage_frame4_ta#_top.png", name = "techage_appl_sieve4_top.png^techage_frame4_ta#_top.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -167,7 +167,7 @@ tiles.pas = {
tiles.act = { tiles.act = {
-- up, down, right, left, back, front -- up, down, right, left, back, front
{ {
image = "techage_appl_grinder4.png^techage_frame4_ta#_top.png", name = "techage_appl_grinder4.png^techage_frame4_ta#_top.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -136,7 +136,7 @@ tiles.act = {
"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",
{ {
image = "techage_filling4_ta#.png^techage_liquidsampler4.png^techage_frame4_ta#.png", name = "techage_filling4_ta#.png^techage_liquidsampler4.png^techage_frame4_ta#.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -124,9 +124,10 @@ local function push(pos, crd, meta, nvm, pull_dir, push_dir, num)
return 0 return 0
elseif leftover ~= true then elseif leftover ~= true then
-- place item back -- place item back
taken = taken - leftover:get_count()
techage.unpull_items(pos, pull_dir, leftover) techage.unpull_items(pos, pull_dir, leftover)
crd.State:blocked(pos, nvm) crd.State:blocked(pos, nvm)
return taken - leftover:get_count() return taken
end end
return taken return taken
end end
@ -282,7 +283,7 @@ tiles.act = {
"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",
{ {
image = "techage_appl_pusher14.png^[transformR180]^techage_frame14_ta#.png", name = "techage_appl_pusher14.png^[transformR180]^techage_frame14_ta#.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -292,7 +293,7 @@ tiles.act = {
}, },
}, },
{ {
image = "techage_appl_pusher14.png^techage_frame14_ta#.png", name = "techage_appl_pusher14.png^techage_frame14_ta#.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -328,7 +328,7 @@ tiles.act = {
"techage_filling_ta#.png^techage_frame_ta#.png", "techage_filling_ta#.png^techage_frame_ta#.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",
{ {
image = "techage_frame14_ta#.png^techage_quarry_left14.png", name = "techage_frame14_ta#.png^techage_quarry_left14.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -193,7 +193,7 @@ tiles.pas = {
tiles.act = { tiles.act = {
-- up, down, right, left, back, front -- up, down, right, left, back, front
{ {
image = "techage_appl_grinder4.png^[colorize:@@000000:100^techage_frame4_ta#_top.png", name = "techage_appl_grinder4.png^[colorize:@@000000:100^techage_frame4_ta#_top.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -211,7 +211,7 @@ tiles.act = {
"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",
{ {
image = "techage_appl_pusher14.png^[transformR180]^techage_frame14_ta#.png^techage_appl_injector14.png", name = "techage_appl_pusher14.png^[transformR180]^techage_frame14_ta#.png^techage_appl_injector14.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -221,7 +221,7 @@ tiles.act = {
}, },
}, },
{ {
image = "techage_appl_pusher14.png^techage_frame14_ta#.png^techage_appl_injector14.png", name = "techage_appl_pusher14.png^techage_frame14_ta#.png^techage_appl_injector14.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -29,7 +29,7 @@ local menu = techage.menu
local function formspec(pos) local function formspec(pos)
local ndef = minetest.registered_nodes["techage:ta5_hl_chest"] local ndef = minetest.registered_nodes["techage:ta5_hl_chest"]
local status = M(pos):get_string("conn_status") local status = M(pos):get_string("conn_status")
if hyperloop.is_client(pos) or hyperloop.is_server(pos) then if hyperloop.is_server(pos) then
local title = ndef.description .. " " .. status local title = ndef.description .. " " .. status
return "size[8,9]".. return "size[8,9]"..
"box[0,-0.1;7.8,0.5;#c6e8ff]" .. "box[0,-0.1;7.8,0.5;#c6e8ff]" ..
@ -38,6 +38,13 @@ local function formspec(pos)
"list[current_player;main;0,5.3;8,4;]".. "list[current_player;main;0,5.3;8,4;]"..
"listring[context;main]".. "listring[context;main]"..
"listring[current_player;main]" "listring[current_player;main]"
elseif hyperloop.is_client(pos) then
local title = ndef.description .. " " .. status
return "size[8,9]"..
"box[0,-0.1;7.8,0.5;#c6e8ff]" ..
"label[0.2,-0.1;" .. minetest.colorize( "#000000", title) .. "]" ..
"label[0.2,2;Inventory access on client side disabled\ndue to minetest core issues!]" ..
"list[current_player;main;0,5.3;8,4;]"
else else
return menu.generate_formspec(pos, ndef, hyperloop.SUBMENU) return menu.generate_formspec(pos, ndef, hyperloop.SUBMENU)
end end
@ -47,6 +54,9 @@ local function allow_metadata_inventory_put(pos, listname, index, stack, player)
if minetest.is_protected(pos, player:get_player_name()) then if minetest.is_protected(pos, player:get_player_name()) then
return 0 return 0
end end
if techage.hyperloop.is_client(pos) then
return 0
end
shared_inv.before_inv_access(pos, listname) shared_inv.before_inv_access(pos, listname)
local inv = minetest.get_inventory({type="node", pos=pos}) local inv = minetest.get_inventory({type="node", pos=pos})
if inv and inv:room_for_item(listname, stack) then if inv and inv:room_for_item(listname, stack) then
@ -59,6 +69,9 @@ local function allow_metadata_inventory_take(pos, listname, index, stack, player
if minetest.is_protected(pos, player:get_player_name()) then if minetest.is_protected(pos, player:get_player_name()) then
return 0 return 0
end end
if techage.hyperloop.is_client(pos) then
return 0
end
shared_inv.before_inv_access(pos, listname) shared_inv.before_inv_access(pos, listname)
local inv = minetest.get_inventory({type="node", pos=pos}) local inv = minetest.get_inventory({type="node", pos=pos})
if inv and inv:contains_item(listname, stack) then if inv and inv:contains_item(listname, stack) then
@ -71,6 +84,9 @@ local function allow_metadata_inventory_move(pos, from_list, from_index, to_list
if shared_inv.before_inv_access(pos, "main") then if shared_inv.before_inv_access(pos, "main") then
return 0 return 0
end end
if techage.hyperloop.is_client(pos) then
return 0
end
return count return count
end end
@ -224,3 +240,9 @@ minetest.register_craft({
output = "techage:ta5_hl_chest", output = "techage:ta5_hl_chest",
recipe = {"techage:chest_ta4", "techage:ta5_aichip"} recipe = {"techage:chest_ta4", "techage:ta5_aichip"}
}) })
minetest.register_on_mods_loaded(function()
if not minetest.global_exists("hyperloop") then
minetest.clear_craft({output = "techage:ta5_hl_chest"})
end
end)

View File

@ -3,7 +3,7 @@
TechAge TechAge
======= =======
Copyright (C) 2019-2020 Joachim Stolberg Copyright (C) 2019-2023 Joachim Stolberg
AGPL v3 AGPL v3
See LICENSE.txt for more information See LICENSE.txt for more information
@ -24,13 +24,10 @@ local BLOCKING_TIME = 0.3 -- 300ms
techage.boiler = {} techage.boiler = {}
local IsWater = { local IsWater = {
["bucket:bucket_river_water"] = true, ["bucket:bucket_river_water"] = "bucket:bucket_empty",
["bucket:bucket_water"] = true,
} }
local IsBucket = { local IsBucket = {}
["bucket:bucket_empty"] = true,
}
local function node_description(name) local function node_description(name)
name = string.split(name, " ")[1] name = string.split(name, " ")[1]
@ -126,12 +123,12 @@ function techage.boiler.on_punch(pos, node, puncher, pointed_thing)
if IsWater[wielded_item] and nvm.num_water < MAX_WATER then if IsWater[wielded_item] and nvm.num_water < MAX_WATER then
mem.blocking_time = techage.SystemTime + BLOCKING_TIME mem.blocking_time = techage.SystemTime + BLOCKING_TIME
nvm.num_water = nvm.num_water + 1 nvm.num_water = nvm.num_water + 1
puncher:set_wielded_item(ItemStack("bucket:bucket_empty")) puncher:set_wielded_item(ItemStack(IsWater[wielded_item]))
M(pos):set_string("formspec", techage.boiler.formspec(pos, nvm)) M(pos):set_string("formspec", techage.boiler.formspec(pos, nvm))
elseif IsBucket[wielded_item] and nvm.num_water > 0 then elseif IsBucket[wielded_item] and nvm.num_water > 0 then
if item_count > 1 then if item_count > 1 then
local inv = puncher:get_inventory() local inv = puncher:get_inventory()
local item = ItemStack("bucket:bucket_water") local item = ItemStack(IsBucket[wielded_item])
if inv:room_for_item("main", item) then if inv:room_for_item("main", item) then
inv:add_item("main", item) inv:add_item("main", item)
puncher:set_wielded_item({name=wielded_item, count = item_count - 1}) puncher:set_wielded_item({name=wielded_item, count = item_count - 1})
@ -141,8 +138,13 @@ function techage.boiler.on_punch(pos, node, puncher, pointed_thing)
else else
mem.blocking_time = techage.SystemTime + BLOCKING_TIME mem.blocking_time = techage.SystemTime + BLOCKING_TIME
nvm.num_water = nvm.num_water - 1 nvm.num_water = nvm.num_water - 1
puncher:set_wielded_item(ItemStack("bucket:bucket_water")) puncher:set_wielded_item(ItemStack(IsBucket[wielded_item]))
end end
M(pos):set_string("formspec", techage.boiler.formspec(pos, nvm)) M(pos):set_string("formspec", techage.boiler.formspec(pos, nvm))
end end
end end
function techage.register_water_bucket(empty_bucket, full_bucket)
IsWater[full_bucket] = empty_bucket
IsBucket[empty_bucket] = full_bucket
end

View File

@ -169,7 +169,7 @@ function flylib.to_path(s, max_dist)
local tPath local tPath
local dist = 0 local dist = 0
for _, line in ipairs(strsplit(s)) do for _, line in ipairs(strsplit(s or "")) do
line = trim(line) line = trim(line)
line = string.split(line, "--", true, 1)[1] or "" line = string.split(line, "--", true, 1)[1] or ""
if line ~= "" then if line ~= "" then
@ -564,10 +564,6 @@ end
local function is_simple_node(pos) local function is_simple_node(pos)
local node = techage.get_node_lvm(pos) local node = techage.get_node_lvm(pos)
if not minecart.is_rail(pos, node.name) then if not minecart.is_rail(pos, node.name) then
if node.name == "air" then
minetest.swap_node(pos, {name = "techage:moveblock", param2 = 0})
return true
end
local ndef = minetest.registered_nodes[node.name] local ndef = minetest.registered_nodes[node.name]
return not techage.is_air_like(node.name) and techage.can_dig_node(node.name, ndef) or minecart.is_cart(node.name) return not techage.is_air_like(node.name) and techage.can_dig_node(node.name, ndef) or minecart.is_cart(node.name)
end end
@ -614,6 +610,10 @@ local function move_node(pos, meta, pos1, lmove, max_speed, height)
end end
end end
--
-- Default Move Mode
--
-- Move the nodes from nvm.lpos1 to nvm.lpos2 -- Move the nodes from nvm.lpos1 to nvm.lpos2
-- * nvm.lpos1 is a list of nodes -- * nvm.lpos1 is a list of nodes
-- * lmove is the movement as a list of `moves` -- * lmove is the movement as a list of `moves`
@ -703,6 +703,86 @@ local function move_nodes(pos, meta, lpos1, move, max_speed, height)
return true, lpos2 return true, lpos2
end end
--
-- Teleport Mode
--
local function is_player_available(lpos1)
if #lpos1 == 1 then
for _, obj in pairs(minetest.get_objects_inside_radius(lpos1[1], 0.9)) do
if obj:is_player() then
return true
end
end
end
end
local function teleport(base_pos, pos1, pos2, meta, owner, lmove, max_speed)
if not minetest.is_protected(pos1, owner) and not minetest.is_protected(pos2, owner) then
local node1 = techage.get_node_lvm(pos1)
local node2 = techage.get_node_lvm(pos2)
if techage.is_air_like(node1.name) and techage.is_air_like(node2.name) then
minetest.swap_node(pos1, {name = "techage:moveblock", param2 = 0})
if move_node(base_pos, meta, pos1, lmove, max_speed, 0) == false then
meta:set_string("status", S("No valid start position"))
return false
end
else
if not techage.is_air_like(node1.name) then
meta:set_string("status", S("No valid start position"))
else
meta:set_string("status", S("No valid destination position"))
end
return false
end
else
if minetest.is_protected(pos1, owner) then
meta:set_string("status", S("Start position is protected"))
else
meta:set_string("status", S("Destination position is protected"))
end
return false
end
meta:set_string("status", S("Running"))
return true
end
-- Move the player from nvm.lpos1 to nvm.lpos2
-- * nvm.lpos1 is a list of length one(!) with the not to be moved block below the player
-- * lmove is the movement as a list of `moves`
-- * pos, meta, and nvm are controller block related
local function multi_teleport_player(base_pos, meta, nvm, lmove, max_speed, move2to1)
local owner = meta:get_string("owner")
techage.counting_add(owner, #lmove, #nvm.lpos1 * #lmove)
local pos1 = vector.add(nvm.lpos1[1], {x=0, y=1, z=0})
local pos2 = vector.add(nvm.lpos2[1], {x=0, y=1, z=0})
if move2to1 then
pos1, pos2 = pos2, pos1
end
return teleport(base_pos, pos1, pos2, meta, owner, lmove, max_speed)
end
-- Move the player from lpos1 to lpos2.
-- * lpos1 is a list of length one(!) with the not to be moved block below the player
-- * lpos2 = lpos1 + move
-- * pos and meta are controller block related
local function teleport_player(base_pos, meta, lpos1, move, max_speed)
local owner = meta:get_string("owner")
lpos1 = lpos1 or {}
techage.counting_add(owner, #lpos1)
local pos1 = vector.add(lpos1[1], {x=0, y=1, z=0})
local pos2 = vector.add(pos1, move)
return teleport(base_pos, pos1, pos2, meta, owner, {move}, max_speed), nil
end
--------------------------------------------------------------------------------------
-- API
--------------------------------------------------------------------------------------
-- move2to1 is the direction and is true for 'from pos2 to pos1' -- move2to1 is the direction and is true for 'from pos2 to pos1'
-- Move path and other data is stored as meta data of pos -- Move path and other data is stored as meta data of pos
function flylib.move_to_other_pos(pos, move2to1) function flylib.move_to_other_pos(pos, move2to1)
@ -711,6 +791,7 @@ function flylib.move_to_other_pos(pos, move2to1)
local lmove, err = flylib.to_path(meta:get_string("path")) or {} local lmove, err = flylib.to_path(meta:get_string("path")) or {}
local max_speed = meta:contains("max_speed") and meta:get_int("max_speed") or MAX_SPEED local max_speed = meta:contains("max_speed") and meta:get_int("max_speed") or MAX_SPEED
local height = meta:contains("height") and meta:get_float("height") or 1 local height = meta:contains("height") and meta:get_float("height") or 1
local teleport_mode = meta:get_string("teleport_mode") == "enable"
if err or nvm.running then return false end if err or nvm.running then return false end
@ -724,8 +805,13 @@ function flylib.move_to_other_pos(pos, move2to1)
end end
-- calc destination positions -- calc destination positions
nvm.lpos2 = lvect_add_vec(nvm.lpos1, offs) nvm.lpos2 = lvect_add_vec(nvm.lpos1, offs)
local lpos = move2to1 and nvm.lpos2 or nvm.lpos1
nvm.running = multi_move_nodes(pos, meta, nvm, lmove, max_speed, height, move2to1) if teleport_mode and is_player_available(lpos) then
nvm.running = multi_teleport_player(pos, meta, nvm, lmove, max_speed, move2to1)
elseif not teleport_mode then
nvm.running = multi_move_nodes(pos, meta, nvm, lmove, max_speed, height, move2to1)
end
nvm.moveBA = nvm.running and not move2to1 nvm.moveBA = nvm.running and not move2to1
return nvm.running return nvm.running
end end
@ -736,10 +822,16 @@ function flylib.move_to(pos, move)
local nvm = techage.get_nvm(pos) local nvm = techage.get_nvm(pos)
local height = techage.in_range(meta:contains("height") and meta:get_float("height") or 1, 0, 1) local height = techage.in_range(meta:contains("height") and meta:get_float("height") or 1, 0, 1)
local max_speed = meta:contains("max_speed") and meta:get_int("max_speed") or MAX_SPEED local max_speed = meta:contains("max_speed") and meta:get_int("max_speed") or MAX_SPEED
local teleport_mode = meta:get_string("teleport_mode") == "enable"
if nvm.running then return false end if nvm.running then return false end
nvm.running, nvm.lastpos = move_nodes(pos, meta, nvm.lastpos or nvm.lpos1, move, max_speed, height) -- TODO: Not working so far. There is no known 'nvm.lastpos' as start pos.
--if teleport_mode and is_player_available(nvm.lpos1) then
-- nvm.running, nvm.lastpos = teleport_player(pos, meta, nvm.lastpos or nvm.lpos1, move, max_speed)
--elseif not teleport_mode then
nvm.running, nvm.lastpos = move_nodes(pos, meta, nvm.lastpos or nvm.lpos1, move, max_speed, height)
--end
return nvm.running return nvm.running
end end
@ -750,6 +842,7 @@ function flylib.reset_move(pos)
local max_speed = meta:contains("max_speed") and meta:get_int("max_speed") or MAX_SPEED local max_speed = meta:contains("max_speed") and meta:get_int("max_speed") or MAX_SPEED
if nvm.running then return false end if nvm.running then return false end
if meta:get_string("teleport_mode") == "enable" then return false end
if nvm.lpos1 and nvm.lpos1[1] then if nvm.lpos1 and nvm.lpos1[1] then
local move = vector.subtract(nvm.lpos1[1], (nvm.lastpos or nvm.lpos1)[1]) local move = vector.subtract(nvm.lpos1[1], (nvm.lastpos or nvm.lpos1)[1])
@ -830,21 +923,6 @@ function flylib.remove_node(pos)
end end
end end
minetest.register_node("techage:moveblock", {
description = "Techage Move Block",
drawtype = "normal",
tiles = {"techage_invisible.png"},
sunlight_propagates = true,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
floodable = true,
is_ground_content = false,
groups = {not_in_creative_inventory=1},
drop = "",
})
minetest.register_on_joinplayer(function(player) minetest.register_on_joinplayer(function(player)
unlock_player(player) unlock_player(player)
end) end)

View File

@ -29,7 +29,7 @@ local ProbabilityCorrections = {
-- collect all registered ores and calculate the probability -- collect all registered ores and calculate the probability
local function add_ores() local function add_ores()
for _,item in pairs(minetest.registered_ores) do for _,item in pairs(minetest.registered_ores) do
if minetest.registered_nodes[item.ore] then if not ore_probability[item.ore] and minetest.registered_nodes[item.ore] then
local drop = minetest.registered_nodes[item.ore].drop local drop = minetest.registered_nodes[item.ore].drop
if type(drop) == "string" if type(drop) == "string"
and drop ~= item.ore and drop ~= item.ore
@ -66,8 +66,14 @@ local function add_ores()
minetest.log("info", string.format("[techage] Overall probability %g", overall_probability)) minetest.log("info", string.format("[techage] Overall probability %g", overall_probability))
end end
minetest.after(1, add_ores) minetest.register_on_mods_loaded(add_ores)
--
-- Change the probability of ores or register new ores for sieving
--
function techage.register_ore_for_gravelsieve(ore_name, probability)
ore_probability[ore_name] = probability
end
-- determine ore based on the calculated probability -- determine ore based on the calculated probability
function techage.gravelsieve_get_random_gravel_ore() function techage.gravelsieve_get_random_gravel_ore()

View File

@ -101,6 +101,9 @@ function techage.register_liquid(full_container, empty_container, container_size
ContainerDef[empty_container] = ContainerDef[empty_container] or {} ContainerDef[empty_container] = ContainerDef[empty_container] or {}
ContainerDef[empty_container][inv_item] = full_container ContainerDef[empty_container][inv_item] = full_container
IsLiquid[inv_item] = true IsLiquid[inv_item] = true
if inv_item == "techage:water" and container_size == 1 then
techage.register_water_bucket(empty_container, full_container)
end
end end
local function get_liquid_def(full_container) local function get_liquid_def(full_container)

View File

@ -3,7 +3,7 @@
TechAge TechAge
======= =======
Copyright (C) 2019-2020 Joachim Stolberg Copyright (C) 2019-2023 Joachim Stolberg
AGPL v3 AGPL v3
See LICENSE.txt for more information See LICENSE.txt for more information
@ -16,6 +16,12 @@ local S = techage.S
local P = minetest.string_to_pos local P = minetest.string_to_pos
local M = minetest.get_meta local M = minetest.get_meta
local OCEAN = "ocean"
if minetest.global_exists("asuna") then
OCEAN = "below"
end
local function chat_message(player_name, msg) local function chat_message(player_name, msg)
if player_name then if player_name then
minetest.chat_send_player(player_name, S("[TA4 Wind Turbine]").." "..msg) minetest.chat_send_player(player_name, S("[TA4 Wind Turbine]").." "..msg)
@ -39,7 +45,7 @@ function techage.valid_place_for_windturbine(pos, player_name, num_turbines)
local data = minetest.get_biome_data({x=pos.x, y=-2, z=pos.z}) local data = minetest.get_biome_data({x=pos.x, y=-2, z=pos.z})
if data then if data then
local name = minetest.get_biome_name(data.biome) local name = minetest.get_biome_name(data.biome)
if not string.find(name, "ocean") then if not string.find(name, OCEAN) then
return chat_message(player_name, S("This is a").." "..name.." "..S("biome and no ocean!")) return chat_message(player_name, S("This is a").." "..name.." "..S("biome and no ocean!"))
end end
end end

View File

@ -331,7 +331,7 @@ minetest.register_node("techage:ta4_doser_on", {
"techage_filling_ta4.png^techage_frame_ta4_top.png^techage_appl_hole_pipe.png", "techage_filling_ta4.png^techage_frame_ta4_top.png^techage_appl_hole_pipe.png",
"techage_filling_ta4.png^techage_frame_ta4.png", "techage_filling_ta4.png^techage_frame_ta4.png",
{ {
image = "techage_filling8_ta4.png^techage_frame8_ta4.png^techage_appl_pump_up8.png", name = "techage_filling8_ta4.png^techage_frame8_ta4.png^techage_appl_pump_up8.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -37,7 +37,7 @@ minetest.register_node("techage:cooler", {
tiles = { tiles = {
-- up, down, right, left, back, front -- up, down, right, left, back, front
{ {
image = "techage_filling4_ta3.png^techage_appl_cooler4.png^techage_frame4_ta3.png", name = "techage_filling4_ta3.png^techage_appl_cooler4.png^techage_frame4_ta3.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -47,7 +47,7 @@ minetest.register_node("techage:cooler", {
}, },
}, },
{ {
image = "techage_filling4_ta3.png^techage_appl_cooler4.png^techage_frame4_ta3.png", name = "techage_filling4_ta3.png^techage_appl_cooler4.png^techage_frame4_ta3.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -78,7 +78,7 @@ minetest.register_node("techage:cooler_on", {
tiles = { tiles = {
-- up, down, right, left, back, front -- up, down, right, left, back, front
{ {
image = "techage_filling4_ta3.png^techage_appl_cooler4.png^techage_frame4_ta3.png", name = "techage_filling4_ta3.png^techage_appl_cooler4.png^techage_frame4_ta3.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -88,7 +88,7 @@ minetest.register_node("techage:cooler_on", {
}, },
}, },
{ {
image = "techage_filling4_ta3.png^techage_appl_cooler4.png^techage_frame4_ta3.png", name = "techage_filling4_ta3.png^techage_appl_cooler4.png^techage_frame4_ta3.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -149,7 +149,7 @@ minetest.register_node("techage:coalfirehole_on", {
"techage_coal_boiler.png^[colorize:black:80", "techage_coal_boiler.png^[colorize:black:80",
"techage_coal_boiler.png^[colorize:black:80", "techage_coal_boiler.png^[colorize:black:80",
{ {
image = "techage_coal_boiler4.png^[colorize:black:80^techage_appl_firehole4.png", name = "techage_coal_boiler4.png^[colorize:black:80^techage_appl_firehole4.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -170,7 +170,7 @@ minetest.register_node("techage:generator_on", {
"techage_filling_ta3.png^techage_appl_hole_electric.png^techage_frame_ta3.png", "techage_filling_ta3.png^techage_appl_hole_electric.png^techage_frame_ta3.png",
"techage_filling_ta3.png^techage_appl_open.png^techage_frame_ta3.png", "techage_filling_ta3.png^techage_appl_open.png^techage_frame_ta3.png",
{ {
image = "techage_filling4_ta3.png^techage_appl_generator4.png^techage_frame4_ta3.png", name = "techage_filling4_ta3.png^techage_appl_generator4.png^techage_frame4_ta3.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -180,7 +180,7 @@ minetest.register_node("techage:generator_on", {
}, },
}, },
{ {
image = "techage_filling4_ta3.png^techage_appl_generator4.png^[transformFX]^techage_frame4_ta3.png", name = "techage_filling4_ta3.png^techage_appl_generator4.png^[transformFX]^techage_frame4_ta3.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -105,7 +105,7 @@ minetest.register_node("techage:turbine_on", {
"techage_filling_ta3.png^techage_appl_open.png^techage_frame_ta3.png", "techage_filling_ta3.png^techage_appl_open.png^techage_frame_ta3.png",
"techage_filling_ta3.png^techage_frame_ta3.png^techage_steam_hole.png", "techage_filling_ta3.png^techage_frame_ta3.png^techage_steam_hole.png",
{ {
image = "techage_filling4_ta3.png^techage_appl_turbine4.png^techage_frame4_ta3.png^[transformFX", name = "techage_filling4_ta3.png^techage_appl_turbine4.png^techage_frame4_ta3.png^[transformFX",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -115,7 +115,7 @@ minetest.register_node("techage:turbine_on", {
}, },
}, },
{ {
image = "techage_filling4_ta3.png^techage_appl_turbine4.png^techage_frame4_ta3.png", name = "techage_filling4_ta3.png^techage_appl_turbine4.png^techage_frame4_ta3.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -23,7 +23,7 @@ minetest.register_node("techage:ta4_collider_cooler", {
tiles = { tiles = {
-- up, down, right, left, back, front -- up, down, right, left, back, front
{ {
image = "techage_appl_cooler4.png^techage_frame4_ta4_top.png", name = "techage_appl_cooler4.png^techage_frame4_ta4_top.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -33,7 +33,7 @@ minetest.register_node("techage:ta4_collider_cooler", {
}, },
}, },
{ {
image = "techage_appl_cooler4.png^techage_frame4_ta4_top.png", name = "techage_appl_cooler4.png^techage_frame4_ta4_top.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -325,7 +325,7 @@ techage.manual_DE.aText = {
"\n".. "\n"..
"\n".. "\n"..
"\n", "\n",
"Baborium wird nur im Untertagebau gewonnen. Baborium findet man nur in Stein in einer Höhe zwischen -250 und -340 Meter.\n".. "Barborium kann nur im Untertagebau gewonnen werden. Diesen Stoff findet man nur in einer Tiefe von -250 bis -340 Metern.\n"..
"Baborium kann nur im TA3 Industrieofen geschmolzen werden.\n".. "Baborium kann nur im TA3 Industrieofen geschmolzen werden.\n"..
"\n".. "\n"..
"\n".. "\n"..
@ -389,7 +389,7 @@ techage.manual_DE.aText = {
" - Baue einen Turm aus Stein (cobble) mit einer 3x3 Grundfläche (7-11 Blöcke hoch)\n".. " - Baue einen Turm aus Stein (cobble) mit einer 3x3 Grundfläche (7-11 Blöcke hoch)\n"..
" - Lasse unten ein Loch an einer Seite offen\n".. " - Lasse unten ein Loch an einer Seite offen\n"..
" - Lege einen Anzünder (lighter) hinein\n".. " - Lege einen Anzünder (lighter) hinein\n"..
" - Fülle den Turm von oben bis zum Rand mit Holzkohle\n".. " - Fülle den Turm bis zum Rand mit Holzkohle\\, in dem du die Holzkohle von oben in das Loch fallen lässt\n"..
" - Zünde den Anzünder durch das Loch an\n".. " - Zünde den Anzünder durch das Loch an\n"..
" - Platziere den Schmelztiegel in die Flamme über dem Turm\neinen Block über der Flamme)\n".. " - Platziere den Schmelztiegel in die Flamme über dem Turm\neinen Block über der Flamme)\n"..
" - Um den Brenner anzuhalten\\, schließe das Loch vorübergehend bspw. mit einem Erdblock.\n".. " - Um den Brenner anzuhalten\\, schließe das Loch vorübergehend bspw. mit einem Erdblock.\n"..
@ -833,7 +833,7 @@ techage.manual_DE.aText = {
"Der TA3 Industrieofen dient als Ergänzung zu normalen Ofen (furnace). Damit können alle Waren mit \"Koch\" Rezepten\\, auch im Industrieofen hergestellt werden. Es gibt aber auch spezielle Rezepte\\, die nur im Industrieofen hergestellt werden können.\n".. "Der TA3 Industrieofen dient als Ergänzung zu normalen Ofen (furnace). Damit können alle Waren mit \"Koch\" Rezepten\\, auch im Industrieofen hergestellt werden. Es gibt aber auch spezielle Rezepte\\, die nur im Industrieofen hergestellt werden können.\n"..
"Der Industrieofen hat sein eigenes Menü zur Rezeptauswahl. Abhängig von den Waren im Industrieofen Inventar links kann rechts das Ausgangsprodukt gewählt werden.\n".. "Der Industrieofen hat sein eigenes Menü zur Rezeptauswahl. Abhängig von den Waren im Industrieofen Inventar links kann rechts das Ausgangsprodukt gewählt werden.\n"..
"\n".. "\n"..
"Der Industrieofen benötigt Strom (für das Gebläse) sowie Schweröl/Benzin für den Brenner. Der Industrieofens und muss wie im Plan rechts abgebildet\\, zusammen gebaut werden.\n".. "Der Industrieofen benötigt Strom (für das Gebläse) sowie Schweröl/Benzin für den Brenner. Der Industrieofen muss wie im Plan rechts abgebildet\\, zusammen gebaut werden.\n"..
"\n".. "\n"..
"Siehe auch TA4 Ofenheizung.\n".. "Siehe auch TA4 Ofenheizung.\n"..
"\n".. "\n"..
@ -1396,11 +1396,13 @@ techage.manual_DE.aText = {
"\n", "\n",
"Der TA4 Energiespeicher ersetzt den Batterie Block aus TA3.\n".. "Der TA4 Energiespeicher ersetzt den Batterie Block aus TA3.\n"..
"\n".. "\n"..
"Der Energiespeicher besteht aus einer Betonhülle (Concrete Block) gefüllt mit Gravel. Es gibt 3 Größen vom Speicher:\n".. "Der Energiespeicher besteht aus einer Betonhülle (Concrete Block) gefüllt mit Gravel. Es gibt 5 Größen vom Speicher:\n"..
"\n".. "\n"..
" - Hülle mit 5x5x5 Concrete Blocks\\, gefüllt mit 27 Gravel\\, Speicherkapazität: 22.5 kud\n".. " - Hülle mit 5x5x5 Concrete Blocks\\, gefüllt mit 27 Gravel\\, Speicherkapazität: 22.5 kud\n"..
" - dHülle mit 7x7x7 Concrete Blocks\\, gefüllt mit 125 Gravel\\, Speicherkapazität: 104 kud\n".. " - Hülle mit 7x7x7 Concrete Blocks\\, gefüllt mit 125 Gravel\\, Speicherkapazität: 104 kud\n"..
" - Hülle mit 9x9x9 Concrete Blocks\\, gefüllt mit 343 Gravel\\, Speicherkapazität: 286 kud\n".. " - Hülle mit 9x9x9 Concrete Blocks\\, gefüllt mit 343 Gravel\\, Speicherkapazität: 286 kud\n"..
" - Hülle mit 11x11x11 Concrete Blocks\\, gefüllt mit 729 Gravel\\, Speicherkapazität: 610 kud\n"..
" - Hülle mit 13x13x13 Concrete Blocks\\, gefüllt mit 1331 Gravel\\, Speicherkapazität: 1112 kud\n"..
"\n".. "\n"..
"In der Betonhülle darf ein Fenster aus einem Obsidian Glas Block sein. Dieses muss ziemlich in der Mitte der Wand platziert werden. Durch dieses Fenster sieht man\\, ob der Speicher mehr als 80 % geladen ist. Im Plan rechts sieht man den Aufbau aus TA4 Wärmetauscher bestehend aus 3 Blöcken\\, der TA4 Turbine und dem TA4 Generator. Beim Wärmetauscher ist auf die Ausrichtung zu achten (der Pfeil bei Block 1 muss zur Turbine zeigen).\n".. "In der Betonhülle darf ein Fenster aus einem Obsidian Glas Block sein. Dieses muss ziemlich in der Mitte der Wand platziert werden. Durch dieses Fenster sieht man\\, ob der Speicher mehr als 80 % geladen ist. Im Plan rechts sieht man den Aufbau aus TA4 Wärmetauscher bestehend aus 3 Blöcken\\, der TA4 Turbine und dem TA4 Generator. Beim Wärmetauscher ist auf die Ausrichtung zu achten (der Pfeil bei Block 1 muss zur Turbine zeigen).\n"..
"\n".. "\n"..
@ -1447,13 +1449,15 @@ techage.manual_DE.aText = {
"\n", "\n",
"Mit Hilfe eines Trenntransformators können zwei Stromnetze zu einem größeren Netzwerk verbunden werden. Der Trenntransformator kann Strom in beide Richtungen übertragen.\n".. "Mit Hilfe eines Trenntransformators können zwei Stromnetze zu einem größeren Netzwerk verbunden werden. Der Trenntransformator kann Strom in beide Richtungen übertragen.\n"..
"\n".. "\n"..
"Der Trenntransformator kann bis zu 100 ku übertragen.\n".. "Der Trenntransformator kann bis zu 300 ku übertragen. Der Maximalwert ist über das Schraubenschlüsselmenü einstellbar.\n"..
"\n".. "\n"..
"\n".. "\n"..
"\n", "\n",
"Mit Hilfe eines Stromzählers können zwei Stromnetze zu einem größeren Netzwerk verbunden werden. Der Stromzähler leitet den Strom nur in eine Richtungen weiter (Pfeil beachten). Die Menge an Strom (in kud) wird gemessen und angezeigt. Die Strommenge kann auch über das Kommando 'consumption' durch einen Lua Controller abgefragt werden.\n".. "Mit Hilfe eines Stromzählers können zwei Stromnetze zu einem größeren Netzwerk verbunden werden. Der Stromzähler leitet den Strom nur in eine Richtungen weiter (Pfeil beachten). Die Menge an Strom (in kud) wird gemessen und angezeigt. Die Strommenge kann auch über das Kommando 'consumption' durch einen Lua Controller abgefragt werden.\n"..
"\n".. "\n"..
"Der Stromzähler kann bis zu 200 ku durchleiten.\n".. "Der Stromzähler kann bis zu 200 ku durchleiten. Der Maximalwert ist über das Schraubenschlüsselmenü einstellbar.\n"..
"\n"..
"Über das Schraubenschlüsselmenü kann auch ein Countdown für die Leistungsabgabe eingegeben werden. Läuft dieser Countdown auf Null\\, schaltet sich der Stromzähler ab. Der Countdown kann über das Kommando 'countdown' abgefragt werden.\n"..
"\n".. "\n"..
"\n".. "\n"..
"\n", "\n",
@ -1719,7 +1723,7 @@ techage.manual_DE.aText = {
"\n".. "\n"..
"Anleitung:\n".. "Anleitung:\n"..
"\n".. "\n"..
" - Controller setzen und die Blöcke\\, die bewegt werden sollen\\, über das Menü an-trainieren (Es können bis zu 16 Blöcke an-trainiert werden)\n".. " - Controller setzen und die Blöcke\\, die bewegt werden sollen\\, über das Menü (Taste \"Aufzeichnen\") an-trainieren (Es können bis zu 16 Blöcke an-trainiert werden)\n"..
" - die \"Flugstrecke\" muss über eine x\\,y\\,z Angabe (relativ) eingegeben werden (die maximale Distanz (x+y+z) beträgt 200 m)\n".. " - die \"Flugstrecke\" muss über eine x\\,y\\,z Angabe (relativ) eingegeben werden (die maximale Distanz (x+y+z) beträgt 200 m)\n"..
" - mit den Menü-Tasten \"Bewege A-B\" sowie \"Bewege B-A\" kann die Bewegung getestet werden\n".. " - mit den Menü-Tasten \"Bewege A-B\" sowie \"Bewege B-A\" kann die Bewegung getestet werden\n"..
" - man kann auch durch Wände oder andere Blöcke fliegen\n".. " - man kann auch durch Wände oder andere Blöcke fliegen\n"..
@ -2101,6 +2105,10 @@ techage.manual_DE.aText = {
"\n".. "\n"..
"Die Nutzung des TA5 Flug Controllers benötigt 40 Erfahrungspunkte.\n".. "Die Nutzung des TA5 Flug Controllers benötigt 40 Erfahrungspunkte.\n"..
"\n".. "\n"..
"*Teleport Mode*\n"..
"\n"..
"Wird der 'Teleport Mode' aktiviert (auf 'enable' gesetzt)\\, kann ein Spieler auch ohne Blöcke bewegt werden. Dazu muss die Startposition über die Taste \"Aufzeichnen\" konfiguriert werden. Es kann hier nur eine Position konfiguriert werden. Das Spieler\\, der bewegt werden soll\\, muss dazu auf dieser Position stehen. \n"..
"\n"..
"\n".. "\n"..
"\n", "\n",
"Die TA5 Hyperloop Kiste erlaubt den Transport von Gegenständen über ein Hyperloop Netzwerk.\n".. "Die TA5 Hyperloop Kiste erlaubt den Transport von Gegenständen über ein Hyperloop Netzwerk.\n"..

View File

@ -326,7 +326,8 @@ techage.manual_EN.aText = {
"\n".. "\n"..
"\n".. "\n"..
"\n", "\n",
"Baborium is only extracted in underground mining. Baborium can only be found in stone at an altitude between -250 and -340 meters.\n".. "Barborium can only be obtained from underground mining. This substance can only be found at a depth of -250 to -340 meters.\n"..
"\n"..
"Baborium can only be melted in the TA3 Industrial Furnace.\n".. "Baborium can only be melted in the TA3 Industrial Furnace.\n"..
"\n".. "\n"..
"\n".. "\n"..
@ -397,7 +398,7 @@ techage.manual_EN.aText = {
" - Build a stone tower (cobble) with a 3x3 base (7-11 blocks high)\n".. " - Build a stone tower (cobble) with a 3x3 base (7-11 blocks high)\n"..
" - Leave a hole open on one side at the bottom\n".. " - Leave a hole open on one side at the bottom\n"..
" - Put a lighter in it\n".. " - Put a lighter in it\n"..
" - Fill the tower with charcoal from the top to the top\n".. " - Fill the tower to the brim with charcoal by dropping the charcoal into the hole from above\n"..
" - Light the lighter through the hole\n".. " - Light the lighter through the hole\n"..
" - Place the melting pot in the flame over the tower\n(one block above the flame)\n".. " - Place the melting pot in the flame over the tower\n(one block above the flame)\n"..
" - To stop the burner\\, temporarily close the hole with an dirt block\\, for example.\n".. " - To stop the burner\\, temporarily close the hole with an dirt block\\, for example.\n"..
@ -839,7 +840,7 @@ techage.manual_EN.aText = {
"The TA3 industrial furnace serves as a supplement to normal furnaces. This means that all goods can be produced with \"cooking\" recipes\\, even in an industrial furnace. But there are also special recipes that can only be made in an industrial furnace.\n".. "The TA3 industrial furnace serves as a supplement to normal furnaces. This means that all goods can be produced with \"cooking\" recipes\\, even in an industrial furnace. But there are also special recipes that can only be made in an industrial furnace.\n"..
"The industrial furnace has its own menu for recipe selection. Depending on the goods in the industrial furnace inventory on the left\\, the output product can be selected on the right.\n".. "The industrial furnace has its own menu for recipe selection. Depending on the goods in the industrial furnace inventory on the left\\, the output product can be selected on the right.\n"..
"\n".. "\n"..
"The industrial furnace requires electricity (for the fan) and fuel oil / gasoline for the burner. The industrial furnace and must be assembled as shown in the plan on the right.\n".. "The industrial furnace requires electricity (for the booster) and fuel oil / gasoline for the burner. The industrial furnace must be assembled as shown in the plan on the right.\n"..
"\n".. "\n"..
"See also TA4 heater.\n".. "See also TA4 heater.\n"..
"\n".. "\n"..
@ -1405,11 +1406,13 @@ techage.manual_EN.aText = {
"\n", "\n",
"The thermal energy storage replaces the battery block from TA3.\n".. "The thermal energy storage replaces the battery block from TA3.\n"..
"\n".. "\n"..
"The thermal energy store consists of a concrete shell (concrete blocks) filled with gravel. Three sizes of the storage are possible:\n".. "The thermal energy store consists of a concrete shell (concrete blocks) filled with gravel. Five sizes of the storage are possible:\n"..
"\n".. "\n"..
" - Cover with 5x5x5 concrete blocks\\, filled with 27 gravel\\, storage capacity: 22.5 kud\n".. " - Cover with 5x5x5 concrete blocks\\, filled with 27 gravel\\, storage capacity: 22.5 kud\n"..
" - Cover with 7x7x7 concrete blocks\\, filled with 125 gravel\\, storage capacity: 104 kud\n".. " - Cover with 7x7x7 concrete blocks\\, filled with 125 gravel\\, storage capacity: 104 kud\n"..
" - Cover with 9x9x9 concrete blocks\\, filled with 343 gravel\\, storage capacity: 286 kud\n".. " - Cover with 9x9x9 concrete blocks\\, filled with 343 gravel\\, storage capacity: 286 kud\n"..
" - Cover with 11x11x11 concrete blocks\\, filled with 729 gravel\\, storage capacity: 610 kud\n"..
" - Cover with 13x13x13 concrete blocks\\, filled with 1331 gravel\\, storage capacity: 1112 kud\n"..
"\n".. "\n"..
"A window made of an obsidian glass block may be in the concrete shell. This must be placed fairly in the middle of the wall. Through this window you can see whether the storage is loaded more than 80%. In the plan on the right you can see the structure of TA4 heat exchanger consisting of 3 blocks\\, the TA4 turbine and the TA4 generator. Pay attention to the alignment of the heat exchanger (the arrow at block 1 must point to the turbine).\n".. "A window made of an obsidian glass block may be in the concrete shell. This must be placed fairly in the middle of the wall. Through this window you can see whether the storage is loaded more than 80%. In the plan on the right you can see the structure of TA4 heat exchanger consisting of 3 blocks\\, the TA4 turbine and the TA4 generator. Pay attention to the alignment of the heat exchanger (the arrow at block 1 must point to the turbine).\n"..
"\n".. "\n"..
@ -1457,13 +1460,15 @@ techage.manual_EN.aText = {
"\n", "\n",
"With the help of an isolating transformer\\, two power grids can be connected to form a larger network. The isolation transformer can transmit electricity in both directions.\n".. "With the help of an isolating transformer\\, two power grids can be connected to form a larger network. The isolation transformer can transmit electricity in both directions.\n"..
"\n".. "\n"..
"The isolation transformer can transmit up to 100 ku. \n".. "The isolation transformer can transmit up to 300 ku. The maximum value is adjustable via the wrench menu.\n"..
"\n".. "\n"..
"\n".. "\n"..
"\n", "\n",
"With the help of an electricity meter\\, two electricity networks can be connected to form a larger network. The electricity meter only transmits electricity in one direction (note arrow). The amount of electricity (in kud) is measured and displayed. The amount of electricity can also be queried by a Lua controller using the 'consumption' command.\n".. "With the help of an electricity meter\\, two electricity networks can be connected to form a larger network. The electricity meter only transmits electricity in one direction (note arrow). The amount of electricity (in kud) is measured and displayed. The amount of electricity can also be queried by a Lua controller using the 'consumption' command.\n"..
"\n".. "\n"..
"The electricity meter can pass up to 200 ku. \n".. "The electricity meter can pass up to 200 ku. The maximum value is adjustable via the wrench menu.\n"..
"\n"..
"A power output countdown can also be entered via the wrench menu. When this countdown reaches zero\\, the electricity meter switches off. The countdown can be queried using the 'countdown' command.\n"..
"\n".. "\n"..
"\n".. "\n"..
"\n", "\n",
@ -1620,7 +1625,7 @@ techage.manual_EN.aText = {
"\n".. "\n"..
"\n".. "\n"..
"\n", "\n",
"As the name suggests\\, the Lua controller must be programmed in the Lua programming language. You should also be able to speak some English. The manual in English is here available:\n".. "As the name suggests\\, the Lua controller must be programmed in the Lua programming language. The manual in English is here available:\n"..
"\n".. "\n"..
"https://github.com/joe7575/techage/blob/master/manuals/ta4_lua_controller_EN.md\n".. "https://github.com/joe7575/techage/blob/master/manuals/ta4_lua_controller_EN.md\n"..
"\n".. "\n"..
@ -2109,6 +2114,10 @@ techage.manual_EN.aText = {
"\n".. "\n"..
"The use of the TA5 Flight Controller requires 40 experience points.\n".. "The use of the TA5 Flight Controller requires 40 experience points.\n"..
"\n".. "\n"..
"*Teleport mode*\n"..
"\n"..
"If the 'Teleport Mode' is enabled\\, a player can also be moved without blocks. To do this\\, the start position must be configured using the \"Record\" button. Only one position can be configured here. The player to be moved must be in that position.\n"..
"\n"..
"\n".. "\n"..
"\n", "\n",
"The TA5 Hyperloop Chest allows objects to be transported over a Hyperloop network.\n".. "The TA5 Hyperloop Chest allows objects to be transported over a Hyperloop network.\n"..

View File

@ -341,7 +341,7 @@ techage.ConstructionPlans["ta3_distiller"] = {
-- --
-- Chemical Reactor -- Chemical Reactor
-- --
local RBASE = {"techage_concrete.png", "techage:ta4_reactor_stand"} local RBASE = {"techage_concrete.png", "techage:ta4_reactor_base"}
local STAND = {"techage_reactor_stand_side.png", "techage:ta4_reactor_stand"} local STAND = {"techage_reactor_stand_side.png", "techage:ta4_reactor_stand"}
local REACT = {"techage_reactor_plan.png", "techage:ta4_reactor"} local REACT = {"techage_reactor_plan.png", "techage:ta4_reactor"}
local FILLR = {"techage_reactor_filler_plan.png", "techage:ta4_reactor_fillerpipe"} local FILLR = {"techage_reactor_filler_plan.png", "techage:ta4_reactor_fillerpipe"}

View File

@ -66,7 +66,7 @@ minetest.register_node("techage:ta4_generator_on", {
"techage_filling_ta4.png^techage_appl_hole_electric.png^techage_frame_ta4.png", "techage_filling_ta4.png^techage_appl_hole_electric.png^techage_frame_ta4.png",
"techage_filling_ta4.png^techage_appl_open.png^techage_frame_ta4.png", "techage_filling_ta4.png^techage_appl_open.png^techage_frame_ta4.png",
{ {
image = "techage_filling4_ta4.png^techage_appl_generator4.png^techage_frame4_ta4.png", name = "techage_filling4_ta4.png^techage_appl_generator4.png^techage_frame4_ta4.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -76,7 +76,7 @@ minetest.register_node("techage:ta4_generator_on", {
}, },
}, },
{ {
image = "techage_filling4_ta4.png^techage_appl_generator4.png^[transformFX]^techage_frame4_ta4.png", name = "techage_filling4_ta4.png^techage_appl_generator4.png^[transformFX]^techage_frame4_ta4.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -27,9 +27,11 @@ local control = networks.control
local CYCLE_TIME = 2 local CYCLE_TIME = 2
local GRVL_CAPA = 500 local GRVL_CAPA = 500
local PWR_CAPA = { local PWR_CAPA = {
[5] = GRVL_CAPA * 3 * 3 * 3, -- 13500 Cyc = 450 min = 22.5 kud [5] = GRVL_CAPA * 3 * 3 * 3, -- 13500 Cyc = 450 min = 22.5 kud
[7] = GRVL_CAPA * 5 * 5 * 5, -- 104 kud [7] = GRVL_CAPA * 5 * 5 * 5, -- 104 kud
[9] = GRVL_CAPA * 7 * 7 * 7, -- 286 kuh [9] = GRVL_CAPA * 7 * 7 * 7, -- 286 kuh
[11] = GRVL_CAPA * 9 * 9 * 9, -- 610 kuh
[13] = GRVL_CAPA * 11 * 11 * 11, -- 1112 kuh
} }
local DOWN = 5 local DOWN = 5
local PWR_NEEDED = 5 local PWR_NEEDED = 5

View File

@ -61,11 +61,15 @@ local Numbers = {
[2] = 96, -- 5x5x2 + 3x5x2 + 3x3x2 - 2 [2] = 96, -- 5x5x2 + 3x5x2 + 3x3x2 - 2
[3] = 216, -- 7x7x2 + 5x7x2 + 5x5x2 - 2 [3] = 216, -- 7x7x2 + 5x7x2 + 5x5x2 - 2
[4] = 384, -- 9x9x2 + 7x9x2 + 7x7x2 - 2 [4] = 384, -- 9x9x2 + 7x9x2 + 7x7x2 - 2
[5] = 600, -- 11x11x2 + 9x11x2 + 9x9x2 - 2
[6] = 864, -- 13x13x2 + 11x13x2 + 11x11x2 - 2
}, },
filling = { filling = {
[2] = 27, -- 3x3x3 [2] = 27, -- 3x3x3
[3] = 125, -- 5x5x5 [3] = 125, -- 5x5x5
[4] = 343, -- 7x7x7 [4] = 343, -- 7x7x7
[5] = 729, -- 9x9x9
[6] = 1331, -- 11x11x11
} }
} }
@ -101,6 +105,24 @@ local function get_diameter(pos, in_dir)
end end
pos2 = vector.add(pos, vector.multiply(dir, 10)) pos2 = vector.add(pos, vector.multiply(dir, 10))
node = minetest.get_node(pos2)
if node.name == "techage:ta3_pipe_wall_entry" then
return
end
if node.name == "techage:ta4_pipe_inlet" then
return 11
end
pos2 = vector.add(pos, vector.multiply(dir, 12))
node = minetest.get_node(pos2)
if node.name == "techage:ta3_pipe_wall_entry" then
return
end
if node.name == "techage:ta4_pipe_inlet" then
return 13
end
pos2 = vector.add(pos, vector.multiply(dir, 14))
local poses = minetest.find_nodes_in_area(pos, pos2, {"techage:ta4_pipe_inlet"}) local poses = minetest.find_nodes_in_area(pos, pos2, {"techage:ta4_pipe_inlet"})
if #poses > 1 then if #poses > 1 then
return vector.distance(pos, poses[2]) + 1 return vector.distance(pos, poses[2]) + 1

View File

@ -62,7 +62,7 @@ minetest.register_node("techage:ta4_turbine", {
"techage_filling_ta4.png^techage_frame_ta4.png", "techage_filling_ta4.png^techage_frame_ta4.png",
"techage_filling_ta4.png^techage_appl_open.png^techage_frame_ta4.png", "techage_filling_ta4.png^techage_appl_open.png^techage_frame_ta4.png",
"techage_filling_ta4.png^techage_frame_ta4.png^techage_appl_hole_pipe.png", "techage_filling_ta4.png^techage_frame_ta4.png^techage_appl_hole_pipe.png",
"techage_filling_ta4.png^techage_appl_turbine.png^techage_frame_ta4.png", "techage_filling_ta4.png^techage_appl_turbine.png^techage_frame_ta4.png^[transformFX",
"techage_filling_ta4.png^techage_appl_turbine.png^techage_frame_ta4.png", "techage_filling_ta4.png^techage_appl_turbine.png^techage_frame_ta4.png",
}, },
@ -92,7 +92,7 @@ minetest.register_node("techage:ta4_turbine_on", {
"techage_filling_ta4.png^techage_appl_open.png^techage_frame_ta4.png", "techage_filling_ta4.png^techage_appl_open.png^techage_frame_ta4.png",
"techage_filling_ta4.png^techage_frame_ta4.png^techage_appl_hole_pipe.png", "techage_filling_ta4.png^techage_frame_ta4.png^techage_appl_hole_pipe.png",
{ {
image = "techage_filling4_ta4.png^techage_appl_turbine4.png^techage_frame4_ta4.png", name = "techage_filling4_ta4.png^techage_appl_turbine4.png^techage_frame4_ta4.png^[transformFX",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -102,7 +102,7 @@ minetest.register_node("techage:ta4_turbine_on", {
}, },
}, },
{ {
image = "techage_filling4_ta4.png^techage_appl_turbine4.png^techage_frame4_ta4.png", name = "techage_filling4_ta4.png^techage_appl_turbine4.png^techage_frame4_ta4.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -110,7 +110,7 @@ minetest.register_node("techage:ta3_booster_on", {
"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_electric.png^techage_frame_ta3.png", "techage_filling_ta3.png^techage_appl_hole_electric.png^techage_frame_ta3.png",
{ {
image = "techage_filling4_ta3.png^techage_appl_compressor4.png^techage_frame4_ta3.png", name = "techage_filling4_ta3.png^techage_appl_compressor4.png^techage_frame4_ta3.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -120,7 +120,7 @@ minetest.register_node("techage:ta3_booster_on", {
}, },
}, },
{ {
image = "techage_filling4_ta3.png^techage_appl_compressor4.png^[transformFX]^techage_frame4_ta3.png", name = "techage_filling4_ta3.png^techage_appl_compressor4.png^[transformFX]^techage_frame4_ta3.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -127,7 +127,7 @@ minetest.register_node("techage:furnace_firebox_on", {
"techage_concrete.png^techage_frame_ta3.png", "techage_concrete.png^techage_frame_ta3.png",
"techage_concrete.png^techage_frame_ta3.png", "techage_concrete.png^techage_frame_ta3.png",
{ {
image = "techage_concrete4.png^techage_appl_firehole4.png^techage_frame4_ta3.png", name = "techage_concrete4.png^techage_appl_firehole4.png^techage_frame4_ta3.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -232,7 +232,7 @@ minetest.register_node("techage:ta5_fr_controller_act", {
"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_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", name = "techage_filling4_ta4.png^techage_appl_plasma4.png^techage_frame4_ta5.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -242,7 +242,7 @@ minetest.register_node("techage:ta5_fr_controller_act", {
}, },
}, },
{ {
image = "techage_filling4_ta4.png^techage_appl_plasma4.png^techage_frame4_ta5.png", name = "techage_filling4_ta4.png^techage_appl_plasma4.png^techage_frame4_ta5.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -117,7 +117,7 @@ minetest.register_node("techage:ta5_generator_on", {
"techage_filling_ta4.png^techage_appl_hole_electric.png^techage_frame_ta5.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_appl_open.png^techage_frame_ta5.png",
{ {
image = "techage_filling4_ta4.png^techage_appl_generator4.png^techage_frame4_ta5.png", name = "techage_filling4_ta4.png^techage_appl_generator4.png^techage_frame4_ta5.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -127,7 +127,7 @@ minetest.register_node("techage:ta5_generator_on", {
}, },
}, },
{ {
image = "techage_filling4_ta4.png^techage_appl_generator4.png^[transformFX]^techage_frame4_ta5.png", name = "techage_filling4_ta4.png^techage_appl_generator4.png^[transformFX]^techage_frame4_ta5.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -113,7 +113,7 @@ local tiles_act = {
"techage_filling_ta4.png^techage_appl_hole_ta5_pipe2.png^techage_frame_ta5.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_hole_pipe.png^techage_frame_ta5.png",
{ {
image = "techage_filling8_ta4.png^techage_appl_pump8.png^techage_frame8_ta5.png^[transformFX", name = "techage_filling8_ta4.png^techage_appl_pump8.png^techage_frame8_ta5.png^[transformFX",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -123,7 +123,7 @@ local tiles_act = {
}, },
}, },
{ {
image = "techage_filling8_ta4.png^techage_appl_pump8.png^techage_frame8_ta5.png", name = "techage_filling8_ta4.png^techage_appl_pump8.png^techage_frame8_ta5.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -62,7 +62,7 @@ minetest.register_node("techage:ta5_turbine", {
"techage_filling_ta4.png^techage_frame_ta4_bottom.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_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_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^[transformFX",
"techage_filling_ta4.png^techage_appl_turbine.png^techage_frame_ta5.png", "techage_filling_ta4.png^techage_appl_turbine.png^techage_frame_ta5.png",
}, },
@ -92,7 +92,7 @@ minetest.register_node("techage:ta5_turbine_on", {
"techage_filling_ta4.png^techage_appl_open.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_hole_pipe.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", name = "techage_filling4_ta4.png^techage_appl_turbine4.png^techage_frame4_ta5.png^[transformFX",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -102,7 +102,7 @@ minetest.register_node("techage:ta5_turbine_on", {
}, },
}, },
{ {
image = "techage_filling4_ta4.png^techage_appl_turbine4.png^techage_frame4_ta5.png", name = "techage_filling4_ta4.png^techage_appl_turbine4.png^techage_frame4_ta5.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -253,7 +253,7 @@ minetest.register_node("techage:ta4_electrolyzer_on", {
"techage_filling_ta4.png^techage_frame_ta4.png^techage_appl_hole_pipe.png", "techage_filling_ta4.png^techage_frame_ta4.png^techage_appl_hole_pipe.png",
"techage_filling_ta4.png^techage_frame_ta4.png^techage_appl_hole_electric.png", "techage_filling_ta4.png^techage_frame_ta4.png^techage_appl_hole_electric.png",
{ {
image = "techage_filling4_ta4.png^techage_frame4_ta4.png^techage_appl_electrolyzer4.png^techage_appl_ctrl_unit4.png^[transformFX", name = "techage_filling4_ta4.png^techage_frame4_ta4.png^techage_appl_electrolyzer4.png^techage_appl_ctrl_unit4.png^[transformFX",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -263,7 +263,7 @@ minetest.register_node("techage:ta4_electrolyzer_on", {
}, },
}, },
{ {
image = "techage_filling4_ta4.png^techage_frame4_ta4.png^techage_appl_electrolyzer4.png^techage_appl_ctrl_unit4.png", name = "techage_filling4_ta4.png^techage_frame4_ta4.png^techage_appl_electrolyzer4.png^techage_appl_ctrl_unit4.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -215,7 +215,7 @@ minetest.register_node("techage:ta4_fuelcell_on", {
"techage_filling_ta4.png^techage_frame_ta4.png^techage_appl_hole_electric.png", "techage_filling_ta4.png^techage_frame_ta4.png^techage_appl_hole_electric.png",
"techage_filling_ta4.png^techage_frame_ta4.png^techage_appl_hole_pipe.png", "techage_filling_ta4.png^techage_frame_ta4.png^techage_appl_hole_pipe.png",
{ {
image = "techage_filling4_ta4.png^techage_frame4_ta4.png^techage_appl_fuelcell4.png^techage_appl_ctrl_unit4.png^[transformFX", name = "techage_filling4_ta4.png^techage_frame4_ta4.png^techage_appl_fuelcell4.png^techage_appl_ctrl_unit4.png^[transformFX",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -225,7 +225,7 @@ minetest.register_node("techage:ta4_fuelcell_on", {
}, },
}, },
{ {
image = "techage_filling4_ta4.png^techage_frame4_ta4.png^techage_appl_fuelcell4.png^techage_appl_ctrl_unit4.png", name = "techage_filling4_ta4.png^techage_frame4_ta4.png^techage_appl_fuelcell4.png^techage_appl_ctrl_unit4.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -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.11 techage.version = 1.15
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!")
@ -57,6 +57,7 @@ techage.ore_rarity = tonumber(minetest.settings:get("techage_ore_rarity")) or 1
techage.modified_recipes_enabled = minetest.settings:get_bool("techage_modified_recipes_enabled") ~= false techage.modified_recipes_enabled = minetest.settings:get_bool("techage_modified_recipes_enabled") ~= false
techage.collider_min_depth = tonumber(minetest.settings:get("techage_collider_min_depth")) or -28 techage.collider_min_depth = tonumber(minetest.settings:get("techage_collider_min_depth")) or -28
techage.recipe_checker_enabled = minetest.settings:get_bool("techage_recipe_checker_enabled") ~= false techage.recipe_checker_enabled = minetest.settings:get_bool("techage_recipe_checker_enabled") ~= false
techage.stair_aliases_enabled = minetest.settings:get_bool("techage_stair_aliases_enabled") ~= false
-- allow to load marshal and sqlite3 -- allow to load marshal and sqlite3
techage.IE = minetest.request_insecure_environment() techage.IE = minetest.request_insecure_environment()

View File

@ -335,7 +335,7 @@ minetest.register_node("techage:meltingpot_active", {
description = S("TA1 Melting Pot"), description = S("TA1 Melting Pot"),
tiles = { tiles = {
{ {
image = "techage_meltingpot_top_active.png", name = "techage_meltingpot_top_active.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -53,8 +53,8 @@ local NodeNames = {
"techage:basalt_glass", "techage:basalt_glass",
"techage:basalt_glass2", "techage:basalt_glass2",
"techage:bauxite_stone",
"techage:bauxite_cobble", "techage:bauxite_cobble",
"techage:bauxite_stone",
"techage:cement_block", "techage:cement_block",
} }
@ -64,13 +64,18 @@ if(minetest.get_modpath("moreblocks")) then
local ndef = minetest.registered_nodes[name] local ndef = minetest.registered_nodes[name]
if ndef then if ndef then
ndef = table.copy(ndef) ndef = table.copy(ndef)
if ndef.drop then -- this fixes https://github.com/fluxionary/minetest-moreblocks/issues/19
ndef.drop = nil
end
local subname = string.split(name, ":")[2] local subname = string.split(name, ":")[2]
ndef.sunlight_propagates = true ndef.sunlight_propagates = true
ndef.groups.not_in_creative_inventory = 1 ndef.groups.not_in_creative_inventory = 1
stairsplus:register_all("techage", subname, name, ndef) stairsplus:register_all("techage", subname, name, ndef)
register_alias(subname) if techage.stair_aliases_enabled then
register_alias(subname)
end
end end
end end
else else
for _,name in ipairs(NodeNames) do for _,name in ipairs(NodeNames) do
local ndef = minetest.registered_nodes[name] local ndef = minetest.registered_nodes[name]
@ -86,7 +91,9 @@ else
ndef.sound, ndef.sound,
false false
) )
register_alias(subname) if techage.stair_aliases_enabled then
register_alias(subname)
end
end end
end end
end end

View File

@ -20,7 +20,7 @@ local liquid = techage.liquid
local CYCLE_TIME = 2 local CYCLE_TIME = 2
local function formspec(pos) local function formspec(pos)
return "size[8,7]".. return "size[8,8]"..
default.gui_bg.. default.gui_bg..
default.gui_bg_img.. default.gui_bg_img..
default.gui_slots.. default.gui_slots..
@ -29,7 +29,7 @@ local function formspec(pos)
"list[context;src;0,0.8;3,3;]".. "list[context;src;0,0.8;3,3;]"..
"image[3.5,1.8;1,1;techage_form_arrow_bg.png^[transformR270]".. "image[3.5,1.8;1,1;techage_form_arrow_bg.png^[transformR270]"..
"list[context;dst;5,0.8;3,3;]".. "list[context;dst;5,0.8;3,3;]"..
"list[current_player;main;0,4.2;8,3;]".. "list[current_player;main;0,4.2;8,4;]"..
"listring[current_player;main]".. "listring[current_player;main]"..
"listring[context;src]" .. "listring[context;src]" ..
"listring[current_player;main]".. "listring[current_player;main]"..

View File

@ -168,6 +168,7 @@ end
local function after_dig_node(pos, oldnode, oldmetadata, digger) local function after_dig_node(pos, oldnode, oldmetadata, digger)
Pipe:after_dig_node(pos) Pipe:after_dig_node(pos)
techage.remove_node(pos, oldnode, oldmetadata)
techage.del_mem(pos) techage.del_mem(pos)
end end
@ -198,7 +199,7 @@ local ta3_tiles_act = {
"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",
{ {
image = "techage_filling8_ta3.png^techage_appl_pump8.png^techage_frame8_ta3.png^[transformFX", name = "techage_filling8_ta3.png^techage_appl_pump8.png^techage_frame8_ta3.png^[transformFX",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -208,7 +209,7 @@ local ta3_tiles_act = {
}, },
}, },
{ {
image = "techage_filling8_ta3.png^techage_appl_pump8.png^techage_frame8_ta3.png", name = "techage_filling8_ta3.png^techage_appl_pump8.png^techage_frame8_ta3.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -226,7 +227,7 @@ local ta4_tiles_act = {
"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",
{ {
image = "techage_filling8_ta4.png^techage_appl_pump8.png^techage_frame8_ta4.png^[transformFX", name = "techage_filling8_ta4.png^techage_appl_pump8.png^techage_frame8_ta4.png^[transformFX",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -236,7 +237,7 @@ local ta4_tiles_act = {
}, },
}, },
{ {
image = "techage_filling8_ta4.png^techage_appl_pump8.png^techage_frame8_ta4.png", name = "techage_filling8_ta4.png^techage_appl_pump8.png^techage_frame8_ta4.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -103,3 +103,9 @@ minetest.register_craft({
{"", "", ""}, {"", "", ""},
}, },
}) })
minetest.register_on_mods_loaded(function()
if not minetest.global_exists("hyperloop") then
minetest.clear_craft({output = "techage:ta5_hl_tank"})
end
end)

View File

@ -291,7 +291,6 @@ TA2 Cylinder=TA2 Zylinder
### detector.lua ### ### detector.lua ###
Countdown=Countdown
Counts down the number of items passed through@nand only triggers an 'on' command when it reaches zero.=Zählt die Anzahl der durchlaufenen Elemente herunter@nund löst nur dann einen 'ON'-Befehl aus, wenn er Null erreicht. Counts down the number of items passed through@nand only triggers an 'on' command when it reaches zero.=Zählt die Anzahl der durchlaufenen Elemente herunter@nund löst nur dann einen 'ON'-Befehl aus, wenn er Null erreicht.
Current countdown=Aktueller Zähler Current countdown=Aktueller Zähler
Current countdown value.=Aktueller Zählerwert. Current countdown value.=Aktueller Zählerwert.
@ -299,6 +298,11 @@ TA4 Collider Detector=TA4 Collider Detektor
TA4 Collider Detector Core=TA4 Collider Detektorkern TA4 Collider Detector Core=TA4 Collider Detektorkern
TA4 Detector=TA4 Detektor TA4 Detector=TA4 Detektor
### detector.lua ###
### electricmeter.lua ###
Countdown=Countdown
### detector.lua ### ### detector.lua ###
### logic_block.lua ### ### logic_block.lua ###
### tele.lua ### ### tele.lua ###
@ -348,12 +352,11 @@ TA3 Door Controller=TA3 Tür Controller
### doorcontroller2.lua ### ### doorcontroller2.lua ###
Blocks are back=Blöcke sind wieder da Blocks exchanged=Blöcke ausgetauscht
Blocks are disappeared=Blöcke sind verschwunden Blocks reset=Blöcke rückgesetzt
Click on all the blocks that are part of the door/gate=Klicke auf alle Blöcke, die Teil des Tores sind Click on all the blocks that are part of the door/gate=Klicke auf alle Blöcke, die Teil des Tores sind
Ctrl,Inv=Ctrl,Inv Ctrl,Inv=Ctrl,Inv
Remove=Entfernen Exchange=Austauschen
Set=Setzen
TA3 Door Controller II=TA3 Tür Controller II TA3 Door Controller II=TA3 Tür Controller II
with door sound=mit Türgeräusch with door sound=mit Türgeräusch
@ -367,6 +370,11 @@ Record=Aufzeichnen
Recording...=Aufzeichnung... Recording...=Aufzeichnung...
block positions are stored.=Block Positionen gespeichert. block positions are stored.=Block Positionen gespeichert.
### doorcontroller2.lua ###
### movecontroller.lua ###
Reset=Rücksetzen
### drillbox.lua ### ### drillbox.lua ###
Build derrick=Errichte Ölturm Build derrick=Errichte Ölturm
@ -388,7 +396,9 @@ TA Electric Cable=TA Stromkabel
### electricmeter.lua ### ### electricmeter.lua ###
Amount of power to be provided before the device turns off=Strommenge, die bereitgestellt werden soll, bis sich das Gerät ausschaltet
Consumption=Verbrauch Consumption=Verbrauch
Power countdown=Leistungs-Countdown
TA4 Electric Meter=TA4 Stromzähler TA4 Electric Meter=TA4 Stromzähler
### electricmeter.lua ### ### electricmeter.lua ###
@ -397,6 +407,12 @@ TA4 Electric Meter=TA4 Stromzähler
Power=Strom Power=Strom
### electricmeter.lua ###
### transformer.lua ###
Max. power=Max. Leistung
Maximum power passed through=Max. Leistung, die durchgeleitet werden soll
### electrolyzer.lua ### ### electrolyzer.lua ###
Configurable value@nfor the current limit=Konfigurierbarer Wert@nfür die Strombegrenzung Configurable value@nfor the current limit=Konfigurierbarer Wert@nfür die Strombegrenzung
@ -468,6 +484,7 @@ Destination position is protected=Zielposition ist geschützt
Error: Max. length of the flight route exceeded by @1 blocks !!=Fehler: max. Länge der Flugstrecke um @1 Blöcke überschritten !! Error: Max. length of the flight route exceeded by @1 blocks !!=Fehler: max. Länge der Flugstrecke um @1 Blöcke überschritten !!
No valid destination position=Keine gültige Zielposition No valid destination position=Keine gültige Zielposition
No valid node at the start position=Kein gültiger Block an der Startposition No valid node at the start position=Kein gültiger Block an der Startposition
No valid start position=Keine gültige Startposition
Running=In Betrieb Running=In Betrieb
Start position is protected=Startposition ist geschützt Start position is protected=Startposition ist geschützt
Stopped=Gestoppt Stopped=Gestoppt
@ -503,9 +520,11 @@ Maximum speed for moving blocks=Maximale Geschwindigkeit für bewegliche Blöcke
Move=Bewege Move=Bewege
Move A-B=Bewege A-B Move A-B=Bewege A-B
Move B-A=Bewege B-A Move B-A=Bewege B-A
Move a player without moving blocks=Bewege einen Spieler ohne Blöcke
Move block height=Move Block Höhe Move block height=Move Block Höhe
Object offset=Objekt Offset Object offset=Objekt Offset
Stored=Gespeichert Stored=Gespeichert
Teleport mode=Teleport Mode
Value in the range of 0.0 to 1.0=Wert im Bereich von 0.0 bis 1.0 Value in the range of 0.0 to 1.0=Wert im Bereich von 0.0 bis 1.0
Y-offset for non-player objects like vehicles (-0.5 to 0.5)=Y-Offset für Nicht-Spieler Objekte wie Fahrzeuge (-0.5 bis 0.5) Y-offset for non-player objects like vehicles (-0.5 to 0.5)=Y-Offset für Nicht-Spieler Objekte wie Fahrzeuge (-0.5 bis 0.5)
@ -904,7 +923,6 @@ Error: Invalid distance !!=Fehler: Ungültige Entfernung !!
Move distance=Entfernung Move distance=Entfernung
Move distance (A to B)=Entfernung (A nach B) Move distance (A to B)=Entfernung (A nach B)
Operational mode=Betriebsmodus Operational mode=Betriebsmodus
Reset=Rücksetzen
Switch to the remote controlled 'move xyz' mode=Wechseln in den ferngesteuerten 'move xyz'-Modus Switch to the remote controlled 'move xyz' mode=Wechseln in den ferngesteuerten 'move xyz'-Modus
TA Rack and Pinion=TA Zahnstange TA Rack and Pinion=TA Zahnstange
TA4 Move Controller=TA4 Move Controller TA4 Move Controller=TA4 Move Controller
@ -1000,7 +1018,7 @@ TA Power Pole Top 2 (for landlines)=TA Strommastkopf 2 (für Überlandleitungen)
### power_terminal2.lua ### ### power_terminal2.lua ###
Commands@nhelp . . . print this text@ncls . . . . . clear screen@ngen . . . . print all generators@nsto . . . . . print all storage systems@ncon . . . . . print main consumers@n=Kommandos@nhelp . . . diesen Text ausgeben@ncls . . . . . Bildschirm löschen@ngen . . . . Alle Generatoren ausgeben@nsto . . . . . Alle Speichersysteme ausgeben@ncon . . . . . Hauptverbraucher ausgeben@n Commands@nhelp . . . print this text@ncls . . . . clear screen@ngen . . print generators@nsto . . print storage systems@ncon1 . . print consumers with power consumption between 1 and 10 ku@ncon2 . . print consumers with power consumption with 10 ku or above@n=Commands@nhelp . . . diesen Text ausgeben@ncls . . . . lösche Bildschirm@ngen . . Generatoren ausgeben@nsto . . Speichersysteme ausgeben@ncon1 . . Verbraucher mit einem Verbrauch zw. 1 und 10 ku ausgeben@ncon2 . . Verbraucher ab 10 ku Verbrauch ausgeben@n
Consumer=Verbraucher Consumer=Verbraucher
Network Data=Netzwerkdaten Network Data=Netzwerkdaten
Number of consumers:=Anzahl der Verbraucher Number of consumers:=Anzahl der Verbraucher
@ -1511,6 +1529,11 @@ TA4 Collider Detector Worker=TA4 Collider Detektor Worker
##### not used anymore ##### ##### not used anymore #####
Blocks are back=Blöcke sind wieder da
Blocks are disappeared=Blöcke sind verschwunden
Remove=Entfernen
Set=Setzen
Commands@nhelp . . . print this text@ncls . . . . . clear screen@ngen . . . . print all generators@nsto . . . . . print all storage systems@ncon . . . . . print main consumers@n=Kommandos@nhelp . . . diesen Text ausgeben@ncls . . . . . Bildschirm löschen@ngen . . . . Alle Generatoren ausgeben@nsto . . . . . Alle Speichersysteme ausgeben@ncon . . . . . Hauptverbraucher ausgeben@n
Handover to A=Übergabe an A Handover to A=Übergabe an A
Handover to B=Übergabe an B Handover to B=Übergabe an B
Number of the next movecontroller=Nummer des nächsten Move Controllers Number of the next movecontroller=Nummer des nächsten Move Controllers

View File

@ -291,7 +291,6 @@ TA2 Cylinder=
### detector.lua ### ### detector.lua ###
Countdown=
Counts down the number of items passed through@nand only triggers an 'on' command when it reaches zero.= Counts down the number of items passed through@nand only triggers an 'on' command when it reaches zero.=
Current countdown= Current countdown=
Current countdown value.= Current countdown value.=
@ -299,6 +298,11 @@ TA4 Collider Detector=
TA4 Collider Detector Core= TA4 Collider Detector Core=
TA4 Detector= TA4 Detector=
### detector.lua ###
### electricmeter.lua ###
Countdown=
### detector.lua ### ### detector.lua ###
### logic_block.lua ### ### logic_block.lua ###
### tele.lua ### ### tele.lua ###
@ -348,12 +352,11 @@ TA3 Door Controller=
### doorcontroller2.lua ### ### doorcontroller2.lua ###
Blocks are back= Blocks exchanged=
Blocks are disappeared= Blocks reset=
Click on all the blocks that are part of the door/gate= Click on all the blocks that are part of the door/gate=
Ctrl,Inv= Ctrl,Inv=
Remove= Exchange=
Set=
TA3 Door Controller II= TA3 Door Controller II=
with door sound= with door sound=
@ -367,6 +370,11 @@ Record=
Recording...= Recording...=
block positions are stored.= block positions are stored.=
### doorcontroller2.lua ###
### movecontroller.lua ###
Reset=
### drillbox.lua ### ### drillbox.lua ###
Build derrick= Build derrick=
@ -388,7 +396,9 @@ TA Electric Cable=
### electricmeter.lua ### ### electricmeter.lua ###
Amount of power to be provided before the device turns off=
Consumption= Consumption=
Power countdown=
TA4 Electric Meter= TA4 Electric Meter=
### electricmeter.lua ### ### electricmeter.lua ###
@ -397,6 +407,12 @@ TA4 Electric Meter=
Power= Power=
### electricmeter.lua ###
### transformer.lua ###
Max. power=
Maximum power passed through=
### electrolyzer.lua ### ### electrolyzer.lua ###
Configurable value@nfor the current limit= Configurable value@nfor the current limit=
@ -468,6 +484,7 @@ Destination position is protected=
Error: Max. length of the flight route exceeded by @1 blocks !!= Error: Max. length of the flight route exceeded by @1 blocks !!=
No valid destination position= No valid destination position=
No valid node at the start position= No valid node at the start position=
No valid start position=
Running= Running=
Start position is protected= Start position is protected=
Stopped= Stopped=
@ -503,9 +520,11 @@ Maximum speed for moving blocks=
Move= Move=
Move A-B= Move A-B=
Move B-A= Move B-A=
Move a player without moving blocks=
Move block height= Move block height=
Object offset= Object offset=
Stored= Stored=
Teleport mode=
Value in the range of 0.0 to 1.0= Value in the range of 0.0 to 1.0=
Y-offset for non-player objects like vehicles (-0.5 to 0.5)= Y-offset for non-player objects like vehicles (-0.5 to 0.5)=
@ -904,7 +923,6 @@ Error: Invalid distance !!=
Move distance= Move distance=
Move distance (A to B)= Move distance (A to B)=
Operational mode= Operational mode=
Reset=
Switch to the remote controlled 'move xyz' mode= Switch to the remote controlled 'move xyz' mode=
TA Rack and Pinion= TA Rack and Pinion=
TA4 Move Controller= TA4 Move Controller=
@ -1000,7 +1018,7 @@ TA Power Pole Top 2 (for landlines)=
### power_terminal2.lua ### ### power_terminal2.lua ###
Commands@nhelp . . . print this text@ncls . . . . . clear screen@ngen . . . . print all generators@nsto . . . . . print all storage systems@ncon . . . . . print main consumers@n= Commands@nhelp . . . print this text@ncls . . . . clear screen@ngen . . print generators@nsto . . print storage systems@ncon1 . . print consumers with power consumption between 1 and 10 ku@ncon2 . . print consumers with power consumption with 10 ku or above@n=
Consumer= Consumer=
Network Data= Network Data=
Number of consumers:= Number of consumers:=

View File

@ -21,9 +21,12 @@ local logic = techage.logic
local CYCLE_TIME = 1 local CYCLE_TIME = 1
local tStates = {stopped = 0, running = 0, standby = 1, blocked = 2, nopower = 3, fault = 4} -- The numbering seems strange here, but I had to add the "running" state
-- afterwards without changing the behavior of the block.
local tStates = {stopped = 0, running = 1, standby = 2, blocked = 3, fault = 4, defect = 5}
local tDropdownPos = {["1 standby"] = 1, ["2 blocked"] = 2, ["3 fault"] = 3, ["4 defect"] = 4}
local lStates = {[0] = "stopped", "running", "standby", "blocked", "fault", "defect"}
local tDropdownPos = {["1 standby"] = 1, ["2 blocked"] = 2, ["3 nopower"] = 3, ["4 fault"] = 4} local tDropdownPos = {["1 standby"] = 1, ["2 blocked"] = 2, ["3 nopower"] = 3, ["4 fault"] = 4}
local lStates = {[0] = "stopped", "standby", "blocked", "nopower", "fault"}
local TaStates = {running = 1, blocked = 2, standby = 3, nopower = 4, fault = 5, stopped = 6} local TaStates = {running = 1, blocked = 2, standby = 3, nopower = 4, fault = 5, stopped = 6}
local function formspec(nvm, meta) local function formspec(nvm, meta)
@ -50,7 +53,7 @@ local function send_event(nvm, meta)
if event_number ~= "" then if event_number ~= "" then
local severity = meta:get_int("dropdown_pos") local severity = meta:get_int("dropdown_pos")
local own_number = meta:get_string("own_number") local own_number = meta:get_string("own_number")
if nvm.common_state >= severity then if nvm.common_state > severity then
techage.send_multi(own_number, event_number, "on") techage.send_multi(own_number, event_number, "on")
else else
techage.send_multi(own_number, event_number, "off") techage.send_multi(own_number, event_number, "off")

View File

@ -3,7 +3,7 @@
TechAge TechAge
======= =======
Copyright (C) 2017-2020 Joachim Stolberg Copyright (C) 2017-2023 Joachim Stolberg
AGPL v3 AGPL v3
See LICENSE.txt for more information See LICENSE.txt for more information
@ -33,6 +33,7 @@ local function send_message(pos, topic)
mem.overload_cnt = (mem.overload_cnt or 0) + 1 mem.overload_cnt = (mem.overload_cnt or 0) + 1
if mem.overload_cnt > OVER_LOAD_MAX then if mem.overload_cnt > OVER_LOAD_MAX then
logic.infotext(M(pos), S("TA3 Mesecons Converter"), "fault (overloaded)") logic.infotext(M(pos), S("TA3 Mesecons Converter"), "fault (overloaded)")
techage.logic.swap_node(pos, "techage:ta3_mesecons_converter")
minetest.get_node_timer(pos):stop() minetest.get_node_timer(pos):stop()
return false return false
end end
@ -41,6 +42,40 @@ local function send_message(pos, topic)
techage.send_multi(own_num, numbers, topic) techage.send_multi(own_num, numbers, topic)
end end
local function on_receive_fields(pos, formname, fields, player)
if minetest.is_protected(pos, player:get_player_name()) then
return
end
local meta = M(pos)
if techage.check_numbers(fields.numbers, player:get_player_name()) then
meta:set_string("numbers", fields.numbers)
logic.infotext(M(pos), S("TA3 Mesecons Converter"))
meta:set_string("formspec", formspec(meta))
end
minetest.get_node_timer(pos):start(CYCLE_TIME)
end
local function on_timer(pos,elapsed)
local mem = techage.get_mem(pos)
mem.overload_cnt = 0
return true
end
local function techage_set_numbers(pos, numbers, player_name)
local meta = M(pos)
local res = logic.set_numbers(pos, numbers, player_name, S("TA3 Mesecons Converter"))
meta:set_string("formspec", formspec(meta))
return res
end
local function after_dig_node(pos, oldnode, oldmetadata)
techage.remove_node(pos, oldnode, oldmetadata)
techage.del_mem(pos)
mesecon.on_dignode(pos, oldnode)
end
minetest.register_node("techage:ta3_mesecons_converter", { minetest.register_node("techage:ta3_mesecons_converter", {
description = S("TA3 Mesecons Converter"), description = S("TA3 Mesecons Converter"),
tiles = { tiles = {
@ -56,37 +91,15 @@ minetest.register_node("techage:ta3_mesecons_converter", {
logic.after_place_node(pos, placer, "techage:ta3_mesecons_converter", S("TA3 Mesecons Converter")) logic.after_place_node(pos, placer, "techage:ta3_mesecons_converter", S("TA3 Mesecons Converter"))
logic.infotext(meta, S("TA3 Mesecons Converter")) logic.infotext(meta, S("TA3 Mesecons Converter"))
meta:set_string("formspec", formspec(meta)) meta:set_string("formspec", formspec(meta))
mem.overload_cnt = 0 mem.overload_cnt = -OVER_LOAD_MAX -- to prevent overload after placing
minetest.get_node_timer(pos):start(CYCLE_TIME) minetest.get_node_timer(pos):start(CYCLE_TIME)
mesecon.on_placenode(pos, minetest.get_node(pos)) mesecon.on_placenode(pos, minetest.get_node(pos))
end, end,
on_receive_fields = function(pos, formname, fields, player) on_receive_fields = on_receive_fields,
if minetest.is_protected(pos, player:get_player_name()) then on_timer = on_timer,
return techage_set_numbers = techage_set_numbers,
end after_dig_node = after_dig_node,
local meta = M(pos)
if techage.check_numbers(fields.numbers, player:get_player_name()) then
meta:set_string("numbers", fields.numbers)
logic.infotext(M(pos), S("TA3 Mesecons Converter"))
meta:set_string("formspec", formspec(meta))
end
minetest.get_node_timer(pos):start(CYCLE_TIME)
end,
on_timer = function(pos,elapsed)
local mem = techage.get_mem(pos)
mem.overload_cnt = 0
return true
end,
techage_set_numbers = function(pos, numbers, player_name)
local meta = M(pos)
local res = logic.set_numbers(pos, numbers, player_name, S("TA3 Mesecons Converter"))
meta:set_string("formspec", formspec(meta))
return res
end,
mesecons = { mesecons = {
receptor = { receptor = {
@ -96,29 +109,66 @@ minetest.register_node("techage:ta3_mesecons_converter", {
effector = { effector = {
rules = mesecon.rules.default, rules = mesecon.rules.default,
action_on = function(pos, node) action_on = function(pos, node)
techage.logic.swap_node(pos, "techage:ta3_mesecons_converter_on")
send_message(pos, "on") send_message(pos, "on")
end, end,
action_off = function(pos, node) action_off = function(pos, node)
send_message(pos, "off")
end, end,
action_change = function(pos, node) action_change = function(pos, node)
send_message(pos, "change") techage.logic.swap_node(pos, "techage:ta3_mesecons_converter_on")
send_message(pos, "on")
end, end,
} }
}, },
after_dig_node = function(pos, oldnode, oldmetadata)
techage.remove_node(pos, oldnode, oldmetadata)
techage.del_mem(pos)
mesecon.on_dignode(pos, oldnode)
end,
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {choppy=2, cracky=2, crumbly=2}, groups = {choppy=2, cracky=2, crumbly=2},
is_ground_content = false, is_ground_content = false,
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
}) })
minetest.register_node("techage:ta3_mesecons_converter_on", {
description = S("TA3 Mesecons Converter"),
tiles = {
-- 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_appl_mesecons_converter.png",
},
on_receive_fields = on_receive_fields,
on_timer = on_timer,
techage_set_numbers = techage_set_numbers,
after_dig_node = after_dig_node,
mesecons = {
receptor = {
state = mesecon.state.on,
rules = mesecon.rules.default,
},
effector = {
rules = mesecon.rules.default,
action_on = function(pos, node)
end,
action_off = function(pos, node)
techage.logic.swap_node(pos, "techage:ta3_mesecons_converter")
send_message(pos, "off")
end,
action_change = function(pos, node)
techage.logic.swap_node(pos, "techage:ta3_mesecons_converter")
send_message(pos, "off")
end,
}
},
paramtype = "light",
light_source = 5,
paramtype2 = "facedir",
groups = {choppy=2, cracky=2, crumbly=2},
is_ground_content = false,
sounds = default.node_sound_wood_defaults(),
drop = "techage:ta3_mesecons_converter",
})
minetest.register_craft({ minetest.register_craft({
output = "techage:ta3_mesecons_converter", output = "techage:ta3_mesecons_converter",
@ -127,7 +177,7 @@ minetest.register_craft({
}, },
}) })
techage.register_node({"techage:ta3_mesecons_converter"}, { techage.register_node({"techage:ta3_mesecons_converter", "techage:ta3_mesecons_converter_on"}, {
on_recv_message = function(pos, src, topic, payload) on_recv_message = function(pos, src, topic, payload)
local mem = techage.get_mem(pos) local mem = techage.get_mem(pos)
mem.overload_cnt = (mem.overload_cnt or 0) + 1 mem.overload_cnt = (mem.overload_cnt or 0) + 1
@ -136,8 +186,10 @@ techage.register_node({"techage:ta3_mesecons_converter"}, {
minetest.get_node_timer(pos):stop() minetest.get_node_timer(pos):stop()
return false return false
elseif topic == "on" then elseif topic == "on" then
techage.logic.swap_node(pos, "techage:ta3_mesecons_converter_on")
mesecon.receptor_on(pos, mesecon.rules.default) mesecon.receptor_on(pos, mesecon.rules.default)
elseif topic == "off" then elseif topic == "off" then
techage.logic.swap_node(pos, "techage:ta3_mesecons_converter")
mesecon.receptor_off(pos, mesecon.rules.default) mesecon.receptor_off(pos, mesecon.rules.default)
end end
end, end,

View File

@ -37,6 +37,12 @@ local DropdownValues = {
[S("added or removed")] = 3, [S("added or removed")] = 3,
} }
local AirLikeBlocks = {"air"}
for i = 1,14 do
-- Add light blocks from the mod "wielded_light" to the air-like blocks
AirLikeBlocks[#AirLikeBlocks + 1] = "wielded_light:" .. i
end
local function formspec(meta, nvm) local function formspec(meta, nvm)
local numbers = meta:get_string("numbers") or "" local numbers = meta:get_string("numbers") or ""
local label = S("added")..","..S("removed")..","..S("added or removed") local label = S("added")..","..S("removed")..","..S("added or removed")
@ -57,10 +63,10 @@ local function any_node_changed(pos)
local param2 = (node.param2 + 2) % 4 local param2 = (node.param2 + 2) % 4
nvm.pos1 = logic.dest_pos(pos, param2, {0}) nvm.pos1 = logic.dest_pos(pos, param2, {0})
nvm.pos2 = logic.dest_pos(pos, param2, {0,0,0}) nvm.pos2 = logic.dest_pos(pos, param2, {0,0,0})
nvm.num = #minetest.find_nodes_in_area(nvm.pos1, nvm.pos2, {"air"}) nvm.num = #minetest.find_nodes_in_area(nvm.pos1, nvm.pos2, AirLikeBlocks)
return false return false
end end
local num1 = #minetest.find_nodes_in_area(nvm.pos1, nvm.pos2, {"air"}) local num1 = #minetest.find_nodes_in_area(nvm.pos1, nvm.pos2, AirLikeBlocks)
local num2 = #minetest.find_nodes_in_area(nvm.pos1, nvm.pos2, {"ignore"}) local num2 = #minetest.find_nodes_in_area(nvm.pos1, nvm.pos2, {"ignore"})
if num2 == 0 and nvm.num ~= num1 then if num2 == 0 and nvm.num ~= num1 then

View File

@ -22,6 +22,7 @@ Local commands:
- Output this message with 'help' - Output this message with 'help'
- Switch to public use of buttons with 'pub' - Switch to public use of buttons with 'pub'
- Switch to private use of buttons with 'priv' - Switch to private use of buttons with 'priv'
- Output techage version with 'vers'
- Program a user button with - Program a user button with
'set <button-num> <button-text> <command>' 'set <button-num> <button-text> <command>'
Example: 'set 1 ON cmd 1234 on' Example: 'set 1 ON cmd 1234 on'
@ -35,6 +36,7 @@ Local commands:
- Output this message with 'help' - Output this message with 'help'
- Switch to public use of buttons with 'pub' - Switch to public use of buttons with 'pub'
- Switch to private use of buttons with 'priv' - Switch to private use of buttons with 'priv'
- Output techage version with 'vers'
- Program a user button with - Program a user button with
'set <button-num> <button-text> <command>' 'set <button-num> <button-text> <command>'
Example: 'set 1 ON cmd 1234 on' Example: 'set 1 ON cmd 1234 on'
@ -182,6 +184,9 @@ local function command(pos, command, player, is_ta4)
meta:set_int("public", 0) meta:set_int("public", 0)
output(pos, "$ "..command) output(pos, "$ "..command)
output(pos, "Switched to private buttons!") output(pos, "Switched to private buttons!")
elseif cmnd == "vers" then
output(pos, "$ "..command)
output(pos, "Techage version = " .. techage.version)
elseif cmnd == "connect" and data then elseif cmnd == "connect" and data then
output(pos, "$ "..command) output(pos, "$ "..command)
if techage.not_protected(data, owner, owner) then if techage.not_protected(data, owner, owner) then

View File

@ -38,7 +38,7 @@ minetest.register_node("techage:ta4_server", {
"techage_server_side.png^[transformFX", "techage_server_side.png^[transformFX",
"techage_server_back.png", "techage_server_back.png",
{ {
image = "techage_server_front.png", name = "techage_server_front.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -130,7 +130,7 @@ minetest.register_node("techage:ta4_server2", {
"techage_server2_side.png^[transformFX", "techage_server2_side.png^[transformFX",
"techage_server2_back.png", "techage_server2_back.png",
{ {
image = "techage_server2_front.png", name = "techage_server2_front.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -92,7 +92,7 @@ Usmium kommt nur als Nuggets vor und kann nur beim Waschen von Kies mit der TA2/
### Baborium ### Baborium
Baborium wird nur im Untertagebau gewonnen. Baborium findet man nur in Stein in einer Höhe zwischen -250 und -340 Meter. Barborium kann nur im Untertagebau gewonnen werden. Diesen Stoff findet man nur in einer Tiefe von -250 bis -340 Metern.
Baborium kann nur im TA3 Industrieofen geschmolzen werden. Baborium kann nur im TA3 Industrieofen geschmolzen werden.
[baborium|image] [baborium|image]

View File

@ -93,7 +93,8 @@ Usmium only occurs as nuggets and can only be obtained by washing gravel with th
### Baborium ### Baborium
Baborium is only extracted in underground mining. Baborium can only be found in stone at an altitude between -250 and -340 meters. Barborium can only be obtained from underground mining. This substance can only be found at a depth of -250 to -340 meters.
Baborium can only be melted in the TA3 Industrial Furnace. Baborium can only be melted in the TA3 Industrial Furnace.

View File

@ -51,7 +51,7 @@ Bauanleitung (siehe auch Plan):
* Baue einen Turm aus Stein (cobble) mit einer 3x3 Grundfläche (7-11 Blöcke hoch) * Baue einen Turm aus Stein (cobble) mit einer 3x3 Grundfläche (7-11 Blöcke hoch)
* Lasse unten ein Loch an einer Seite offen * Lasse unten ein Loch an einer Seite offen
* Lege einen Anzünder (lighter) hinein * Lege einen Anzünder (lighter) hinein
* Fülle den Turm von oben bis zum Rand mit Holzkohle * Fülle den Turm bis zum Rand mit Holzkohle, in dem du die Holzkohle von oben in das Loch fallen lässt
* Zünde den Anzünder durch das Loch an * Zünde den Anzünder durch das Loch an
* Platziere den Schmelztiegel in die Flamme über dem Turm * Platziere den Schmelztiegel in die Flamme über dem Turm
einen Block über der Flamme) einen Block über der Flamme)

View File

@ -50,7 +50,7 @@ Building instructions (see also plan):
* Build a stone tower (cobble) with a 3x3 base (7-11 blocks high) * Build a stone tower (cobble) with a 3x3 base (7-11 blocks high)
* Leave a hole open on one side at the bottom * Leave a hole open on one side at the bottom
* Put a lighter in it * Put a lighter in it
* Fill the tower with charcoal from the top to the top * Fill the tower to the brim with charcoal by dropping the charcoal into the hole from above
* Light the lighter through the hole * Light the lighter through the hole
* Place the melting pot in the flame over the tower * Place the melting pot in the flame over the tower
(one block above the flame) (one block above the flame)

View File

@ -240,7 +240,7 @@ Das Elektromotor nimmt primär max. 40 ku an Strom auf und gibt sekundär max. 3
Der TA3 Industrieofen dient als Ergänzung zu normalen Ofen (furnace). Damit können alle Waren mit "Koch" Rezepten, auch im Industrieofen hergestellt werden. Es gibt aber auch spezielle Rezepte, die nur im Industrieofen hergestellt werden können. Der TA3 Industrieofen dient als Ergänzung zu normalen Ofen (furnace). Damit können alle Waren mit "Koch" Rezepten, auch im Industrieofen hergestellt werden. Es gibt aber auch spezielle Rezepte, die nur im Industrieofen hergestellt werden können.
Der Industrieofen hat sein eigenes Menü zur Rezeptauswahl. Abhängig von den Waren im Industrieofen Inventar links kann rechts das Ausgangsprodukt gewählt werden. Der Industrieofen hat sein eigenes Menü zur Rezeptauswahl. Abhängig von den Waren im Industrieofen Inventar links kann rechts das Ausgangsprodukt gewählt werden.
Der Industrieofen benötigt Strom (für das Gebläse) sowie Schweröl/Benzin für den Brenner. Der Industrieofens und muss wie im Plan rechts abgebildet, zusammen gebaut werden. Der Industrieofen benötigt Strom (für das Gebläse) sowie Schweröl/Benzin für den Brenner. Der Industrieofen muss wie im Plan rechts abgebildet, zusammen gebaut werden.
Siehe auch TA4 Ofenheizung. Siehe auch TA4 Ofenheizung.

View File

@ -243,7 +243,7 @@ The electric motor takes max. 40 ku of electricity and provides on the other sid
The TA3 industrial furnace serves as a supplement to normal furnaces. This means that all goods can be produced with "cooking" recipes, even in an industrial furnace. But there are also special recipes that can only be made in an industrial furnace. The TA3 industrial furnace serves as a supplement to normal furnaces. This means that all goods can be produced with "cooking" recipes, even in an industrial furnace. But there are also special recipes that can only be made in an industrial furnace.
The industrial furnace has its own menu for recipe selection. Depending on the goods in the industrial furnace inventory on the left, the output product can be selected on the right. The industrial furnace has its own menu for recipe selection. Depending on the goods in the industrial furnace inventory on the left, the output product can be selected on the right.
The industrial furnace requires electricity (for the fan) and fuel oil / gasoline for the burner. The industrial furnace and must be assembled as shown in the plan on the right. The industrial furnace requires electricity (for the booster) and fuel oil / gasoline for the burner. The industrial furnace must be assembled as shown in the plan on the right.
See also TA4 heater. See also TA4 heater.

View File

@ -131,11 +131,13 @@ Diese Solarzelle kann nicht mit den anderen Solarmodulen kombiniert werden.
Der TA4 Energiespeicher ersetzt den Batterie Block aus TA3. Der TA4 Energiespeicher ersetzt den Batterie Block aus TA3.
Der Energiespeicher besteht aus einer Betonhülle (Concrete Block) gefüllt mit Gravel. Es gibt 3 Größen vom Speicher: Der Energiespeicher besteht aus einer Betonhülle (Concrete Block) gefüllt mit Gravel. Es gibt 5 Größen vom Speicher:
- Hülle mit 5x5x5 Concrete Blocks, gefüllt mit 27 Gravel, Speicherkapazität: 22.5 kud - Hülle mit 5x5x5 Concrete Blocks, gefüllt mit 27 Gravel, Speicherkapazität: 22.5 kud
- dHülle mit 7x7x7 Concrete Blocks, gefüllt mit 125 Gravel, Speicherkapazität: 104 kud - Hülle mit 7x7x7 Concrete Blocks, gefüllt mit 125 Gravel, Speicherkapazität: 104 kud
- Hülle mit 9x9x9 Concrete Blocks, gefüllt mit 343 Gravel, Speicherkapazität: 286 kud - Hülle mit 9x9x9 Concrete Blocks, gefüllt mit 343 Gravel, Speicherkapazität: 286 kud
- Hülle mit 11x11x11 Concrete Blocks, gefüllt mit 729 Gravel, Speicherkapazität: 610 kud
- Hülle mit 13x13x13 Concrete Blocks, gefüllt mit 1331 Gravel, Speicherkapazität: 1112 kud
In der Betonhülle darf ein Fenster aus einem Obsidian Glas Block sein. Dieses muss ziemlich in der Mitte der Wand platziert werden. Durch dieses Fenster sieht man, ob der Speicher mehr als 80 % geladen ist. Im Plan rechts sieht man den Aufbau aus TA4 Wärmetauscher bestehend aus 3 Blöcken, der TA4 Turbine und dem TA4 Generator. Beim Wärmetauscher ist auf die Ausrichtung zu achten (der Pfeil bei Block 1 muss zur Turbine zeigen). In der Betonhülle darf ein Fenster aus einem Obsidian Glas Block sein. Dieses muss ziemlich in der Mitte der Wand platziert werden. Durch dieses Fenster sieht man, ob der Speicher mehr als 80 % geladen ist. Im Plan rechts sieht man den Aufbau aus TA4 Wärmetauscher bestehend aus 3 Blöcken, der TA4 Turbine und dem TA4 Generator. Beim Wärmetauscher ist auf die Ausrichtung zu achten (der Pfeil bei Block 1 muss zur Turbine zeigen).
@ -205,7 +207,7 @@ Mit Hilfe von Trenntransformator und Stromzähler können Netzwerke zu noch grö
Mit Hilfe eines Trenntransformators können zwei Stromnetze zu einem größeren Netzwerk verbunden werden. Der Trenntransformator kann Strom in beide Richtungen übertragen. Mit Hilfe eines Trenntransformators können zwei Stromnetze zu einem größeren Netzwerk verbunden werden. Der Trenntransformator kann Strom in beide Richtungen übertragen.
Der Trenntransformator kann bis zu 100 ku übertragen. Der Trenntransformator kann bis zu 300 ku übertragen. Der Maximalwert ist über das Schraubenschlüsselmenü einstellbar.
[ta4_transformer|image] [ta4_transformer|image]
@ -215,7 +217,11 @@ Der Trenntransformator kann bis zu 100 ku übertragen.
Mit Hilfe eines Stromzählers können zwei Stromnetze zu einem größeren Netzwerk verbunden werden. Der Stromzähler leitet den Strom nur in eine Richtungen weiter (Pfeil beachten). Die Menge an Strom (in kud) wird gemessen und angezeigt. Die Strommenge kann auch über das Kommando `consumption` durch einen Lua Controller abgefragt werden. Mit Hilfe eines Stromzählers können zwei Stromnetze zu einem größeren Netzwerk verbunden werden. Der Stromzähler leitet den Strom nur in eine Richtungen weiter (Pfeil beachten). Die Menge an Strom (in kud) wird gemessen und angezeigt. Die Strommenge kann auch über das Kommando `consumption` durch einen Lua Controller abgefragt werden.
Der Stromzähler kann bis zu 200 ku durchleiten. Der Stromzähler kann bis zu 200 ku durchleiten. Der Maximalwert ist über das Schraubenschlüsselmenü einstellbar.
Über das Schraubenschlüsselmenü kann auch ein Countdown für die Leistungsabgabe eingegeben werden. Läuft dieser Countdown auf Null, schaltet sich der Stromzähler ab. Der Countdown kann über das Kommando `countdown` abgefragt werden.
[ta4_electricmeter|image] [ta4_electricmeter|image]
@ -574,7 +580,7 @@ Da die bewegten Blöcke Spieler und Mobs mitnehmen können, die auf dem Block st
Anleitung: Anleitung:
- Controller setzen und die Blöcke, die bewegt werden sollen, über das Menü an-trainieren (Es können bis zu 16 Blöcke an-trainiert werden) - Controller setzen und die Blöcke, die bewegt werden sollen, über das Menü (Taste "Aufzeichnen") an-trainieren (Es können bis zu 16 Blöcke an-trainiert werden)
- die "Flugstrecke" muss über eine x,y,z Angabe (relativ) eingegeben werden (die maximale Distanz (x+y+z) beträgt 200 m) - die "Flugstrecke" muss über eine x,y,z Angabe (relativ) eingegeben werden (die maximale Distanz (x+y+z) beträgt 200 m)
- mit den Menü-Tasten "Bewege A-B" sowie "Bewege B-A" kann die Bewegung getestet werden - mit den Menü-Tasten "Bewege A-B" sowie "Bewege B-A" kann die Bewegung getestet werden
- man kann auch durch Wände oder andere Blöcke fliegen - man kann auch durch Wände oder andere Blöcke fliegen

View File

@ -131,11 +131,13 @@ This solar cell cannot be combined with the other solar modules.
The thermal energy storage replaces the battery block from TA3. The thermal energy storage replaces the battery block from TA3.
The thermal energy store consists of a concrete shell (concrete blocks) filled with gravel. Three sizes of the storage are possible: The thermal energy store consists of a concrete shell (concrete blocks) filled with gravel. Five sizes of the storage are possible:
- Cover with 5x5x5 concrete blocks, filled with 27 gravel, storage capacity: 22.5 kud - Cover with 5x5x5 concrete blocks, filled with 27 gravel, storage capacity: 22.5 kud
- Cover with 7x7x7 concrete blocks, filled with 125 gravel, storage capacity: 104 kud - Cover with 7x7x7 concrete blocks, filled with 125 gravel, storage capacity: 104 kud
- Cover with 9x9x9 concrete blocks, filled with 343 gravel, storage capacity: 286 kud - Cover with 9x9x9 concrete blocks, filled with 343 gravel, storage capacity: 286 kud
- Cover with 11x11x11 concrete blocks, filled with 729 gravel, storage capacity: 610 kud
- Cover with 13x13x13 concrete blocks, filled with 1331 gravel, storage capacity: 1112 kud
A window made of an obsidian glass block may be in the concrete shell. This must be placed fairly in the middle of the wall. Through this window you can see whether the storage is loaded more than 80%. In the plan on the right you can see the structure of TA4 heat exchanger consisting of 3 blocks, the TA4 turbine and the TA4 generator. Pay attention to the alignment of the heat exchanger (the arrow at block 1 must point to the turbine). A window made of an obsidian glass block may be in the concrete shell. This must be placed fairly in the middle of the wall. Through this window you can see whether the storage is loaded more than 80%. In the plan on the right you can see the structure of TA4 heat exchanger consisting of 3 blocks, the TA4 turbine and the TA4 generator. Pay attention to the alignment of the heat exchanger (the arrow at block 1 must point to the turbine).
@ -204,7 +206,7 @@ With the help of an isolating transformer and electricity meter, networks can be
With the help of an isolating transformer, two power grids can be connected to form a larger network. The isolation transformer can transmit electricity in both directions. With the help of an isolating transformer, two power grids can be connected to form a larger network. The isolation transformer can transmit electricity in both directions.
The isolation transformer can transmit up to 100 ku. The isolation transformer can transmit up to 300 ku. The maximum value is adjustable via the wrench menu.
[ta4_transformer|image] [ta4_transformer|image]
@ -212,7 +214,9 @@ The isolation transformer can transmit up to 100 ku.
With the help of an electricity meter, two electricity networks can be connected to form a larger network. The electricity meter only transmits electricity in one direction (note arrow). The amount of electricity (in kud) is measured and displayed. The amount of electricity can also be queried by a Lua controller using the `consumption` command. With the help of an electricity meter, two electricity networks can be connected to form a larger network. The electricity meter only transmits electricity in one direction (note arrow). The amount of electricity (in kud) is measured and displayed. The amount of electricity can also be queried by a Lua controller using the `consumption` command.
The electricity meter can pass up to 200 ku. The electricity meter can pass up to 200 ku. The maximum value is adjustable via the wrench menu.
A power output countdown can also be entered via the wrench menu. When this countdown reaches zero, the electricity meter switches off. The countdown can be queried using the `countdown` command.
[ta4_electricmeter|image] [ta4_electricmeter|image]
@ -422,7 +426,7 @@ The signal tower can display red, green and orange. A combination of the 3 color
## TA4 Lua Controller ## TA4 Lua Controller
As the name suggests, the Lua controller must be programmed in the Lua programming language. You should also be able to speak some English. The manual in English is here available: As the name suggests, the Lua controller must be programmed in the Lua programming language. The manual in English is here available:
https://github.com/joe7575/techage/blob/master/manuals/ta4_lua_controller_EN.md https://github.com/joe7575/techage/blob/master/manuals/ta4_lua_controller_EN.md

View File

@ -82,6 +82,10 @@ Die maximale Distanz für die gesammte Flugstrecke beträgt 500 m.
Die Nutzung des TA5 Flug Controllers benötigt 40 Erfahrungspunkte. Die Nutzung des TA5 Flug Controllers benötigt 40 Erfahrungspunkte.
**Teleport Mode**
Wird der `Teleport Mode` aktiviert (auf `enable` gesetzt), kann ein Spieler auch ohne Blöcke bewegt werden. Dazu muss die Startposition über die Taste "Aufzeichnen" konfiguriert werden. Es kann hier nur eine Position konfiguriert werden. Das Spieler, der bewegt werden soll, muss dazu auf dieser Position stehen.
[ta5_flycontroller|image] [ta5_flycontroller|image]
### TA5 Hyperloop Kiste / TA5 Hyperloop Chest ### TA5 Hyperloop Kiste / TA5 Hyperloop Chest

View File

@ -82,6 +82,10 @@ The maximum distance for the entire flight distance is 500 m.
The use of the TA5 Flight Controller requires 40 experience points. The use of the TA5 Flight Controller requires 40 experience points.
**Teleport mode**
If the 'Teleport Mode' is enabled, a player can also be moved without blocks. To do this, the start position must be configured using the "Record" button. Only one position can be configured here. The player to be moved must be in that position.
[ta5_flycontroller|image] [ta5_flycontroller|image]
### TA5 Hyperloop Chest ### TA5 Hyperloop Chest

View File

@ -1,4 +1,4 @@
name = techage name = techage
depends = default,doors,flowers,tubelib2,networks,basic_materials,bucket,stairs,screwdriver,minecart,lcdlib,safer_lua depends = default,doors,flowers,tubelib2,networks,basic_materials,bucket,stairs,screwdriver,minecart,lcdlib,safer_lua
optional_depends = unified_inventory,wielded_light,unifieddyes,moreores,ethereal,mesecons,mesecons_materials,mesecons_mvps,digtron,bakedclay,moreblocks,i3,creative,craftguide optional_depends = unified_inventory,wielded_light,unifieddyes,moreores,ethereal,mesecons,mesecons_materials,mesecons_mvps,digtron,bakedclay,moreblocks,i3,creative,craftguide,farming
description = Techage, go through 5 tech ages in search of wealth and power! description = Techage, go through 5 tech ages in search of wealth and power!

View File

@ -67,6 +67,7 @@ local function get_new_nodename(item)
end end
local function get_node_name(nvm, slot) local function get_node_name(nvm, slot)
nvm.pos_list = nvm.pos_list or {}
local pos = nvm.pos_list[slot] local pos = nvm.pos_list[slot]
if pos then if pos then
return techage.get_node_lvm(pos).name return techage.get_node_lvm(pos).name
@ -228,6 +229,7 @@ end
-- Generate a table of currently available inventory and placed nodes -- Generate a table of currently available inventory and placed nodes
local function available_nodes(pos, nvm, item_list) local function available_nodes(pos, nvm, item_list)
local nodes = {} local nodes = {}
nvm.pos_list = nvm.pos_list or {}
for idx = 1, NUMSLOTS do for idx = 1, NUMSLOTS do
local item = item_list[idx] local item = item_list[idx]
@ -252,6 +254,7 @@ local function restore_config(pos, nvm)
local item_list = inv:get_list("main") local item_list = inv:get_list("main")
local stock = available_nodes(pos, nvm, item_list) local stock = available_nodes(pos, nvm, item_list)
local nodes = minetest.deserialize(meta:get_string("stored_config")) or {} local nodes = minetest.deserialize(meta:get_string("stored_config")) or {}
nvm.pos_list = nvm.pos_list or {}
inv:set_list("main", {}) inv:set_list("main", {})
item_list = inv:get_list("main") item_list = inv:get_list("main")
@ -421,7 +424,7 @@ minetest.register_node("techage:ta3_doorcontroller2", {
return return
elseif fields.record then elseif fields.record then
local inv = meta:get_inventory() local inv = meta:get_inventory()
nvm.pos_list = nil nvm.pos_list = {}
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 the blocks that are part of the door/gate")) minetest.chat_send_player(name, S("Click on all the blocks that are part of the door/gate"))

View File

@ -49,12 +49,20 @@ local WRENCH_MENU = {
tooltip = S("Y-offset for non-player objects like vehicles (-0.5 to 0.5)"), tooltip = S("Y-offset for non-player objects like vehicles (-0.5 to 0.5)"),
default = "0.0", default = "0.0",
}, },
{
type = "dropdown",
choices = "disable,enable",
name = "teleport_mode",
label = S("Teleport mode"),
tooltip = S("Move a player without moving blocks"),
default = "disable",
},
} }
local function formspec(nvm, meta) local function formspec(nvm, meta)
local status = meta:get_string("status") local status = meta:get_string("status")
local path = meta:contains("fs_path") and meta:get_string("fs_path") or local path = minetest.formspec_escape(meta:contains("fs_path") and meta:get_string("fs_path") or
meta:contains("path") and meta:get_string("path") or "0,3,0" meta:contains("path") and meta:get_string("path") or "0,3,0")
return "size[8,6.7]" .. return "size[8,6.7]" ..
"style_type[textarea;font=mono;textcolor=#FFFFFF;border=true]" .. "style_type[textarea;font=mono;textcolor=#FFFFFF;border=true]" ..
"box[0,-0.1;7.2,0.5;#c6e8ff]" .. "box[0,-0.1;7.2,0.5;#c6e8ff]" ..

View File

@ -60,7 +60,7 @@ local WRENCH_MENU = {
local function formspec(nvm, meta) local function formspec(nvm, meta)
local status = meta:get_string("status") local status = meta:get_string("status")
local path = meta:contains("path") and meta:get_string("path") or "0,3,0" local path = minetest.formspec_escape(meta:contains("path") and meta:get_string("path") or "0,3,0")
local buttons local buttons
if meta:get_string("opmode") == "move xyz" then if meta:get_string("opmode") == "move xyz" then
buttons = "field[0.4,2.5;3.8,1;path;" .. S("Move distance") .. ";" .. path .. "]" .. buttons = "field[0.4,2.5;3.8,1;path;" .. S("Move distance") .. ";" .. path .. "]" ..
@ -261,6 +261,7 @@ techage.register_node({"techage:ta4_movecontroller"}, {
end, end,
on_node_load = function(pos, node) on_node_load = function(pos, node)
local nvm = techage.get_nvm(pos) local nvm = techage.get_nvm(pos)
M(pos):set_string("teleport_mode", "") -- delete not working op mode
nvm.running = false nvm.running = false
end, end,
}) })
@ -293,6 +294,28 @@ minetest.register_node("techage:rack_and_pinion", {
sounds = default.node_sound_metal_defaults(), sounds = default.node_sound_metal_defaults(),
}) })
minetest.register_node("techage:moveblock", {
description = "Techage Invisible Move Block",
drawtype = "glasslike_framed_optional",
inventory_image = 'techage_inv_invisible.png',
tiles = {"techage_invisible.png"},
selection_box = {
type = "fixed",
fixed = {
{-16/32, -16/32, -16/32, 16/32, -14/32, 16/32},
},
},
paramtype = "light",
light_source = 0,
sunlight_propagates = true,
walkable = false,
pointable = true,
is_ground_content = false,
groups = {cracky = 3, oddly_breakable_by_hand = 3, not_in_creative_inventory = 1},
sounds = default.node_sound_glass_defaults(),
})
minetest.register_craft({ minetest.register_craft({
output = "techage:ta4_movecontroller", output = "techage:ta4_movecontroller",
recipe = { recipe = {

View File

@ -269,7 +269,7 @@ minetest.register_node("techage:oilexplorer_on", {
description = S("TA3 Oil Explorer"), description = S("TA3 Oil Explorer"),
tiles = { tiles = {
{ {
image = "techage_filling4_ta3.png^techage_appl_oilexplorer_top4.png^techage_frame4_ta3_top.png", name = "techage_filling4_ta3.png^techage_appl_oilexplorer_top4.png^techage_frame4_ta3_top.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -149,7 +149,7 @@ tiles.act = {
"techage_filling_ta#.png^techage_frame_ta#.png^techage_appl_hole_pipe.png", "techage_filling_ta#.png^techage_frame_ta#.png^techage_appl_hole_pipe.png",
"techage_filling_ta#.png^techage_frame_ta#.png^techage_appl_hole_pipe.png", "techage_filling_ta#.png^techage_frame_ta#.png^techage_appl_hole_pipe.png",
{ {
image = "techage_appl_pumpjack14.png^techage_frame14_ta#.png", name = "techage_appl_pumpjack14.png^techage_frame14_ta#.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -159,7 +159,7 @@ tiles.act = {
}, },
}, },
{ {
image = "techage_appl_pumpjack14.png^techage_frame14_ta#.png", name = "techage_appl_pumpjack14.png^techage_frame14_ta#.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -190,7 +190,7 @@ minetest.register_node("techage:ta3_reboiler_on", {
"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",
{ {
image = "techage_filling4_ta3.png^techage_appl_reboiler4.png^techage_frame4_ta3.png^[transformFX", name = "techage_filling4_ta3.png^techage_appl_reboiler4.png^techage_frame4_ta3.png^[transformFX",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -200,7 +200,7 @@ minetest.register_node("techage:ta3_reboiler_on", {
}, },
}, },
{ {
image = "techage_filling4_ta3.png^techage_appl_reboiler4.png^techage_frame4_ta3.png", name = "techage_filling4_ta3.png^techage_appl_reboiler4.png^techage_frame4_ta3.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -84,7 +84,7 @@ minetest.register_node("techage:axle_on", {
description = S("TA2 Drive Axle"), description = S("TA2 Drive Axle"),
tiles = { tiles = {
{ {
image = "techage_axle4R.png", name = "techage_axle4R.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -94,7 +94,7 @@ minetest.register_node("techage:axle_on", {
}, },
}, },
{ {
image = "techage_axle4R.png", name = "techage_axle4R.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -104,7 +104,7 @@ minetest.register_node("techage:axle_on", {
}, },
}, },
{ {
image = "techage_axle4.png", name = "techage_axle4.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -114,7 +114,7 @@ minetest.register_node("techage:axle_on", {
}, },
}, },
{ {
image = "techage_axle4.png", name = "techage_axle4.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -124,7 +124,7 @@ minetest.register_node("techage:axle_on", {
}, },
}, },
{ {
image = "techage_axle_clutch4.png", name = "techage_axle_clutch4.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -134,7 +134,7 @@ minetest.register_node("techage:axle_on", {
}, },
}, },
{ {
image = "techage_axle_clutch4.png", name = "techage_axle_clutch4.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -157,9 +157,9 @@ end
function techage.formspec_meter(pos, x, y, label, value, unit) function techage.formspec_meter(pos, x, y, label, value, unit)
return "container[" .. x .. "," .. y .. "]" .. return "container[" .. x .. "," .. y .. "]" ..
"box[0,0;2.3,1.2;#395c74]" .. "box[0,0;2.3,0.9;#395c74]" ..
"label[0.2,0.0;" .. label .. ":]" .. "label[0.2,0.0;" .. label .. ":]" ..
"label[0.2,0.5;" .. round(value) .. " " .. unit .. "]" .. "label[0.2,0.4;" .. round(value) .. " " .. unit .. "]" ..
"container_end[]" "container_end[]"
end end

View File

@ -103,7 +103,7 @@ minetest.register_node("techage:gearbox_on", {
tiles = { tiles = {
-- up, down, right, left, back, front -- up, down, right, left, back, front
{ {
image = "techage_filling4_ta2.png^techage_axle_gearbox4.png^techage_frame4_ta2.png", name = "techage_filling4_ta2.png^techage_axle_gearbox4.png^techage_frame4_ta2.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -41,3 +41,6 @@ techage_expoint_rate_in_min (average waiting time for one expoint) int 60
# For testing purpuses only # For testing purpuses only
techage_recipe_checker_enabled (test techage recipes) bool false techage_recipe_checker_enabled (test techage recipes) bool false
# Enables stair aliases (to prevent unknown nodes)
techage_stair_aliases_enabled (Enable stair aliases) bool false

View File

@ -101,7 +101,7 @@ minetest.register_node("techage:cylinder_on", {
"techage_filling_ta2.png^techage_appl_open.png^techage_frame_ta2.png", "techage_filling_ta2.png^techage_appl_open.png^techage_frame_ta2.png",
"techage_filling_ta2.png^techage_frame_ta2.png^techage_steam_hole.png", "techage_filling_ta2.png^techage_frame_ta2.png^techage_steam_hole.png",
{ {
image = "techage_filling4_ta2.png^techage_cylinder4.png^techage_frame4_ta2.png", name = "techage_filling4_ta2.png^techage_cylinder4.png^techage_frame4_ta2.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -111,7 +111,7 @@ minetest.register_node("techage:cylinder_on", {
}, },
}, },
{ {
image = "techage_filling4_ta2.png^techage_cylinder4.png^techage_frame4_ta2.png", name = "techage_filling4_ta2.png^techage_cylinder4.png^techage_frame4_ta2.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -109,7 +109,7 @@ minetest.register_node("techage:firebox_on", {
"techage_firebox.png^techage_frame_ta2.png", "techage_firebox.png^techage_frame_ta2.png",
"techage_firebox.png^techage_frame_ta2.png", "techage_firebox.png^techage_frame_ta2.png",
{ {
image = "techage_firebox4.png^techage_appl_firehole4.png^techage_frame4_ta2.png", name = "techage_firebox4.png^techage_appl_firehole4.png^techage_frame4_ta2.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -138,9 +138,9 @@ minetest.register_node("techage:firebox_on", {
minetest.register_craft({ minetest.register_craft({
output = "techage:firebox", output = "techage:firebox",
recipe = { recipe = {
{'group:stone', 'group:stone', 'group:stone'}, {'default:stone', 'default:stone', 'default:stone'},
{'techage:iron_ingot', '', 'techage:iron_ingot'}, {'techage:iron_ingot', '', 'techage:iron_ingot'},
{'group:stone', 'group:stone', 'group:stone'}, {'default:stone', 'default:stone', 'default:stone'},
}, },
}) })

View File

@ -161,7 +161,7 @@ minetest.register_node("techage:flywheel_on", {
"techage_filling_ta2.png^techage_frame_ta2.png", "techage_filling_ta2.png^techage_frame_ta2.png",
"techage_filling_ta2.png^techage_frame_ta2.png", "techage_filling_ta2.png^techage_frame_ta2.png",
{ {
image = "techage_filling4_ta2.png^techage_axle_clutch4.png^techage_frame4_ta2.png", name = "techage_filling4_ta2.png^techage_axle_clutch4.png^techage_frame4_ta2.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -172,7 +172,7 @@ minetest.register_node("techage:flywheel_on", {
}, },
"techage_filling_ta2.png^techage_appl_open.png^techage_frame_ta2.png", "techage_filling_ta2.png^techage_appl_open.png^techage_frame_ta2.png",
{ {
image = "techage_filling8_ta2.png^techage_frame8_ta2.png^techage_flywheel8.png", name = "techage_filling8_ta2.png^techage_frame8_ta2.png^techage_flywheel8.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -182,7 +182,7 @@ minetest.register_node("techage:flywheel_on", {
}, },
}, },
{ {
image = "techage_filling8_ta2.png^techage_frame8_ta2.png^techage_flywheel8.png^[transformFX]", name = "techage_filling8_ta2.png^techage_frame8_ta2.png^techage_flywheel8.png^[transformFX]",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -121,7 +121,7 @@ minetest.register_node("techage:ta2_generator_on", {
"techage_filling_ta2.png^techage_frame_ta2.png", "techage_filling_ta2.png^techage_frame_ta2.png",
"techage_filling_ta2.png^techage_frame_ta2.png^techage_appl_hole_electric.png", "techage_filling_ta2.png^techage_frame_ta2.png^techage_appl_hole_electric.png",
{ {
image = "techage_filling4_ta2.png^techage_axle_clutch4.png^techage_frame4_ta2.png", name = "techage_filling4_ta2.png^techage_axle_clutch4.png^techage_frame4_ta2.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -131,7 +131,7 @@ minetest.register_node("techage:ta2_generator_on", {
}, },
}, },
{ {
image = "techage_filling4_ta2.png^techage_appl_generator_red4.png^techage_frame4_ta2.png", name = "techage_filling4_ta2.png^techage_appl_generator_red4.png^techage_frame4_ta2.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -141,7 +141,7 @@ minetest.register_node("techage:ta2_generator_on", {
}, },
}, },
{ {
image = "techage_filling4_ta2.png^techage_appl_generator_red4.png^[transformFX]^techage_frame4_ta2.png", name = "techage_filling4_ta2.png^techage_appl_generator_red4.png^[transformFX]^techage_frame4_ta2.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -125,7 +125,7 @@ minetest.register_node("techage:ta3_motor_on", {
"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.png",
{ {
image = "techage_filling4_ta3.png^techage_axle_clutch4.png^techage_frame4_ta3.png", name = "techage_filling4_ta3.png^techage_axle_clutch4.png^techage_frame4_ta3.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -136,7 +136,7 @@ minetest.register_node("techage:ta3_motor_on", {
}, },
"techage_filling_ta3.png^techage_frame_ta3.png^techage_appl_hole_electric.png", "techage_filling_ta3.png^techage_frame_ta3.png^techage_appl_hole_electric.png",
{ {
image = "techage_filling4_ta3.png^techage_appl_generator_red4.png^[transformFX]^techage_frame4_ta3.png", name = "techage_filling4_ta3.png^techage_appl_generator_red4.png^[transformFX]^techage_frame4_ta3.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -146,7 +146,7 @@ minetest.register_node("techage:ta3_motor_on", {
}, },
}, },
{ {
image = "techage_filling4_ta3.png^techage_appl_generator_red4.png^techage_frame4_ta3.png", name = "techage_filling4_ta3.png^techage_appl_generator_red4.png^techage_frame4_ta3.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -248,7 +248,7 @@ minetest.register_node("techage:tiny_generator_on", {
"techage_appl_electric_gen_side.png^techage_appl_hole_electric.png^techage_frame_ta3.png", "techage_appl_electric_gen_side.png^techage_appl_hole_electric.png^techage_frame_ta3.png",
"techage_appl_electric_gen_side.png^techage_frame_ta3.png", "techage_appl_electric_gen_side.png^techage_frame_ta3.png",
{ {
image = "techage_appl_electric_gen_front4.png^[transformFX]^techage_frame4_ta3.png", name = "techage_appl_electric_gen_front4.png^[transformFX]^techage_frame4_ta3.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -258,7 +258,7 @@ minetest.register_node("techage:tiny_generator_on", {
}, },
}, },
{ {
image = "techage_appl_electric_gen_front4.png^techage_frame4_ta3.png", name = "techage_appl_electric_gen_front4.png^techage_frame4_ta3.png",
backface_culling = false, backface_culling = false,
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",

View File

@ -3,7 +3,7 @@
TechAge TechAge
======= =======
Copyright (C) 2019-2022 Joachim Stolberg Copyright (C) 2019-2023 Joachim Stolberg
AGPL v3 AGPL v3
See LICENSE.txt for more information See LICENSE.txt for more information
@ -24,25 +24,54 @@ local Cable = techage.ElectricCable
local power = networks.power local power = networks.power
local control = networks.control local control = networks.control
local WRENCH_MENU = {
{
type = "dropdown",
choices = "200 ku,150 ku,100 ku,50 ku,20 ku",
name = "current",
label = S("Max. power"),
tooltip = S("Maximum power passed through"),
default = "100 ku",
values = {200, 150, 100, 50, 20}
},
{
type = "number",
name = "countdown",
label = S("Power countdown"),
tooltip = S("Amount of power to be provided before the device turns off"),
default = "0",
},
}
local function max_current(pos)
local meta = M(pos)
if meta:contains("current") then
local current = meta:get_int("current")
return current > 0 and current or PWR_PERF
end
return PWR_PERF
end
local function formspec(self, pos, nvm, power) local function formspec(self, pos, nvm, power)
local units = (nvm.units or 0) / techage.CYCLES_PER_DAY local units = (nvm.units or 0) / techage.CYCLES_PER_DAY
nvm.countdown = nvm.countdown or M(pos):get_int("countdown")
power = power or 0 power = power or 0
return "size[5,4]" .. return "size[5,4]" ..
default.gui_bg ..
default.gui_bg_img ..
default.gui_slots ..
"box[0,-0.1;4.8,0.5;#c6e8ff]" .. "box[0,-0.1;4.8,0.5;#c6e8ff]" ..
techage.wrench_image(4.4, -0.08) ..
"label[0.2,-0.1;" .. minetest.colorize( "#000000", S("TA4 Electric Meter")).."]" .. "label[0.2,-0.1;" .. minetest.colorize( "#000000", S("TA4 Electric Meter")).."]" ..
techage.formspec_power_bar(pos, 0.0, 0.7, S("Power"), power, PWR_PERF) .. techage.formspec_power_bar(pos, 0.0, 0.7, S("Power"), power, max_current(pos)) ..
techage.formspec_meter(pos, 2.5, 0.7, S("Consumption"), units, "kud") .. techage.formspec_meter(pos, 2.5, 0.7, S("Consumption"), units, "kud") ..
"image_button[3.2,2.2;1,1;" .. self:get_state_button_image(nvm) .. ";state_button;]" .. techage.formspec_meter(pos, 2.5, 1.7, S("Countdown"), nvm.countdown, "kud") ..
"image_button[3.2,3.0;1,1;" .. self:get_state_button_image(nvm) .. ";state_button;]" ..
"tooltip[3.2,2.2;1,1;" .. self:get_state_tooltip(nvm) .. "]" "tooltip[3.2,2.2;1,1;" .. self:get_state_tooltip(nvm) .. "]"
end end
local function start_node(pos, nvm, state) local function start_node(pos, nvm, state)
local outdir = M(pos):get_int("outdir") local outdir = M(pos):get_int("outdir")
nvm.load = 0
nvm.countdown = M(pos):get_int("countdown")
power.start_storage_calc(pos, Cable, outdir) power.start_storage_calc(pos, Cable, outdir)
outdir = networks.Flip[outdir] outdir = networks.Flip[outdir]
power.start_storage_calc(pos, Cable, outdir) power.start_storage_calc(pos, Cable, outdir)
@ -71,11 +100,19 @@ local function node_timer(pos, elapsed)
if techage.is_running(nvm) then if techage.is_running(nvm) then
local outdir2 = M(pos):get_int("outdir") local outdir2 = M(pos):get_int("outdir")
local outdir1 = networks.Flip[outdir2] local outdir1 = networks.Flip[outdir2]
data = power.transfer_simplex(pos, Cable, outdir1, Cable, outdir2, PWR_PERF) local current = max_current(pos)
data = power.transfer_simplex(pos, Cable, outdir1, Cable, outdir2, current)
if data then if data then
nvm.load = (data.curr_load1 / data.max_capa1 + data.curr_load2 / data.max_capa2) / 2 * PWR_PERF nvm.countdown = nvm.countdown or M(pos):get_int("countdown")
nvm.load = (data.curr_load1 / data.max_capa1 + data.curr_load2 / data.max_capa2) / 2 * current
nvm.moved = data.moved nvm.moved = data.moved
nvm.units = (nvm.units or 0) + data.moved nvm.units = (nvm.units or 0) + data.moved
if nvm.countdown > 0 then
nvm.countdown = nvm.countdown - (data.moved / techage.CYCLES_PER_DAY)
if nvm.countdown <= 0 then
State:stop(pos, nvm)
end
end
end end
end end
if techage.is_activeformspec(pos) then if techage.is_activeformspec(pos) then
@ -118,7 +155,8 @@ local function get_generator_data(pos, outdir, tlib2)
-- check for secondary/generator side -- check for secondary/generator side
if outdir == M(pos):get_int("outdir") then if outdir == M(pos):get_int("outdir") then
if 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} local current = max_current(pos)
return {level = (nvm.load or 0) / current, perf = current, capa = current * 2}
end end
end end
end end
@ -140,6 +178,7 @@ minetest.register_node("techage:ta4_electricmeter", {
on_receive_fields = on_receive_fields, on_receive_fields = on_receive_fields,
after_place_node = after_place_node, after_place_node = after_place_node,
after_dig_node = after_dig_node, after_dig_node = after_dig_node,
ta4_formspec = WRENCH_MENU,
get_generator_data = get_generator_data, get_generator_data = get_generator_data,
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {cracky=2, crumbly=2, choppy=2}, groups = {cracky=2, crumbly=2, choppy=2},
@ -156,6 +195,8 @@ techage.register_node({"techage:ta4_electricmeter"}, {
local nvm = techage.get_nvm(pos) local nvm = techage.get_nvm(pos)
if topic == "consumption" then if topic == "consumption" then
return math.floor((nvm.units or 0) / techage.CYCLES_PER_DAY) return math.floor((nvm.units or 0) / techage.CYCLES_PER_DAY)
elseif topic == "countdown" then
return math.floor((nvm.countdown or 0) + 0.5)
else else
return State:on_receive_message(pos, topic, payload) return State:on_receive_message(pos, topic, payload)
end end
@ -165,8 +206,12 @@ techage.register_node({"techage:ta4_electricmeter"}, {
end, end,
on_beduino_request_data = function(pos, src, topic, payload) on_beduino_request_data = function(pos, src, topic, payload)
local nvm = techage.get_nvm(pos) local nvm = techage.get_nvm(pos)
if topic == 146 then -- Consumption if topic == 146 then
return 0, {math.floor((nvm.units or 0) / techage.CYCLES_PER_DAY)} if payload[1] == 0 then -- Consumption
return 0, {math.floor((nvm.units or 0) / techage.CYCLES_PER_DAY)}
else -- countdown
return 0, {math.floor((nvm.countdown or 0) + 0.5)}
end
else else
return State:on_beduino_request_data(pos, topic, payload) return State:on_beduino_request_data(pos, topic, payload)
end end
@ -184,7 +229,7 @@ control.register_nodes({"techage:ta4_electricmeter"}, {
type = S("TA4 Electric Meter"), type = S("TA4 Electric Meter"),
number = meta:get_string("node_number") or "", number = meta:get_string("node_number") or "",
running = techage.is_running(nvm) or false, running = techage.is_running(nvm) or false,
available = PWR_PERF, available = max_current(pos),
provided = nvm.moved or 0, provided = nvm.moved or 0,
termpoint = "-", termpoint = "-",
} }

View File

@ -3,7 +3,7 @@
TechAge TechAge
======= =======
Copyright (C) 2019-2022 Joachim Stolberg Copyright (C) 2019-2023 Joachim Stolberg
AGPL v3 AGPL v3
See LICENSE.txt for more information See LICENSE.txt for more information
@ -24,17 +24,35 @@ local Cable = techage.ElectricCable
local power = networks.power local power = networks.power
local control = networks.control local control = networks.control
local WRENCH_MENU = {
{
type = "dropdown",
choices = "300 ku,200 ku,150 ku,100 ku,50 ku,20 ku",
name = "current",
label = S("Max. power"),
tooltip = S("Maximum power passed through"),
default = "100 ku",
values = {300, 200, 150, 100, 50, 20}
},
}
local function max_current(pos)
local meta = M(pos)
if meta:contains("current") then
local current = meta:get_int("current")
return current > 0 and current or PWR_PERF
end
return PWR_PERF
end
local function formspec(self, pos, nvm, data) local function formspec(self, pos, nvm, data)
data = data or {curr_load1 = 0, curr_load2 = 0, max_capa1 = 0, max_capa2 = 0, moved = 0} data = data or {curr_load1 = 0, curr_load2 = 0, max_capa1 = 0, max_capa2 = 0, moved = 0}
return "size[7.5,5.2]".. return "size[7.5,5.2]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
"box[0,-0.1;7.3,0.5;#c6e8ff]".. "box[0,-0.1;7.3,0.5;#c6e8ff]"..
techage.wrench_image(6.9, -0.08) ..
"label[0.2,-0.1;"..minetest.colorize( "#000000", S("TA4 Isolation Transformer")).."]".. "label[0.2,-0.1;"..minetest.colorize( "#000000", S("TA4 Isolation Transformer")).."]"..
techage.formspec_storage_bar(pos, 0.0, 0.7, S("Storage"), data.curr_load1, data.max_capa1).. techage.formspec_storage_bar(pos, 0.0, 0.7, S("Storage"), data.curr_load1, data.max_capa1)..
techage.formspec_power_bar(pos, 2.5, 0.7, S("Power"), data.moved, PWR_PERF).. techage.formspec_power_bar(pos, 2.5, 0.7, S("Power"), data.moved, max_current(pos))..
techage.formspec_storage_bar(pos, 5.0, 0.7, S("Storage"), data.curr_load2, data.max_capa2).. techage.formspec_storage_bar(pos, 5.0, 0.7, S("Storage"), data.curr_load2, data.max_capa2)..
"image_button[3.3,4.3;1,1;" .. self:get_state_button_image(nvm) .. ";state_button;]" .. "image_button[3.3,4.3;1,1;" .. self:get_state_button_image(nvm) .. ";state_button;]" ..
"tooltip[3.3,4.3;1,1;" .. self:get_state_tooltip(nvm) .. "]" "tooltip[3.3,4.3;1,1;" .. self:get_state_tooltip(nvm) .. "]"
@ -42,6 +60,7 @@ end
local function start_node(pos, nvm, state) local function start_node(pos, nvm, state)
local outdir = M(pos):get_int("outdir") local outdir = M(pos):get_int("outdir")
nvm.load = 0
power.start_storage_calc(pos, Cable, outdir) power.start_storage_calc(pos, Cable, outdir)
outdir = networks.Flip[outdir] outdir = networks.Flip[outdir]
power.start_storage_calc(pos, Cable, outdir) power.start_storage_calc(pos, Cable, outdir)
@ -70,9 +89,10 @@ local function node_timer(pos, elapsed)
if techage.is_running(nvm) then if techage.is_running(nvm) then
local outdir2 = M(pos):get_int("outdir") local outdir2 = M(pos):get_int("outdir")
local outdir1 = networks.Flip[outdir2] local outdir1 = networks.Flip[outdir2]
data = power.transfer_duplex(pos, Cable, outdir1, Cable, outdir2, PWR_PERF) local current = max_current(pos)
data = power.transfer_duplex(pos, Cable, outdir1, Cable, outdir2, current)
if data then if data then
nvm.load = (data.curr_load1 / data.max_capa1 + data.curr_load2 / data.max_capa2) / 2 * PWR_PERF nvm.load = (data.curr_load1 / data.max_capa1 + data.curr_load2 / data.max_capa2) / 2 * current
nvm.moved = data.moved nvm.moved = data.moved
end end
end end
@ -114,7 +134,8 @@ 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 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} local current = max_current(pos)
return {level = (nvm.load or 0) / current, perf = current, capa = current * 2}
end end
end end
@ -136,6 +157,7 @@ minetest.register_node("techage:ta4_transformer", {
after_place_node = after_place_node, after_place_node = after_place_node,
after_dig_node = after_dig_node, after_dig_node = after_dig_node,
get_generator_data = get_generator_data, get_generator_data = get_generator_data,
ta4_formspec = WRENCH_MENU,
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {cracky=2, crumbly=2, choppy=2}, groups = {cracky=2, crumbly=2, choppy=2},
on_rotate = screwdriver.disallow, on_rotate = screwdriver.disallow,
@ -169,7 +191,7 @@ control.register_nodes({"techage:ta4_transformer"}, {
type = S("TA4 Isolation Transformer"), type = S("TA4 Isolation Transformer"),
number = meta:get_string("node_number") or "", number = meta:get_string("node_number") or "",
running = techage.is_running(nvm) or false, running = techage.is_running(nvm) or false,
available = PWR_PERF, available = max_current(pos),
provided = nvm.moved or 0, provided = nvm.moved or 0,
termpoint = "-", termpoint = "-",
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 B

After

Width:  |  Height:  |  Size: 97 B

View File

@ -341,6 +341,7 @@ minetest.register_node("towercrane:balance", {
sunlight_propagates = true, sunlight_propagates = true,
is_ground_content = false, is_ground_content = false,
groups = {crumbly=0, not_in_creative_inventory=1}, groups = {crumbly=0, not_in_creative_inventory=1},
drop = "",
}) })
minetest.register_node("towercrane:mast", { minetest.register_node("towercrane:mast", {
@ -358,6 +359,7 @@ minetest.register_node("towercrane:mast", {
sunlight_propagates = true, sunlight_propagates = true,
is_ground_content = false, is_ground_content = false,
groups = {crumbly=0, not_in_creative_inventory=1}, groups = {crumbly=0, not_in_creative_inventory=1},
drop = "",
}) })
minetest.register_node("towercrane:arm", { minetest.register_node("towercrane:arm", {
@ -375,6 +377,7 @@ minetest.register_node("towercrane:arm", {
sunlight_propagates = true, sunlight_propagates = true,
is_ground_content = false, is_ground_content = false,
groups = {crumbly=0, not_in_creative_inventory=1}, groups = {crumbly=0, not_in_creative_inventory=1},
drop = "",
}) })
minetest.register_node("towercrane:arm2", { minetest.register_node("towercrane:arm2", {
@ -392,6 +395,7 @@ minetest.register_node("towercrane:arm2", {
sunlight_propagates = true, sunlight_propagates = true,
is_ground_content = false, is_ground_content = false,
groups = {crumbly=0, not_in_creative_inventory=1}, groups = {crumbly=0, not_in_creative_inventory=1},
drop = "",
}) })
if towercrane.recipe then if towercrane.recipe then