Commit graph

199 commits

Author SHA1 Message Date
Mikita Wiśniewski
567d112942 Fix deprecated get_metadata() usage
Items are instead written as a serialized string into ItemStackMetaRef, and read from there as well. Old itemstacks get converted to the new format automatically.
2024-07-31 02:27:26 +02:00
Mikita Wiśniewski
347305eaea Fix ender chests rotate crash 2024-07-31 02:27:26 +02:00
Mikita Wiśniewski
508bc19f6a Remove nil fields from trapped chest definition 2024-07-31 02:27:26 +02:00
Mikita Wiśniewski
c1e9e4b1a2 Fix typos in API.md 2024-07-31 02:27:26 +02:00
Mikita Wiśniewski
7bf15642ca Resolve teknomunk's comments 2024-07-31 02:27:26 +02:00
Mikita Wiśniewski
f1fa6240bb Fix shift-clicking and a few luacheck warnings 2024-07-31 02:27:26 +02:00
Mikita Wiśniewski
c5bc6ff189 Cleanup comments (don't use \=, it's annoying) 2024-07-31 02:27:26 +02:00
Mikita Wiśniewski
70e903b716 Simplify double inventory inv logic 2024-07-31 02:27:26 +02:00
Mikita Wiśniewski
209b24a2fb Move LBMs out of init.lua and fix API.md 2024-07-31 02:27:26 +02:00
cora
ac05f8bad6 Remove unused variables in chests example.lua 2024-07-31 02:27:26 +02:00
Mikita Wiśniewski
76cff76d91 Add an introduction text to API.md 2024-07-31 02:27:26 +02:00
Mikita Wiśniewski
49b6d09985 Add documentation (README.md, API.md) 2024-07-31 02:27:26 +02:00
Mikita Wiśniewski
a66c35a9ea Fix double chests once more (hoppers this time) 2024-07-31 02:27:26 +02:00
Mikita Wiśniewski
a28e55160f Make the chest opening/closing sound customizable + fix double chests 2024-07-31 02:27:26 +02:00
Mikita Wiśniewski
6bbb6b8dec Add title field for mcl_chests.register_chest 2024-07-31 02:27:26 +02:00
Mikita Wiśniewski
b4b5bf8391 Move some groups (api.lua → chests.lua) 2024-07-31 02:27:26 +02:00
Mikita Wiśniewski
16dd8694a6 Refactor mcl_chests.register_chest AGAIN + cleanup
Now you can define custom groups for the chests, as shown in the trapped
chests example (now they show up under "Mechanisms" tab in creative!).

I'm a bit suspicious of the new return-wrapped functions, as in *they
might break under some circumstances I didn't observe*. It will require
some heavy testing to make sure nothing crashes in the future.

Also, `on_rightclick` for double chests is something I really want to
return-wrap as well, but failed to do so. 🤷
2024-07-31 02:27:26 +02:00
Jürgen Rühle
7a5ee4e6e2 Better detection of properly serialized data
Remove entity if initialization data is missing. Downgrade message in that case
to a warning.
2024-07-31 02:27:26 +02:00
Jürgen Rühle
d0d9600709 Fix invisible chests
Pass chest entity initialization data to on_activate as staticdata so
initialization is atomic, preventing premature deletion of chest entity
by concurrent server steps.
2024-07-31 02:27:26 +02:00
cora
709b73295c Fix meta:set_string being called with nil 2024-07-31 02:27:26 +02:00
Mikita Wiśniewski
1d77017ca9 Refactor mcl_chests.register_chest and clean-up 2024-07-31 02:27:26 +02:00
Mikita Wiśniewski
d6d64d8837 Fix long doc strings 2024-07-31 02:27:26 +02:00
Mikita Wiśniewski
e771f0e3ff Split ITEMS/mcl_chests/init.lua (fixes #281)
Shulker boxes can now be rotated.

The TODO will now be transferred to PR.
2024-07-31 02:27:26 +02:00
Mikita Wiśniewski
b10bfe27ce Clean-up ITEMS/mcl_chests code, part 2
Chest tile management has been reorganized to use postfixes, some slight
formatting fixes applied here and there, and roughly marked down where
the new files should (ideally) begin and end.
2024-07-31 02:27:26 +02:00
Mikita Wiśniewski
d5b3a6f658 Clean-up ITEMS/mcl_chests code, part 1
Amongst other changes:
- mcl_chests.register_chest function has been exposed. The API is still
  too terrible to call it quits though, I definitely want all these
  parameters passed to be part of a key-value table.
- Added a TODO list at the top of the file. Don't worry, I'll remove it
  once I'm done. It's more just for my convenience than anything.
2024-07-31 02:27:26 +02:00
teknomunk
681075df5a Correct null -> nil 2024-04-27 08:41:09 +00:00
teknomunk
bdcd89e1bf Modify mcl_util.select_stack to allow specifying the number of items that will be moved, modify hopper on_try_push functions to specify only 1 item will be moved at a time, general cleanup of touched code (reduce indent - 1 place, break filter functions out of function call parameter - 4 places) 2024-04-27 08:41:09 +00:00
the-real-herowl
a2a4da5aed Added shepherd functionality 2023-12-24 05:48:41 +01:00
Kostinatyn Tsiupa
1da7bb0bdc hopper reimplementation
Reimplemented hoppers and all (blast_furnace, furnace, smoker, composters, double chaets, shulker_boxes, droppers, bookshelvs and brewing_stands) connected nodes
2023-11-27 14:33:01 +02:00
Freeman
8d440252a4 fix crash when opening a chest that has an unknow node on it
fix #3961
2023-10-13 21:07:00 +02:00
Sab Pyrope
5b4a79a26d Update russian translation 2023-08-31 14:16:42 +08:00
AFCMS
a77930d4a1
Fix mcl_chests auto formating 2023-08-19 18:01:31 +02:00
AFCMS
054dc22432
Use new vectors in mcl_chests 2023-08-19 18:01:31 +02:00
AFCMS
cd6dd4d851
Fix merge conflict (huge chests) 2023-08-19 18:01:30 +02:00
AFCMS
0da1822d26
Code style fixes in mcl_chests 2023-08-19 18:01:27 +02:00
AFCMS
e093c69328
Remove the label size thing (too breaking change) 2023-08-19 18:01:26 +02:00
AFCMS
558df5e4bd
fix all chest formspecs 2023-08-19 18:01:25 +02:00
AFCMS
cf01c0630c
chest + shulkerbox formspec 2023-08-19 18:01:25 +02:00
AFCMS
f20fbfb95a
ender chest formspec v4 2023-08-19 18:01:25 +02:00
megustanlosfrijoles
d14c074d6c Add spanish translations (#3678)
I'm working on adding more translations. I made this pull request to let everyone now I'm working on this.

So far I've completed 1 file/mod

Co-authored-by: José Muñoz <dr.cabra@disroot.org>
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/3678
Reviewed-by: ancientmarinerdev <ancientmariner_dev@proton.me>
Co-authored-by: megustanlosfrijoles <dr.cabra@disroot.org>
Co-committed-by: megustanlosfrijoles <dr.cabra@disroot.org>
2023-05-10 23:12:37 +00:00
ancientmarinerdev
f319a8d903 Fixing that annoying chest open 2023-03-23 01:29:05 +00:00
syl
96b2f6a01d Improve French translation 2023-03-10 22:48:46 +01:00
anarquimico
67977b0d26 Third batch of ITEMS translation 2023-02-07 16:39:23 +00:00
ancientmarinerdev
7d46fa3362 Merge pull request 'texture-consolidation' (#3380) from texture-consolidation into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/3380
Reviewed-by: ancientmarinerdev <ancientmariner_dev@proton.me>
2023-02-04 03:23:13 +00:00
Johannes Fritz
8793ed211e Fix ender chest crash + remove map hand reference 2023-02-01 09:56:12 -06:00
Michieal
6265148727 Move textures all into one centralized directory. 2023-01-30 22:55:53 -05:00
ancientmarinerdev
e6e898671a Merge pull request 'add japanese translation' (#3149) from SakuraRiu/MineClone2:master into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/3149
Reviewed-by: Michieal <michieal@noreply.git.minetest.land>
2022-12-29 22:14:48 +00:00
3raven
d3e8e24f42 Fix the disapearance of christmas texture of the ender chest once it is placed
Fix the disapearance of christmas texture of the ender chest once it is placed
2022-12-24 14:44:06 +00:00
Riu Sakura
2b61231f82 add japanese translation 2022-12-19 15:33:31 +09:00
epCode
080182ab15 Fix ender and shulker nodeboxes 2022-11-13 22:18:00 +00:00