mods that hopefully work for a TechAge-based pack

This commit is contained in:
2026-09-09 06:27:51 -06:00
parent 4e6b08d194
commit c27db2a537
6234 changed files with 375578 additions and 0 deletions
+157
View File
@@ -0,0 +1,157 @@
### GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
<https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates the
terms and conditions of version 3 of the GNU General Public License,
supplemented by the additional permissions listed below.
#### 0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the
GNU General Public License.
"The Library" refers to a covered work governed by this License, other
than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
#### 1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
#### 2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
- a) under this License, provided that you make a good faith effort
to ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
- b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
#### 3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from a
header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
- a) Give prominent notice with each copy of the object code that
the Library is used in it and that the Library and its use are
covered by this License.
- b) Accompany the object code with a copy of the GNU GPL and this
license document.
#### 4. Combined Works.
You may convey a Combined Work under terms of your choice that, taken
together, effectively do not restrict modification of the portions of
the Library contained in the Combined Work and reverse engineering for
debugging such modifications, if you also do each of the following:
- a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
- b) Accompany the Combined Work with a copy of the GNU GPL and this
license document.
- c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
- d) Do one of the following:
- 0) Convey the Minimal Corresponding Source under the terms of
this License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
- 1) Use a suitable shared library mechanism for linking with
the Library. A suitable mechanism is one that (a) uses at run
time a copy of the Library already present on the user's
computer system, and (b) will operate properly with a modified
version of the Library that is interface-compatible with the
Linked Version.
- e) Provide Installation Information, but only if you would
otherwise be required to provide such information under section 6
of the GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the Application
with a modified version of the Linked Version. (If you use option
4d0, the Installation Information must accompany the Minimal
Corresponding Source and Corresponding Application Code. If you
use option 4d1, you must provide the Installation Information in
the manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.)
#### 5. Combined Libraries.
You may place library facilities that are a work based on the Library
side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
- a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities, conveyed under the terms of this License.
- b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
#### 6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
as you received it specifies that a certain numbered version of the
GNU Lesser General Public License "or any later version" applies to
it, you have the option of following the terms and conditions either
of that published version or of any later version published by the
Free Software Foundation. If the Library as you received it does not
specify a version number of the GNU Lesser General Public License, you
may choose any version of the GNU Lesser General Public License ever
published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
+66
View File
@@ -0,0 +1,66 @@
# Handholds Redo
Mountaineering made easy
![](https://raw.githubusercontent.com/t-affeldt/handholds_redo/master/screenshot.png)
This mod is inspired by the [handholds](https://forum.minetest.net/viewtopic.php?t=17069) mod that adds a climbing pick for easier mountaineering.
In that mod you can use a specialized tool to carve handholds into stone, sandstone, and ice blocks. These handholds would then allow you to climb upwards.
## Noticeable Differences
The code has been completely rewritten from scratch in order to make some significant changes.
* Instead of adding a new tool, handholds_redo lets you use your normal pickaxes by right-clicking
* Handholds can now be carved into a lot more materials including nodes from various different mods and subgames
* Handholds can now be carved into multiple sides of the same node
* Handholds can now be carved into the bottom face of a node, allowing you to climb on the ceiling
* Mod authors can now mark nodes as carveable more easily
* Mod authors can now assign a climbing pick ability to custom tools
* On a technical note, handhold nodes are now wallmounted and attached, meaning they don't need to be synced with their neighbouring nodes anymore
## Mod Support
### Supported Subgames
* Minetest Game
* MineClone 2
* Realtest MT5
### Supported Pickaxes from other mods
* moreores
* mobs_monster
* lavastuff
* obsidianstuff
### Supported Nodes from other mods
* moreores
* technic
* bakedclay
* caverealms
* df_caverns
* pedology
* gloopblocks
## Modding Capabilities
__Adding a carveable node__:
Adding additional nodes to the list of carveable materials is extremely easy.
All you need to do is assign a group value called ``handholds`` to the respective node like so:
```lua
minetest.register_node("mymod:test_node", {
description = "Test Node",
tiles = { "mymod_testnode.png" },
groups = { handholds = 2 },
})
```
If you want to assign a group value to an already registered node you can either override that node
using ``minetest.override_item(node_name, node_definition)`` or a helper utility provided by this mod: ``handholds.mark_climbable(node_name, level)``.
This function will apply the specified *level* to the *handholds group* and assign it to the given node.
A pickaxe needs to have at least the same level in order to carve the material.
If left unspecified, this value defaults to 1.
For reference: A wooden pickaxe has a value of 1, stone a value of 2, bronze and steel a value of 3, mese and diamond a value of 4.
__Adding a custom pickaxe__: In order to apply the climbing behaviour to a custom pickaxe you will need to tell this mod about it. Register it as a tool like normal and then call ``handholds.register_pick(name, level)``. This function will then override the tool's right-click handler in order to assign the new behaviour. The specified *level* determines which nodes can be carved. If left unspecified, this value defaults to 1.
# License Information
The source code is licensed under [GNU Lesser General Public License v3.0](https://github.com/t-affeldt/handholds_redo/blob/master/LICENSE.md). Look at the included license file for more information.
The texture for the handholds node is taken from the mod [handholds](https://github.com/Ezhh/handholds) and licensed under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/). Credit for this goes to [Shara RedCat](https://forum.minetest.net/memberlist.php?mode=viewprofile&u=19807). The texture has been marginally tweaked by me for better visibility.
+51
View File
@@ -0,0 +1,51 @@
local modpath = minetest.get_modpath(minetest.get_current_modname())
local capabilities = dofile(modpath .. "/lib/mod_capabilities.lua")
local utility = dofile(modpath .. "/lib/utility.lua")
dofile(modpath .. "/lib/definitions.lua")
handholds = {}
function handholds.register_pick(name, level)
local def = minetest.registered_tools[name]
if def == nil then
minetest.log("warning",
"[Handholds Redo] Climbing pick `" .. name .. "` is not a registered tool")
return
end
if level == nil then level = 1 end
local groups = def.groups
groups.climbing_pick = level
local placement_handler = def.on_place
minetest.override_item(name, {
on_place = function(...)
utility.place_holds(...)
if placement_handler ~= nil then
return placement_handler(...)
end
end,
groups = groups
})
end
function handholds.mark_climbable(name, level)
local def = minetest.registered_nodes[name]
if def == nil then
minetest.log("warning",
"[Handholds Redo] Climbable node `" .. name .. "` is not a registered node")
return
end
if level == nil then level = 1 end
local groups = def.groups
groups.handholds = level
minetest.override_item(name, {
groups = groups
})
end
for tool, level in pairs(capabilities.tools) do
handholds.register_pick(tool, level)
end
for node, level in pairs(capabilities.nodes) do
handholds.mark_climbable(node, level)
end
+39
View File
@@ -0,0 +1,39 @@
local mod_default = minetest.get_modpath("default") ~= nil
local mod_mcl_sounds = minetest.get_modpath("mcl_sounds") ~= nil
local sounds = { }
if mod_default then
sounds = default.node_sound_stone_defaults()
elseif mod_mcl_sounds then
sounds = mcl_sounds.node_sound_stone_defaults()
end
local node_box = {
type = "wallmounted",
wall_side = { -0.5, 0.5, -0.5, -0.49, -0.5, 0.5 },
wall_top = { -0.5, 0.5, -0.5, 0.5, 0.49, 0.5 },
wall_bottom = { -0.5, 0.5, -0.5, 0.5, -0.5, -0.49 }
}
minetest.register_node("handholds_redo:holds", {
description = "Handholds",
inventory_image = "handholds_holds.png",
wield_image = "handholds_holds.png",
tiles = { "handholds_holds.png" },
use_texture_alpha = true,
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propagates = true,
walkable = false,
pointable = false,
buildable_to = true,
climbable = true,
floodable = true,
is_ground_content = false,
node_box = node_box,
selection_box = node_box,
groups = { cracky = 3, attached_node = 1, not_in_creative_inventory = 1 },
sounds = sounds,
drop = ""
})
@@ -0,0 +1,246 @@
-- Minetest Game
local mod_default = minetest.get_modpath("default") ~= nil
-- MineClone 2
local mod_mcl_core = minetest.get_modpath("mcl_core") ~= nil
local mod_mcl_tools = minetest.get_modpath("mcl_tools") ~= nil
-- Realtest MT5
local mod_instruments = minetest.get_modpath("instruments") ~= nil
local mod_grounds = minetest.get_modpath("grounds") ~= nil
local mod_ores = minetest.get_modpath("ores") ~= nil
local is_realtest = mod_instruments
-- various mods
local mod_moreores = minetest.get_modpath("moreores") ~= nil
local mod_technic_worldgen = minetest.get_modpath("technic_worldgen") ~= nil
local mod_bakedclay = minetest.get_modpath("bakedclay") ~= nil
local mod_mobs_monster = minetest.get_modpath("mobs_monster") ~= nil
local mod_lavastuff = minetest.get_modpath("lavastuff") ~= nil
local mod_obsidianstuff = minetest.get_modpath("obsidianstuff") ~= nil
local mod_caverealms = minetest.get_modpath("caverealms") ~= nil
local mod_df_mapitems = minetest.get_modpath("df_mapitems") ~= nil
local mod_df_underworld_items = minetest.get_modpath("df_underworld_items") ~= nil
local mod_pedology = minetest.get_modpath("pedology") ~= nil
local mod_gloopblocks = minetest.get_modpath("gloopblocks") ~= nil
local tools = { }
local nodes = { }
-- Minetest Game
if mod_default and not is_realtest then
tools["default:pick_wood"] = 1
tools["default:pick_stone"] = 2
tools["default:pick_bronze"] = 3
tools["default:pick_steel"] = 3
tools["default:pick_mese"] = 4
tools["default:pick_diamond"] = 4
nodes["default:stone"] = 1
nodes["default:cobble"] = 1
nodes["default:stonebrick"] = 1
nodes["default:stone_block"] = 1
nodes["default:mossycobble"] = 1
nodes["default:desert_stone"] = 1
nodes["default:desert_cobble"] = 1
nodes["default:desert_stonebrick"] = 1
nodes["default:desert_stone_block"] = 1
nodes["default:sandstone"] = 1
nodes["default:sandstonebrick"] = 1
nodes["default:sandstone_block"] = 1
nodes["default:desert_sandstone"] = 1
nodes["default:desert_sandstone_brick"] = 1
nodes["default:desert_sandstone_block"] = 1
nodes["default:silver_sandstone"] = 1
nodes["default:silver_sandstone"] = 1
nodes["default:silver_sandstone_brick"] = 1
nodes["default:silver_sandstone_block"] = 1
nodes["default:obsidian"] = 3
nodes["default:obsidianbrick"] = 3
nodes["default:obsidian_block"] = 3
nodes["default:brick"] = 1
nodes["default:ice"] = 1
nodes["default:cave_ice"] = 1
nodes["default:stone_with_coal"] = 1
nodes["default:stone_with_iron"] = 2
nodes["default:stone_with_copper"] = 2
nodes["default:stone_with_tin"] = 2
nodes["default:stone_with_gold"] = 2
nodes["default:stone_with_mese"] = 3
nodes["default:stone_with_diamond"] = 3
end
-- MineClone 2
if mod_mcl_tools then
tools["mcl_tools:pick_wood"] = 1
tools["mcl_tools:pick_stone"] = 3
tools["mcl_tools:pick_iron"] = 4
tools["mcl_tools:pick_gold"] = 2
tools["mcl_tools:pick_diamond"] = 5
end
if mod_mcl_core then
nodes["mcl_core:stone"] = 1
nodes["mcl_core:stone_with_coal"] = 1
nodes["mcl_core:stone_with_iron"] = 3
nodes["mcl_core:stone_with_gold"] = 4
nodes["mcl_core:stone_with_redstone"] = 4
nodes["mcl_core:stone_with_redstone_lit"] = 4
nodes["mcl_core:stone_with_lapis"] = 3
nodes["mcl_core:stone_with_emerald"] = 4
nodes["mcl_core:stone_with_diamond"] = 4
nodes["mcl_core:stonebrick"] = 1
nodes["mcl_core:stonebrickcarved"] = 1
nodes["mcl_core:stonebrickcracked"] = 1
nodes["mcl_core:stonebrickmossy"] = 1
nodes["mcl_core:stone_smooth"] = 1
nodes["mcl_core:granite"] = 1
nodes["mcl_core:granite_smooth"] = 1
nodes["mcl_core:andesite"] = 1
nodes["mcl_core:andesite_smooth"] = 1
nodes["mcl_core:diorite"] = 1
nodes["mcl_core:diorite_smooth"] = 1
nodes["mcl_core:sandstone"] = 1
nodes["mcl_core:sandstonesmooth"] = 1
nodes["mcl_core:sandstonesmooth"] = 1
nodes["mcl_core:sandstonesmooth"] = 1
nodes["mcl_core:redsandstone"] = 1
nodes["mcl_core:redsandstonesmooth"] = 1
nodes["mcl_core:redsandstonecarved"] = 1
nodes["mcl_core:redsandstonesmooth2"] = 1
nodes["mcl_core:brick_block"] = 1
nodes["mcl_core:cobble"] = 1
nodes["mcl_core:mossycobble"] = 1
nodes["mcl_core:obsidian"] = 5
nodes["mcl_core:ice"] = 1
nodes["mcl_core:packed_ice"] = 1
end
-- Realtest MT5
if mod_instruments then
local instruments = {}
instruments.materials = {"stone","bismuth","zinc","tin","copper","rose_gold","oroide","black_bronze","bismuth_bronze","tumbaga","bronze","aluminium","wrought_iron","german_silver","albata","steel","monel","black_steel"}
instruments.levels = {0,0,0,0,1,2,2,2,2,2,2,2,3,4,4,4,4,5}
for i, material in ipairs(instruments.materials) do
local level = instruments.levels[i]
tools["instruments:pick_" .. material] = level + 1
end
end
if mod_default and mod_grounds then
nodes["default:stone"] = 1
nodes["default:stone_bricks"] = 1
nodes["default:stone_macadam"] = 1
nodes["default:desert_stone"] = 1
nodes["default:desert_stone_bricks"] = 1
nodes["default:desert_stone_macadam"] = 1
end
if mod_ores then
local ores = {"lignite","anthracite","bituminous_coal","magnetite","hematite","limonite","bismuthinite","cassiterite","galena","garnierite","malachite","native_copper","native_gold","native_silver","native_platinum","sphalerite","tetrahedrite","lazurite","bauxite","cinnabar","cryolite","graphite","gypsum","jet","kaolinite","kimberlite","olivine","petrified_wood","saltpeter","satin_spar","selenite","serpentine","sylvite","tenorite"}
local ores_desert = {"native_copper","native_gold"}
for _, ore in ipairs(ores) do
nodes["ores:" .. ore .. "_in_default_stone"] = 1
end
for _, ore in ipairs(ores_desert) do
nodes["ores:" .. ore .. "_in_default_desert_stone"] = 1
end
end
-- mod support
if mod_moreores then
tools["moreores:pick_silver"] = 3
tools["moreores:pick_mithril"] = 4
nodes["moreores:mineral_silver"] = 2
nodes["moreores:mineral_mithril"] = 3
end
if mod_technic_worldgen then
nodes["technic:mineral_uranium"] = 2
nodes["technic:mineral_chromium"] = 2
nodes["technic:mineral_zinc"] = 2
nodes["technic:mineral_lead"] = 2
nodes["technic:mineral_sulfur"] = 2
nodes["technic:granite"] = 3
nodes["technic:marble"] = 1
nodes["technic:marble_bricks"] = 1
end
if mod_bakedclay then
nodes["bakedclay:white"] = 1
nodes["bakedclay:grey"] = 1
nodes["bakedclay:black"] = 1
nodes["bakedclay:red"] = 1
nodes["bakedclay:yellow"] = 1
nodes["bakedclay:green"] = 1
nodes["bakedclay:cyan"] = 1
nodes["bakedclay:blue"] = 1
nodes["bakedclay:magenta"] = 1
nodes["bakedclay:orange"] = 1
nodes["bakedclay:violet"] = 1
nodes["bakedclay:brown"] = 1
nodes["bakedclay:pink"] = 1
nodes["bakedclay:dark_grey"] = 1
nodes["bakedclay:dark_green"] = 1
end
if mod_mobs_monster then
tools["mobs:pick_lava"] = 4
end
if mod_lavastuff and not mod_mobs_monster then
tools["lavastuff:pick"] = 4
end
if mod_obsidianstuff then
tools["obsidianstuff:pick"] = 4
end
if mod_caverealms then
nodes["caverealms:stone_with_algae"] = 1
nodes["caverealms:stone_with_lichen"] = 1
nodes["caverealms:stone_with_moss"] = 1
nodes["caverealms:hot_cobble"] = 1
nodes["caverealms:glow_obsidian"] = 3
nodes["caverealms:glow_obsidian_2"] = 3
end
if mod_df_mapitems then
nodes["df_mapitems:cobble_with_floor_fungus"] = 1
nodes["df_mapitems:cobble_with_floor_fungus_fine"] = 1
nodes["df_mapitems:dry_flowstone"] = 1
nodes["df_mapitems:wet_flowstone"] = 1
nodes["df_mapitems:salty_cobble"] = 1
nodes["df_mapitems:veinstone"] = 1
nodes["df_mapitems:ice_with_hoar_moss"] = 1
end
if mod_df_underworld_items then
nodes["df_underworld_items:slade"] = 1
nodes["df_underworld_items:slade_block"] = 1
nodes["df_underworld_items:slade_brick"] = 1
nodes["df_underworld_items:slade_seal"] = 1
end
if mod_pedology then
nodes["pedology:ice_white"] = 1
end
if mod_gloopblocks then
tools["gloopblocks:pick_cement"] = 3
tools["gloopblocks:pick_evil"] = 3
nodes["gloopblocks:basalt"] = 1
nodes["gloopblocks:cobble_road"] = 1
nodes["gloopblocks:cobble_road_mossy"] = 1
nodes["gloopblocks:pavement"] = 1
nodes["gloopblocks:pumice"] = 1
nodes["gloopblocks:stone_brick_mossy"] = 1
nodes["gloopblocks:stone_mossy"] = 1
end
return {
tools = tools,
nodes = nodes
}
+79
View File
@@ -0,0 +1,79 @@
local utility = {}
function utility.is_creative(player)
if minetest.settings:get_bool("creative_mode") == true then
return true
end
local name = player:get_player_name()
if name == nil or name == "" then
return false
end
return minetest.check_player_privs(name, { creative = true })
end
function utility.is_replaceable(pos)
local node = minetest.registered_nodes[minetest.get_node(pos)]
if node == nil or node.name == "handholds_redo:holds" then return true end
return node.name == "air" or node.buildable_to
end
function utility.is_climbable(pos, level)
local def = minetest.registered_nodes[minetest.get_node(pos).name]
if def == nil then return false end
if def.groups == nil or def.groups.handholds == nil then return false end
return level >= def.groups.handholds
end
function utility.place_holds(itemstack, placer, pointed_thing)
if itemstack == nil then return end
local itemdef = itemstack:get_definition()
if itemdef == nil
or itemdef.groups == nil
or itemdef.groups.climbing_pick == nil then
return
end
if pointed_thing == nil or
pointed_thing.type ~= "node" or
pointed_thing.under.y + 1 == pointed_thing.above.y or
not utility.is_replaceable(pointed_thing.above) or
not utility.is_climbable(pointed_thing.under, itemdef.groups.climbing_pick) then
return
end
if minetest.is_protected(pointed_thing.under, placer:get_player_name()) or
minetest.is_protected(pointed_thing.above, placer:get_player_name()) then
minetest.record_protection_violation(pointed_thing.above, placer)
return
end
local rotation = minetest.dir_to_wallmounted(
vector.subtract(pointed_thing.under, pointed_thing.above)
)
minetest.set_node(pointed_thing.above, {
name = "handholds_redo:holds",
param2 = rotation
})
minetest.sound_play(
"default_dig_cracky",
{pos = pointed_thing.under, gain = 0.5, max_hear_distance = 8}
)
if not utility.is_creative(placer) then
local wdef = itemstack:get_definition()
itemstack:add_wear(256)
if itemstack:get_count() == 0 and wdef.sound and wdef.sound.breaks then
minetest.sound_play(wdef.sound.breaks, {
pos = pointed_thing.above,
gain = 0.5
})
end
end
return itemstack
end
return utility
+8
View File
@@ -0,0 +1,8 @@
name = handholds_redo
author = TestificateMods
description = """
Adds additional functionality to pickaxes as a climbing tool.
A right-click on stone, sandstone, ice, or any other solid material will create handholds that you can use for climbing.
"""
title = Handholds Redo
optional_depends = default, mcl_core, mcl_sounds, mcl_tools, instruments, grounds, ores, moreores, technic_worldgen, bakedclay, mobs_monster, caverealms, df_mapitems, df_underworld_items, pedology, lavastuff, obsidianstuff, gloopblocks
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB