diff --git a/basic_materials/mod.conf b/basic_materials/mod.conf index 4b58eba..7234bfe 100644 --- a/basic_materials/mod.conf +++ b/basic_materials/mod.conf @@ -1,3 +1,4 @@ name = basic_materials depends = default optional_depends = moreores +min_minetest_version = 5.2.0 diff --git a/check.sh b/check.sh new file mode 100755 index 0000000..8fffd68 --- /dev/null +++ b/check.sh @@ -0,0 +1,45 @@ +cd ~/minetest5/mods/autobahn/ +echo autobahn +git status + +cd ~/minetest5/mods/compost/ +echo compost +git status + +cd ~/minetest5/mods/hyperloop/ +echo hyperloop +git status + +cd ~/minetest5/mods/tubelib2/ +echo tubelib2 +git status + +cd ~/minetest5/mods/signs_bot/ +echo signs_bot +git status + +cd ~/minetest5/mods/minecart/ +echo minecart +git status + +cd ~/minetest5/mods/safer_lua/ +echo safer_lua +git status + +cd ~/minetest5/mods/techpack_stairway/ +echo techpack_stairway +git status + +cd ~/minetest5/mods/lcdlib/ +echo lcdlib +git status + +cd ~/minetest5/mods/techage/ +echo techage +git status + +cd ~/minetest5/mods/towercrane/ +echo towercrane +git status + + diff --git a/techage/README.md b/techage/README.md index 7f13406..50c90ea 100644 --- a/techage/README.md +++ b/techage/README.md @@ -87,6 +87,7 @@ to 'lsqlite3' and 'lua-marshal', but there is no way back, so: - 2020-04-26 V0.07 * English translation added - 2020-05-22 V0.08 * Support for 'lua-marshal' and 'lsqlite3' added - 2020-05-31 V0.09 * TA4 tubes upgraded, manuals updated +- 2020-06-04 V0.10 * minor changes and bugfixes diff --git a/techage/basic_machines/distributor.lua b/techage/basic_machines/distributor.lua index 8e017db..fb23c52 100644 --- a/techage/basic_machines/distributor.lua +++ b/techage/basic_machines/distributor.lua @@ -264,7 +264,7 @@ local function distributing(pos, inv, crd, nvm) end end - if num_pushed == 0 then + if sum_num_pushed == 0 then crd.State:blocked(pos, nvm) else crd.State:keep_running(pos, nvm, COUNTDOWN_TICKS) diff --git a/techage/basic_machines/quarry.lua b/techage/basic_machines/quarry.lua index 66b1927..73743ee 100644 --- a/techage/basic_machines/quarry.lua +++ b/techage/basic_machines/quarry.lua @@ -189,6 +189,8 @@ local function quarry_task(pos, crd, nvm) pos1.y = y_curr pos2.y = y_curr + nvm.level = y_first - y_curr + if minetest.is_area_protected(pos1, pos2, owner, 5) then crd.State:fault(pos, nvm, S("area is protected")) return @@ -215,7 +217,6 @@ local function quarry_task(pos, crd, nvm) end techage.unmark_position(owner) end - nvm.level = nvm.level + 1 end crd.State:stop(pos, nvm, S("finished")) end @@ -348,7 +349,12 @@ local tubing = { end end, on_recv_message = function(pos, src, topic, payload) - return CRD(pos).State:on_receive_message(pos, topic, payload) + if topic == "depth" then + local nvm = techage.get_nvm(pos) + return nvm.level or 0 + else + return CRD(pos).State:on_receive_message(pos, topic, payload) + end end, on_node_load = function(pos, node) local nvm = techage.get_nvm(pos) diff --git a/techage/basis/node_states.lua b/techage/basis/node_states.lua index ddb38ec..5fd3d9f 100644 --- a/techage/basis/node_states.lua +++ b/techage/basis/node_states.lua @@ -277,7 +277,7 @@ end function NodeStates:standby(pos, nvm, err_string) local state = nvm.techage_state or STOPPED - if state == RUNNING then + if state == RUNNING or state == BLOCKED then nvm.techage_state = STANDBY if self.node_name_passive then swap_node(pos, self.node_name_passive) diff --git a/techage/doc/guide.lua b/techage/doc/guide.lua index 9124105..c06a6d7 100644 --- a/techage/doc/guide.lua +++ b/techage/doc/guide.lua @@ -210,3 +210,9 @@ minetest.register_craft({ }, }) +minetest.register_craft({ + type = "shapeless", + output = "techage:construction_board_EN", + recipe = {"techage:construction_board"}, +}) + diff --git a/techage/doc/manual_EN.lua b/techage/doc/manual_EN.lua index 0b694b8..2c6160e 100644 --- a/techage/doc/manual_EN.lua +++ b/techage/doc/manual_EN.lua @@ -11,8 +11,8 @@ techage.manual_EN.aTitel = { "3,Bauxite", "2,History", "1,TA1: Iron Age", - "2,Coal Pile", - "2,Coal Burner", + "2,Charcoal Pile (charcoal burner)", + "2,Melting Furnace", "2,Ores and Tools", "3,Hammer", "3,Gravel Sieve", @@ -265,7 +265,7 @@ techage.manual_EN.aText = { "\n".. "\n".. "\n", - "You need the charcoal burner to make charcoal. Charcoal is required for the burner\\, but also\\, for example\\, in TA2 for the steam engine.\n".. + "You need the Charcoal Pile to make charcoal. Charcoal is required for the melting furnace\\, but also\\, for example\\, in TA2 for the steam engine.\n".. "\n".. "Building instructions (see also plan):\n".. "\n".. @@ -278,11 +278,11 @@ techage.manual_EN.aText = { " - If you have done everything correctly\\, the coal burner will start smoking after a few seconds\n".. " - Only open the charcoal burner when the smoke has disappeared (approx. 20 min)\n".. "\n".. - "Then you can remove the 9 charcoal blocks and refill the charcoal burner.\n".. + "Then you can remove the 9 charcoal blocks and refill the Charcoal Pile.\n".. "\n".. "\n".. "\n", - "You need the coal burner\\, for example\\, to melt iron and other ores in the melting pot. There are different recipes that require different temperatures. The higher the tower\\, the hotter the flame. A height of 11 blocks above the base plate is for all recipes\\, but a burner with this height also requires more charcoal.\n".. + "You need the melting furnace\\, for example\\, to melt iron and other ores in the melting pot. There are different recipes that require different temperatures. The higher the melting tower\\, the hotter the flame. A height of 11 blocks above the base plate is for all recipes\\, but a burner with this height also requires more charcoal.\n".. "\n".. "Building instructions (see also plan):\n".. "\n".. @@ -436,7 +436,7 @@ techage.manual_EN.aText = { "\n".. "\n".. "\n", - "Crushing\\, grinding and sieving of rock is used to extract ores. Sieved gravel can also be used for other purposes. Quarry\\, grinder and sieve must be driven and thus installed near a steam engine.\n".. + "Crushing\\, grinding and sieving of cobblestone is used to extract ores. Sieved gravel can also be used for other purposes. Quarry\\, grinder and sieve must be driven and thus installed near a steam engine.\n".. "\n".. "\n".. "\n", diff --git a/techage/icta_controller/commands.lua b/techage/icta_controller/commands.lua index fc9772c..f1b096a 100644 --- a/techage/icta_controller/commands.lua +++ b/techage/icta_controller/commands.lua @@ -185,7 +185,7 @@ techage.icta_register_condition("state", { { type = "label", name = "lbl", - label = "Read the state from a TA3/TA4 machine.\n", + label = "Read the state of a TA3/TA4 machine.\n", }, }, button = function(data, environ) -- default button label @@ -222,7 +222,7 @@ techage.icta_register_condition("fuel", { { type = "label", name = "lbl", - label = "Read and evaluate the fuel value\nfrom a fuel consuming block.", + label = "Read and evaluate the fuel value\nof a fuel consuming block.", }, }, button = function(data, environ) @@ -259,7 +259,7 @@ techage.icta_register_condition("load", { { type = "label", name = "lbl", - label = "Read and evaluate the load (0..100)\nfrom a tank/storage block.", + label = "Read and evaluate the load (0..100)\nof a tank/storage block.", }, }, button = function(data, environ) @@ -271,6 +271,43 @@ techage.icta_register_condition("load", { end, }) +techage.icta_register_condition("depth", { + title = "read quarry depth", + formspec = { + { + type = "number", + name = "number", + label = "quarry number", + default = "", + }, + { + type = "textlist", + name = "operand", + label = "", + choices = "greater,less", + default = "greater", + }, + { + type = "digits", + name = "value", + label = "than", + default = "" + }, + { + type = "label", + name = "lbl", + label = "Read and evaluate the current\ndepth of a quarry block.", + }, + }, + button = function(data, environ) + return 'depth('..techage.fmt_number(data.number)..","..data.operand..' '..data.value..')' + end, + code = function(data, environ) + return send_single_string(environ, data.number, "depth"), + techage.operand(data.operand)..tonumber(data.value) + end, +}) + techage.icta_register_condition("delivered", { title = "read delivered power", formspec = { @@ -296,7 +333,7 @@ techage.icta_register_condition("delivered", { { type = "label", name = "lbl", - label = "Read and evaluate the delivered\npower from a generator block.\nPower consuming blocks like accus\ncould also provide a negative value.", + label = "Read and evaluate the delivered\npower of a generator block.\nPower consuming blocks like accus\ncould also provide a negative value.", }, }, button = function(data, environ) @@ -371,7 +408,7 @@ techage.icta_register_condition("signaltower", { { type = "label", name = "lbl", - label = "Read the color state\nfrom a Signal Tower.", + label = "Read the color state\nof a Signal Tower.", }, }, button = function(data, environ) -- default button label @@ -602,7 +639,7 @@ techage.icta_register_condition("playerdetector", { { type = "label", name = "lbl", - label = "Read and check the name\nfrom a Player Detector.\nUse a '*' character for all player names.\n Use a '-' character for no player.", + label = "Read and check the name\nof a Player Detector.\nUse a '*' character for all player names.\n Use a '-' character for no player.", }, }, diff --git a/techage/images/chemical_reactor.png b/techage/images/chemical_reactor.png new file mode 100644 index 0000000..78c56c5 Binary files /dev/null and b/techage/images/chemical_reactor.png differ diff --git a/techage/images/destillationsturm.png b/techage/images/distillation_tower.png similarity index 100% rename from techage/images/destillationsturm.png rename to techage/images/distillation_tower.png diff --git a/techage/images/drilling_tower.png b/techage/images/drilling_tower.png new file mode 100644 index 0000000..6e098d1 Binary files /dev/null and b/techage/images/drilling_tower.png differ diff --git a/techage/images/melting_furnace.png b/techage/images/melting_furnace.png new file mode 100644 index 0000000..5341921 Binary files /dev/null and b/techage/images/melting_furnace.png differ diff --git a/techage/images/reactor.png b/techage/images/reactor.png deleted file mode 100644 index 84c8b16..0000000 Binary files a/techage/images/reactor.png and /dev/null differ diff --git a/techage/images/steam_engine.png b/techage/images/steam_engine.png new file mode 100644 index 0000000..f6b5637 Binary files /dev/null and b/techage/images/steam_engine.png differ diff --git a/techage/images/steamengine.png b/techage/images/steamengine.png deleted file mode 100644 index cf28d98..0000000 Binary files a/techage/images/steamengine.png and /dev/null differ diff --git a/techage/images/tank_cart.png b/techage/images/tank_cart.png new file mode 100644 index 0000000..d641589 Binary files /dev/null and b/techage/images/tank_cart.png differ diff --git a/techage/images/TES_5x5x5.png b/techage/images/thermal_energy_storage.png similarity index 100% rename from techage/images/TES_5x5x5.png rename to techage/images/thermal_energy_storage.png diff --git a/techage/images/wind_plant.png b/techage/images/wind_plant.png new file mode 100644 index 0000000..55210b0 Binary files /dev/null and b/techage/images/wind_plant.png differ diff --git a/techage/init.lua b/techage/init.lua index 31ae6ab..6a35d86 100644 --- a/techage/init.lua +++ b/techage/init.lua @@ -13,7 +13,7 @@ techage = {} -- Version for compatibility checks, see readme.md/history -techage.version = 0.06 +techage.version = 0.10 if minetest.global_exists("tubelib") then minetest.log("error", "[techage] Techage can't be used together with the mod tubelib!") diff --git a/techage/iron_age/hammer.lua b/techage/iron_age/hammer.lua index a1cb896..879baa3 100644 --- a/techage/iron_age/hammer.lua +++ b/techage/iron_age/hammer.lua @@ -48,6 +48,25 @@ local function handler(player_name, node, itemstack, digparams) end end +minetest.register_tool("techage:hammer_stone", { + description = S("TA1 Stone Hammer (smash stone to gravel)"), + inventory_image = "techage_tool_hammer_stone.png", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=1, + groupcaps={ + cracky = {times={[1]=6.00, [2]=2.5, [3]=1.2}, uses=30, maxlevel=2}, + }, + damage_groups = {fleshy=4}, + }, + sound = {breaks = "default_tool_breaks"}, + after_use = function(itemstack, user, node, digparams) + minetest.after(0.01, handler, user:get_player_name(), node) + itemstack:add_wear(digparams.wear) + return itemstack + end, +}) + minetest.register_tool("techage:hammer_bronze", { description = S("TA1 Bronze Hammer (smash stone to gravel)"), inventory_image = "techage_tool_hammer_bronze.png", @@ -153,6 +172,14 @@ if minetest.global_exists("wielded_light") then }) end +minetest.register_craft({ + output = "techage:hammer_stone 2", + recipe = { + {"default:cobble", "group:stick", "default:cobble"}, + {"default:cobble", "group:stick", "default:cobble"}, + {"", "group:stick", ""}, + } +}) minetest.register_craft({ output = "techage:hammer_bronze 2", recipe = { diff --git a/techage/manuals/QSG.md b/techage/manuals/QSG.md new file mode 100644 index 0000000..32afeb2 --- /dev/null +++ b/techage/manuals/QSG.md @@ -0,0 +1,71 @@ +# TechAge Quick Start Guide + +The Techage Modpack is an extensive collection of technical mods with many machines and systems, which unfortunately cannot be set up intuitively. Therefore, there is this Quick Start Guide and further manuals for the different mods. + + +Techage represents four technological ages: + +- Iron Age (TA1) - Simple tools like coal pile, coal burner, gravel sieve, hammer for getting ores and making goods +- Steam Age (TA2) - Simple machines that are powered by steam engines and drive axles +- Oil Age (TA3) - More modern machines that are powered by electricity +- Future Age (TA4) - Electricity from renewable energy sources such as sun and wind + +Since the levels build on each other, all ages have to be run through one after the other. + + + +## Manuals + +- [Techage](https://github.com/joe7575/techage/wiki) and ingame via TA Construction Plan + +- [Minecart](https://github.com/joe7575/minecart/blob/master/README.md) and ingame via player inventory help (the blue questionmark) +- [Hyperloop](https://github.com/joe7575/Minetest-Hyperloop/wiki) +- [Signs Bot](https://github.com/joe7575/signs_bot/blob/master/README.md) and ingame via player inventory help (the blue questionmark) + + + +## Iron Age (TA1) + +1. Search and harvest cactus to make paper and craft the Techage Construction Board. This plan is the ingame manual for all four Techage phases +2. Cut trees and make wood out of them +3. Collect dirt for the charcoal burner to make charcoal +4. Go mining and seach for ores, or +5. Alternatively, use Hammer and Gravel Sieve to collect ore from gravel +6. Build a melting furnace and melting pot to melt iron and other ores in the melting pot +7. Use the Minecart Hopper to automate your Gravel Sieve + + + +## Steam Age (TA2) + +1. Build a stream engine according to the TA Construction Board +2. Craft machines like TA2 Grinder, TA2 Sieve, TA2 Distributor, TA2 Pusher, TA2 Autocrafter, TA2 Electronic Fab, and TA2 Quarry +3. Connect the machines with the stream engine via drive axles (if needed) +4. Use the Quarry to collect cobblestone or go mining +5. Crushing, grinding and sieving of cobblestone is used to extract ores +6. Build a Gravel washer according to the TA Construction Board to collect further ores from sieved gravel +7. TA2 Autocrafter and TA2 Electronic Fab help to get items for the next phase + + + +## Oil Age (TA3) + +1. Build a coal-fired Power Station which can be replaced later by a oil firebox +2. Craft new machines driven by electricity +3. Search for oil (petroleum) with the TA3 Oil Explorer (don't give up to early) +4. Drilling derricks and oil pumps help them get the oil +5. Railways are used to transport oil to the power plants +6. Distillation Towers are used to separate the oil into its components +7. Pumps and Tanks are used to pump and store the oil liquids +8. TA3 Industrial Furnace and TA3 Electronic Fab help to get items for the next phase + + + +## Future Age (TA4) + +1. Build solar and wind plants to get renewable energy +2. Build a Thermal Energy Storage to store the energy +3. Build a Chemical Reactor to manufacture further items +4. Build a Hyperloop network as passenger transportation system +5. Use the Signs Bot for further automation tasks +6. Use Controller, Displays and further logic to fully automate all machines... \ No newline at end of file diff --git a/techage/manuals/manual_ta1_EN.md b/techage/manuals/manual_ta1_EN.md index 87784e9..fc1cbe5 100644 --- a/techage/manuals/manual_ta1_EN.md +++ b/techage/manuals/manual_ta1_EN.md @@ -13,9 +13,9 @@ The durability / hardness for an axe, for example: [techage_ta1|image] -## Coal Pile +## Charcoal Pile (charcoal burner) -You need the charcoal burner to make charcoal. Charcoal is required for the burner, but also, for example, in TA2 for the steam engine. +You need the Charcoal Pile to make charcoal. Charcoal is required for the melting furnace, but also, for example, in TA2 for the steam engine. Building instructions (see also plan): @@ -28,14 +28,14 @@ Building instructions (see also plan): - If you have done everything correctly, the coal burner will start smoking after a few seconds - Only open the charcoal burner when the smoke has disappeared (approx. 20 min) -Then you can remove the 9 charcoal blocks and refill the charcoal burner. +Then you can remove the 9 charcoal blocks and refill the Charcoal Pile. [coalpile|plan] -## Coal Burner +## Melting Furnace -You need the coal burner, for example, to melt iron and other ores in the melting pot. There are different recipes that require different temperatures. The higher the tower, the hotter the flame. A height of 11 blocks above the base plate is for all recipes, but a burner with this height also requires more charcoal. +You need the melting furnace, for example, to melt iron and other ores in the melting pot. There are different recipes that require different temperatures. The higher the melting tower, the hotter the flame. A height of 11 blocks above the base plate is for all recipes, but a burner with this height also requires more charcoal. Building instructions (see also plan): diff --git a/techage/manuals/manual_ta2_EN.md b/techage/manuals/manual_ta2_EN.md index 27962b6..87bcc6f 100644 --- a/techage/manuals/manual_ta2_EN.md +++ b/techage/manuals/manual_ta2_EN.md @@ -144,7 +144,7 @@ The processing power is one gravel item every 2 s. The gravel washer needs 3 ku ## Dig stone, grind and sieve -Crushing, grinding and sieving of rock is used to extract ores. Sieved gravel can also be used for other purposes. Quarry, grinder and sieve must be driven and thus installed near a steam engine. +Crushing, grinding and sieving of cobblestone is used to extract ores. Sieved gravel can also be used for other purposes. Quarry, grinder and sieve must be driven and thus installed near a steam engine. [ta2_grinder|image] diff --git a/techage/manuals/ta4_lua_controller_EN.md b/techage/manuals/ta4_lua_controller_EN.md index 789fe32..b98a477 100644 --- a/techage/manuals/ta4_lua_controller_EN.md +++ b/techage/manuals/ta4_lua_controller_EN.md @@ -352,12 +352,13 @@ In addition to Lua standard function the Lua Controller provides the following f | ident | returned data | comment | | ----------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -| "state" | one of: "running", "stopped", "blocked", "standby", "fault", or "unloaded" | Techage machine state, used by many machines | +| "state" | one of: "running", "stopped", "blocked", "standby", "fault", or "unloaded" | Techage machine state, used by many machines | | "state" | one of: "red", "amber", "green", "off" | Signal Tower state | | "state" | one of: "empty", "loaded", "full" | State of a chest or Sensor Chest | -| "fuel" | number | fuel value from fuel consuming block | -| "load" | number | Read the load value in percent (0..100) from a tank/storage block, an accu block, of from the Signs Bot Box. | -| "delivered" | number | Read the current delivered power value from a generator block. A power consuming block (accu) provides a negative value | +| "fuel" | number | fuel value of a fuel consuming block | +| "depth" | number | Read the current depth value of a quarry block (1..80) | +| "load" | number | Read the load value in percent (0..100) of a tank/storage block, an accu block, of of the Signs Bot Box. | +| "delivered" | number | Read the current delivered power value of a generator block. A power consuming block (accu) provides a negative value | | "action" | player-name, action-string | only for Sensor Chests | | "stacks" | Array with up to 4 Stores with the inventory content (see example) | only for Sensor Chests | | "count" | number | Read the item counter of the TA4 Item Detector block | diff --git a/techage/manuals/toc_EN.md b/techage/manuals/toc_EN.md index 1b25f1b..71a0aab 100644 --- a/techage/manuals/toc_EN.md +++ b/techage/manuals/toc_EN.md @@ -10,8 +10,8 @@ - [Bauxite](./manual_EN.md#bauxite) - [History](./manual_EN.md#history) - [TA1: Iron Age](./manual_ta1_EN.md#ta1:-iron-age) - - [Coal Pile](./manual_ta1_EN.md#coal-pile) - - [Coal Burner](./manual_ta1_EN.md#coal-burner) + - [Charcoal Pile (charcoal burner)](./manual_ta1_EN.md#charcoal-pile-(charcoal-burner)) + - [Melting Furnace](./manual_ta1_EN.md#melting-furnace) - [Ores and Tools](./manual_ta1_EN.md#ores-and-tools) - [Hammer](./manual_ta1_EN.md#hammer) - [Gravel Sieve](./manual_ta1_EN.md#gravel-sieve) diff --git a/techage/oil/reboiler.lua b/techage/oil/reboiler.lua index 5eabcd5..81f4d24 100644 --- a/techage/oil/reboiler.lua +++ b/techage/oil/reboiler.lua @@ -90,21 +90,6 @@ local function pump_cmnd(pos, cmnd, payload) {"techage:ta3_distiller1"}) end -local function start_node(pos) - local nvm = techage.get_nvm(pos) - if nvm.running then return end - - nvm.liquid = nvm.liquid or {} - nvm.liquid.amount = nvm.liquid.amount or 0 - if nvm.liquid.amount >= 5 and nvm.liquid.name == "techage:oil_source" then - if power.power_available(pos, Cable) then - nvm.running = true - power.consumer_start(pos, Cable, CYCLE_TIME) - minetest.get_node_timer(pos):start(CYCLE_TIME) - end - end -end - local function node_timer(pos, elapsed) local nvm = techage.get_nvm(pos) nvm.liquid = nvm.liquid or {} @@ -130,6 +115,23 @@ local function node_timer(pos, elapsed) return false end +local function start_node(pos) + local nvm = techage.get_nvm(pos) + if nvm.running then return end + + nvm.liquid = nvm.liquid or {} + nvm.liquid.amount = nvm.liquid.amount or 0 + if nvm.liquid.amount >= 5 and nvm.liquid.name == "techage:oil_source" then + if power.power_available(pos, Cable) then + if node_timer(pos, CYCLE_TIME) then + nvm.running = true + power.consumer_start(pos, Cable, CYCLE_TIME) + minetest.get_node_timer(pos):start(CYCLE_TIME) + end + end + end +end + local function after_place_node(pos) Pipe:after_place_node(pos) Cable:after_place_node(pos) diff --git a/techage/textures/techage_tool_hammer_stone.png b/techage/textures/techage_tool_hammer_stone.png new file mode 100644 index 0000000..bb56141 Binary files /dev/null and b/techage/textures/techage_tool_hammer_stone.png differ