1
0
mirror of https://github.com/minetest/minetest.git synced 2025-07-01 23:50:22 +02:00
Commit Graph

251 Commits

Author SHA1 Message Date
5e6d144567 Enable -Wimplicit-fallthrough and use [[fallthrough]] attribute 2023-06-15 10:38:44 +02:00
e700182f44 Replace Optional with std::optional 2023-06-15 10:38:44 +02:00
39f4d26177 Add minetest.get_player_window_information() (#12367) 2023-02-27 22:58:41 +00:00
5c248c2d7d Add callback on_mapblocks_changed 2022-12-24 08:24:59 -05:00
0fc97a1483 Use a Lua error handler that calls tostring (#11913) 2022-12-15 07:37:49 -05:00
1f3b5e553b Fix plantlike_rooted world-aligned node base textures (#12994)
Co-authored-by: Wuzzy <Wuzzy@disroot.org>
2022-12-12 08:45:09 -05:00
d1b80b462e Fix typos and en_US/en_GB inconsistency in various files (#12902) 2022-11-09 11:57:19 -05:00
077627181e Allow rotating entity selectionboxes (#12379) 2022-10-30 16:53:14 +01:00
b38ffdec27 Implement vector and node conversion in Lua (#12609)
Co-authored-by: sfan5 <sfan5@live.de>
2022-10-18 18:01:44 -04:00
f7ae70c3d9 Use enum to define custom registry indices 2022-10-13 08:46:16 -04:00
7632af3c73 Consolidate API object code (#12728)
Co-authored-by: sfan5 <sfan5@live.de>
2022-10-04 08:31:36 -04:00
525fc3833c Implement tool use sounds 2022-09-30 14:02:14 +02:00
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
038da00e79 Code optimizations / refactor (#12704)
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
Co-authored-by: sfan5 <sfan5@live.de>
2022-09-06 11:21:09 +01:00
0e439b2fa3 Check hp_max > 0 for entities (#12667) 2022-08-13 15:35:41 +01:00
a871115889 Fix some warnings (#12615) 2022-07-30 12:51:23 +01:00
9f41b4f72d Add check_mod_configuration to main menu 2022-07-14 22:12:54 +01:00
1d512ef7f4 Reduce code duplication between c_converter.cpp and helper.cpp 2022-07-14 20:55:45 +02:00
8ff3fadba0 Remove unnecessary float limits from script API
Leaves a check for NaN and inf.
2022-07-14 20:55:45 +02:00
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
e51f474613 Sounds: Various little improvements (#12486)
Use SimpleSoundSpec where reasonable (OpenAL)
Ensure the sound IDs do not underflow or get overwritten -> loop in u16
Proper use of an enum.
2022-07-09 22:32:24 +02:00
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
a463620edb Re-order sound-related code (#12382)
Dropped ServerSoundParams -> moved to ServerPlayingSound. This gets rid of the duplicated
'fade' and 'pitch' values on server-side where only one was used anyway.
SimpleSoundSpec is the basic sound without positional information, hence 'loop' is included.

Recursively added PROTOCOL_VERSION to most functions to reduce the versioning mess in the
future. Per-type version numbers are kept for now as a safety rope in a special case.
2022-06-20 21:56:12 +02:00
f4a53f7ee6 No damage effects on hp_max change (#11846) 2022-06-11 20:00:40 +02:00
8b74257bf3 Reduce size of ContentFeatures structure
On my system this is a reduction from 4664 to 3704 bytes.
This is not for the sake of saving RAM but ensuring
commonly used structures fit into caches better.
2022-05-26 15:49:12 +02:00
ec9f157512 Use native packer to transfer globals into async env(s) 2022-05-10 22:37:42 +02:00
7f58887ae3 Support packing arbitrary graphs (#12289) 2022-05-10 22:37:33 +02:00
89c82035d8 hud_get: Return precision field for waypoints (#12215) 2022-05-04 20:55:20 +02:00
e7659883cc Async environment for mods to do concurrent tasks (#11131) 2022-05-02 20:56:06 +02:00
56a558baf8 Refactor some Lua API functions in preparation for async env 2022-05-02 20:54:55 +02:00
06d197cdd0 Store vector metatable in registry 2022-03-29 18:07:00 +02:00
DS
8d387433b1 Fix the documentation of InvRef:get_lists() and clean up code (#12150) 2022-03-29 18:06:16 +02:00
ba6fbc417e Remove awful Mingw32 workarounds
Instead a warning is triggered if an affected compiler is detected.
closes #12022
2022-02-08 19:31:24 +01:00
1ee37148a8 Fix types of get_mapgen_setting_noiseparams (#12025) 2022-02-04 20:28:43 +01:00
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
21113ad410 Split liquid_viscosity to liquid_viscosity and move_resistance (#10810) 2021-10-01 16:21:24 +02:00
75bf9b75ca Make sure relevant std::stringstreams are set to binary 2021-09-11 21:06:57 +02:00
766e885a1b Clean up/improve some scriptapi error handling code 2021-09-10 23:16:46 +02:00
3f1adb49ae Remove redundant on_dieplayer calls 2021-08-28 12:14:16 +02:00
0c1e9603db HUD: Reject and warn on invalid stat types (#11548)
This comes into play on older servers which do not know the "stat" type.
Warnings are only logged once to avoid spam within globalstep callbacks
2021-08-21 20:04:04 +02:00
6e8aebf432 Add bold, italic and monospace font styling for HUD text elements (#11478)
Co-authored-by: Elias Fleckenstein <eliasfleckenstein@web.de>
2021-07-27 19:11:46 +02:00
f2fd443262 Inventory: Make addList() consistent (#11382)
Fixes list clearing for inv:set_list() using same size, since 2db6b07.
addList() now clears the list in all cases. Use setSize() to resize without clearing.
2021-06-30 20:39:38 +02:00
2db6b07de1 Inventory: show error on invalid list names (#11368) 2021-06-20 17:21:50 +02:00
DS
8f085e02a1 Add metatables to lua vectors (#11039)
Add backwards-compatible metatable functions for vectors.
2021-06-04 21:22:33 +02:00
de85bc9227 fix: some code tidy about includes & irr namespaces 2021-05-03 19:49:19 +02:00
ccdd886e27 refacto: Hud: make driver, client, player, inventory, tsrc private & drop unused guienv
also fix c_content.h, on client it includes the src/client/hud.h instead of src/hud.h, which leads to wrong file dependency on the lua stack
2021-05-03 19:49:19 +02:00
3b78a22371 Degrotate support for mesh nodes (#7840) 2021-03-30 00:25:11 +02:00
bf8fb2672e Use place_param2 client-side for item appearance & prediction (#11024) 2021-03-09 00:56:53 +01:00
f85e9ab925 Add nametag background setting and object property (#10937) 2021-02-17 19:51:28 +00:00
a8f6befd39 Fix short_description fallback order (#10943) 2021-02-17 18:53:44 +00:00