Add everness support #187

This commit is contained in:
Joachim Stolberg 2024-12-31 18:12:54 +01:00
parent d7576fa6f6
commit 750dc59e97
5 changed files with 42 additions and 9 deletions

View File

@ -27,7 +27,7 @@ In the worst case, the server crashes.**
### License
Copyright (C) 2019-2023 Joachim Stolberg
Copyright (C) 2019-2025 Joachim Stolberg
Code: Licensed under the GNU AGPL version 3 or later. See LICENSE.txt
Textures: CC BY-SA 3.0
@ -39,8 +39,8 @@ Many thanks to Thomas-S, niklp09, and others for their contributions
### Dependencies
Required: default, doors, bucket, stairs, screwdriver, basic_materials, tubelib2, networks, minecart, lcdlib, safer_lua, doclib
Recommended: signs_bot, hyperloop, compost, techpack_stairway, autobahn
Optional: unified_inventory, wielded_light, unifieddyes, lua-mashal, lsqlite3, moreores, ethereal, mesecon
Recommended: signs_bot, hyperloop, compost, techpack_stairway, autobahn, nanobasic
Optional: unified_inventory, wielded_light, unifieddyes, lua-mashal, lsqlite3, moreores, ethereal, mesecon, everness
The mods `default`, `doors`, `bucket`, `stairs`, and `screwdriver` are part of Minetest Game.
@ -63,6 +63,7 @@ It is highly recommended that you install the following mods, too:
* [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
* [ta4_jetpack](https://github.com/joe7575/ta4_jetpack): A Jetpack with hydrogen as fuel and TA4 recipe
* [nanobasic](https://github.com/joe7575/nanobasic-mod): To upgrade the TA3 terminal to a BASIC computer
More recommended Techage related mods by other authors:
@ -95,6 +96,19 @@ Available worlds will be converted to 'lsqlite3', but there is no way back, so:
### History
**2024-12-31 V1.19**
- Add Everness support #187 (ore sieving)
- Add BASIC mode to TA3 terminal
- Improve russian translation (z-op)
- Many bug fixes by Niklp09, joe7575, and others
- Add pre-assignment menu to the furnace
- Improve recording for move/fly/turn controllers
- Allow to move the TA4 terminal with the assembly tool
- Add aluminum recipes for techpack_stairway items (jfanjoy)
- Change forceload block menu
**2023-11-05 V1.18**
- Add TA2 clutch

View File

@ -26,6 +26,22 @@ local ProbabilityCorrections = {
["techage:baborium_lump"] = 99999, -- mining required
}
local function wherein(item)
if type(item.wherein) == "table" then
for _,v in ipairs(item.wherein) do
if v == "default:stone" then
return true
end
if v == "everness:forsaken_desert_stone" then
return true
end
end
return false
else
return item.wherein == "default:stone"
end
end
-- collect all registered ores and calculate the probability
local function add_ores()
for _,item in pairs(minetest.registered_ores) do
@ -35,7 +51,7 @@ local function add_ores()
and drop ~= item.ore
and drop ~= ""
and item.ore_type == "scatter"
and item.wherein == "default:stone"
and wherein(item)
and item.clust_scarcity ~= nil and item.clust_scarcity > 0
and item.clust_num_ores ~= nil and item.clust_num_ores > 0
and item.y_max ~= nil and item.y_min ~= nil then

View File

@ -3,7 +3,7 @@
TechAge
=======
Copyright (C) 2019-2024 Joachim Stolberg
Copyright (C) 2019-2025 Joachim Stolberg
AGPL v3
See LICENSE.txt for more information
@ -13,7 +13,7 @@
techage = {}
-- Version for compatibility checks, see readme.md/history
techage.version = 1.18
techage.version = 1.19
if minetest.global_exists("tubelib") then
minetest.log("error", "[techage] Techage can't be used together with the mod tubelib!")

View File

@ -315,12 +315,14 @@ minetest.register_node("techage:basic_terminal", {
nvm.status = "error"
nvm.bttns = {"Edit", "", "", "", "", "Stop", "", ""}
nvm.input = ""
nvm.timeout = 0
local text = nanobasic.get_screen_buffer(pos)
M(pos):set_string("formspec", formspec(pos, text))
elseif res == nanobasic.NB_END then
nvm.status = "stopped"
nvm.bttns = {"Edit", "", "", "", "Run", "Stop", "", ""}
nvm.input = ""
nvm.timeout = 0
local text = nanobasic.get_screen_buffer(pos)
M(pos):set_string("formspec", formspec(pos, text))
elseif res == nanobasic.NB_BREAK then
@ -329,6 +331,7 @@ minetest.register_node("techage:basic_terminal", {
nvm.status = "break"
nvm.bttns = {"", "", "", "", "", "Stop", "Continue", "List"}
nvm.input = InputField
nvm.timeout = 0
local text = nanobasic.get_screen_buffer(pos)
M(pos):set_string("formspec", formspec(pos, text))
elseif res >= nanobasic.NB_XFUNC then
@ -378,12 +381,11 @@ minetest.register_node("techage:basic_terminal", {
ta3_formspec = WRENCH_MENU,
drop = "techage:terminal2",
not_in_creative_inventory = 1,
paramtype = "light",
use_texture_alpha = "clip",
sunlight_propagates = true,
paramtype2 = "facedir",
groups = {choppy=2, cracky=2, crumbly=2},
groups = {choppy=2, cracky=2, crumbly=2, not_in_creative_inventory=1},
is_ground_content = false,
sounds = default.node_sound_metal_defaults(),
})
@ -698,6 +700,7 @@ register_action({"init", "edit", "stopped"}, "Run", function(pos, nvm, fields)
nvm.input = ""
nvm.variables = nanobasic.get_variable_list(pos)
nvm.error_label_addr = nanobasic.get_label_address(pos, "65000") or 0
nvm.timeout = 0
minetest.get_node_timer(pos):start(0.2)
return nanobasic.get_screen_buffer(pos) or ""
else

View File

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