Commit Graph

199 Commits

Author SHA1 Message Date
1F616EMO~nya
98e51a0159
Clamp hotbar selection to slots that exist (#14869) 2024-08-12 15:35:13 +02:00
sfan5
85e717fcd1
Rework object attachment handling to fix bugs (#14825) 2024-08-12 15:32:18 +02:00
Lars Müller
5b19d315b3
devtest: Add sam to testentities (#14882) 2024-08-11 20:18:30 +02:00
y5nw
8bff2f23c6
Rename minetest.register_async_metatable to minetest.register_portable_metatable (#14895) 2024-08-02 00:13:25 +02:00
grorp
fcb4f258f5
GUITable: Scale images with display density / row height (#14709) 2024-07-02 20:57:43 +02:00
Lars Müller
8ed55b3aff
Help modders deal with object invalidation (#14769)
* Skip invalid objects in raycasts
* Add `ObjectRef:is_valid` method
* Add object inside radius / area iterators which skip invalid objects
* Update docs to clarify object invalidation and how to deal with it

---------

Co-authored-by: sfan5 <sfan5@live.de>
2024-07-01 20:50:38 +02:00
grorp
7709d92289
Restore old inconsistent minimum digging time behavior (#14777)
and restore default of 0.16 for repeat_place_time since it was only changed to be in line with repeat_dig_time.
2024-06-30 20:39:28 +02:00
cx384
7a64527db5
Fix connected_players on_shutdown (#14739) 2024-06-15 16:00:33 +02:00
sfan5
c03894321a Fix file write warning in devtest
closes #14721
2024-06-10 18:49:43 +02:00
sfence
140b9e5a5a
Allow game to specify first and last mod in mod loading order (#14177)
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
Co-authored-by: sfan5 <sfan5@live.de>
2024-06-01 16:36:20 +02:00
Lars Mueller
bd4572cfd1 Fix broken CI 2024-05-21 18:10:09 +02:00
Lars Mueller
567f85752d Fix broken unit test
Also makes devtest unit test results a bit more prominent
2024-05-21 16:31:05 +02:00
Lars Mueller
5009259473 Add unit test and feature flag for override_item 2024-05-21 15:46:33 +02:00
rubenwardy
3017b0213b
Allow quoting hypertext attribute values (#14550) 2024-05-05 14:27:17 +02:00
sfence
72cb4e9bea
Allow nil puncher in object:punch (#14319) 2024-04-28 17:55:04 +02:00
OgelGames
05d5dc4cec
Fix InvRef bugs and add unit tests (#14591) 2024-04-28 00:13:44 +02:00
SmallJoker
c8a41409d9
HUD: Text element color support (#14558) 2024-04-20 20:36:44 +02:00
rubenwardy
b2057a5da7
Hypertext: Fix missing space after single letter word (#14551)
Fixes #11727
2024-04-16 08:48:16 +01:00
Wuzzy
9f263319ca
Fix 4dir nodebox sometimes not rendering face (#14533) 2024-04-14 11:57:13 +02:00
rubenwardy
24cc33e704
Add button_url[] and hypertext element to allow mods to open web pages (#13825)
Fixes #12500
2024-03-24 17:19:23 +00:00
HybridDog
cda112493a
Faster blit_with_alpha() (#14448)
* Add test nodes for alpha compositing and the fill texture modifier

Texture test nodes can be helpful to test if `blit_with_alpha` works correctly.

The alpha compositing test node covers different cases where pixel colors are mixed with each other.
The test currently fails because `blitPixel` does not work correctly if a semi-transparent color
is drawn on top of another semi-transparent color.
The test nodes for the fill texture modifier show if the size and position arguments of the modifier work correctly.
They do not cover special cases such as very large or negative position or size values.

* Faster blit_with_alpha()

The `blit_with_alpha` function has a noticeable effect on the time it takes to join a game.

To reduce the join times, I replace the `blit_with_alpha` function with a new one:
* It does not uses floating-point numbers.
* It directly operates on the raw pixel data instead of using the comparatively
  slow `setPixel` and `getPixel` functions from Irrlicht.
  Only ECF_A8R8G8B8 base images are supported now.
  If the top image does not have the ECF_A8R8G8B8 color format, it is converted;
  I assume that this happens rarely.
* There are case distinctions for fully opaque, fully transparent and semi-transparent pixels.
  This empirically increases the performance since the mixing between two semi-transparent happens rarely.
* The new function no longer has the `src_pos` argument since it was always the zero vector.
* The function is only documented once where it is declared.

For backwards compatibility, `blit_with_alpha` still mixes colors without gamma correction.
`blit_with_alpha` nonetheless behaves slightly different than before:
If a semi-transparent pixel is drawn on top of another semi-transparent pixel,
the color is mixed in a way which we can consider to be more correct now.
2024-03-19 19:56:47 +01:00
cx384
234b01a8c2
Item meta pointing range (#14347) 2024-03-17 15:55:38 +01:00
SmallJoker
4245a7604b Inventory: Fix order of callbacks when swapping items 2024-03-16 20:14:05 +01:00
y5nw
fc80f65a6d
Try to preserve metatable when exchanging data with the async env (#14369)
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
2024-03-06 18:04:49 +01:00
sfan5
91ea47fddf Fix node callbacks unit test 2024-03-03 20:16:32 +01:00
DS
d4d4712361
Implement get_node with a get_node_raw (#14384)
Add /bench_bulk_get_node
Considerably improves the execution speed of core.get_node
2024-03-03 15:53:23 +01:00
grorp
e40417f687
Allow giving "pointabilities" to Lua raycasts (#14390) 2024-03-01 17:12:13 +01:00
sfan5
762fca538c
Expose SHA256 algorithm to Lua (#14403)
Co-authored-by: chmodsayshello <chmodsayshello@hotmail.com>
2024-02-25 18:12:23 +01:00
SmallJoker
fa1d80b53b
MetaData: restore undocumented set_string behaviour (#14396) 2024-02-25 16:03:05 +01:00
sfan5
6ca214fefc
Introduce std::string_view into wider use (#14368) 2024-02-17 15:35:33 +01:00
sfan5
3cac17d23e
Lua on each mapgen thread (#13092) 2024-02-13 22:47:30 +01:00
sfan5
d4b107e2e8 Enable dynamic_add_media to take the file data instead of a path 2024-02-13 22:44:10 +01:00
sfan5
c90ebad46b Allow specifying name for dynamic media files 2024-02-13 22:44:10 +01:00
sfan5
af69d4f7a9 Allow dynamic_add_media at mod load time 2024-02-13 22:44:10 +01:00
kromka-chleba
6c8ae2b72a
Fix liquid falling if in "float" group (#13789)
* Make falling liquid source nodes replace flowing nodes

This makes falling liquid source nodes in group:float replace
flowing nodes on the ground instead of being placed above
the flowing node.

* Make flowing liquids "fall through" for source nodes

This makes liquids in float and falling_node groups fall through
flowing liquid nodes instead of being supported by them in the air.

---------

Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
2024-02-12 23:24:54 +01:00
grorp
f2b99332d9
Add Lua API function to resolve node/collision/selection boxes (#13964) 2024-02-06 20:45:16 +01:00
techno-sam
176e674a51
Add wear bar color API (#13328)
---------

Co-authored-by: Muhammad Rifqi Priyo Susanto <muhammadrifqipriyosusanto@gmail.com>
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
Co-authored-by: grorp <gregor.parzefall@posteo.de>
2024-02-02 21:21:00 +01:00
cx384
5958714309
Tool specific pointing and blocking pointable type (#13992) 2024-01-22 18:27:08 +01:00
Wuzzy
08ee6d8d4b
Add rotation support for wallmounted nodes in 'ceiling' or 'floor' mode (#11073) 2024-01-17 17:47:06 +01:00
sfence
ceaa7e2fb0
Add API for restoring PseudoRandom and PcgRandom state (#14123) 2024-01-16 23:20:52 +01:00
cx384
92c55c27cf
Add function to get all HUD elements (#14042) 2024-01-14 17:46:29 +01:00
sfan5
e824e9023f Simplify LuaPseudoRandom::l_next and fix docs
Also extends the allowed range on the C++ side. This has no side-effects.
2024-01-14 13:17:53 +01:00
sfan5
d20f1182f2 Fix Lua PseudoRandom seeds being mangled
closes #14237
2024-01-14 13:17:53 +01:00
Lars Müller
7bae8ab838
Fix HUD image (waypoint) docs 2024-01-10 19:32:49 +01:00
sfence
d0753dddb1
Method add_pos for object/player (#14126) 2024-01-01 22:48:56 +01:00
cx384
467d3a8c62
Rename hud_elem_type to type (#14065) 2023-12-29 21:51:02 +01:00
sfan5
93dfa8a6d8
Optimize and improve built-in PNG writer (#14020) 2023-12-27 11:56:48 +01:00
grorp
91ba02449b
Add touch_controls boolean to get_player_window_information() (#14092) 2023-12-17 20:47:07 +01:00
grorp
689aaf50b3
Fix unittest failure for release versions (#14067) 2023-12-08 21:13:33 +01:00
updatepo.sh
30769589bf Remove junk translation file 2023-12-03 19:11:32 +01:00