more mods

This commit is contained in:
tangent committed 2026-09-12 07:03:41 -06:00
1 parent cc0fa41e3b
commit bac6ac94a3
1742 files changed
+115814 -1

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
The `extra_mods` directory contains extra mods for X-Decor-libre.
X-Decor-libre itself should NOT execute any of the code in this directory directly.
This directory is meant for special mods that you, the user
are supposed to install manually (if you need them).
@@ -0,0 +1,29 @@
-- Modified BSD License --
Copyright (c) 2025 Wuzzy <Wuzzy@disroot.org>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- End of Modified BSD License --
@@ -0,0 +1,85 @@
# X-Decor-libre Autocut [`xdecor_autocut`]
## Version
This is version `1.0.0` of `xdecor_autocut`, compatible
with version `libre14` or later of X-Decor-libre.
## Description
This is a companion mod for X-Decor-libre [`xdecor`].
It automatically adds many more “cut” variants for most
cube-shaped nodes in the game so the player can cut more
nodes at the workbench. This does not guarantee that
all added cut nodes will look pretty, however,
as the nodes will be added automatically and are
not carefully curated.
By default, X-Decor-libre only adds cut node variants for
nodes from itself and the `default` mod.
With this mod, nodes from other mods will be available for
cutting as well.
This has been the original behavior of X-Decor-libre in the past,
but it has been removed in version `libre6` due to
hard-to-debug compatibility issues like naming collisions.
This mod basically replicates this old behavior, but a bit
more stable.
## Usage
To use this mod, simply copy the mod folder to your
`mods` directory of your Luanti user directory and
then enable it for your world like any other world.
### Note for server operators
You should probably not use this mod except for
compatibility with old versions of X-Decor-libre
or X-Decor.
If you are just now adding X-Decor-libre or
start with a fresh world, you’re probably better
off in writing a small mod to *explicitly* make
each node you want to be made cut cuttable, to
prevent to pollute your server with garbage nodes.
See `src/workbench.lua` for details.
This mod mainly exists because if will be useful if
your server used an older version of X-Decor-libre
or X-Decor that aggressively added many cut nodes
which have become unknown nodes in newer versions,
because since X only nodes from X-Decor-libre
and the `default` mod are cuttable, for safety
reasons.
If your world contains some cut nodes from any
other mod, and they have become unknown after
you upgraded of X-Decor-libre, this mod is for you.
Please note that this aggressive automatic
adding of cut nodes is not guaranteed to give you
the best quality. Some nodes that you probably
do not want to be cut will be cuttable, some nodes
might look ugly in their cut form, especially
custom glass nodes. It is recommended you check your
logs for `[xdecor_autocut]` messages to see which
nodes have been made cuttable.
However, this mod should still be relatively safe to
use, because it now checks for naming collisions.
If it detects that any of the required node names
for cut nodes is taken, it will refuse to add any
cut node variants and print a message in the log.
### Note for modders
You can prevent any node from being having cut node
variants added to it by adding the group
`not_cuttable=1` to it.
## License
This mod is free software, distributed under the Modified
BSD License (see `LICENSE.txt`).
@@ -0,0 +1,22 @@
minetest.register_on_mods_loaded(function()
local nodes = {}
-- Iterate through all nodes, select nodes allowed to be cut
-- Only the regular, solid blocks without metas or explosivity can be cut
for nodename, def in pairs(minetest.registered_nodes) do
if xdecor.stairs_valid_def(def) then
if not xdecor.is_cut_registered(nodename) then
if xdecor.can_cut(nodename) then
table.insert(nodes, nodename)
else
-- Not all of the available node names are available
-- for X-Decor-libre to add: Skip this node
minetest.log("action", "[xdecor_autocut] Skipped adding cut nodes for "..nodename.." because at least one of the required nodenames is already taken")
end
end
end
end
for n=1, #nodes do
xdecor.register_cut(nodes[n])
minetest.log("action", "[xdecor_autocut] Registered cut nodes for: "..nodes[n])
end
end)
@@ -0,0 +1,3 @@
name = xdecor_autocut
description = Automatically add cut nodes variants for many nodes for X-Decor-libre’s workbench
depends = xdecor