Compare commits

..

146 Commits

Author SHA1 Message Date
z-op
7f02b444dc
Add place_rotated mod support (#208)
Co-authored-by: Evgeniy <evgenuel@gmail.com>
2025-04-17 14:38:56 +02:00
The4codeblocks
768225a990
Conserve left-over microblocks (#207) 2025-04-16 16:37:25 +02:00
j-r
20689b1f18
Don't remove detail tile from glasslike nodes after registration (#206) 2025-03-19 17:29:42 +01:00
TarasArt
77c4ebb7ab
Add Ukrainian localization (#205) 2025-03-15 19:04:34 +01:00
Luke aka SwissalpS
54b2217aeb
Make circular saw and all cut nodes considered as non-ground content (#204)
Default to not being ground content.
The few nodes that were registered as ground content shouldn't be considered ground content.

* cut nodes aren't ground content

By default make cut nodes non ground content but allow mods to register theirs as ground content if they want to.
2024-02-27 20:24:51 +01:00
David Leal
79a0c76d40
Fix LuaCheck warning (#198) 2023-07-18 01:10:18 +02:00
The4codeblocks
ee42eeee8d
Make compressed nodes compatible with compression_api (#196) 2023-07-13 17:38:48 +02:00
Jose Anastacio
d70ac4b289
Add portuguese Brazilian language (#193) 2022-12-24 21:44:41 +01:00
CarlosBarrazaE
dce587cf33
Merge and update translations (#186) 2021-11-14 02:14:19 +01:00
Hugo Locurcio
fe34e3f3cd
Fix typo in one of the cactus checker crafting recipes
This typo didn't affect the actual function of the crafting recipe
since `moreblocks:cactuschecker` is aliased to
`moreblocks:cactus_checker`.

This closes #185.
2021-11-01 17:33:38 +01:00
afkplayer5000
f8a7d66403
Fix circular saw item duplication bug (#173) 2021-08-29 08:23:47 +02:00
Buckaroo Banzai
e8d219f108
Optional dependency on default mod (#182) 2021-08-26 20:46:07 +02:00
Hugo Locurcio
1f1959ba54
Bump to version 2.2.0 2021-06-29 00:41:22 +02:00
sys4-fr
3b97ea5697
Fix deprecated use of use_texture_alpha (#180)
Co-authored-by: sys4 <bricassa@sys4.fr>
2021-03-20 00:19:35 +01:00
Hugo Locurcio
bcd1a5688b
Update the changelog with recent fixes 2021-02-26 12:06:41 +01:00
Oblomov
1a03b041dd
Handle shapeless recipes in redefinitions (#171)
They can be recognized from having width == 0, and don't need the items
list to be massaged to be transformed into the recipe field for the Lua
API.
2021-02-26 12:04:45 +01:00
Tin Švagelj
b39bb31295
Resolve aliases in cost calculation (#175)
If stairs from stairs mod were crafted before moreblocks was enabled, the old (now aliased) stairs variant is kept in inventory. If the player tried to recycle that stair variant, `inv:contains_item("output", stackname)` would return true as `contains_item` resolves alias names, but `circular_saw:get_cost` would return nil as it's expecting exact `stackname` matches which would later crash due to nil arithmetic.

This PR fixes this issue by resolving alias using `minetest.registered_aliases` table.
`circular_saw:get_cost` should work now in every scenario where `inv:contains_item("output", stackname)` returns true.
2021-02-10 17:52:55 +01:00
Oblomov
ddf8b39f5a
Realign the rail craft recipes (#169)
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2020-12-30 22:55:52 +01:00
Oblomov
ff7e85094f
Fix strange placement behavior for non-default Stairs+ nodes (#168)
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2020-12-28 03:27:58 +01:00
Jat15
0c2c3ad4ef
Add in prepare_groups tree and wool (#128)
Tree for glitch with furnace
Wool  move for more coherence
2020-12-27 19:42:15 +01:00
Oblomov
8a14250127
Fix stairs placement over oddly-shaped nodes (#166) 2020-12-18 17:59:57 +01:00
Hugo Locurcio
cf0f875709
Bump to version 2.1.0 2020-12-14 14:52:04 +01:00
Hugo Locurcio
c3b45149b0
Update the changelog with recent fixes 2020-12-14 14:50:02 +01:00
Oblomov
ab91ad967a
Improve the placement logic for slabs, etc (#160)
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2020-12-14 14:46:50 +01:00
Oblomov
5aacb05b14
Add Clean (Super) Glow Glass and traps (#159) 2020-12-14 14:44:21 +01:00
Oblomov
87e27d9f20
Refresh built-in crafting recipe overrides (#161) 2020-12-14 14:38:16 +01:00
Hugo Locurcio
26ca7af997
Update pre-commit hooks to version 3.3.0 2020-10-28 16:41:16 +01:00
David Leal
3cfff98fc9
Replace Travis CI with GitHub Actions (#158)
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2020-10-02 11:21:10 +02:00
SmallJoker
b67028a417 Fix use_texture_alpha warnings since 5.4.0-dev 2020-08-16 10:14:18 +02:00
IFRFSX
c081caf494
Add Chinese Translation (#153) 2020-08-01 20:21:55 +02:00
OgelGames
f8314c322e
Add compressed desert cobblestone (#156)
Desert cobblestone can be obtained in large quantities from deserts, so makes sense to add a compressed node.
2020-06-07 14:25:19 +02:00
Hugo Locurcio
8e6f339313
Declare the minimum supported Minetest version to 5.0.0
This information can be used by ContentDB.
2020-06-03 18:52:38 +02:00
Hugo Locurcio
6f9b787f3e
Improve the stairsplus_in_creative_inventory setting description 2020-03-24 22:03:51 +01:00
Hugo Locurcio
bbfd782300
Remove legacy Stairs+ conversion code
It was only required to import worlds last edited before Q3 2013.
2020-01-03 11:34:13 +01:00
Hugo Locurcio
6595ebc78d
Remove obsolete notice about renaming the extracted mod folder
This is no longer required thanks to `mod.conf`.
2020-01-01 17:54:58 +01:00
Hugo Locurcio
917a46014f
Update copyright statements to 2020 2020-01-01 04:09:24 +01:00
Hugo Locurcio
325999f848
Bump to version 2.0.0 2019-11-25 13:43:10 +01:00
Hugo Locurcio
5cab63c675
Add ice as a Stairs+ node
This closes #109.
2019-10-17 22:25:44 +02:00
Hugo Locurcio
8019f9f309
Update pre-commit hooks to 2.3.0 2019-09-25 23:07:07 +02:00
Hugo Locurcio
873019176b
Document the Minetest 5.0.0 version requirement 2019-09-08 22:56:32 +02:00
Hugo Locurcio
b934d8ad4d
Travis CI: Use the bionic distribution 2019-07-29 00:38:26 +02:00
Hugo Locurcio
719494b6c4
Optimize PNG images losslessly
Commands used:

- `parallel optipng -o7 -zm1-9 -strip all ::: **/*.png`
- `parallel advpng -z4 -i5000 ::: **/*.png`
2019-06-19 21:19:39 +02:00
Hugo Locurcio
8b10e0721e
Fix a placeholder in the Polish translation
This closes #143.
2019-06-15 18:16:15 +02:00
Hugo Locurcio
b2f1163dad
changelog: Put the supported version at the top of the Changed section
This makes it easier to notice.
2019-05-22 11:33:15 +02:00
Hugo Locurcio
f421c67372
Fix Centered Wooden Tile crafting
This closes #145.
2019-05-22 09:39:06 +02:00
Hugo Locurcio
72a6ee6032
Make Stairs+ nodes emit slightly less light compared to full nodes
This makes up for their smaller visual size.
2019-05-08 20:00:57 +02:00
Hugo Locurcio
f7ff9644c9
Add description and dependencies to mod.conf
The legacy `depends.txt` and `description.txt` files are no longer
needed since Minetest 5.0.0 or later will read everything from
`mod.conf`.

This raises the minimum supported Minetest version to 5.0.0.
2019-04-21 17:03:15 +02:00
Hugo Locurcio
e09d2fab01
Fix several typos in comments 2019-04-21 16:57:42 +02:00
Hugo Locurcio
c30366d2dc
Add settingtypes.txt to allow configuring settings in the main menu 2019-04-21 16:56:16 +02:00
Hugo Locurcio
b3d0f0d179
Remove the optional mod loading message 2019-04-03 00:19:18 +02:00
Hugo Locurcio
835aa95f35
Update changelog for the new Polish translation 2019-04-01 11:00:55 +02:00
mat9117
e8293c4994 Polish translation (#142) 2019-04-01 10:59:16 +02:00
Hugo Locurcio
d96f110821
Bump to version 1.3.0 2019-03-23 15:20:46 +01:00
Hugo Locurcio
1d054ec431
Fix circular saw infotext message on initial placement
The concatenation operator was mistakenly written as `.`
instead of `..`.
2019-03-20 21:38:28 +01:00
codexp
0fea5ee25a
Update the changelog to mention intllib changes 2019-03-20 21:31:21 +01:00
codexp
2b047f19fd
Use translated description of material 2019-03-20 21:31:17 +01:00
codexp
e6740678f6
Remove parentheses from "owned by" translation 2019-03-20 21:31:12 +01:00
codexp
fa43215cd6
Add Stairs+ translations 2019-03-20 21:31:05 +01:00
codexp
2057441dc2
Escape formspec variables 2019-03-20 21:31:00 +01:00
codexp
8e8078e74b
Refactor common.lua to simplify code and make locale strings searchable 2019-03-20 21:30:35 +01:00
codexp
83f419101c
Improve German translation 2019-03-20 21:30:29 +01:00
codexp
e2e2af94cc
Fix forgotten variable 2019-03-20 21:30:25 +01:00
codexp
e9fbdec948
Add Russian translation 2019-03-20 21:30:20 +01:00
codexp
cf9f7995a0
Extend German translation 2019-03-20 21:30:15 +01:00
codexp
8d048f1b14
Refactor Italian locale for last two commits 2019-03-20 21:30:09 +01:00
codexp
d23dc27acf
Refactor deprecated locale strings 2019-03-20 21:30:05 +01:00
codexp
c7f80ce960
Refactor Lua format in locales 2019-03-20 21:29:59 +01:00
codexp
4605ed7848
Convert all locales to gettext .po format 2019-03-20 21:29:52 +01:00
Hugo Locurcio
774c4043aa
Display Stairs+ nodes in the creative inventory by default
This closes #125.
2019-03-20 20:27:07 +01:00
Hugo Locurcio
1aa93322c6
Save the French locale file as UTF-8
It was previously saved as ISO 8859-1, causing display issues
in editors.

This closes #76.
2019-03-20 20:11:49 +01:00
Hugo Locurcio
936306803b
Set up Travis CI 2019-03-09 01:59:19 +01:00
Hugo Locurcio
e622c692e1
Make some Stairs+ functions local and add Luacheck ignores
Those functions are used in various places in the mod,
so they aren't unused.
2019-03-09 01:58:51 +01:00
Hugo Locurcio
7dd3e1f0db
Improve writing style in the changelog 2019-03-03 23:17:10 +01:00
Hugo Locurcio
76a00a5365
Update intllib support to avoid using deprecated functions 2019-03-03 20:02:40 +01:00
Hugo Locurcio
e43e4a1911
Improve wording in README 2019-03-02 18:17:10 +01:00
Hugo Locurcio
555c8ad9d0
Update pre-commit hooks to 2.1.0 2019-03-01 15:29:45 +01:00
Hugo Locurcio
eacee7831a
Enforce LF line endings in pre-commit hooks 2019-03-01 14:30:32 +01:00
Hugo Locurcio
0e885283c0
Update copyright statements to 2019 2019-02-25 12:13:55 +01:00
fozolo
a0ca02f5f4 Improve cut glass edge texture. (#115)
Also preserves connected_glass feature.
2019-02-25 11:20:35 +01:00
Hugo Locurcio
b0cb1d325a
Fix Stairs+ node rotation on placement
This closes #123.
2019-02-25 10:47:51 +01:00
JDiaz
b6f6bc8c71 Activate translation for stairplus descriptions 2019-02-25 10:30:24 +01:00
JDiaz
9ccf94243e Updated es.txt 2019-02-25 10:30:24 +01:00
Hugo Locurcio
a7b513f181
Set EditorConfig to use tabs in .luacheckrc 2019-02-22 00:48:36 +01:00
Hugo Locurcio
2062702295
Add an EditorConfig file
See https://editorconfig.org/ for more information.
2019-02-21 23:13:02 +01:00
Hugo Locurcio
95155a3bc6
Add pre-commit hooks
See https://pre-commit.com/ for more information.
2019-02-21 23:10:58 +01:00
Hugo Locurcio
1649f91156
Tweak the Luacheck configuration file and fix many warnings 2019-02-20 23:39:01 +01:00
Hugo Locurcio
daec458fc6
Optimize all images using oxipng -Zs 2019-02-20 20:00:19 +01:00
Hugo Locurcio
df4a2ace0b
Optimize all images using oxipng -Zs 2019-02-20 19:52:10 +01:00
Hugo Locurcio
9d953ccebf
Bump to version v1.2.0 2018-11-24 17:39:42 +01:00
Hugo Locurcio
26f59baba0
Update copyright year range for 2018 2018-11-24 17:36:04 +01:00
Hugo Locurcio
0ace9fe493
Update the changelog to reflect recent commits 2018-11-24 17:34:55 +01:00
Vanessa Dannenberg
ca45478761 brass block stairs/slabs/etc (#135) 2018-11-24 17:27:16 +01:00
Vanessa Dannenberg
1482a7810f make stairs from cement too. 2018-11-24 17:06:16 +01:00
Vanessa Dannenberg
01ec8290f6 basic_materials stairs/slopes/et. al
(keeping original technic item names)
2018-11-24 17:06:16 +01:00
tenplus1
723db44933 Make wood_tile_center craftable (#129)
place wood_tile_center craft recipe before wood_tile so that it's craftable, otherwise crafting a wood_tile_center gives a normal wood_tile since they all belong to group:wood.
2018-10-05 19:46:55 +02:00
WoosterUK
5fc5fce74e Fix double definition of paper from papyrus (#124) 2018-07-27 12:11:05 +02:00
fozolo
846214993f Add aliases for MTG corner stairs (#117) 2018-07-19 19:24:30 +02:00
Hugo Locurcio
10dd84a7f1
Remove brackets around the initial version number in the changelog 2018-04-22 00:14:17 +02:00
Thomas--S
8ff1cb598f Update documentation 2018-03-26 19:09:44 +02:00
Thomas--S
7d701da5b9 Move recipe definitions to a separate file and function. 2018-03-26 19:09:44 +02:00
Thomas--S
d5edcb2a10 Add a register_custom_subset function 2018-03-26 19:09:44 +02:00
Thomas--S
c711946453 Move node registrations to a separate file 2018-03-26 19:09:44 +02:00
Thomas--S
4d2a7ab6fe Move definitions to a separate file
Make definitions table global
Replace stairsplus.copytable() function with table.copy()
2018-03-26 19:09:44 +02:00
Jat15
832b8f8817 Craft Circle Stone Brick and Stone tile (#82)
* Craft Circle Stone Brick and Stone tile

Craft Circle Stone Brick was similar furnace.
Stone Tile is more similar with stone block.

* Modify Circle Stone Brick

* Modify craft Stone Tile
2018-02-17 12:08:08 -08:00
Foz
f6e0db21b2 Finish aliasing split_stone_tile_alt
to checker_stone_tile.
2017-12-31 12:51:25 -08:00
Foz
413054fd2f Handle wood_tile replacement more carefully.
- An LBM is added to handle replacements of wood_tiles on the map while preserving there rotation about the +y (vertical) axis.  This will preserve existing floor patterns.  Unfortunately, due to the preexisting side tile orientations, preserving wall patterns is not possible while also reducing the wood_tiles down to just one node.

 - Deprecate the no longer used wood_tiles (wood_tile_right, wood_tile_left, wood_tile_down, and wood_tile_flipped), and add recipes to convert them.

 - Rename wood_tile_up to wood_tile_offset.

Closes #101
2017-12-29 22:08:38 -08:00
Foz
652d431664 Remove commented code and unused textures. 2017-12-29 16:22:50 -08:00
Foz
cc7e1271be Revert "Undo adding glass detail, but leave the colorizing"
This reverts commit 281268e7bc991a46b0d609d2ae5290aec12833d1.

The commit needs to be reverted because it prevents connected glass.
2017-12-29 16:22:50 -08:00
Foz
e6b5336bad Readd tar block. Fixes #103
The proper way to resolve the redundancy between `building_blocks:Tar` and `moreblocks:tar` is with an alias in building_blocks as noted in issue #68.

The recipe conflict with streetsmod has been resolved by using `default:pine_tree` in place of `default:gravel`.  This may also be more realistic than gravel as a source of tar because pine derived tar was once of major economic importance.
2017-12-29 16:22:09 -08:00
Foz
3f7edb39a1 Adjust shelf recipies.
- The math of returning glass framents will never work when cleaning a shelf because we would need to return 1.5 fragments so just return glass bottles instead.

 - Removed the recipe for a vessels:shelf from group:vessels because it doesn't make sense to return glass bottles if, for example, the shelf was crafted from steel bottles.
2017-12-28 22:17:42 -08:00
Foz
64eade096e Fix typo. 2017-12-28 22:17:42 -08:00
Foz
2b76b077f0 Drop paramtype2 from glass before registering.
Fix minetest-mods/moreblocks#98

Caused by cf1b054a998a67b06e97c2e022537bf8516abdfb, 6a996eb86ae447a156bcae53a1b23b62ca5d5bb9 and minetest/minetest_game@2f46103ff8.

For some unknown reason `default:glass` and `obsidian:glass` have `paramtype2 = "glasslikeliquidlevel"`.  After the refactor of `stairsplus/registrations.lua`, all of the source node's defs are passed along to `stairsplus:register_all()`.  Prior to cf1b054a998a67b06e97c2e022537bf8516abdfb the paramtype2 setting was discarded.
2017-12-28 20:00:14 -08:00
Foz
d91da8b442 Fix slab descriptions.
A regression caused the description of slabs to revert to the source block's description.  This commit fixes the regression and adds descriptions which were missing for the recently added slabs (two_sides, three_sides, and three_sides_u).

Closes minetest-mods/moreblocks#96
2017-12-28 19:59:38 -08:00
Foz
6f1ee946a0 Fix saw left-over naming bug.
The appended '_bottom' is left over from an older naming convention and relies
on an alias to avoid unknown nodes showing up in the saw's left-over bin.
2017-12-28 19:59:13 -08:00
Foz
9eb4926d8d Fix deprecated alias. 2017-12-28 19:58:46 -08:00
Richard Qian
281268e7bc Undo adding glass detail, but leave the colorizing 2017-12-28 19:56:57 -08:00
Richard Qian
350a5f49e7 Make trap-stones see-through when inside them 2017-12-28 19:56:57 -08:00
Richard Qian
0e2c30ec72 Change tiles for the glass
- Use colorization of the default glass texture

- Remove snappiness from compressed dirt

- Turn spaces into tabs for the first line of all-faces pine and aspen trees
2017-12-28 19:56:57 -08:00
Richard Qian
b7217dd1f7 Resync with upstream again 2017-12-28 19:56:57 -08:00
Richard Qian
a8a06d8deb Add compressed dirt, remove redundant tar
Tar already exists in building_blocks, and the recipe to cook it comes into conflict with what's in streetsmod, where gravel can be cooked into asphalt. However, the texture for it is retained in case it needs to be derived from again in the future.
Dirt can be collected in as much quanitites as cobblestone can be, so in place of tar is a way to pack dirt when so much of it is collected.
The compressed dirt shares most properities with the compressed cobble, except that can be dug by hand, but digging it takes as long as with gravel. Its texture is a recolor of this mod's tar block.
In addition, a function for dirt sound has been added, and compressed dirt makes use of it.
The new node is inspired in part by a counterpart on the Xanadu server, where there is also a counterpart to compressed cobble.
2017-12-28 19:56:57 -08:00
Richard Qian
4f9b05be4e Rename empty bookshelf to empty shelf
This to account for the fact that vessel shelves can now be used here. Additionally, really loop back to cobblestone in relationship to the stone tile and its variants.
2017-12-28 19:56:57 -08:00
Richard Qian
da652c16cd Even more node and craft changes
- Enable many nodes to be rotated by the screwdriver

- Reduce redundancy of the the wood tiles; use the screwdriver to achieve them

- Add extra crafts dealing with empty shelves

- Get rid of snappiness in all blocks; it's only useful for plants

- Loop between stone tile, its variants, and cobblestone
2017-12-28 19:56:57 -08:00
Richard Qian
1b78097ab7 Tweak more nodes, add a few new ones
- All blocks: is_ground_content = false

- New nodes: All-faces pine, acacia, and aspen trees

- Add most stones to the stone group
2017-12-28 19:56:57 -08:00
Richard Qian
dbba372137 Make many crafts more open with groups, remove redundant recipes 2017-12-28 19:56:57 -08:00
DS-Minetest
4c767ad7ff add stair and slab groups 2017-12-28 19:54:45 -08:00
Foz
780df105ea Stop assuming stair and slab aliases are required.
Only make aliases automatically for stairs and slabs from MTG stairs mod. Let other mods worry about aliasing themselves.  Fixes minetest-mods/moreblocks#45
2017-12-28 18:00:07 -08:00
Hugo Locurcio
8f6176f68c
Update CHANGELOG to acknowledge a bug fix 2017-12-19 23:47:00 +01:00
John Cole
6a996eb86a Refactor stairsplus registrations (#93)
* Refactor stairsplus registrations

 - Reorganize and remove redundant code.
 - Remove sunlight_propagates=true and default to paramtype="light".
    This causes cut blocks to have a shadow but not completely block light.
 - Fix several bugs (#90, #91, #92).

* Readd sunlight_propagates=true for compatibility.
2017-12-19 23:42:45 +01:00
Jat15
80d35c8215 Add listring for circular saw 2017-11-20 15:09:37 -08:00
Hugo Locurcio
65e3afdd8b
Update changelog to add the recently-merged bug fix 2017-11-20 23:13:16 +01:00
fishyWET
1fa4669ae8 Fix "replacement when inv is full" (#85)
* fix replacement when inv is full.

* Use allow_metadata_inventory_take instead
2017-11-20 23:09:27 +01:00
Hugo Locurcio
f2ede87a5a Fix the version comparison links in the changelog 2017-10-05 19:06:57 +02:00
Hugo Locurcio
16ae14f458 Prepare for v1.1.0 release
- Rewrite the README entirely with new installation instructions
- Tweak the styling in CONTRIBUTING.md and CHANGELOG.md
2017-10-04 20:43:50 +02:00
Hugo Locurcio
59c384dca4 Update the change log with new additions in More Blocks 2017-10-02 23:54:40 +02:00
Hugo Locurcio
df8c150c9a Add Sokomine to the copyright line of circular_saw.lua 2017-09-03 00:46:49 +02:00
AntumDeluge
7347b05e3e Replace deprecated methods:
- 'setting_get' with 'settings:get'
- 'setting_getbool' with 'settings:get_bool'
2017-08-12 14:08:24 -07:00
AntumDeluge
acd570ba0d Replace deprecated function 'intllib.Getter':
- Check first for 'intllib.make_gettext_pair', otherwise continue using
deprecated function
2017-08-12 14:08:04 -07:00
AntumDeluge
f3005d6367 Call 'global_exists' in place of 'get_modpath' for 'intllib' check 2017-08-12 14:08:04 -07:00
lemon-melon
fc3c5f4738 Support tin and silver/sandstone blocks (#79)
Allows tin blocks and silver/desert sandstone blocks to be used in the circular saw.
2017-08-12 14:07:33 -07:00
Fixer
fbfb079f54 Make wool sawable (#72)
* Make wool sawable

Based on my simple research https://github.com/minetest-mods/moreblocks/issues/71 enabling wool should not cause major slowdowns.

Code pasted from gloopblocks

* List wool as optional dependancy

* Added check for wool dependancy

* Make life easier for translators
2017-03-14 22:13:16 -07:00
Vanessa Ezekowitz
e9c6cef4dd build a list of all of the stairsplus slab/stair/etc... shapes (#70)
for other mods to reference.
2017-02-23 17:12:36 +01:00
Hugo Locurcio
5f35766ed0 Update change log with the new Stairs+ nodes 2017-02-23 17:10:49 +01:00
Vanessa Ezekowitz
f4b68fbfd7 add some 0.4.15 default nodes to table saw, including farming:straw (#69)
* add some 0.4.15 default nodes to table saw
including farming:straw

* fix hard-coded drop
2017-02-23 17:08:22 +01:00
Hugo Locurcio
6a1ffa7651 Update change log with the new circular saw nodes 2017-02-21 23:01:41 +01:00
Vanessa Ezekowitz
0569ff9683 add a few new shapes to the table saw: (#67)
* 1/16 slab, L-shaped (two sides)
* 1/16 slab, corner-shaped (three sides)
* 1/16 slab, U-shaped (three sides)
2017-02-21 22:58:40 +01:00
Hugo Locurcio
6f033c1695 Add a contribution guide 2017-02-20 18:37:22 +01:00
107 changed files with 3487 additions and 1818 deletions

13
.editorconfig Normal file
View File

@ -0,0 +1,13 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.{lua,luacheckrc}]
indent_style = tab
indent_size = 4

24
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,24 @@
name: build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- 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
- name: Install LuaCheck
run: luarocks install --local luacheck
- name: Run LuaCheck using pre-commit
run: |
pre-commit run --all-files
$HOME/.luarocks/bin/luacheck .

View File

@ -1,14 +1,35 @@
std = "lua51+minetest"
unused_args = false unused_args = false
allow_defined_top = true allow_defined_top = true
max_line_length = 999
read_globals = { stds.minetest = {
"DIR_DELIM", read_globals = {
"minetest", "core", "DIR_DELIM",
"dump", "minetest",
"vector", "nodeupdate", "core",
"VoxelManip", "VoxelArea", "dump",
"PseudoRandom", "ItemStack", "vector",
"intllib", "nodeupdate",
"default", "VoxelManip",
"VoxelArea",
"PseudoRandom",
"ItemStack",
"default",
table = {
fields = {
"copy",
},
},
}
} }
read_globals = {
"protector",
"isprotect",
"IsPlayerNodeOwner",
"HasOwner",
"getLastOwner",
"GetNodeOwnerName",
"place_rotated",
}

10
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,10 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.3.0
hooks:
- id: fix-byte-order-marker
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
args: [--fix=lf]

View File

@ -1,10 +1,142 @@
# Change Log # Changelog
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/). and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [1.0.0] - 2017-02-19 ## [Unreleased]
- Initial versioned release. ## [2.2.0] - 2021-06-28
### Changed
- Refactored recipe override mechanism to avoid re-coding recipes
when we only want to change the amount produced.
- [Realigned rail recipe to the changes made in Minetest Game.](https://github.com/minetest-mods/moreblocks/pull/169)
- All rail recipes (standard, power, break) were boosted by 50%.
### Fixed
- [Shapeless crafting recipes are now handled in redefinitions.](https://github.com/minetest-mods/moreblocks/pull/171)
- [Aliases are now resolved in Stairs+ circular saw cost calculation.](https://github.com/minetest-mods/moreblocks/pull/175)
- [Fixed strange placement behavior for non-default Stairs+ nodes.](https://github.com/minetest-mods/moreblocks/pull/168)
- [Fixed stairs placement over oddly-shaped nodes.](https://github.com/minetest-mods/moreblocks/pull/166)
## [2.1.0] - 2020-12-14
### Added
- Clean Glass versions of Trap and (Super) Glowing Glass.
- Compressed desert cobblestone.
### Changed
- Revised placing strategy that takes into account which side of the face
(top/bottom for horizontal, left/right for vertical placement) is being clicked.
Aux (sprint/special, default E) key can be used to place the node with the orientation
it would have if placed from the other side.
When placing nodes next to nodes of the same gategory (e.g.slab to slab) the other
node's orientation is copied, flipping it placing on top or below an upright or
upside-down node. In this case the aux key will disable the special processing of
same-category nodes.
### Fixed
- Revised minetest_game crafting recipe overrides to match Minetest 5.0.0 and later.
### Removed
- Legacy Stairs+ conversion code.
- It was only required to import worlds last edited before Q3 2013.
## [2.0.0] - 2019-11-25
### Added
- Stairs+ nodes for ice.
- `settingtypes.txt` file to allow configuring settings in the main menu.
- Polish translation.
### Changed
- The minimum supported Minetest version is now 5.0.0.
- Stairs+ nodes now emit one light level less compared to full nodes to make up
for their smaller visual size.
### Fixed
- Fixed a recipe conflict that made Centered Wooden Tiles impossible to craft.
## [1.3.0] - 2019-03-23
### Changed
- Stairs+ are now displayed in the creative inventory by default.
- Localization files now use the gettext `.po` format.
- Updated intllib support to avoid using deprecated functions.
### Fixed
- Node rotation now works correctly when placing Stairs+ nodes.
- Stairs+ glasslike nodes' textures are now easier to see.
## [1.2.0] - 2018-11-24
### Added
- Stairs+ nodes for `basic_materials`'s concrete, cement and brass blocks.
- Listring add for circular saw.
- **Stairs+:** New API function
`stairsplus:register_custom_subset(subset, modname, subname, recipeitem, fields)`.
### Fixed
- The papyrus crafting recipe override is now properly applied over the
`default` mod's recipe.
- Centered wooden tiles are now craftable.
- Wool Stairs+ nodes can no longer be used in crafting.
- The circular saw can no longer replace items from the player's inventory
when it is full.
### Changed
- New crafting recipes for:
- Stone Tile
- Circle Stone Bricks
- Stairs+:
- Moved definitions to `stairsplus.defs` table into a separate file.
- Moved recipe definitions to `stairsplus.register_recipes` function
into a separate file.
## [1.1.0] - 2017-10-04
### Added
- 3 new node shapes in the circular saw (thin slabs, available in
"L-shaped", "corner-shaped" and "U-shaped" variations), all with 1/16
thickness.
- New Stairs+ nodes:
- Coral Skeleton
- Desert Sandstone, Silver Sandstone
- Desert Sandstone Brick, Silver Sandstone Brick
- Desert Sandstone Block, Silver Sandstone Block
- Obsidian Block
- Sandstone Block
- Stone Block, Desert Stone Block
- Straw
- Tin Block
- Wool (all colors)
- Other mods can now get a list of all the defined Stairs+ shapes.
## 1.0.0 - 2017-02-19
- Initial versioned release.
[Unreleased]: https://github.com/minetest-mods/moreblocks/compare/v2.2.0...HEAD
[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

10
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,10 @@
# Contributing to More Blocks
Thank you for your interest in More Blocks! Before contributing,
be sure to know about these few guidelines:
- Contributions have to be licensed under the zlib license (or compatible)
for code, and CC BY-SA 3.0 (or compatible) for assets.
- Make sure to update the changelog, keeping the
[changelog format](http://keepachangelog.com/en/1.0.0/) we use.
- Don't bump the version yourself. Maintainers will do this when necessary.

View File

@ -1,6 +1,6 @@
# zlib license # zlib license
Copyright (c) 2011-2017 Hugo Locurcio and contributors 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.**

View File

@ -1,12 +1,75 @@
# More Blocks # More Blocks [![Build status](https://github.com/minetest-mods/moreblocks/workflows/build/badge.svg)](https://github.com/minetest-mods/moreblocks/actions)
More Blocks for [Minetest](http://minetest.net), a free and open source infinite More Blocks for [Minetest](https://www.minetest.net/), a free and open source infinite
world block sandbox game. world block sandbox game.
To install, just clone this repository into your "mods" directory. [**Forum topic**](https://forum.minetest.net/viewtopic.php?f=11&t=509)
More Blocks code is licensed under the zlib license, textures are by Calinou and are licensed under CC BY-SA 3.0 Unported. ## Installation
moreblocks_copperpatina.png is by pithydon licensed under CC0 1.0 ### Download the mod
**Forum topic:** <https://forum.minetest.net/viewtopic.php?f=11&t=509> To install More Blocks, clone this Git repository into your Minetest's `mods/`
directory:
```bash
git clone https://github.com/minetest-mods/moreblocks.git
```
You can also
[download a ZIP archive](https://github.com/minetest-mods/moreblocks/archive/master.zip)
of More Blocks.
### Enable the mod
Once you have installed More Blocks, you need to enable it in Minetest.
The procedure is as follows:
#### Using the client's main menu
This is the easiest way to enable More Blocks when playing in singleplayer
(or on a server hosted from a client).
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.
#### Using a text editor
This is the recommended way to enable the mod on a server without using a GUI.
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:
```text
load_mod_moreblocks = true
```
If the line is already present in the file, then replace `false` with `true`
on that line.
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.
## Version compatibility
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.
## License
Copyright © 2011-2020 Hugo Locurcio and contributors
- More Blocks code is licensed under the zlib license, see
[`LICENSE.md`](LICENSE.md) for details.
- 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/).

View File

@ -1,7 +1,7 @@
--[[ --[[
More Blocks: alias definitions More Blocks: alias definitions
Copyright (c) 2011-2017 Hugo Locurcio and contributors. Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information. Licensed under the zlib license. See LICENSE.md for more information.
--]] --]]
@ -19,6 +19,7 @@ minetest.register_alias("moreblocks:stone_bricks", "default:stonebrick")
minetest.register_alias("moreblocks:stonebrick", "default:stonebrick") minetest.register_alias("moreblocks:stonebrick", "default:stonebrick")
minetest.register_alias("moreblocks:junglewood", "default:junglewood") minetest.register_alias("moreblocks:junglewood", "default:junglewood")
minetest.register_alias("moreblocks:jungle_wood", "default:junglewood") minetest.register_alias("moreblocks:jungle_wood", "default:junglewood")
minetest.register_alias("moreblocks:fence_junglewood", "default:fence_junglewood")
minetest.register_alias("moreblocks:fence_jungle_wood", "default:fence_junglewood") minetest.register_alias("moreblocks:fence_jungle_wood", "default:fence_junglewood")
minetest.register_alias("moreblocks:jungle_stick", "default:stick") minetest.register_alias("moreblocks:jungle_stick", "default:stick")
@ -31,13 +32,13 @@ minetest.register_alias("moreblocks:horizontaljungletree", "moreblocks:horizonta
minetest.register_alias("moreblocks:stonesquare", "moreblocks:stone_tile") minetest.register_alias("moreblocks:stonesquare", "moreblocks:stone_tile")
minetest.register_alias("moreblocks:circlestonebrick", "moreblocks:circle_stone_bricks") minetest.register_alias("moreblocks:circlestonebrick", "moreblocks:circle_stone_bricks")
minetest.register_alias("moreblocks:ironstonebrick", "moreblocks:iron_stone_bricks") minetest.register_alias("moreblocks:ironstonebrick", "moreblocks:iron_stone_bricks")
minetest.register_alias("moreblocks:fence_junglewood", "moreblocks:fence_jungle_wood")
minetest.register_alias("moreblocks:coalstone", "moreblocks:coal_stone") minetest.register_alias("moreblocks:coalstone", "moreblocks:coal_stone")
minetest.register_alias("moreblocks:ironstone", "moreblocks:iron_stone") minetest.register_alias("moreblocks:ironstone", "moreblocks:iron_stone")
minetest.register_alias("moreblocks:woodtile", "moreblocks:wood_tile") minetest.register_alias("moreblocks:woodtile", "moreblocks:wood_tile")
minetest.register_alias("moreblocks:woodtile_full", "moreblocks:wood_tile_full") minetest.register_alias("moreblocks:woodtile_full", "moreblocks:wood_tile_full")
minetest.register_alias("moreblocks:woodtile_centered", "moreblocks:wood_tile_centered") minetest.register_alias("moreblocks:woodtile_centered", "moreblocks:wood_tile_centered")
minetest.register_alias("moreblocks:woodtile_up", "moreblocks:wood_tile_up") minetest.register_alias("moreblocks:woodtile_up", "moreblocks:wood_tile_offset")
minetest.register_alias("moreblocks:wood_tile_up", "moreblocks:wood_tile_offset")
minetest.register_alias("moreblocks:woodtile_down", "moreblocks:wood_tile_down") minetest.register_alias("moreblocks:woodtile_down", "moreblocks:wood_tile_down")
minetest.register_alias("moreblocks:woodtile_left", "moreblocks:wood_tile_left") minetest.register_alias("moreblocks:woodtile_left", "moreblocks:wood_tile_left")
minetest.register_alias("moreblocks:woodtile_right", "moreblocks:wood_tile_right") minetest.register_alias("moreblocks:woodtile_right", "moreblocks:wood_tile_right")
@ -56,6 +57,8 @@ minetest.register_alias("moreblocks:emptybookshelf", "moreblocks:empty_bookshelf
minetest.register_alias("moreblocks:junglestick", "moreblocks:jungle_stick") minetest.register_alias("moreblocks:junglestick", "moreblocks:jungle_stick")
minetest.register_alias("moreblocks:splitstonesquare","moreblocks:split_stone_tile") minetest.register_alias("moreblocks:splitstonesquare","moreblocks:split_stone_tile")
minetest.register_alias("moreblocks:allfacestree","moreblocks:all_faces_tree") minetest.register_alias("moreblocks:allfacestree","moreblocks:all_faces_tree")
minetest.register_alias("moreblocks:empty_bookshelf","moreblocks:empty_shelf")
minetest.register_alias("moreblocks:split_stone_tile_alt","moreblocks:checker_stone_tile")
-- ABM for horizontal trees (fix facedir): -- ABM for horizontal trees (fix facedir):
local horizontal_tree_convert_facedir = {7, 12, 9, 18} local horizontal_tree_convert_facedir = {7, 12, 9, 18}
@ -77,3 +80,26 @@ minetest.register_abm({
}) })
end, end,
}) })
minetest.register_lbm({
name = "moreblocks:reduce_wood_tile_redundancy",
nodenames = {
"moreblocks:wood_tile_left",
"moreblocks:wood_tile_down",
"moreblocks:wood_tile_right",
"moreblocks:wood_tile_flipped",
},
action = function(pos, node)
if node.name:find("left") then
minetest.set_node(pos, {name = "moreblocks:wood_tile_offset", param2=1})
elseif node.name:find("down") then
minetest.set_node(pos, {name = "moreblocks:wood_tile_offset", param2=2})
elseif node.name:find("right") then
minetest.set_node(pos, {name = "moreblocks:wood_tile_offset", param2=3})
else -- wood_tile_flipped
minetest.set_node(pos, {name = "moreblocks:wood_tile", param2=1})
end
minetest.log('action', "LBM replaced " .. node.name ..
" at " .. minetest.pos_to_string(pos))
end,
})

View File

@ -1,34 +1,37 @@
--[[ --[[
More Blocks: circular saw More Blocks: circular saw
Copyright (c) 2011-2017 Hugo Locurcio and contributors. Copyright © 2011-2020 Hugo Locurcio, Sokomine and contributors.
Licensed under the zlib license. See LICENSE.md for more information. Licensed under the zlib license. See LICENSE.md for more information.
--]] --]]
local S = moreblocks.intllib local S = moreblocks.S
local F = minetest.formspec_escape
circular_saw = {} circular_saw = {}
circular_saw.known_stairs = setmetatable({}, { circular_saw.known_stairs = setmetatable({}, {
__newindex = function(k, v) __newindex = function(k, v)
local modname = minetest.get_current_modname() local modname = minetest.get_current_modname()
print(("WARNING: mod %s tried to add node %s to the circular saw" print(("WARNING: mod %s tried to add node %s to the circular saw manually."):format(modname, v))
.. " manually."):format(modname, v))
end, end,
}) })
-- This is populated by stairsplus:register_all: -- This is populated by stairsplus:register_all:
circular_saw.known_nodes = {} circular_saw.known_nodes = {}
-- This is populated by stairsplus:register_micro:
circular_saw.microblocks = {}
-- How many microblocks does this shape at the output inventory cost: -- How many microblocks does this shape at the output inventory cost:
-- It may cause slight loss, but no gain. -- It may cause slight loss, but no gain.
circular_saw.cost_in_microblocks = { circular_saw.cost_in_microblocks = {
1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2,
2, 3, 2, 4, 2, 4, 5, 6, 2, 3, 2, 4, 2, 4, 5, 6,
7, 1, 1, 2, 4, 6, 7, 8, 7, 1, 1, 2, 4, 6, 7, 8,
3, 1, 1, 2, 4, 4, 2, 6, 1, 2, 2, 3, 1, 1, 2, 4,
7, 3, 7, 7, 4, 8, 3, 2, 4, 2, 6, 7, 3, 7, 7, 4,
6, 2, 1, 3, 4, 8, 3, 2, 6, 2, 1, 3, 4
} }
circular_saw.names = { circular_saw.names = {
@ -40,6 +43,7 @@ circular_saw.names = {
{"panel", "_4"}, {"panel", "_4"},
{"micro", ""}, {"micro", ""},
{"panel", ""}, {"panel", ""},
{"micro", "_12"}, {"micro", "_12"},
{"panel", "_12"}, {"panel", "_12"},
{"micro", "_14"}, {"micro", "_14"},
@ -48,6 +52,7 @@ circular_saw.names = {
{"panel", "_15"}, {"panel", "_15"},
{"stair", "_outer"}, {"stair", "_outer"},
{"stair", ""}, {"stair", ""},
{"stair", "_inner"}, {"stair", "_inner"},
{"slab", "_1"}, {"slab", "_1"},
{"slab", "_2"}, {"slab", "_2"},
@ -56,11 +61,16 @@ circular_saw.names = {
{"slab", "_three_quarter"}, {"slab", "_three_quarter"},
{"slab", "_14"}, {"slab", "_14"},
{"slab", "_15"}, {"slab", "_15"},
{"slab", "_two_sides"},
{"slab", "_three_sides"},
{"slab", "_three_sides_u"},
{"stair", "_half"}, {"stair", "_half"},
{"stair", "_alt_1"}, {"stair", "_alt_1"},
{"stair", "_alt_2"}, {"stair", "_alt_2"},
{"stair", "_alt_4"}, {"stair", "_alt_4"},
{"stair", "_alt"}, {"stair", "_alt"},
{"slope", ""}, {"slope", ""},
{"slope", "_half"}, {"slope", "_half"},
{"slope", "_half_raised"}, {"slope", "_half_raised"},
@ -69,6 +79,7 @@ circular_saw.names = {
{"slope", "_inner_half_raised"}, {"slope", "_inner_half_raised"},
{"slope", "_inner_cut"}, {"slope", "_inner_cut"},
{"slope", "_inner_cut_half"}, {"slope", "_inner_cut_half"},
{"slope", "_inner_cut_half_raised"}, {"slope", "_inner_cut_half_raised"},
{"slope", "_outer"}, {"slope", "_outer"},
{"slope", "_outer_half"}, {"slope", "_outer_half"},
@ -80,8 +91,9 @@ circular_saw.names = {
} }
function circular_saw:get_cost(inv, stackname) function circular_saw:get_cost(inv, stackname)
local name = minetest.registered_aliases[stackname] or stackname
for i, item in pairs(inv:get_list("output")) do for i, item in pairs(inv:get_list("output")) do
if item:get_name() == stackname then if item:get_name() == name then
return circular_saw.cost_in_microblocks[i] return circular_saw.cost_in_microblocks[i]
end end
end end
@ -118,15 +130,23 @@ end
function circular_saw:reset(pos) function circular_saw:reset(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local inv = meta:get_inventory() local inv = meta:get_inventory()
local owned_by = meta:get_string("owner")
if owned_by and owned_by ~= "" then
owned_by = (" ("..S("owned by @1", meta:get_string("owner"))..")")
else
owned_by = ""
end
inv:set_list("input", {}) inv:set_list("input", {})
inv:set_list("micro", {}) --inv:set_list("micro", {})
inv:set_list("output", {})
meta:set_int("anz", 0)
meta:set_string("infotext", local microblockcount = inv:get_stack("micro",1):get_count()
S("Circular Saw is empty (owned by %s)") meta:set_int("anz", microblockcount)
:format(meta:get_string("owner") or "")) if microblockcount == 0 then
meta:set_string("infotext", S("Circular Saw is empty") .. owned_by)
inv:set_list("output", {})
end
end end
@ -138,7 +158,7 @@ function circular_saw:update_inventory(pos, amount)
amount = meta:get_int("anz") + amount amount = meta:get_int("anz") + amount
-- The material is recycled automaticly. -- The material is recycled automatically.
inv:set_list("recycle", {}) inv:set_list("recycle", {})
if amount < 1 then -- If the last block is taken out. if amount < 1 then -- If the last block is taken out.
@ -147,18 +167,29 @@ function circular_saw:update_inventory(pos, amount)
end end
local stack = inv:get_stack("input", 1) local stack = inv:get_stack("input", 1)
local microstack = inv:get_stack("micro",1)
-- At least one "normal" block is necessary to see what kind of stairs are requested. -- At least one "normal" block is necessary to see what kind of stairs are requested.
if stack:is_empty() then if stack:is_empty() and microstack:is_empty() then
-- Any microblocks not taken out yet are now lost. -- Any microblocks not taken out yet are now lost.
-- (covers material loss in the machine) -- (covers material loss in the machine)
self:reset(pos) self:reset(pos)
return return
end end
local node_name = stack:get_name() or ""
local node_name = stack:get_name() or "" -- planned to extract from microblock TODO
local node_def = stack:get_definition()
local name_parts = circular_saw.known_nodes[node_name] or "" local name_parts = circular_saw.known_nodes[node_name] or ""
local modname = name_parts[1] or "" local modname = name_parts[1] or circular_saw.microblocks[microstack:get_name()][1]
local material = name_parts[2] or "" local material = name_parts[2] or circular_saw.microblocks[microstack:get_name()][2]
local owned_by = meta:get_string("owner")
if owned_by and owned_by ~= "" then
owned_by = (" ("..S("owned by @1", meta:get_string("owner"))..")")
else
owned_by = ""
end
inv:set_list("input", { -- Display as many full blocks as possible: inv:set_list("input", { -- Display as many full blocks as possible:
node_name.. " " .. math.floor(amount / 8) node_name.. " " .. math.floor(amount / 8)
@ -173,8 +204,9 @@ function circular_saw:update_inventory(pos, amount)
-- 0-7 microblocks may remain left-over: -- 0-7 microblocks may remain left-over:
inv:set_list("micro", { inv:set_list("micro", {
modname .. ":micro_" .. material .. "_bottom " .. (amount % 8) modname .. ":micro_" .. material .. " " .. (amount % 8)
}) })
-- Display: -- Display:
inv:set_list("output", inv:set_list("output",
self:get_output_inv(modname, material, amount, self:get_output_inv(modname, material, amount,
@ -183,8 +215,10 @@ function circular_saw:update_inventory(pos, amount)
meta:set_int("anz", amount) meta:set_int("anz", amount)
meta:set_string("infotext", meta:set_string("infotext",
S("Circular Saw is working on %s (owned by %s)") S("Circular Saw is working on @1",
:format(material, meta:get_string("owner") or "")) node_def and node_def.description or material
) .. owned_by
)
end end
@ -222,7 +256,7 @@ function circular_saw.allow_metadata_inventory_put(
local stackname = stack:get_name() local stackname = stack:get_name()
local count = stack:get_count() local count = stack:get_count()
-- Only alow those items that are offered in the output inventory to be recycled: -- Only allow those items that are offered in the output inventory to be recycled:
if listname == "recycle" then if listname == "recycle" then
if not inv:contains_item("output", stackname) then if not inv:contains_item("output", stackname) then
return 0 return 0
@ -291,6 +325,17 @@ function circular_saw.on_metadata_inventory_put(
end end
end end
function circular_saw.allow_metadata_inventory_take(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
local input_stack = inv:get_stack(listname, index)
local player_inv = player:get_inventory()
if not player_inv:room_for_item("main", input_stack) then
return 0
else return stack:get_count()
end
end
function circular_saw.on_metadata_inventory_take( function circular_saw.on_metadata_inventory_take(
pos, listname, index, stack, player) pos, listname, index, stack, player)
@ -301,6 +346,10 @@ function circular_saw.on_metadata_inventory_take(
local input_stack = inv:get_stack(listname, index) local input_stack = inv:get_stack(listname, index)
if not input_stack:is_empty() and input_stack:get_name()~=stack:get_name() then if not input_stack:is_empty() and input_stack:get_name()~=stack:get_name() then
local player_inv = player:get_inventory() local player_inv = player:get_inventory()
-- Prevent arbitrary item duplication.
inv:remove_item(listname, input_stack)
if player_inv:room_for_item("main", input_stack) then if player_inv:room_for_item("main", input_stack) then
player_inv:add_item("main", input_stack) player_inv:add_item("main", input_stack)
end end
@ -310,12 +359,11 @@ function circular_saw.on_metadata_inventory_take(
end end
-- If it is one of the offered stairs: find out how many -- If it is one of the offered stairs: find out how many
-- microblocks have to be substracted: -- microblocks have to be subtracted:
if listname == "output" then if listname == "output" then
-- We do know how much each block at each position costs: -- We do know how much each block at each position costs:
local cost = circular_saw.cost_in_microblocks[index] local cost = circular_saw.cost_in_microblocks[index]
* stack:get_count() * stack:get_count()
circular_saw:update_inventory(pos, -cost) circular_saw:update_inventory(pos, -cost)
elseif listname == "micro" then elseif listname == "micro" then
-- Each microblock costs 1 microblock: -- Each microblock costs 1 microblock:
@ -327,20 +375,37 @@ function circular_saw.on_metadata_inventory_take(
-- The recycle field plays no role here since it is processed immediately. -- The recycle field plays no role here since it is processed immediately.
end end
local has_default_mod = minetest.get_modpath("default")
function circular_saw.on_construct(pos) function circular_saw.on_construct(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local fancy_inv = default.gui_bg..default.gui_bg_img..default.gui_slots local fancy_inv = ""
meta:set_string("formspec", "size[11,10]"..fancy_inv.. if has_default_mod then
"label[0,0;" ..S("Input\nmaterial").. "]" .. -- prepend background and slot styles from default if available
"list[current_name;input;1.5,0;1,1;]" .. fancy_inv = default.gui_bg..default.gui_bg_img..default.gui_slots
"label[0,1;" ..S("Left-over").. "]" .. end
"list[current_name;micro;1.5,1;1,1;]" .. meta:set_string(
"label[0,2;" ..S("Recycle\noutput").. "]" .. --FIXME Not work with @n in this part bug in minetest/minetest#7450.
"list[current_name;recycle;1.5,2;1,1;]" .. "formspec", "size[11,10]"..fancy_inv..
"field[0.3,3.5;1,1;max_offered;" ..S("Max").. ":;${max_offered}]" .. "label[0,0;" ..S("Input material").. "]" ..
"button[1,3.2;1,1;Set;" ..S("Set").. "]" .. "list[current_name;input;1.7,0;1,1;]" ..
"list[current_name;output;2.8,0;8,6;]" .. "label[0,1;" ..F(S("Left-over")).. "]" ..
"list[current_player;main;1.5,6.25;8,4;]") "list[current_name;micro;1.7,1;1,1;]" ..
"label[0,2;" ..F(S("Recycle output")).. "]" ..
"list[current_name;recycle;1.7,2;1,1;]" ..
"field[0.3,3.5;1,1;max_offered;" ..F(S("Max")).. ":;${max_offered}]" ..
"button[1,3.2;1.7,1;Set;" ..F(S("Set")).. "]" ..
"list[current_name;output;2.8,0;8,6;]" ..
"list[current_player;main;1.5,6.25;8,4;]" ..
"listring[current_name;output]" ..
"listring[current_player;main]" ..
"listring[current_name;input]" ..
"listring[current_player;main]" ..
"listring[current_name;micro]" ..
"listring[current_player;main]" ..
"listring[current_name;recycle]" ..
"listring[current_player;main]"
)
meta:set_int("anz", 0) -- No microblocks inside yet. meta:set_int("anz", 0) -- No microblocks inside yet.
meta:set_string("max_offered", 99) -- How many items of this kind are offered by default? meta:set_string("max_offered", 99) -- How many items of this kind are offered by default?
@ -391,17 +456,22 @@ minetest.register_node("moreblocks:circular_saw", {
sunlight_propagates = true, sunlight_propagates = true,
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {choppy = 2,oddly_breakable_by_hand = 2}, groups = {choppy = 2,oddly_breakable_by_hand = 2},
sounds = default.node_sound_wood_defaults(), is_ground_content = false,
sounds = moreblocks.node_sound_wood_defaults(),
on_construct = circular_saw.on_construct, on_construct = circular_saw.on_construct,
can_dig = circular_saw.can_dig, can_dig = circular_saw.can_dig,
-- Set the owner of this circular saw. -- Set the owner of this circular saw.
after_place_node = function(pos, placer) after_place_node = function(pos, placer)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local owner = placer and placer:get_player_name() or "" local owner = placer and placer:get_player_name() or ""
local owned_by = owner
if owner ~= "" then
owned_by = (" (%s)"):format(S("owned by @1", owner))
end
meta:set_string("owner", owner) meta:set_string("owner", owner)
meta:set_string("infotext", meta:set_string("infotext", S("Circular Saw is empty") .. owned_by)
S("Circular Saw is empty (owned by %s)")
:format(owner))
end, end,
-- The amount of items offered per shape can be configured: -- The amount of items offered per shape can be configured:
@ -409,6 +479,7 @@ minetest.register_node("moreblocks:circular_saw", {
allow_metadata_inventory_move = circular_saw.allow_metadata_inventory_move, allow_metadata_inventory_move = circular_saw.allow_metadata_inventory_move,
-- Only input- and recycle-slot are intended as input slots: -- Only input- and recycle-slot are intended as input slots:
allow_metadata_inventory_put = circular_saw.allow_metadata_inventory_put, allow_metadata_inventory_put = circular_saw.allow_metadata_inventory_put,
allow_metadata_inventory_take = circular_saw.allow_metadata_inventory_take,
-- Taking is allowed from all slots (even the internal microblock slot). Moving is forbidden. -- Taking is allowed from all slots (even the internal microblock slot). Moving is forbidden.
-- Putting something in is slightly more complicated than taking anything because we have to make sure it is of a suitable material: -- Putting something in is slightly more complicated than taking anything because we have to make sure it is of a suitable material:
on_metadata_inventory_put = circular_saw.on_metadata_inventory_put, on_metadata_inventory_put = circular_saw.on_metadata_inventory_put,

View File

@ -1,14 +1,14 @@
--[[ --[[
More Blocks: configuration handling More Blocks: configuration handling
Copyright (c) 2011-2017 Hugo Locurcio and contributors. Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information. Licensed under the zlib license. See LICENSE.md for more information.
--]] --]]
moreblocks.config = {} moreblocks.config = {}
local function getbool_default(setting, default) local function getbool_default(setting, default)
local value = minetest.setting_getbool(setting) local value = minetest.settings:get_bool(setting)
if value == nil then if value == nil then
value = default value = default
end end
@ -21,9 +21,9 @@ local function setting(settingtype, name, default)
getbool_default("moreblocks." .. name, default) getbool_default("moreblocks." .. name, default)
else else
moreblocks.config[name] = moreblocks.config[name] =
minetest.setting_get("moreblocks." .. name) or default minetest.settings:get("moreblocks." .. name) or default
end end
end end
-- Show stairs/slabs/panels/microblocks in creative inventory (true or false): -- Show stairs/slabs/panels/microblocks in creative inventory (true or false):
setting("bool", "stairsplus_in_creative_inventory", false) setting("bool", "stairsplus_in_creative_inventory", true)

View File

@ -1,7 +1,7 @@
--[[ --[[
More Blocks: crafting recipes More Blocks: crafting recipes
Copyright (c) 2011-2017 Hugo Locurcio and contributors. Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information. Licensed under the zlib license. See LICENSE.md for more information.
--]] --]]
@ -12,12 +12,7 @@ minetest.register_craft({
minetest.register_craft({ minetest.register_craft({
output = "default:stick", output = "default:stick",
recipe = {{"default:sapling"},} recipe = {{"group:sapling"},}
})
minetest.register_craft({
output = "default:stick",
recipe = {{"default:junglesapling"},}
}) })
minetest.register_craft({ minetest.register_craft({
@ -34,47 +29,38 @@ minetest.register_craft({
recipe = {"default:junglegrass", "default:dirt"}, recipe = {"default:junglegrass", "default:dirt"},
}) })
minetest.register_craft({
output = "default:dirt_with_grass",
type = "shapeless",
recipe = {"default:mese", "default:dirt"},
})
minetest.register_craft({ minetest.register_craft({
output = "default:mossycobble", output = "default:mossycobble",
type = "shapeless", type = "shapeless",
recipe = {"default:junglegrass", "default:cobble"}, recipe = {"default:junglegrass", "default:cobble"},
}) })
minetest.register_craft({
output = "default:mossycobble",
type = "shapeless",
recipe = {"default:mese_crystal_fragment", "default:cobble"},
})
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:wood_tile 9", output = "moreblocks:wood_tile 9",
recipe = { recipe = {
{"default:wood", "default:wood", "default:wood"}, {"group:wood", "group:wood", "group:wood"},
{"default:wood", "default:wood", "default:wood"}, {"group:wood", "group:wood", "group:wood"},
{"default:wood", "default:wood", "default:wood"}, {"group:wood", "group:wood", "group:wood"},
} }
}) })
minetest.register_craft({ -- This must be registered after `moreblocks:wood_tile` to avoid recipe conflicts,
output = "moreblocks:wood_tile_flipped", -- since `moreblocks:wood_tile` is part of `group:wood`
recipe = {{"moreblocks:wood_tile"},}
})
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:wood_tile_center 9", output = "moreblocks:wood_tile_center 9",
recipe = { recipe = {
{"default:wood", "default:wood", "default:wood"}, {"group:wood", "group:wood", "group:wood"},
{"default:wood", "moreblocks:wood_tile", "default:wood"}, {"group:wood", "moreblocks:wood_tile", "group:wood"},
{"default:wood", "default:wood", "default:wood"}, {"group:wood", "group:wood", "group:wood"},
} }
}) })
minetest.register_craft({
type = "shapeless",
output = "moreblocks:wood_tile",
recipe = {"moreblocks:wood_tile_flipped"}
})
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:wood_tile_full 4", output = "moreblocks:wood_tile_full 4",
recipe = { recipe = {
@ -84,7 +70,7 @@ minetest.register_craft({
}) })
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:wood_tile_up", output = "moreblocks:wood_tile_offset",
recipe = { recipe = {
{"default:stick"}, {"default:stick"},
{"moreblocks:wood_tile_center"}, {"moreblocks:wood_tile_center"},
@ -92,33 +78,29 @@ minetest.register_craft({
}) })
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:wood_tile_down", type = "shapeless",
recipe = { output = "moreblocks:wood_tile_offset",
{"moreblocks:wood_tile_center"}, recipe = {"moreblocks:wood_tile_down"}
{"default:stick"},
}
}) })
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:wood_tile_left", type = "shapeless",
recipe = { output = "moreblocks:wood_tile_offset",
{"default:stick", "moreblocks:wood_tile_center"}, recipe = {"moreblocks:wood_tile_left"}
}
}) })
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:wood_tile_right", type = "shapeless",
recipe = { output = "moreblocks:wood_tile_offset",
{"moreblocks:wood_tile_center", "default:stick"}, recipe = {"moreblocks:wood_tile_right"}
}
}) })
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:circle_stone_bricks 8", output = "moreblocks:circle_stone_bricks 5",
recipe = { recipe = {
{"default:stone", "default:stone", "default:stone"}, {"", "default:stone", ""},
{"default:stone", "", "default:stone"}, {"default:stone", "default:coal_lump", "default:stone"},
{"default:stone", "default:stone", "default:stone"}, {"", "default:stone", ""},
} }
}) })
@ -140,6 +122,33 @@ minetest.register_craft({
} }
}) })
minetest.register_craft({
output = "moreblocks:all_faces_pine_tree 8",
recipe = {
{"default:pine_tree", "default:pine_tree", "default:pine_tree"},
{"default:pine_tree", "", "default:pine_tree"},
{"default:pine_tree", "default:pine_tree", "default:pine_tree"},
}
})
minetest.register_craft({
output = "moreblocks:all_faces_acacia_tree 8",
recipe = {
{"default:acacia_tree", "default:acacia_tree", "default:acacia_tree"},
{"default:acacia_tree", "", "default:acacia_tree"},
{"default:acacia_tree", "default:acacia_tree", "default:acacia_tree"},
}
})
minetest.register_craft({
output = "moreblocks:all_faces_aspen_tree 8",
recipe = {
{"default:aspen_tree", "default:aspen_tree", "default:aspen_tree"},
{"default:aspen_tree", "", "default:aspen_tree"},
{"default:aspen_tree", "default:aspen_tree", "default:aspen_tree"},
}
})
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:sweeper 4", output = "moreblocks:sweeper 4",
recipe = { recipe = {
@ -149,10 +158,11 @@ minetest.register_craft({
}) })
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:stone_tile 4", output = "moreblocks:stone_tile 9",
recipe = { recipe = {
{"default:cobble", "default:cobble"}, {"default:cobble", "default:cobble", "default:cobble"},
{"default:cobble", "default:cobble"}, {"default:cobble", "default:stone", "default:cobble"},
{"default:cobble", "default:cobble", "default:cobble"},
} }
}) })
@ -164,12 +174,20 @@ minetest.register_craft({
}) })
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:split_stone_tile_alt", output = "moreblocks:checker_stone_tile",
recipe = { recipe = {
{"moreblocks:split_stone_tile"}, {"moreblocks:split_stone_tile"},
} }
}) })
-- When approaching the below craft, loop back to cobblestone, which can then be used to craft stone tiles again
minetest.register_craft({
output = "default:cobble",
recipe = {
{"moreblocks:checker_stone_tile"},
}
})
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:grey_bricks 2", output = "moreblocks:grey_bricks 2",
type = "shapeless", type = "shapeless",
@ -183,11 +201,33 @@ minetest.register_craft({
}) })
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:empty_bookshelf", output = "moreblocks:empty_shelf",
type = "shapeless", type = "shapeless",
recipe = {"moreblocks:sweeper", "default:bookshelf"}, recipe = {"moreblocks:sweeper", "default:bookshelf"},
replacements = {{"default:bookshelf", "default:book 3"}}, replacements = {{"default:bookshelf", "default:book 3"}},
-- When obtaining an empty bookshelf, return the books used in it as well -- When obtaining an empty shelf, return the books used in it as well
})
minetest.register_craft({
output = "moreblocks:empty_shelf",
type = "shapeless",
recipe = {"moreblocks:sweeper", "vessels:shelf"},
replacements = {{"vessels:shelf", "vessels:glass_bottle 3"}},
})
minetest.register_craft({
type = "shapeless",
output = "default:bookshelf",
recipe = {"moreblocks:empty_shelf", "default:book", "default:book", "default:book"},
})
minetest.register_craft({
output = "moreblocks:empty_shelf",
recipe = {
{"group:wood", "group:wood", "group:wood"},
{"", "", ""},
{"group:wood", "group:wood", "group:wood"},
}
}) })
minetest.register_craft({ minetest.register_craft({
@ -209,16 +249,16 @@ minetest.register_craft({
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:plankstone 4", output = "moreblocks:plankstone 4",
recipe = { recipe = {
{"default:stone", "default:wood"}, {"group:stone", "group:wood"},
{"default:wood", "default:stone"}, {"group:wood", "group:stone"},
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:plankstone 4", output = "moreblocks:plankstone 4",
recipe = { recipe = {
{"default:wood", "default:stone"}, {"group:wood", "group:stone"},
{"default:stone", "default:wood"}, {"group:stone", "group:wood"},
} }
}) })
@ -308,12 +348,36 @@ minetest.register_craft({
recipe = {"moreblocks:sweeper", "default:glass"}, recipe = {"moreblocks:sweeper", "default:glass"},
}) })
minetest.register_craft({
output = "moreblocks:trap_clean_glass",
type = "shapeless",
recipe = {"default:mese_crystal_fragment", "moreblocks:clean_glass"},
})
minetest.register_craft({
output = "moreblocks:trap_clean_glass",
type = "shapeless",
recipe = {"moreblocks:sweeper", "moreblocks:trap_glass"},
})
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:glow_glass", output = "moreblocks:glow_glass",
type = "shapeless", type = "shapeless",
recipe = {"default:torch", "default:glass"}, recipe = {"default:torch", "default:glass"},
}) })
minetest.register_craft({
output = "moreblocks:clean_glow_glass",
type = "shapeless",
recipe = {"default:torch", "moreblocks:clean_glass"},
})
minetest.register_craft({
output = "moreblocks:clean_glow_glass",
type = "shapeless",
recipe = {"moreblocks:sweeper", "moreblocks:glow_glass"},
})
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:trap_glow_glass", output = "moreblocks:trap_glow_glass",
type = "shapeless", type = "shapeless",
@ -326,6 +390,26 @@ minetest.register_craft({
recipe = {"default:mese_crystal_fragment", "moreblocks:glow_glass"}, recipe = {"default:mese_crystal_fragment", "moreblocks:glow_glass"},
}) })
-- several recipes are possible for the trap+clean+glow, we only present 3 of them
minetest.register_craft({
output = "moreblocks:trap_clean_glow_glass",
type = "shapeless",
recipe = {"default:mese_crystal_fragment", "moreblocks:clean_glow_glass"},
})
minetest.register_craft({
output = "moreblocks:trap_clean_glow_glass",
type = "shapeless",
recipe = {"default:mese_crystal_fragment", "moreblocks:clean_glass", "default:torch"},
})
minetest.register_craft({
output = "moreblocks:trap_clean_glow_glass",
type = "shapeless",
recipe = {"moreblocks:sweeper", "moreblocks:trap_glow_glass" },
})
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:super_glow_glass", output = "moreblocks:super_glow_glass",
type = "shapeless", type = "shapeless",
@ -338,6 +422,24 @@ minetest.register_craft({
recipe = {"default:torch", "moreblocks:glow_glass"}, recipe = {"default:torch", "moreblocks:glow_glass"},
}) })
minetest.register_craft({
output = "moreblocks:clean_super_glow_glass",
type = "shapeless",
recipe = {"default:torch", "default:torch", "moreblocks:clean_glass"},
})
minetest.register_craft({
output = "moreblocks:clean_super_glow_glass",
type = "shapeless",
recipe = {"default:torch", "moreblocks:clean_glow_glass"},
})
minetest.register_craft({
output = "moreblocks:clean_super_glow_glass",
type = "shapeless",
recipe = {"moreblocks:sweeper", "moreblocks:super_glow_glass"},
})
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:trap_super_glow_glass", output = "moreblocks:trap_super_glow_glass",
@ -351,6 +453,32 @@ minetest.register_craft({
recipe = {"default:mese_crystal_fragment", "moreblocks:super_glow_glass"}, recipe = {"default:mese_crystal_fragment", "moreblocks:super_glow_glass"},
}) })
-- several recipes are possible for the trap+clean+glow, we only present 4 of them
minetest.register_craft({
output = "moreblocks:trap_clean_super_glow_glass",
type = "shapeless",
recipe = {"default:mese_crystal_fragment", "moreblocks:clean_super_glow_glass"},
})
minetest.register_craft({
output = "moreblocks:trap_clean_super_glow_glass",
type = "shapeless",
recipe = {"default:mese_crystal_fragment", "moreblocks:clean_glow_glass", "default:torch"},
})
minetest.register_craft({
output = "moreblocks:trap_clean_super_glow_glass",
type = "shapeless",
recipe = {"default:mese_crystal_fragment", "moreblocks:clean_glass", "default:torch", "default:torch"},
})
minetest.register_craft({
output = "moreblocks:trap_clean_super_glow_glass",
type = "shapeless",
recipe = {"moreblocks:sweeper", "moreblocks:trap_super_glow_glass" },
})
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:coal_stone", output = "moreblocks:coal_stone",
type = "shapeless", type = "shapeless",
@ -381,12 +509,36 @@ minetest.register_craft({
recipe = {"default:mese_crystal_fragment", "default:stone"}, recipe = {"default:mese_crystal_fragment", "default:stone"},
}) })
minetest.register_craft({
output = "moreblocks:trap_desert_stone",
type = "shapeless",
recipe = {"default:mese_crystal_fragment", "default:desert_stone"},
})
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:trap_glass", output = "moreblocks:trap_glass",
type = "shapeless", type = "shapeless",
recipe = {"default:mese_crystal_fragment", "default:glass"}, recipe = {"default:mese_crystal_fragment", "default:glass"},
}) })
minetest.register_craft({
output = "moreblocks:trap_obsidian_glass",
type = "shapeless",
recipe = {"default:mese_crystal_fragment", "default:obsidian_glass"},
})
minetest.register_craft({
output = "moreblocks:trap_obsidian",
type = "shapeless",
recipe = {"default:mese_crystal_fragment", "default:obsidian"},
})
minetest.register_craft({
output = "moreblocks:trap_sandstone",
type = "shapeless",
recipe = {"default:mese_crystal_fragment", "default:sandstone"},
})
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:cactus_brick", output = "moreblocks:cactus_brick",
type = "shapeless", type = "shapeless",
@ -402,7 +554,7 @@ minetest.register_craft({
}) })
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:cactuschecker 4", output = "moreblocks:cactus_checker 4",
recipe = { recipe = {
{"default:stone", "default:cactus"}, {"default:stone", "default:cactus"},
{"default:cactus", "default:stone"}, {"default:cactus", "default:stone"},
@ -418,6 +570,20 @@ minetest.register_craft({
} }
}) })
minetest.register_craft({
output = "moreblocks:dirt_compressed",
recipe = {
{'default:dirt', 'default:dirt', 'default:dirt'},
{'default:dirt', 'default:dirt', 'default:dirt'},
{'default:dirt', 'default:dirt', 'default:dirt'},
}
})
minetest.register_craft({
output = "default:dirt 9",
recipe = {{"moreblocks:dirt_compressed"}},
})
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:cobble_compressed", output = "moreblocks:cobble_compressed",
recipe = { recipe = {
@ -435,15 +601,31 @@ minetest.register_craft({
}) })
minetest.register_craft({ minetest.register_craft({
type = "cooking", output = "moreblocks:tar", recipe = "default:gravel", output = "moreblocks:desert_cobble_compressed",
recipe = {
{"default:desert_cobble", "default:desert_cobble", "default:desert_cobble"},
{"default:desert_cobble", "default:desert_cobble", "default:desert_cobble"},
{"default:desert_cobble", "default:desert_cobble", "default:desert_cobble"},
}
})
minetest.register_craft({
output = "default:desert_cobble 9",
recipe = {
{"moreblocks:desert_cobble_compressed"},
}
})
minetest.register_craft({
type = "cooking", output = "moreblocks:tar", recipe = "default:pine_tree",
}) })
minetest.register_craft({ minetest.register_craft({
type = "shapeless", type = "shapeless",
output = "moreblocks:copperpatina", output = "moreblocks:copperpatina",
recipe = {"bucket:bucket_water", "default:copperblock"}, recipe = {"group:water_bucket", "default:copperblock"},
replacements = { replacements = {
{"bucket:bucket_water", "bucket:bucket_empty"} {"group:water_bucket", "bucket:bucket_empty"}
} }
}) })
@ -454,7 +636,7 @@ minetest.register_craft({
} }
}) })
if minetest.setting_getbool("moreblocks.circular_saw_crafting") ~= false then -- “If nil or true then” if minetest.settings:get_bool("moreblocks.circular_saw_crafting") ~= false then -- “If nil or true then”
minetest.register_craft({ minetest.register_craft({
output = "moreblocks:circular_saw", output = "moreblocks:circular_saw",
recipe = { recipe = {

View File

@ -1,2 +0,0 @@
default
intllib?

View File

@ -1 +0,0 @@
Adds various miscellaneous blocks to the game.

View File

@ -3,31 +3,25 @@
** More Blocks ** ** More Blocks **
By Calinou, with the help of ShadowNinja and VanessaE. By Calinou, with the help of ShadowNinja and VanessaE.
Copyright (c) 2011-2017 Hugo Locurcio and contributors. Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information. Licensed under the zlib license. See LICENSE.md for more information.
===================================================================== =====================================================================
--]] --]]
moreblocks = {} moreblocks = {}
local S
if minetest.get_modpath("intllib") then
S = intllib.Getter()
else
S = function(s) return s end
end
moreblocks.intllib = S
local modpath = minetest.get_modpath("moreblocks") local modpath = minetest.get_modpath("moreblocks")
moreblocks.S = minetest.get_translator("moreblocks")
dofile(modpath .. "/config.lua") dofile(modpath .. "/config.lua")
dofile(modpath .. "/sounds.lua")
dofile(modpath .. "/circular_saw.lua") dofile(modpath .. "/circular_saw.lua")
dofile(modpath .. "/stairsplus/init.lua") dofile(modpath .. "/stairsplus/init.lua")
dofile(modpath .. "/nodes.lua")
dofile(modpath .. "/redefinitions.lua")
dofile(modpath .. "/crafting.lua")
dofile(modpath .. "/aliases.lua")
if minetest.setting_getbool("log_mods") then if minetest.get_modpath("default") then
minetest.log("action", S("[moreblocks] loaded.")) dofile(modpath .. "/nodes.lua")
dofile(modpath .. "/redefinitions.lua")
dofile(modpath .. "/crafting.lua")
dofile(modpath .. "/aliases.lua")
end end

View File

@ -1,67 +0,0 @@
# Translation by Xanthin
###init.lua###
[moreblocks] loaded. = [moreblocks] geladen.
###nodes.lua###
Jungle Wood Fence = Tropenholzzaun
Empty Bookshelf = Leeres Buecherregal
Clean Glass = Klares Glas
Plankstone = Brettstein
Wooden Tile = Holzfliese
Full Wooden Tile = Vollholzfliese
Centered Wooden Tile = Holzfliese mittig
Up Wooden Tile = Holzfliese oben
Down Wooden Tile = Holzfliese unten
Left Wooden Tile = Holzfliese links
Right Wooden Tile = Holzfliese rechts
Circle Stone Bricks = Kreissteinziegel
Stone Tile = Steinfliese
Split Stone Tile = Geteilte Steinfliese
Glow Glass = Leuchtglas
Super Glow Glass = Superleuchtglas
Coal Glass = Kohleglas
Iron Glass = Eisenglas
Coal Checker = Karierte Kohle
Iron Checker = Kariertes Eisen
Trap Stone = Steinfalle
Trap Glass = Glasfalle
Trap Glow Glass = Leuchtglasfalle
Trap Super Glow Glass = Superleuchtglasfalle
Coal Stone = Kohlestein
Iron Stone = Eisenstein
Coal Stone Bricks = Kohlesteinziegel
Iron Stone Bricks = Eisensteinziegel
Cactus Checker = Karierter Kaktus
Cactus Brick = Kaktusziegel
Sweeper = Besen
Jungle Stick = Tropenholzstock
Rope = Seil
All-faces Tree = Baumscheibenstamm
###circular_saw.lua###
Circular Saw = Kreissaege
Circular saw, empty (owned by %s) = Kreissaege, leer (gehoert %s)
Circular saw, working with %s (owned by %s) = Kreissaege, arbeitet mit %s (gehoert %s)
Circular saw, empty = Kreissaege, leer
Circular saw is empty (owned by %s) = Kreissaege ist leer (gehoert %s)
Input\nmaterial = Ausgangs-\nmaterial
Left-over = Rest
Max = Anzahl
Set = Ok
Recycle\noutput = Wiederver-\nwerten
###./stairsplus/*###
%s Stairs = %streppe
%s Slab = %sstufe
%s Panel = %spaneel
%s Microblock = %smikroblock
%s Pane = %sscheibe
%s Fence = %szaun
###ownership.lua###
someone = jemand
Sorry, %s owns that spot. = Tut mir leid, %s gehoert diese Stelle.

View File

@ -1,52 +0,0 @@
# Translation by kaeza
[moreblocks] loaded. = [moreblocks] cargado.
Jungle Wooden Planks = Tablones de madera de jungla
Empty Bookshelf = Estante para libros vacío
Clean Glass = Cristal Limpio
Plankstone = Tablones de piedra
Wooden Tile = Parquet
Full Wooden Tile = Parquet Completo
Centered Wooden Tile = Parquet Centrado
Up Wooden Tile = Parquet Superior
Down Wooden Tile = Parquet Inferior
Left Wooden Tile = Parquet Izquierdo
Right Wooden Tile = Parquet Derecho
Circle Stone Bricks = Bloques de Piedra Circulares
Stone Tile = Baldosa de Piedra
Split Stone Tile = Baldosas de Piedra Partida
Glow Glass = Cristal Brillante
Super Glow Glass = Cristal Súper Brillante
Coal Glass = Cristal con Carbón
Iron Glass = Cristal con Hierro
Coal Checker = Cuadros de Carbón
Iron Checker = Cuadros de Hierro
Trap Stone = Piedra Trampa
Trap Glass = Cristal Trampa
Coal Stone = Carbón y Piedra
Iron Stone = Hierro y Piedra
Cactus Checker = Cuadros de Cactus
Cactus Brick = Ladrillos de Cactus
Sweeper = Limpiador
Jungle Stick = Varita de Madera de Jungla
Horizontal Tree = Tronco de árbol horizontal
Horizontal Jungle Tree = Tronco de árbol de la jungla horizontal
Rope = Soga
All-faces Tree = Tronco de Árbol
%s Stairs = Escalera de %s
%s Slab = Losa de %s
%s Panel = Panel de %s
%s Microblock = Microbloque de %s
Wooden = Madera
Papyrus = Papiro
Dry Shrub = Arbusto Desértico
Sapling = Brote de Árbol
Wooden Planks = Tablones de Madera
Ladder = Escalera de Mano
Glass = Cristal
%s Pane = Panel de %s
%s Fence = Valla de %s

View File

@ -1,72 +0,0 @@
# Translation by Calinou
###init.lua###
[moreblocks] loaded. = [moreblocks] a été chargé.
Jungle Wooden Planks = Planches de bois de jungle
Empty Bookshelf = Ètagère vide
Clean Glass = Verre propre
Plankstone = Pierre-bois
Wooden Tile = Dalle en bois
Full Wooden Tile = Dalle en bois complète
Centered Wooden Tile = Dalle en bois centrée
Up Wooden Tile = Dalle en bois vers le haut
Down Wooden Tile = Dalle en bois vers le bas
Left Wooden Tile = Dalle en bois vers la gauche
Right Wooden Tile = Dalle en bois vers la droite
Circle Stone Bricks = Briques en pierre circulaires
Stone Tile = Dalle en pierre
Split Stone Tile = Dalle en pierre découpée
Glow Glass = Verre brillant
Super Glow Glass = Verre très brillant
Coal Glass = Verre de charbon
Iron Glass = Verre de fer
Coal Checker = Damier en charbon
Iron Checker = Damier en fer
Trap Stone = Pierre traversable
Trap Glass = Verre traversable
Trap Glow Glass = Verre brillant traversable
Trap Super Glow Glass = Verre très brillant traversable
Coal Stone = Pierre de charbon
Iron Stone = Pierre de fer
Coal Stone Bricks = Briques en pierre de charbon
Iron Stone Bricks = Briques en pierre de fer
Cactus Checker = Damier en cactus
Cactus Brick = Briques de cactus
Sweeper = Balai
Jungle Stick = Bâton en bois de jungle
Horizontal Tree = Tronc d'arbre horizontal
Horizontal Jungle Tree = Tronc d'arbre de jungle horizontal
Rope = Corde
All-faces Tree = Tronc d'arbre
###redefinition.lua###
Wooden = bois
Papyrus = Papyrus
Dry Shrub = Buisson mort
Sapling = Pousse d'arbre
Wooden Planks = Planches de bois
Ladder = Échelle
Glass = Verre
###circular_saw.lua###
Circular Saw = Scie circulaire
Circular saw, empty (owned by %s) = Scie circulaire, vide (propriété de %s)
Circular saw, working with %s (owned by %s) = Scie circulaire, manipule %s (propriété de %s)
Circular saw, empty = Scie circulaire, vide
Circular saw is empty (owned by %s) = Scie circulaire est vide (propriété de %s)
Input material = Entrée du matériel
Rest/microblocks = Reste/microbloc
Max: = Max:
Set = Fixer
Recycle output = Recyclage
###./stairsplus/*###
%s Stairs = Escaliers en %s
%s Slab = Demi-dalle en %s
%s Panel = Barre en %s
%s Microblock = Microbloc en %s
%s Pane = Panneau en %s
%s Fence = Barrière en %s

View File

@ -1,70 +0,0 @@
#
# Italian translation
# Translator: Emon
#
###init.lua###
[moreblocks] loaded. = [moreblocks] caricato.
###nodes.lua###
Jungle Wood Fence = Recinzione in legno della giungla
Empty Bookshelf = Libreria vuota
Clean Glass = Vetro pulito
Plankstone = Pietra e legno
Wooden Tile = Mattonella in legno
Full Wooden Tile = Mattonella in legno pieno
Centered Wooden Tile = Mattonella in legno centrata
Up Wooden Tile = Mattonella in legno verso l'alto
Down Wooden Tile = Mattonella in legno verso il basso
Left Wooden Tile = Mattonella in legno verso sinistra
Right Wooden Tile = Mattonella in legno verso destra
Circle Stone Bricks = Mattoni concentrici in pietra
Stone Tile = Mattonella in pietra
Split Stone Tile = Mattonella in pietra divisa
Glow Glass = Vetro luminoso
Super Glow Glass = Super vetro luminoso
Coal Glass = Vetro e carbone
Iron Glass = Vetro e ferro
Coal Checker = Scacchiera in carbone
Iron Checker = Scacchiera in ferro
Trap Stone = Pietra trappola
Trap Glass = Vetro trappola
Trap Glow Glass = Vetro luminoso trappola
Trap Super Glow Glass = Super vetro luminoso trappola
Coal Stone = Pietra in carbone
Iron Stone = Pietra in ferro
Coal Stone Bricks = Mattoni di pietra in carbone
Iron Stone Bricks = Mattoni di pietra in ferro
Cactus Checker = Scacchiera in cactus
Cactus Brick = Mattoni di cactus
Sweeper = Spazzola
Jungle Stick = Bastone in legno della giungla
Rope = Corda
All-faces Tree = Albero su ogni lato
###circular_saw.lua###
Circular Saw = Sega circolare
Circular saw, empty (owned by %s) = Sega circolare, vuota (di proprietà di %s)
Circular saw, working with %s (owned by %s) = Sega circolare, in funzione su %s (di proprietà di %s)
Circular saw, empty = Sega circolare, vuota
Circular saw is empty (owned by %s) = La sega circolare è vuota (di proprietà di %s)
Input\nmaterial = Materiale\niniziale
Left-over = Scarto
Max = Max.
Set = Imp.
Recycle\noutput = Ricicla\nfinale
###ownership.lua###
someone = qualcuno
Sorry, %s owns that spot. = Spiacente, quel punto è di proprietà di %s
###./stairsplus/*###
%s Stairs = Scale - %s
%s Slab = Lastra - %s
%s Panel = Pannello - %s
%s Microblock = Microblocco %s
%s Pane = Pannello - %s
%s Fence = Recinzione - %s

92
locale/moreblocks.de.tr Normal file
View File

@ -0,0 +1,92 @@
# textdomain: moreblocks
# German translation for More Blocks.
# Copyright © 2011-2020 Hugo Locurcio and contributors
# This file is distributed under the same license as the More Blocks package.
# Xanthin, 2014.
# CodeXP <codexp@gmx.net>, 2018.
#: circular_saw.lua
Circular Saw=Kreissäge
Input material=Ausgangs-@nmaterial
Left-over=Rest
Max=Anzahl
Recycle output=Wiederver-@nwerten
Set=Ok
owned by @1=gehört @1
Circular Saw is empty=Kreissäge ist leer
Circular Saw is working on @1=Kreissäge arbeitet mit @1
#: init.lua
[moreblocks] loaded.=[moreblocks] geladen.
#: nodes.lua
Deprecated=veraltet
All-faces Acacia Tree=allseitiger Akazienbaumstamm
All-faces Aspen Tree=allseitiger Espenbaumstamm
All-faces Jungle Tree=allseitiger Tropenbaumstamm
All-faces Pine Tree=allseitiger Kieferbaumstamm
All-faces Tree=allseitiger Baumstamm
Cactus Brick=Kaktusziegel
Cactus Checker=Kaktus-Mosaik
Centered Wooden Tile=Holzfliese mittig
Checker Stone Tile=Stein-Mosaik
Circle Stone Bricks=Kreissteinziegel
Clean Glass=Klares Glas
Coal Checker=Kohlen-Mosaik
Coal Glass=Kohleglas
Clean Super Glow Glass=
Trap Clean Super Glow Glass=
Trap Clean Glass=
Clean Glow Glass=
Trap Clean Glow Glass=
Coal Stone=Kohlestein
Coal Stone Bricks=Kohlesteinziegel
Compressed Cobblestone=Gepresster Kopfsteinpflaster
Compressed Desert Cobblestone=
Compressed Dirt=Gepresste Erde
Copper Patina Block=Kupfer Edelrostblock
Empty Shelf=Leeres Regal
Full Wooden Tile=Vollholzfliese
Glow Glass=Leuchtglas
Iron Checker=Metall-Mosaik
Iron Glass=metallisiertes Glas
Iron Stone=Eisenstein
Iron Stone Bricks=Eisensteinziegel
Plankstone=Brettstein
Rope=Seil
Split Stone Tile=Geteilte Steinfliese
Stone Bricks=Steinziegel
Stone Tile=Steinfliese
Super Glow Glass=Superleuchtglas
Sweeper=Besen
Tar=Teer
Trap Desert Stone=Wüstensteinfalle
Trap Glass=Glasfalle
Trap Glow Glass=Leuchtglasfalle
Trap Obsidian=Obsidianfalle
Trap Obsidian Glass=Obsidianglasfalle
Trap Sandstone=Sandsteinfalle
Trap Stone=Steinfalle
Trap Super Glow Glass=Superleuchtglasfalle
Wooden Tile=Holzfliese
Offset Wooden Tile=Holzfliese versetzt
Downwards Wooden Tile=Holzfliese unten
Leftwards Wooden Tile=Holzfliese links
Rightwards Wooden Tile=Holzfliese rechts
#: ownership.lua
Sorry, @1 owns that spot.=Tut mir leid, dieser Bereich gehört @1.
someone=jemand
#: stairsplus/common.lua
@1 Microblock=@1mikroblock
@1 Slab=@1platte
@1 Slope=@1neigung
@1 Panel=@1paneel
@1 Stairs=@1treppe

96
locale/moreblocks.es.tr Normal file
View File

@ -0,0 +1,96 @@
# textdomain: moreblocks
# Spanish translation for More Blocks.
# Copyright © 2011-2020 Hugo Locurcio and contributors
# This file is distributed under the same license as the More Blocks package.
# kaeza, 2013.
# CodeXP <codexp@gmx.net>, 2018.
# Carlos Barraza 2020.
#: circular_saw.lua
Circular Saw=Sierra circular
Input material=Material de@nentrada
Left-over=Sobrante
Max=Maximo
Recycle output=Reciclar@nsalida
Set=Establecer
owned by @1=protegido por @1
Circular Saw is empty=La sierra circular está vacia
Circular Saw is working on @1=Sierra circular trabajando en @1
#: nodes.lua
Deprecated=Obsoleto
All-faces Acacia Tree=Árbol de Acacia, todas las caras
All-faces Aspen Tree=Álamo temblón, todas las caras
All-faces Jungle Tree=Árbol de Selva, todas las caras
All-faces Pine Tree=Pino, todas las caras
All-faces Tree=Tronco de Árbol
Cactus Brick=Ladrillos de Cactus
Cactus Checker=Cuadros de Cactus
Centered Wooden Tile=Parqué Centrado
Checker Stone Tile=Cuadros de Baldosa de Piedra
Circle Stone Bricks=Bloques de Piedra Circulares
Clean Glass=Cristal Limpio
Coal Checker=Cuadros de Carbón
Coal Glass=Cristal con Carbón
Clean Super Glow Glass=Cristal Súper Brillante Limpio
Trap Clean Super Glow Glass=Cristal Súper Brillante Limpio Falso
Trap Clean Glass=Cristal Limpio Falso
Clean Glow Glass=Cristal Brillante Limpio
Trap Clean Glow Glass=Cristal Brillante Limpio Falso
Coal Stone=Carbón y Piedra
Coal Stone Bricks=Ladrillos de Piedra de Carbon
Compressed Cobblestone=Adoquín Comprimido
Compressed Desert Cobblestone=Adoquín del Desierto Comprimido
Compressed Dirt=Tierra Comprimida
Copper Patina Block=Bloque de Pátina de Cobre
Empty Shelf=Estante vacio
Full Wooden Tile=Parqué Completo
Glow Glass=Cristal Brillante
Iron Checker=Cuadros de Hierro
Iron Glass=Cristal con Hierro
Iron Stone=Hierro y Piedra
Iron Stone Bricks=Ladrillo de Piedra de Hierro
Plankstone=Tablones de piedra
Rope=Soga
Split Stone Tile=Baldosas de Piedra Partida
Stone Bricks=Ladrillos de Piedra
Stone Tile=Baldosa de Piedra
Super Glow Glass=Cristal Súper Brillante
Sweeper=Limpiador
Tar=Alquitrán
Trap Desert Stone=Piedra del Desierto Falsa
Trap Glass=Cristal Falso
Trap Glow Glass=Cristal Brillante Falso
Trap Obsidian=Obsidiana Falsa
Trap Obsidian Glass=Vidrio de Obsidiana Falso
Trap Sandstone=Arenisca Falsa
Trap Stone=Piedra Falsa
Trap Super Glow Glass=Cristal Súper Brillante Falso
Wooden Tile=Parqué
Offset Wooden Tile=Parqué Ajustado
Downwards Wooden Tile=Parqué hacia Abajo
Leftwards Wooden Tile=Parqué hacia la Izquierda
Rightwards Wooden Tile=Parqué hacia la Derecha
#: ownership.lua
Sorry, @1 owns that spot.=Lo siento, @1 es dueño de ese lugar.
someone=alguien
#: stairsplus/common.lua
@1 Microblock=Microbloque de @1
@1 Slab=Losa de @1
@1 Slope=Pendiente de @1
@1 Panel=Panel de @1
@1 Stairs=Escalera de @1
#: stairsplus/registrations.lua
Concrete=Concreto
Cement=Cemento
Brass Block=Bloque de latón

93
locale/moreblocks.fr.tr Normal file
View File

@ -0,0 +1,93 @@
# textdomain: moreblocks
# French translation for More Blocks.
# Copyright © 2011-2020 Hugo Locurcio and contributors
# This file is distributed under the same license as the More Blocks package.
# Hugo Locurcio <hugo.locurcio@hugo.pro>, 2013-2019.
# Jat15, 2013.
# CodeXP <codexp@gmx.net>, 2018.
#: circular_saw.lua
Circular Saw=Scie circulaire
Input material=Matériau@nd'entrée
Left-over=Reste
Max=Max
Recycle output=Sortie à@nrecycler
Set=Définir
owned by @1=propriété de @1
Circular Saw is empty=Scie circulaire vide
Circular Saw is working on @1=Scie circulaire manipulant @1
#: init.lua
[moreblocks] loaded.=[moreblocks] a été chargé.
#: nodes.lua
Deprecated=déprécié
All-faces Acacia Tree=Tronc d'arbre d'acacia (toutes faces)
All-faces Aspen Tree=Tronc d'arbre de peuplier (toutes faces)
All-faces Jungle Tree=Tronc d'arbre de jungle (toutes faces)
All-faces Pine Tree=Tronc d'arbre de pin (toutes faces)
All-faces Tree=Tronc d'arbre (toutes faces)
Cactus Brick=Briques de cactus
Cactus Checker=Damier en cactus
Centered Wooden Tile=Dalle en bois centrée
Checker Stone Tile=Damier de dalle en pierre
Circle Stone Bricks=Briques en pierre circulaires
Clean Glass=Verre propre
Coal Checker=Damier en charbon
Coal Glass=Verre de charbon
Clean Super Glow Glass=
Trap Clean Super Glow Glass=
Trap Clean Glass=
Clean Glow Glass=
Trap Clean Glow Glass=
Coal Stone=Pierre de charbon
Coal Stone Bricks=Briques en pierre de charbon
Compressed Cobblestone=Pierre taillée compressée
Compressed Desert Cobblestone=
Compressed Dirt=Terre compressée
Copper Patina Block=Bloc de patine de cuivre
Empty Shelf=Étagère vide
Full Wooden Tile=Dalle en bois complète
Glow Glass=Verre brillant
Iron Checker=Damier de fer
Iron Glass=Verre de fer
Iron Stone=Pierre de fer
Iron Stone Bricks=Briques en pierre de fer
Plankstone=Pierre-bois
Rope=Corde
Split Stone Tile=Dalle en pierre découpée
Stone Bricks=Briques en pierre
Stone Tile=Dalle en pierre
Super Glow Glass=Verre très brillant
Sweeper=Balai
Tar=Bitume
Trap Desert Stone=Pierre du désert traversable
Trap Glass=Verre traversable
Trap Glow Glass=Verre brillant traversable
Trap Obsidian=Obsidienne traversable
Trap Obsidian Glass=Verre d'obsidienne traversable
Trap Sandstone=Grès traversable
Trap Stone=Pierre traversable
Trap Super Glow Glass=Verre très brillant traversable
Wooden Tile=Dalle en bois
Offset Wooden Tile=Dalle en bois décalée
Downwards Wooden Tile=Dalle en bois vers le bas
Leftwards Wooden Tile=Dalle en bois vers la gauche
Rightwards Wooden Tile=Dalle en bois vers la droite
#: ownership.lua
Sorry, @1 owns that spot.=Désolé, @1 possède cet endroit.
someone=quelqu'un
#: stairsplus/common.lua
@1 Microblock=Microbloc en @1
@1 Slab=Demi-dalle en @1
@1 Slope=Pente en @1
@1 Panel=Barre en @1
@1 Stairs=Escaliers en @1

92
locale/moreblocks.it.tr Normal file
View File

@ -0,0 +1,92 @@
# textdomain: moreblocks
# Italian translation for More Blocks.
# Copyright © 2011-2020 Hugo Locurcio and contributors
# This file is distributed under the same license as the More Blocks package.
# Emon, 2016.
# CodeXP <codexp@gmx.net>, 2018.
#: circular_saw.lua
Circular Saw=Sega circolare
Input material=Materiale@niniziale
Left-over=Scarto
Max=Max.
Recycle output=Ricicla@nfinale
Set=Imp.
owned by @1=
Circular Saw is empty=Sega circolare, vuota
Circular Saw is working on @1=Sega circolare, in funzione su @1
#: init.lua
[moreblocks] loaded.=[moreblocks] caricato.
#: nodes.lua
Deprecated=
All-faces Acacia Tree=
All-faces Aspen Tree=
All-faces Jungle Tree=
All-faces Pine Tree=
All-faces Tree=Albero su ogni lato
Cactus Brick=Mattoni di cactus
Cactus Checker=Scacchiera in cactus
Centered Wooden Tile=Mattonella in legno centrata
Checker Stone Tile=
Circle Stone Bricks=Mattoni concentrici in pietra
Clean Glass=Vetro pulito
Coal Checker=Scacchiera in carbone
Coal Glass=Vetro e carbone
Clean Super Glow Glass=
Trap Clean Super Glow Glass=
Trap Clean Glass=
Clean Glow Glass=
Trap Clean Glow Glass=
Coal Stone=Pietra in carbone
Coal Stone Bricks=Mattoni di pietra in carbone
Compressed Cobblestone=
Compressed Desert Cobblestone=
Compressed Dirt=
Copper Patina Block=
Empty Shelf=Scaffale Vuoto
Full Wooden Tile=Mattonella in legno pieno
Glow Glass=Vetro luminoso
Iron Checker=Scacchiera in ferro
Iron Glass=Vetro e ferro
Iron Stone=Pietra in ferro
Iron Stone Bricks=Mattoni di pietra in ferro
Plankstone=Pietra e legno
Rope=Corda
Split Stone Tile=Mattonella in pietra divisa
Stone Bricks=
Stone Tile=Mattonella in pietra
Super Glow Glass=Super vetro luminoso
Sweeper=Spazzola
Tar=
Trap Desert Stone=
Trap Glass=Vetro trappola
Trap Glow Glass=Vetro luminoso trappola
Trap Obsidian=
Trap Obsidian Glass=
Trap Sandstone=
Trap Stone=Pietra trappola
Trap Super Glow Glass=Super vetro luminoso trappola
Wooden Tile=Mattonella in legno
Offset Wooden Tile=
Downwards Wooden Tile=
Leftwards Wooden Tile=
Rightwards Wooden Tile=
#: ownership.lua
Sorry, @1 owns that spot.=Spiacente, quel punto è di proprietà di @1
someone=qualcuno
#: stairsplus/common.lua
@1 Microblock=Microblocco @1
@1 Slab=Lastra - @1
@1 Slope=
@1 Panel=Pannello - @1
@1 Stairs=Scale - @1

93
locale/moreblocks.pl.tr Normal file
View File

@ -0,0 +1,93 @@
# textdomain: moreblocks
# Polish translation for More Blocks.
# Copyright © 2011-2020 Hugo Locurcio and contributors
# This file is distributed under the same license as the More Blocks package.
# mat9117, 2019
# CodeXP <codexp@gmx.net>, 2018.
#: circular_saw.lua
Circular Saw=Piła tarczowa
Input material=wejście@nmateriał
Left-over=Resztki
Max=Maks
Recycle output=Przetwarzanie@nWyjście
Set=Ustaw
owned by @1=Należy do @1
Circular Saw is empty=Piła tarczowa jest pusta
Circular Saw is working on @1=Piła tarczowa pracuje na @1
#: init.lua
[moreblocks] loaded.=[moreblocks] załadowane.
#: nodes.lua
Deprecated=Przestarzałe
All-faces Acacia Tree=Wielostronna tekstura akacji
All-faces Aspen Tree=Wielostronna tekstura osiki
All-faces Jungle Tree=Wielostronna tekstura drzewa dżunglowego
All-faces Pine Tree=Wielostronna tekstura sosny
All-faces Tree=Wielostronna tekstura drzewa
Cactus Brick=Kaktusowa cegła
Cactus Checker=Kaktusowa szachownica
Centered Wooden Tile=Wyśrodkowany drewniany kafelek
Checker Stone Tile=Kamienna szachownica
Circle Stone Bricks=Okrągłe kamienne cegły
Clean Glass=Czyste szkło
Coal Checker=Węglowa szachownica
Coal Glass=Szkło węglowe
Clean Super Glow Glass=
Trap Clean Super Glow Glass=
Trap Clean Glass=
Clean Glow Glass=
Trap Clean Glow Glass=
Coal Stone=Kamień węglowy
Coal Stone Bricks=Węglowe kamienne cegły
Compressed Cobblestone=Skompresowany bruk
Compressed Desert Cobblestone=
Compressed Dirt=Skompresowana ziemia
Copper Patina Block=Blok patynowanej miedzi
Empty Shelf=Pusta półka
Full Wooden Tile=Pełny drewniany kafelek
Glow Glass=Świecące szkło
Iron Checker=Żelazna szachownica
Iron Glass=Żelazne szkło
Iron Stone=Żelazny kamień
Iron Stone Bricks=Żelazne kamienne cegły
Plankstone=Deskokamień
Rope=Lina
Split Stone Tile=Kamienny blok kafelkowy
Stone Bricks=Kamienne cegły
Stone Tile=Kamienny kafelek
Super Glow Glass=Super świecące szkło
Sweeper=Miotła
Tar=Smoła
Trap Desert Stone=Pułapka z pustynnego kamienia
Trap Glass=Szklana pułapka
Trap Glow Glass=Pułapka ze świecącego szkłą
Trap Obsidian=Obsydianowa pułapka
Trap Obsidian Glass=Pułapka z obsydianowego szkła
Trap Sandstone=Pułapka z piaskowca
Trap Stone=Kamienna pułapka
Trap Super Glow Glass=Pułapka z super świecącego szkła
Wooden Tile=Drewniany kafelek
Offset Wooden Tile=
Downwards Wooden Tile=Dolny drewniany kafelek
# @deprecated
Leftwards Wooden Tile=Lewy drewniany kafelek
# @deprecated
Rightwards Wooden Tile=Prawy drewniany kafelek
#: ownership.lua
Sorry, @1 owns that spot.=Przykro mi, to miejsce należy do @1
someone=ktoś
#: stairsplus/common.lua
@1 Microblock=@1 Mikroblok
@1 Slab=@1 Płyta
@1 Slope=@1 Spad
@1 Panel=@1 Panel
@1 Stairs=@1 Schody

View File

@ -0,0 +1,94 @@
# textdomain: moreblocks
# Portuguese_Brazil translation for More Blocks.
# Copyright © 2011-2020 Hugo Locurcio and contributors
# This file is distributed under the same license as the More Blocks package.
# Jose Anastacio 2020.
#: circular_saw.lua
Circular Saw=Serra Circular
Input material=Material de entrada
Left-over=Sobra
Max=Máximo
Recycle output=Saida reciclagem
Set=Defina
owned by @1=propriedade de @1
Circular Saw is empty=Serra Circular está vazia
Circular Saw is working on @1=Serra Circular está trabalhando em @1
#: nodes.lua
Deprecated=Descontinuado
All-faces Acacia Tree=Árvore de Acácia multifacetada
All-faces Aspen Tree=Árvore Aspen multifacetada
All-faces Jungle Tree=Árvore da Selva multifacetada
All-faces Pine Tree=Pinheiro multifacetado
All-faces Tree=Tronco de árvore
Cactus Brick=Tijolos de Cacto
Cactus Checker=Xadrez de Cacto
Centered Wooden Tile=Tijolos Centrado de Madeira
Checker Stone Tile=Xadrez Centrado de Pedra
Circle Stone Bricks=Tijolos de Pedra Cricular
Clean Glass=Vidro Limpo
Coal Checker=Xadrez de Carvão
Coal Glass=Vidro com Carvao
Clean Super Glow Glass=Cristal Limpo Super brilhante
Trap Clean Super Glow Glass=Vidro Limpo Super brilhante
Trap Clean Glass=Cristal Falso Limpo
Clean Glow Glass=Cristal Brillante Limpo
Trap Clean Glow Glass=Cristal Brillante Limpo Falso
Coal Stone=Pedra de carvão
Coal Stone Bricks=Tijolos de Carvão
Compressed Cobblestone=Pedregulho Comprimido
Compressed Desert Cobblestone=Pedregulho do Deserto Comprimido
Compressed Dirt=Terra Comprimida
Copper Patina Block=Bloco pátina de cobre
Empty Shelf=Prateleira Vazia
Full Wooden Tile=Xadrez de Madeira completo
Glow Glass=Vidro brilhante
Iron Checker=Xadrez de Ferro
Iron Glass=Cristal com ferro
Iron Stone=Ferro e Pedra
Iron Stone Bricks=Tijolos de Ferro
Plankstone=Prancha de Pedra
Rope=Corda
Split Stone Tile=Xadrez de Pedra Dividido
Stone Bricks=Tijolos de Pedra
Stone Tile=Xadrez de Pedra
Super Glow Glass=Cristal Súper Brillante
Sweeper=Limpiador
Tar=Alquitrán
Trap Desert Stone=Pedra del Desierto Falsa
Trap Glass=Cristal Falso
Trap Glow Glass=Cristal Brillante Falso
Trap Obsidian=Obsidiana Falsa
Trap Obsidian Glass=Vidrio de Obsidiana Falso
Trap Sandstone=Arenisca Falsa
Trap Stone=Piedra Falsa
Trap Super Glow Glass=Cristal Súper Brillante Falso
Wooden Tile=Xadrez de Madeira
Offset Wooden Tile=Xadrez de Madeira compensada
Downwards Wooden Tile=Xadrez de Madeira para baixo
Leftwards Wooden Tile=Xadrez de Madeira para a esquerda
Rightwards Wooden Tile=Xadrez de Madeira para a direita
#: ownership.lua
Sorry, @1 owns that spot.=Desculpe, @1 é o dono desse lugar.
someone=alguem
#: stairsplus/common.lua
@1 Microblock=Microbloco de @1
@1 Slab=Laje de @1
@1 Slope=Declive de @1
@1 Painel=Panel de @1
@1 Stairs=Escadas de @1
#: stairsplus/registrations.lua
Concrete=Concreto
Cement=Cimento
Brass Block=Bloco de latão

95
locale/moreblocks.ru.tr Normal file
View File

@ -0,0 +1,95 @@
# textdomain: moreblocks
# Russian translation for MOREBLOCKS minetest mod.
# Copyright (C) 2018 Hugo Locurcio and contributors
# This file is distributed under the same license as the MOREBLOCKS package.
# CodeXP <codexp@gmx.net>, 2018.
#
#, fuzzy
#: circular_saw.lua
Circular Saw=циркулярная пила
Input material=Входной@nматериал
Left-over=Остатки
Max=Кол.
Recycle output=Пере-@nобработка
Set=ОК
owned by @1=принадлежит @1
Circular Saw is empty=циркулярная пила пустая
Circular Saw is working on @1=циркулярная пила, @1 в обработке
#: init.lua
[MOD] moreblocks loaded.=[MOD] moreblocks загружен.
#: nodes.lua
Deprecated=устаревший
All-faces Acacia Tree=всестороннее бревно акации
All-faces Aspen Tree=всестороннее бревно осины
All-faces Jungle Tree=всестороннее бревно дерева джунглей
All-faces Pine Tree=всестороннее бревно сосновое
All-faces Tree=всестороннее бревно дерева
Cactus Brick=кирпич из кактуса
Cactus Checker=мозаика из кактуса
Centered Wooden Tile=деревянная мозаика (центр)
Checker Stone Tile=каменная мозаика
Circle Stone Bricks=кольцевой камень
Clean Glass=чистое стекло
Coal Checker=угольная мозаика
Coal Glass=угольное стекло
Clean Super Glow Glass=
Trap Clean Super Glow Glass=
Trap Clean Glass=
Clean Glow Glass=
Trap Clean Glow Glass=
Coal Stone=угольный камень
Coal Stone Bricks=угольно-каменный кирпич
Compressed Cobblestone=прессованный булыжник
Compressed Desert Cobblestone=
Compressed Dirt=прессованная земля
Copper Patina Block=медный патинированный блок
Empty Shelf=пустые полки
Full Wooden Tile=деревянная мозаика
Glow Glass=светящееся стекло
Iron Checker=стальная мозаика
Iron Glass=металлизированное стекло
Iron Stone=железный камень
Iron Stone Bricks=железно-каменный кирпич
Plankstone=дерево-каменная мозаика
Rope=верёвка
Split Stone Tile=каменная мозаика
Stone Bricks=каменный кирпич
Stone Tile=каменная плитка
Super Glow Glass=супер светящееся стекло
Sweeper=метёлка
Tar=смола
Trap Desert Stone=мнимый пустынный камень
Trap Glass=мнимое стекло
Trap Glow Glass=мнимое светящееся стекло
Trap Obsidian=мнимый обсидиан
Trap Obsidian Glass=мнимое обсидиановое стекло
Trap Sandstone=мнимый песчаник
Trap Stone=мнимый камень
Trap Super Glow Glass=мнимое супер светящееся стекло
Wooden Tile=деревянная мозаика
Offset Wooden Tile=деревянная мозаика (сверху)
# @deprecated
Downwards Wooden Tile=деревянная мозаика (снизу)
# @deprecated
Leftwards Wooden Tile=деревянная мозаика (слева)
# @deprecated
Rightwards Wooden Tile=деревянная мозаика (справа)
#: ownership.lua
Sorry, @1 owns that spot.=Извините, это принадлежит @1.
someone=кому-то
#: stairsplus/common.lua
@1 Microblock=@1 (микроблок)
@1 Slab=@1 (плита)
@1 Slope=@1 (наклон)
@1 Panel=@1 (панель)
@1 Stairs=@1 (лестница)

View File

@ -0,0 +1,89 @@
# textdomain: moreblocks
#: circular_saw.lua
Circular Saw=
Input material=
Left-over=
Max=
Recycle output=
Set=
owned by @1=
Circular Saw is empty=
Circular Saw is working on @1=
#: nodes.lua
Deprecated=
All-faces Acacia Tree=
All-faces Aspen Tree=
All-faces Jungle Tree=
All-faces Pine Tree=
All-faces Tree=
Cactus Brick=
Cactus Checker=
Centered Wooden Tile=
Checker Stone Tile=
Circle Stone Bricks=
Clean Glass=
Coal Checker=
Coal Glass=
Clean Super Glow Glass=
Trap Clean Super Glow Glass=
Trap Clean Glass=
Clean Glow Glass=
Trap Clean Glow Glass=
Coal Stone=
Coal Stone Bricks=
Compressed Cobblestone=
Compressed Desert Cobblestone=
Compressed Dirt=
Copper Patina Block=
Empty Shelf=
Full Wooden Tile=
Glow Glass=
Iron Checker=
Iron Glass=
Iron Stone=
Iron Stone Bricks=
Plankstone=
Rope=
Split Stone Tile=
Stone Bricks=
Stone Tile=
Super Glow Glass=
Sweeper=
Tar=
Trap Desert Stone=
Trap Glass=
Trap Glow Glass=
Trap Obsidian=
Trap Obsidian Glass=
Trap Sandstone=
Trap Stone=
Trap Super Glow Glass=
Wooden Tile=
Offset Wooden Tile=
Downwards Wooden Tile=
Leftwards Wooden Tile=
Rightwards Wooden Tile=
#: ownership.lua
Sorry, @1 owns that spot.=
someone=
#: stairsplus/common.lua
@1 Microblock=
@1 Slab=
@1 Slope=
@1 Panel=
@1 Stairs=
#: stairsplus/registrations.lua
Concrete=
Cement=
Brass Block=

92
locale/moreblocks.uk.tr Normal file
View File

@ -0,0 +1,92 @@
# textdomain: moreblocks
More Blocks=Більше Блоків
Adds various miscellaneous blocks to the game.=Додає різноманітні нові блоки до гри.
Adds various miscellaneous blocks.=Додає різноманітні нові блоки до гри.
#: circular_saw.lua
Circular Saw=Циркулярна пила
Input material=Вхідний@nматеріал
Left-over=Залишки
Max=Кільк.
Recycle output=Пере-@nобробка
Set=Гаразд
owned by @1=належить @1
Circular Saw is empty=Циркулярна пила пуста
Circular Saw is working on @1=Циркулярна пила працює над @1
#: init.lua
[MOD] moreblocks loaded.=[MOD] moreblocks завантажено.
#: nodes.lua
Deprecated=застарілий
All-faces Acacia Tree=Всебічна колода акації
All-faces Aspen Tree=Всебічна колода осики
All-faces Jungle Tree=Всебічна джунглева колода
All-faces Pine Tree=Всебічна колода сосни
All-faces Tree=Всебічна колода яблуні
Cactus Brick=Кактусова цегла
Cactus Checker=Кактусова мозаїка
Centered Wooden Tile=Дерев'яна мозаїка (центр)
Checker Stone Tile=Кам'яна мозаїка
Circle Stone Bricks=Кільцевий камінь
Clean Glass=Чисте скло
Coal Checker=Вугілляна мозаїка
Coal Glass=Вугілляне скло
Clean Super Glow Glass=Чисте супер-сяюче скло
Trap Clean Super Glow Glass=Trap чисте супер-сяюче скло
Trap Clean Glass=Trap чисте скло
Clean Glow Glass=Чисте сяюче скло
Trap Clean Glow Glass=Trap чисте сяюче скло
Coal Stone=Вугілляний камінь
Coal Stone Bricks=Вуглекам'яна цегла
Compressed Cobblestone=Пресований кругляк
Compressed Desert Cobblestone=Пресований пустельний кругляк
Compressed Dirt=Пресований ґрунт
Copper Patina Block=Блок мідного патину
Empty Shelf=Пусті полиці
Full Wooden Tile=Дерев'яна мозаїка
Glow Glass=Сяюче скло
Iron Checker=Сталева мозаїка
Iron Glass=Металізоване скло
Iron Stone=Залізний камінь
Iron Stone Bricks=Залізокам'яна цегла
Plankstone=Деревокам'яна мозаїка
Rope=Мотузка
Split Stone Tile=Кам'яна мозаїка
Stone Bricks=Кам'яна цегла
Stone Tile=Кам'яна плитка
Super Glow Glass=Супер-сяюче скло
Sweeper=Підмітальник
Tar=Смола
Trap Desert Stone=Уявний пустельний камінь
Trap Glass=Уявне скло
Trap Glow Glass=Уявне сяюче скло
Trap Obsidian=Уявний обсидіан
Trap Obsidian Glass=Уявне обсидіанове скло
Trap Sandstone=Уявний пісковик
Trap Stone=Уявний камінь
Trap Super Glow Glass=Уявне супер-сяюче скло
Wooden Tile=Дерев'яна мозаїка
Offset Wooden Tile=Дерев'яна мозаїка (зверзу)
# @deprecated
Downwards Wooden Tile=Дерев'яна мозаїка (знизу)
# @deprecated
Leftwards Wooden Tile=Дерев'яна мозаїка (ліворуч)
# @deprecated
Rightwards Wooden Tile=Дерев'яна мозаїка (праворуч)
#: ownership.lua
Sorry, @1 owns that spot.=Вибачте, це належить @1.
someone=комусь
#: stairsplus/common.lua
@1 Microblock=@1 (мікроблок)
@1 Slab=@1 (плита)
@1 Slope=@1 (схил)
@1 Panel=@1 (панель)
@1 Stairs=@1 (сходи)

View File

@ -0,0 +1,94 @@
# textdomain: moreblocks
# zh_CN translation for More Blocks.
# Copyright © 2011-2020 Hugo Locurcio and contributors
# This file is distributed under the same license as the More Blocks package.
# IFRFSX <IFRFSX@protonmail.com>, 2020.
#: circular_saw.lua
Circular Saw=圆锯
Input material=输入@n材料
Left-over=剩余材料
Max=最大值
Recycle output=回收@n输出物
Set=设置
owned by @1=属于@1所有
Circular Saw is empty=圆锯是空的
Circular Saw is working on @1=圆锯正在加工@1
#: nodes.lua
Deprecated=弃用
All-faces Acacia Tree=全切面相思树木方块
All-faces Aspen Tree=全切面白杨树木方块
All-faces Jungle Tree=全切面丛林树木方块
All-faces Pine Tree=全切面松树木方块
All-faces Tree=全切面树木方块
Cactus Brick=仙人掌砖
Cactus Checker=仙人掌棋盘方块
Centered Wooden Tile=居中的木瓦
Checker Stone Tile=棋盘石瓦
Circle Stone Bricks=圆石砖
Clean Glass=干净的玻璃
Coal Checker=棋盘煤块
Coal Glass=煤玻璃
Clean Super Glow Glass=
Trap Clean Super Glow Glass=
Trap Clean Glass=
Clean Glow Glass=
Trap Clean Glow Glass=
Coal Stone=煤炭石
Coal Stone Bricks=煤炭石砖
Compressed Cobblestone=压缩圆石
Compressed Desert Cobblestone=
Compressed Dirt=压缩土
Copper Patina Block=铜绿方块
Empty Shelf=空书架
Full Wooden Tile=全木瓦
Glow Glass=发光玻璃
Iron Checker=棋盘铁方块
Iron Glass=铁玻璃
Iron Stone=铁石
Iron Stone Bricks=铁石砖
Plankstone=板石
Rope=绳子
Split Stone Tile=裂石砖
Stone Bricks=石砖
Stone Tile=石瓦
Super Glow Glass=超级发光玻璃
Sweeper=清扫器
Tar=焦油
Trap Desert Stone=陷阱沙漠石
Trap Glass=陷阱玻璃
Trap Glow Glass=陷阱发光玻璃
Trap Obsidian=陷阱黑耀石
Trap Obsidian Glass=陷阱黑耀石玻璃
Trap Sandstone=陷阱沙石
Trap Stone=陷阱石
Trap Super Glow Glass=陷阱超级发光玻璃
Wooden Tile=木瓦
Offset Wooden Tile=胶合木瓦
Downwards Wooden Tile=向下的木瓦
Leftwards Wooden Tile=向左的木瓦
Rightwards Wooden Tile=向右的木瓦
#: ownership.lua
Sorry, @1 owns that spot.=抱歉,那个位置是@1的。
someone=某人
#: stairsplus/common.lua
@1 Microblock=@1小方块
@1 Slab=@1台阶
@1 Slope=@1斜坡
@1 Panel=@1嵌板
@1 Stairs=@1楼梯
#: stairsplus/registrations.lua
Concrete=
Cement=
Brass Block=

View File

@ -0,0 +1,94 @@
# textdomain: moreblocks
# zh_TW translation for More Blocks.
# Copyright © 2011-2020 Hugo Locurcio and contributors
# This file is distributed under the same license as the More Blocks package.
# IFRFSX <IFRFSX@protonmail.com>, 2020.
#: circular_saw.lua
Circular Saw=圓鋸
Input material=輸入@n材料
Left-over=剩餘材料
Max=最大值
Recycle output=回收@n輸出物
Set=設置
owned by @1=屬於@1所有
Circular Saw is empty=圓鋸是空的
Circular Saw is working on @1=圓鋸正在加工@1
#: nodes.lua
Deprecated=棄用
All-faces Acacia Tree=全切面相思樹木方塊
All-faces Aspen Tree=全切面白楊樹木方塊
All-faces Jungle Tree=全切面叢林樹木方塊
All-faces Pine Tree=全切面松樹木方塊
All-faces Tree=全切面樹木方塊
Cactus Brick=仙人掌磚
Cactus Checker=仙人掌棋盤方塊
Centered Wooden Tile=居中的木瓦
Checker Stone Tile=棋盤石瓦
Circle Stone Bricks=圓石磚
Clean Glass=乾淨的玻璃
Coal Checker=棋盤煤塊
Coal Glass=煤玻璃
Clean Super Glow Glass=
Trap Clean Super Glow Glass=
Trap Clean Glass=
Clean Glow Glass=
Trap Clean Glow Glass=
Coal Stone=煤炭石
Coal Stone Bricks=煤炭石磚
Compressed Cobblestone=壓縮圓石
Compressed Desert Cobblestone=
Compressed Dirt=壓縮土
Copper Patina Block=銅綠方塊
Empty Shelf=空書架
Full Wooden Tile=全木瓦
Glow Glass=發光玻璃
Iron Checker=棋盤鐵方塊
Iron Glass=鐵玻璃
Iron Stone=鐵石
Iron Stone Bricks=鐵石磚
Plankstone=板石
Rope=繩子
Split Stone Tile=裂石磚
Stone Bricks=石磚
Stone Tile=石瓦
Super Glow Glass=超級發光玻璃
Sweeper=清掃器
Tar=焦油
Trap Desert Stone=陷阱沙漠石
Trap Glass=陷阱玻璃
Trap Glow Glass=陷阱發光玻璃
Trap Obsidian=陷阱黑耀石
Trap Obsidian Glass=陷阱黑耀石玻璃
Trap Sandstone=陷阱沙石
Trap Stone=陷阱石
Trap Super Glow Glass=陷阱超級發光玻璃
Wooden Tile=木瓦
Offset Wooden Tile=膠合木瓦
Downwards Wooden Tile=向下的木瓦
Leftwards Wooden Tile=向左的木瓦
Rightwards Wooden Tile=向右的木瓦
#: ownership.lua
Sorry, @1 owns that spot.=抱歉,那個位置是@1的。
someone=某人
#: stairsplus/common.lua
@1 Microblock=@1小方塊
@1 Slab=@1臺階
@1 Slope=@1斜坡
@1 Panel=@1嵌板
@1 Stairs=@1樓梯
#: stairsplus/registrations.lua
Concrete=
Cement=
Brass Block=

View File

@ -1,64 +0,0 @@
###init.lua###
[moreblocks] loaded. =
###nodes.lua###
Jungle Wood Fence =
Empty Bookshelf =
Clean Glass =
Plankstone =
Wooden Tile =
Full Wooden Tile =
Centered Wooden Tile =
Up Wooden Tile =
Down Wooden Tile =
Left Wooden Tile =
Right Wooden Tile =
Circle Stone Bricks =
Stone Tile =
Split Stone Tile =
Glow Glass =
Super Glow Glass =
Coal Glass =
Iron Glass =
Coal Checker =
Iron Checker =
Trap Stone =
Trap Glass =
Trap Glow Glass =
Trap Super Glow Glass =
Coal Stone =
Iron Stone =
Coal Stone Bricks =
Iron Stone Bricks =
Cactus Checker =
Cactus Brick =
Sweeper =
Jungle Stick =
Rope =
All-faces Tree =
###circular_saw.lua###
Circular Saw =
Circular saw, empty (owned by %s) =
Circular saw, working with %s (owned by %s) =
Circular saw, empty =
Circular saw is empty (owned by %s) =
Input\nmaterial =
Left-over =
Max =
Set =
Recycle\noutput =
###ownership.lua###
someone =
Sorry, %s owns that spot. =
###./stairsplus/*###
%s Stairs =
%s Slab =
%s Panel =
%s Microblock =
%s Pane =
%s Fence =

View File

@ -1 +1,4 @@
name = moreblocks name = moreblocks
description = Adds various miscellaneous blocks to the game.
optional_depends = default,stairs,farming,wool,basic_materials,place_rotated
min_minetest_version = 5.0.0

347
nodes.lua
View File

@ -1,30 +1,48 @@
--[[ --[[
More Blocks: node definitions More Blocks: node definitions
Copyright (c) 2011-2017 Hugo Locurcio and contributors. Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information. Licensed under the zlib license. See LICENSE.md for more information.
--]] --]]
local S = moreblocks.intllib local S = moreblocks.S
local sound_wood = default.node_sound_wood_defaults() local sound_dirt = moreblocks.node_sound_dirt_defaults()
local sound_stone = default.node_sound_stone_defaults() local sound_wood = moreblocks.node_sound_wood_defaults()
local sound_glass = default.node_sound_glass_defaults() local sound_stone = moreblocks.node_sound_stone_defaults()
local sound_leaves = default.node_sound_leaves_defaults() local sound_glass = moreblocks.node_sound_glass_defaults()
local sound_leaves = moreblocks.node_sound_leaves_defaults()
-- Don't break on 0.4.14 and earlier. -- Don't break on 0.4.14 and earlier.
local sound_metal = (default.node_sound_metal_defaults local sound_metal = (moreblocks.node_sound_metal_defaults
and default.node_sound_metal_defaults() or sound_stone) and moreblocks.node_sound_metal_defaults() or sound_stone)
local function tile_tiles(name) local function tile_tiles(name)
local tex = "moreblocks_" ..name.. ".png" local tex = "moreblocks_" ..name.. ".png"
return {tex, tex, tex, tex, tex.. "^[transformR90", tex.. "^[transformR90"} return {tex, tex, tex, tex, tex.. "^[transformR90", tex.. "^[transformR90"}
end end
local function wood_tile_replace(itemstack, placer, pointed_thing)
local substack
if itemstack:get_name() == "moreblocks:wood_tile_flipped" then
substack = ItemStack("moreblocks:wood_tile")
else -- right, left, and down variants
substack = ItemStack("moreblocks:wood_tile_offset")
end
local _, success = minetest.item_place(substack, placer, pointed_thing)
if success then
itemstack:take_item()
end
return itemstack
end
local deprecated = (" ("..S('Deprecated')..")")
local nodes = { local nodes = {
["wood_tile"] = { ["wood_tile"] = {
description = S("Wooden Tile"), description = S("Wooden Tile"),
groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"default_wood.png^moreblocks_wood_tile.png", tiles = {"default_wood.png^moreblocks_wood_tile.png",
"default_wood.png^moreblocks_wood_tile.png", "default_wood.png^moreblocks_wood_tile.png",
"default_wood.png^moreblocks_wood_tile.png", "default_wood.png^moreblocks_wood_tile.png",
@ -34,106 +52,124 @@ local nodes = {
sounds = sound_wood, sounds = sound_wood,
}, },
["wood_tile_flipped"] = { ["wood_tile_flipped"] = {
description = S("Wooden Tile"), description = S("Wooden Tile") .. deprecated,
groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
tiles = {"default_wood.png^moreblocks_wood_tile.png^[transformR90", tiles = {"default_wood.png^moreblocks_wood_tile.png^[transformR90",
"default_wood.png^moreblocks_wood_tile.png^[transformR90", "default_wood.png^moreblocks_wood_tile.png^[transformR90",
"default_wood.png^moreblocks_wood_tile.png^[transformR90", "default_wood.png^moreblocks_wood_tile.png^[transformR90",
"default_wood.png^moreblocks_wood_tile.png^[transformR90", "default_wood.png^moreblocks_wood_tile.png^[transformR90",
"default_wood.png^moreblocks_wood_tile.png^[transformR180", "default_wood.png^moreblocks_wood_tile.png^[transformR180",
"default_wood.png^moreblocks_wood_tile.png^[transformR180"}, "default_wood.png^moreblocks_wood_tile.png^[transformR180"},
sounds = sound_wood,
no_stairs = true, no_stairs = true,
on_place = wood_tile_replace
}, },
["wood_tile_center"] = { ["wood_tile_center"] = {
description = S("Centered Wooden Tile"), description = S("Centered Wooden Tile"),
groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
tiles = {"default_wood.png^moreblocks_wood_tile_center.png"}, tiles = {"default_wood.png^moreblocks_wood_tile_center.png"},
sounds = sound_wood, sounds = sound_wood,
}, },
["wood_tile_full"] = { ["wood_tile_full"] = {
description = S("Full Wooden Tile"), description = S("Full Wooden Tile"),
groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
tiles = tile_tiles("wood_tile_full"), tiles = tile_tiles("wood_tile_full"),
sounds = sound_wood, sounds = sound_wood,
}, },
["wood_tile_up"] = { ["wood_tile_offset"] = {
description = S("Upwards Wooden Tile"), description = S("Offset Wooden Tile"),
groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, paramtype2 = "facedir",
tiles = {"default_wood.png^moreblocks_wood_tile_up.png"}, place_param2 = 0,
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
tiles = {"default_wood.png^moreblocks_wood_tile_offset.png"},
sounds = sound_wood, sounds = sound_wood,
no_stairs = true, no_stairs = true,
}, },
["wood_tile_down"] = { ["wood_tile_down"] = {
description = S("Downwards Wooden Tile"), description = S("Downwards Wooden Tile") .. deprecated,
groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, tiles = {"default_wood.png^[transformR180^moreblocks_wood_tile_offset.png^[transformR180"},
tiles = {"default_wood.png^[transformR180^moreblocks_wood_tile_up.png^[transformR180"},
sounds = sound_wood,
no_stairs = true, no_stairs = true,
on_place = wood_tile_replace
}, },
["wood_tile_left"] = { ["wood_tile_left"] = {
description = S("Leftwards Wooden Tile"), description = S("Leftwards Wooden Tile") .. deprecated,
groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, tiles = {"default_wood.png^[transformR270^moreblocks_wood_tile_offset.png^[transformR270"},
tiles = {"default_wood.png^[transformR270^moreblocks_wood_tile_up.png^[transformR270"},
sounds = sound_wood,
no_stairs = true, no_stairs = true,
on_place = wood_tile_replace
}, },
["wood_tile_right"] = { ["wood_tile_right"] = {
description = S("Rightwards Wooden Tile"), description = S("Rightwards Wooden Tile") .. deprecated,
groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, tiles = {"default_wood.png^[transformR90^moreblocks_wood_tile_offset.png^[transformR90"},
tiles = {"default_wood.png^[transformR90^moreblocks_wood_tile_up.png^[transformR90"},
sounds = sound_wood,
no_stairs = true, no_stairs = true,
on_place = wood_tile_replace
}, },
["circle_stone_bricks"] = { ["circle_stone_bricks"] = {
description = S("Circle Stone Bricks"), description = S("Circle Stone Bricks"),
groups = {cracky = 3}, groups = {stone = 1, cracky = 3},
sounds = sound_stone, sounds = sound_stone,
}, },
["grey_bricks"] = { ["grey_bricks"] = {
description = S("Stone Bricks"), description = S("Stone Bricks"),
paramtype2 = "facedir",
place_param2 = 0,
groups = {cracky = 3}, groups = {cracky = 3},
sounds = sound_stone, sounds = sound_stone,
}, },
["coal_stone_bricks"] = { ["coal_stone_bricks"] = {
description = S("Coal Stone Bricks"), description = S("Coal Stone Bricks"),
groups = {cracky = 3}, paramtype2 = "facedir",
place_param2 = 0,
groups = {stone = 1, cracky = 3},
sounds = sound_stone, sounds = sound_stone,
}, },
["iron_stone_bricks"] = { ["iron_stone_bricks"] = {
description = S("Iron Stone Bricks"), description = S("Iron Stone Bricks"),
groups = {cracky = 3}, paramtype2 = "facedir",
place_param2 = 0,
groups = {stone = 1, cracky = 3},
sounds = sound_stone, sounds = sound_stone,
}, },
["stone_tile"] = { ["stone_tile"] = {
description = S("Stone Tile"), description = S("Stone Tile"),
groups = {cracky = 3}, groups = {stone = 1, cracky = 3},
sounds = sound_stone, sounds = sound_stone,
}, },
["split_stone_tile"] = { ["split_stone_tile"] = {
description = S("Split Stone Tile"), description = S("Split Stone Tile"),
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"moreblocks_split_stone_tile_top.png", tiles = {"moreblocks_split_stone_tile_top.png",
"moreblocks_split_stone_tile.png"}, "moreblocks_split_stone_tile.png"},
groups = {cracky = 3}, groups = {stone = 1, cracky = 3},
sounds = sound_stone, sounds = sound_stone,
}, },
["split_stone_tile_alt"] = { ["checker_stone_tile"] = {
description = S("Checkered Stone Tile"), description = S("Checker Stone Tile"),
groups = {cracky = 3}, groups = {stone = 1, cracky = 3},
sounds = sound_stone, sounds = sound_stone,
}, },
["tar"] = { ["tar"] = {
description = S("Tar"), description = S("Tar"),
groups = {cracky = 2, tar_block = 1}, groups = {cracky=2, tar_block=1},
sounds = sound_stone, sounds = sound_stone,
}, },
["dirt_compressed"] = {
description = S("Compressed Dirt"),
groups = {crumbly=2, compressed = 1},
sounds = sound_dirt,
},
["cobble_compressed"] = { ["cobble_compressed"] = {
description = S("Compressed Cobblestone"), description = S("Compressed Cobblestone"),
groups = {cracky = 1}, groups = {cracky = 1, compressed = 1},
sounds = sound_stone,
},
["desert_cobble_compressed"] = {
description = S("Compressed Desert Cobblestone"),
groups = {cracky = 1, compressed = 1},
sounds = sound_stone, sounds = sound_stone,
}, },
["plankstone"] = { ["plankstone"] = {
description = S("Plankstone"), description = S("Plankstone"),
paramtype2 = "facedir",
place_param2 = 0,
groups = {cracky = 3}, groups = {cracky = 3},
tiles = tile_tiles("plankstone"), tiles = tile_tiles("plankstone"),
sounds = sound_stone, sounds = sound_stone,
@ -141,41 +177,43 @@ local nodes = {
["iron_glass"] = { ["iron_glass"] = {
description = S("Iron Glass"), description = S("Iron Glass"),
drawtype = "glasslike_framed_optional", drawtype = "glasslike_framed_optional",
--tiles = {"moreblocks_iron_glass.png", "moreblocks_iron_glass_detail.png"}, tiles = {"default_glass.png^[colorize:#DEDEDE", "default_glass_detail.png^[colorize:#DEDEDE"},
tiles = {"moreblocks_iron_glass.png"}, use_texture_alpha = "clip",
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3}, groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass, sounds = sound_glass,
}, },
["coal_glass"] = { ["coal_glass"] = {
description = S("Coal Glass"), description = S("Coal Glass"),
drawtype = "glasslike_framed_optional", drawtype = "glasslike_framed_optional",
--tiles = {"moreblocks_coal_glass.png", "moreblocks_coal_glass_detail.png"}, tiles = {"default_glass.png^[colorize:#828282", "default_glass_detail.png^[colorize:#828282"},
tiles = {"moreblocks_coal_glass.png"}, use_texture_alpha = "clip",
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3}, groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass, sounds = sound_glass,
}, },
["clean_glass"] = { ["clean_glass"] = {
description = S("Clean Glass"), description = S("Clean Glass"),
drawtype = "glasslike_framed_optional", drawtype = "glasslike_framed_optional",
--tiles = {"moreblocks_clean_glass.png", "moreblocks_clean_glass_detail.png"}, tiles = {"moreblocks_clean_glass.png", "moreblocks_clean_glass_detail.png"},
tiles = {"moreblocks_clean_glass.png"}, use_texture_alpha = "clip",
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3}, groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass, sounds = sound_glass,
}, },
["cactus_brick"] = { ["cactus_brick"] = {
description = S("Cactus Brick"), description = S("Cactus Brick"),
paramtype2 = "facedir",
place_param2 = 0,
groups = {cracky = 3}, groups = {cracky = 3},
sounds = sound_stone, sounds = sound_stone,
}, },
["cactus_checker"] = { ["cactus_checker"] = {
description = S("Cactus Checker"), description = S("Cactus Checker"),
groups = {cracky = 3}, groups = {stone = 1, cracky = 3},
tiles = {"default_stone.png^moreblocks_cactus_checker.png", tiles = {"default_stone.png^moreblocks_cactus_checker.png",
"default_stone.png^moreblocks_cactus_checker.png", "default_stone.png^moreblocks_cactus_checker.png",
"default_stone.png^moreblocks_cactus_checker.png", "default_stone.png^moreblocks_cactus_checker.png",
@ -184,23 +222,24 @@ local nodes = {
"default_stone.png^moreblocks_cactus_checker.png^[transformR90"}, "default_stone.png^moreblocks_cactus_checker.png^[transformR90"},
sounds = sound_stone, sounds = sound_stone,
}, },
["empty_bookshelf"] = { ["empty_shelf"] = {
description = S("Empty Bookshelf"), description = S("Empty Shelf"),
tiles = {"default_wood.png", "default_wood.png", paramtype2 = "facedir",
"moreblocks_empty_bookshelf.png"}, tiles = {"default_wood.png", "default_wood.png", "default_wood.png",
groups = {snappy = 2, choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, "default_wood.png", "moreblocks_empty_shelf.png", "moreblocks_empty_shelf.png"},
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
sounds = sound_wood, sounds = sound_wood,
furnace_burntime = 15, furnace_burntime = 15,
no_stairs = true, no_stairs = true,
}, },
["coal_stone"] = { ["coal_stone"] = {
description = S("Coal Stone"), description = S("Coal Stone"),
groups = {cracky = 3}, groups = {stone = 1, cracky = 3},
sounds = sound_stone, sounds = sound_stone,
}, },
["iron_stone"] = { ["iron_stone"] = {
description = S("Iron Stone"), description = S("Iron Stone"),
groups = {cracky = 3}, groups = {stone = 1, cracky = 3},
sounds = sound_stone, sounds = sound_stone,
}, },
["coal_checker"] = { ["coal_checker"] = {
@ -211,7 +250,7 @@ local nodes = {
"default_stone.png^moreblocks_coal_checker.png", "default_stone.png^moreblocks_coal_checker.png",
"default_stone.png^moreblocks_coal_checker.png^[transformR90", "default_stone.png^moreblocks_coal_checker.png^[transformR90",
"default_stone.png^moreblocks_coal_checker.png^[transformR90"}, "default_stone.png^moreblocks_coal_checker.png^[transformR90"},
groups = {cracky = 3}, groups = {stone = 1, cracky = 3},
sounds = sound_stone, sounds = sound_stone,
}, },
["iron_checker"] = { ["iron_checker"] = {
@ -222,87 +261,213 @@ local nodes = {
"default_stone.png^moreblocks_iron_checker.png", "default_stone.png^moreblocks_iron_checker.png",
"default_stone.png^moreblocks_iron_checker.png^[transformR90", "default_stone.png^moreblocks_iron_checker.png^[transformR90",
"default_stone.png^moreblocks_iron_checker.png^[transformR90"}, "default_stone.png^moreblocks_iron_checker.png^[transformR90"},
groups = {cracky = 3}, groups = {stone = 1, cracky = 3},
sounds = sound_stone, sounds = sound_stone,
}, },
["trap_stone"] = { ["trap_stone"] = {
description = S("Trap Stone"), description = S("Trap Stone"),
drawtype = "glasslike_framed",
tiles = {"default_stone.png^moreblocks_trap_box.png"},
walkable = false, walkable = false,
groups = {cracky = 3}, groups = {cracky = 3},
paramtype = "light",
sounds = sound_stone,
no_stairs = true,
},
["trap_desert_stone"] = {
description = S("Trap Desert Stone"),
drawtype = "glasslike_framed",
tiles = {"default_desert_stone.png^moreblocks_trap_box.png"},
walkable = false,
groups = {cracky = 3},
paramtype = "light",
sounds = sound_stone, sounds = sound_stone,
no_stairs = true, no_stairs = true,
}, },
["trap_glass"] = { ["trap_glass"] = {
description = S("Trap Glass"), description = S("Trap Glass"),
drawtype = "glasslike_framed_optional", drawtype = "glasslike_framed_optional",
--tiles = {"moreblocks_trap_glass.png", "default_glass_detail.png"}, tiles = {"default_glass.png^moreblocks_trap_box_glass.png", "default_glass_detail.png"},
tiles = {"moreblocks_trap_glass.png"}, use_texture_alpha = "clip",
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,
walkable = false, walkable = false,
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3}, groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass, sounds = sound_glass,
no_stairs = true, no_stairs = true,
}, },
["trap_obsidian_glass"] = {
description = S("Trap Obsidian Glass"),
drawtype = "glasslike_framed_optional",
tiles = {"default_obsidian_glass.png^moreblocks_trap_box_glass.png", "default_obsidian_glass_detail.png"},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass,
no_stairs = true,
},
["trap_obsidian"] = {
description = S("Trap Obsidian"),
drawtype = "glasslike_framed",
tiles = {"default_obsidian.png^moreblocks_trap_box.png"},
walkable = false,
groups = {cracky = 1, level = 2},
paramtype = "light",
sounds = sound_stone,
no_stairs = true,
},
["trap_clean_glass"] = {
description = S("Trap Clean Glass"),
drawtype = "glasslike_framed_optional",
tiles = {"moreblocks_clean_glass.png^moreblocks_trap_box_glass.png", "moreblocks_clean_glass_detail.png"},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass,
no_stairs = true,
},
["trap_sandstone"] = {
description = S("Trap Sandstone"),
drawtype = "glasslike_framed",
tiles = {"default_sandstone.png^moreblocks_trap_box.png"},
walkable = false,
groups = {crumbly = 1, cracky = 3},
paramtype = "light",
sounds = sound_stone,
no_stairs = true,
},
["all_faces_tree"] = { ["all_faces_tree"] = {
description = S("All-faces Tree"), description = S("All-faces Tree"),
tiles = {"default_tree_top.png"}, tiles = {"default_tree_top.png"},
groups = {tree = 1,snappy = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = sound_wood, sounds = sound_wood,
furnace_burntime = 30, furnace_burntime = 30,
}, },
["all_faces_jungle_tree"] = { ["all_faces_jungle_tree"] = {
description = S("All-faces Jungle Tree"), description = S("All-faces Jungle Tree"),
tiles = {"default_jungletree_top.png"}, tiles = {"default_jungletree_top.png"},
groups = {tree = 1,snappy = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = sound_wood, sounds = sound_wood,
furnace_burntime = 30, furnace_burntime = 38,
},
["all_faces_pine_tree"] = {
description = S("All-faces Pine Tree"),
tiles = {"default_pine_tree_top.png"},
groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3},
sounds = sound_wood,
furnace_burntime = 26,
},
["all_faces_acacia_tree"] = {
description = S("All-faces Acacia Tree"),
tiles = {"default_acacia_tree_top.png"},
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = sound_wood,
furnace_burntime = 34,
},
["all_faces_aspen_tree"] = {
description = S("All-faces Aspen Tree"),
tiles = {"default_aspen_tree_top.png"},
groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3},
sounds = sound_wood,
furnace_burntime = 22,
}, },
["glow_glass"] = { ["glow_glass"] = {
description = S("Glow Glass"), description = S("Glow Glass"),
drawtype = "glasslike_framed_optional", drawtype = "glasslike_framed_optional",
--tiles = {"moreblocks_glow_glass.png", "moreblocks_glow_glass_detail.png"}, tiles = {"default_glass.png^[colorize:#E9CD61", "default_glass_detail.png^[colorize:#E9CD61"},
tiles = {"moreblocks_glow_glass.png"}, use_texture_alpha = "clip",
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,
light_source = 11, light_source = 11,
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3}, groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass,
},
["clean_glow_glass"] = {
description = S("Clean Glow Glass"),
drawtype = "glasslike_framed_optional",
tiles = {"moreblocks_clean_glass.png^[colorize:#E9CD61", "moreblocks_clean_glass_detail.png^[colorize:#E9CD61"},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
light_source = 11,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass, sounds = sound_glass,
}, },
["trap_glow_glass"] = { ["trap_glow_glass"] = {
description = S("Trap Glow Glass"), description = S("Trap Glow Glass"),
drawtype = "glasslike_framed_optional", drawtype = "glasslike_framed_optional",
--tiles = {"moreblocks_trap_glass.png", "moreblocks_glow_glass_detail.png"}, tiles = {"default_glass.png^[colorize:#E9CD61^moreblocks_trap_box_glass.png", "default_glass_detail.png^[colorize:#E9CD61"},
tiles = {"moreblocks_trap_glass.png"}, use_texture_alpha = "clip",
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,
light_source = 11, light_source = 11,
walkable = false, walkable = false,
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3}, groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass,
no_stairs = true,
},
["trap_clean_glow_glass"] = {
description = S("Trap Clean Glow Glass"),
drawtype = "glasslike_framed_optional",
tiles = {"moreblocks_clean_glass.png^[colorize:#E9CD61^moreblocks_trap_box_glass.png", "moreblocks_clean_glass_detail.png^[colorize:#E9CD61"},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
light_source = 11,
walkable = false,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass, sounds = sound_glass,
no_stairs = true, no_stairs = true,
}, },
["super_glow_glass"] = { ["super_glow_glass"] = {
description = S("Super Glow Glass"), description = S("Super Glow Glass"),
drawtype = "glasslike_framed_optional", drawtype = "glasslike_framed_optional",
--tiles = {"moreblocks_super_glow_glass.png", "moreblocks_super_glow_glass_detail.png"}, tiles = {"default_glass.png^[colorize:#FFFF78", "default_glass_detail.png^[colorize:#FFFF78"},
tiles = {"moreblocks_super_glow_glass.png"}, use_texture_alpha = "clip",
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,
light_source = 14, light_source = default.LIGHT_MAX,
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3}, groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass,
},
["clean_super_glow_glass"] = {
description = S("Clean Super Glow Glass"),
drawtype = "glasslike_framed_optional",
tiles = {"moreblocks_clean_glass.png^[colorize:#FFFF78", "moreblocks_clean_glass_detail.png^[colorize:#FFFF78"},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
light_source = default.LIGHT_MAX,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass, sounds = sound_glass,
}, },
["trap_super_glow_glass"] = { ["trap_super_glow_glass"] = {
description = S("Trap Super Glow Glass"), description = S("Trap Super Glow Glass"),
drawtype = "glasslike_framed_optional", drawtype = "glasslike_framed_optional",
--tiles = {"moreblocks_trap_super_glow_glass.png", "moreblocks_super_glow_glass_detail.png"}, tiles = {"default_glass.png^[colorize:#FFFF78^moreblocks_trap_box_glass.png", "default_glass_detail.png^[colorize:#FFFF78"},
tiles = {"moreblocks_trap_super_glow_glass.png"}, use_texture_alpha = "clip",
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,
light_source = 14, light_source = default.LIGHT_MAX,
walkable = false, walkable = false,
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3}, groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass,
no_stairs = true,
},
["trap_clean_super_glow_glass"] = {
description = S("Trap Clean Super Glow Glass"),
drawtype = "glasslike_framed_optional",
tiles = {"moreblocks_clean_glass.png^[colorize:#FFFF78^moreblocks_trap_box_glass.png", "moreblocks_clean_glass_detail.png^[colorize:#FFFF78"},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
light_source = default.LIGHT_MAX,
walkable = false,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass, sounds = sound_glass,
no_stairs = true, no_stairs = true,
}, },
@ -329,16 +494,32 @@ local nodes = {
} }
for name, def in pairs(nodes) do for name, def in pairs(nodes) do
def.is_ground_content = def.is_ground_content == true
def.tiles = def.tiles or {"moreblocks_" ..name.. ".png"} def.tiles = def.tiles or {"moreblocks_" ..name.. ".png"}
minetest.register_node("moreblocks:" ..name, def) minetest.register_node("moreblocks:" ..name, def)
minetest.register_alias(name, "moreblocks:" ..name) minetest.register_alias(name, "moreblocks:" ..name)
local tiles = def.tiles
-- Use the primary tile for all sides of cut glasslike nodes.
-- This makes them easier to see
if
#tiles > 1 and
def.drawtype and
def.drawtype == "glasslike_framed" or
def.drawtype == "glasslike_framed_optional"
then
tiles = {def.tiles[1]}
end
if not def.no_stairs then if not def.no_stairs then
local groups = {} local groups = {}
for k, v in pairs(def.groups) do groups[k] = v end for k, v in pairs(def.groups) do groups[k] = v end
stairsplus:register_all("moreblocks", name, "moreblocks:" ..name, { stairsplus:register_all("moreblocks", name, "moreblocks:" ..name, {
description = def.description, description = def.description,
groups = groups, groups = groups,
tiles = def.tiles, tiles = tiles,
sunlight_propagates = def.sunlight_propagates, sunlight_propagates = def.sunlight_propagates,
light_source = def.light_source, light_source = def.light_source,
sounds = def.sounds, sounds = def.sounds,
@ -346,15 +527,9 @@ for name, def in pairs(nodes) do
end end
end end
-- Items -- Items
minetest.register_craftitem("moreblocks:sweeper", { minetest.register_craftitem("moreblocks:sweeper", {
description = S("Sweeper"), description = S("Sweeper"),
inventory_image = "moreblocks_sweeper.png", inventory_image = "moreblocks_sweeper.png",
}) })
minetest.register_craftitem("moreblocks:nothing", {
inventory_image = "invisible.png",
on_use = function() end,
})

View File

@ -1,11 +1,11 @@
--[[ --[[
More Blocks: ownership handling More Blocks: ownership handling
Copyright (c) 2011-2017 Hugo Locurcio and contributors. Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information. Licensed under the zlib license. See LICENSE.md for more information.
--]] --]]
local S = moreblocks.gettext local S = moreblocks.S
function moreblocks.node_is_owned(pos, placer) function moreblocks.node_is_owned(pos, placer)
local ownername = false local ownername = false
@ -33,7 +33,7 @@ function moreblocks.node_is_owned(pos, placer)
end end
if ownername ~= false then if ownername ~= false then
minetest.chat_send_player( placer:get_player_name(), S("Sorry, %s owns that spot."):format(ownername) ) minetest.chat_send_player( placer:get_player_name(), S("Sorry, @1 owns that spot.", ownername) )
return true return true
else else
return false return false

View File

@ -1,44 +1,91 @@
--[[ --[[
More Blocks: redefinitions of default stuff More Blocks: redefinitions of default stuff
Copyright (c) 2011-2017 Hugo Locurcio and contributors. Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information. Licensed under the zlib license. See LICENSE.md for more information.
--]] --]]
-- Redefinitions of some default crafting recipes: local modname = minetest.get_current_modname()
minetest.register_craft({ -- Redefine some of the default crafting recipes to be more productive
output = "default:sign_wall 4",
recipe = {
{"default:wood", "default:wood", "default:wood"},
{"default:wood", "default:wood", "default:wood"},
{"", "default:stick", ""},
}
})
minetest.register_craft({ -- Auxiliary function: take a recipe as returned by get_all_craft_recipes
output = "default:ladder 4", -- and turn it into a table that can be used to clear a craft or declare a new one
recipe = { local reconstruct_internal_craft = function(recipe)
{"default:stick", "", "default:stick"}, local recp = {
{"default:stick", "default:stick", "default:stick"}, { "", "", "" },
{"default:stick", "", "default:stick"}, { "", "", "" },
{ "", "", "" },
} }
}) local width = recipe.width
for idx, item in pairs(recipe.items) do
local row = math.ceil(idx / width)
local col = idx - (row-1)*width
recp[row][col] = item
end
return recp
end
minetest.register_craft({ -- Change the amount produced by recipe by apply func to the old amount
output = "default:paper 4", local change_recipe_amount = function(product, recipe, func)
recipe = { -- if width == 0, this is a shapeless recipe, for which the
{"default:papyrus", "default:papyrus", "default:papyrus"}, -- internal and Lua API recipe table is the same.
} -- Otherwise we need to reconstruct the table for the shaped recipe.
}) local shapeless = (recipe.width == 0)
local recp = shapeless and recipe.items or reconstruct_internal_craft(recipe)
minetest.register_craft({ local oldamount = tonumber(recipe.output:match(" [0-9]+$") or "1")
output = "default:rail 24",
recipe = { local newamount = func(oldamount)
{"default:steel_ingot", "", "default:steel_ingot"},
{"default:steel_ingot", "default:stick", "default:steel_ingot"}, -- remove old crafting recipe
{"default:steel_ingot", "", "default:steel_ingot"}, local redo = { recipe = recp }
} -- preserve shapelessness
if shapeless then
redo.type = "shapeless"
end
minetest.clear_craft(redo)
-- new output
redo.output = ("%s %d"):format(product, newamount)
minetest.register_craft(redo)
minetest.log("action", ("[MOD]%s: recipe for %s production: %d => %d"):format(modname, product, oldamount, newamount))
end
local increase_craft_production = function(product, func)
local recipes = minetest.get_all_craft_recipes(product)
for _, r in pairs(recipes) do
if r.type == "normal" or r.method == "normal" then
change_recipe_amount(product, r, func)
end
end
end
-- Increase the crafting production according to the rules from the table, which is in the form:
-- {
-- { detector, amount changing function }
-- { detector, amount changing function }
-- }
-- TODO: consider exporting this function to other mods
local increase_craft_production_table = function(map_table)
for product, _ in pairs(minetest.registered_items) do
for _, tab in pairs(map_table) do
local detector = tab[1]
local func = tab[2]
if detector(product) then
increase_craft_production(product, func)
-- only apply one boost
break
end
end
end
end
increase_craft_production_table({
{ function(n) return n:match('^default:sign_wall') end, function(old) return old + 1 end },
{ function(n) return n == 'default:paper' end, function(old) return old*4 end },
{ function(n) return n:match('^carts:.*rail$') or n:match('^default:.*rail$') end, function(old) return old + old/2 end },
}) })
minetest.register_craft({ minetest.register_craft({

3
settingtypes.txt Normal file
View File

@ -0,0 +1,3 @@
# If enabled, Stairs+ nodes will be displayed in the inventory when playing in creative mode.
# Disabling this can speed up loading times for clients as fewer nodes need to be registered in the creative inventory.
moreblocks.stairsplus_in_creative_inventory (Display Stairs+ nodes in creative inventory) bool true

20
sounds.lua Normal file
View File

@ -0,0 +1,20 @@
--[[
More Blocks: sound definitions
Copyright © 2011-2021 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
local has_default_mod = minetest.get_modpath("default")
for _, sound in ipairs({"dirt", "wood", "stone", "metal", "glass", "leaves"}) do
-- use sound-function from default if available
-- otherwise fall back to a no-op function (no sounds)
local sound_function_name = "node_sound_" .. sound .. "_defaults"
if has_default_mod then
-- use default sounds
moreblocks[sound_function_name] = default[sound_function_name]
else
-- no-op
moreblocks[sound_function_name] = function() end
end
end

View File

@ -6,11 +6,11 @@
This also registers the node with the circular saw. This also registers the node with the circular saw.
Example: Example:
```lua ```lua
stairsplus:register_all("moreblocks", "wood", "defaut:wood", { stairsplus:register_all("moreblocks", "wood", "default:wood", {
description = "Wooden", description = "Wooden",
tiles = {"default_wood.png"}, tiles = {"default_wood.png"},
groups = {oddly_breakabe_by_hand=1}, groups = {oddly_breakabe_by_hand=1},
sounds = default.node_sound_wood_defaults(), sounds = moreblocks.node_sound_wood_defaults(),
}) })
``` ```
The following register only a particular type of microblock. The following register only a particular type of microblock.
@ -20,4 +20,63 @@ You will probably never want to use them directly:
* `stairsplus:register_slab(modname, subname, recipeitem, fields)` * `stairsplus:register_slab(modname, subname, recipeitem, fields)`
* `stairsplus:register_panel(modname, subname, recipeitem, fields)` * `stairsplus:register_panel(modname, subname, recipeitem, fields)`
* `stairsplus:register_micro(modname, subname, recipeitem, fields)` * `stairsplus:register_micro(modname, subname, recipeitem, fields)`
* `stairsplus:register_slope(modname, subname, recipeitem, fields)`
If you only want to register a subset of stairsplus nodes,
you can use the `stairsplus:register_custom_subset(subset, modname, subname, recipeitem, fields)` function.
The subset table should have the following format:
```lua
local subset = {
{ "micro", "" },
{ "micro", "_1" },
{ "micro", "_2" },
{ "micro", "_4" },
{ "micro", "_12" },
{ "micro", "_14" },
{ "micro", "_15" },
{ "panel", "" },
{ "panel", "_1" },
{ "panel", "_2" },
{ "panel", "_4" },
{ "panel", "_12" },
{ "panel", "_14" },
{ "panel", "_15" },
{ "slab", "" },
{ "slab", "_quarter" },
{ "slab", "_three_quarter" },
{ "slab", "_1" },
{ "slab", "_2" },
{ "slab", "_14" },
{ "slab", "_15" },
{ "slab", "_two_sides" },
{ "slab", "_three_sides" },
{ "slab", "_three_sides_u" },
{ "slope", "" },
{ "slope", "_half" },
{ "slope", "_half_raised" },
{ "slope", "_inner" },
{ "slope", "_inner_half" },
{ "slope", "_inner_half_raised" },
{ "slope", "_inner_cut" },
{ "slope", "_inner_cut_half" },
{ "slope", "_inner_cut_half_raised" },
{ "slope", "_outer" },
{ "slope", "_outer_half" },
{ "slope", "_outer_half_raised" },
{ "slope", "_outer_cut" },
{ "slope", "_outer_cut_half" },
{ "slope", "_outer_cut_half_raised" },
{ "slope", "_cut" },
{ "stair", "" },
{ "stair", "_half" },
{ "stair", "_right_half" },
{ "stair", "_inner" },
{ "stair", "_outer" },
{ "stair", "_alt" },
{ "stair", "_alt_1" },
{ "stair", "_alt_2" },
{ "stair", "_alt_4" },
}
```
You can remove entries as needed.

View File

@ -1,70 +0,0 @@
--[[
More Blocks: alias definitions
Copyright (c) 2011-2017 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
local function register_stairsplus_alias(modname, origname, newname)
minetest.register_alias(modname.. ":slab_" ..origname, "moreblocks:slab_" ..newname)
minetest.register_alias(modname.. ":slab_" ..origname.. "_inverted", "moreblocks:slab_" ..newname.. "_inverted")
minetest.register_alias(modname.. ":slab_" ..origname.. "_wall", "moreblocks:slab_" ..newname.. "_wall")
minetest.register_alias(modname.. ":slab_" ..origname.. "_quarter", "moreblocks:slab_" ..newname.. "_quarter")
minetest.register_alias(modname.. ":slab_" ..origname.. "_quarter_inverted", "moreblocks:slab_" ..newname.. "_quarter_inverted")
minetest.register_alias(modname.. ":slab_" ..origname.. "_quarter_wall", "moreblocks:slab_" ..newname.. "_quarter_wall")
minetest.register_alias(modname.. ":slab_" ..origname.. "_three_quarter", "moreblocks:slab_" ..newname.. "_three_quarter")
minetest.register_alias(modname.. ":slab_" ..origname.. "_three_quarter_inverted", "moreblocks:slab_" ..newname.. "_three_quarter_inverted")
minetest.register_alias(modname.. ":slab_" ..origname.. "_three_quarter_wall", "moreblocks:slab_" ..newname.. "_three_quarter_wall")
minetest.register_alias(modname.. ":stair_" ..origname, "moreblocks:stair_" ..newname)
minetest.register_alias(modname.. ":stair_" ..origname.. "_inverted", "moreblocks:stair_" ..newname.. "_inverted")
minetest.register_alias(modname.. ":stair_" ..origname.. "_wall", "moreblocks:stair_" ..newname.. "_wall")
minetest.register_alias(modname.. ":stair_" ..origname.. "_wall_half", "moreblocks:stair_" ..newname.. "_wall_half")
minetest.register_alias(modname.. ":stair_" ..origname.. "_wall_half_inverted", "moreblocks:stair_" ..newname.. "_wall_half_inverted")
minetest.register_alias(modname.. ":stair_" ..origname.. "_half", "moreblocks:stair_" ..newname.. "_half")
minetest.register_alias(modname.. ":stair_" ..origname.. "_half_inverted", "moreblocks:stair_" ..newname.. "_half_inverted")
minetest.register_alias(modname.. ":stair_" ..origname.. "_right_half", "moreblocks:stair_" ..newname.. "_right_half")
minetest.register_alias(modname.. ":stair_" ..origname.. "_right_half_inverted", "moreblocks:stair_" ..newname.. "_right_half_inverted")
minetest.register_alias(modname.. ":stair_" ..origname.. "_wall_half", "moreblocks:stair_" ..newname.. "_wall_half")
minetest.register_alias(modname.. ":stair_" ..origname.. "_wall_half_inverted", "moreblocks:stair_" ..newname.. "_wall_half_inverted")
minetest.register_alias(modname.. ":stair_" ..origname.. "_inner", "moreblocks:stair_" ..newname.. "_inner")
minetest.register_alias(modname.. ":stair_" ..origname.. "_inner_inverted", "moreblocks:stair_" ..newname.. "_inner_inverted")
minetest.register_alias(modname.. ":stair_" ..origname.. "_outer", "moreblocks:stair_" ..newname.. "_outer")
minetest.register_alias(modname.. ":stair_" ..origname.. "_outer_inverted", "moreblocks:stair_" ..newname.. "_outer_inverted")
minetest.register_alias(modname.. ":panel_" ..origname.. "_bottom", "moreblocks:panel_" ..newname.. "_bottom")
minetest.register_alias(modname.. ":panel_" ..origname.. "_top", "moreblocks:panel_" ..newname.. "_top")
minetest.register_alias(modname.. ":panel_" ..origname.. "_vertical", "moreblocks:panel_" ..newname.. "_vertical")
minetest.register_alias(modname.. ":micro_" ..origname.. "_bottom", "moreblocks:micro_" ..newname.. "_bottom")
minetest.register_alias(modname.. ":micro_" ..origname.. "_top", "moreblocks:micro_" ..newname.. "_top")
end
register_stairsplus_alias("stairsplus", "stone", "stone")
register_stairsplus_alias("stairsplus", "wood", "wood")
register_stairsplus_alias("stairsplus", "pinewood", "pinewood")
register_stairsplus_alias("stairsplus", "cobble", "cobble")
register_stairsplus_alias("stairsplus", "brick", "brick")
register_stairsplus_alias("stairsplus", "sandstone", "sandstone")
register_stairsplus_alias("stairsplus", "glass", "glass")
register_stairsplus_alias("stairsplus", "tree", "tree")
register_stairsplus_alias("stairsplus", "jungletree", "jungletree")
register_stairsplus_alias("stairsplus", "pinetree", "pinetree")
register_stairsplus_alias("stairsplus", "desert_stone", "desert_stone")
register_stairsplus_alias("stairsplus", "steelblock", "steelblock")
register_stairsplus_alias("stairsplus", "mossycobble", "mossycobble")
register_stairsplus_alias("moreblocks", "coalstone", "coal_stone")
register_stairsplus_alias("moreblocks", "junglewood", "jungle_wood")
register_stairsplus_alias("moreblocks", "circlestonebrick", "circle_stone_bricks")
register_stairsplus_alias("moreblocks", "ironstone", "iron_stone")
register_stairsplus_alias("moreblocks", "coalglass", "coal_glass")
register_stairsplus_alias("moreblocks", "ironglass", "iron_glass")
register_stairsplus_alias("moreblocks", "glowglass", "glow_glass")
register_stairsplus_alias("moreblocks", "superglowglass", "super_glow_glass")
register_stairsplus_alias("moreblocks", "coalchecker", "coal_checker")
register_stairsplus_alias("moreblocks", "ironchecker", "iron_checker")
register_stairsplus_alias("moreblocks", "cactuschecker", "cactus_checker")
register_stairsplus_alias("moreblocks", "ironstonebrick", "iron_stone_bricks")
register_stairsplus_alias("moreblocks", "stonesquare", "stone_tile")
register_stairsplus_alias("moreblocks", "splitstonesquare", "split_stone_tile")
register_stairsplus_alias("moreblocks", "woodtile", "wood_tile")
register_stairsplus_alias("moreblocks", "woodtile_centered", "wood_tile_centered")
register_stairsplus_alias("moreblocks", "woodtile_full", "wood_tile_full")

186
stairsplus/common.lua Normal file
View File

@ -0,0 +1,186 @@
--[[
More Blocks: registrations
Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
local S = moreblocks.S
local descriptions = {
["micro"] = "Microblock",
["slab"] = "Slab",
["slope"] = "Slope",
["panel"] = "Panel",
["stair"] = "Stairs",
}
-- Extends the standad rotate_node placement so that it takes into account
-- the side (top/bottom or left/right) of the face being pointed at.
-- As with the standard rotate_node, sneak can be used to force the perpendicular
-- placement (wall placement on floor/ceiling, floor/ceiling placement on walls).
-- Additionally, the aux / sprint / special key can be used to place the node
-- as if from the opposite side.
--
-- When placing a node next to one of the same category (e.g. slab to slab or
-- stair to stair), the default placement (regardless of sneak) is to copy the
-- under node's param2, flipping if placed above or below it. The aux key disable
-- this behavior.
local wall_right_dirmap = {9, 18, 7, 12}
local wall_left_dirmap = {11, 16, 5, 14}
local ceil_dirmap = {20, 23, 22, 21}
-- extract the stairsplus category from a node name
-- assumes the name is in the form mod_name:category_original_ndoe_name
local function name_to_category(name)
local colon = name:find(":") or 0
colon = colon + 1
local under = name:find("_", colon)
return name:sub(colon, under)
end
stairsplus.rotate_node_aux = function(itemstack, placer, pointed_thing)
local sneak = placer and placer:get_player_control().sneak
local aux = placer and placer:get_player_control().aux1
-- category for what we are placing
local item_prefix = name_to_category(itemstack:get_name())
-- category for what we are placing against
local under = pointed_thing.under
local under_node = minetest.get_node(under)
local under_prefix = under_node and name_to_category(under_node.name)
local same_cat = item_prefix == under_prefix
-- standard (floor) facedir, also used for sneak placement against the lower half of the wall
local p2 = placer and minetest.dir_to_facedir(placer:get_look_dir()) or 0
-- check which face and which quadrant we are interested in
-- this is used both to check if we're handling parallel placement in the same-category case,
-- and in general for sneak placement
local face_pos = minetest.pointed_thing_to_face_pos(placer, pointed_thing)
local face_off = vector.subtract(face_pos, under)
-- we cannot trust face_off to tell us the correct directionif the
-- under node has a non-standard shape, so use the distance between under and above
local wallmounted = minetest.dir_to_wallmounted(vector.subtract(pointed_thing.above, under))
if same_cat and not aux then
p2 = under_node.param2
-- flip if placing above or below an upright or upside-down node
-- TODO should we also flip when placing next to a side-mounted node?
if wallmounted < 2 then
if p2 < 4 then
p2 = (p2 + 2) % 4
p2 = ceil_dirmap[p2 + 1]
elseif p2 > 19 then
p2 = ceil_dirmap[p2 - 19] - 20
p2 = (p2 + 2) % 4
end
end
else
-- for same-cat placement, aux is used to disable param2 copying
if same_cat then
aux = not aux
end
local remap = nil
-- standard placement against the wall
local use_wallmap = (wallmounted > 1 and not sneak) or (wallmounted < 2 and sneak)
-- standard placement against the ceiling, or sneak placement against the upper half of the wall
local use_ceilmap = wallmounted == 1 and not sneak
use_ceilmap = use_ceilmap or (wallmounted > 1 and sneak and face_off.y > 0)
if use_wallmap then
local left = (p2 == 0 and face_off.x < 0) or
(p2 == 1 and face_off.z > 0) or
(p2 == 2 and face_off.x > 0) or
(p2 == 3 and face_off.z < 0)
if aux then
left = not left
end
remap = left and wall_left_dirmap or wall_right_dirmap
elseif use_ceilmap then
remap = ceil_dirmap
end
if aux then
p2 = (p2 + 2) % 4
end
if remap then
p2 = remap[p2 + 1]
end
end
return minetest.item_place(itemstack, placer, pointed_thing, p2)
end
stairsplus.register_single = function(category, alternate, info, modname, subname, recipeitem, fields)
local src_def = minetest.registered_nodes[recipeitem] or {}
local desc_base = S("@1 "..descriptions[category], fields.description)
local def = {}
if category ~= "slab" then
def = table.copy(info)
end
-- copy fields to def
for k, v in pairs(fields) do
def[k] = v
end
def.is_ground_content = def.is_ground_content == true
def.drawtype = "nodebox"
def.paramtype = "light"
def.paramtype2 = def.paramtype2 or "facedir"
if def.use_texture_alpha == nil then
def.use_texture_alpha = src_def.use_texture_alpha
end
-- This makes node rotation work on placement
def.place_param2 = nil
-- Darken light sources slightly to make up for their smaller visual size
def.light_source = math.max(0, (def.light_source or 0) - 1)
def.groups = stairsplus:prepare_groups(fields.groups)
if category == "slab" then
if minetest.global_exists("place_rotated") then
def.on_place = place_rotated.slab
else
def.on_place = stairsplus.rotate_node_aux
end
if type(info) ~= "table" then
def.node_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, (info/16)-0.5, 0.5},
}
def.description = ("%s (%d/16)"):format(desc_base, info)
else
def.node_box = {
type = "fixed",
fixed = info,
}
def.description = desc_base .. alternate:gsub("_", " "):gsub("(%a)(%S*)", function(a, b) return a:upper() .. b end)
end
else
def.on_place = stairsplus.rotate_node_aux
def.description = desc_base
if category == "slope" then
def.drawtype = "mesh"
elseif category == "stair" and alternate == "" then
def.groups.stair = 1
end
end
if fields.drop and (type(fields.drop) ~= "table") then
def.drop = modname.. ":" .. category .. "_" .. fields.drop .. alternate
end
minetest.register_node(":" ..modname.. ":" .. category .. "_" .. subname .. alternate, def)
stairsplus.register_recipes(category, alternate, modname, subname, recipeitem)
end

View File

@ -1,139 +0,0 @@
--[[
More Blocks: conversion
Copyright (c) 2011-2017 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
-- Function to convert all stairs/slabs/etc nodes from
-- inverted, wall, etc to regular + 6d facedir
local dirs1 = {21, 20, 23, 22, 21}
local dirs2 = {15, 8, 17, 6, 15}
local dirs3 = {14, 11, 16, 5, 14}
function stairsplus:register_6dfacedir_conversion(modname, material)
--print("Register stairsplus 6d facedir conversion")
--print('ABM for '..modname..' "'..material..'"')
local objects_list1 = {
modname.. ":slab_" ..material.. "_inverted",
modname.. ":slab_" ..material.. "_quarter_inverted",
modname.. ":slab_" ..material.. "_three_quarter_inverted",
modname.. ":stair_" ..material.. "_inverted",
modname.. ":stair_" ..material.. "_wall",
modname.. ":stair_" ..material.. "_wall_half",
modname.. ":stair_" ..material.. "_wall_half_inverted",
modname.. ":stair_" ..material.. "_half_inverted",
modname.. ":stair_" ..material.. "_right_half_inverted",
modname.. ":panel_" ..material.. "_vertical",
modname.. ":panel_" ..material.. "_top",
}
local objects_list2 = {
modname.. ":slab_" ..material.. "_wall",
modname.. ":slab_" ..material.. "_quarter_wall",
modname.. ":slab_" ..material.. "_three_quarter_wall",
modname.. ":stair_" ..material.. "_inner_inverted",
modname.. ":stair_" ..material.. "_outer_inverted",
modname.. ":micro_" ..material.. "_top"
}
for _, object in pairs(objects_list1) do
local flip_upside_down = false
local flip_to_wall = false
local dest_object = object
if string.find(dest_object, "_inverted") then
flip_upside_down = true
dest_object = string.gsub(dest_object, "_inverted", "")
end
if string.find(object, "_top") then
flip_upside_down = true
dest_object = string.gsub(dest_object, "_top", "")
end
if string.find(dest_object, "_wall") then
flip_to_wall = true
dest_object = string.gsub(dest_object, "_wall", "")
end
if string.find(dest_object, "_vertical") then
flip_to_wall = true
dest_object = string.gsub(dest_object, "_vertical", "")
end
if string.find(dest_object, "_half") and not string.find(dest_object, "_right_half") then
dest_object = string.gsub(dest_object, "_half", "_right_half")
elseif string.find(dest_object, "_right_half") then
dest_object = string.gsub(dest_object, "_right_half", "_half")
end
--print(" +---> convert " ..object)
--print(" | to " ..dest_object)
minetest.register_abm({
nodenames = {object},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
local fdir = node.param2 or 0
local nfdir
if flip_upside_down and not flip_to_wall then
nfdir = dirs1[fdir + 2]
elseif flip_to_wall and not flip_upside_down then
nfdir = dirs2[fdir + 1]
elseif flip_to_wall and flip_upside_down then
nfdir = dirs3[fdir + 2]
end
minetest.set_node(pos, {name = dest_object, param2 = nfdir})
end
})
end
for _, object in pairs(objects_list2) do
local flip_upside_down = false
local flip_to_wall = false
local dest_object = object
if string.find(dest_object, "_inverted") then
flip_upside_down = true
dest_object = string.gsub(dest_object, "_inverted", "")
end
if string.find(dest_object, "_top") then
flip_upside_down = true
dest_object = string.gsub(dest_object, "_top", "")
end
if string.find(dest_object, "_wall") then
flip_to_wall = true
dest_object = string.gsub(dest_object, "_wall", "")
end
--print(" +---> convert " ..object)
--print(" | to " ..dest_object)
minetest.register_abm({
nodenames = {object},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
local fdir = node.param2
local nfdir = 20
if flip_upside_down and not flip_to_wall then
nfdir = dirs1[fdir + 1]
elseif flip_to_wall and not flip_upside_down then
nfdir = dirs2[fdir + 2]
end
minetest.set_node(pos, {name = dest_object, param2 = nfdir})
end
})
end
end

97
stairsplus/custom.lua Normal file
View File

@ -0,0 +1,97 @@
--[[
More Blocks: microblock definitions
Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
--[[
Subset table should have the following format: (You can remove entries as needed.)
local subset = {
{ "micro", "" },
{ "micro", "_1" },
{ "micro", "_2" },
{ "micro", "_4" },
{ "micro", "_12" },
{ "micro", "_14" },
{ "micro", "_15" },
{ "panel", "" },
{ "panel", "_1" },
{ "panel", "_2" },
{ "panel", "_4" },
{ "panel", "_12" },
{ "panel", "_14" },
{ "panel", "_15" },
{ "slab", "" },
{ "slab", "_quarter" },
{ "slab", "_three_quarter" },
{ "slab", "_1" },
{ "slab", "_2" },
{ "slab", "_14" },
{ "slab", "_15" },
{ "slab", "_two_sides" },
{ "slab", "_three_sides" },
{ "slab", "_three_sides_u" },
{ "slope", "" },
{ "slope", "_half" },
{ "slope", "_half_raised" },
{ "slope", "_inner" },
{ "slope", "_inner_half" },
{ "slope", "_inner_half_raised" },
{ "slope", "_inner_cut" },
{ "slope", "_inner_cut_half" },
{ "slope", "_inner_cut_half_raised" },
{ "slope", "_outer" },
{ "slope", "_outer_half" },
{ "slope", "_outer_half_raised" },
{ "slope", "_outer_cut" },
{ "slope", "_outer_cut_half" },
{ "slope", "_outer_cut_half_raised" },
{ "slope", "_cut" },
{ "stair", "" },
{ "stair", "_half" },
{ "stair", "_right_half" },
{ "stair", "_inner" },
{ "stair", "_outer" },
{ "stair", "_alt" },
{ "stair", "_alt_1" },
{ "stair", "_alt_2" },
{ "stair", "_alt_4" },
}
--]]
-- luacheck: no unused
local function register_custom_subset(subset, modname, subname, recipeitem, groups, images, description, drop, light)
stairsplus:register_custom_subset(subset, modname, subname, recipeitem, {
groups = groups,
tiles = images,
description = description,
drop = drop,
light_source = light,
sounds = moreblocks.node_sound_stone_defaults(),
})
end
function stairsplus:register_custom_subset_alias(subset, modname_old, subname_old, modname_new, subname_new)
local subset_copy = table.copy(subset)
for k, v in pairs(subset_copy) do
minetest.register_alias(modname_old .. ":" .. v[1] .. "_" .. subname_old .. v[2], modname_new .. ":" .. v[1] .. "_" .. subname_new .. v[2])
end
end
function stairsplus:register_custom_subset_alias_force(subset, modname_old, subname_old, modname_new, subname_new)
local subset_copy = table.copy(subset)
for k, v in pairs(subset_copy) do
minetest.register_alias_force(modname_old .. ":" .. v[1] .. "_" .. subname_old .. v[2], modname_new .. ":" .. v[1] .. "_" .. subname_new .. v[2])
end
end
function stairsplus:register_custom_subset(subset, modname, subname, recipeitem, fields)
local subset_copy = table.copy(subset)
for k, v in pairs(subset_copy) do
stairsplus.register_single(v[1], v[2], stairsplus.defs[v[1]][v[2]], modname, subname, recipeitem, fields)
end
circular_saw.known_nodes[recipeitem] = {modname, subname}
end

409
stairsplus/defs.lua Normal file
View File

@ -0,0 +1,409 @@
--[[
More Blocks: registrations
Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
local box_slope = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
{-0.5, -0.25, -0.25, 0.5, 0, 0.5},
{-0.5, 0, 0, 0.5, 0.25, 0.5},
{-0.5, 0.25, 0.25, 0.5, 0.5, 0.5}
}
}
local box_slope_half = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
{-0.5, -0.375, -0.25, 0.5, -0.25, 0.5},
{-0.5, -0.25, 0, 0.5, -0.125, 0.5},
{-0.5, -0.125, 0.25, 0.5, 0, 0.5},
}
}
local box_slope_half_raised = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.125, 0.5},
{-0.5, 0.125, -0.25, 0.5, 0.25, 0.5},
{-0.5, 0.25, 0, 0.5, 0.375, 0.5},
{-0.5, 0.375, 0.25, 0.5, 0.5, 0.5},
}
}
--==============================================================
local box_slope_inner = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
{-0.5, -0.5, -0.25, 0.5, 0, 0.5},
{-0.5, -0.5, -0.5, 0.25, 0, 0.5},
{-0.5, 0, -0.5, 0, 0.25, 0.5},
{-0.5, 0, 0, 0.5, 0.25, 0.5},
{-0.5, 0.25, 0.25, 0.5, 0.5, 0.5},
{-0.5, 0.25, -0.5, -0.25, 0.5, 0.5},
}
}
local box_slope_inner_half = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
{-0.5, -0.375, -0.25, 0.5, -0.25, 0.5},
{-0.5, -0.375, -0.5, 0.25, -0.25, 0.5},
{-0.5, -0.25, -0.5, 0, -0.125, 0.5},
{-0.5, -0.25, 0, 0.5, -0.125, 0.5},
{-0.5, -0.125, 0.25, 0.5, 0, 0.5},
{-0.5, -0.125, -0.5, -0.25, 0, 0.5},
}
}
local box_slope_inner_half_raised = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.125, 0.5},
{-0.5, 0.125, -0.25, 0.5, 0.25, 0.5},
{-0.5, 0.125, -0.5, 0.25, 0.25, 0.5},
{-0.5, 0.25, -0.5, 0, 0.375, 0.5},
{-0.5, 0.25, 0, 0.5, 0.375, 0.5},
{-0.5, 0.375, 0.25, 0.5, 0.5, 0.5},
{-0.5, 0.375, -0.5, -0.25, 0.5, 0.5},
}
}
--==============================================================
local box_slope_outer = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
{-0.5, -0.25, -0.25, 0.25, 0, 0.5},
{-0.5, 0, 0, 0, 0.25, 0.5},
{-0.5, 0.25, 0.25, -0.25, 0.5, 0.5}
}
}
local box_slope_outer_half = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
{-0.5, -0.375, -0.25, 0.25, -0.25, 0.5},
{-0.5, -0.25, 0, 0, -0.125, 0.5},
{-0.5, -0.125, 0.25, -0.25, 0, 0.5}
}
}
local box_slope_outer_half_raised = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.125, 0.5},
{-0.5, 0.125, -0.25, 0.25, 0.25, 0.5},
{-0.5, 0.25, 0, 0, 0.375, 0.5},
{-0.5, 0.375, 0.25, -0.25, 0.5, 0.5}
}
}
stairsplus.defs = {
["micro"] = {
[""] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0, 0, 0.5},
},
},
["_1"] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0, -0.4375, 0.5},
},
},
["_2"] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0, -0.375, 0.5},
},
},
["_4"] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0, -0.25, 0.5},
},
},
["_12"] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0, 0.25, 0.5},
},
},
["_14"] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0, 0.375, 0.5},
},
},
["_15"] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0, 0.4375, 0.5},
},
}
},
["panel"] = {
[""] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0, 0.5},
},
},
["_1"] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, -0.4375, 0.5},
},
},
["_2"] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, -0.375, 0.5},
},
},
["_4"] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, -0.25, 0.5},
},
},
["_12"] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0.25, 0.5},
},
},
["_14"] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0.375, 0.5},
},
},
["_15"] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0.4375, 0.5},
},
}
},
["slab"] = {
[""] = 8,
["_quarter"] = 4,
["_three_quarter"] = 12,
["_1"] = 1,
["_2"] = 2,
["_14"] = 14,
["_15"] = 15,
["_two_sides"] = {
{ -0.5, -0.5, -0.5, 0.5, -7/16, 7/16 },
{ -0.5, -0.5, 7/16, 0.5, 0.5, 0.5 }
},
["_three_sides"] = {
{ -7/16, -0.5, -0.5, 0.5, -7/16, 7/16 },
{ -7/16, -0.5, 7/16, 0.5, 0.5, 0.5 },
{ -0.5, -0.5, -0.5, -7/16, 0.5, 0.5 }
},
["_three_sides_u"] = {
{ -0.5, -0.5, -0.5, 0.5, 0.5, -7/16 },
{ -0.5, -0.5, -7/16, 0.5, -7/16, 7/16 },
{ -0.5, -0.5, 7/16, 0.5, 0.5, 0.5 }
}
},
["slope"] = {
[""] = {
mesh = "moreblocks_slope.obj",
collision_box = box_slope,
selection_box = box_slope,
},
["_half"] = {
mesh = "moreblocks_slope_half.obj",
collision_box = box_slope_half,
selection_box = box_slope_half,
},
["_half_raised"] = {
mesh = "moreblocks_slope_half_raised.obj",
collision_box = box_slope_half_raised,
selection_box = box_slope_half_raised,
},
--==============================================================
["_inner"] = {
mesh = "moreblocks_slope_inner.obj",
collision_box = box_slope_inner,
selection_box = box_slope_inner,
},
["_inner_half"] = {
mesh = "moreblocks_slope_inner_half.obj",
collision_box = box_slope_inner_half,
selection_box = box_slope_inner_half,
},
["_inner_half_raised"] = {
mesh = "moreblocks_slope_inner_half_raised.obj",
collision_box = box_slope_inner_half_raised,
selection_box = box_slope_inner_half_raised,
},
--==============================================================
["_inner_cut"] = {
mesh = "moreblocks_slope_inner_cut.obj",
collision_box = box_slope_inner,
selection_box = box_slope_inner,
},
["_inner_cut_half"] = {
mesh = "moreblocks_slope_inner_cut_half.obj",
collision_box = box_slope_inner_half,
selection_box = box_slope_inner_half,
},
["_inner_cut_half_raised"] = {
mesh = "moreblocks_slope_inner_cut_half_raised.obj",
collision_box = box_slope_inner_half_raised,
selection_box = box_slope_inner_half_raised,
},
--==============================================================
["_outer"] = {
mesh = "moreblocks_slope_outer.obj",
collision_box = box_slope_outer,
selection_box = box_slope_outer,
},
["_outer_half"] = {
mesh = "moreblocks_slope_outer_half.obj",
collision_box = box_slope_outer_half,
selection_box = box_slope_outer_half,
},
["_outer_half_raised"] = {
mesh = "moreblocks_slope_outer_half_raised.obj",
collision_box = box_slope_outer_half_raised,
selection_box = box_slope_outer_half_raised,
},
--==============================================================
["_outer_cut"] = {
mesh = "moreblocks_slope_outer_cut.obj",
collision_box = box_slope_outer,
selection_box = box_slope_outer,
},
["_outer_cut_half"] = {
mesh = "moreblocks_slope_outer_cut_half.obj",
collision_box = box_slope_outer_half,
selection_box = box_slope_outer_half,
},
["_outer_cut_half_raised"] = {
mesh = "moreblocks_slope_outer_cut_half_raised.obj",
collision_box = box_slope_outer_half_raised,
selection_box = box_slope_outer_half_raised,
},
["_cut"] = {
mesh = "moreblocks_slope_cut.obj",
collision_box = box_slope_outer,
selection_box = box_slope_outer,
},
},
["stair"] = {
[""] = {
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
{-0.5, 0, 0, 0.5, 0.5, 0.5},
},
},
},
["_half"] = {
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0, 0, 0.5},
{-0.5, 0, 0, 0, 0.5, 0.5},
},
},
},
["_right_half"] = {
node_box = {
type = "fixed",
fixed = {
{0, -0.5, -0.5, 0.5, 0, 0.5},
{0, 0, 0, 0.5, 0.5, 0.5},
},
},
},
["_inner"] = {
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
{-0.5, 0, 0, 0.5, 0.5, 0.5},
{-0.5, 0, -0.5, 0, 0.5, 0},
},
},
},
["_outer"] = {
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
{-0.5, 0, 0, 0, 0.5, 0.5},
},
},
},
["_alt"] = {
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0},
{-0.5, 0, 0, 0.5, 0.5, 0.5},
},
},
},
["_alt_1"] = {
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.0625, -0.5, 0.5, 0, 0},
{-0.5, 0.4375, 0, 0.5, 0.5, 0.5},
},
},
},
["_alt_2"] = {
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.125, -0.5, 0.5, 0, 0},
{-0.5, 0.375, 0, 0.5, 0.5, 0.5},
},
},
},
["_alt_4"] = {
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.25, -0.5, 0.5, 0, 0},
{-0.5, 0.25, 0, 0.5, 0.5, 0.5},
},
},
},
},
}
for type,a in pairs(stairsplus.defs) do
for name,b in pairs(stairsplus.defs[type]) do
table.insert(stairsplus.shapes_list, { type .. "_", name })
end
end

View File

@ -1,42 +1,31 @@
--[[ --[[
More Blocks: Stairs+ More Blocks: Stairs+
Copyright (c) 2011-2017 Hugo Locurcio and contributors. Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information. Licensed under the zlib license. See LICENSE.md for more information.
--]] --]]
-- Nodes will be called <modname>:{stair,slab,panel,micro}_<subname> -- Nodes will be called <modname>:{stair,slab,panel,micro,slope}_<subname>
local modpath = minetest.get_modpath("moreblocks").. "/stairsplus" local modpath = minetest.get_modpath("moreblocks").. "/stairsplus"
stairsplus = {} stairsplus = {}
stairsplus.expect_infinite_stacks = false stairsplus.expect_infinite_stacks = false
if not minetest.get_modpath("unified_inventory") stairsplus.shapes_list = {}
and minetest.setting_getbool("creative_mode") then
stairsplus.expect_infinite_stacks = true
end
function stairsplus.copytable(orig) if
local orig_type = type(orig) not minetest.get_modpath("unified_inventory")
local copy and minetest.settings:get_bool("creative_mode")
if orig_type == 'table' then then
copy = {} stairsplus.expect_infinite_stacks = true
for orig_key, orig_value in next, orig, nil do
copy[stairsplus.copytable(orig_key)] = stairsplus.copytable(orig_value)
end
setmetatable(copy, stairsplus.copytable(getmetatable(orig)))
else
copy = orig
end
return copy
end end
function stairsplus:prepare_groups(groups) function stairsplus:prepare_groups(groups)
local result = {} local result = {}
if groups then if groups then
for k, v in pairs(groups) do for k, v in pairs(groups) do
if k ~= "wood" and k ~= "stone" then if k ~= "wood" and k ~= "stone" and k ~= "wool" and k ~= "tree" then
result[k] = v result[k] = v
end end
end end
@ -49,11 +38,10 @@ end
function stairsplus:register_all(modname, subname, recipeitem, fields) function stairsplus:register_all(modname, subname, recipeitem, fields)
self:register_stair(modname, subname, recipeitem, fields) self:register_stair(modname, subname, recipeitem, fields)
self:register_slab (modname, subname, recipeitem, fields) self:register_slab(modname, subname, recipeitem, fields)
self:register_slope(modname, subname, recipeitem, fields) self:register_slope(modname, subname, recipeitem, fields)
self:register_panel(modname, subname, recipeitem, fields) self:register_panel(modname, subname, recipeitem, fields)
self:register_micro(modname, subname, recipeitem, fields) self:register_micro(modname, subname, recipeitem, fields)
-- self:register_6dfacedir_conversion(modname, subname) -- Not needed as of Q3 2013, uncomment to fix old maps.
end end
function stairsplus:register_alias_all(modname_old, subname_old, modname_new, subname_new) function stairsplus:register_alias_all(modname_old, subname_old, modname_new, subname_new)
@ -71,7 +59,8 @@ function stairsplus:register_alias_force_all(modname_old, subname_old, modname_n
self:register_micro_alias_force(modname_old, subname_old, modname_new, subname_new) self:register_micro_alias_force(modname_old, subname_old, modname_new, subname_new)
end end
function register_stair_slab_panel_micro(modname, subname, recipeitem, groups, images, description, drop, light) -- luacheck: no unused
local function register_stair_slab_panel_micro(modname, subname, recipeitem, groups, images, description, drop, light)
stairsplus:register_all(modname, subname, recipeitem, { stairsplus:register_all(modname, subname, recipeitem, {
groups = groups, groups = groups,
tiles = images, tiles = images,
@ -81,11 +70,13 @@ function register_stair_slab_panel_micro(modname, subname, recipeitem, groups, i
}) })
end end
-- dofile(modpath.. "/aliases.lua") -- Not needed as of Q2 2013, uncomment to fix old maps. dofile(modpath .. "/defs.lua")
-- dofile(modpath.. "/conversion.lua") -- Not needed as of Q2 2013, uncomment to fix old maps. dofile(modpath .. "/recipes.lua")
dofile(modpath .. "/common.lua")
dofile(modpath .. "/stairs.lua") dofile(modpath .. "/stairs.lua")
dofile(modpath .. "/slabs.lua") dofile(modpath .. "/slabs.lua")
dofile(modpath .. "/slopes.lua") dofile(modpath .. "/slopes.lua")
dofile(modpath .. "/panels.lua") dofile(modpath .. "/panels.lua")
dofile(modpath .. "/microblocks.lua") dofile(modpath .. "/microblocks.lua")
dofile(modpath .. "/custom.lua")
dofile(modpath .. "/registrations.lua") dofile(modpath .. "/registrations.lua")

View File

@ -1,153 +1,44 @@
--[[ --[[
More Blocks: microblock definitions More Blocks: microblock definitions
Copyright (c) 2011-2017 Hugo Locurcio and contributors. Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information. Licensed under the zlib license. See LICENSE.md for more information.
--]] --]]
local S = moreblocks.intllib
-- Node will be called <modname>:micro_<subname> -- Node will be called <modname>:micro_<subname>
function register_micro(modname, subname, recipeitem, groups, images, description, drop, light) -- luacheck: no unused
local function register_micro(modname, subname, recipeitem, groups, images, description, drop, light)
stairsplus:register_micro(modname, subname, recipeitem, { stairsplus:register_micro(modname, subname, recipeitem, {
groups = groups, groups = groups,
tiles = images, tiles = images,
description = description, description = description,
drop = drop, drop = drop,
light_source = light, light_source = light,
sounds = default.node_sound_stone_defaults(), sounds = moreblocks.node_sound_stone_defaults(),
}) })
end end
local microblocks_defs = {
[""] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0, 0, 0.5},
},
},
["_1"] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0, -0.4375, 0.5},
},
},
["_2"] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0, -0.375, 0.5},
},
},
["_4"] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0, -0.25, 0.5},
},
},
["_12"] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0, 0.25, 0.5},
},
},
["_14"] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0, 0.375, 0.5},
},
},
["_15"] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0, 0.4375, 0.5},
},
}
}
function stairsplus:register_micro_alias(modname_old, subname_old, modname_new, subname_new) function stairsplus:register_micro_alias(modname_old, subname_old, modname_new, subname_new)
local defs = stairsplus.copytable(microblocks_defs) local defs = table.copy(stairsplus.defs["micro"])
for alternate, def in pairs(defs) do for alternate, def in pairs(defs) do
minetest.register_alias(modname_old .. ":micro_" .. subname_old .. alternate, modname_new .. ":micro_" .. subname_new .. alternate) minetest.register_alias(modname_old .. ":micro_" .. subname_old .. alternate, modname_new .. ":micro_" .. subname_new .. alternate)
end end
end end
function stairsplus:register_micro_alias_force(modname_old, subname_old, modname_new, subname_new) function stairsplus:register_micro_alias_force(modname_old, subname_old, modname_new, subname_new)
local defs = stairsplus.copytable(microblocks_defs) local defs = table.copy(stairsplus.defs["micro"])
for alternate, def in pairs(defs) do for alternate, def in pairs(defs) do
minetest.register_alias_force(modname_old .. ":micro_" .. subname_old .. alternate, modname_new .. ":micro_" .. subname_new .. alternate) minetest.register_alias_force(modname_old .. ":micro_" .. subname_old .. alternate, modname_new .. ":micro_" .. subname_new .. alternate)
end end
end end
function stairsplus:register_micro(modname, subname, recipeitem, fields) function stairsplus:register_micro(modname, subname, recipeitem, fields)
local defs = stairsplus.copytable(microblocks_defs) local defs = table.copy(stairsplus.defs["micro"])
local desc = S("%s Microblock"):format(fields.description)
for alternate, def in pairs(defs) do for alternate, def in pairs(defs) do
for k, v in pairs(fields) do stairsplus.register_single("micro", alternate, def, modname, subname, recipeitem, fields)
def[k] = v
end
def.drawtype = "nodebox"
def.paramtype = "light"
def.paramtype2 = def.paramtype2 or "facedir"
def.on_place = minetest.rotate_node
def.groups = stairsplus:prepare_groups(fields.groups)
def.description = desc
if fields.drop and not (type(fields.drop) == "table") then
def.drop = modname.. ":micro_" ..fields.drop..alternate
end
minetest.register_node(":" ..modname.. ":micro_" ..subname..alternate, def)
end end
minetest.register_alias(modname.. ":micro_" ..subname.. "_bottom", modname.. ":micro_" ..subname)
circular_saw.known_nodes[recipeitem] = {modname, subname} circular_saw.known_nodes[recipeitem] = {modname, subname}
circular_saw.microblocks[modname.. ":micro_" .. subname] = {modname, subname}
-- Some saw-less recipes:
minetest.register_craft({
type = "shapeless",
output = modname .. ":micro_" .. subname .. " 7",
recipe = {modname .. ":stair_" .. subname .. "_inner"},
})
minetest.register_craft({
output = modname .. ":micro_" .. subname .. " 6",
type = "shapeless",
recipe = {modname .. ":stair_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":micro_" .. subname .. " 5",
recipe = {modname .. ":stair_" .. subname .. "_outer"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":micro_" .. subname .. " 4",
recipe = {modname .. ":slab_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":micro_" .. subname .. " 4",
recipe = {modname .. ":stair_" .. subname .. "_alt"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":micro_" .. subname .. " 3",
recipe = {modname .. ":stair_" .. subname .. "_right_half"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":micro_" .. subname .. " 2",
recipe = {modname .. ":panel_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
})
end end

View File

@ -1,133 +1,43 @@
--[[ --[[
More Blocks: panel definitions More Blocks: panel definitions
Copyright (c) 2011-2017 Hugo Locurcio and contributors. Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information. Licensed under the zlib license. See LICENSE.md for more information.
--]] --]]
local S = moreblocks.intllib
-- Node will be called <modname>:panel_<subname> -- Node will be called <modname>:panel_<subname>
function register_panel(modname, subname, recipeitem, groups, images, description, drop, light) -- luacheck: no unused
local function register_panel(modname, subname, recipeitem, groups, images, description, drop, light)
stairsplus:register_panel(modname, subname, recipeitem, { stairsplus:register_panel(modname, subname, recipeitem, {
groups = groups, groups = groups,
tiles = images, tiles = images,
description = description, description = description,
drop = drop, drop = drop,
light_source = light, light_source = light,
sounds = default.node_sound_stone_defaults(), sounds = moreblocks.node_sound_stone_defaults(),
}) })
end end
local panels_defs = {
[""] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0, 0.5},
},
},
["_1"] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, -0.4375, 0.5},
},
},
["_2"] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, -0.375, 0.5},
},
},
["_4"] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, -0.25, 0.5},
},
},
["_12"] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0.25, 0.5},
},
},
["_14"] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0.375, 0.5},
},
},
["_15"] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0.4375, 0.5},
},
}
}
function stairsplus:register_panel_alias(modname_old, subname_old, modname_new, subname_new) function stairsplus:register_panel_alias(modname_old, subname_old, modname_new, subname_new)
local defs = stairsplus.copytable(panels_defs) local defs = table.copy(stairsplus.defs["panel"])
for alternate, def in pairs(defs) do for alternate, def in pairs(defs) do
minetest.register_alias(modname_old .. ":panel_" .. subname_old .. alternate, modname_new .. ":panel_" .. subname_new .. alternate) minetest.register_alias(modname_old .. ":panel_" .. subname_old .. alternate, modname_new .. ":panel_" .. subname_new .. alternate)
end end
end end
function stairsplus:register_panel_alias_force(modname_old, subname_old, modname_new, subname_new) function stairsplus:register_panel_alias_force(modname_old, subname_old, modname_new, subname_new)
local defs = stairsplus.copytable(panels_defs) local defs = table.copy(stairsplus.defs["panel"])
for alternate, def in pairs(defs) do for alternate, def in pairs(defs) do
minetest.register_alias_force(modname_old .. ":panel_" .. subname_old .. alternate, modname_new .. ":panel_" .. subname_new .. alternate) minetest.register_alias_force(modname_old .. ":panel_" .. subname_old .. alternate, modname_new .. ":panel_" .. subname_new .. alternate)
end end
end end
function stairsplus:register_panel(modname, subname, recipeitem, fields) function stairsplus:register_panel(modname, subname, recipeitem, fields)
local defs = stairsplus.copytable(panels_defs) local defs = table.copy(stairsplus.defs["panel"])
local desc = S("%s Panel"):format(fields.description)
for alternate, def in pairs(defs) do for alternate, def in pairs(defs) do
for k, v in pairs(fields) do stairsplus.register_single("panel", alternate, def, modname, subname, recipeitem, fields)
def[k] = v
end
def.drawtype = "nodebox"
def.paramtype = "light"
def.paramtype2 = def.paramtype2 or "facedir"
def.on_place = minetest.rotate_node
def.description = desc
def.groups = stairsplus:prepare_groups(fields.groups)
if fields.drop and not (type(fields.drop) == "table") then
def.drop = modname.. ":panel_" ..fields.drop..alternate
end
minetest.register_node(":" ..modname.. ":panel_" ..subname..alternate, def)
end end
minetest.register_alias(modname.. ":panel_" ..subname.. "_bottom", modname.. ":panel_" ..subname)
circular_saw.known_nodes[recipeitem] = {modname, subname} circular_saw.known_nodes[recipeitem] = {modname, subname}
-- Some saw-less recipes:
minetest.register_craft({
output = modname .. ":panel_" .. subname .. " 12",
recipe = {
{recipeitem, ""},
{recipeitem, recipeitem},
},
})
minetest.register_craft({
output = modname .. ":panel_" .. subname .. " 12",
recipe = {
{"", recipeitem},
{recipeitem, recipeitem},
},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":panel_" .. subname,
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
})
end end

443
stairsplus/recipes.lua Normal file
View File

@ -0,0 +1,443 @@
--[[
More Blocks: Stairs+
Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
stairsplus.register_recipes = function(category, alternate, modname, subname, recipeitem)
if category == "micro" and alternate == "" then
minetest.register_craft({
type = "shapeless",
output = modname .. ":micro_" .. subname .. " 7",
recipe = {modname .. ":stair_" .. subname .. "_inner"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":micro_" .. subname .. " 6",
recipe = {modname .. ":stair_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":micro_" .. subname .. " 5",
recipe = {modname .. ":stair_" .. subname .. "_outer"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":micro_" .. subname .. " 4",
recipe = {modname .. ":slab_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":micro_" .. subname .. " 4",
recipe = {modname .. ":stair_" .. subname .. "_alt"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":micro_" .. subname .. " 3",
recipe = {modname .. ":stair_" .. subname .. "_right_half"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":micro_" .. subname .. " 2",
recipe = {modname .. ":panel_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
})
minetest.register_alias(modname .. ":micro_" .. subname .. "_bottom", modname .. ":micro_" .. subname)
elseif category == "panel" and alternate == "" then
minetest.register_craft({
output = modname .. ":panel_" .. subname .. " 12",
recipe = {
{recipeitem, ""},
{recipeitem, recipeitem},
},
})
minetest.register_craft({
output = modname .. ":panel_" .. subname .. " 12",
recipe = {
{"", recipeitem},
{recipeitem, recipeitem},
},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":panel_" .. subname,
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
})
minetest.register_alias(modname.. ":panel_" ..subname.. "_bottom", modname.. ":panel_" ..subname)
elseif category == "slab" then
if alternate == "" then
minetest.register_craft({
output = modname .. ":slab_" .. subname .. " 6",
recipe = {{recipeitem, recipeitem, recipeitem}},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname,
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
})
-- uncomment this rule when conflict is no longer likely to happen
-- https://github.com/minetest/minetest/issues/2881
-- minetest.register_craft({
-- type = "shapeless",
-- output = modname .. ":slab_" .. subname,
-- recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
-- })
-- then remove these two
minetest.register_craft({
output = modname .. ":slab_" .. subname,
recipe = {{modname .. ":panel_" .. subname, modname .. ":panel_" .. subname}},
})
minetest.register_craft({
output = modname .. ":slab_" .. subname,
recipe = {
{modname .. ":panel_" .. subname},
{modname .. ":panel_" .. subname},
},
})
------------------------------
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slab_" .. subname, modname .. ":slab_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname .. " 3",
recipe = {modname .. ":stair_" .. subname, modname .. ":stair_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname,
recipe = {modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname,
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname,
recipe = {modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname,
recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname,
recipe = {modname .. ":slope_" .. subname .. "_outer_half", modname .. ":slope_" .. subname .. "_inner_half"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname,
recipe = {modname .. ":slope_" .. subname .. "_outer_cut_half", modname .. ":slope_" .. subname .. "_inner_cut_half"},
})
elseif alternate == "_quarter" then
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter"},
})
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slab_" .. subname .. "_three_quarter", modname .. ":slab_" .. subname .. "_quarter"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname .. "_quarter",
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname .. "_quarter",
recipe = {modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1"},
})
elseif alternate == "_three_quarter" then
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname .. "_three_quarter",
recipe = {modname .. ":slab_" .. subname, modname .. ":slab_" .. subname .. "_quarter"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname .. "_three_quarter",
recipe = {modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname .. "_three_quarter",
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
})
elseif alternate == "_2" then
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
})
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slab_" .. subname .. "_14", modname .. ":slab_" .. subname .. "_2"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname .. "_2",
recipe = {modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1"},
})
elseif alternate == "_14" then
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname .. "_14",
recipe = {modname .. ":slab_" .. subname .. "_three_quarter", modname .. ":slab_" .. subname .. "_2"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname .. "_14",
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
})
elseif alternate == "_15" then
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slab_" .. subname .. "_15", modname .. ":slab_" .. subname .. "_1"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname .. "_15",
recipe = {modname .. ":slab_" .. subname .. "_14", modname .. ":slab_" .. subname .. "_1"},
})
end
elseif category == "slope" then
if alternate == "" then
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slope_" .. subname, modname .. ":slope_" .. subname},
})
elseif alternate == "_half" then
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half_raised"},
})
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half",
modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half"},
})
elseif alternate == "_outer" then
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slope_" .. subname .. "_outer", modname .. ":slope_" .. subname .. "_inner"},
})
elseif alternate == "_outer_half" then
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slope_" .. subname .. "_outer_half", modname .. ":slope_" .. subname .. "_inner_half_raised"},
})
elseif alternate == "_inner_half" then
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slope_" .. subname .. "_outer_half_raised", modname .. ":slope_" .. subname .. "_inner_half"},
})
elseif alternate == "_outer_cut" then
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slope_" .. subname .. "_outer_cut", modname .. ":slope_" .. subname .. "_inner_cut"},
})
elseif alternate == "_outer_cut_half" then
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slope_" .. subname .. "_outer_cut_half", modname .. ":slope_" .. subname .. "_inner_cut_half_raised"},
})
elseif alternate == "_cut" then
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slope_" .. subname .. "_cut", modname .. ":slope_" .. subname .. "_cut"},
})
elseif alternate == "_half_raised" then
minetest.register_craft({
type = "shapeless",
output = modname .. ":slope_" .. subname .. "_half_raised",
recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half",
modname .. ":slope_" .. subname .. "_half"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slope_" .. subname .. "_half_raised",
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_half"},
})
elseif alternate == "_inner_half_raised" then
minetest.register_craft({
type = "shapeless",
output = modname .. ":slope_" .. subname .. "_inner_half_raised",
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_inner_half"},
})
elseif alternate == "_outer_half_raised" then
minetest.register_craft({
type = "shapeless",
output = modname .. ":slope_" .. subname .. "_outer_half_raised",
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_outer_half"},
})
elseif alternate == "_inner_cut_half_raised" then
minetest.register_craft({
type = "shapeless",
output = modname .. ":slope_" .. subname .. "_inner_cut_half_raised",
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_inner_cut_half"},
})
end
elseif category == "stair" then
if alternate == "" then
minetest.register_craft({
output = modname .. ":stair_" .. subname .. " 8",
recipe = {
{recipeitem, "", ""},
{recipeitem, recipeitem, ""},
{recipeitem, recipeitem, recipeitem},
},
})
minetest.register_craft({
output = modname .. ":stair_" .. subname .. " 8",
recipe = {
{"", "", recipeitem},
{"", recipeitem, recipeitem},
{recipeitem, recipeitem, recipeitem},
},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":stair_" .. subname,
recipe = {modname .. ":panel_" .. subname, modname .. ":slab_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":stair_" .. subname,
recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":stair_" .. subname,
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":stair_" .. subname,
recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
})
elseif alternate == "_inner" then
minetest.register_craft({
type = "shapeless",
output = modname .. ":stair_" .. subname .. "_inner",
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
})
elseif alternate == "_outer" then
minetest.register_craft({
type = "shapeless",
output = modname .. ":stair_" .. subname .. "_outer",
recipe = {modname .. ":micro_" .. subname, modname .. ":slab_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":stair_" .. subname .. "_outer",
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
})
elseif alternate == "_half" then
minetest.register_craft({
type = "shapeless",
output = modname .. ":stair_" .. subname .. "_half",
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":stair_" .. subname .. "_half",
recipe = {modname .. ":panel_" .. subname, modname .. ":micro_" .. subname},
})
elseif alternate == "_right_half" then
minetest.register_craft({
type = "shapeless",
output = modname .. ":stair_" .. subname .. "_right_half",
recipe = {modname .. ":stair_" .. subname .. "_half"},
})
elseif alternate == "_alt" then
minetest.register_craft({ -- See mirrored variation of the recipe below.
output = modname .. ":stair_" .. subname .. "_alt",
recipe = {
{modname .. ":panel_" .. subname, ""},
{"" , modname .. ":panel_" .. subname},
},
})
minetest.register_craft({ -- Mirrored variation of the recipe above.
output = modname .. ":stair_" .. subname .. "_alt",
recipe = {
{"" , modname .. ":panel_" .. subname},
{modname .. ":panel_" .. subname, ""},
},
})
end
end
end

View File

@ -1,65 +1,163 @@
--[[ --[[
More Blocks: registrations More Blocks: registrations
Copyright (c) 2011-2017 Hugo Locurcio and contributors. Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information. Licensed under the zlib license. See LICENSE.md for more information.
--]] --]]
local S = moreblocks.S
-- default registrations
if minetest.get_modpath("default") then
local default_nodes = { -- Default stairs/slabs/panels/microblocks:
"stone",
"stone_block",
"cobble",
"mossycobble",
"brick",
"sandstone",
"steelblock",
"goldblock",
"copperblock",
"bronzeblock",
"diamondblock",
"tinblock",
"desert_stone",
"desert_stone_block",
"desert_cobble",
"meselamp",
"glass",
"tree",
"wood",
"jungletree",
"junglewood",
"pine_tree",
"pine_wood",
"acacia_tree",
"acacia_wood",
"aspen_tree",
"aspen_wood",
"obsidian",
"obsidian_block",
"obsidianbrick",
"obsidian_glass",
"stonebrick",
"desert_stonebrick",
"sandstonebrick",
"silver_sandstone",
"silver_sandstone_brick",
"silver_sandstone_block",
"desert_sandstone",
"desert_sandstone_brick",
"desert_sandstone_block",
"sandstone_block",
"coral_skeleton",
"ice",
}
local default_nodes = { -- Default stairs/slabs/panels/microblocks: for _, name in pairs(default_nodes) do
"stone", local mod = "default"
"cobble", local nodename = mod .. ":" .. name
"mossycobble", local ndef = table.copy(minetest.registered_nodes[nodename])
"brick", ndef.sunlight_propagates = true
"sandstone",
"steelblock",
"goldblock",
"copperblock",
"bronzeblock",
"diamondblock",
"desert_stone",
"desert_cobble",
"meselamp",
"glass",
"tree",
"wood",
"jungletree",
"junglewood",
"pine_tree",
"pine_wood",
"acacia_tree",
"acacia_wood",
"aspen_tree",
"aspen_wood",
"obsidian",
"obsidian_glass",
"stonebrick",
"desert_stonebrick",
"sandstonebrick",
"obsidianbrick",
}
for _, name in pairs(default_nodes) do -- Stone and desert_stone drop cobble and desert_cobble respectively.
local nodename = "default:" .. name
local ndef = minetest.registered_nodes[nodename]
if ndef then
local drop
if type(ndef.drop) == "string" then if type(ndef.drop) == "string" then
drop = ndef.drop:sub(9) ndef.drop = ndef.drop:gsub(".+:", "")
end end
local tiles = ndef.tiles -- Use the primary tile for all sides of cut glasslike nodes and disregard paramtype2.
if #ndef.tiles > 1 and ndef.drawtype:find("glass") then if #ndef.tiles > 1 and ndef.drawtype and ndef.drawtype:find("glass") then
tiles = { ndef.tiles[1] } ndef.tiles = {ndef.tiles[1]}
ndef.paramtype2 = nil
end end
stairsplus:register_all("moreblocks", name, nodename, { mod = "moreblocks"
description = ndef.description, stairsplus:register_all(mod, name, nodename, ndef)
drop = drop, minetest.register_alias_force("stairs:stair_" .. name, mod .. ":stair_" .. name)
groups = ndef.groups, minetest.register_alias_force("stairs:stair_outer_" .. name, mod .. ":stair_" .. name .. "_outer")
sounds = ndef.sounds, minetest.register_alias_force("stairs:stair_inner_" .. name, mod .. ":stair_" .. name .. "_inner")
tiles = tiles, minetest.register_alias_force("stairs:slab_" .. name, mod .. ":slab_" .. name)
sunlight_propagates = true,
light_source = ndef.light_source
})
end end
end end
-- farming registrations
if minetest.get_modpath("farming") then
local farming_nodes = {"straw"}
for _, name in pairs(farming_nodes) do
local mod = "farming"
local nodename = mod .. ":" .. name
local ndef = table.copy(minetest.registered_nodes[nodename])
ndef.sunlight_propagates = true
mod = "moreblocks"
stairsplus:register_all(mod, name, nodename, ndef)
minetest.register_alias_force("stairs:stair_" .. name, mod .. ":stair_" .. name)
minetest.register_alias_force("stairs:stair_outer_" .. name, mod .. ":stair_" .. name .. "_outer")
minetest.register_alias_force("stairs:stair_inner_" .. name, mod .. ":stair_" .. name .. "_inner")
minetest.register_alias_force("stairs:slab_" .. name, mod .. ":slab_" .. name)
end
end
-- wool registrations
if minetest.get_modpath("wool") then
local dyes = {"white", "grey", "black", "red", "yellow", "green", "cyan",
"blue", "magenta", "orange", "violet", "brown", "pink",
"dark_grey", "dark_green"}
for _, name in pairs(dyes) do
local mod = "wool"
local nodename = mod .. ":" .. name
local ndef = table.copy(minetest.registered_nodes[nodename])
ndef.sunlight_propagates = true
stairsplus:register_all(mod, name, nodename, ndef)
end
end
-- basic_materials, keeping the original other-mod-oriented names
-- for backwards compatibility
if minetest.get_modpath("basic_materials") then
stairsplus:register_all("technic","concrete","basic_materials:concrete_block",{
description = S("Concrete"),
tiles = {"basic_materials_concrete_block.png",},
groups = {cracky=1, level=2, concrete=1},
sounds = moreblocks.node_sound_stone_defaults(),
})
minetest.register_alias("prefab:concrete_stair","technic:stair_concrete")
minetest.register_alias("prefab:concrete_slab","technic:slab_concrete")
stairsplus:register_all("gloopblocks", "cement", "basic_materials:cement_block", {
description = S("Cement"),
tiles = {"basic_materials_cement_block.png"},
groups = {cracky=2, not_in_creative_inventory=1},
sounds = moreblocks.node_sound_stone_defaults(),
sunlight_propagates = true,
})
stairsplus:register_all("technic", "brass_block", "basic_materials:brass_block", {
description= S("Brass Block"),
groups={cracky=1, not_in_creative_inventory=1},
tiles={"basic_materials_brass_block.png"},
})
end
-- Alias cuts of split_stone_tile_alt which was renamed checker_stone_tile.
stairsplus:register_alias_all("moreblocks", "split_stone_tile_alt", "moreblocks", "checker_stone_tile")
-- The following LBM is necessary because the name stair_split_stone_tile_alt
-- conflicts with another node and so the alias for that specific node gets
-- ignored.
minetest.register_lbm({
name = "moreblocks:fix_split_stone_tile_alt_name_collision",
nodenames = {"moreblocks:stair_split_stone_tile_alt"},
action = function(pos, node)
minetest.set_node(pos, {
name = "moreblocks:stair_checker_stone_tile",
param2 = minetest.get_node(pos).param2
})
minetest.log('action', "LBM replaced " .. node.name ..
" at " .. minetest.pos_to_string(pos))
end,
})

View File

@ -1,224 +1,43 @@
--[[ --[[
More Blocks: slab definitions More Blocks: slab definitions
Copyright (c) 2011-2017 Hugo Locurcio and contributors. Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information. Licensed under the zlib license. See LICENSE.md for more information.
--]] --]]
local S = moreblocks.intllib
-- Node will be called <modname>:slab_<subname> -- Node will be called <modname>:slab_<subname>
function register_slab(modname, subname, recipeitem, groups, images, description, drop, light) -- luacheck: no unused
local function register_slab(modname, subname, recipeitem, groups, images, description, drop, light)
stairsplus:register_slab(modname, subname, recipeitem, { stairsplus:register_slab(modname, subname, recipeitem, {
groups = groups, groups = groups,
tiles = images, tiles = images,
description = description, description = description,
drop = drop, drop = drop,
light_source = light, light_source = light,
sounds = default.node_sound_stone_defaults(), sounds = moreblocks.node_sound_stone_defaults(),
}) })
end end
local slabs_defs = {
[""] = 8,
["_quarter"] = 4,
["_three_quarter"] = 12,
["_1"] = 1,
["_2"] = 2,
["_14"] = 14,
["_15"] = 15,
}
function stairsplus:register_slab_alias(modname_old, subname_old, modname_new, subname_new) function stairsplus:register_slab_alias(modname_old, subname_old, modname_new, subname_new)
local defs = stairsplus.copytable(slabs_defs) local defs = table.copy(stairsplus.defs["slab"])
for alternate, def in pairs(defs) do for alternate, def in pairs(defs) do
minetest.register_alias(modname_old .. ":slab_" .. subname_old .. alternate, modname_new .. ":slab_" .. subname_new .. alternate) minetest.register_alias(modname_old .. ":slab_" .. subname_old .. alternate, modname_new .. ":slab_" .. subname_new .. alternate)
end end
end end
function stairsplus:register_slab_alias_force(modname_old, subname_old, modname_new, subname_new) function stairsplus:register_slab_alias_force(modname_old, subname_old, modname_new, subname_new)
local defs = stairsplus.copytable(slabs_defs) local defs = table.copy(stairsplus.defs["slab"])
for alternate, def in pairs(defs) do for alternate, def in pairs(defs) do
minetest.register_alias_force(modname_old .. ":slab_" .. subname_old .. alternate, modname_new .. ":slab_" .. subname_new .. alternate) minetest.register_alias_force(modname_old .. ":slab_" .. subname_old .. alternate, modname_new .. ":slab_" .. subname_new .. alternate)
end end
end end
function stairsplus:register_slab(modname, subname, recipeitem, fields) function stairsplus:register_slab(modname, subname, recipeitem, fields)
local defs = stairsplus.copytable(slabs_defs) local defs = table.copy(stairsplus.defs["slab"])
local desc_base = S("%s Slab"):format(fields.description) for alternate, shape in pairs(defs) do
for alternate, num in pairs(defs) do stairsplus.register_single("slab", alternate, shape, modname, subname, recipeitem, fields)
local def = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, (num/16)-0.5, 0.5},
}
}
for k, v in pairs(fields) do
def[k] = v
end
def.drawtype = "nodebox"
def.paramtype = "light"
def.paramtype2 = def.paramtype2 or "facedir"
def.on_place = minetest.rotate_node
def.description = ("%s (%d/16)"):format(desc_base, num)
def.groups = stairsplus:prepare_groups(fields.groups)
if fields.drop and not (type(fields.drop) == "table") then
def.drop = modname.. ":slab_" .. fields.drop .. alternate
end
minetest.register_node(":" .. modname .. ":slab_" .. subname .. alternate, def)
end end
minetest.register_alias("stairs:slab_" .. subname, modname .. ":slab_" .. subname)
circular_saw.known_nodes[recipeitem] = {modname, subname} circular_saw.known_nodes[recipeitem] = {modname, subname}
-- Some saw-less recipes:
minetest.register_craft({
output = modname .. ":slab_" .. subname .. " 6",
recipe = {{recipeitem, recipeitem, recipeitem}},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname,
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
})
-- uncomment this rule when conflict is no longer likely to happen
-- https://github.com/minetest/minetest/issues/2881
-- minetest.register_craft({
-- type = "shapeless",
-- output = modname .. ":slab_" .. subname,
-- recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
-- })
-- then remove these two
minetest.register_craft({
output = modname .. ":slab_" .. subname,
recipe = {{modname .. ":panel_" .. subname, modname .. ":panel_" .. subname}},
})
minetest.register_craft({
output = modname .. ":slab_" .. subname,
recipe = {
{modname .. ":panel_" .. subname},
{modname .. ":panel_" .. subname},
},
})
------------------------------
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slab_" .. subname, modname .. ":slab_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter"},
})
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
})
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slab_" .. subname .. "_three_quarter", modname .. ":slab_" .. subname .. "_quarter"},
})
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slab_" .. subname .. "_14", modname .. ":slab_" .. subname .. "_2"},
})
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slab_" .. subname .. "_15", modname .. ":slab_" .. subname .. "_1"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname,
recipe = {modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname,
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname,
recipe = {modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname .. "_quarter",
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname .. "_quarter",
recipe = {modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname .. "_2",
recipe = {modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname .. "_three_quarter",
recipe = {modname .. ":slab_" .. subname, modname .. ":slab_" .. subname .. "_quarter"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname .. "_three_quarter",
recipe = {modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname .. "_three_quarter",
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname .. "_14",
recipe = {modname .. ":slab_" .. subname .. "_three_quarter", modname .. ":slab_" .. subname .. "_2"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname .. "_14",
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname .. "_15",
recipe = {modname .. ":slab_" .. subname .. "_14", modname .. ":slab_" .. subname .. "_1"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname .. " 3",
recipe = {modname .. ":stair_" .. subname, modname .. ":stair_" .. subname},
})
end end

View File

@ -1,362 +1,43 @@
--[[ --[[
More Blocks: slope definitions More Blocks: slope definitions
Copyright (c) 2011-2017 Hugo Locurcio and contributors. Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information. Licensed under the zlib license. See LICENSE.md for more information.
--]] --]]
local S = moreblocks.intllib
local box_slope = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
{-0.5, -0.25, -0.25, 0.5, 0, 0.5},
{-0.5, 0, 0, 0.5, 0.25, 0.5},
{-0.5, 0.25, 0.25, 0.5, 0.5, 0.5}
}
}
local box_slope_half = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
{-0.5, -0.375, -0.25, 0.5, -0.25, 0.5},
{-0.5, -0.25, 0, 0.5, -0.125, 0.5},
{-0.5, -0.125, 0.25, 0.5, 0, 0.5},
}
}
local box_slope_half_raised = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.125, 0.5},
{-0.5, 0.125, -0.25, 0.5, 0.25, 0.5},
{-0.5, 0.25, 0, 0.5, 0.375, 0.5},
{-0.5, 0.375, 0.25, 0.5, 0.5, 0.5},
}
}
--==============================================================
local box_slope_inner = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
{-0.5, -0.5, -0.25, 0.5, 0, 0.5},
{-0.5, -0.5, -0.5, 0.25, 0, 0.5},
{-0.5, 0, -0.5, 0, 0.25, 0.5},
{-0.5, 0, 0, 0.5, 0.25, 0.5},
{-0.5, 0.25, 0.25, 0.5, 0.5, 0.5},
{-0.5, 0.25, -0.5, -0.25, 0.5, 0.5},
}
}
local box_slope_inner_half = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
{-0.5, -0.375, -0.25, 0.5, -0.25, 0.5},
{-0.5, -0.375, -0.5, 0.25, -0.25, 0.5},
{-0.5, -0.25, -0.5, 0, -0.125, 0.5},
{-0.5, -0.25, 0, 0.5, -0.125, 0.5},
{-0.5, -0.125, 0.25, 0.5, 0, 0.5},
{-0.5, -0.125, -0.5, -0.25, 0, 0.5},
}
}
local box_slope_inner_half_raised = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.125, 0.5},
{-0.5, 0.125, -0.25, 0.5, 0.25, 0.5},
{-0.5, 0.125, -0.5, 0.25, 0.25, 0.5},
{-0.5, 0.25, -0.5, 0, 0.375, 0.5},
{-0.5, 0.25, 0, 0.5, 0.375, 0.5},
{-0.5, 0.375, 0.25, 0.5, 0.5, 0.5},
{-0.5, 0.375, -0.5, -0.25, 0.5, 0.5},
}
}
--==============================================================
local box_slope_outer = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
{-0.5, -0.25, -0.25, 0.25, 0, 0.5},
{-0.5, 0, 0, 0, 0.25, 0.5},
{-0.5, 0.25, 0.25, -0.25, 0.5, 0.5}
}
}
local box_slope_outer_half = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
{-0.5, -0.375, -0.25, 0.25, -0.25, 0.5},
{-0.5, -0.25, 0, 0, -0.125, 0.5},
{-0.5, -0.125, 0.25, -0.25, 0, 0.5}
}
}
local box_slope_outer_half_raised = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.125, 0.5},
{-0.5, 0.125, -0.25, 0.25, 0.25, 0.5},
{-0.5, 0.25, 0, 0, 0.375, 0.5},
{-0.5, 0.375, 0.25, -0.25, 0.5, 0.5}
}
}
-- Node will be called <modname>:slope_<subname> -- Node will be called <modname>:slope_<subname>
function register_slope(modname, subname, recipeitem, groups, images, description, drop, light) -- luacheck: no unused
local function register_slope(modname, subname, recipeitem, groups, images, description, drop, light)
stairsplus:register_slope(modname, subname, recipeitem, { stairsplus:register_slope(modname, subname, recipeitem, {
groups = groups, groups = groups,
tiles = images, tiles = images,
description = description, description = description,
drop = drop, drop = drop,
light_source = light, light_source = light,
sounds = default.node_sound_stone_defaults(), sounds = moreblocks.node_sound_stone_defaults(),
}) })
end end
local slopes_defs = {
[""] = {
mesh = "moreblocks_slope.obj",
collision_box = box_slope,
selection_box = box_slope,
},
["_half"] = {
mesh = "moreblocks_slope_half.obj",
collision_box = box_slope_half,
selection_box = box_slope_half,
},
["_half_raised"] = {
mesh = "moreblocks_slope_half_raised.obj",
collision_box = box_slope_half_raised,
selection_box = box_slope_half_raised,
},
--==============================================================
["_inner"] = {
mesh = "moreblocks_slope_inner.obj",
collision_box = box_slope_inner,
selection_box = box_slope_inner,
},
["_inner_half"] = {
mesh = "moreblocks_slope_inner_half.obj",
collision_box = box_slope_inner_half,
selection_box = box_slope_inner_half,
},
["_inner_half_raised"] = {
mesh = "moreblocks_slope_inner_half_raised.obj",
collision_box = box_slope_inner_half_raised,
selection_box = box_slope_inner_half_raised,
},
--==============================================================
["_inner_cut"] = {
mesh = "moreblocks_slope_inner_cut.obj",
collision_box = box_slope_inner,
selection_box = box_slope_inner,
},
["_inner_cut_half"] = {
mesh = "moreblocks_slope_inner_cut_half.obj",
collision_box = box_slope_inner_half,
selection_box = box_slope_inner_half,
},
["_inner_cut_half_raised"] = {
mesh = "moreblocks_slope_inner_cut_half_raised.obj",
collision_box = box_slope_inner_half_raised,
selection_box = box_slope_inner_half_raised,
},
--==============================================================
["_outer"] = {
mesh = "moreblocks_slope_outer.obj",
collision_box = box_slope_outer,
selection_box = box_slope_outer,
},
["_outer_half"] = {
mesh = "moreblocks_slope_outer_half.obj",
collision_box = box_slope_outer_half,
selection_box = box_slope_outer_half,
},
["_outer_half_raised"] = {
mesh = "moreblocks_slope_outer_half_raised.obj",
collision_box = box_slope_outer_half_raised,
selection_box = box_slope_outer_half_raised,
},
--==============================================================
["_outer_cut"] = {
mesh = "moreblocks_slope_outer_cut.obj",
collision_box = box_slope_outer,
selection_box = box_slope_outer,
},
["_outer_cut_half"] = {
mesh = "moreblocks_slope_outer_cut_half.obj",
collision_box = box_slope_outer_half,
selection_box = box_slope_outer_half,
},
["_outer_cut_half_raised"] = {
mesh = "moreblocks_slope_outer_cut_half_raised.obj",
collision_box = box_slope_outer_half_raised,
selection_box = box_slope_outer_half_raised,
},
["_cut"] = {
mesh = "moreblocks_slope_cut.obj",
collision_box = box_slope_outer,
selection_box = box_slope_outer,
},
}
function stairsplus:register_slope_alias(modname_old, subname_old, modname_new, subname_new) function stairsplus:register_slope_alias(modname_old, subname_old, modname_new, subname_new)
local defs = stairsplus.copytable(slopes_defs) local defs = table.copy(stairsplus.defs["slope"])
for alternate, def in pairs(defs) do for alternate, def in pairs(defs) do
minetest.register_alias(modname_old .. ":slope_" .. subname_old .. alternate, modname_new .. ":slope_" .. subname_new .. alternate) minetest.register_alias(modname_old .. ":slope_" .. subname_old .. alternate, modname_new .. ":slope_" .. subname_new .. alternate)
end end
end end
function stairsplus:register_slope_alias_force(modname_old, subname_old, modname_new, subname_new) function stairsplus:register_slope_alias_force(modname_old, subname_old, modname_new, subname_new)
local defs = stairsplus.copytable(slopes_defs) local defs = table.copy(stairsplus.defs["slope"])
for alternate, def in pairs(defs) do for alternate, def in pairs(defs) do
minetest.register_alias_force(modname_old .. ":slope_" .. subname_old .. alternate, modname_new .. ":slope_" .. subname_new .. alternate) minetest.register_alias_force(modname_old .. ":slope_" .. subname_old .. alternate, modname_new .. ":slope_" .. subname_new .. alternate)
end end
end end
function stairsplus:register_slope(modname, subname, recipeitem, fields) function stairsplus:register_slope(modname, subname, recipeitem, fields)
local defs = stairsplus.copytable(slopes_defs) local defs = table.copy(stairsplus.defs["slope"])
local desc = S("%s Slope"):format(fields.description)
for alternate, def in pairs(defs) do for alternate, def in pairs(defs) do
for k, v in pairs(fields) do stairsplus.register_single("slope", alternate, def, modname, subname, recipeitem, fields)
def[k] = v
end
def.drawtype = "mesh"
def.paramtype = "light"
def.paramtype2 = def.paramtype2 or "facedir"
def.on_place = minetest.rotate_node
def.description = desc
def.groups = stairsplus:prepare_groups(fields.groups)
if fields.drop and not (type(fields.drop) == "table") then
def.drop = modname.. ":slope_" ..fields.drop..alternate
end
minetest.register_node(":" ..modname.. ":slope_" ..subname..alternate, def)
end end
circular_saw.known_nodes[recipeitem] = {modname, subname} circular_saw.known_nodes[recipeitem] = {modname, subname}
-- Some saw-less recipes:
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slope_" .. subname, modname .. ":slope_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half_raised"},
})
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half",
modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half"},
})
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slope_" .. subname .. "_outer", modname .. ":slope_" .. subname .. "_inner"},
})
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slope_" .. subname .. "_outer_half", modname .. ":slope_" .. subname .. "_inner_half_raised"},
})
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slope_" .. subname .. "_outer_half_raised", modname .. ":slope_" .. subname .. "_inner_half"},
})
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slope_" .. subname .. "_outer_cut", modname .. ":slope_" .. subname .. "_inner_cut"},
})
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slope_" .. subname .. "_outer_cut_half", modname .. ":slope_" .. subname .. "_inner_cut_half_raised"},
})
minetest.register_craft({
type = "shapeless",
output = recipeitem,
recipe = {modname .. ":slope_" .. subname .. "_cut", modname .. ":slope_" .. subname .. "_cut"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname,
recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname,
recipe = {modname .. ":slope_" .. subname .. "_outer_half", modname .. ":slope_" .. subname .. "_inner_half"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slab_" .. subname,
recipe = {modname .. ":slope_" .. subname .. "_outer_cut_half", modname .. ":slope_" .. subname .. "_inner_cut_half"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slope_" .. subname .. "_half_raised",
recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half",
modname .. ":slope_" .. subname .. "_half"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slope_" .. subname .. "_half_raised",
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_half"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slope_" .. subname .. "_inner_half_raised",
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_inner_half"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slope_" .. subname .. "_outer_half_raised",
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_outer_half"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":slope_" .. subname .. "_inner_cut_half_raised",
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_inner_cut_half"},
})
end end

View File

@ -1,239 +1,43 @@
--[[ --[[
More Blocks: stair definitions More Blocks: stair definitions
Copyright (c) 2011-2017 Hugo Locurcio and contributors. Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information. Licensed under the zlib license. See LICENSE.md for more information.
--]] --]]
local S = moreblocks.intllib
-- Node will be called <modname>:stair_<subname> -- Node will be called <modname>:stair_<subname>
function register_stair(modname, subname, recipeitem, groups, images, description, drop, light) -- luacheck: no unused
local function register_stair(modname, subname, recipeitem, groups, images, description, drop, light)
stairsplus:register_stair(modname, subname, recipeitem, { stairsplus:register_stair(modname, subname, recipeitem, {
groups = groups, groups = groups,
tiles = images, tiles = images,
description = description, description = description,
drop = drop, drop = drop,
light_source = light, light_source = light,
sounds = default.node_sound_stone_defaults(), sounds = moreblocks.node_sound_stone_defaults(),
}) })
end end
local stairs_defs = {
[""] = {
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
{-0.5, 0, 0, 0.5, 0.5, 0.5},
},
},
},
["_half"] = {
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0, 0, 0.5},
{-0.5, 0, 0, 0, 0.5, 0.5},
},
},
},
["_right_half" ]= {
node_box = {
type = "fixed",
fixed = {
{0, -0.5, -0.5, 0.5, 0, 0.5},
{0, 0, 0, 0.5, 0.5, 0.5},
},
},
},
["_inner"] = {
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
{-0.5, 0, 0, 0.5, 0.5, 0.5},
{-0.5, 0, -0.5, 0, 0.5, 0},
},
},
},
["_outer"] = {
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
{-0.5, 0, 0, 0, 0.5, 0.5},
},
},
},
["_alt"] = {
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0},
{-0.5, 0, 0, 0.5, 0.5, 0.5},
},
},
},
["_alt_1"] = {
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.0625, -0.5, 0.5, 0, 0},
{-0.5, 0.4375, 0, 0.5, 0.5, 0.5},
},
},
},
["_alt_2"] = {
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.125, -0.5, 0.5, 0, 0},
{-0.5, 0.375, 0, 0.5, 0.5, 0.5},
},
},
},
["_alt_4"] = {
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.25, -0.5, 0.5, 0, 0},
{-0.5, 0.25, 0, 0.5, 0.5, 0.5},
},
},
},
}
function stairsplus:register_stair_alias(modname_old, subname_old, modname_new, subname_new) function stairsplus:register_stair_alias(modname_old, subname_old, modname_new, subname_new)
local defs = stairsplus.copytable(stairs_defs) local defs = table.copy(stairsplus.defs["stair"])
for alternate, def in pairs(defs) do for alternate, def in pairs(defs) do
minetest.register_alias(modname_old .. ":stair_" .. subname_old .. alternate, modname_new .. ":stair_" .. subname_new .. alternate) minetest.register_alias(modname_old .. ":stair_" .. subname_old .. alternate, modname_new .. ":stair_" .. subname_new .. alternate)
end end
end end
function stairsplus:register_stair_alias_force(modname_old, subname_old, modname_new, subname_new) function stairsplus:register_stair_alias_force(modname_old, subname_old, modname_new, subname_new)
local defs = stairsplus.copytable(stairs_defs) local defs = table.copy(stairsplus.defs["stair"])
for alternate, def in pairs(defs) do for alternate, def in pairs(defs) do
minetest.register_alias_force(modname_old .. ":stair_" .. subname_old .. alternate, modname_new .. ":stair_" .. subname_new .. alternate) minetest.register_alias_force(modname_old .. ":stair_" .. subname_old .. alternate, modname_new .. ":stair_" .. subname_new .. alternate)
end end
end end
function stairsplus:register_stair(modname, subname, recipeitem, fields) function stairsplus:register_stair(modname, subname, recipeitem, fields)
local defs = stairsplus.copytable(stairs_defs) local defs = table.copy(stairsplus.defs["stair"])
local desc = S("%s Stairs"):format(fields.description)
for alternate, def in pairs(defs) do for alternate, def in pairs(defs) do
for k, v in pairs(fields) do stairsplus.register_single("stair", alternate, def, modname, subname, recipeitem, fields)
def[k] = v
end
def.drawtype = "nodebox"
def.paramtype = "light"
def.paramtype2 = def.paramtype2 or "facedir"
def.on_place = minetest.rotate_node
def.description = desc
def.groups = stairsplus:prepare_groups(fields.groups)
if fields.drop and not (type(fields.drop) == "table") then
def.drop = modname .. ":stair_" .. fields.drop .. alternate
end
minetest.register_node(":" .. modname .. ":stair_" .. subname .. alternate, def)
end end
minetest.register_alias("stairs:stair_" .. subname, modname .. ":stair_" .. subname)
circular_saw.known_nodes[recipeitem] = {modname, subname} circular_saw.known_nodes[recipeitem] = {modname, subname}
-- Some saw-less recipes:
minetest.register_craft({
output = modname .. ":stair_" .. subname .. " 8",
recipe = {
{recipeitem, "", ""},
{recipeitem, recipeitem, ""},
{recipeitem, recipeitem, recipeitem},
},
})
minetest.register_craft({
output = modname .. ":stair_" .. subname .. " 8",
recipe = {
{"", "", recipeitem},
{"", recipeitem, recipeitem},
{recipeitem, recipeitem, recipeitem},
},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":stair_" .. subname,
recipe = {modname .. ":panel_" .. subname, modname .. ":slab_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":stair_" .. subname,
recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":stair_" .. subname .. "_outer",
recipe = {modname .. ":micro_" .. subname, modname .. ":slab_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":stair_" .. subname .. "_half",
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":stair_" .. subname .. "_half",
recipe = {modname .. ":panel_" .. subname, modname .. ":micro_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":stair_" .. subname .. "_right_half",
recipe = {modname .. ":stair_" .. subname .. "_half"},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":stair_" .. subname,
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":stair_" .. subname .. "_inner",
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":stair_" .. subname .. "_outer",
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
})
minetest.register_craft({
type = "shapeless",
output = modname .. ":stair_" .. subname,
recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
})
minetest.register_craft({ -- See mirrored variation of the recipe below.
output = modname .. ":stair_" .. subname .. "_alt",
recipe = {
{modname .. ":panel_" .. subname, ""},
{"" , modname .. ":panel_" .. subname},
},
})
minetest.register_craft({ -- Mirrored variation of the recipe above.
output = modname .. ":stair_" .. subname .. "_alt",
recipe = {
{"" , modname .. ":panel_" .. subname},
{modname .. ":panel_" .. subname, ""},
},
})
end end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 716 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 718 B

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 693 B

After

Width:  |  Height:  |  Size: 685 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 448 B

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 579 B

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 478 B

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 441 B

After

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 B

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 744 B

After

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 484 B

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 325 B

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 480 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 B

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 850 B

After

Width:  |  Height:  |  Size: 739 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 230 B

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 485 B

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 B

After

Width:  |  Height:  |  Size: 115 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 356 B

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 B

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 B

After

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 B

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 B

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 B

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 333 B

Some files were not shown because too many files have changed in this diff Show More