Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

partial rewrite and major bugfix #191

Closed
wants to merge 68 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
c5ddb5f
nonfunctional checkpoint
fluxionary Jun 12, 2022
b293605
tweak github luacheck, which will still fail
fluxionary Jun 12, 2022
da7d0f9
moreblocks looks good, now stairsplus...
fluxionary Jun 12, 2022
9e68ca9
daily checkpoint, not much improved, stairsplus still completely nonf…
fluxionary Jun 13, 2022
5432898
... why was python part of the workflow?
fluxionary Jun 13, 2022
c63ff90
still trying to fix luacheck workflow
fluxionary Jun 13, 2022
604e006
luacheck...
fluxionary Jun 13, 2022
9465870
github luacheck workflow tweaks...
fluxionary Jun 13, 2022
687de31
checkpoint. stairsplus is done, excluding the circular saw, and testing
fluxionary Jun 13, 2022
b9eed16
functional, except saw, legacy, other compatability
fluxionary Jun 14, 2022
a2c8e2d
circular saw works now; still need to do compatabilit and testing
fluxionary Jun 14, 2022
38f610a
fix bug and luacheck
fluxionary Jun 14, 2022
92ce2e1
compatability and legacy mostly done. schema recipes are all messed u…
fluxionary Jun 15, 2022
039b75c
fix luacheck
fluxionary Jun 15, 2022
03b189e
fix workflow
fluxionary Jun 15, 2022
acc6e2e
fix some bugs, starting to track down all the compatability issues
fluxionary Jun 16, 2022
21d4fab
start to take care of loose ends
fluxionary Jun 17, 2022
21f36e6
fix a bunch of bugs. still need to do more work on the station/circul…
fluxionary Jun 17, 2022
7f3710d
add another legacy drawtype
fluxionary Jun 17, 2022
53a50fc
fix eighths
fluxionary Jun 17, 2022
23f7446
almost done, mostly documentation left
fluxionary Jun 18, 2022
0f9e1a9
hm. looks like i need to update my local luacheck..
fluxionary Jun 18, 2022
31f7d56
screenshots...
fluxionary Jun 18, 2022
5990d7c
invsaw
fluxionary Jun 19, 2022
9a61799
remove dead code, fix luacheck
fluxionary Jun 19, 2022
56e709e
use the screenshot from the CDB
fluxionary Jun 19, 2022
e8324f5
tweak some things
fluxionary Jun 20, 2022
43dc840
add screenshot of circular saw interface
fluxionary Jun 20, 2022
b6d2bc0
tweak screenshot 3
fluxionary Jun 20, 2022
1437786
documentation, bugfixes
fluxionary Jun 20, 2022
08163f3
fix translations
fluxionary Jun 20, 2022
55f5619
remove todo
fluxionary Jun 20, 2022
ab4afd5
reduce log spam
fluxionary Jun 21, 2022
21a374b
stairsplus: disallow overriding drawtype by default
fluxionary Jun 21, 2022
2163a39
bugfixes for legacy stairsplus support
fluxionary Jun 21, 2022
feb177d
support more legacy api
fluxionary Jun 21, 2022
59b36fc
allow putting items in node/microblock slots, in some situations
fluxionary Jun 22, 2022
2774e54
hack to force Node label to display
fluxionary Jun 22, 2022
604697d
more stuff for compatibility w/ weird old setups
fluxionary Jun 24, 2022
07070eb
add some more group awareness
fluxionary Jun 24, 2022
c579543
awareness of mineclone groups
fluxionary Jun 24, 2022
e6f58c3
make stairs look like they normally do
fluxionary Jun 26, 2022
75969eb
paranoid bugfixing
fluxionary Jun 27, 2022
9cc83ce
make compatability stuff less complicated
fluxionary Jun 27, 2022
b2217af
more recipe schemata
fluxionary Jun 27, 2022
7a50224
fix crafts for shapes
fluxionary Jun 27, 2022
3c4a386
fix mineclone incompatabilities
fluxionary Jul 1, 2022
0156ced
fix i18n error
fluxionary Jul 20, 2022
488f949
re-enable pre-commit checks (was disabled unknowingly)
fluxionary Jul 22, 2022
f373ae5
tweak inline documentation for unified_inventory integration
fluxionary Jul 23, 2022
f7f6c79
correctly inherit sounds from original node def
fluxionary Jul 25, 2022
2c7977f
handle legacy drop definitions correctly
fluxionary Aug 8, 2022
40dcd14
override overlay_tiles correctly
fluxionary Aug 8, 2022
5ae6dfe
add option to re-enable legacy recipe changes
fluxionary Aug 22, 2022
e70423f
fix github build
fluxionary Aug 22, 2022
1698c23
make use of i3's "compression" feature
fluxionary Sep 2, 2022
635f0af
remove registering craft schemata w/ inventory managers, as it doesn'…
fluxionary Sep 16, 2022
7414e27
add option to disable crafting schemata
fluxionary Sep 22, 2022
6e16c54
register new node schema recipes when nodes, recipes, or shapes are a…
fluxionary Sep 22, 2022
16c72b1
stairsplus.in_craft_guide config defaults to true now
fluxionary Sep 22, 2022
b342247
disallow putting stacks w/metadata into stations (currently, metadata…
fluxionary Sep 23, 2022
192554a
remove stairs crafting recipes if crafting schemata are disabled
fluxionary Oct 1, 2022
d844a5f
give a more informative error when trying to register stairs for an u…
fluxionary Dec 9, 2022
53ac0b8
create proper stairs mod replacement; create option to allow register…
fluxionary Dec 9, 2022
71ab77f
actually load settings
fluxionary Dec 9, 2022
9aaa6d4
luacheck: flesh out all global namespace
fluxionary Dec 10, 2022
c900c6c
actually, we do need default for the 'wood sound' for the circular saw
fluxionary Dec 10, 2022
8a5a4ea
remove i3's assumtpion that it controls moreblocks compression groups
fluxionary Dec 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .editorconfig
@@ -1,3 +1,5 @@
# See https://editorconfig.org/

root = true

[*]
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/build.yml
Expand Up @@ -9,16 +9,17 @@ jobs:
- uses: actions/checkout@master
- uses: actions/setup-python@master

- run: |
sudo apt-get update -qq
sudo apt-get install -qqq luarocks
- name: Install pre-commit
run: pip3 install pre-commit
Calinou marked this conversation as resolved.
Show resolved Hide resolved

- name: Install LuaCheck
- name: install luarocks
run: sudo apt-get install -qq luarocks

- name: install luacheck via luarocks
run: luarocks install --local luacheck

- name: Run LuaCheck using pre-commit
run: |
pre-commit run --all-files
$HOME/.luarocks/bin/luacheck .
- name: add luacheck path
run: echo "$HOME/.luarocks/bin" >> $GITHUB_PATH

- name: Run pre-commit
run: pre-commit run --all-files
34 changes: 0 additions & 34 deletions .luacheckrc

This file was deleted.

41 changes: 40 additions & 1 deletion .pre-commit-config.yaml
Expand Up @@ -7,4 +7,43 @@ repos:
- id: trailing-whitespace

- id: mixed-line-ending
args: [--fix=lf]
args: [ --fix=lf ]

- repo: local
hooks:
- id: luacheck_invsaw
name: luacheck_invsaw
language: system
entry: luacheck
pass_filenames: false
args: [--config,./invsaw/.luacheckrc,-q,./invsaw]
- id: luacheck_moreblocks
name: luacheck_moreblocks
language: system
entry: luacheck
pass_filenames: false
args: [--config,./moreblocks/.luacheckrc,-q,./moreblocks]
- id: luacheck_moreblocks_legacy_recipes
name: luacheck_moreblocks_legacy_recipes
language: system
entry: luacheck
pass_filenames: false
args: [--config,./moreblocks_legacy_recipes/.luacheckrc,-q,./moreblocks_legacy_recipes]
- id: luacheck_stairs
name: luacheck_stairs
language: system
entry: luacheck
pass_filenames: false
args: [--config,./stairs/.luacheckrc,-q,./stairs]
- id: luacheck_stairsplus
name: luacheck_stairsplus
language: system
entry: luacheck
pass_filenames: false
args: [--config,./stairsplus/.luacheckrc,-q,./stairsplus]
- id: luacheck_stairsplus_legacy
name: luacheck_stairsplus_legacy
language: system
entry: luacheck
pass_filenames: false
args: [--config,./stairsplus_legacy/.luacheckrc,-q,./stairsplus_legacy]
41 changes: 40 additions & 1 deletion CHANGELOG.md
Expand Up @@ -7,6 +7,37 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [3.0.0] - 2022-06-11

### Changed

- turned into a modpack (i.e. properly separated moreblocks and stairsplus)
- refactored and rewrote a ton of stuff
- got rid of some dead code (e.g. "ownership.lua")
- parameterized resources (sounds, textures, craft materials) to make it easier to integrate w/ other minetest "games"
- actually implement luachecking - stop ignoring problems
- fix some unreported bugs (e.g. dependencies which weren't declared, unused code)
- i'm rewriting large parts of the mod and creating a saner API, i'm bumping the version
- \[moreblocks] more API for creating node variants, e.g. trap nodes, all_faces, shapes
- \[stairsplus] create a default-on "legacy" mode to allow new servers to not commit to creating so many useless nodes and shapes by default

### Fixed

- [stairsplus:register_custom_subset computes the wrong "cost" for elements](https://github.com/minetest-mods/moreblocks/issues/190)
- [Material disappears from Recycle output slot](https://github.com/minetest-mods/moreblocks/issues/189)
- [Would it be possible to port to mineclone?](https://github.com/minetest-mods/moreblocks/issues/188) - no plan to
actually make moreblocks mineclone-aware, but laid the groundwork to make this very easy.
- [Minor issue causing warnings in MT 5.5.0 with texture alpha clipping](https://github.com/minetest-mods/moreblocks/issues/187)
- maybe: [world aligned textures](https://github.com/minetest-mods/moreblocks/issues/179)
- maybe: [Make microblocks work for nodes with layered textures](https://github.com/minetest-mods/moreblocks/issues/178)
- [Make variants of nodes that can burn also burnable](https://github.com/minetest-mods/moreblocks/issues/177)
- [Add screenshot in README.md](https://github.com/minetest-mods/moreblocks/issues/151)
- [Slab back to full block](https://github.com/minetest-mods/moreblocks/issues/112)
- [Conserve left-over microblocks](https://github.com/minetest-mods/moreblocks/pull/108)
- maybe some of the other bugs/PRS, but they mostly either seem to be fixed or unfixable

\* not yet fixed, but planned

## [2.2.0] - 2021-06-28

### Changed
Expand Down Expand Up @@ -133,10 +164,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

- Initial versioned release.

[Unreleased]: https://github.com/minetest-mods/moreblocks/compare/v2.2.0...HEAD
[Unreleased]: https://github.com/minetest-mods/moreblocks/compare/v3.0.0...HEAD

[3.0.0]: https://github.com/minetest-mods/moreblocks/compare/v2.2.0...v3.0.0

[2.2.0]: https://github.com/minetest-mods/moreblocks/compare/v2.1.0...v2.2.0

[2.1.0]: https://github.com/minetest-mods/moreblocks/compare/v2.0.0...v2.1.0

[2.0.0]: https://github.com/minetest-mods/moreblocks/compare/v1.3.0...v2.0.0

[1.3.0]: https://github.com/minetest-mods/moreblocks/compare/v1.2.0...v1.3.0

[1.2.0]: https://github.com/minetest-mods/moreblocks/compare/v1.1.0...v1.2.0

[1.1.0]: https://github.com/minetest-mods/moreblocks/compare/v1.0.0...v1.1.0
13 changes: 9 additions & 4 deletions LICENSE.md
Expand Up @@ -2,12 +2,17 @@

Copyright © 2011-2020 Hugo Locurcio and contributors

**This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.**
**This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held
liable for any damages arising from the use of this software.**

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it
and redistribute it freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If
you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not
required.

2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original
software.

3. This notice may not be removed or altered from any source distribution.
125 changes: 81 additions & 44 deletions README.md
Expand Up @@ -3,73 +3,110 @@
More Blocks for [Minetest](https://www.minetest.net/), a free and open source infinite
world block sandbox game.

[**Forum topic**](https://forum.minetest.net/viewtopic.php?f=11&t=509)
![Screenshot](https://github.com/fluxionary/minetest-moreblocks/raw/bugfixes/screenshot.png)

## Installation
Stairsplus adds a large variety of new shapes for registered nodes:

### Download the mod
![Screenshot](https://github.com/fluxionary/minetest-moreblocks/raw/bugfixes/screenshot2.png)

To install More Blocks, clone this Git repository into your Minetest's `mods/`
directory:
![Screenshot](https://github.com/fluxionary/minetest-moreblocks/raw/bugfixes/screenshot3.png)

```bash
git clone https://github.com/minetest-mods/moreblocks.git
```
[Forum topic](https://forum.minetest.net/viewtopic.php?f=11&t=509)

You can also
[download a ZIP archive](https://github.com/minetest-mods/moreblocks/archive/master.zip)
of More Blocks.
[Content DB entry](https://content.minetest.net/packages/Calinou/moreblocks/)

### Enable the mod
[Source repo](https://github.com/minetest-mods/moreblocks/)

Once you have installed More Blocks, you need to enable it in Minetest.
The procedure is as follows:
# Mods in the pack

#### Using the client's main menu
## moreblocks

This is the easiest way to enable More Blocks when playing in singleplayer
(or on a server hosted from a client).
Defines a bunch of new kinds of nodes. Provides an API for creating variants of some nodes.

1. Start Minetest and switch to the **Local Game** tab.
2. Select the world you want to enable More Blocks in.
3. Click **Configure**, then enable `moreblocks` by double-clicking it
(or ticking the **Enabled** checkbox).
4. Save the changes, then start a game on the world you enabled More Blocks on.
5. More Blocks should now be running on your world.
## stairsplus

#### Using a text editor
Allows the creation of 49 new shapes for registered nodes.

This is the recommended way to enable the mod on a server without using a GUI.
## stairsplus_legacy

1. Make sure Minetest is not currently running (otherwise, it will overwrite
the changes when exiting).
2. Open the world's `world.mt` file using a text editor.
3. Add the following line at the end of the file:
Stairsplus registrations for various mods which were formerly done automatically as part of moreblocks.

```text
load_mod_moreblocks = true
```
## invsaw

If the line is already present in the file, then replace `false` with `true`
on that line.
Adds a button in unified_inventory that allows you to use the circular saw interface if you are
playing creatively, or have a circular saw item in your inventory and have the right priv
(`interact`, by default).

4. Save the file, then start a game on the world you enabled More Blocks on.
5. More Blocks should now be running on your world.
Invsaw was taken from [cheapie's invsaw mod](https://forum.minetest.net/viewtopic.php?t=14736), which
itself borrowed heavily from an older version of this mod. Flux decided to just add it here because it
needed to be fully rewritten to be compatible w/ their modifications to the stairsplus API.

## Version compatibility
# Documentation

More Blocks is currently primarily tested with Minetest 5.3.0.
It may or may not work with newer or older versions. Issues arising in older
versions than 5.0.0 will generally not be fixed.
## For players

## License
Use of a decent inventory manager (e.g.
[unified_inventory](https://content.minetest.net/packages/RealBadAngel/unified_inventory/) or
[i3](https://content.minetest.net/packages/jp/i3/)) will help you figure out how to craft various nodes.

Copyright © 2011-2020 Hugo Locurcio and contributors
## For admins

### Minetest Version compatibility

More Blocks is currently primarily tested with Minetest 5.5.0+. It may or may not work with newer or
older versions. Issues arising in older versions will generally not be fixed.

### Legacy mode

The 3.0.0 release of moreblocks introduces a "legacy" mode, which is on by default, and is meant to
allow new servers to not commit to creating as many nodes as older versions, while not breaking anything
on existing servers. See `settingtypes.txt` for available settings.

By defaulthe 3.0.0 release disables certain recipe overrides that were part of moreblocks 2.*. To re-enable
them, set `moreblocks_legacy_recipes.enabled = true`.

### Settings

See `settingtypes.txt` for available settings.

### Dependencies

Moreblocks and stairsplus do not have hard dependencies on other mods. Invsaw depends on `unified_inventory`
and stairsplus.

### Compatability

Moreblocks currently supports resources from a number of mods and minetest_game. Without these installed,
some things may not be craftable, may have low-quality textures, or may not have "node sounds" registered.
If available, resources will be used from `bucket`, `default`, `rhotator`, `screwdriver`, and `vessels`.

If the `stairsplus_legacy` mod is enabled, stairsplus nodes will automatically be registered for the following
mods, if they are available: `basic_materials`, `default`, `farming`, `gloopblocks`, `prefab`, `technic`,
and `wool`.

## For mod makers

See moreblocks/API.md and stairsplus/API.md.

# License

## moreblocks, stairsplus, stairsplus legacy
Copyright © 2011-2022 Hugo Locurcio and contributors

- More Blocks code is licensed under the zlib license, see
[`LICENSE.md`](LICENSE.md) for details.
- This is an altered version of the code which is not distributed by Hugo Locurcio.

- Unless otherwise specified, More Blocks textures are licensed under
[CC BY-SA 3.0 Unported](https://creativecommons.org/licenses/by-sa/3.0/).
- `moreblocks_copperpatina.png` was created by pithydon, and is licensed under
[CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/).
- `stairsplus_saw_button.png` CC BY-SA 3.0 Unported

## invsaw

`moreblocks_copperpatina.png` was created by pithydon, and is licensed under
[CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/).
Copyright © ?-2022 cheapie and contributors

- invsaw code is licensed under the zlib license, see
[`LICENSE.md`](LICENSE.md) for details.
- This is an altered version of the code which is not distributed by cheapie.