Commit Graph

381 Commits

Author SHA1 Message Date
sfan5
43c9c38a28 Fix itemdef defaults not being applied in async env 2023-08-14 18:16:36 +02:00
sfan5
4fdd2dec59 Move core.run_callbacks and related to common folder 2023-06-23 09:05:26 +02:00
mazes-80
23f7aab354
Item Entity: prevent moveresult assert when attached (#13353) 2023-06-05 12:00:11 +02:00
DS
ea095d3f69
Fix core.item_eat for same-item replace_with_item and split stacks before dropping (#13286)
The replace_with_item can be added to the slot of the wield item, which
is afterwards overwritten. This causes item loss.
2023-03-27 20:02:23 +02:00
Vitra Suchovich
2dafce6206
Say /setpassword is insecure 2023-02-18 00:04:52 +01:00
Jude Melton-Houghton
5c248c2d7d Add callback on_mapblocks_changed 2022-12-24 08:24:59 -05:00
Jude Melton-Houghton
f80ea73bfb
Let mods choose a forceload limit (#13002) 2022-12-03 10:41:34 -05:00
Wuzzy
3c7f26d937
Add support for attached facedir/4dir nodes (#11432) 2022-11-24 17:56:07 -05:00
Jude Melton-Houghton
475005012a
Improve ABM and LBM registration error handling (#12969) 2022-11-20 21:26:54 +01:00
Abdou-31
d1b80b462e
Fix typos and en_US/en_GB inconsistency in various files (#12902) 2022-11-09 11:57:19 -05:00
Jude Melton-Houghton
8f1593e4e8
Add VoxelArea() constructor (#12886) 2022-10-22 08:05:45 -04:00
DS
22cbc05808
Add an item pick up callback (2) (#7712)
Co-authored-by: SmallJoker <mk939@ymail.com>
Co-authored-by: Jude Melton-Houghton <jwmhjwmh@gmail.com>
2022-10-01 15:21:06 -04:00
20kdc
b1233056b7
Add zstd compression support (#12515) 2022-09-28 09:06:14 -04:00
Jude Melton-Houghton
f4a01f3a5d
Avoid duplication of mod metadata in memory (#12562)
Co-authored-by: sfan5 <sfan5@live.de>
2022-09-26 17:03:43 -04:00
Jude Melton-Houghton
310b12b5ed
Content ID caching in Lua (#12444)
* Cache content IDs in Lua

Co-authored-by: sfan5 <sfan5@live.de>
2022-09-18 17:46:48 +02:00
Wuzzy
1d04903c19
Add paramtype2s for 4 horizontal rotations and 64 colors (#11431)
4dir is like facedir, but only for 4 horizontal directions: NESW. It is identical in behavior to facedir otherwise. The reason why game makers would want to use this over facedir is 1) simplicity and 2) you get 6 free bits.
It can be used for things like chests and furnaces and you don't need or want them to "flip them on the side" (like you could with facedir).

color4dir is like colorfacedir, but you get 64 colors instead of only 8.
2022-09-16 13:18:55 +02:00
Zughy
3132efcc01
Reassure previous nil behaviour for tiles and special_tiles (#12678)
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2022-08-13 15:35:28 +01:00
Jude Melton-Houghton
ab8dfb45b4
Allow buffer argument to VoxelManip:get_light_data (#12682) 2022-08-13 08:53:47 +02:00
Zughy
8bf1609ccc
Fix crash when crafting callbacks return strings (#12685)
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2022-08-12 10:17:37 +01:00
Gregor Parzefall
70b71c5013
Fix rotation of falling facedir nodes (#12587)
in some cases
2022-07-31 15:18:29 +02:00
Jude Melton-Houghton
d631f21024
Let core.get_mod_storage be called multiple times (#12572) 2022-07-23 22:27:07 +02:00
Lars Müller
b204655081
Fix regression & replace more occurrences of vector.new with vector.copy (#12539) 2022-07-14 20:51:42 +02:00
Lexi Hale
20bd6bdb68
Animated particlespawners and more (#11545)
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: Dmitry Kostenko <codeforsmile@gmail.com>
2022-07-13 11:57:12 +02:00
AFCMS
fae8726a76
Make VoxelArea:position() return a vector with metatable (#12521) 2022-07-09 22:32:33 +02:00
Lars Müller
b15393c2a5
Replace deprecated use of vector.new with copy 2022-07-08 13:52:58 +02:00
sfan5
fc3460470a
Add missing item alias metatables to async environment (#12458) 2022-07-04 01:06:42 +02:00
rubenwardy
b095dc4f2b
Fix error when item isn't provided to core.hud_replace_builtin (#12484) 2022-07-02 18:28:11 +01:00
Zughy
18fbc0394b
Remove tile_images and special_materials obsolete code (#12455)
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2022-06-28 00:55:01 +01:00
sfan5
1b68fb7683 Don't allow banning in singleplayer
fixes #11819
2022-05-29 14:00:19 +02:00
Wuzzy
ac5e8176b9
Add relative numbers for commands by prepending ~ (#9588)
* Add relative numbers for commands by prepending ~

* Some builtin code cleanup

* Disallow nan and inf in minetest.string_to_area

* Remove unused local variable teleportee (makes Luacheck happy)

* Clean up core.string_to_pos

* Make area parsing less permissive

* Rewrite tests as busted tests

* /time: Fix negative minutes not working

Co-authored-by: Lars Mueller <appgurulars@gmx.de>
2022-05-22 10:28:24 -04:00
sfan5
ec9f157512 Use native packer to transfer globals into async env(s) 2022-05-10 22:37:42 +02:00
Lars Müller
089797dbe6
Fix Minetest blaming the wrong mod for errors (#12241)
Covers the case where mods insert their callbacks manually into "minetest.registered_<callbacks>" (often to achieve a particular order of execution).
2022-05-09 20:42:43 +02:00
sfan5
7fff9da71d item_entity: Cache collisionbox for use in on_step
I don't have absolute numbers but if calls to get_properties() take up
30%+ of on_step() execution time that's bound to matter.
2022-05-08 19:12:10 +02:00
sfan5
e7659883cc Async environment for mods to do concurrent tasks (#11131) 2022-05-02 20:56:06 +02:00
sfan5
e6385e2ab7 Reorganize some builtin functions in preparation for async env 2022-05-02 20:54:55 +02:00
SmallJoker
1c8614ac9a
Builtin: Allow to revoke unknown privileges 2022-04-24 21:08:33 +02:00
olive
062dd8dabc
Send chat error when attemping to /set a secure setting (#12193)
Attempting to /set a secure setting will now say that is disallowed.
Previously this would shut down the server.
Reading secure settings via /set is still allowed.
2022-04-16 18:50:36 +02:00
Lars Mueller
9aabd911eb Fix item entity Z-fighting 2022-04-10 23:25:00 +02:00
Dmitry Kostenko
cf650fcaac Avoid negation of comparison operator (luacheck warning) 2022-04-01 09:00:39 +02:00
Zughy
44fc888bd6
Allow get_sky to return a table (#11963) 2022-03-05 22:15:41 +01:00
Lars Mueller
1e4d6672be Fix builtin statbar backgrounds
see #12000
2022-01-31 16:35:30 -05:00
sfan5
5da204f5bc
Get rid of basic_debug last minute
This isn't a revert but rather just disables the codepaths. also see #12011
2022-01-30 21:32:49 +01:00
sfan5
a9bccb964f Raise max mapgen limit constant to align with mapblock size 2022-01-30 13:49:26 +01:00
SmallJoker
47735c273c
Builtin: Sanity-check /time inputs (#11993)
This enforces the documented bounds for the /time command.
2022-01-27 22:23:14 +01:00
sfan5
8c99f2232b Don't let HTTP API pass through untrusted function
This has been a problem since the first day, oops.
2021-12-18 20:37:13 +01:00
sfan5
1c5ece8334 Fix eat sound not playing if eating last of stack 2021-12-15 15:36:19 +01:00
Corey Powell
413be76c63
Implemented disconnect_player (#10492)
Co-authored-by: rubenwardy <rw@rubenwardy.com>
2021-11-26 19:19:40 +00:00
Wuzzy
6910c8d920
Fix number of tool uses being off by 1..32767 (#11110) 2021-10-31 22:33:33 +00:00
sfan5
660e63dbae
Fix item duplication if player dies during interact callback (alternative) (#11662) 2021-10-25 20:30:27 +02:00
sfan5
a78124831f Fix incorrect error message in core.encode_png 2021-10-22 10:55:18 +02:00