Compare commits

...

694 commits

Author SHA1 Message Date
sfan5
7892541383 Various random code cleanups 2025-03-04 19:53:01 +01:00
sfan5
358658fa34 Fix cloud-related bugs
First, this reverts 56123b2fbe,
which un-fixes #15031 but fixes #15798 and #15854.

Then we disable culling for the cloud scene node which fixes #15031 again.
2025-03-04 19:53:01 +01:00
sfan5
68602b2eaf Fix shadow flicker on camera offset update (take 2)
The previous fix never did what it was supposed to, so let's do this.
2025-03-04 19:53:01 +01:00
sfan5
e84ac56e35 Don't try to update uninitialized shadow frustum 2025-03-04 19:53:01 +01:00
sfan5
47c000a293 Add unittest that lints builtin JSON files 2025-03-04 19:53:01 +01:00
sfan5
304ce4cd54 Fix syntax error in credits.json
reported at <https://forum.luanti.org/viewtopic.php?p=442729>

As it happens this didn't affect most users as jsoncpp allows trailing commas
by default since 2019.
2025-03-04 19:53:01 +01:00
sfan5
d54646d342 Improve error handling of map database creation 2025-03-04 19:53:01 +01:00
sfan5
7abaa8d4cd Make Irrlicht identity material const 2025-03-04 19:53:01 +01:00
sfan5
2796283550 Remove broken fall bobbing 2025-03-04 19:53:01 +01:00
sfan5
7602308835 Revert "Restrict relative mouse mode to Wayland users (#15697)"
see #15761
SDL is the only device that supports relative mode and
mouse input is actually somewhat broken if it's *not* enabled.

This reverts commit 45c5ef8798
and 88b007907a.
2025-03-04 19:53:01 +01:00
sfan5
bc43019467 Fix TerminalChatConsole crash
this setting was removed in #15633
2025-03-04 19:53:01 +01:00
sfan5
8449f5f6db Make devtest grass use overlay tiles 2025-03-04 19:53:01 +01:00
Medley
0eb047ca33
Disable debug-breaking locale workaround when debugging (#15859) 2025-03-03 20:33:42 +01:00
wrrrzr
98048cb06d
Fix missing includes in skyparams.h 2025-03-03 20:33:19 +01:00
Erich Schubert
6e995972bb check y limits early 2025-03-03 20:33:05 +01:00
Erich Schubert
08fad862aa Code cleanups. Function does not return deco count. 2025-03-03 20:33:05 +01:00
sfan5
c3477a4d08 Adjust Android default view range and mapblock limit 2025-03-01 22:40:10 +01:00
sfan5
062207e696 Enforce minimum client_mapblock_limit depending on view range 2025-03-01 22:40:10 +01:00
SmallJoker
24c1230c7b Client: fix disappearing node inventories on older servers
ee9258ce introduced a logic error, which caused clients to lose
node metadata when they should not and vice-versa.
See also: server.cpp / Server::sendAddNode
2025-03-01 21:05:17 +01:00
sfan5
eb79a76742
Android: update SDL support code (#15853) 2025-03-01 18:27:46 +01:00
millennIumAMbiguity
c0328e5363
Centered title in README.md and added icon 2025-03-01 12:27:43 +01:00
Joshua Gerrish
8d822d8231
Fix compile error with MSVC: string is not a member of std 2025-03-01 12:26:33 +01:00
y5nw
a11b25f3f5 Use fallback font correctly for fonts provided by the server 2025-03-01 12:25:24 +01:00
Lars Mueller
90121dc66f Fix & improve glTF loader matrix decomposition 2025-02-27 12:31:04 +01:00
Lars Mueller
d74af2f1a7 Use matrix4::getRotationRadians 2025-02-27 12:31:04 +01:00
Lars Mueller
b6c71b2379 Improve matrix4::getRotationDegrees a bit, radians 2025-02-27 12:31:04 +01:00
Lars Mueller
c261c26456 Add Irrlicht rotation consistency unit tests 2025-02-27 12:31:04 +01:00
Lars Mueller
5abf220979 Fix random usage in matrix4 tests 2025-02-27 12:31:04 +01:00
Lars Mueller
1ceeea34f4 Extend quaternion tests 2025-02-27 12:31:04 +01:00
Lars Mueller
3ae1fd459a Add quaternion conversion unit tests 2025-02-27 12:31:04 +01:00
Lars Mueller
0e86366324 Add test for matrix4::getRotationDegrees 2025-02-27 12:31:04 +01:00
Erich Schubert
58ad604a4b
Note that core.hash_node_position is not a hash function 2025-02-27 12:30:55 +01:00
guinea7pig
415e96184d
Update copyright date in README 2025-02-26 12:22:19 +01:00
sfan5
8654e16725 Disable shadow force updates with performance_tradeoffs 2025-02-26 12:22:06 +01:00
sfan5
eb8b449817 Fix shadow performance regression due to force update
broken by: b861f0c5c5
2025-02-26 12:22:06 +01:00
sfan5
22c81e5292 Print if sdl2-compat is in use 2025-02-26 12:21:57 +01:00
sfan5
42a35cec83 Allow looking straight up or down 2025-02-26 12:21:57 +01:00
sfan5
fc8c6742c4 Update Wireshark dissector 2025-02-26 12:21:57 +01:00
sfan5
ee9258cefd Clean up some packet-related code 2025-02-26 12:21:57 +01:00
grorp
5e89371ecd
TouchControls: touch_use_crosshair, dig/place simulation refactoring (#15800)
-   get rid of simulated mouse events for digging/placing, use keyboard events
    instead
    -   consistent with other simulated events, less code, no need for a
        pointer position
    -   more correct: touch controls no longer break if you have custom
        dig/place keybindings set
-   move reading of "touch_use_crosshair" setting from Game to TouchControls
2025-02-25 13:19:44 -05:00
Andrii Nemchenko
abcd2e0b81
Re-save active entities more often if they move a certain distance (#15605) 2025-02-22 16:19:19 +01:00
sfan5
d12ce68e64 Show unknown object visuals using unknown_object.png sprite 2025-02-22 16:19:04 +01:00
sfan5
83fd837d75 Clean up TileLayer::applyMaterialOptions 2025-02-22 16:19:04 +01:00
sfan5
7d3f0628c4 Use visual = "node" for builtin falling node entity
This greatly simplifies the code at the expense of some
falling nodes not showing up on older clients.
2025-02-22 16:19:04 +01:00
sfan5
27bbe3a873 CAO 'node' visual (#15683) 2025-02-22 16:19:04 +01:00
sfan5
5a8720a484 Change material sharing for CMeshSceneNode 2025-02-22 16:19:04 +01:00
Andrii Nemchenko
e51221d247
Implement metadata-aware version of InvRef:remove_item() (#15771) 2025-02-22 16:18:48 +01:00
DS
0890125962
SDL Irr device: Ignore +-0.0f y mouse wheel events (#15815)
our code often assumes that it's non-zero, e.g.: `event.MouseInput.Wheel < 0 ? -1 : 1`
2025-02-22 16:17:07 +01:00
DS
0667cbf5a2
Clang-Tidy config: Ignore performance-avoid-endl and performance-inefficient-string-concatenation 2025-02-22 16:16:41 +01:00
sfan5
ba62808fe8
Basic camera control API (#15796) 2025-02-19 18:45:45 +01:00
James Morey
50819ace8f
Move clickable_chat_weblinks to Advanced > Miscellaneous (#15799) 2025-02-19 18:45:31 +01:00
et
ef0219c2ed
Prevent accidental wallmounted_to_dir poisoning (#15810)
Prior to this commit, if you used a function like `core.wallmounted_to_dir`, and modified its output, it would modify all of the output in the future.
2025-02-18 21:51:33 +01:00
sfan5
f4bdf72aa4 Simplify SQLite3 schema types
see: <https://www.sqlite.org/datatype3.html>
2025-02-18 19:29:06 +01:00
sfan5
cc352f3b66 Add unit tests for MapDatabase implementations 2025-02-18 19:29:06 +01:00
sfan5
215b000793 Split blockpos into three columns in sqlite3 map database 2025-02-18 19:29:06 +01:00
sfan5
e8728acc5c Some cleanups in Database_SQLite3 2025-02-18 19:29:06 +01:00
Desour
166e02955e Decrease fps_max_unfocused from 20 to 10
This used to be the default for android.
There's not much issues now with using a lower value, so a lower default on all platforms
is reasonable.
The only downside I know of is that if you re-focus the window, it can up till the
next client step until it goes back to normal fps, but 10 Hz feels fast enough.
2025-02-15 18:21:01 +01:00
Desour
138111a542 Don't use fps_max_unfocused for server step time on non-singleplayer main-menu-hosted servers
It's unreasonable to change server step time when the hosting user unfocuses their window.
(m_is_paused is already not set if it's not singleplayer.)
2025-02-15 18:21:01 +01:00
Desour
191cb117f9 Don't use fps_max_unfocused for the pause menu
Nowadays, we have things like buttons that change appearance on hover, or scoll bars
in the pause menu. These do not work fine with low fps.
2025-02-15 18:21:01 +01:00
Miguel P.L
a57677120a
Correct keycode URL in settingtypes.txt/minetest.conf.example (#15784) 2025-02-15 18:20:45 +01:00
sfan5
75dcd94b90
Optimize add_area_node_boxes in collision code (#15719) 2025-02-15 12:19:17 +01:00
sfan5
d027fc9a88 Enable ipv6_server by default 2025-02-15 12:18:07 +01:00
sfan5
a11d526110 Rework socket IPV6_V6ONLY handling 2025-02-15 12:18:07 +01:00
siliconsniffer
eb797c502a
Tweak main menu server list behavior (#15736)
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
2025-02-15 12:17:56 +01:00
Erich Schubert
567b9a997a
Collision: more accurate computation with acceleration and long dtime (#15408)
Co-authored-by: SmallJoker <mk939@ymail.com>
2025-02-15 12:17:44 +01:00
Lars Müller
319e270664
Clean up Irrlicht matrices a bit more (#15733) 2025-02-15 12:17:30 +01:00
sfan5
d015944f6c Revert "Disable SDL2 for 5.11.0"
This reverts commit 29cfb6efff.
2025-02-15 12:14:12 +01:00
Lars Müller
b7f01b0cc7
Don't save load_mod_* = false lines in world.mt (#15758) 2025-02-14 22:25:39 +01:00
sfan5
54bf5d62f2
Fix fgettext call in dlg_settings.lua
(#15614)
2025-02-14 22:17:10 +01:00
sfan5
849a583f66 Continue with 5.12.0-dev 2025-02-14 19:38:30 +01:00
sfan5
0cb7735125 Bump version to 5.11.0 2025-02-14 19:38:27 +01:00
sfan5
028949beca Delete empty languages 2025-02-14 19:13:14 +01:00
ninjum
6bdeb10c16 Translated using Weblate (Galician)
Currently translated at 99.9% (1391 of 1392 strings)
2025-02-14 19:11:16 +01:00
BlackImpostor
44cbae8fad Translated using Weblate (Russian)
Currently translated at 100.0% (1392 of 1392 strings)
2025-02-14 19:11:16 +01:00
waxtatect
f7b2d4760f Translated using Weblate (French)
Currently translated at 100.0% (1392 of 1392 strings)
2025-02-14 19:11:16 +01:00
109247019824
1ec19c2ad2 Translated using Weblate (Bulgarian)
Currently translated at 51.7% (721 of 1392 strings)
2025-02-14 19:11:12 +01:00
Linerly
9bfd39f036 Translated using Weblate (Indonesian)
Currently translated at 99.6% (1387 of 1392 strings)
2025-02-14 19:11:12 +01:00
Miguel
cfff6c4fd7 Translated using Weblate (Spanish)
Currently translated at 97.9% (1363 of 1392 strings)
2025-02-14 19:11:12 +01:00
Wuzzy
147dd3d372 Translated using Weblate (German)
Currently translated at 100.0% (1392 of 1392 strings)
2025-02-14 19:11:12 +01:00
sfan5
cda3dc08ca
Translated using Weblate (German)
Currently translated at 100.0% (1392 of 1392 strings)
2025-02-14 19:10:19 +01:00
mineplayer
78b4f929ce
Translated using Weblate (German)
Currently translated at 100.0% (1392 of 1392 strings)
2025-02-14 19:10:19 +01:00
Desour
2c50066c16 Keep the game paused in pause menu settings
The button_exit[]s were replaced by regular button[]s, to avoid a very short unpause when you
click the btn_settings (probably because it uses ClientEvent stuff).
2025-02-14 16:31:57 +01:00
ROllerozxa
dd0070a6b8
Expose client version information in non-debug builds (#15708)
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
Co-authored-by: sfan5 <sfan5@live.de>
2025-02-09 18:09:07 +01:00
updatepo.sh
e6cf08169e Update translation files 2025-02-09 13:23:37 +01:00
updatepo.sh
0549b6ed0d Update minetest.conf.example and settings_translation_file.cpp 2025-02-09 13:23:22 +01:00
Ilia
3f58def52f Translated using Weblate (Persian)
Currently translated at 9.0% (125 of 1383 strings)
2025-02-09 13:22:18 +01:00
Тарас Арт
0f8723b021 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (1383 of 1383 strings)
2025-02-09 13:22:18 +01:00
Wuzzy
323b31b89d Translated using Weblate (German)
Currently translated at 100.0% (1383 of 1383 strings)
2025-02-09 13:22:18 +01:00
alasa ala
e9574586ea Translated using Weblate (Korean)
Currently translated at 50.0% (692 of 1383 strings)
2025-02-09 13:22:18 +01:00
Negoitescu
584595a78b Translated using Weblate (Romanian)
Currently translated at 55.6% (769 of 1383 strings)
2025-02-09 13:22:18 +01:00
Mateusz Mendel
24452785c2 Translated using Weblate (Polish)
Currently translated at 92.6% (1282 of 1383 strings)
2025-02-09 13:22:18 +01:00
Balázs Kovács
c7dacec94b Translated using Weblate (Hungarian)
Currently translated at 92.9% (1286 of 1383 strings)
2025-02-09 13:22:18 +01:00
Miguel
4255ea42ac Translated using Weblate (Spanish)
Currently translated at 100.0% (1383 of 1383 strings)
2025-02-09 13:22:18 +01:00
தமிழ்நேரம்
36f904b705 Translated using Weblate (Tamil)
Currently translated at 100.0% (1383 of 1383 strings)
2025-02-09 13:22:18 +01:00
Matyáš Pilz
309a394e06 Translated using Weblate (Czech)
Currently translated at 90.4% (1251 of 1383 strings)
2025-02-09 13:22:18 +01:00
தமிழ்நேரம்
4f855ae3fd Added translation using Weblate (Tamil) 2025-02-09 13:22:18 +01:00
தமிழ்நேரம்
5fcd4bd7d0 Added translation using Weblate (Tamil) 2025-02-09 13:22:18 +01:00
Poesty Li
ae61c66dd2 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 95.1% (1316 of 1383 strings)
2025-02-09 13:22:18 +01:00
Ricky Tigg
4167dc7dfc Translated using Weblate (Finnish)
Currently translated at 24.4% (338 of 1383 strings)
2025-02-09 13:22:18 +01:00
Yof
8f29b8f2ae Translated using Weblate (Ukrainian)
Currently translated at 100.0% (1383 of 1383 strings)
2025-02-09 13:22:18 +01:00
Yof
fca69a9b2a Added translation using Weblate (Ukrainian) 2025-02-09 13:22:18 +01:00
BlackImpostor
785b8a2400 Translated using Weblate (Russian)
Currently translated at 100.0% (1383 of 1383 strings)
2025-02-09 13:22:18 +01:00
mineplayer
5ed14fe8c4 Translated using Weblate (German)
Currently translated at 100.0% (1383 of 1383 strings)
2025-02-09 13:22:18 +01:00
Siber
fa6c61bd69 Translated using Weblate (Turkish)
Currently translated at 83.3% (1153 of 1383 strings)
2025-02-09 13:22:18 +01:00
liu lizhi
61d7dc91c7 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 92.1% (1275 of 1383 strings)
2025-02-09 13:22:18 +01:00
109247019824
2f95b14f09 Translated using Weblate (Bulgarian)
Currently translated at 39.9% (553 of 1383 strings)
2025-02-09 13:22:18 +01:00
Lukáš Lizák
23527b5263 Translated using Weblate (Slovak)
Currently translated at 92.2% (1276 of 1383 strings)
2025-02-09 13:22:18 +01:00
Emil Faltynek
4cd58b8b04 Translated using Weblate (Czech)
Currently translated at 90.3% (1250 of 1383 strings)
2025-02-09 13:22:18 +01:00
Hugo
ccccfa8d5e Translated using Weblate (Esperanto)
Currently translated at 80.9% (1119 of 1383 strings)
2025-02-09 13:22:18 +01:00
Hugo
fbc3094065 Translated using Weblate (Spanish (American))
Currently translated at 28.4% (394 of 1383 strings)
2025-02-09 13:22:18 +01:00
Kevin Hagen
0f8984be2d Translated using Weblate (Filipino)
Currently translated at 36.5% (506 of 1383 strings)
2025-02-09 13:22:18 +01:00
cat
0bea91a7f5 Translated using Weblate (Danish)
Currently translated at 49.0% (678 of 1383 strings)
2025-02-09 13:22:18 +01:00
reimu105
6adb8f92d4 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 91.3% (1263 of 1383 strings)
2025-02-09 13:22:18 +01:00
Muhammad Nuruddin
9bd650ada2 Translated using Weblate (Malay)
Currently translated at 96.6% (1337 of 1383 strings)
2025-02-09 13:22:17 +01:00
Linerly
0fbedf828d Translated using Weblate (Indonesian)
Currently translated at 96.3% (1332 of 1383 strings)
2025-02-09 13:22:17 +01:00
ninjum
5a790ad702 Translated using Weblate (Galician)
Currently translated at 100.0% (1383 of 1383 strings)
2025-02-09 13:22:17 +01:00
Oleg
a7fe400db9 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (1383 of 1383 strings)
2025-02-09 13:22:17 +01:00
ROllerozxa
ea9f8a9349 Translated using Weblate (Swedish)
Currently translated at 64.5% (893 of 1383 strings)
2025-02-09 13:22:17 +01:00
Stepan Bazrov
0db69655e1 Translated using Weblate (Russian)
Currently translated at 100.0% (1383 of 1383 strings)
2025-02-09 13:22:17 +01:00
sfan5
2515a40fff Fix some setting descriptions 2025-02-09 13:22:17 +01:00
wrrrzr
045951b23c
Const correct Thread class (#15741) 2025-02-09 12:20:47 +01:00
sfence
9166b57c2a
Try to fix macOS signature problem 2025-02-09 12:20:30 +01:00
Lars Müller
fd8d04ff76
GUI inventory list: Do not render clipped slots (#15764) 2025-02-09 12:19:25 +01:00
Miguel P.L
6def21b5e3
Rename Minetest to Luanti in CONTRIBUTING.md 2025-02-09 12:19:16 +01:00
grorp
2fb9e4d18a Fix enum setting used as requirement 2025-02-06 19:20:44 +01:00
siliconsniffer
36c9742c0a
Main menu server list: Select first compatible search result (#15755)
Fixes a bug where an incompatible server would be selected instead due to being the "first" result before grouping.
2025-02-06 19:19:38 +01:00
Montandalar
ec83312540
Change main website domain to www.luanti.org (#15748)
Renames all remaining occurences of minetest.net except for the "MS Windows icon resource" file
2025-02-06 19:16:24 +01:00
sfan5
1548b2ae9e
Update credits for 5.11.0 (#15753) 2025-02-05 21:02:09 +01:00
sfan5
0fa56a9f7c Revert "Prefer GL3 driver over legacy GL driver"
This reverts commit 9f52f84f2b
and ded8c25e34.
2025-02-04 12:19:18 +01:00
sfan5
88b007907a
Enable relative mouse mode on Android (#15750)
fixes #15727
2025-02-04 12:19:09 +01:00
Lars Müller
a73e71510a
Clamp client-sent movement speed control (#15721)
Results in the `movement_x` and `movement_y` fields of `player:get_player_control()` being safe to use
(otherwise users would need to compute the length as `(x^2 + y^2)^0.5` and clamp that to 1 themselves).
2025-02-04 12:19:00 +01:00
SmallJoker
b2a6c3ba23 Server: undo inventory client prediction
The affected player inventory list is now marked as modified.
This way, it will also be re-sent if the server denies the action.
2025-02-02 19:05:09 +01:00
SmallJoker
8caf922df6 InvRef: deduplicate code 2025-02-02 19:05:09 +01:00
SmallJoker
5419345dff
PauseMenuScripting: resolve absolute 'builtin' path before substring check (#15720)
In 99% of the cases, this behaviour is identical to before.
With this commit, it is again possible to have 'builtin' a symlink that e.g.
points to the engine source directory, which is helpful for development purposes.
2025-02-02 19:04:50 +01:00
cx384
a8c4c55d58
Document that object properties colors field is unused (#15685) 2025-02-02 19:04:18 +01:00
wrrrzr
f17498b049
Delete irrlichttypes_extrabloated.h (#15723)
Co-authored-by: cx384 <cx384@proton.me>
2025-02-01 13:41:51 +01:00
Stefan Beller
63e9b01f7d COSOperator: Use NSPasteboardTypeString instead of NSStringPboardType
According to https://developer.apple.com/documentation/appkit/nsstringpboardtype?language=objc
we can replace it with NSPasteboardTypeString:

> In apps that adopt App Sandbox, use an NSURL object, a bookmark, or a
> filename pasteboard type instead. In a nonsandboxed app, you can also
> use the NSPasteboardTypeString pasteboard type.
2025-02-01 13:41:17 +01:00
cathanof
db97b2bd93
Updates some Minetest references to Luanti (#15712) 2025-02-01 13:40:45 +01:00
sfan5
c0422b18e7
Propagate peer ID change to outgoing reliables (#15680)
Otherwise a desync could ocurr since the server does strict checking.
fixes #15627
2025-02-01 13:23:00 +01:00
sfan5
29cfb6efff
Disable SDL2 for 5.11.0 (#15704)
see #14545
2025-01-26 19:18:18 +01:00
Mark Wiemer
ffb4a5b565
Rename dev.minetest.net to dev.luanti.org (#15718) 2025-01-26 19:17:36 +01:00
AFCMS
99a27b7495
Fix documentation for the official Docker image (#15713) 2025-01-26 19:17:26 +01:00
cx384
e9826f7819
Move EnumString to separate file and add enum_to_string (#15714) 2025-01-26 19:17:14 +01:00
Erich Schubert
bee541f378
Lua get_biome_data: calc heat and humidity only once (#15715) 2025-01-26 19:17:02 +01:00
sfan5
45c5ef8798
Restrict relative mouse mode to Wayland users (#15697) 2025-01-26 19:16:46 +01:00
Stefan Beller
282c81fe3a
filesys: replace goto by #else to avoid compiler warning 2025-01-25 10:48:15 +01:00
sfan5
b861f0c5c5
Fix shadow flicker on camera offset update (#15709) 2025-01-25 10:47:52 +01:00
Lars Müller
7c6ade0fc5
Restore proper rollback database indexing (#15707) 2025-01-24 16:50:59 +01:00
grorp
41dfac96c1
Add setting callbacks for Camera and TouchControls (#15700) 2025-01-24 16:50:51 +01:00
sfan5
b5e084c9a5
Update github URL references (#15705) 2025-01-24 16:50:39 +01:00
fineless71
f592b57dc6
Fixed serialization_version and version_string key name in docs (#15699) 2025-01-23 12:18:30 +01:00
sfan5
a99e985674
Centralize arbitrary area volume limit and raise it (#15696) 2025-01-23 12:18:20 +01:00
SFENCE
af3f696423 Code style fixes. 2025-01-21 16:29:12 +01:00
SFENCE
24e9db07ec Check for indent spaces and fixed found problems. Lib C/C++ code is not checked. 2025-01-21 16:29:12 +01:00
Lars Müller
547e1476bb
Allow overriding fonts via media files (#15606)
Co-authored-by: sfan5 <sfan5@live.de>
2025-01-19 20:42:40 +01:00
grorp
eeb6cab4c4
In-game settings menu using separate Lua environment (#15614) 2025-01-19 13:07:04 -05:00
sfan5
3cb07d5fb6 Add limited game auto-selection to dedicated server 2025-01-19 18:39:32 +01:00
sfan5
a262be6a47 Move camera offset to consistent point in game loop
fixes #10027
2025-01-19 18:39:32 +01:00
sfan5
e5f276ecee Apply some minor code cleanups 2025-01-19 18:39:32 +01:00
sfan5
94239153b5 Fix map rendering glitches on camera offset update
(regression)
2025-01-19 18:39:32 +01:00
Zughy
f6a0bf915d
Remove built-in knockback in next major release 2025-01-18 00:27:57 +01:00
Lars Müller
8719a816e7
Fix CMatrix<T>::getScale returning negative scale (#15687) 2025-01-18 00:27:27 +01:00
rubenwardy
c8b5e3b741
Update my email in SECURITY.md 2025-01-15 22:15:48 +01:00
sfan5
cf074dd271
Cache grouped sparse buffers (#15594)
continuation of #15531
2025-01-14 23:40:57 +01:00
cosin15
7053348e31
Fix buggy memcpy call in a template (#15672) 2025-01-14 20:26:29 +01:00
DS
2bfcd45b35
Fix always waving semitransparent liquid regression 2025-01-13 09:39:20 +01:00
sfan5
636a734d78
Resolve some quirks with (wield) item meshes for nodes (#15654) 2025-01-13 09:39:06 +01:00
cx384
464cc92521 Main menu server tab mods button (#15561)
Co-authored-by: Lars Müller <appgurulars@gmx.de>
2025-01-12 16:23:56 +01:00
cx384
5aeaf20849 CI png optimized check 2025-01-12 16:15:01 +01:00
cx384
1427a98c59 Optimize png files 2025-01-12 16:15:01 +01:00
sfan5
903d13ffff Make sure mod paths are always absolute 2025-01-12 14:49:25 +01:00
sfan5
d0d7c11fe1 Stop ServerThread immediately on errors 2025-01-12 14:49:25 +01:00
sfan5
9dd09d1056 Prevent VoxelManipulator size overflow 2025-01-12 14:49:25 +01:00
sfan5
2cdf3af1b8 Reduce size of SMaterial struct 2025-01-12 14:49:25 +01:00
Hanicef
be75e42d77
Improve sleep accuracy on FPS limiter (#15648) 2025-01-12 14:49:13 +01:00
chmodsayshello
d4a6df3389
Add chat console scrollbar (#15104) 2025-01-12 14:49:01 +01:00
lhofhansl
d15214af52
Remove shadow direction quantization, increase shadow update frames instead (#15665)
* This removes shadow direction quantization and defaults shadow_update_frames to 16 instead.
2025-01-11 16:41:50 -08:00
Desour
d044c27b5f MeshMakeData: Explain members, and add grid size and minimap flag 2025-01-11 16:43:37 +01:00
Desour
c0ce918d77 Meshgen: Handle enable_water_reflections like smooth_lighting 2025-01-11 16:43:37 +01:00
Desour
9a60b83061 Rename meshgen lighting variables 2025-01-11 16:43:37 +01:00
Desour
7ba5973108 Get rid of MapblockMeshGenerator::cur_node.light 2025-01-11 16:43:37 +01:00
Desour
c4bfa65201 Fix black plantlike_rooted without smoothlighting
There was code to take the light of the node above, but the color was not updated.
To reproduce, don't set paramtype="light", (i.e. not what all the devtest nodes do).
2025-01-11 16:43:37 +01:00
Desour
6a1b4a93c7 MapblockMeshGenerator: Move unsmooth lighting color out of useTile, and instead compute it once per node 2025-01-11 16:43:37 +01:00
Desour
3becbda0aa Get rid of MapblockMeshGenerator::cur_node.scale 2025-01-11 16:43:37 +01:00
Desour
a14b8d0976 Get rid of MapblockMeshGenerator::cur_node.tile
There is more than one tile per node, so it shouldn't be stored like this.
This makes MapblockMeshGenerator less stateful.
2025-01-11 16:43:37 +01:00
Desour
966abc85da transformNodeBox(): Rotate first by facedir 2025-01-11 16:43:37 +01:00
Desour
1e81c454c8 transformNodeBox(): Replace BOXESPUSHBACK macro with a lambda 2025-01-11 16:43:37 +01:00
Desour
cbc074feb5 Remove the unnecessary MeshCollector::append overload 2025-01-11 16:43:37 +01:00
DS
436b391a80
VoxelArea: Fix missing cacheExtent calls in helpers (#15657) 2025-01-11 16:43:20 +01:00
cosin15
37899f7a14
Fix CFileSystem::FileSystemType related UB (#15669) 2025-01-11 16:42:36 +01:00
sfan5
e5542e5b02
Remove or restrict some client settings (#15633) 2025-01-08 10:56:45 +01:00
sfan5
41f7031e49
Fix reduced bloom at 10 bits
forgotten in eb8beb335e
2025-01-08 10:56:28 +01:00
Lars Müller
7f1316236b
Silence failing raycast unit test (#15644)
The cause for the test failure is an edge case bug
in the raycast implementation (perfectly diagonal raycasts).

This is fixed by switching to a continuous random distribution
which makes it extremely unlikely that the buggy edge case occurs.

Additionally, devtest unit test failures now print their random seed
to be easier to reproduce in the future.
2025-01-08 10:56:05 +01:00
sfan5
c346612468
Fix falling nodes digging nodes they aren't supposed to (#15638) 2025-01-06 19:42:11 +01:00
DS
431c5c8b36
Fix wireframe mode in opengl3 driver (#15626)
`GL_LINES` isn't suitable, because it makes lines between pairs of 2 vertices,
not loops around 3 vertices.
Support for OpenGL ES isn't simple, as it has no `glPolygonMode`. And showing broken
wireframe (i.e. with `GL_LINES`) would cause confusion.
2025-01-06 19:39:17 +01:00
Lars Müller
f467bde6ac
Add unit test for raycasts falsely skipping nodes (#15555) 2025-01-05 16:32:09 +01:00
sfan5
06f39e1915 Fix missing bounding box for CAO 'wielditem' visual 2025-01-05 16:30:53 +01:00
sfan5
4774e65ed9 Implement polygon offset in GL3 driver 2025-01-05 16:30:53 +01:00
sfan5
5b14c03301 Use polygon offset to fix z-fighting for overlay tiles 2025-01-05 16:30:53 +01:00
wrrrzr
dfd7628950
Rename getGameMinetestConfig to getGameConfig 2025-01-05 13:20:37 +01:00
DS
4c4918b154
Fix show_debug setting causing inconsistency between debug control and shown debug info 2025-01-05 13:20:21 +01:00
sfan5
5bcb7983ec Fix missing bounding box for upright_sprite
(also simplifies the mesh building)
fixes #15616
2025-01-04 12:40:14 +01:00
sfan5
0614b175b5 Optimize draw3DBox generic case 2025-01-04 12:40:14 +01:00
sfan5
4e2ca05f08 Add debug mode that shows mesh buffer bounding boxes 2025-01-04 12:40:14 +01:00
sfan5
9554e3d43a Add support for glObjectLabel to aid debugging 2025-01-04 12:40:14 +01:00
wrrrzr
d2004d32f6
Move AutoExposure constructor to header 2025-01-04 12:39:52 +01:00
SmallJoker
e8f6127779
Reduce irrlicht_extrabloated.h includes in header files 2025-01-04 12:39:34 +01:00
sfan5
81f51492ff
Don't silence errorstream in tests (#15629) 2025-01-04 12:39:16 +01:00
JosiahWI
eb512cc36a
Eliminate superfluous null check in CGUIEnvironment::getNextElement 2025-01-04 12:38:38 +01:00
cx384
c4d624083d Main menu server tab search improvements 2025-01-02 15:22:49 +01:00
wozrer
a1b8d20f18 Rename getMapSettingNoiseParams to getNoiseParams 2025-01-02 14:59:19 +01:00
sfan5
0a67e6180d Disable failing unit test for the time being
see #15598
2025-01-02 12:42:19 +01:00
lhofhansl
2db4ad8c77
Fix MSAA and bloom flashing artifacts (#15610)
* Mark varColor and nightratio as centroids
* Leave old workaround in place for GLES
2025-01-01 14:18:05 -08:00
grorp
f54d209bc8
Remove normal map leftovers (#15609)
leftovers from #10487 / ed22260822
2024-12-31 19:28:57 +01:00
sfan5
a4d2633ac6 Minor improvements in ImageSource code 2024-12-31 14:47:46 +01:00
sfan5
f37f9a6f0b Optimize getImageAverageColor
also fixes a bug with non-square handling

before:
  getImageAverageColor [us] _____________________  804x  11.253

after:
  imageAverageColorInline [us] __________________  804x   0.557
2024-12-31 14:47:46 +01:00
sfan5
ded8c25e34 Change default post_processing_texture_bits to 10
Since the legacy GL driver is no longer the default,
we don't run into a situation where an unintended fallback to 8-bit happens.
2024-12-31 14:47:46 +01:00
sfan5
1a6ae148b7 Update texture_min_size description 2024-12-31 14:47:46 +01:00
sfan5
8c52d5f2dd Implement LODBias in GL3 driver
(currently unused)
2024-12-31 14:47:46 +01:00
sfan5
1ea8763259 Clean up Irrlicht shader API 2024-12-31 14:47:46 +01:00
sfan5
40afc84597 Replace data structure for HW buffer book-keeping
before
  time in endScene ÷ num hw buf ________________  199x   0.128
after
  time in endScene ÷ num hw buf ________________  199x   0.057
2024-12-31 14:47:46 +01:00
sfan5
a2058f7f3a Avoid some inefficiencies when handling ItemStack(Metadata) 2024-12-31 14:47:46 +01:00
sfan5
d884a1624f Show active HW buffers in profiler 2024-12-31 14:47:46 +01:00
grorp
b50b619be7
Add explanation to touchscreen item tooltip code (#15607)
this explains some cryptic inventory code I wrote in #14029 / 771da80bbb
2024-12-31 14:11:17 +01:00
grorp
27c3aade5d
TouchControls: More methods instead of static functions (#15602) 2024-12-30 19:03:32 +01:00
sfan5
f2b1cc3e61
Fix situation around aabbox3d default constructor (#15586)
Co-authored-by: JosiahWI <41302989+JosiahWI@users.noreply.github.com>
2024-12-29 14:36:30 +01:00
wrrrzr
cca65fde08
Controls: extract init_joysticks (#15597) 2024-12-28 22:05:01 +01:00
SmallJoker
35bc217ba8
IrrlichtMt: Move OpenGL 3+ transformation matrix to shaders (#15591)
This replaces annoying calculations on C++-side and eases the
implementation of 2D geometry batch rendering a lot.
2024-12-28 22:04:05 +01:00
Lars Müller
412cc96bc9
Fix some compiler warnings (#15596) 2024-12-26 11:29:00 +01:00
sfan5
d2a7875b5b Group sparse mesh buffers over entire scene for rendering 2024-12-24 15:27:08 +01:00
sfan5
612d4f9656 Improve quicktune feature a bit 2024-12-24 15:27:08 +01:00
sfan5
33b8307119 OpenGL: allow uploads of buffers to hardware ahead-of-time 2024-12-24 15:27:08 +01:00
sfan5
bb550158fc OpenGL: encapsulate VBOs into a class
internal only for now but this will be handy
2024-12-24 15:27:08 +01:00
Lars Müller
b087e2554f
Add glTF STEP interpolation support (#15525) 2024-12-24 15:25:07 +01:00
SmallJoker
d1dd044455
Reorder client initialization (#15554)
Previously, ServerEnv created a player instance before they're fully initialized.
This commit moves all initialization steps and callbacks into TOSERVER_CLIENT_READY
^ which includes StageTwoClientInit for player loading or creation
2024-12-24 15:24:56 +01:00
sfan5
c49ff76955
IGUIFont / CGUITTFont code cleanups (#15581) 2024-12-23 12:49:47 +01:00
sfan5
0bfd9bc09e Condense renderer information into a single string 2024-12-23 12:49:31 +01:00
sfan5
9f52f84f2b Prefer GL3 driver over legacy GL driver 2024-12-23 12:49:31 +01:00
cx384
83bc27d99d Move formspec code from game.cpp to separate file 2024-12-21 18:43:05 +01:00
sfan5
d4ccc8de79 Fix incorrect handling of skinned meshes as mesh nodes
fixes #15576
2024-12-20 19:04:56 +01:00
siliconsniffer
7bf0b1fc7e
Add server url button to main menu (#15536)
Co-authored-by: Zughy <63455151+Zughy@users.noreply.github.com>
2024-12-20 15:04:26 +01:00
sfan5
a6293b9861 Initial refactoring on shader usage and generation
`IShaderSource` was designed with the idea that if you want a shader,
you must want it for a node. So it depends heavily on being given a tile
material and the node drawtype. But this doesn't make sense neither in theory
nor in practice.
This commit takes a small step towards removing the incorrect abstraction.
2024-12-20 15:04:08 +01:00
sfan5
eb8beb335e Fix bloom with post_processing_texture_bits < 16 2024-12-20 15:04:08 +01:00
sfan5
7354cbe463 Fix core::array::reallocate when shrinking 2024-12-20 15:04:08 +01:00
cx384
f06383f78c
Minor API reference fixes 2024-12-20 15:03:55 +01:00
cx384
b172e67295
Remove game_ui from Client class 2024-12-20 15:03:45 +01:00
sfan5
10f1e142f6
Fix threshold value for imageCleanTransparent
fixes #15401
2024-12-20 15:03:30 +01:00
Lars Müller
a37bdbf8b7
Restore .x models to working state (#15550)
* Add "lava flan" (.x model) smoke test

* Fix double finalize in `.x` mesh loader

* Use reserve instead of resize again

The weights are added indirectly via `AnimatedMesh->addWeight`
2024-12-18 20:29:35 +01:00
Lars Müller
f99a1a7c7c Revert "Optimize raycast performance (#15233)"
This reverts commit f7a695c212.
2024-12-14 19:29:00 +01:00
Lars Müller
52a6673dab
Get rid of obsolete workaround for collision detection bugs (#15540) 2024-12-14 17:04:12 +01:00
Lars Müller
fef28aced9
Irrlicht: Get rid of obsolete setDebugName (#15541)
Co-authored-by: sfan5 <sfan5@live.de>
2024-12-14 17:03:08 +01:00
Lars Müller
23e502fa0e
Test & document conventions used by matrix4::setRotation* (#15542)
Also includes a minor `matrix4::transformVect` refactor to make testing easier.
2024-12-14 17:02:16 +01:00
sfence
f7a695c212
Optimize raycast performance (#15233)
by skipping nodes not on the ray with selection boxes smaller than 1x1x1 early on
2024-12-14 17:01:06 +01:00
Wuzzy
ba63c1505a
Docs: Change translation example from NS to PS (#15476)
The currently established convention uses `NS` for "translation no-ops", i.e., it will be collected by a string-collecting utility but not be translated by Luanti at this place.

We don't want to mislead modders with this example into using `NS` for plural forms instead, breaking with the established convention and making use of automated tools harder.

See also: https://github.com/minetest/modtools/pull/11
2024-12-14 16:59:29 +01:00
y5nw
ac7406c8a1
Fixup parsing for Plural-Forms (#15519) 2024-12-12 15:33:34 +01:00
Lars Müller
1e59b9a756
Refactor SkinnedMesh (#15522) 2024-12-12 15:33:08 +01:00
SmallJoker
d123bc0951
Main menu: show favorite removal button for offline servers (#15530)
This fixes a regression from 6c324cb871.
2024-12-12 15:31:48 +01:00
Timur1324
9f71e74158
Get server list over https (#15538) 2024-12-12 15:31:12 +01:00
DS
bcbee873e8
Use openssl's sha1 and sha256, optionally (#15472) 2024-12-10 22:00:43 +01:00
sfan5
4f800dd2b4 Change VoxelArea volume to be u32 2024-12-10 22:00:28 +01:00
sfan5
67126cbd1b Fix meaning of VoxelArea::hasEmptyExtent() 2024-12-10 22:00:28 +01:00
sfan5
8957739cdf Use appropriate sized type for VoxelArea extent 2024-12-10 22:00:28 +01:00
Lars Mueller
3c5e0d10fc Rotate meshnode normals correctly instead of recalculating 2024-12-10 22:00:18 +01:00
sfan5
21437090b8 Don't recalculate meshnode normals unnecessarily 2024-12-10 22:00:18 +01:00
siliconsniffer
eb6731bdc6
Main menu: Add server favorite button (#15486)
This adopts PR 13446.
2024-12-08 20:28:37 +01:00
SmallJoker
480eb7d816 Mapgen: Fix biome Y calculation regression
BiomeGen::getNextTransitionY(y) did not guarantee the condition (y < biome_y_min)
of the next loop because the function may return the value (biome_y_min - 1).
Hence, the biome was not updated until one Y coordinate after.
2024-12-08 20:27:33 +01:00
SmallJoker
50928b9759 Mapgen: Add rudimentary unittests 2024-12-08 20:27:33 +01:00
cx384
c7fe2ee5c9
Add core.spawn_tree_on_vmanip (#15415)
This function works like `core.spawn_tree`, but spawns an L-system tree onto a VoxelManip object instead on the map.
2024-12-08 20:27:22 +01:00
Lars Müller
8d43ad2522
Migrate rendered Lua API docs CNAME to api.luanti.org 2024-12-08 19:48:52 +01:00
Lars Müller
ae96a8d4fa
Fix mainmenu crash if no servers match search
fixes a regression caused by 6c324cb
2024-12-06 22:01:31 +01:00
veprogames
b857798848
Fix distorted Sun, Moon and Star visuals based on Orbit Tilt (#15459) 2024-12-06 22:00:06 +01:00
SmallJoker
5a8412dd23
Formspec: Move tooltip above cursor when lacking space (#15470) 2024-12-06 21:59:51 +01:00
cx384
88c845166c
Fix L-System trees fruit node regression (#15513) 2024-12-06 18:06:27 +01:00
Lars Müller
05d31222f7
Allow non-normalized weights in glTF models (#15310)
We are being lax here, but the glTF specification just requires that "when the weights are stored using float component type, their linear sum SHOULD be as close as reasonably possible to 1.0 for a given vertex"

In particular weights > 1 and weight sums well below or above 1 can be observed in models exported by Blender if they aren't manually normalized.
These fail the glTF validator but Irrlicht normalizes weights itself so we can support them just fine.

The docs have been updated to recommend normalizing weights (as well as documenting the status of interpolation support).

Weights < 0, most of them close to 0, also occur. Consistent with Irrlicht, we ignore them, but we also raise a warning.
2024-12-06 18:05:03 +01:00
Lars Müller
3e10d9ccf5
Refactor: Merge [IC]SkinnedMesh into SkinnedMesh (#15511) 2024-12-06 18:03:44 +01:00
sfan5
810f39767c Move SMaterial std::hash impl to its header 2024-12-04 18:20:34 +01:00
sfan5
a799a54894 Fix some issues with mt_opengl 2024-12-04 18:20:34 +01:00
sfan5
1fb7202028 GL: fix and clean up some code 2024-12-04 18:20:34 +01:00
sfan5
36edc3f161 Add 10-bit texture format and setting to chose PP color depth
(and move some settings to the advanced category)
2024-12-04 18:20:34 +01:00
AFCMS
e545e96d2b
Make string to v3f parsing consistent, replace core.setting_get_pos() by core.settings:get_pos() (#15438)
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
2024-12-04 18:19:46 +01:00
Lars Müller
18caf3a18d
Fix false positive compiler warning 2024-12-04 18:19:12 +01:00
HybridDog
a45b04ffb4
Less explicit memory management in Irrlicht image writer classes (#15493)
CImageWriterPNG::writeImage() and writeJPEGFile() explicitly allocate
and deallocate memory with `new` and `delete`, which is prone to programming errors.
The code also has non-functional error handling:
When memory allocation fails, `new` throws an `std::bad_alloc` exception
and never returns `nullptr`, so the check for `nullptr` is always false.

Co-authored-by: DS <ds.desour@proton.me>
2024-12-03 16:52:48 +01:00
JosiahWI
03813a5b5e
Use CMake list directives where appropriate
I think this communicates the intent a little better than using a `set`
directive, and it makes the code a little less verbose, too.
2024-12-03 16:52:15 +01:00
JosiahWI
818bca68d1
Use add_compile_options where appropriate 2024-12-03 16:51:53 +01:00
sfan5
a4d1b5b155
Fix script security path normalization in presence of links (#15481) 2024-12-03 16:51:34 +01:00
wrrrzr
e9080f91f2
Cleanup ban.cpp/h (#15496)
Make BanManager more const correctly
Delete unused includes
2024-12-01 20:52:13 +01:00
Kevin @ Sesam Solutions
7cc5a6ec68
Add Minetest keyword for backwards compatibility (#15491)
This helps people looking for `minetest`
2024-12-01 20:51:33 +01:00
JosiahWI
c3db9492a7
Update CMakeLists to use add_compile_definitions (#15483)
This is a newer feature introduced in CMake 3.12, which is now our
minimum version. It supercedes `add_definitions`. I've also replaced
some calls to set `CMAKE_<LANG>_FLAGS` that were used to set
definitions. This is a fairly trivial routine build maintenance that
is not intended to have any behavioral effects.
2024-11-29 12:02:48 +01:00
Lars Müller
d068f34753
Get rid of definitelyIdentityMatrix (#15480) 2024-11-29 12:00:09 +01:00
DS
df4e70b2c7
Add a setting to group transparency sorted triangles by buffer (#15115) 2024-11-28 14:22:53 +01:00
SmallJoker
c175046d30
Network: Fix serialization version checks (#15477)
This fixes some incorrect assumptions that the read and write version ranges are identical - whereas they're in fact not.
2024-11-27 18:39:57 +01:00
Lars Müller
6c324cb871
Main menu: Fix server selection (#15466)
Server selections are now always correct (no more arbitrarily changing selections if the order of the serverlist changes) and consistent with the address + port in the sidebar.
2024-11-27 18:39:28 +01:00
lhofhansl
8c56434bd3
Clamp pre-bloom color to valid range (#15453)
That avoids flashing artifacts when combining MSAA and bloom.
2024-11-25 11:56:32 -08:00
Lars Müller
b77ad82fb9
Sanitize invalid particle spawner time (#15465) 2024-11-24 19:23:53 +01:00
veprogames
11b19cd126
Doc: Add missing jpeg package for Arch Linux (#15461) 2024-11-24 19:23:32 +01:00
grorp
6a1d22b2c5
Implement an editor to customize the touchscreen controls (#14933)
- The editor is accessible via the pause menu and the settings menu.
- Buttons can be moved via drag & drop.
- Buttons can be added/removed. The grid menu added by #14918 is used to show
  all buttons not included in the layout.
- Custom layouts are responsive and adapt to changed screen size / DPI /
  hud_scaling.
- The layout is saved as JSON in the "touch_layout" setting.
2024-11-24 11:33:39 +01:00
luk3yx
4faa16fe0d
Clarify behaviour of core.hypertext_escape (#15464) 2024-11-22 17:56:35 +01:00
siliconsniffer
b6eaf7b5a4
Main menu: Player list for public servers (#15425) 2024-11-21 20:34:40 +01:00
Richard Try
946b3a4222
Typo in lua_api.md (#15440)
Duplicate text removed.
2024-11-20 18:36:35 +00:00
Christian Betancourt Dias
b63e988bd6
Fix naming conventions for CMatrix4::set(Inverse)RotationRadians() (#15204) 2024-11-19 13:38:19 +01:00
Lars Müller
15e8f9e6a0
Fix rendering regression with TGA type 1 files with BGRA8 color (#15402)
TGA uses BGR(A)8, stored in memory in that order. Irrlicht typically expects 0xAARRGGBB, which depends on endianness.
(This means that on little endian, no [B][G][R][A] -> 0xAARRGGBB conversion needs to be done, but Irrlicht was swapping the bytes.)

This makes both conversion functions consistently convert from [B][G][R]([A]) to 0xAARRGGBB (SColor), documents them properly and moves them to CImageLoaderTGA.cpp
so no poor soul shall be fooled by them in the near future.

---------

Co-authored-by: Ælla Chiana Moskopp <erle@dieweltistgarnichtso.net>
2024-11-19 13:37:05 +01:00
Lars Müller
138052adfc
Add particle blend mode "clip" (#15444)
This lets modders avoid alpha blending rendering bugs as well as potential (future) performance issues.
The appropriate blend modes are also used for node dig particles.

---------

Co-authored-by: sfan5 <sfan5@live.de>
2024-11-19 13:30:17 +01:00
sfan5
f493e73aeb Fix changing secure settings from mainmenu
forgotten in ea4ae55e24
closes #15454
2024-11-18 23:58:42 +01:00
grorp
9b6a399011
Implement support for FSAA in combination with post-processing (#15392)
- Actually it's MSAA I think, or perhaps the terms are equivalent
- I've made it fit into the existing Irrlicht architecture, but that has resulted in code duplication compared to my original "hacky" approach
- OpenGL 3.2+ and OpenGL ES 3.1+ are supported
- EDT_OPENGL3 is not required, EDT_OPENGL works too
- Helpful tutorial: https://learnopengl.com/Advanced-OpenGL/Anti-Aliasing, section "Off-screen MSAA"
- This may be rough around the edges, but in general it works
2024-11-18 14:06:48 +01:00
veprogames
a8ea165042
Replace occurences of 'wiki.minetest.net' with 'wiki.luanti.org' 2024-11-18 00:04:32 +01:00
HybridDog
7295b6c88c
Remove unused and rarely used irrlicht color functions (#15442)
SColor.h contains many functions which are unused and/or perform linear
operations on non-linear 8 bit sRGB color values, such as the plus operator and
`SColor::getInterpolated()`, and there is no documentation about missing gamma
correction.
Some of these functions are not called or called only once:
* `getAverage(s16 color)`: Unused
* `SColor::getLightness()`: Unused
* `SColor::getAverage()`: Claims to determine a color's average intensity but
  calculates something significantly different since SColor represents
  non-linear sRGB values.
* `SColor::getInterpolated_quadratic()`: Claims to interpolate between colors
  but uses the sRGB color space, which is neither physically nor perceptually
  linear.
* `SColorf::getInterpolated_quadratic()`: Unused
* `SColorf::setColorComponentValue()`: Unused

Removing or inlining these functions can simplify the code and documenting
gamma-incorrect operations can reduce confusion about what the functions do.

This commit does the following:
* Remove the above-mentioned unused functions
* Inline `SColor::getAverage()` into
  `CIrrDeviceLinux::TextureToMonochromeCursor()`
* Rename `SColor::getLuminance()` into `SColor::getBrightness()` since it does
  not determine a color's luminance but calculates something which differs
  significantly from physical luminance since SColor represents non-linear sRGB
  values.
* Inline `SColor::getInterpolated_quadratic()` into `GameUI::update()`,
  where it is only used for the alpha value calculation for fading
* Document gamma-incorrect behaviour in docstrings
2024-11-18 00:02:53 +01:00
sfan5
8d2e770361 Minor corrections in gl3/gles2 drivers 2024-11-16 16:54:22 +01:00
sfan5
cc8c3d501c Don't keep a copy of all texture images around 2024-11-16 16:54:22 +01:00
sfan5
58ccf0ba82 Fix some smaller issues with texture/image handling 2024-11-16 16:54:22 +01:00
sfan5
4aae31ad5e Add support for ECF_D24 texture format
and prefer it over D32 for our depth buffer, this can have performance benefits
2024-11-16 16:54:22 +01:00
sfan5
3c42cc8684 Revive texture download code and fix it on GLES 2024-11-16 16:54:22 +01:00
sfan5
11837d4623
Remove BMP image support (#15434)
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
2024-11-15 12:21:30 +01:00
Erich Schubert
46f0baff09
Improve documentation of liquid_surface (#15012) 2024-11-15 12:19:41 +01:00
SmallJoker
8f03b70584 IrrlichtMt: Document Driver/Device compatibility 2024-11-15 12:18:48 +01:00
SmallJoker
4838eb2f7d Non-SDL: Add opengl3 support 2024-11-15 12:18:48 +01:00
SmallJoker
87ac32edea Dynamic shadows: whitelist the 'opengl3' driver 2024-11-15 12:18:48 +01:00
sfence
58dd42166d
Add some info to compiling README 2024-11-15 11:39:08 +01:00
grorp
a9fe83126a
Get rid of depth buffer workaround in the render pipeline code (#15407)
I originally wanted to get of the legacy IVideoDriver::setRenderTarget altogether,
but that ended up being too much work.
The remaining usage is in "dynamicshadowsrender.cpp".

Here's a comment I wrote about the workaround:

----------------------------------------

Use legacy call when there's single texture without depth texture
This means Irrlicht creates a depth texture for us and binds it to the FBO

This is currently necessary for a working depth buffer in the following cases:

- post-processing disabled, undersampling enabled
  (addUpscaling specifies no depth texture)

- post-processing disabled, 3d_mode = sidebyside / topbottom / crossview
  (populateSideBySidePipeline specifies no depth texture)

- post-processing disabled, 3d_mode = interlaced
  (probably, can't test since it's broken)
  (populateInterlacedPipeline specifies no depth texture)

With post-processing disabled, the world is rendered to the TextureBufferOutput
created in the functions listed above, so a depth buffer is needed
(-> this workaround is needed).
With post-processing enabled, only a fullscreen rectangle is rendered to
this TextureBufferOutput, so a depth buffer isn't actually needed.
But: These pipeline steps shouldn't rely on what ends up being rendered to
the TextureBufferOutput they provide, since that may change.

This workaround was added in 1e96403954 /
https://irc.minetest.net/minetest-dev/2022-10-04#i_6021940

This workaround should be replaced by explicitly configuring depth
textures where needed.

----------------------------------------
2024-11-15 11:38:56 +01:00
cx384
d4378a74d3
Fix register_ore ore_type error handling 2024-11-15 11:37:17 +01:00
sfan5
0c3117f9b3 Fix mainmenu settings crash caused by last commit
closes #15432
2024-11-13 18:39:10 +01:00
sfan5
794aea8e92
Drop fixed pipeline support code (#15421)
OpenGL 2.0 is now mandatory.
2024-11-13 14:24:01 +01:00
veprogames
0fde9ab7e8
Change minetest.net to luanti.org in 'Further documentation' 2024-11-13 14:23:39 +01:00
grorp
11e04ec113
Replace forgotten SEvent memset 2024-11-13 14:23:13 +01:00
sfan5
ea4ae55e24 Implement script sandboxing for main menu 2024-11-13 14:22:41 +01:00
sfan5
1fd4e0b82d Refactor ScriptApiSecurity for cleaner separation of concerns 2024-11-13 14:22:41 +01:00
Erich Schubert
4c44942a39
Add weights to biomes (#15142) 2024-11-12 10:53:17 +01:00
cx384
44b261d136
Luacheck: add VoxelManip to globals 2024-11-12 10:53:04 +01:00
sfan5
c00129360e Remove unused pos_max_d 2024-11-12 10:52:46 +01:00
sfan5
9a44d835d6 Remove redundant CollisionInfo::plane 2024-11-12 10:52:46 +01:00
sfan5
f916f5de78 Add basic unit tests for collisionMoveSimple 2024-11-12 10:52:46 +01:00
wrrrzr
1c92d6243f
MainMenuManager: fix FIXME (#15414) 2024-11-12 10:52:37 +01:00
grorp
af61de7777
Minor rendering code fixes (#15399)
* Fix line numbers in shader errors
* Fix uninitialized variables in shadow code
2024-11-12 10:52:20 +01:00
sfan5
a5e3fca40c Revert "Disable SDL2 for 5.10.0 (#15284)"
This reverts commit 6d7a519740.
2024-11-10 20:56:09 +01:00
sfan5
8503d8de5e Continue with 5.11.0-dev 2024-11-10 19:17:56 +01:00
sfan5
568f7a8e8f Bump version to 5.10.0 2024-11-10 19:17:53 +01:00
ROllerozxa
a983b72713
Add Fastlane metadata for F-Droid (#15411)
Co-authored-by: grorp <grorp@posteo.de>
2024-11-10 19:08:08 +01:00
sfence
e55ba9c390
Support generation of working Xcode project for signature purposes on MacOS (#15303) 2024-11-10 19:06:52 +01:00
sfan5
ec7738934b CI: fix workflows not running on translation update 2024-11-10 18:31:56 +01:00
chocomint
fbab80fced Translated using Weblate (Spanish (American))
Currently translated at 100.0% (8 of 8 strings)

Translation: Minetest/Minetest Android
Translate-URL: https://hosted.weblate.org/projects/minetest/minetest-android/es_US/
2024-11-10 18:15:45 +01:00
chocomint
3b2abbea70 Added translation using Weblate (Spanish (American)) 2024-11-10 18:15:45 +01:00
gallegonovato
998d1a2b8c Translated using Weblate (Spanish)
Currently translated at 100.0% (1383 of 1383 strings)
2024-11-10 18:15:45 +01:00
chocomint
9a7471c5c0 Translated using Weblate (Spanish)
Currently translated at 100.0% (1383 of 1383 strings)
2024-11-10 18:15:45 +01:00
chocomint
21c8c141aa Added translation using Weblate (Spanish) 2024-11-10 18:15:45 +01:00
waxtatect
c2e89c5b6f Translated using Weblate (French)
Currently translated at 100.0% (1383 of 1383 strings)
2024-11-10 18:15:45 +01:00
Yof
cf76dac464 Translated using Weblate (Ukrainian)
Currently translated at 94.6% (1309 of 1383 strings)
2024-11-10 18:15:45 +01:00
ninjum
d9df06cda3 Translated using Weblate (Galician)
Currently translated at 100.0% (1383 of 1383 strings)
2024-11-10 18:15:45 +01:00
grorp
66a5ddca25 Translated using Weblate (German)
Currently translated at 100.0% (1383 of 1383 strings)
2024-11-10 18:15:45 +01:00
gallegonovato
0be1fe11ca Translated using Weblate (Spanish)
Currently translated at 100.0% (1383 of 1383 strings)
2024-11-10 18:15:45 +01:00
chocomint
812abba33b Translated using Weblate (Spanish)
Currently translated at 100.0% (1383 of 1383 strings)
2024-11-10 18:15:45 +01:00
gallegonovato
2d6592a804 Translated using Weblate (Spanish)
Currently translated at 100.0% (1383 of 1383 strings)
2024-11-10 18:15:45 +01:00
chocomint
e23c191232 Translated using Weblate (Spanish)
Currently translated at 99.7% (1380 of 1383 strings)
2024-11-10 18:15:45 +01:00
gallegonovato
58ebe0a58f Translated using Weblate (Spanish)
Currently translated at 99.7% (1380 of 1383 strings)
2024-11-10 18:15:45 +01:00
chocomint
000f0c78bc Translated using Weblate (Spanish)
Currently translated at 99.3% (1374 of 1383 strings)
2024-11-10 18:15:45 +01:00
gallegonovato
aaf4877730 Translated using Weblate (Spanish)
Currently translated at 99.3% (1374 of 1383 strings)
2024-11-10 18:15:44 +01:00
chocomint
0c61461b07 Translated using Weblate (Spanish)
Currently translated at 99.1% (1371 of 1383 strings)
2024-11-10 18:15:44 +01:00
gallegonovato
31c50c470c Translated using Weblate (Spanish)
Currently translated at 99.1% (1371 of 1383 strings)
2024-11-10 18:15:44 +01:00
chocomint
62bee9f502 Translated using Weblate (Spanish)
Currently translated at 98.7% (1366 of 1383 strings)
2024-11-10 18:15:44 +01:00
y5nw
112c0719cd Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 91.7% (1269 of 1383 strings)
2024-11-10 18:15:44 +01:00
gallegonovato
c96455b2e4 Translated using Weblate (Spanish)
Currently translated at 98.6% (1365 of 1383 strings)
2024-11-10 18:15:44 +01:00
chocomint
eed109c724 Translated using Weblate (Spanish)
Currently translated at 96.6% (1337 of 1383 strings)
2024-11-10 18:15:44 +01:00
BlackImpostor
f25eaf1261 Translated using Weblate (Russian)
Currently translated at 94.7% (1310 of 1383 strings)
2024-11-10 18:15:44 +01:00
BreadW
e1be22a6ff Translated using Weblate (Japanese)
Currently translated at 94.5% (1308 of 1383 strings)
2024-11-10 18:12:48 +01:00
Wuzzy
5891d0f5ec Translated using Weblate (German)
Currently translated at 99.7% (1380 of 1383 strings)
2024-11-10 18:12:48 +01:00
grorp
2424c64099
Translated using Weblate (German)
Currently translated at 99.7% (1380 of 1383 strings)
2024-11-10 18:11:40 +01:00
sfan5
8b27340b2e Work around Intel driver bug on Win 8.1 and older 2024-11-10 17:44:45 +01:00
sfan5
7557a287e5 Update credits for 5.10.0 2024-11-10 13:23:16 +01:00
sfan5
122b2d70d9 Re-fix CAO mesh lighting with shaders disabled
previously: 65af606729
2024-11-10 13:21:19 +01:00
SmallJoker
4bb9c8c61b
Revert "Fix collisions with long dtime, in particular with bouncing" (#15400)
This reverts commit cb6c8eb2f0.
2024-11-10 13:20:30 +01:00
Lars Mueller
0391d91e5d Improve error messages for failed mesh loading 2024-11-09 18:13:56 +01:00
Lars Müller
77e78193a0
Fix set_bone_override documentation (#15353) 2024-11-09 18:13:36 +01:00
Lars Müller
cce4fe5a3f
Fix wrongly documented glTF frame number restriction
The frame numbers can very well be floats since 06907aa
2024-11-09 17:57:37 +01:00
grorp
50b7523336 ogles 2 driver: Delete some dead code
grepping for IRR_COMPILE_GLES2_COMMON gives no other results

COGLESCoreExtensionHandler is only used through COpenGL3ExtensionHandler
2024-11-08 20:43:24 +01:00
grorp
fced6ff240 Fix ECF_D32 support in ogles2 video driver
OES_depth32 only talks about support for render buffers, not textures,
so it's not relevant here:
https://github.com/KhronosGroup/OpenGL-Registry/blob/main/extensions/OES/OES_depth32.txt

This fixes the scene being black with "video_driver = ogles2" and
"enable_post_processing = true" on my desktop computer.
2024-11-08 20:43:24 +01:00
grorp
bafc477919
Revert "2D rendering: Enable bilinear filter for downscaling textures" (#15385)
This reverts commit minetest/irrlicht@fb7a0e4298.
2024-11-08 11:17:15 +01:00
Ælla Chiana Moskopp
60cd1e4529 Correctly render transparency in TGA type 1 with color format A1R5G5B5
The branch removed in this patch handled color format A1R5G5B5 specially
when creating a texture from a TGA type 1 file, i.e. an image that has a
colormap. It did not handle the 1-bit alpha channel correctly, rendering
transparent pixels black instead.

Since the colormap is converted to A8R8G8B8 earlier anyways, the code
for the general case is able to handle this scenario already – at the
expense of making the created texture use twice as much GPU memory as
necessary.
2024-11-06 20:07:05 +01:00
Lars Müller
1fa4ca7c59
Switch to a more neutral ASCII art banner (#15356) 2024-11-06 20:06:39 +01:00
veprogames
db04964697 Content browser: Fix broken forum URLs
Repeated prepending would break these URLs.
This fix uses the freshly added `forum_url` field directly.
2024-11-06 20:06:26 +01:00
sfan5
294a30e445 Fix ScriptApiSecurity::checkPath mangling non-existent paths
bug introduced in 1c1c97cbd1
2024-11-03 19:27:08 +01:00
veprogames
9982c56373
Replace occurences of 'forum.minetest.net' with 'forum.luanti.org' (#15372) 2024-11-03 15:10:58 +01:00
SmallJoker
c884e7181f
JsonCPP: restore '1.0.0+' compatibility (#15368)
Previously, compiling on Ubuntu 20.04 would fail with the system-provided JsonCPP
version (1.7.4). Which would satisfy the documented requirement of "1.0.0+".
2024-11-03 15:10:39 +01:00
Lars Müller
3064f3ccb7
Fix model[] being lit wrongly if shaders are disabled (#15364) 2024-11-03 15:10:21 +01:00
Lars Müller
0e06590ffd
Apply "and" to server list & content search terms (#15365) 2024-11-03 15:09:47 +01:00
sfan5
e952a0807b
Use servers.luanti.org (#15369) 2024-11-02 20:40:45 +00:00
rubenwardy
ba370d9841
Use content.luanti.org (#15360) 2024-11-02 20:40:33 +00:00
sfan5
5c5538685e
Don't memset SEvent directly (#15359)
Fixes a compiler warning by manually zeroing the tag and the largest union member instead
2024-10-31 19:24:43 +01:00
grorp
8b85a62310
Fix some broken icons in the CDB dialog on Windows (#15363)
core.formspec_escape was missing
2024-10-31 19:23:02 +01:00
1F616EMO~nya
d1728199bb
Rename Minetest to Luanti in .github/ files (#15357) 2024-10-31 19:22:29 +01:00
grorp
3ad6aee9b2 Manually fix new Android translations for new name 2024-10-28 20:22:30 +01:00
updatepo.sh
8c0c8334c3 Run updaterepo.sh 2024-10-28 19:58:15 +01:00
updatepo.sh
47d551d780 Update minetest.conf.example and settings_translation_file.cpp 2024-10-28 19:57:02 +01:00
Unacceptium
67740b0e59 Translated using Weblate (Hungarian)
Currently translated at 97.2% (1298 of 1335 strings)
2024-10-28 19:54:11 +01:00
Unacceptium
2633f85473 Added translation using Weblate (Hungarian) 2024-10-28 19:54:11 +01:00
Jiri Grönroos
cb5723e409 Translated using Weblate (Finnish)
Currently translated at 25.6% (343 of 1335 strings)
2024-10-28 19:54:11 +01:00
Yaya - Nurul Azeera Hidayah @ Muhammad Nur Hidayat Yasuyoshi
cd81b4db7e Translated using Weblate (Malay)
Currently translated at 100.0% (8 of 8 strings)

Translation: Minetest/Minetest Android
Translate-URL: https://hosted.weblate.org/projects/minetest/minetest-android/ms/
2024-10-28 19:54:11 +01:00
Muhammad Rifqi Priyo Susanto
9f910ab873 Translated using Weblate (Indonesian)
Currently translated at 100.0% (8 of 8 strings)

Translation: Minetest/Minetest Android
Translate-URL: https://hosted.weblate.org/projects/minetest/minetest-android/id/
2024-10-28 19:54:11 +01:00
Allan Nordhøy
8f2a6863a8 Translated using Weblate (Norwegian Bokmål)
Currently translated at 53.5% (715 of 1335 strings)
2024-10-28 19:54:11 +01:00
Allan Nordhøy
10b0d45ec9 Added translation using Weblate (Norwegian Bokmål) 2024-10-28 19:54:11 +01:00
Linerly
0cf3df7f3e Translated using Weblate (Indonesian)
Currently translated at 100.0% (8 of 8 strings)

Translation: Minetest/Minetest Android
Translate-URL: https://hosted.weblate.org/projects/minetest/minetest-android/id/
2024-10-28 19:54:11 +01:00
grorp
009e04fb63 Translated using Weblate (German)
Currently translated at 100.0% (8 of 8 strings)

Translation: Minetest/Minetest Android
Translate-URL: https://hosted.weblate.org/projects/minetest/minetest-android/de/
2024-10-28 19:54:11 +01:00
grorp
e7bb7b2fc1 Added translation using Weblate (German) 2024-10-28 19:54:11 +01:00
Honzapkcz
218f3da4b8 Translated using Weblate (Czech)
Currently translated at 94.1% (1257 of 1335 strings)
2024-10-28 19:54:11 +01:00
BlackImpostor
0f4f56d768 Translated using Weblate (Russian)
Currently translated at 100.0% (1335 of 1335 strings)
2024-10-28 19:54:11 +01:00
Yaya - Nurul Azeera Hidayah @ Muhammad Nur Hidayat Yasuyoshi
5e17ce8c81 Translated using Weblate (Malay)
Currently translated at 100.0% (1335 of 1335 strings)
2024-10-28 19:54:11 +01:00
alasa ala
c02c855b73 Translated using Weblate (Korean)
Currently translated at 52.2% (698 of 1335 strings)
2024-10-28 19:54:11 +01:00
Hugo
934f5ca87e Translated using Weblate (Esperanto)
Currently translated at 85.3% (1139 of 1335 strings)
2024-10-28 19:54:11 +01:00
gallegonovato
5ab12d33a4 Translated using Weblate (Spanish)
Currently translated at 100.0% (1335 of 1335 strings)
2024-10-28 19:54:11 +01:00
joserene-007
d37e6bc1de Translated using Weblate (Spanish)
Currently translated at 100.0% (1335 of 1335 strings)
2024-10-28 19:54:11 +01:00
Jordan Irwin
1fc4f22a7a Translated using Weblate (Spanish)
Currently translated at 100.0% (1335 of 1335 strings)
2024-10-28 19:54:11 +01:00
Jynweythek Vordhosbn
28c2e587e5 Translated using Weblate (Spanish)
Currently translated at 100.0% (1335 of 1335 strings)
2024-10-28 19:54:11 +01:00
ludemys
135f30913a Translated using Weblate (Spanish)
Currently translated at 100.0% (1335 of 1335 strings)
2024-10-28 19:54:11 +01:00
Luna
8ac443d650 Translated using Weblate (Danish)
Currently translated at 47.6% (636 of 1335 strings)
2024-10-28 19:54:11 +01:00
Pexauteau Santander
bf8655dfdc Translated using Weblate (Slovak)
Currently translated at 96.7% (1291 of 1335 strings)
2024-10-28 19:54:11 +01:00
Soupborshfe5e4d4ba7c349aa
076c1d1623 Translated using Weblate (Kazakh)
Currently translated at 4.1% (56 of 1335 strings)
2024-10-28 19:54:11 +01:00
Joaquín Villalba
e12f0c4216 Translated using Weblate (Catalan)
Currently translated at 21.7% (290 of 1335 strings)
2024-10-28 19:54:11 +01:00
Muhammad Rifqi Priyo Susanto
ac224bd82c Translated using Weblate (Indonesian)
Currently translated at 98.4% (1314 of 1335 strings)
2024-10-28 19:54:11 +01:00
Joaquín Villalba
375b21e81a Translated using Weblate (Spanish)
Currently translated at 100.0% (1335 of 1335 strings)
2024-10-28 19:54:11 +01:00
gallegonovato
a7249ba653 Translated using Weblate (Spanish)
Currently translated at 93.1% (1244 of 1335 strings)
2024-10-28 19:54:11 +01:00
Ari
7e9c4a9baa Translated using Weblate (Spanish)
Currently translated at 93.1% (1244 of 1335 strings)
2024-10-28 19:54:11 +01:00
Davi Lopes
1d251e0f13 Translated using Weblate (Portuguese (Brazil))
Currently translated at 87.4% (1168 of 1335 strings)
2024-10-28 19:54:11 +01:00
Davi Lopes
72a2cd2aab Translated using Weblate (Portuguese)
Currently translated at 89.5% (1195 of 1335 strings)
2024-10-28 19:54:11 +01:00
nauta-turbidus
458ac94fc4 Translated using Weblate (Polish)
Currently translated at 93.4% (1248 of 1335 strings)
2024-10-28 19:54:11 +01:00
gallegonovato
c3e8036bb9 Translated using Weblate (Spanish)
Currently translated at 91.9% (1228 of 1335 strings)
2024-10-28 19:54:11 +01:00
hugoalh
286b03aac1 Translated using Weblate (Chinese (Traditional))
Currently translated at 94.9% (1267 of 1335 strings)
2024-10-28 19:54:11 +01:00
bgo-eiu
6c8941c417 Translated using Weblate (Malay (Jawi))
Currently translated at 50.7% (677 of 1335 strings)
2024-10-28 19:54:11 +01:00
ninjum
86127c3609 Translated using Weblate (Galician)
Currently translated at 100.0% (1335 of 1335 strings)
2024-10-28 19:54:10 +01:00
rubenwardy
5e070a0d17 Translated using Weblate (Toki Pona)
Currently translated at 1.4% (19 of 1335 strings)
2024-10-28 19:54:10 +01:00
109247019824
33178a38b9 Translated using Weblate (Bulgarian)
Currently translated at 36.5% (488 of 1335 strings)
2024-10-28 19:54:10 +01:00
sfence
03cf7a8e05
Make Luanti buildable for macOS 10.15 also. (#15352) 2024-10-28 19:40:28 +01:00
Wuzzy
ad4b13a0e9
Luanti rename: builtin (#15324) 2024-10-28 19:40:18 +01:00
chmodsayshello
409e75b94d
Fix newline rejection and whitespace trimming for chat messages (#15290)
Co-authored-by: sfan5 <sfan5@live.de>
2024-10-28 19:39:59 +01:00
DS
c81cc4fa60
Improve menu_header.png slightly (#15346) 2024-10-28 16:10:17 +01:00
sfan5
38f4d11d53 Avoid VLA usage and prohibit it by compiler flag 2024-10-28 15:59:17 +01:00
sfan5
721e06451e Minor improvements to startup logging and related code 2024-10-28 15:59:17 +01:00
sfan5
8d648364c0 Remove handling of MT_LOGCOLOR env variable 2024-10-28 15:59:17 +01:00
sfan5
d60189915c Remove 'mesetint' gameid rewriting kludge 2024-10-28 15:59:17 +01:00
Lars Müller
88c7a54e08
Rename minetest.* to core.* in devtest 2024-10-28 15:57:54 +01:00
sfence
d849d51c2d
Replace licensing text in headers (LGPLv2.1) (#15321) 2024-10-28 15:57:39 +01:00
grorp
a450301686
Fix server steps shorter than dedicated_server_step since #13370 (#15330)
Co-authored-by: Desour <ds.desour@proton.me>
Co-authored-by: sfan5 <sfan5@live.de>
2024-10-28 15:57:22 +01:00
Nathanaëlle Courant
806fba6448
Fix missing rename 2024-10-28 11:02:59 +01:00
sfan5
0d85e826f4 Android: update used NDK and SDL support code 2024-10-27 14:16:39 +01:00
grorp
4b90e582b4
Rename to Luanti (#15294)
The new header intentionally isn't in MTG stone design (or any other MTG-esque design), since we want to distance Luanti and MTG from each other. The font "undefined medium" (https://undefined-medium.com/) was used. 

ASCII art generated by https://patorjk.com/software/taag/#p=display&f=Graffiti&t=luanti
https://github.com/minetest/minetest/pull/11952#issuecomment-1013364703

---------

Co-authored-by: sfan5 <sfan5@live.de>
2024-10-27 14:04:51 +01:00
cx384
b7073df68c
Move hud_hotbar_max_width setting to HUD section (#15335) 2024-10-26 17:40:39 +02:00
Wuzzy
4deb5b999c
DevTest: Change "Minetest" to "DevTest" (#15326) 2024-10-26 17:40:29 +02:00
BoySanic
6ead789509
Update documentation to reflect player constant values (#15308)
Co-authored-by: grorp <grorp@posteo.de>
2024-10-26 17:40:11 +02:00
Erich Schubert
cb6c8eb2f0
Fix collisions with long dtime, in particular with bouncing (#15029) 2024-10-26 17:39:45 +02:00
Ælla Chiana Moskopp
c3b5cc8611 Rename erle in credits (as requested by them) 2024-10-26 10:28:55 +03:00
DS
3f306a407c
core.after: Improve documentation details about how time is handled (#15316) 2024-10-24 17:52:27 +02:00
sfan5
2d135cc1bb
Revert "Use EGL over GLX" (#15315)
This reverts commit aa273119f2.
2024-10-24 17:52:06 +02:00
LoneWolfHT
e441b5d240
Fix spelling mistakes in player_sao.cpp 2024-10-23 10:52:28 +02:00
Zughy
d52e4cdbdb
DOCS: replace Minetest -> Luanti, minetest. -> core. (#15292)
Co-authored-by: grorp <gregor.parzefall@posteo.de>
2024-10-22 23:05:41 +02:00
sfan5
aa273119f2
Irrlicht: Use EGL over GLX (#15286) 2024-10-22 23:04:46 +02:00
sfan5
d4daa9fd40 Fix build error due to missing include 2024-10-18 11:59:02 +02:00
DS
e5d321d286
Cleanup headers in irr/include/ (#15181) 2024-10-18 10:58:32 +02:00
ALi.w
f2ab887644
Fix getDimension throwing error if there is \r at end of line (#15299) 2024-10-17 19:39:11 +02:00
SmallJoker
4975afb5ff Clean up header includes related to settings.h 2024-10-17 19:38:49 +02:00
SmallJoker
e3813cf027 Settings: semi-automatic callback cleanup 2024-10-17 19:38:49 +02:00
grorp
9f43018df2
Better UX when touch events aren't supported by Irrlicht device (#15288) 2024-10-16 21:37:00 +02:00
grorp
24704b01d9 Fix wrong minimum for repeat_place_time in settingtypes.txt
rebase mistake from #14542
2024-10-16 21:35:30 +02:00
sfan5
b61c83a19d Move some more sources to shared target 2024-10-16 19:39:59 +02:00
sfan5
4e9aa7dc77 Make itemdef.h safe to include anywhere 2024-10-16 19:39:59 +02:00
sfan5
a18355e7e8 Introduce object target for shared sources 2024-10-16 19:39:59 +02:00
sfan5
37095f3e49 Change the preprocessor macro that differs server/client builds 2024-10-16 19:39:59 +02:00
Lars Mueller
e2ea359925 JSON: Support consistent larger max. depth of 1024 2024-10-15 12:19:49 +02:00
Lars Mueller
4c419c4020 Improve minetest.parse_json
Let modders handle parsing errors, get rid of two unnecessary copies.
2024-10-15 12:19:49 +02:00
Lars Müller
c7938ce81c
Improve glTF logging (#15274)
Also removes all animations but the first one from gltf_frog.gltf
to address the corresponding warning.

Catches some more possible exceptions (out of bounds, optional access)
which might be caused by a broken model to properly log them.
2024-10-15 12:19:19 +02:00
sfan5
6d7a519740
Disable SDL2 for 5.10.0 (#15284)
see #14545
2024-10-14 22:09:11 +02:00
Erich Schubert
6431ef7324
Trivial improvement to get_item_group (#15260)
One hash table lookup is enough, and this is even easier for the JIT to inline, optimize, etc.
2024-10-14 22:09:01 +02:00
grorp
7435ea0d4e
Show warning in the settings menu when shaders are disabled (#15272) 2024-10-14 09:43:29 +02:00
cx384
ecf8488406 Fix HUD inventory direction position 2024-10-13 18:40:29 +02:00
Lars Mueller
067a5b5ac3 Fix local animations not working (was broken in 06907aa) 2024-10-13 15:48:39 +02:00
y5nw
e3aa79cffb
Gettext and plural support for client-side translations (#14726)
---------

Co-authored-by: Ekdohibs <nathanael.courant@laposte.net>
Co-authored-by: y5nw <y5nw@protonmail.com>
Co-authored-by: rubenwardy <rw@rubenwardy.com>
2024-10-13 11:29:08 +02:00
sfan5
dbbe0ca065 Update jsoncpp copy to 1.9.6
note: the version number is different due to https://github.com/open-source-parsers/jsoncpp/issues/1571
2024-10-13 10:57:25 +02:00
sfan5
cbc741f464 Various improvements to push_json_value 2024-10-13 10:57:25 +02:00
sfan5
d95e916a42 Defer to read_from_map in VoxelManip ctor
concrete problem: the getEmergeThread safety check was missing there
2024-10-12 22:37:17 +02:00
sfan5
244f4f285a Alias MutexAutoLock to the simpler std::lock_guard 2024-10-12 22:37:17 +02:00
sfan5
99b6315c1a Make logging respect stream flushes
also add override keyword and fix overflow() behavior
2024-10-12 22:37:17 +02:00
sfan5
dbf103da32 Fix hexadecimal line number in abort msgs 2024-10-12 22:37:17 +02:00
sfan5
3778ed7466 Keep PlayerMetaRef via name not pointer 2024-10-12 22:37:17 +02:00
sfan5
c8dc9c2b8d Increase safety checks around ObjectRefs 2024-10-12 22:37:17 +02:00
sfan5
41091a147c Handle VOXELFLAG_NO_DATA when in VManip get_data() 2024-10-12 22:37:17 +02:00
sfan5
6d5103900f Some refactoring and fixes to VoxelArea and VoxelManip
In particular this validates the edges of VoxelArea and fixes
all the nonsense tests uncovered by it.
2024-10-12 22:37:17 +02:00
grorp
5532248cd7
Add missing setting callbacks for display_density_factor (#15273) 2024-10-12 22:34:39 +02:00
paradust7
2188adc0f9
Ensure that null C strings do not break logging (#15255) 2024-10-12 22:34:24 +02:00
cx384
4e6e8b7bf1 Fix hotbar alignment with hud_hotbar_max_width 2024-10-12 22:33:41 +02:00
Zemtzov7
1b2d24791a
Separate anticheat settings (#15040) 2024-10-11 12:01:22 +02:00
sfan5
d2b4c27f21 Implement minetest.ipc_poll() 2024-10-11 12:00:59 +02:00
sfan5
72801d0233 Implement minetest.ipc_cas() 2024-10-11 12:00:59 +02:00
sfan5
f1a436619f Add generic IPC mechanism between Lua envs 2024-10-11 12:00:59 +02:00
Lars Mueller
06907aa99b Support floating-point animation frame numbers 2024-10-10 21:39:57 +02:00
Lars Mueller
323fc0a798 Add glTF animation support 2024-10-10 21:39:57 +02:00
Lars Mueller
d8274af670 Refactor global inversed matrix usage (+ minor fix)
Thanks to GreenXenith and Josiah for spotting a bug here
2024-10-10 21:39:57 +02:00
Lars Mueller
224066c1d3 Implement glTF texture wrapping support 2024-10-10 21:02:05 +02:00
Lars Mueller
2fee37f31b Fix gltf / glb loader oversights
- Avoid an unnecessary copy
- Reject models requiring extensions

Co-authored-by: DS <ds.desour@proton.me>
2024-10-10 21:02:05 +02:00
Lars Mueller
521e678d39 Add binary glTF (.glb) support 2024-10-10 21:02:05 +02:00
Lars Mueller
7e4919c6ed Refactor matrix4.h
Sets the surprising row-major conventions used here straight.

Renames rotateVect to rotateAndScaleVect:
If the matrix also scales, that is applied as well by the method.
Obsolete rotateVect variants are removed.
The inverseRotateVect method is also renamed accordingly.
Note that this applies the transpose of the product
of the scale and rotation matrices, which inverts just the rotation.
2024-10-10 17:40:31 +02:00
sfan5
c8f1efebea
Use execvp in fs::RecursiveDelete() 2024-10-10 17:40:06 +02:00
grorp
3f5a58a4e5 Fix rebase mistake in #14840 after #14749
Old enable_touch was used instead of new touch_gui.
2024-10-09 18:46:21 +02:00
grorp
bd15f26c35 Disable automatic switching on Linux to avoid bug on X11 2024-10-09 18:26:19 +02:00
grorp
f5076723e8 Android: Fix camera jump when switching to mouse mode
Easy way to reproduce:

1. Connect a bluetooth mouse to your Android phone with Minetest installed
2. Play Minetest
3. Slowly move the mouse to the right so that the camera rotates continously
4. While still moving the mouse continously, tap the screen a few times per second

Before this commit: The camera jumps around randomly.
After this commit: The camera moves like it should.

This is a combination of two Irrlicht changes copied from MoNTE48/irrlicht
and one Minetest change authored by me. I have no idea why this works, but
it does work and I have spent way too much time on this bug already.
2024-10-09 18:26:19 +02:00
grorp
4952f17df4 Auto-toggle TouchControls in-game when receiving touch/mouse input 2024-10-09 18:26:19 +02:00
sfan5
3c5f05b284 Don't expose irrlicht internal headers as public 2024-10-09 16:25:02 +02:00
sfan5
87a42d62b2 Fix GLTF test depending on irrlicht internals & memory leaks
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
2024-10-09 16:25:02 +02:00
paradust7
3a7c8279bf
Split log.h to speed up compilation (#15258) 2024-10-09 16:24:44 +02:00
grorp
07ff2a5c01
ContentDB dialog: React to window info changes immediately (#15248) 2024-10-09 15:08:15 +02:00
grorp
6ac4447134
Make bloom parameters server-controlled (#15231) 2024-10-09 15:08:03 +02:00
SmallJoker
13f533d490
scrollcontainer: Add automatic scrollbar calculation (#14623)
New parameter 'content padding'. When specified, the scrollbar
max value is calculated automatically. This aims to reduce manual
calculation functions.
2024-10-08 21:45:27 +02:00
Lars Müller
291c3ad0c1
Document performance cost of use_texture_alpha=blend (#15244) 2024-10-08 21:44:44 +02:00
rubenwardy
1037ee2a55 ContentDB redesign: Redesign package list dialog 2024-10-05 18:40:26 +01:00
rubenwardy
78aab8c95d ContentDB redesign: Add package dialog
Co-authored-by: Gregor Parzefall <gregor.parzefall@posteo.de>
2024-10-05 18:40:26 +01:00
swagtoy
05cbd84ae0
Fix irrString use-after-free with char-like assignment (operator=) 2024-10-04 10:45:09 +02:00
sfence
84b9321977
Switch to macOS 13, because brew support for macOS 12 gone (#15232) 2024-10-04 10:44:14 +02:00
SmallJoker
95d7348a08
Client: upscale [mask or base image (#15205)
This improves texture pack compatibility. Masks are expected to be of the same
size as the base texture. This change upscales the smaller texture if needed.
The behaviour is now the same as a.png^b.png and a.png^[overlay:b.png (to mention a few).
2024-10-04 10:44:03 +02:00
sfence
a19d0033bc
Add forgotten lua_pop 2024-10-04 10:42:37 +02:00
Erich Schubert
57ca92e0eb
Simplify minetest.strip_param2_color 2024-10-04 10:42:25 +02:00
Erich Schubert
3397950a0e
Clarify bit meaning in param2 palette (#15225) 2024-10-04 10:42:09 +02:00
grorp
3eef1ca28f
Fix incorrect SMaterial::operator!= (regression from #15165) (#15226) 2024-10-03 11:37:14 +02:00
grorp
132e43346e
Setting structure improvements (#15218) 2024-10-03 11:37:04 +02:00
grorp
eefaef53b7
Fix hypertext action firing twice on touchscreen (#15217) 2024-10-03 11:36:48 +02:00
SmallJoker
3797ca52c4
Network: offload often changed constants to source file (#15207)
* Network: offload often changed constants to source file

This prevents unnecessary recompiling when using incremental builds.
There is also no need to have separate max proto version variables;
as they're subject to the handshake between client and server. The
code is also expected to support the same version (or higher).

Co-authored-by: sfan5 <sfan5@live.de>
2024-10-02 11:01:30 +02:00
grorp
22ef4c8be1
Expose analog joystick input to the Lua API (#14348) 2024-10-01 17:21:42 +02:00
swagtoy
6569fdd4d1
Add QT Creator and Windows dump files to .gitignore (#15214) 2024-09-30 22:57:18 +02:00
sfan5
53d949bd9f
Discourage disabling shaders (#15210) 2024-09-30 22:43:08 +02:00
swagtoy
c6fc694ea6
Fix deletePathFromFilename returning cutoff filenames (#15211) 2024-09-30 22:41:53 +02:00
sfan5
bca44574d5 Add test script for server error cases 2024-09-28 15:26:51 +02:00
sfan5
9e14f5f053 Apply some fixes to server destruction order
was broken by bc4ab8b99e
2024-09-28 15:26:51 +02:00
sfan5
d6da80fe24 Fix vertex color on OpenGL 3
closes #14985
2024-09-28 12:09:58 +02:00
sfan5
700fbc803d Minor improvements to metadata handling 2024-09-27 21:35:27 +02:00
sfence
610ddaba7c
Allow detection of damage greater than HP (#15160)
Co-authored-by: Gregor Parzefall <gregor.parzefall@posteo.de>
2024-09-27 21:34:52 +02:00
grorp
fbb0e82679
Fix uninitialized shadow tint regression from #14610 (#15197)
* Fix uninitialized shadow tint

This resulted in shadows having a different, random color each time I started a game

* Fix formatting mistakes from the same PR
2024-09-27 11:08:35 +02:00
DragonWrangler1
65ec371b78
Allow allfaces drawtypes to have 6 textures (#15175) 2024-09-26 17:34:16 +02:00
sfence
d08d34d803
ABM without_neighbors (#14116) 2024-09-26 17:32:55 +02:00
sfan5
c1ea49940b Add questionable workaround for env lock contention 2024-09-26 17:31:49 +02:00
sfan5
5f308deb50 Switch env lock to fair mutex implementation 2024-09-26 17:31:49 +02:00
sfan5
0220d0d492 Encapsulate envlock 2024-09-26 17:31:49 +02:00
sfan5
588a0f83e9 Divorce map database locking from env lock (#15151) 2024-09-26 17:31:49 +02:00
grorp
526a2f7b8c
Dehardcode the death formspec (#15155)
Co-authored-by: Paul Ouellette <oue.paul18@gmail.com>
2024-09-24 22:37:44 +02:00
grorp
3c48671076
Fix -Winconsistent-missing-override in unit_sao.h (#15190) 2024-09-24 22:25:46 +02:00
Elias Åström
f65fe80e81
Add minetest.bulk_swap_node (#15043)
Co-authored-by: sfan5 <sfan5@live.de>
2024-09-24 22:25:34 +02:00
GefullteTaubenbrust2
d8f1daac25
Visual Effects Vol. 1 (#14610)
This PR adds a variety of effects to enhance the visual experience.

    "soft" clouds look
    Tinted shadows
    Crude water reflections (sky and sun) and waves
    Translucent foliage
    Node specular highlights
    Adjusted fog color (more saturated where the fog is lighter)
    Minor changes to volumetric lighting (crudely simulates the effect of depth)

Co-authored-by: sfan5 <sfan5@live.de>
2024-09-24 11:14:27 -07:00
Erich Schubert
4ac86db8e3
Simplify getGameTime function usage (#15187) 2024-09-20 15:05:51 +02:00
sfan5
811adf5d42 Bulk LBMs (#14954) 2024-09-20 15:05:26 +02:00
sfan5
7ae51382c8 Refactor ABM/LBM related code 2024-09-20 15:05:26 +02:00
sfan5
387856a1c3 Load mod profiler in one of the test workflows 2024-09-20 15:05:26 +02:00
Desour
24efd7dc91 Use smart ptrs for Minimap's member vars 2024-09-18 12:19:40 +02:00
Desour
9827f9df1b Use irr_ptr for MapBlockMesh::m_mesh 2024-09-18 12:19:40 +02:00
Desour
2b2f2dee20 Use make_irr instead of new + drop() in Game::handleCallbacks 2024-09-18 12:19:40 +02:00
Desour
b93ae33f85 Use irr_ptr for Game::sky 2024-09-18 12:19:40 +02:00
Desour
17c041a65c Use irr_ptr for Game::gui_chat_console 2024-09-18 12:19:40 +02:00
Desour
37b374cb92 Use irr_ptr for Game::clouds 2024-09-18 12:19:40 +02:00
Desour
ecf8c7696a Use irr_ptr for ClientEnvironment::m_map 2024-09-18 12:19:40 +02:00
Desour
e3efaa1733 Move irr_ptr.h too irr/include/ 2024-09-18 12:19:40 +02:00
Desour
6d01ed5d74 irr_ptr: Allow to use with forward-declared types
Also add [[nodiscard]] to ::grab() (because similar named irr_ptr::grab() returns void).
And use new std::is_convertible_v.
2024-09-18 12:19:40 +02:00
grorp
70e169f165
Drop fixed pipeline lighting stuff (#15165) 2024-09-18 12:18:28 +02:00
wrrrzr
6dfd61cba0
Fix TODO in joystick code (#15179) 2024-09-18 12:17:55 +02:00
sfan5
58ea11c2b3 Add some debug helpers around this area 2024-09-16 23:12:52 +02:00
sfan5
6f275e2ba0 Remove dead code in COpenGL3MaterialBaseCB 2024-09-16 23:12:52 +02:00
sfan5
cc26b5384c Mark buffer as dirty in mesh helpers
unclear if this fixes any actual bug
2024-09-16 23:12:52 +02:00
sfan5
0fdcba197f Fix VBO hint in content_cao 2024-09-16 23:12:52 +02:00
sfan5
65af606729 Fix CAO mesh lighting with shaders disabled
the 'Lighting' material flag does not have portable behavior
2024-09-16 23:12:52 +02:00
grorp
740dc0162e
Don't use fixed pipeline lighting for stars (#15164) 2024-09-16 10:16:55 +02:00
grorp
47f199e6cb
Avoid cloud jump when switching between mainmenu and loading screen (#15163)
... by using the same Clouds object for both.
The mainmenu clouds already used shaders before. I had to choose between
both or neither, so now both the mainmenu clouds and the loading screen
clouds use shaders if available.
2024-09-16 10:16:27 +02:00
DS
4aec4fbe6f
Add support for Tracy profiler (#15113) 2024-09-15 13:47:45 +02:00
sfan5
6f23de41fb Refresh windows toolchain and libs 2024-09-14 12:13:19 +02:00
Gregor Parzefall
7bab390413 Add time_to_day_night_ratio to the Lua API 2024-09-14 12:13:11 +02:00
Gregor Parzefall
f9c0354af1 Add colorspec_to_table to the Lua API 2024-09-14 12:13:11 +02:00
DS
c54f5a2137
Move std::tie out of headers 2024-09-14 12:10:11 +02:00
j-r
a6219ab955
Fix alignment in implicit client hotbar definition
Used when an older server doesn't send it.
2024-09-14 12:09:56 +02:00
1F616EMO~nya
38b4505ad7
Allow requesting reconnect when mods kick player (#14971) 2024-09-12 23:42:46 +02:00
nauta-turbidus
b12e67699a
Document negative saturation (#15062) 2024-09-12 23:42:33 +02:00
sfan5
72c306d920 Improve some protocol code log messages
also get rid of the very noisy socket debug message that are
useless in a world where Wireshark exists.
2024-09-12 23:41:56 +02:00
sfan5
f54f2c1601 Fix RTT set before value is available 2024-09-12 23:41:56 +02:00
sfan5
42af7cc1c5 Nerf protocol window sizes
Probably due to a unit misunderstanding a long time ago the window sizes
were quite insane (especially the default).
In practice this was sometimes hidden by other bugs, games trying their
best to be lightweight or didn't matter on high-quality internet connections.
2024-09-12 23:41:56 +02:00
sfan5
9c2b2c002c Count duplicate packets as congestion indicator 2024-09-12 23:41:56 +02:00
grorp
af67353f7a
Only apply "touch_punch_gesture" when wielded item has no on_use callback (#15098) 2024-09-12 23:41:47 +02:00
sfence
8617993386
Add SDL2 options to compiling README (#15136) 2024-09-12 23:40:03 +02:00
sfence
733a019bf5
macOS: make mute sound actually work (#15128) 2024-09-08 13:53:43 +02:00
Gregor Parzefall
2208fc0632 Move Minetest GUISkin -> Irrlicht CGUISkin 2024-09-08 13:53:33 +02:00
Gregor Parzefall
c8ebc2e5d0 Delete Irrlicht CGUISkin 2024-09-08 13:53:33 +02:00
sfan5
3feec87d52 Count global number of drawcalls too 2024-09-08 13:53:23 +02:00
sfan5
275bef0633 Remove unused leftovers from normal mapping 2024-09-07 14:23:37 +02:00
sfan5
e90ef85e7d Fix texture matrix handling in our shaders 2024-09-07 14:23:37 +02:00
Lars Müller
9e5d6bc162
Fix upright sprite entities not animating 2024-09-06 12:11:16 +02:00
grorp
041d67ceca
Improve formspec scaling (#14840) 2024-09-06 12:11:03 +02:00
red-001
1527cdf6a4 SRP remove custom memory allocator 2024-09-06 11:30:35 +02:00
red-001
197d09cc53 SRP switch to porting randomness source 2024-09-06 11:30:35 +02:00
sfence
4fd744cdf6
Generate Minetest.app on macOS 12, so at least macOS 12 will be supported 2024-09-06 11:30:27 +02:00
sfan5
3af226cb06
Refactor "Cavegen y biome check" 2024-09-06 11:30:10 +02:00
red-001
486dc3288d
VoxelManipulator code cleanup (#15114)
* Cache node in voxel area index when possible

The index function according to the MSVC profiler actually takes up a significant time slice (around ~5% of total time for the process) during normal game-play.
Might not be accurate but still good to not recalculate it twice.

* Remove `setNodeNoRef` from VM

* VM: remove old commented out print statement
2024-09-04 15:20:39 +02:00
Lars Müller
074700b35e
Remove no* prefixes from settingtypes possible flags (#15111) 2024-09-04 15:19:00 +02:00
grorp
8349846333
TouchControls: Fix setUseCrosshair not being called (#15100) 2024-09-04 15:18:45 +02:00
Gregor Parzefall
08de047033 TouchScreenGUI: Show status text above grid menu 2024-09-04 15:18:34 +02:00
Gregor Parzefall
88397c2908 TouchScreenGUI: Don't release pointers when toggling grid menu 2024-09-04 15:18:34 +02:00
Gregor Parzefall
2e567b7d40 Replace removed rare_controls.png in Devtest /test_formspec
removed by 013c6ee166 / #14918
2024-09-04 15:18:34 +02:00
red-001
d5d8fb629b
Simplify TOSERVER_INIT and TOCLIENT_HELLO
- Network compression support was never added.
- Client hasn't used the returned playername since at least 0.4-stable.
2024-09-02 21:50:43 +02:00
Zughy
2bc9dc54ff
Windows/vcpkg instructions: enable i18n by default 2024-09-02 21:50:28 +02:00
sfan5
e55fb6da71 Mark a bunch of classes as final 2024-09-02 21:50:13 +02:00
sfan5
3fb4049612 Prevent accidentally copy/move of refcounted objects 2024-09-02 21:50:13 +02:00
sfan5
62131fe295 Put all pieces together and clean up leftover code 2024-09-02 21:50:13 +02:00
sfan5
6b7fc1e9fe Handle vertex & index VBOs separately in GL drivers 2024-09-02 21:50:13 +02:00
sfan5
be9aa19208 Propagate changes to IMeshBuffer parent class 2024-09-02 21:50:13 +02:00
sfan5
435a89b5a4 Apply same changes to SSkinMeshBuffer 2024-09-02 21:50:13 +02:00
sfan5
47e4c33a50 Split CIndexBuffer from CMeshBuffer 2024-09-02 21:50:13 +02:00
sfan5
5d6e15bc49 Split CVertexBuffer from CMeshBuffer 2024-09-02 21:50:13 +02:00
sfan5
538b8b9b34 Avoid unsafety with stack-allocated mesh buffer 2024-09-02 21:50:13 +02:00
1F616EMO~nya
6105804f00
Show full texture string in "generateImage(): Failed to generate" errors (#15033) 2024-09-02 16:10:01 +02:00
DS
f23d7459b3
Allow to disable transparency sorting entirely (#15101) 2024-09-02 16:09:42 +02:00
SmallJoker
0c4f03d9a5
Reduce include count in headers 2024-09-02 16:09:32 +02:00
sfan5
b8b99d5cf1 Use std::string_view in logging code 2024-09-02 16:09:14 +02:00
JosiahWI
ac11a14509
Add static glTF support (#14557)
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
Co-authored-by: jordan4ibanez <jordan4ibanez@users.noreply.github.com>
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2024-09-02 14:50:30 +02:00
sfan5
8972c80d7d Warn if max_packets_per_iteration reduced 2024-08-31 20:47:38 +02:00
sfan5
1380bf9b88 Fix ordering issue with new server peers 2024-08-31 20:47:38 +02:00
sfan5
7afa78ec82 Remove obsolete client connection init workaround
m_connection_reinit_timer has a head-start of 0.1s and this code
only took effect for the very first game session so it was broken
anyway.
2024-08-31 20:47:38 +02:00
red-001
43363ee066
Disable CRT security warnings in MSVC (#15077)
MSVC by default warns if Annex-K style secure functions with additional parameter validation are not used. For better or worse, afaik other major compilers don't implement it, so it's not a very useful warning for a cross-platform project.
2024-08-31 20:47:29 +02:00
red-001
48e65ac846 Don't attempt to process packets when there are none
Under certain unlikely circumstances the main server loop could attempt to process packets even when the connection didn't return one. This would result in the default empty packet being processed resulting in spurious warnings about a missing client.
2024-08-31 20:46:27 +02:00
red-001
1b8b84bee8 connection: Remove unused timeout feature
Was only used for a unit test and incorrectly at that.
2024-08-31 20:46:27 +02:00
grorp
6608057971
Fix uninitialized SkyboxParams::fog_color 2024-08-31 20:46:14 +02:00
grorp
5c171f6d61
Basic unittest for HP change calculation 2024-08-31 20:45:53 +02:00
grorp
eae9a70385
TouchControls: Fix outdated player controls in TOSERVER_INTERACT 2024-08-31 20:45:32 +02:00
grorp
322a9c2f74
Restore proportional minimap scaling (#15022) 2024-08-31 18:11:56 +02:00
cx384
52376fd87a Add hotbar Lua HUD element and replace hardcoded hotbar 2024-08-31 16:04:14 +02:00
SmallJoker
efd7792add
Debloat IVideoDriver and IrrlichtDevice includes (#15080)
As the project grows, compile time will not go down unless the header mess
is cleaned up one by one to only include exactly what's needed.
2024-08-31 11:44:30 +02:00
kromka-chleba
a6ba5304c4
Add new vector utils (ceil, sign, abs, random_in_area) (#14807) 2024-08-31 11:43:52 +02:00
cx384
3971b6afcc
Main menu: formspec escape world name (#15064) 2024-08-28 21:32:31 +02:00
David Heidelberg
7f5a19792c enable option to toggle touch controls on Android
Signed-off-by: David Heidelberg <david@ixit.cz>
2024-08-28 21:32:00 +02:00
Gregor Parzefall
3a59fabefe split enable_touch to touch_controls (for touchscreen controls) and touch_gui
touch_gui provide adjustment to the interface, so it's more touch
friendly

Signed-off-by: David Heidelberg <david@ixit.cz>
2024-08-28 21:32:00 +02:00
Gregor Parzefall
1977517d7a Rename TouchScreenGUI -> TouchControls
to avoid confusion between touchscreen-related settings that affect GUIs
(formspecs) and touchscreen-related settings that affect the touch controls
(TouchControls / formerly TouchScreenGUI)
2024-08-28 21:32:00 +02:00
sfan5
bf4d31227b
Delete OpenGL ES 1.0 driver (#15067) 2024-08-28 20:44:42 +02:00
sfan5
1298d6c020 Fix VBO hint for transparent block parts 2024-08-28 15:38:02 +02:00
sfan5
19a58745c9 Avoid copies when working with EnrichedString 2024-08-28 15:38:02 +02:00
sfan5
fa4529b4f1 Keep stats on hw buffer uploads 2024-08-28 15:38:02 +02:00
sfan5
39970fed38 Consolidate transparent buffers lazily 2024-08-28 15:38:02 +02:00
sfan5
c00fed20b7 Fix re-loading of settings in ClientMap 2024-08-28 15:38:02 +02:00
sfan5
c52a4369eb Fix vertex count accounting in ClientMap 2024-08-28 15:38:02 +02:00
Desour
0f7ee126de Fix transparency sorting and animation faraway check not using mesh chunk bounding sphere 2024-08-28 15:37:54 +02:00
Desour
2e883189c1 Improve block bounds HUD feature
* Use different material than selection box, so it doesn't break
  for non-default `node_highlighting` values.
* Add `show_block_bounds_radius_near` setting.
* Draw mesh chunk edges in a different color (red vs yellow).
2024-08-28 15:37:54 +02:00
Desour
04f0a4a1c6 Fix MeshGrid::isMeshPos()
`(1 + 1 + 0) % 2 = 0`, for example, so it had false positives.
Only minimap generation uses this function. It did useless work.
2024-08-28 15:37:54 +02:00
Zughy
3441fd6e04
Menu docs: clarify that image paths must be escaped to correctly render on Windows (#15072) 2024-08-28 15:37:43 +02:00
JosiahWI
c893e0b72b
Convert nodedef tests to Catch2 (#15045)
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
2024-08-28 15:36:02 +02:00
Gregor Parzefall
5d18b6fcd0 Fix incorrect documentation of new-style particlespawner size property 2024-08-27 17:51:29 +02:00
SmallJoker
8109563a02
LocalPlayer: Restore 2u height sneak jump (#15015)
Fix 1: Do not consider LocalPlayer's CAO in the collision data.
Fix 2: work around the "aabbox3d::intersectsWithBox" edge-case.
2024-08-26 21:23:12 +02:00
Lars Müller
21ed680b10
Make getting bone overrides return the "same" euler angles (#15007) 2024-08-26 21:22:38 +02:00
SmallJoker
5583831c40 zstd: Fix minetest.decompress lockup when data ends too early 2024-08-26 18:32:59 +02:00
Desour
da1fc9a536 Meshgen: Don't get lights for not drawn solid faces
`drawCuboid()` doesn't call the face lighter function for masked
faces, so we don't need these values.
This is for performance.
2024-08-26 18:32:51 +02:00
wsor4035
df8afe3dc4
Reword CMake message for LuaJIT detection 2024-08-26 18:32:42 +02:00
sfan5
56123b2fbe Fix bounding box of clouds
fixes #15031
2024-08-23 18:46:12 +02:00
Zemtzov7
274c223d00
Fix CSM help form using "/" instead of "." (#15034)
when copying commands to chat
2024-08-22 23:15:55 +02:00
sfan5
7968ab6928 Move network protocol implementation behind an interface 2024-08-21 21:40:58 +02:00
sfan5
c6ef5ab259
Sanitize formspec fields server-side (#14878) 2024-08-21 21:34:46 +02:00
Gregor Parzefall
ab7af5d15a Fix trailing whitespace from #14179 2024-08-21 20:30:58 +02:00
grorp
66b3db3601
Fix mods folder being read twice with RUN_IN_PLACE=1 (#15024) 2024-08-21 20:25:58 +02:00
Zemtzov7
b2f6a65bc9
Sort clients in minetest.get_server_status and privs in minetest.privs_to_string (#15023) 2024-08-21 20:25:41 +02:00
rubenwardy
6cc0452503
Generate Android versionCode from Major.Minor.Patch (#14963) 2024-08-21 20:25:18 +02:00
wrrrzr
1bccb4e48c
Refactor tool.cpp (#14873)
Co-authored-by: sfan5 <sfan5@live.de>
2024-08-21 20:24:59 +02:00
sfence
f2c66b9ceb
Add possibility to easier override HP and breath engine logic by Lua (#14179)
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
2024-08-21 20:24:43 +02:00
Lars Müller
dc21924f31
Fix animations not being restartable (#15016) 2024-08-20 11:51:52 +02:00
rubenwardy
2664afd832
Fix Windows enabling touch controls due to existence of touchscreen (#15003)
We want to check for the form factor instead.
2024-08-20 11:50:29 +02:00
Lars Müller
9ccd9d341f
Revert empty form name deprecation warnings 2024-08-20 11:49:41 +02:00
Daniel Hajjar
ec115ffe2a
Make SecureRandom non-failable 2024-08-20 11:49:15 +02:00
sfan5
b010714426
[no sq] Move shaders & remove dead Irrlicht tests (#15006)
* Move irrlicht shaders to correct place

* Remove unused Irrlicht tests
2024-08-19 09:17:52 +02:00
cx384
48845de46e Fix trailing whitespace from #14945 2024-08-17 21:22:26 +02:00
cx384
03e600a721 Fix whitespaces 2024-08-17 21:02:54 +02:00
cx384
c65444c43b Add whitespace checks to ci 2024-08-17 21:02:54 +02:00
Lars
3df070f352 Remove SAO::onAttach() and SAO::onDetach() 2024-08-17 19:49:38 +02:00
sfan5
5d226268df
Irrlicht cleanups (mostly getting rid of core::array)
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
2024-08-17 19:49:11 +02:00
1F616EMO~nya
5acc2736db
Translate access denied strings (#14842) 2024-08-17 19:48:54 +02:00
j-r
1fb49e9ca7
Add shared mods path to get_modpaths
...because the documentation implies it should be.
2024-08-17 19:48:40 +02:00
rubenwardy
b0ad9a6c33
Use JSON file for credits (#14956) 2024-08-17 15:49:53 +01:00
Zughy
792fb13ac6
Docs: Clarify rotation syntax of model formspec element (#14997)
There has been confusion over this in the past, with users wrongly supplying rotation as `{x,y}`.
2024-08-17 15:16:37 +02:00
Lars Mueller
d3ca269c79 Add minetest.is_valid_player_name utility 2024-08-16 22:13:16 +02:00
Lars Mueller
44db47e64a Fix .editorconfig mandating tabs for Markdown 2024-08-16 22:13:16 +02:00
Lars Mueller
6874c358ea Allow managing object observers
-----

Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2024-08-16 22:13:16 +02:00
Lars Mueller
cc8e7a569e Switch player names to std::string 2024-08-16 22:13:16 +02:00
DS
603eb57943
Fix comment and alpha test node oopsies from #14852 2024-08-16 22:01:16 +02:00
Erich Schubert
9046379b30
Fix chance/probability wording in lua_api.md 2024-08-16 21:59:36 +02:00
Zughy
ea96f6e1e3
DOCS: state that initial_properties are shared between entity instances 2024-08-16 21:59:20 +02:00
1F616EMO~nya
dc7a7a0ed9
Add table.keyof() (#14910) 2024-08-13 18:39:50 +02:00
Dmitry Marakasov
a677d33bdf Include unistd.h for getpid() when _IRR_COMPILE_WITH_X11_ 2024-08-13 18:38:59 +02:00
Gregor Parzefall
0fb67ccb34 Add setting to disable smooth scrolling 2024-08-13 18:38:34 +02:00
Erich Schubert
e6f77b95f3
Add vector.random_direction() (#14784)
Generate a random vector of unit length. Useful for many mods.
2024-08-13 18:38:07 +02:00
Loïc Blot
cb0bbea2a5
refacto: rework the GUI element handler function (#14793)
We have a very very old way to perform this handling.
With this new method, we have a more proper and flexible way to extend our UI with comprehensible handlers with common interface parameters

In terms of performance, it took very few more more memory and scraping is more faster, using the unordered_map benefits
2024-08-12 18:52:33 +02:00
1F616EMO~nya
98e51a0159
Clamp hotbar selection to slots that exist (#14869) 2024-08-12 15:35:13 +02:00
sfan5
39c2af9710
Render clouds as flat when thickness is zero (#14897) 2024-08-12 15:35:00 +02:00
grorp
013c6ee166
TouchScreenGUI: Replace buttonbars with grid menu (#14918) 2024-08-12 15:34:50 +02:00
y5nw
a3838dd0e8
Show IME candidate list in Windows (#14942) 2024-08-12 15:34:37 +02:00
1F616EMO~nya
53a50e0b0d
Fix warning about getVertexTypeDescription reaching its end (#14806) 2024-08-12 15:34:25 +02:00
sfan5
85e717fcd1
Rework object attachment handling to fix bugs (#14825) 2024-08-12 15:32:18 +02:00
Loïc Blot
a0e33ba9ea
dev: add shell.nix (#14823)
This permit to have reproducible development environment across OS (Linuxes, but maybe Mac OSX too).

It makes minetest compilable directly in a nix-shell with Nix/Lix but also on NixOS
2024-08-12 11:41:27 +02:00
Zughy
c7642c3c6c
Docs: Explain how to create and remove inventory lists (#14927) 2024-08-12 02:49:14 +02:00
SmallJoker
e236ad8348
Lua API: fix OOB array access in find_nodes_near (#14948) 2024-08-11 20:21:12 +02:00
1F616EMO~nya
f04cdc00a6
Optionally hide player names on the serverlist (#14820)
This commit adds a setting to anonymize player names when sending data to the server list.
2024-08-11 20:19:53 +02:00
asrelo
cfa9c83d33
Improve fs::PathStartsWith to handle empty strings (#14877)
`""` does not refer to a proper path, and `fs::PathStartsWith(path, "")` should just return `false`. This is also the case in libraries in other languages where I looked, seems to be common.

The new behavior:
* check early, if `prefix` is empty - return if path is empty or not,
* no special processing for when `path` is empty, the function meets characters in `prefix` and returns false anyway.
2024-08-11 20:19:14 +02:00
Lars Müller
5b19d315b3
devtest: Add sam to testentities (#14882) 2024-08-11 20:18:30 +02:00
rubenwardy
c6c2c4f60f
Revert "Disable SDL2 for 5.9.0 (#14944)" (#14959)
This reverts commit ebaf3c8d77.
2024-08-11 20:18:11 +02:00
rubenwardy
1222750c50 Continue with 5.10.0-dev 2024-08-11 16:55:00 +01:00
1487 changed files with 125801 additions and 104111 deletions

View file

@ -1,4 +1,4 @@
Checks: '-*,modernize-use-emplace,modernize-avoid-bind,misc-throw-by-value-catch-by-reference,misc-unconventional-assign-operator,performance-*'
Checks: '-*,modernize-use-emplace,modernize-avoid-bind,misc-throw-by-value-catch-by-reference,misc-unconventional-assign-operator,performance-*,-performance-avoid-endl,performance-inefficient-string-concatenation'
WarningsAsErrors: '-*,modernize-use-emplace,performance-type-promotion-in-math-fn,performance-faster-string-find,performance-implicit-cast-in-loop'
CheckOptions:
- key: performance-unnecessary-value-param.AllowedTypes

View file

@ -1,9 +1,16 @@
[*]
end_of_line = lf
[*.{cpp,h,lua,txt,glsl,md,c,cmake,java,gradle}]
[*.{cpp,h,lua,txt,glsl,c,cmake,java,gradle}]
charset = utf-8
indent_size = 4
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
charset = utf-8
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

3
.gitattributes vendored
View file

@ -3,3 +3,6 @@
*.cpp diff=cpp
*.h diff=cpp
*.gltf binary
*.x binary

View file

@ -14,7 +14,7 @@ Contributions are welcome! Here's how you can help:
[clone](https://help.github.com/articles/cloning-a-repository/) your fork.
2. Before you start coding, consider opening an
[issue at Github](https://github.com/minetest/minetest/issues) to discuss the
[issue on Github](https://github.com/luanti-org/luanti/issues) to discuss the
suitability and implementation of your intended contribution with the core
developers.
@ -25,19 +25,19 @@ Contributions are welcome! Here's how you can help:
the work, to avoid disappointment.
You may also benefit from discussing on our IRC development channel
[#minetest-dev](http://www.minetest.net/irc/). Note that a proper IRC client
[#luanti-dev](http://www.luanti.org/irc/). Note that a proper IRC client
is required to speak on this channel.
3. Start coding!
- Refer to the
[Lua API](https://github.com/minetest/minetest/blob/master/doc/lua_api.md),
[Developer Wiki](http://dev.minetest.net/Main_Page) and other
[documentation](https://github.com/minetest/minetest/tree/master/doc).
- Follow the [C/C++](http://dev.minetest.net/Code_style_guidelines) and
[Lua](http://dev.minetest.net/Lua_code_style_guidelines) code style guidelines.
[Lua API](https://github.com/luanti-org/luanti/blob/master/doc/lua_api.md),
[Developer Wiki](https://dev.luanti.org/) and other
[documentation](https://github.com/luanti-org/luanti/tree/master/doc).
- Follow the [C/C++](https://dev.luanti.org/Code_style_guidelines) and
[Lua](https://dev.luanti.org/Lua_code_style_guidelines) code style guidelines.
- Check your code works as expected and document any changes to the Lua API.
- To avoid conflicting changes between contributions, do not do the following manually. They will be done before each release.
- Run `updatepo.sh` or update `minetest.po{,t}` even if your code adds new translatable strings.
- Run `updatepo.sh` or update `luanti.po{,t}` even if your code adds new translatable strings.
- Update `minetest.conf.example` and `settings_translation_file.cpp` even if your code adds new core settings.
4. Commit & [push](https://help.github.com/articles/pushing-to-a-remote/) your changes to a new branch (not `master`, one change per branch)
@ -53,7 +53,7 @@ Contributions are welcome! Here's how you can help:
- The following lines should describe the commit, starting a new line for each point.
5. Once you are happy with your changes, submit a pull request.
- Open the [pull-request form](https://github.com/minetest/minetest/pull/new/master).
- Open the [pull-request form](https://github.com/luanti-org/luanti/pull/new/master).
- Add a description explaining what you've done (or if it's a
work-in-progress - what you need to do).
- Make sure to fill out the pull request template.
@ -64,8 +64,8 @@ Contributions are welcome! Here's how you can help:
picture of the project.
2. It works.
3. It follows the code style for
[C/C++](http://dev.minetest.net/Code_style_guidelines) or
[Lua](http://dev.minetest.net/Lua_code_style_guidelines).
[C/C++](https://dev.luanti.org/Code_style_guidelines) or
[Lua](https://dev.luanti.org/Lua_code_style_guidelines).
4. The code's interfaces are well designed, regardless of other aspects that
might need more work in the future.
5. It uses protocols and formats which include the required compatibility.
@ -76,14 +76,14 @@ If you experience an issue, we would like to know the details - especially when
a stable release is on the way.
1. Do a quick search on GitHub to check if the issue has already been reported.
2. Is it an issue with the Minetest *engine*? If not, report it
[elsewhere](http://www.minetest.net/development/#reporting-issues).
3. [Open an issue](https://github.com/minetest/minetest/issues/new) and describe
2. Is it an issue with the Luanti *engine*? If not, report it
[elsewhere](http://www.luanti.org/development/#reporting-issues).
3. [Open an issue](https://github.com/luanti-org/luanti/issues/new) and describe
the issue you are having - you could include:
- Error logs (check the bottom of the `debug.txt` file).
- Screenshots.
- Ways you have tried to solve the issue, and whether they worked or not.
- Your Minetest version and the content (games, mods or texture packs) you have installed.
- Your Luanti version and the content (games, mods or texture packs) you have installed.
- Your platform (e.g. Windows 10 or Ubuntu 15.04 x64).
After reporting you should aim to answer questions or clarifications as this
@ -99,28 +99,28 @@ possible.
## Translations
The core translations of Minetest are performed using Weblate. You can access
The core translations of Luanti are performed using Weblate. You can access
the project page with a list of current languages
[here](https://hosted.weblate.org/projects/minetest/minetest/).
Builtin (the component which contains things like server messages, chat command
descriptions, privilege descriptions) is translated separately; it needs to be
translated by editing a `.tr` text file. See
[Translation](https://dev.minetest.net/Translation) for more information.
[Translation](https://dev.luanti.org/Translation) for more information.
## Donations
If you'd like to monetarily support Minetest development, you can find donation
methods on [our website](http://www.minetest.net/development/#donate).
If you'd like to monetarily support Luanti development, you can find donation
methods on [our website](http://www.luanti.org/development/#donate).
# Maintaining
* This is a concise version of the
[Rules & Guidelines](http://dev.minetest.net/Category:Rules_and_Guidelines) on the developer wiki.*
[Rules & Guidelines](https://dev.luanti.org/engine-dev-process/) on the developer wiki.*
These notes are for those who have push access Minetest (core developers / maintainers).
These notes are for those who have push access Luanti (core developers / maintainers).
- See the [project organisation](http://dev.minetest.net/Organisation) for the people involved.
- See the [project organisation](https://dev.luanti.org/Organisation) for the people involved.
## Concept approvals and roadmaps
@ -159,14 +159,14 @@ Submit a :+1: (+1) or "Looks good" comment to show you believe the pull-request
- The title should follow the commit guidelines (title starts with a capital letter, present tense, descriptive).
- Don't modify history older than 10 minutes.
- Use rebase, not merge to get linear history:
- `curl https://github.com/minetest/minetest/pull/1.patch | git am`
- `curl -Ls https://github.com/luanti-org/luanti/pull/1.patch | git am`
## Reviewing issues and feature requests
- If an issue does not get a response from its author within 1 month (when requiring more details), it can be closed.
- When an issue is a duplicate, refer to the first ones and close the later ones.
- Tag issues with the appropriate [labels](https://github.com/minetest/minetest/labels) for devices, platforms etc.
- Tag issues with the appropriate [labels](https://github.com/luanti-org/luanti/labels) for devices, platforms etc.
## Releasing a new version
*Refer to [dev.minetest.net/Releasing_Minetest](http://dev.minetest.net/Releasing_Minetest)*
*Refer to [dev.luanti.org/Releasing_Luanti](https://dev.luanti.org/Releasing_Luanti)*

View file

@ -6,22 +6,24 @@ body:
attributes:
value: |
Please note the following:
1. **Please update your Minetest Engine to the latest stable or dev version** before submitting bug reports. Make sure the bug is still reproducible on the latest version.
2. This page is for reporting the bugs of **the engine itself**. For bugs in a particular game, please [search for the game in the ContentDB](https://content.minetest.net/packages/?type=game) and submit a bug report in their issue trackers.
* For example, you can submit issues about the Minetest Game (the official game of Minetest) [in its own repository](https://github.com/minetest/minetest_game/issues).
1. **Please update Luanti to the latest stable or dev version** before submitting bug reports. Make sure the bug is still reproducible on the latest version.
2. This page is for reporting the bugs of **the engine itself**. For bugs in a particular game, please [search for the game in the ContentDB](https://content.luanti.org/packages/?type=game) and submit a bug report in their issue trackers.
* For example, you can submit issues about the Minetest Game [in its own repository](https://github.com/luanti-org/minetest_game/issues).
3. Please provide as many details as possible for us to spot the problem quicker.
- type: textarea
attributes:
label: Minetest version
label: Luanti version
description: |
Paste the Minetest version below.
Paste the Luanti version below.
If you are on a dev version, please also indicate the git commit hash.
Refer to the "About" tab of the menu or run `minetest --version` on the command line.
Refer to the "About" tab of the menu or run `luanti --version` on the command line.
placeholder: |
Example:
Minetest 5.7.0-dev-ca13c51 (Linux)
Using Irrlicht 1.9.0mt9
Using LuaJIT 2.1.0-beta3
Luanti 5.10.0-3ad6aee9b (Linux)
Using LuaJIT 2.1.1727870382
Built by GCC 14.2
Running on Linux/6.11.5 x86_64
BUILD_TYPE=Release
RUN_IN_PLACE=1
USE_CURL=1
@ -32,13 +34,6 @@ body:
render: "true"
validations:
required: true
- type: input
attributes:
label: Irrlicht device
description:
placeholder: "Example: X11"
validations:
required: false
- type: input
attributes:
label: Operating system and version
@ -67,7 +62,7 @@ body:
attributes:
label: Active renderer
description: You can find this in the "About" tab in the main menu.
placeholder: "Example: OpenGL 4.6.0"
placeholder: "Example: ES 3.2 / ogles2 / X11"
validations:
required: false
- type: textarea

View file

@ -1,8 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Submit issues about Minetest Game
url: https://github.com/minetest/minetest_game/issues/new/choose
url: https://github.com/luanti-org/minetest_game/issues/new
about: Only submit issues of the engine in this repository's issue tracker. Submit those of Minetest Game in its own issue tracker.
- name: Search for issue trackers of third-party games
url: https://content.minetest.net/packages/?type=game
url: https://content.luanti.org/packages/?type=game
about: For issues of third-party games, search for the game in the ContentDB and then submit an issue in their issue tracker.

View file

@ -7,7 +7,7 @@ body:
value: |
Please note the following:
1. Only submit a feature request if the feature does not exist on the latest dev version.
2. This page is for suggesting changes to **the engine itself**. To suggest changes to games, please [search for the game in the ContentDB](https://content.minetest.net/packages/?type=game) and submit a feature request in their issue trackers.
2. This page is for suggesting changes to **the engine itself**. To suggest changes to games, please [search for the game in the ContentDB](https://content.luanti.org/packages/?type=game) and submit a feature request in their issue trackers.
- type: textarea
attributes:
label: Problem

View file

@ -3,7 +3,7 @@ Add compact, short information about your PR for easier understanding:
- Goal of the PR
- How does the PR work?
- Does it resolve any reported issue?
- Does this relate to a goal in [the roadmap](https://github.com/minetest/minetest/blob/master/doc/direction.md)?
- Does this relate to a goal in [the roadmap](https://github.com/luanti-org/luanti/blob/master/doc/direction.md)?
- If not a bug fix, why is this PR needed? What usecases does it solve?
## To do

6
.github/SECURITY.md vendored
View file

@ -3,7 +3,7 @@
## Supported Versions
We only support the latest stable version for security issues.
See the [releases page](https://github.com/minetest/minetest/releases).
See the [releases page](https://github.com/luanti-org/luanti/releases).
## Reporting a Vulnerability
@ -11,10 +11,10 @@ We ask that you report vulnerabilities privately, by contacting a core developer
to give us time to fix them. You can do that by emailing one of the following addresses:
* celeron55@gmail.com
* rubenwardy@minetest.net
* rw@rubenwardy.com
Depending on severity, we will either create a private issue for the vulnerability
and release a patch version of Minetest, or give you permission to file the issue publicly.
and release a patch version of Luanti, or give you permission to file the issue publicly.
For more information on the justification of this policy, see
[Responsible Disclosure](https://en.wikipedia.org/wiki/Responsible_disclosure).

View file

@ -12,6 +12,7 @@ on:
- 'irr/**.cpp'
- '**/CMakeLists.txt'
- 'cmake/Modules/**'
- 'po/**.po'
- 'android/**'
- '.github/workflows/android.yml'
pull_request:
@ -24,6 +25,7 @@ on:
- 'irr/**.cpp'
- '**/CMakeLists.txt'
- 'cmake/Modules/**'
- 'po/**.po'
- 'android/**'
- '.github/workflows/android.yml'
@ -50,25 +52,25 @@ jobs:
- name: Save AAB artifact
uses: actions/upload-artifact@v4
with:
name: Minetest-release.aab
name: Luanti-release.aab
path: android/app/build/outputs/bundle/release/app-release.aab
- name: Save armeabi artifact
uses: actions/upload-artifact@v4
with:
name: Minetest-armeabi-v7a.apk
name: Luanti-armeabi-v7a.apk
path: android/app/build/outputs/apk/release/app-armeabi-v7a-release-unsigned.apk
- name: Save arm64 artifact
uses: actions/upload-artifact@v4
with:
name: Minetest-arm64-v8a.apk
name: Luanti-arm64-v8a.apk
path: android/app/build/outputs/apk/release/app-arm64-v8a-release-unsigned.apk
- name: Save x86 artifact
uses: actions/upload-artifact@v4
with:
name: Minetest-x86.apk
name: Luanti-x86.apk
path: android/app/build/outputs/apk/release/app-x86-release-unsigned.apk
- name: Save x86_64 artifact
uses: actions/upload-artifact@v4
with:
name: Minetest-x86_64.apk
name: Luanti-x86_64.apk
path: android/app/build/outputs/apk/release/app-x86_64-release-unsigned.apk

View file

@ -72,8 +72,8 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
labels: |
org.opencontainers.image.title=Minetest
org.opencontainers.image.vendor=Minetest
org.opencontainers.image.title=Luanti
org.opencontainers.image.vendor=Luanti
org.opencontainers.image.licenses=LGPL-2.1-only
# Build and push Docker image
@ -94,5 +94,5 @@ jobs:
- name: Test Docker Image
run: |
docker run --rm $(cut -d, -f1 <<<"$DOCKER_METADATA_OUTPUT_TAGS") minetestserver --version
docker run --rm $(cut -d, -f1 <<<"$DOCKER_METADATA_OUTPUT_TAGS") luantiserver --version
shell: bash

View file

@ -12,9 +12,8 @@ on:
- 'irr/**.cpp'
- '**/CMakeLists.txt'
- 'cmake/Modules/**'
- 'po/**.po'
- 'util/ci/**'
- 'Dockerfile'
- '.dockerignore'
- '.github/workflows/linux.yml'
pull_request:
paths:
@ -26,9 +25,8 @@ on:
- 'irr/**.cpp'
- '**/CMakeLists.txt'
- 'cmake/Modules/**'
- 'po/**.po'
- 'util/ci/**'
- 'Dockerfile'
- '.dockerignore'
- '.github/workflows/linux.yml'
env:
@ -51,10 +49,12 @@ jobs:
env:
CC: gcc-7
CXX: g++-7
# Test fallback SHA implementations
CMAKE_FLAGS: '-DENABLE_OPENSSL=0'
- name: Test
run: |
./bin/minetest --run-unittests
./bin/luanti --run-unittests
# Current gcc version
gcc_14:
@ -78,7 +78,7 @@ jobs:
mkdir nowrite
chmod a-w nowrite
cd nowrite
../bin/minetest --run-unittests
../bin/luanti --run-unittests
# Older clang version (should be close to our minimum supported version)
clang_7:
@ -88,7 +88,7 @@ jobs:
- name: Install deps
run: |
source ./util/ci/common.sh
install_linux_deps clang-7 llvm
install_linux_deps clang-7 llvm-7
- name: Build
run: |
@ -100,7 +100,12 @@ jobs:
- name: Unittest
run: |
./bin/minetest --run-unittests
./bin/luanti --run-unittests
# Do this here because we have ASan and error paths are sensitive to dangling pointers
- name: Test error cases
run: |
./util/test_error_cases.sh
# Current clang version
clang_18:
@ -121,7 +126,7 @@ jobs:
- name: Test
run: |
./bin/minetest --run-unittests
./bin/luanti --run-unittests
- name: Integration test + devtest
run: |
@ -151,4 +156,4 @@ jobs:
- name: Test
run: |
./bin/minetestserver --run-unittests
./bin/luantiserver --run-unittests

View file

@ -35,7 +35,7 @@ jobs:
- name: Integration test + devtest
run: |
./util/test_multiplayer.sh
serverconf="profiler.load=true" ./util/test_multiplayer.sh
luacheck:
name: "Builtin Luacheck and Unit Tests"

View file

@ -16,7 +16,7 @@ on:
jobs:
build:
if: github.repository == 'minetest/minetest'
if: github.repository == 'luanti-org/luanti'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

View file

@ -13,6 +13,7 @@ on:
- 'irr/**.mm' # Objective-C(++)
- '**/CMakeLists.txt'
- 'cmake/Modules/**'
- 'po/**.po'
- '.github/workflows/macos.yml'
pull_request:
paths:
@ -25,11 +26,12 @@ on:
- 'irr/**.mm' # Objective-C(++)
- '**/CMakeLists.txt'
- 'cmake/Modules/**'
- 'po/**.po'
- '.github/workflows/macos.yml'
jobs:
build:
# use macOS 13 since it's the last one that still runs on x86
build-intel-macos:
# use lowest possible macOS running on x86_64 supported by brew to support more users
runs-on: macos-13
steps:
- uses: actions/checkout@v4
@ -53,7 +55,7 @@ jobs:
- name: Test
run: |
./build/macos/minetest.app/Contents/MacOS/minetest --run-unittests
./build/macos/luanti.app/Contents/MacOS/luanti --run-unittests
# Zipping the built .app preserves permissions on the contained files,
# which the GitHub artifact pipeline would otherwise strip away.
@ -66,5 +68,46 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: minetest-macos
name: luanti-macos
path: ./build/macos/*.zip
build-arm-macos-xcode:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Install deps
run: |
source ./util/ci/common.sh
install_macos_deps
# brew jsoncpp do not include libjsoncpp.a, and if installed header conflict caused build failure
brew uninstall jsoncpp
- name: Build with Cmake
run: |
mkdir build
cd build
cmake .. \
-DCMAKE_OSX_DEPLOYMENT_TARGET=14 \
-DCMAKE_FIND_FRAMEWORK=LAST \
-DCMAKE_INSTALL_PREFIX=../build/macos/ \
-DRUN_IN_PLACE=FALSE -DENABLE_GETTEXT=TRUE \
-DENABLE_SYSTEM_JSONCPP=OFF
cmake --build . -j$(sysctl -n hw.logicalcpu)
make install
- name: Build and Archive with Xcode
run: |
mkdir build_xcode
cd build_xcode
../util/ci/build_xcode.sh
- name: Tests
run: |
mkdir -p "${HOME}/Library/Application Support/minetest/games/"
ln -s "${PWD}/games/devtest" "${HOME}/Library/Application Support/minetest/games/"
./build/macos/luanti.app/Contents/MacOS/luanti --run-unittests
./build_xcode/luanti.xcarchive/Products/Applications/luanti.app/Contents/MacOS/luanti --run-unittests
- name: Diff Resources
run: |
diff -rd ./build/macos/luanti.app/Contents/Resources ./build_xcode/build/Release/luanti.app/Contents/Resources || exit 1
diff -rd ./build/macos/luanti.app/Contents/Resources ./build_xcode/luanti.xcarchive/Products/Applications/luanti.app/Contents/Resources || exit 1

26
.github/workflows/png_file_checks.yml vendored Normal file
View file

@ -0,0 +1,26 @@
name: png_file_checks
# Check whether all png files are in a valid format
on:
push:
paths:
- '**.png'
- '.github/workflows/**.yml'
pull_request:
paths:
- '**.png'
- '.github/workflows/**.yml'
jobs:
png_optimized:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install deps
run: |
sudo apt-get update
sudo apt install -y optipng
- name: Check whether all png files are optimized
run: |
./util/ci/check_png_optimized.sh

118
.github/workflows/whitespace_checks.yml vendored Normal file
View file

@ -0,0 +1,118 @@
name: whitespace_checks
# Check whitespaces of the following file types
# Not checked: .lua, .yml, .properties, .conf, .java, .py, .svg, .gradle, .xml, ...
# (luacheck already checks .lua files)
on:
push:
paths:
- '**.txt'
- '**.md'
- '**.[ch]'
- '**.cpp'
- '**.hpp'
- '**.sh'
- '**.cmake'
- '**.glsl'
- '**.lua'
pull_request:
paths:
- '**.txt'
- '**.md'
- '**.[ch]'
- '**.cpp'
- '**.hpp'
- '**.sh'
- '**.cmake'
- '**.glsl'
- '**.lua'
jobs:
trailing_whitespaces:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Line endings are already ensured by .gitattributes
- name: Check trailing whitespaces
run: |
if git ls-files |\
grep -E '\.txt$|\.md$|\.[ch]$|\.cpp$|\.hpp$|\.sh$|\.cmake$|\.glsl$' |\
xargs grep -n '\s$';\
then\
echo -e "\033[0;31mFound trailing whitespace";\
(exit 1);\
else\
(exit 0);\
fi
indent_spaces:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Line endings are already ensured by .gitattributes
# Multiple multline comments in one line is not supported by this check
# and there is no reason to use them
# So lines like: "/* */ /*" or "*/ a = 5; /*" will result in error
- name: Check for unsupported multiline comments
run: |
if git ls-files |\
grep -E '^src/.*\.cpp$|^src/.*\.[ch]$' |\
xargs grep -n '\*/.*/\*';\
then
echo -e "\033[0;31mUnsupported combination of multiline comments. New multiline comment should begin on new line.";\
(exit 1);\
else\
(exit 0);\
fi
if git ls-files |\
grep -E '\.lua$' |\
xargs grep -n -e '\]\].*--\[\[';\
then
echo -e "\033[0;31mUnsupported combination of multiline comments. New multiline comment should begin on new line.";\
(exit 1);\
else\
(exit 0);\
fi
# This prepare files for final check
# See python script ./util/ci/indent_tab_preprocess.py for details.
- name: Preprocess files
run: |
git ls-files |\
grep -E '^src/.*\.cpp$|^src/.*\.[ch]$' |\
xargs -L 1 -P $(($(nproc) + 1)) \
python3 ./util/ci/indent_tab_preprocess.py "/*" "*/"
git ls-files |\
grep -E '\.lua$' |\
xargs -L 1 -P $(($(nproc) + 1)) \
python3 ./util/ci/indent_tab_preprocess.py "--[[" "]]"
# Check for bad indent.
# This runs over preprocessed files.
# If there is any remaining space on line beginning or after tab,
# error is generated
- name: Check indent spaces
run: |
if git ls-files |\
grep -E '^src/.*\.cpp$|^src/.*\.[ch]$|\.lua' |\
xargs grep -n -P '^\t*[ ]';\
then\
echo -e "\033[0;31mFound incorrect indent whitespaces";\
(exit 1);\
else\
(exit 0);\
fi
tabs_lua_api_files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Some files should not contain tabs
- name: Check tabs in Lua API files
run: |
if grep -n $'\t' doc/lua_api.md doc/client_lua_api.md;\
then\
echo -e "\033[0;31mFound tab in markdown file";\
(exit 1);\
else\
(exit 0);\
fi

View file

@ -12,6 +12,7 @@ on:
- 'irr/**.cpp'
- '**/CMakeLists.txt'
- 'cmake/Modules/**'
- 'po/**.po'
- 'util/buildbot/**'
- 'misc/*.manifest'
- '.github/workflows/windows.yml'
@ -25,6 +26,7 @@ on:
- 'irr/**.cpp'
- '**/CMakeLists.txt'
- 'cmake/Modules/**'
- 'po/**.po'
- 'util/buildbot/**'
- 'misc/*.manifest'
- '.github/workflows/windows.yml'
@ -56,8 +58,8 @@ jobs:
run: |
dest=$(mktemp -d)
unzip -q -d "$dest" B/build/*.zip
cd "$dest"/minetest-*-win*
wine bin/minetest.exe --version
cd "$dest"/luanti-*-win*
wine bin/luanti.exe --version
- uses: actions/upload-artifact@v4
with:
@ -71,7 +73,7 @@ jobs:
env:
VCPKG_VERSION: 01f602195983451bc83e72f4214af2cbc495aa94
# 2024.05.24
vcpkg_packages: zlib zstd curl[winssl] openal-soft libvorbis libogg libjpeg-turbo sqlite3 freetype luajit gmp jsoncpp opengl-registry
vcpkg_packages: zlib zstd curl[winssl] openal-soft libvorbis libogg libjpeg-turbo sqlite3 freetype luajit gmp jsoncpp sdl2
strategy:
fail-fast: false
matrix:
@ -103,7 +105,7 @@ jobs:
vcpkgGitCommitId: ${{ env.VCPKG_VERSION }}
vcpkgTriplet: ${{ matrix.config.vcpkg_triplet }}
- name: Minetest CMake
- name: CMake
run: |
cmake ${{matrix.config.generator}} `
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake" `
@ -113,13 +115,13 @@ jobs:
-DREQUIRE_LUAJIT=TRUE `
-DRUN_IN_PLACE=${{ contains(matrix.type, 'portable') }} .
- name: Build Minetest
- name: Build
run: cmake --build . --config Release
- name: Unittests
# need this workaround for stdout to work
run: |
$proc = start .\bin\Release\minetest.exe --run-unittests -NoNewWindow -Wait -PassThru
$proc = start .\bin\Release\luanti.exe --run-unittests -NoNewWindow -Wait -PassThru
exit $proc.ExitCode
continue-on-error: true # FIXME!!

13
.gitignore vendored
View file

@ -26,6 +26,7 @@ tags
!tags/
gtags.files
.idea
.qtcreator/
# Codelite
*.project
# Visual Studio Code & plugins
@ -43,14 +44,18 @@ build/.cmake/
*.zsync
appimage-build
AppDir
# Direnv
.direnv/
# Nix
/result
## Files related to Minetest development cycle
## Files related to Luanti development cycle
/*.patch
*.diff
# GNU Patch reject file
*.rej
## Non-static Minetest directories or symlinks to these
## Non-static Luanti directories or symlinks to these
/bin/
/games/*
!/games/devtest/
@ -75,7 +80,7 @@ minetest.conf
debug.txt
debug.txt.1
## Other files generated by Minetest
## Other files generated by Luanti
screenshot_*.png
testbm.txt
@ -105,6 +110,8 @@ src/cmake_config_githash.h
*.layout
*.o
*.a
*.dump
*.dmp
*.ninja
.ninja*
*.gch

View file

@ -10,17 +10,19 @@ ignore = {
read_globals = {
"ItemStack",
"INIT",
"PLATFORM",
"DIR_DELIM",
"dump", "dump2",
"fgettext", "fgettext_ne",
"vector",
"VoxelArea",
"VoxelManip",
"profiler",
"Settings",
"PerlinNoise", "PerlinNoiseMap",
string = {fields = {"split", "trim"}},
table = {fields = {"copy", "getn", "indexof", "insert_all"}},
table = {fields = {"copy", "getn", "indexof", "keyof", "insert_all"}},
math = {fields = {"hypot", "round"}},
}
@ -37,6 +39,12 @@ files["builtin/client/register.lua"] = {
}
}
files["builtin/common/math.lua"] = {
globals = {
"math",
},
}
files["builtin/common/misc_helpers.lua"] = {
globals = {
"dump", "dump2", "table", "math", "string",
@ -46,7 +54,7 @@ files["builtin/common/misc_helpers.lua"] = {
}
files["builtin/common/vector.lua"] = {
globals = { "vector" },
globals = { "vector", "math" },
}
files["builtin/game/voxelarea.lua"] = {
@ -68,10 +76,6 @@ files["builtin/mainmenu"] = {
globals = {
"gamedata",
},
read_globals = {
"PLATFORM",
},
}
files["builtin/common/tests"] = {

View file

@ -72,3 +72,4 @@ Lars Müller <appgurulars@gmx.de>
Lars Müller <appgurulars@gmx.de> <34514239+appgurueu@users.noreply.github.com>
ROllerozxa <rollerozxa@voxelmanip.se>
ROllerozxa <rollerozxa@voxelmanip.se> <temporaryemail4meh+github@gmail.com>
Ælla Chiana Moskopp <erle@dieweltistgarnichtso.net> <nils@dieweltistgarnichtso.net>

View file

@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.12)
# This can be read from ${PROJECT_NAME} after project() is called
project(minetest)
set(PROJECT_NAME_CAPITALIZED "Minetest")
project(luanti)
set(PROJECT_NAME_CAPITALIZED "Luanti")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
@ -11,12 +11,12 @@ set(CLANG_MINIMUM_VERSION "7.0.1")
# You should not need to edit these manually, use util/bump_version.sh
set(VERSION_MAJOR 5)
set(VERSION_MINOR 9)
set(VERSION_MINOR 12)
set(VERSION_PATCH 0)
set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string")
# Change to false for releases
set(DEVELOPMENT_BUILD FALSE)
set(DEVELOPMENT_BUILD TRUE)
set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
if(VERSION_EXTRA)
@ -48,7 +48,7 @@ endif()
# - win32/gcc: fails to link
# - win32/clang: works
# - macOS on x86: seems to be fine
# - macOS on ARM: crashes, see <https://github.com/minetest/minetest/issues/14397>
# - macOS on ARM: crashes, see <https://github.com/luanti-org/luanti/issues/14397>
# Note: since CMake has no easy architecture detection disabling for Mac entirely
#### ####
if((WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR APPLE)
@ -56,6 +56,11 @@ if((WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR APPLE)
endif()
set(ENABLE_LTO ${DEFAULT_ENABLE_LTO} CACHE BOOL "Use Link Time Optimization")
set(BUILD_WITH_TRACY FALSE CACHE BOOL
"Fetch and build with the Tracy profiler client")
set(FETCH_TRACY_GIT_TAG "master" CACHE STRING
"Git tag for fetching Tracy client. Match with your server (gui) version")
set(DEFAULT_RUN_IN_PLACE FALSE)
if(WIN32)
set(DEFAULT_RUN_IN_PLACE TRUE)
@ -87,7 +92,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
# Load default options for Android
if(ANDROID)
cmake_minimum_required(VERSION 3.20)
include(MinetestAndroidLibs)
include(AndroidLibs)
endif()
@ -256,23 +261,27 @@ install(FILES "doc/world_format.md" DESTINATION "${DOCDIR}" COMPONENT "Docs")
install(FILES "minetest.conf.example" DESTINATION "${EXAMPLE_CONF_DIR}")
if(UNIX AND NOT APPLE)
install(FILES "doc/minetest.6" "doc/minetestserver.6" DESTINATION "${MANDIR}/man6")
install(FILES "doc/luanti.6" "doc/luantiserver.6" DESTINATION "${MANDIR}/man6")
install(FILES "misc/net.minetest.minetest.desktop" DESTINATION "${XDG_APPS_DIR}")
install(FILES "misc/net.minetest.minetest.metainfo.xml" DESTINATION "${METAINFODIR}")
install(FILES "misc/minetest.svg" DESTINATION "${ICONDIR}/hicolor/scalable/apps")
install(FILES "misc/minetest-xorg-icon-128.png"
install(FILES "misc/luanti.svg" DESTINATION "${ICONDIR}/hicolor/scalable/apps")
install(FILES "misc/luanti-xorg-icon-128.png"
DESTINATION "${ICONDIR}/hicolor/128x128/apps"
RENAME "minetest.png")
RENAME "luanti.png")
endif()
if(APPLE)
install(FILES "misc/minetest-icon.icns" DESTINATION "${SHAREDIR}")
install(FILES "misc/Info.plist" DESTINATION "${BUNDLE_PATH}/Contents")
install(FILES "misc/luanti-icon.icns" DESTINATION "${SHAREDIR}")
install(FILES "${CMAKE_BINARY_DIR}/Info.plist" DESTINATION "${BUNDLE_PATH}/Contents")
endif()
if(CMAKE_GENERATOR STREQUAL "Xcode")
set(client_RESOURCES "${CMAKE_SOURCE_DIR}/misc/luanti-icon.icns")
endif()
# Library pack
find_package(GMP REQUIRED)
find_package(Json REQUIRED)
find_package(Json 1.0.0 REQUIRED)
find_package(Lua REQUIRED)
if(NOT USE_LUAJIT)
add_subdirectory(lib/bitop)
@ -283,6 +292,8 @@ if(BUILD_UNITTESTS OR BUILD_BENCHMARKS)
add_subdirectory(lib/catch2)
endif()
add_subdirectory(lib/tiniergltf)
# Subdirectories
# Be sure to add all relevant definitions above this
add_subdirectory(src)
@ -300,7 +311,7 @@ include(CPackComponent)
cpack_add_component(Docs
DISPLAY_NAME "Documentation"
DESCRIPTION "Documentation about Minetest and Minetest modding"
DESCRIPTION "Documentation about ${PROJECT_NAME_CAPITALIZED} and ${PROJECT_NAME_CAPITALIZED} modding"
)
if(WIN32)
@ -324,7 +335,7 @@ if(WIN32)
set(CPACK_CREATE_DESKTOP_LINKS ${PROJECT_NAME})
set(CPACK_PACKAGING_INSTALL_PREFIX "/${PROJECT_NAME_CAPITALIZED}")
set(CPACK_WIX_PRODUCT_ICON "${CMAKE_CURRENT_SOURCE_DIR}/misc/minetest-icon.ico")
set(CPACK_WIX_PRODUCT_ICON "${CMAKE_CURRENT_SOURCE_DIR}/misc/luanti-icon.ico")
# Supported languages can be found at
# http://wixtoolset.org/documentation/manual/v3/wixui/wixui_localization.html
#set(CPACK_WIX_CULTURES "ar-SA,bg-BG,ca-ES,hr-HR,cs-CZ,da-DK,nl-NL,en-US,et-EE,fi-FI,fr-FR,de-DE")
@ -368,3 +379,19 @@ if(BUILD_DOCUMENTATION)
)
endif()
endif()
# Fetch Tracy
if(BUILD_WITH_TRACY)
include(FetchContent)
message(STATUS "Fetching Tracy (${FETCH_TRACY_GIT_TAG})...")
FetchContent_Declare(
tracy
GIT_REPOSITORY https://github.com/wolfpld/tracy.git
GIT_TAG ${FETCH_TRACY_GIT_TAG}
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
)
FetchContent_MakeAvailable(tracy)
message(STATUS "Fetching Tracy - done")
endif()

2
CNAME
View file

@ -1 +1 @@
api.minetest.net
api.luanti.org

View file

@ -32,22 +32,22 @@ RUN git clone --recursive https://github.com/jupp0r/prometheus-cpp && \
FROM dev as builder
COPY .git /usr/src/minetest/.git
COPY CMakeLists.txt /usr/src/minetest/CMakeLists.txt
COPY README.md /usr/src/minetest/README.md
COPY minetest.conf.example /usr/src/minetest/minetest.conf.example
COPY builtin /usr/src/minetest/builtin
COPY cmake /usr/src/minetest/cmake
COPY doc /usr/src/minetest/doc
COPY fonts /usr/src/minetest/fonts
COPY lib /usr/src/minetest/lib
COPY misc /usr/src/minetest/misc
COPY po /usr/src/minetest/po
COPY src /usr/src/minetest/src
COPY irr /usr/src/minetest/irr
COPY textures /usr/src/minetest/textures
COPY .git /usr/src/luanti/.git
COPY CMakeLists.txt /usr/src/luanti/CMakeLists.txt
COPY README.md /usr/src/luanti/README.md
COPY minetest.conf.example /usr/src/luanti/minetest.conf.example
COPY builtin /usr/src/luanti/builtin
COPY cmake /usr/src/luanti/cmake
COPY doc /usr/src/luanti/doc
COPY fonts /usr/src/luanti/fonts
COPY lib /usr/src/luanti/lib
COPY misc /usr/src/luanti/misc
COPY po /usr/src/luanti/po
COPY src /usr/src/luanti/src
COPY irr /usr/src/luanti/irr
COPY textures /usr/src/luanti/textures
WORKDIR /usr/src/minetest
WORKDIR /usr/src/luanti
RUN cmake -B build \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_BUILD_TYPE=Release \
@ -68,9 +68,9 @@ RUN apk add --no-cache curl gmp libstdc++ libgcc libpq jsoncpp zstd-libs \
WORKDIR /var/lib/minetest
COPY --from=builder /usr/local/share/minetest /usr/local/share/minetest
COPY --from=builder /usr/local/bin/minetestserver /usr/local/bin/minetestserver
COPY --from=builder /usr/local/share/doc/minetest/minetest.conf.example /etc/minetest/minetest.conf
COPY --from=builder /usr/local/share/luanti /usr/local/share/luanti
COPY --from=builder /usr/local/bin/luantiserver /usr/local/bin/luantiserver
COPY --from=builder /usr/local/share/doc/luanti/minetest.conf.example /etc/minetest/minetest.conf
COPY --from=builder /usr/local/lib/libspatialindex* /usr/local/lib/
COPY --from=builder /usr/local/lib/libluajit* /usr/local/lib/
USER minetest:minetest
@ -78,5 +78,5 @@ USER minetest:minetest
EXPOSE 30000/udp 30000/tcp
VOLUME /var/lib/minetest/ /etc/minetest/
ENTRYPOINT ["/usr/local/bin/minetestserver"]
ENTRYPOINT ["/usr/local/bin/luantiserver"]
CMD ["--config", "/etc/minetest/minetest.conf"]

View file

@ -1,8 +1,8 @@
License of Minetest textures and sounds
License of Luanti textures and sounds
---------------------------------------
This applies to textures and sounds contained in the main Minetest
This applies to textures and sounds contained in the main Luanti
distribution.
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
@ -14,6 +14,9 @@ https://www.apache.org/licenses/LICENSE-2.0.html
Textures by Zughy are under CC BY-SA 4.0
https://creativecommons.org/licenses/by-sa/4.0/
Textures by cx384 are under CC BY-SA 4.0
https://creativecommons.org/licenses/by-sa/4.0/
Media files by DS are under CC BY-SA 4.0
https://creativecommons.org/licenses/by-sa/4.0/
@ -29,7 +32,6 @@ ShadowNinja:
textures/base/pack/smoke_puff.png
paramat:
textures/base/pack/menu_header.png
textures/base/pack/next_icon.png
textures/base/pack/prev_icon.png
textures/base/pack/clear.png
@ -39,10 +41,10 @@ rubenwardy, paramat:
textures/base/pack/start_icon.png
textures/base/pack/end_icon.png
erlehmann:
misc/minetest-icon-24x24.png
misc/minetest-icon.ico
misc/minetest.svg
erle:
misc/luanti-icon-24x24.png
misc/luanti-icon.ico
misc/luanti.svg
textures/base/pack/logo.png
JRottm:
@ -57,20 +59,26 @@ srifqi:
textures/base/pack/minimap_btn.png
Zughy:
textures/base/pack/cdb_add.png
textures/base/pack/cdb_downloading.png
textures/base/pack/cdb_queued.png
textures/base/pack/cdb_update.png
textures/base/pack/cdb_update_cropped.png
textures/base/pack/cdb_viewonline.png
textures/base/pack/settings_btn.png
textures/base/pack/settings_info.png
textures/base/pack/settings_reset.png
textures/base/pack/server_url.png
textures/base/pack/server_url_unavailable.png
textures/base/pack/server_view_clients.png
textures/base/pack/server_view_clients_unavailable.png
cx384:
textures/base/pack/server_view_mods.png
textures/base/pack/server_view_mods_unavailable.png
appgurueu:
textures/base/pack/server_incompatible.png
erlehmann, Warr1024, rollerozxa:
erle, Warr1024, rollerozxa:
textures/base/pack/no_screenshot.png
kilbith:
@ -79,7 +87,6 @@ kilbith:
textures/base/pack/progress_bar_bg.png
SmallJoker:
textures/base/pack/cdb_clear.png
textures/base/pack/server_favorite_delete.png (based on server_favorite.png)
DS:
@ -91,12 +98,17 @@ DS:
grorp:
textures/base/pack/exit_btn.png
textures/base/pack/menu_header.png
using the font "undefined medium" (https://undefined-medium.com/),
which is licensed under the SIL Open Font License, Version 1.1
modified by DS
License of Minetest source code
License of Luanti source code
-------------------------------
Minetest
Copyright (C) 2010-2018 celeron55, Perttu Ahola <celeron55@gmail.com>
Luanti
Copyright (C) 2010-2024 celeron55, Perttu Ahola <celeron55@gmail.com>
and contributors (see source file comments and the version control log)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -115,7 +127,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
Irrlicht
---------------
This program uses IrrlichtMt, Minetest's fork of
This program uses IrrlichtMt, Luanti's fork of
the Irrlicht Engine. http://irrlicht.sourceforge.net/
The Irrlicht Engine License

View file

@ -1,13 +1,15 @@
Minetest
========
<div align="center">
<img src="textures/base/pack/logo.png" width="32%">
<h1>Luanti (formerly Minetest)</h1>
<img src="https://github.com/luanti-org/luanti/workflows/build/badge.svg" alt="Build Status">
<a href="https://hosted.weblate.org/engage/minetest/?utm_source=widget"><img src="https://hosted.weblate.org/widgets/minetest/-/svg-badge.svg" alt="Translation status"></a>
<a href="https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html"><img src="https://img.shields.io/badge/license-LGPLv2.1%2B-blue.svg" alt="License"></a>
</div>
<br><br>
![Build Status](https://github.com/minetest/minetest/workflows/build/badge.svg)
[![Translation status](https://hosted.weblate.org/widgets/minetest/-/svg-badge.svg)](https://hosted.weblate.org/engage/minetest/?utm_source=widget)
[![License](https://img.shields.io/badge/license-LGPLv2.1%2B-blue.svg)](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html)
Luanti is a free open-source voxel game engine with easy modding and game creation.
Minetest is a free open-source voxel game engine with easy modding and game creation.
Copyright (C) 2010-2022 Perttu Ahola <celeron55@gmail.com>
Copyright (C) 2010-2025 Perttu Ahola <celeron55@gmail.com>
and contributors (see source file comments and the version control log)
Table of Contents
@ -25,10 +27,10 @@ Table of Contents
Further documentation
----------------------
- Website: https://www.minetest.net/
- Wiki: https://wiki.minetest.net/
- Forum: https://forum.minetest.net/
- GitHub: https://github.com/minetest/minetest/
- Website: https://www.luanti.org/
- Wiki: https://wiki.luanti.org/
- Forum: https://forum.luanti.org/
- GitHub: https://github.com/luanti-org/luanti/
- [Developer documentation](doc/developing/)
- [doc/](doc/) directory of source distribution
@ -106,7 +108,7 @@ Configuration file
------------------
- Default location:
`user/minetest.conf`
- This file is created by closing Minetest for the first time.
- This file is created by closing Luanti for the first time.
- A specific file can be specified on the command line:
`--config <path-to-file>`
- A run-in-place build will look for the configuration file in
@ -119,6 +121,7 @@ Command-line options
Compiling
---------
- [Compiling - common information](doc/compiling/README.md)
- [Compiling on GNU/Linux](doc/compiling/linux.md)
- [Compiling on Windows](doc/compiling/windows.md)
- [Compiling on MacOS](doc/compiling/macos.md)

View file

@ -1,5 +1,4 @@
diff --git a/android/app/src/main/java/org/libsdl/app/SDLActivity.java b/android/app/src/main/java/org/libsdl/app/SDLActivity.java
index fd5a056e3..83e3cf657 100644
--- a/android/app/src/main/java/org/libsdl/app/SDLActivity.java
+++ b/android/app/src/main/java/org/libsdl/app/SDLActivity.java
@@ -1345,7 +1345,12 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
@ -9,7 +8,7 @@ index fd5a056e3..83e3cf657 100644
- if ((source & InputDevice.SOURCE_MOUSE) == InputDevice.SOURCE_MOUSE) {
+ if ((source & InputDevice.SOURCE_MOUSE) == InputDevice.SOURCE_MOUSE ||
+ /*
+ * CUSTOM ADDITION FOR MINETEST
+ * CUSTOM ADDITION FOR LUANTI
+ * should be upstreamed
+ */
+ (source & InputDevice.SOURCE_MOUSE_RELATIVE) == InputDevice.SOURCE_MOUSE_RELATIVE) {

View file

@ -8,7 +8,7 @@ android {
compileSdk 34
targetSdkVersion 34
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
versionCode project.versionCode
versionCode versionMajor * 1000000 + versionMinor * 10000 + versionPatch * 100 + versionBuild
}
buildFeatures {
@ -95,7 +95,7 @@ task prepareAssets() {
def moPath = "${assetsFolder}/locale/${poFile.parentFile.name}/LC_MESSAGES/"
file(moPath).mkdirs()
exec {
commandLine 'msgfmt', '-o', "${moPath}/minetest.mo", poFile
commandLine 'msgfmt', '-o', "${moPath}/luanti.mo", poFile
}
}
@ -103,7 +103,7 @@ task prepareAssets() {
}
task zipAssets(dependsOn: prepareAssets, type: Zip) {
archiveFileName = "Minetest.zip"
archiveFileName = "assets.zip"
from assetsFolder
destinationDirectory = file("src/main/assets")
}
@ -113,19 +113,7 @@ preBuild.dependsOn zipAssets
prepareAssets.dependsOn ':native:getDeps'
clean {
delete new File("src/main/assets", "Minetest.zip")
}
// Map for the version code that gives each ABI a value.
import com.android.build.OutputFile
def abiCodes = ['armeabi-v7a': 0, 'arm64-v8a': 1]
android.applicationVariants.all { variant ->
variant.outputs.each {
output ->
def abiName = output.getFilter(OutputFile.ABI)
output.versionCodeOverride = abiCodes.get(abiName, 0) + variant.versionCode
}
delete new File("src/main/assets", "assets.zip")
}
dependencies {

View file

@ -43,9 +43,6 @@
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
<meta-data
android:name="android.app.lib_name"
android:value="minetest" />
</activity>
<service

View file

@ -52,7 +52,7 @@ import java.util.Objects;
public class GameActivity extends SDLActivity {
@Override
protected String getMainSharedObject() {
return getContext().getApplicationInfo().nativeLibraryDir + "/libminetest.so";
return getContext().getApplicationInfo().nativeLibraryDir + "/libluanti.so";
}
@Override
@ -63,7 +63,7 @@ public class GameActivity extends SDLActivity {
@Override
protected String[] getLibraries() {
return new String[] {
"minetest"
"luanti"
};
}

View file

@ -73,7 +73,7 @@ public class UnzipService extends IntentService {
@Override
protected void onHandleIntent(Intent intent) {
Notification.Builder notificationBuilder = createNotification();
final File zipFile = new File(getCacheDir(), "Minetest.zip");
final File zipFile = new File(getCacheDir(), "assets.zip");
try {
setIsRunning(true);
File userDataDirectory = Utils.getUserDataDirectory(this);

View file

@ -277,6 +277,7 @@ public class HIDDeviceManager {
0x044f, // Thrustmaster
0x045e, // Microsoft
0x0738, // Mad Catz
0x0b05, // ASUS
0x0e6f, // PDP
0x0f0d, // Hori
0x10f5, // Turtle Beach
@ -590,7 +591,13 @@ public class HIDDeviceManager {
} else {
flags = 0;
}
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), flags));
if (Build.VERSION.SDK_INT >= 33 /* Android 14.0 (U) */) {
Intent intent = new Intent(HIDDeviceManager.ACTION_USB_PERMISSION);
intent.setPackage(mContext.getPackageName());
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, intent, flags));
} else {
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), flags));
}
} catch (Exception e) {
Log.v(TAG, "Couldn't request permission for USB device " + usbDevice);
HIDDeviceOpenResult(deviceID, false);

View file

@ -38,6 +38,10 @@ public class SDL {
}
public static void loadLibrary(String libraryName) throws UnsatisfiedLinkError, SecurityException, NullPointerException {
loadLibrary(libraryName, mContext);
}
public static void loadLibrary(String libraryName, Context context) throws UnsatisfiedLinkError, SecurityException, NullPointerException {
if (libraryName == null) {
throw new NullPointerException("No library name provided.");
@ -53,10 +57,10 @@ public class SDL {
// To use ReLinker, just add it as a dependency. For more information, see
// https://github.com/KeepSafe/ReLinker for ReLinker's repository.
//
Class<?> relinkClass = mContext.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker");
Class<?> relinkListenerClass = mContext.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker$LoadListener");
Class<?> contextClass = mContext.getClassLoader().loadClass("android.content.Context");
Class<?> stringClass = mContext.getClassLoader().loadClass("java.lang.String");
Class<?> relinkClass = context.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker");
Class<?> relinkListenerClass = context.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker$LoadListener");
Class<?> contextClass = context.getClassLoader().loadClass("android.content.Context");
Class<?> stringClass = context.getClassLoader().loadClass("java.lang.String");
// Get a 'force' instance of the ReLinker, so we can ensure libraries are reinstalled if
// they've changed during updates.
@ -66,7 +70,7 @@ public class SDL {
// Actually load the library!
Method loadMethod = relinkInstanceClass.getDeclaredMethod("loadLibrary", contextClass, stringClass, stringClass, relinkListenerClass);
loadMethod.invoke(relinkInstance, mContext, libraryName, null, null);
loadMethod.invoke(relinkInstance, context, libraryName, null, null);
}
catch (final Throwable e) {
// Fall back

View file

@ -60,8 +60,8 @@ import java.util.Locale;
public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener {
private static final String TAG = "SDL";
private static final int SDL_MAJOR_VERSION = 2;
private static final int SDL_MINOR_VERSION = 30;
private static final int SDL_MICRO_VERSION = 1;
private static final int SDL_MINOR_VERSION = 32;
private static final int SDL_MICRO_VERSION = 0;
/*
// Display InputType.SOURCE/CLASS of events and devices
//
@ -89,7 +89,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
| InputDevice.SOURCE_CLASS_POSITION
| InputDevice.SOURCE_CLASS_TRACKBALL);
if (s2 != 0) cls += "Some_Unkown";
if (s2 != 0) cls += "Some_Unknown";
s2 = s_copy & InputDevice.SOURCE_ANY; // keep source only, no class;
@ -163,7 +163,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
if (s == FLAG_TAINTED) src += " FLAG_TAINTED";
s2 &= ~FLAG_TAINTED;
if (s2 != 0) src += " Some_Unkown";
if (s2 != 0) src += " Some_Unknown";
Log.v(TAG, prefix + "int=" + s_copy + " CLASS={" + cls + " } source(s):" + src);
}
@ -281,7 +281,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
// Load the .so
public void loadLibraries() {
for (String lib : getLibraries()) {
SDL.loadLibrary(lib);
SDL.loadLibrary(lib, this);
}
}
@ -790,6 +790,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
SDLActivity.mFullscreenModeActive = false;
}
if (Build.VERSION.SDK_INT >= 28 /* Android 9 (Pie) */) {
window.getAttributes().layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
}
}
} else {
Log.e(TAG, "error handling message, getContext() returned no Activity");
@ -995,8 +998,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
/* No valid hint, nothing is explicitly allowed */
if (!is_portrait_allowed && !is_landscape_allowed) {
if (resizable) {
/* All orientations are allowed */
req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
/* All orientations are allowed, respecting user orientation lock setting */
req = ActivityInfo.SCREEN_ORIENTATION_FULL_USER;
} else {
/* Fixed window and nothing specified. Get orientation from w/h of created window */
req = (w > h ? ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE : ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);
@ -1005,8 +1008,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
/* At least one orientation is allowed */
if (resizable) {
if (is_portrait_allowed && is_landscape_allowed) {
/* hint allows both landscape and portrait, promote to full sensor */
req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
/* hint allows both landscape and portrait, promote to full user */
req = ActivityInfo.SCREEN_ORIENTATION_FULL_USER;
} else {
/* Use the only one allowed "orientation" */
req = (is_landscape_allowed ? orientation_landscape : orientation_portrait);
@ -1347,7 +1350,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
if ((source & InputDevice.SOURCE_MOUSE) == InputDevice.SOURCE_MOUSE ||
/*
* CUSTOM ADDITION FOR MINETEST
* CUSTOM ADDITION FOR LUANTI
* should be upstreamed
*/
(source & InputDevice.SOURCE_MOUSE_RELATIVE) == InputDevice.SOURCE_MOUSE_RELATIVE) {

View file

@ -546,13 +546,15 @@ class SDLHapticHandler {
if (haptic == null) {
InputDevice device = InputDevice.getDevice(deviceIds[i]);
Vibrator vib = device.getVibrator();
if (vib.hasVibrator()) {
haptic = new SDLHaptic();
haptic.device_id = deviceIds[i];
haptic.name = device.getName();
haptic.vib = vib;
mHaptics.add(haptic);
SDLControllerManager.nativeAddHaptic(haptic.device_id, haptic.name);
if (vib != null) {
if (vib.hasVibrator()) {
haptic = new SDLHaptic();
haptic.device_id = deviceIds[i];
haptic.name = device.getName();
haptic.vib = vib;
mHaptics.add(haptic);
SDLControllerManager.nativeAddHaptic(haptic.device_id, haptic.name);
}
}
}
}

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="label">Luanti</string>
<string name="loading">Lädt…</string>
<string name="unzip_notification_title">Luanti lädt</string>
<string name="unzip_notification_description">Weniger als 1 Minute…</string>
<string name="ime_dialog_done">Fertig</string>
<string name="no_web_browser">Kein Web-Browser gefunden</string>
<string name="notification_channel_name">Allgemeine Benachrichtigung</string>
<string name="notification_channel_description">Benachrichtigungen von Luanti</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="unzip_notification_description">Menos de 1 minuto…</string>
<string name="ime_dialog_done">Hecho</string>
<string name="no_web_browser">No se encontró ningún navegador web</string>
<string name="loading">Cargando…</string>
<string name="notification_channel_name">Notificación General</string>
<string name="label">Luanti</string>
<string name="notification_channel_description">Notificaciones de Luanti</string>
<string name="unzip_notification_title">Cargando Luanti</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="no_web_browser">No se encontró ningún navegador web</string>
<string name="loading">Cargando…</string>
<string name="notification_channel_description">Notificaciones de Luanti</string>
<string name="unzip_notification_description">Menos de 1 minuto…</string>
<string name="ime_dialog_done">Hecho</string>
<string name="label">Luanti</string>
<string name="unzip_notification_title">Cargando Luanti</string>
<string name="notification_channel_name">Notificación General</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="unzip_notification_description">کمتر از 1 دقیقه…</string>
<string name="loading">در حال بارگذاری…</string>
<string name="ime_dialog_done">انجام شد</string>
<string name="label">لوآنتی</string>
<string name="unzip_notification_title">در حال بارگذاری لوآنتی</string>
<string name="notification_channel_name">نوتیفیکیشن عمومی</string>
<string name="notification_channel_description">نوتیفیکیشن از لوآنتی</string>
<string name="no_web_browser">هیچ مرورگری یافت نشد</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="label">Luanti</string>
<string name="loading">Chargement…</string>
<string name="notification_channel_name">Notification générale</string>
<string name="notification_channel_description">Notifications de Luanti</string>
<string name="unzip_notification_title">Chargement de Luanti</string>
<string name="unzip_notification_description">Moins d\'une minute…</string>
<string name="ime_dialog_done">Terminé</string>
<string name="no_web_browser">Aucun navigateur web trouvé</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="label">Luanti</string>
<string name="loading">Cargando…</string>
<string name="notification_channel_name">Notificación xeral</string>
<string name="notification_channel_description">Notificacións de Luanti</string>
<string name="unzip_notification_title">Cargando Luanti</string>
<string name="unzip_notification_description">Menos de 1 minuto…</string>
<string name="ime_dialog_done">Feito</string>
<string name="no_web_browser">Non se atopou ningún navegador web</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="loading">Betöltés…</string>
<string name="notification_channel_name">Általános értesítés</string>
<string name="notification_channel_description">Értesítések a Luanti-től</string>
<string name="unzip_notification_title">Luanti betöltése…</string>
<string name="ime_dialog_done">Kész</string>
<string name="no_web_browser">Nem található webböngésző</string>
<string name="label">Luanti</string>
<string name="unzip_notification_description">Kevesebb, mint 1 perc…</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="no_web_browser">Tidak ditemukan peramban web</string>
<string name="ime_dialog_done">Selesai</string>
<string name="label">Luanti</string>
<string name="loading">Memuat…</string>
<string name="notification_channel_name">Pemberitahuan umum</string>
<string name="unzip_notification_description">Kurang dari 1 menit…</string>
<string name="notification_channel_description">Pemberitahuan dari Luanti</string>
<string name="unzip_notification_title">Memuat Luanti…</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="label">Luanti</string>
<string name="notification_channel_description">Pemberitahuan dari Luanti</string>
<string name="unzip_notification_title">Memuatkan Luanti…</string>
<string name="unzip_notification_description">Kurang dari 1 minit…</string>
<string name="no_web_browser">Tiada pelayar sesawang dijumpai</string>
<string name="loading">Memuatkan…</string>
<string name="notification_channel_name">Pemberitahuan umum</string>
<string name="ime_dialog_done">Selesai</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="label">Luanti</string>
<string name="loading">Laster inn …</string>
<string name="notification_channel_name">Generell merknad</string>
<string name="notification_channel_description">Merknader fra Luanti</string>
<string name="unzip_notification_description">Mindre enn ett minutt …</string>
<string name="ime_dialog_done">Ferdig</string>
<string name="no_web_browser">Fant ingen nettleser</string>
<string name="unzip_notification_title">Laster inn Luanti …</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="unzip_notification_title">Загрузка Luanti</string>
<string name="unzip_notification_description">Меньше чам за 1 минуту…</string>
<string name="ime_dialog_done">Готово</string>
<string name="label">Luаnti</string>
<string name="notification_channel_description">Уведомления от Luanti</string>
<string name="notification_channel_name">Основные уведомления</string>
<string name="loading">Загрузка…</string>
<string name="no_web_browser">Не найдено веб-браузера</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="label">Luanti</string>
<string name="loading">Laddar…</string>
<string name="unzip_notification_description">Mindre än 1 minut…</string>
<string name="ime_dialog_done">Färdig</string>
<string name="no_web_browser">Ingen webbläsare kunde hittas</string>
<string name="notification_channel_name">Generell notis</string>
<string name="notification_channel_description">Notiser från Luanti</string>
<string name="unzip_notification_title">Laddar Luanti</string>
</resources>

View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<resources></resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="label">Luanti</string>
<string name="no_web_browser">Браузерів не знайдено</string>
<string name="loading">Завантаження…</string>
<string name="notification_channel_name">Загальні сповіщення</string>
<string name="unzip_notification_title">Luanti завантажується</string>
<string name="unzip_notification_description">Менше за 1 хвилину…</string>
<string name="ime_dialog_done">Готово</string>
<string name="notification_channel_description">Сповіщення від Luanti</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="label">Luanti</string>
<string name="loading">加载中…</string>
<string name="notification_channel_name">一般通知</string>
<string name="notification_channel_description">Luanti 的通知</string>
<string name="unzip_notification_title">加载 Luanti 中</string>
<string name="unzip_notification_description">不到1分钟…</string>
<string name="ime_dialog_done">完成</string>
<string name="no_web_browser">未找到网页浏览器</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="loading">載入中…</string>
<string name="notification_channel_name">一般通知</string>
<string name="notification_channel_description">Luanti 的通知</string>
<string name="unzip_notification_description">不到1分鐘…</string>
<string name="ime_dialog_done">完畢</string>
<string name="no_web_browser">未找到任何網頁瀏覽器</string>
<string name="label">Luanti</string>
<string name="unzip_notification_title">載入Luanti中</string>
</resources>

View file

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="label">Minetest</string>
<string name="label">Luanti</string>
<string name="loading">Loading&#8230;</string>
<string name="notification_channel_name">General notification</string>
<string name="notification_channel_description">Notifications from Minetest</string>
<string name="unzip_notification_title">Loading Minetest</string>
<string name="notification_channel_description">Notifications from Luanti</string>
<string name="unzip_notification_title">Loading Luanti</string>
<string name="unzip_notification_description">Less than 1 minute&#8230;</string>
<string name="ime_dialog_done">Done</string>
<string name="no_web_browser">No web browser found</string>

View file

@ -1,16 +1,15 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
project.ext.set("versionMajor", 5) // Version Major
project.ext.set("versionMinor", 9) // Version Minor
project.ext.set("versionMinor", 12) // Version Minor
project.ext.set("versionPatch", 0) // Version Patch
// ^ keep in sync with cmake
project.ext.set("versionCode", 48) // Android Version Code
// NOTE: +2 after each release!
// +1 for ARM and +1 for ARM64 APK's, because
// each APK must have a larger `versionCode` than the previous
project.ext.set("versionBuild", 0) // Version Build
// ^ fourth version number to allow releasing Android-only fixes and beta versions
buildscript {
ext.ndk_version = '26.2.11394342'
ext.ndk_version = '27.2.12479018'
repositories {
google()
mavenCentral()

View file

@ -1,194 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="512"
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="gear_icon.svg"
inkscape:export-filename="/home/stu/Desktop/icons/png/gear_icon.png"
inkscape:export-xdpi="24"
inkscape:export-ydpi="24">
<defs
id="defs2">
<marker
style="overflow:visible"
refY="0.0"
refX="0.0"
orient="auto"
id="DistanceX">
<path
id="path4687"
style="stroke:#000000; stroke-width:0.5"
d="M 3,-3 L -3,3 M 0,-5 L 0,5" />
</marker>
<pattern
y="0"
x="0"
width="8"
patternUnits="userSpaceOnUse"
id="Hatch"
height="8">
<path
id="path4690"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M8 4 l-4,4" />
<path
id="path4692"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M6 2 l-4,4" />
<path
id="path4694"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M4 0 l-4,4" />
</pattern>
<marker
style="overflow:visible"
refY="0.0"
refX="0.0"
orient="auto"
id="DistanceX-3">
<path
id="path4756"
style="stroke:#000000; stroke-width:0.5"
d="M 3,-3 L -3,3 M 0,-5 L 0,5" />
</marker>
<pattern
y="0"
x="0"
width="8"
patternUnits="userSpaceOnUse"
id="Hatch-6"
height="8">
<path
id="path4759"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M8 4 l-4,4" />
<path
id="path4761"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M6 2 l-4,4" />
<path
id="path4763"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M4 0 l-4,4" />
</pattern>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#404040"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.5"
inkscape:cx="-308.644"
inkscape:cy="171.10144"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-x="0"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false"
inkscape:snap-page="true"
inkscape:snap-grids="true"
inkscape:snap-bbox="true"
inkscape:snap-bbox-midpoints="false"
inkscape:snap-object-midpoints="true"
inkscape:snap-to-guides="false"
inkscape:showpageshadow="false"
inkscape:snap-smooth-nodes="true"
inkscape:object-nodes="false">
<inkscape:grid
type="xygrid"
id="grid16"
spacingx="2.1166666"
spacingy="2.1166666"
empspacing="2"
color="#40ff40"
opacity="0.1254902"
empcolor="#40ff40"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-161.53332)">
<g
id="g4792"
transform="matrix(0.68725287,0,0,0.65623884,67.477909,-509.24679)"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:0.74041259;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1">
<g
id="g4772"
inkscape:label="OpenJsCad"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:0.74041259;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1">
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 256,80.943359 -8.28125,0.72461 -3.63477,5.410156 -5.61328,12.685547 -2.28906,9.259768 -0.35156,5.1875 0.0937,0.86133 0.70703,2.44726 0.60547,9.80664 -2.66602,5.47461 -21.5957,5.78711 -5.04492,-3.40625 -4.37696,-8.79687 -0.61132,-2.47071 -0.35157,-0.79297 -2.89648,-4.31836 -6.60938,-6.87304 -11.20507,-8.17969 -5.84961,-2.86719 -7.53516,3.51367 -6.80859,4.76954 -0.44336,6.50195 1.48047,13.79297 2.64453,9.16406 2.28906,4.66992 0.51172,0.69922 1.83398,1.76563 5.42774,8.18945 0.42773,6.07422 -15.81054,15.81445 -6.07032,-0.42773 -8.18945,-5.42969 -1.76367,-1.83399 -0.69922,-0.51171 -4.66992,-2.28907 -9.15821,-2.64843 -13.79297,-1.47852 -6.5,0.44141 -4.76757,6.8125 -3.51367,7.53515 2.86914,5.85157 8.17382,11.20703 6.87305,6.61132 4.31641,2.90039 0.79297,0.34961 2.4707,0.61133 8.79492,4.37696 3.4043,5.04687 -5.78516,21.60156 -5.47265,2.66602 -9.80469,-0.60547 -2.44727,-0.70703 -0.85937,-0.0918 -5.1875,0.35156 -9.257816,2.28907 -12.68164,5.61523 -5.408203,3.63281 -0.72461,8.28516 0.72461,8.28516 5.408203,3.63281 12.68164,5.61523 9.257816,2.28907 5.1875,0.35156 0.85937,-0.0918 2.44727,-0.70703 9.80469,-0.60547 5.47265,2.66602 5.78516,21.60156 -3.4043,5.04687 -8.79492,4.37696 -2.4707,0.61133 -0.79297,0.34961 -4.31641,2.90039 -6.87305,6.61132 -8.17382,11.20703 -2.86914,5.85157 3.51367,7.53515 4.76757,6.8125 6.5,0.44141 13.79297,-1.47852 9.15821,-2.64843 4.66992,-2.28907 0.69922,-0.50976 1.76367,-1.83594 8.18945,-5.42969 6.07032,-0.42773 15.81054,15.81445 -0.42773,6.07422 -5.42774,8.18945 -1.83398,1.76563 -0.51172,0.69922 -2.28906,4.66992 -2.64453,9.16406 -1.48047,13.79297 0.44336,6.50195 6.80859,4.76758 7.53516,3.51758 5.84961,-2.86914 11.20507,-8.17969 6.60938,-6.87304 2.89648,-4.31836 0.35157,-0.79297 0.61132,-2.47071 4.37696,-8.79687 5.04492,-3.40625 21.5957,5.78711 2.66602,5.47461 -0.60547,9.80664 -0.70703,2.44726 -0.0937,0.85938 0.35156,5.18945 2.28906,9.25977 5.61328,12.68555 3.63477,5.41015 8.28125,0.72461 8.28125,-0.72461 3.63477,-5.41015 5.61328,-12.68555 2.28906,-9.25977 0.35156,-5.18945 -0.0937,-0.85938 -0.70703,-2.44726 -0.60547,-9.80664 2.66602,-5.47461 21.5957,-5.78711 5.04492,3.40625 4.37696,8.79687 0.61132,2.47071 0.35157,0.79297 2.89648,4.31836 6.60938,6.87304 11.20507,8.17969 5.84961,2.86914 7.53516,-3.51758 6.80859,-4.76758 0.44336,-6.50195 -1.48047,-13.79297 -2.64453,-9.16406 -2.28906,-4.66992 -0.51172,-0.69922 -1.83398,-1.76563 -5.42774,-8.18945 -0.42773,-6.07422 15.81054,-15.81445 6.07032,0.42773 8.18945,5.42969 1.76367,1.83594 0.69922,0.50976 4.66992,2.28907 9.15821,2.64843 13.79297,1.47852 6.5,-0.44141 v -0.002 l 4.76757,-6.81055 3.51367,-7.53711 -2.86914,-5.85156 -8.17382,-11.20508 -6.87305,-6.61328 -4.31641,-2.89843 -0.79297,-0.34961 -2.4707,-0.61133 -8.79492,-4.37891 -3.4043,-5.04492 5.78516,-21.60352 5.47265,-2.66797 9.80469,0.60938 2.44727,0.70703 0.85937,0.0918 5.1875,-0.35156 9.25782,-2.28907 12.68164,-5.61718 5.4082,-3.63282 0.72461,-8.28515 -0.72461,-8.28321 -5.4082,-3.63476 -12.68164,-5.61524 -9.25782,-2.28711 -5.1875,-0.35351 -0.85937,0.0937 -2.44727,0.70508 -9.80469,0.60937 -5.47265,-2.66797 -5.78516,-21.59961 3.4043,-5.04882 8.79492,-4.37696 2.4707,-0.61133 0.79297,-0.35156 4.31641,-2.89844 6.87305,-6.61132 8.17382,-11.20703 2.86914,-5.85157 -3.51367,-7.53711 -4.76757,-6.81054 -6.5,-0.44336 -13.79297,1.48047 -9.15821,2.64648 -4.66992,2.28906 -0.69922,0.51172 -1.76367,1.83594 -8.18945,5.42773 -6.07032,0.42774 -15.81054,-15.81446 0.42773,-6.07226 5.42774,-8.18945 1.83398,-1.76563 0.51172,-0.69922 2.28906,-4.67187 2.64453,-9.16016 1.48047,-13.79492 -0.44336,-6.50195 -6.80859,-4.76954 -7.53516,-3.51562 -5.84961,2.87109 -11.20507,8.17578 -6.60938,6.875 -2.89648,4.31836 -0.35157,0.79102 -0.61132,2.47266 -4.37696,8.79687 -5.04492,3.4082 -21.5957,-5.79101 -2.66602,-5.47266 0.60547,-9.80664 0.70703,-2.44726 0.0937,-0.85938 -0.35156,-5.19141 -2.28906,-9.259761 -5.61328,-12.683594 -3.63477,-5.412109 z m 0,97.111331 A 77.946197,77.946197 0 0 1 333.94531,256 77.946197,77.946197 0 0 1 256,333.94531 77.946197,77.946197 0 0 1 178.05469,256 77.946197,77.946197 0 0 1 256,178.05469 Z"
transform="matrix(0.38495268,0,0,0.40318156,-98.176247,1022.1341)"
id="path4768"
inkscape:connector-curvature="0" />
</g>
<g
id="g4774"
inkscape:label="0"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:0.74041259;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 9.7 KiB

View file

@ -2,23 +2,23 @@
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="256"
width="512"
height="512"
viewBox="0 0 67.73333 135.46667"
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="rare_controls.svg"
inkscape:export-filename="/home/stu/Desktop/icons/png/rare_controls.png"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
sodipodi:docname="overflow_btn.svg"
inkscape:export-filename="../../textures/base/pack/overflow_btn.png"
inkscape:export-xdpi="24.000002"
inkscape:export-ydpi="24.000002">
inkscape:export-ydpi="24.000002"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs
id="defs2">
<filter
@ -397,22 +397,24 @@
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.7"
inkscape:cx="-59.862018"
inkscape:cy="260.34663"
inkscape:zoom="0.98994949"
inkscape:cx="41.921331"
inkscape:cy="163.13964"
inkscape:document-units="mm"
inkscape:current-layer="layer2"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-height="1011"
inkscape:window-x="0"
inkscape:window-y="34"
inkscape:window-y="32"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false"
inkscape:snap-grids="true"
inkscape:snap-page="true"
showguides="false">
showguides="false"
inkscape:showpageshadow="2"
inkscape:deskcolor="#d1d1d1">
<inkscape:grid
type="xygrid"
id="grid16"
@ -422,7 +424,11 @@
color="#40ff40"
opacity="0.1254902"
empcolor="#40ff40"
empopacity="0.25098039" />
empopacity="0.25098039"
originx="0"
originy="0"
units="px"
visible="true" />
</sodipodi:namedview>
<metadata
id="metadata5">
@ -432,7 +438,6 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
@ -496,26 +501,27 @@
x="264.65997"
y="124.10143"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1" /></flowRegion><flowPara
id="flowPara4724" /></flowRoot> <rect
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5231-9"
width="25.4"
height="25.400003"
x="21.166666"
y="101.6" />
id="flowPara4724" /></flowRoot>
<rect
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5231-9-7"
width="25.4"
height="25.400003"
x="21.166666"
y="55.033333" />
<rect
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:5.38756;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5231-9-5"
width="25.4"
height="25.400003"
x="21.166664"
y="8.4666681" />
width="96.212502"
height="0.61243516"
x="19.62678"
y="33.575779" />
<rect
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:5.38755;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5231-9-5-7"
width="96.212448"
height="0.6124543"
x="19.627108"
y="67.442772" />
<rect
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:5.38755;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5231-9-5-7-5"
width="96.212448"
height="0.6124543"
x="19.627108"
y="101.30978" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -52,7 +52,7 @@ if (new File(depsDir, 'armeabi-v7a').exists()) {
task downloadDeps(type: Download) {
def depsZip = new File(buildDir, 'deps.zip')
src 'https://github.com/minetest/minetest_android_deps/releases/download/latest/deps-lite.zip'
src 'https://github.com/luanti-org/luanti_android_deps/releases/download/latest/deps-lite.zip'
dest depsZip
overwrite false

View file

@ -1,2 +1,2 @@
rootProject.name = "Minetest"
rootProject.name = "Luanti"
include ':app', ':native'

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/client/chatcommands.lua
core.register_on_sending_chat_message(function(message)
if message:sub(1,2) == ".." then
return false

View file

@ -1,15 +0,0 @@
-- CSM death formspec. Only used when clientside modding is enabled, otherwise
-- handled by the engine.
core.register_on_death(function()
local formspec = "size[11,5.5]bgcolor[#320000b4;true]" ..
"label[4.85,1.35;" .. fgettext("You died") ..
"]button_exit[4,3;3,0.5;btn_respawn;".. fgettext("Respawn") .."]"
core.show_formspec("bultin:death", formspec)
end)
core.register_on_formspec_input(function(formname, fields)
if formname == "bultin:death" then
core.send_respawn()
end
end)

View file

@ -1,14 +1,15 @@
-- Minetest: builtin/client/init.lua
local scriptpath = core.get_builtin_path()
local clientpath = scriptpath.."client"..DIR_DELIM
local commonpath = scriptpath.."common"..DIR_DELIM
dofile(clientpath .. "register.lua")
local builtin_shared = {}
assert(loadfile(commonpath .. "register.lua"))(builtin_shared)
assert(loadfile(clientpath .. "register.lua"))(builtin_shared)
dofile(commonpath .. "after.lua")
dofile(commonpath .. "mod_storage.lua")
dofile(commonpath .. "chatcommands.lua")
dofile(commonpath .. "information_formspecs.lua")
dofile(clientpath .. "chatcommands.lua")
dofile(clientpath .. "death_formspec.lua")
dofile(clientpath .. "misc.lua")
assert(loadfile(commonpath .. "item_s.lua"))({}) -- Just for push/read node functions

View file

@ -1,68 +1,6 @@
core.callback_origins = {}
local builtin_shared = ...
local getinfo = debug.getinfo
debug.getinfo = nil
--- Runs given callbacks.
--
-- Note: this function is also called from C++
-- @tparam table callbacks a table with registered callbacks, like `core.registered_on_*`
-- @tparam number mode a RunCallbacksMode, as defined in src/script/common/c_internal.h
-- @param ... arguments for the callback
-- @return depends on mode
function core.run_callbacks(callbacks, mode, ...)
assert(type(callbacks) == "table")
local cb_len = #callbacks
if cb_len == 0 then
if mode == 2 or mode == 3 then
return true
elseif mode == 4 or mode == 5 then
return false
end
end
local ret
for i = 1, cb_len do
local cb_ret = callbacks[i](...)
if mode == 0 and i == 1 or mode == 1 and i == cb_len then
ret = cb_ret
elseif mode == 2 then
if not cb_ret or i == 1 then
ret = cb_ret
end
elseif mode == 3 then
if cb_ret then
return cb_ret
end
ret = cb_ret
elseif mode == 4 then
if (cb_ret and not ret) or i == 1 then
ret = cb_ret
end
elseif mode == 5 and cb_ret then
return cb_ret
end
end
return ret
end
--
-- Callback registration
--
local function make_registration()
local t = {}
local registerfunc = function(func)
t[#t + 1] = func
core.callback_origins[func] = {
mod = core.get_current_modname() or "??",
name = getinfo(1, "n").name or "??"
}
--local origin = core.callback_origins[func]
--print(origin.name .. ": " .. origin.mod .. " registering cbk " .. tostring(func))
end
return t, registerfunc
end
local make_registration = builtin_shared.make_registration
core.registered_globalsteps, core.register_globalstep = make_registration()
core.registered_on_mods_loaded, core.register_on_mods_loaded = make_registration()

View file

@ -155,7 +155,7 @@ end
function core.after(after, func, ...)
assert(tonumber(after) and not core.is_nan(after) and type(func) == "function",
"Invalid minetest.after invocation")
"Invalid core.after invocation")
local new_job = {
mod_origin = core.get_last_run_mod(),

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/common/chatcommands.lua
-- For server-side translations (if INIT == "game")
-- Otherwise, use core.gettext
local S = core.get_translator("__builtin")

View file

@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2013 sapier
--
--This program is free software; you can redistribute it and/or modify

View file

@ -69,7 +69,7 @@ local function build_chatcommands_formspec(name, sel, copy)
description = cmds[2].description
if copy then
local msg = S("Command: @1 @2",
core.colorize("#0FF", "/" .. cmds[1]), cmds[2].params)
core.colorize("#0FF", (INIT == "client" and "." or "/") .. cmds[1]), cmds[2].params)
if INIT == "client" then
core.display_chat_message(msg)
else

View file

@ -1,4 +1,3 @@
-- Minetest: builtin/item_s.lua
-- The distinction of what goes here is a bit tricky, basically it's everything
-- that does not (directly or indirectly) need access to ServerEnvironment,
-- Server or writable access to IGameDef on the engine side.
@ -91,7 +90,7 @@ local facedir_to_dir_map = {
1, 4, 3, 2,
}
function core.facedir_to_dir(facedir)
return facedir_to_dir[facedir_to_dir_map[facedir % 32]]
return vector.copy(facedir_to_dir[facedir_to_dir_map[facedir % 32]])
end
function core.dir_to_fourdir(dir)
@ -111,7 +110,7 @@ function core.dir_to_fourdir(dir)
end
function core.fourdir_to_dir(fourdir)
return facedir_to_dir[facedir_to_dir_map[fourdir % 4]]
return vector.copy(facedir_to_dir[facedir_to_dir_map[fourdir % 4]])
end
function core.dir_to_wallmounted(dir)
@ -148,7 +147,7 @@ local wallmounted_to_dir = {
vector.new( 0, -1, 0),
}
function core.wallmounted_to_dir(wallmounted)
return wallmounted_to_dir[wallmounted % 8]
return vector.copy(wallmounted_to_dir[wallmounted % 8])
end
function core.dir_to_yaw(dir)
@ -166,20 +165,19 @@ function core.is_colored_paramtype(ptype)
end
function core.strip_param2_color(param2, paramtype2)
if not core.is_colored_paramtype(paramtype2) then
if paramtype2 == "color" then
return param2
elseif paramtype2 == "colorfacedir" then
return math.floor(param2 / 32) * 32
elseif paramtype2 == "color4dir" then
return math.floor(param2 / 4) * 4
elseif paramtype2 == "colorwallmounted" then
return math.floor(param2 / 8) * 8
elseif paramtype2 == "colordegrotate" then
return math.floor(param2 / 32) * 32
else
return nil
end
if paramtype2 == "colorfacedir" then
param2 = math.floor(param2 / 32) * 32
elseif paramtype2 == "color4dir" then
param2 = math.floor(param2 / 4) * 4
elseif paramtype2 == "colorwallmounted" then
param2 = math.floor(param2 / 8) * 8
elseif paramtype2 == "colordegrotate" then
param2 = math.floor(param2 / 32) * 32
end
-- paramtype2 == "color" requires no modification.
return param2
end
-- Content ID caching

41
builtin/common/math.lua Normal file
View file

@ -0,0 +1,41 @@
--[[
Math utils.
--]]
function math.hypot(x, y)
return math.sqrt(x * x + y * y)
end
function math.sign(x, tolerance)
tolerance = tolerance or 0
if x > tolerance then
return 1
elseif x < -tolerance then
return -1
end
return 0
end
function math.factorial(x)
assert(x % 1 == 0 and x >= 0, "factorial expects a non-negative integer")
if x >= 171 then
-- 171! is greater than the biggest double, no need to calculate
return math.huge
end
local v = 1
for k = 2, x do
v = v * k
end
return v
end
function math.round(x)
if x < 0 then
local int = math.ceil(x)
local frac = x - int
return int - ((frac <= -0.5) and 1 or 0)
end
local int = math.floor(x)
local frac = x - int
return int + ((frac >= 0.5) and 1 or 0)
end

View file

@ -11,8 +11,8 @@ end
core.known_metatables = known_metatables
function core.register_async_metatable(...)
core.log("deprecated", "minetest.register_async_metatable is deprecated. " ..
"Use minetest.register_portable_metatable instead.")
core.log("deprecated", "core.register_async_metatable is deprecated. " ..
"Use core.register_portable_metatable instead.")
return core.register_portable_metatable(...)
end

View file

@ -1,8 +1,7 @@
-- Minetest: builtin/misc_helpers.lua
--------------------------------------------------------------------------------
-- Localize functions to avoid table lookups (better performance).
local string_sub, string_find = string.sub, string.find
local math = math
--------------------------------------------------------------------------------
local function basic_dump(o)
@ -205,52 +204,21 @@ function table.indexof(list, val)
return -1
end
--------------------------------------------------------------------------------
function table.keyof(tb, val)
for k, v in pairs(tb) do
if v == val then
return k
end
end
return nil
end
--------------------------------------------------------------------------------
function string:trim()
return self:match("^%s*(.-)%s*$")
end
--------------------------------------------------------------------------------
function math.hypot(x, y)
return math.sqrt(x * x + y * y)
end
--------------------------------------------------------------------------------
function math.sign(x, tolerance)
tolerance = tolerance or 0
if x > tolerance then
return 1
elseif x < -tolerance then
return -1
end
return 0
end
--------------------------------------------------------------------------------
function math.factorial(x)
assert(x % 1 == 0 and x >= 0, "factorial expects a non-negative integer")
if x >= 171 then
-- 171! is greater than the biggest double, no need to calculate
return math.huge
end
local v = 1
for k = 2, x do
v = v * k
end
return v
end
function math.round(x)
if x < 0 then
local int = math.ceil(x)
local frac = x - int
return int - ((frac <= -0.5) and 1 or 0)
end
local int = math.floor(x)
local frac = x - int
return int + ((frac >= 0.5) and 1 or 0)
end
local formspec_escapes = {
["\\"] = "\\\\",
["["] = "\\[",
@ -265,6 +233,16 @@ function core.formspec_escape(text)
end
local hypertext_escapes = {
["\\"] = "\\\\",
["<"] = "\\<",
[">"] = "\\>",
}
function core.hypertext_escape(text)
return text and text:gsub("[\\<>]", hypertext_escapes)
end
function core.wrap_text(text, max_length, as_table)
local result = {}
local line = {}
@ -594,12 +572,14 @@ function core.strip_colors(str)
return (str:gsub(ESCAPE_CHAR .. "%([bc]@[^)]+%)", ""))
end
function core.translate(textdomain, str, ...)
local function translate(textdomain, str, num, ...)
local start_seq
if textdomain == "" then
if textdomain == "" and num == "" then
start_seq = ESCAPE_CHAR .. "T"
else
elseif num == "" then
start_seq = ESCAPE_CHAR .. "(T@" .. textdomain .. ")"
else
start_seq = ESCAPE_CHAR .. "(T@" .. textdomain .. "@" .. num .. ")"
end
local arg = {n=select('#', ...), ...}
local end_seq = ESCAPE_CHAR .. "E"
@ -630,8 +610,31 @@ function core.translate(textdomain, str, ...)
return start_seq .. translated .. end_seq
end
function core.translate(textdomain, str, ...)
return translate(textdomain, str, "", ...)
end
function core.translate_n(textdomain, str, str_plural, n, ...)
assert (type(n) == "number")
assert (n >= 0)
assert (math.floor(n) == n)
-- Truncate n if too large
local max = 1000000
if n >= 2 * max then
n = n % max + max
end
if n == 1 then
return translate(textdomain, str, "1", ...)
else
return translate(textdomain, str_plural, tostring(n), ...)
end
end
function core.get_translator(textdomain)
return function(str, ...) return core.translate(textdomain or "", str, ...) end
return
(function(str, ...) return core.translate(textdomain or "", str, ...) end),
(function(str, str_plural, n, ...) return core.translate_n(textdomain or "", str, str_plural, n, ...) end)
end
--------------------------------------------------------------------------------
@ -692,6 +695,7 @@ function core.privs_to_string(privs, delim)
list[#list + 1] = priv
end
end
table.sort(list)
return table.concat(list, delim)
end

View file

@ -54,7 +54,8 @@ function builtin_shared.make_registration()
local registerfunc = function(func)
t[#t + 1] = func
core.callback_origins[func] = {
mod = core.get_current_modname() or "??",
-- may be nil or return nil
mod = core.get_current_modname and core.get_current_modname() or "??",
name = debug.getinfo(1, "n").name or "??"
}
end
@ -66,7 +67,8 @@ function builtin_shared.make_registration_reverse()
local registerfunc = function(func)
table.insert(t, 1, func)
core.callback_origins[func] = {
mod = core.get_current_modname() or "??",
-- may be nil or return nil
mod = core.get_current_modname and core.get_current_modname() or "??",
name = debug.getinfo(1, "n").name or "??"
}
end

View file

@ -204,18 +204,18 @@ local function dummy_func() end
function core.deserialize(str, safe)
-- Backwards compatibility
if str == nil then
core.log("deprecated", "minetest.deserialize called with nil (expected string).")
core.log("deprecated", "core.deserialize called with nil (expected string).")
return nil, "Invalid type: Expected a string, got nil"
end
local t = type(str)
if t ~= "string" then
error(("minetest.deserialize called with %s (expected string)."):format(t))
error(("core.deserialize called with %s (expected string)."):format(t))
end
local func, err = loadstring(str)
if not func then return nil, err end
-- math.huge was serialized to inf and NaNs to nan by Lua in Minetest 5.6, so we have to support this here
-- math.huge was serialized to inf and NaNs to nan by Lua in engine version 5.6, so we have to support this here
local env = {inf = math_huge, nan = 0/0}
if safe then
env.loadstring = dummy_func

View file

@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2022 rubenwardy
--
--This program is free software; you can redistribute it and/or modify
@ -67,6 +67,19 @@ function make.heading(text)
end
function make.note(text)
return {
full_width = true,
get_formspec = function(self, avail_w)
-- Assuming label height 0.4:
-- Position at y=0 to eat 0.2 of the padding above, leave 0.05.
-- The returned used_height doesn't include padding.
return ("label[0,0;%s]"):format(core.colorize("#bbb", core.formspec_escape(text))), 0.2
end,
}
end
--- Used for string and numeric style fields
---
--- @param converter Function to coerce values from strings.
@ -85,6 +98,7 @@ local function make_field(converter, validator, stringifier)
local fs = ("field[0,0.3;%f,0.8;%s;%s;%s]"):format(
avail_w - 1.5, setting.name, get_label(setting), core.formspec_escape(value))
fs = fs .. ("field_enter_after_edit[%s;true]"):format(setting.name)
fs = fs .. ("field_close_on_enter[%s;false]"):format(setting.name) -- for pause menu env
fs = fs .. ("button[%f,0.3;1.5,0.8;%s;%s]"):format(avail_w - 1.5, "set_" .. setting.name, fgettext("Set"))
return fs, 1.1
@ -204,6 +218,8 @@ local function make_path(setting)
local fs = ("field[0,0.3;%f,0.8;%s;%s;%s]"):format(
avail_w - 3, setting.name, get_label(setting), core.formspec_escape(value))
fs = fs .. ("field_enter_after_edit[%s;true]"):format(setting.name)
fs = fs .. ("field_close_on_enter[%s;false]"):format(setting.name) -- for pause menu env
fs = fs .. ("button[%f,0.3;1.5,0.8;%s;%s]"):format(avail_w - 3, "pick_" .. setting.name, fgettext("Browse"))
fs = fs .. ("button[%f,0.3;1.5,0.8;%s;%s]"):format(avail_w - 1.5, "set_" .. setting.name, fgettext("Set"))
@ -236,8 +252,11 @@ local function make_path(setting)
}
end
if PLATFORM == "Android" then
if PLATFORM == "Android" or INIT == "pause_menu" then
-- The Irrlicht file picker doesn't work on Android.
-- Access to the Irrlicht file picker isn't implemented in the pause menu.
-- We want to delete the Irrlicht file picker anyway, so any time spent on
-- that would be wasted.
make.path = make.string
make.filepath = make.string
else
@ -269,6 +288,14 @@ function make.v3f(setting)
fs = fs .. ("field[%f,0.6;%f,0.8;%s;%s;%s]"):format(
2 * (field_width + 0.25), field_width, setting.name .. "_z", "Z", value.z)
fs = fs .. ("field_enter_after_edit[%s;true]"):format(setting.name .. "_x")
fs = fs .. ("field_enter_after_edit[%s;true]"):format(setting.name .. "_y")
fs = fs .. ("field_enter_after_edit[%s;true]"):format(setting.name .. "_z")
-- for pause menu env
fs = fs .. ("field_close_on_enter[%s;false]"):format(setting.name .. "_x")
fs = fs .. ("field_close_on_enter[%s;false]"):format(setting.name .. "_y")
fs = fs .. ("field_close_on_enter[%s;false]"):format(setting.name .. "_z")
fs = fs .. ("button[%f,0.6;1,0.8;%s;%s]"):format(avail_w, "set_" .. setting.name, fgettext("Set"))
return fs, 1.4
@ -415,8 +442,22 @@ local function make_noise_params(setting)
}
end
make.noise_params_2d = make_noise_params
make.noise_params_3d = make_noise_params
if INIT == "pause_menu" then
-- Making the noise parameter dialog work in the pause menu settings would
-- require porting "FSTK" (at least the dialog API) from the mainmenu formspec
-- API to the in-game formspec API.
-- There's no reason you'd want to adjust mapgen noise parameter settings
-- in-game (they only apply to new worlds), so there's no reason to implement
-- this.
local empty = function()
return { get_formspec = function() return "", 0 end }
end
make.noise_params_2d = empty
make.noise_params_3d = empty
else
make.noise_params_2d = make_noise_params
make.noise_params_3d = make_noise_params
end
return make

View file

@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2015 PilzAdam
--
--This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2022 rubenwardy
--
--This program is free software; you can redistribute it and/or modify
@ -16,11 +16,10 @@
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
local component_funcs = dofile(core.get_mainmenu_path() .. DIR_DELIM ..
"settings" .. DIR_DELIM .. "components.lua")
local path = core.get_builtin_path() .. "common" .. DIR_DELIM .. "settings" .. DIR_DELIM
local shadows_component = dofile(core.get_mainmenu_path() .. DIR_DELIM ..
"settings" .. DIR_DELIM .. "shadows_component.lua")
local component_funcs = dofile(path .. "components.lua")
local shadows_component = dofile(path .. "shadows_component.lua")
local loaded = false
local full_settings
@ -123,6 +122,22 @@ local function load()
end,
}
local touchscreen_layout = {
query_text = "Touchscreen layout",
requires = {
touchscreen = true,
},
get_formspec = function(self, avail_w)
local btn_w = math.min(avail_w, 6)
return ("button[0,0;%f,0.8;btn_touch_layout;%s]"):format(btn_w, fgettext("Touchscreen layout")), 0.8
end,
on_submit = function(self, fields)
if fields.btn_touch_layout then
core.show_touchscreen_layout()
end
end,
}
add_page({
id = "accessibility",
title = fgettext_ne("Accessibility"),
@ -144,17 +159,33 @@ local function load()
{ heading = fgettext_ne("Movement") },
"arm_inertia",
"view_bobbing_amount",
"fall_bobbing_amount",
},
})
load_settingtypes()
table.insert(page_by_id.controls_keyboard_and_mouse.content, 1, change_keys)
-- insert after "touch_controls"
table.insert(page_by_id.controls_touchscreen.content, 2, touchscreen_layout)
do
local content = page_by_id.graphics_and_audio_shaders.content
local content = page_by_id.graphics_and_audio_effects.content
local idx = table.indexof(content, "enable_dynamic_shadows")
table.insert(content, idx, shadows_component)
idx = table.indexof(content, "enable_auto_exposure") + 1
local note = component_funcs.note(fgettext_ne("(The game will need to enable automatic exposure as well)"))
note.requires = get_setting_info("enable_auto_exposure").requires
table.insert(content, idx, note)
idx = table.indexof(content, "enable_bloom") + 1
note = component_funcs.note(fgettext_ne("(The game will need to enable bloom as well)"))
note.requires = get_setting_info("enable_bloom").requires
table.insert(content, idx, note)
idx = table.indexof(content, "enable_volumetric_lighting") + 1
note = component_funcs.note(fgettext_ne("(The game will need to enable volumetric lighting as well)"))
note.requires = get_setting_info("enable_volumetric_lighting").requires
table.insert(content, idx, note)
end
-- These must not be translated, as they need to show in the local
@ -222,6 +253,12 @@ local function load()
zh_CN = "中文 (简体) [zh_CN]",
zh_TW = "正體中文 (繁體) [zh_TW]",
}
get_setting_info("touch_controls").option_labels = {
["auto"] = fgettext_ne("Auto"),
["true"] = fgettext_ne("Enabled"),
["false"] = fgettext_ne("Disabled"),
}
end
@ -320,15 +357,17 @@ local function check_requirements(name, requires)
end
local video_driver = core.get_active_driver()
local shaders_support = video_driver == "opengl" or video_driver == "opengl3" or video_driver == "ogles2"
local touch_support = core.irrlicht_device_supports_touch()
local touch_controls = core.settings:get("touch_controls")
local special = {
android = PLATFORM == "Android",
desktop = PLATFORM ~= "Android",
touchscreen_gui = core.settings:get_bool("enable_touch"),
keyboard_mouse = not core.settings:get_bool("enable_touch"),
shaders_support = shaders_support,
shaders = core.settings:get_bool("enable_shaders") and shaders_support,
opengl = video_driver == "opengl",
touch_support = touch_support,
-- When touch_controls is "auto", we don't know which input method will
-- be used, so we show settings for both.
touchscreen = touch_support and (touch_controls == "auto" or core.is_yes(touch_controls)),
keyboard_mouse = not touch_support or (touch_controls == "auto" or not core.is_yes(touch_controls)),
opengl = (video_driver == "opengl" or video_driver == "opengl3"),
gles = video_driver:sub(1, 5) == "ogles",
}
@ -336,7 +375,10 @@ local function check_requirements(name, requires)
if special[req_key] == nil then
local required_setting = get_setting_info(req_key)
if required_setting == nil then
core.log("warning", "Unknown setting " .. req_key .. " required by " .. name)
core.log("warning", "Unknown setting " .. req_key .. " required by " .. (name or "???"))
elseif required_setting.type ~= "bool" then
core.log("warning", "Setting " .. req_key .. " of type " .. required_setting.type ..
" used as requirement by " .. (name or "???") .. ", only bool is allowed")
end
local actual_value = core.settings:get_bool(req_key,
required_setting and core.is_yes(required_setting.default))
@ -435,19 +477,6 @@ local function build_page_components(page)
end
--- Creates a scrollbaroptions for a scroll_container
--
-- @param visible_l the length of the scroll_container and scrollbar
-- @param total_l length of the scrollable area
-- @param scroll_factor as passed to scroll_container
local function make_scrollbaroptions_for_scroll_container(visible_l, total_l, scroll_factor)
assert(total_l >= visible_l)
local max = total_l - visible_l
local thumb_size = (visible_l / total_l) * max
return ("scrollbaroptions[min=0;max=%f;thumbsize=%f]"):format(max / scroll_factor, thumb_size / scroll_factor)
end
local formspec_show_hack = false
@ -457,13 +486,13 @@ local function get_formspec(dialogdata)
local extra_h = 1 -- not included in tabsize.height
local tabsize = {
width = core.settings:get_bool("enable_touch") and 16.5 or 15.5,
height = core.settings:get_bool("enable_touch") and (10 - extra_h) or 12,
width = core.settings:get_bool("touch_gui") and 16.5 or 15.5,
height = core.settings:get_bool("touch_gui") and (10 - extra_h) or 12,
}
local scrollbar_w = core.settings:get_bool("enable_touch") and 0.6 or 0.4
local scrollbar_w = core.settings:get_bool("touch_gui") and 0.6 or 0.4
local left_pane_width = core.settings:get_bool("enable_touch") and 4.5 or 4.25
local left_pane_width = core.settings:get_bool("touch_gui") and 4.5 or 4.25
local left_pane_padding = 0.25
local search_width = left_pane_width + scrollbar_w - (0.75 * 2)
@ -477,7 +506,7 @@ local function get_formspec(dialogdata)
local fs = {
"formspec_version[6]",
"size[", tostring(tabsize.width), ",", tostring(tabsize.height + extra_h), "]",
core.settings:get_bool("enable_touch") and "padding[0.01,0.01]" or "",
core.settings:get_bool("touch_gui") and "padding[0.01,0.01]" or "",
"bgcolor[#0000]",
-- HACK: this is needed to allow resubmitting the same formspec
@ -486,7 +515,8 @@ local function get_formspec(dialogdata)
"box[0,0;", tostring(tabsize.width), ",", tostring(tabsize.height), ";#0000008C]",
("button[0,%f;%f,0.8;back;%s]"):format(
tabsize.height + 0.2, back_w, fgettext("Back")),
tabsize.height + 0.2, back_w,
INIT == "pause_menu" and fgettext("Exit") or fgettext("Back")),
("box[%f,%f;%f,0.8;#0000008C]"):format(
back_w + 0.2, tabsize.height + 0.2, checkbox_w),
@ -503,14 +533,15 @@ local function get_formspec(dialogdata)
"field[0.25,0.25;", tostring(search_width), ",0.75;search_query;;",
core.formspec_escape(dialogdata.query or ""), "]",
"field_enter_after_edit[search_query;true]",
"field_close_on_enter[search_query;false]", -- for pause menu env
"container[", tostring(search_width + 0.25), ", 0.25]",
"image_button[0,0;0.75,0.75;", core.formspec_escape(defaulttexturedir .. "search.png"), ";search;]",
"image_button[0.75,0;0.75,0.75;", core.formspec_escape(defaulttexturedir .. "clear.png"), ";search_clear;]",
"tooltip[search;", fgettext("Search"), "]",
"tooltip[search_clear;", fgettext("Clear"), "]",
"container_end[]",
"scroll_container[0.25,1.25;", tostring(left_pane_width), ",",
tostring(tabsize.height - 1.5), ";leftscroll;vertical;0.1]",
("scroll_container[0.25,1.25;%f,%f;leftscroll;vertical;0.1;0]"):format(
left_pane_width, tabsize.height - 1.5),
"style_type[button;border=false;bgcolor=#3333]",
"style_type[button:hover;border=false;bgcolor=#6663]",
}
@ -540,7 +571,6 @@ local function get_formspec(dialogdata)
fs[#fs + 1] = "scroll_container_end[]"
if y >= tabsize.height - 1.25 then
fs[#fs + 1] = make_scrollbaroptions_for_scroll_container(tabsize.height - 1.5, y, 0.1)
fs[#fs + 1] = ("scrollbar[%f,1.25;%f,%f;vertical;leftscroll;%f]"):format(
left_pane_width + 0.25, scrollbar_w, tabsize.height - 1.5, dialogdata.leftscroll or 0)
end
@ -552,7 +582,7 @@ local function get_formspec(dialogdata)
end
local right_pane_width = tabsize.width - left_pane_width - 0.375 - 2*scrollbar_w - 0.25
fs[#fs + 1] = ("scroll_container[%f,0;%f,%f;rightscroll;vertical;0.1]"):format(
fs[#fs + 1] = ("scroll_container[%f,0;%f,%f;rightscroll;vertical;0.1;0.25]"):format(
tabsize.width - right_pane_width - scrollbar_w, right_pane_width, tabsize.height)
y = 0.25
@ -608,7 +638,6 @@ local function get_formspec(dialogdata)
fs[#fs + 1] = "scroll_container_end[]"
if y >= tabsize.height then
fs[#fs + 1] = make_scrollbaroptions_for_scroll_container(tabsize.height, y + 0.375, 0.1)
fs[#fs + 1] = ("scrollbar[%f,0;%f,%f;vertical;rightscroll;%f]"):format(
tabsize.width - scrollbar_w, scrollbar_w, tabsize.height, dialogdata.rightscroll or 0)
end
@ -626,6 +655,18 @@ function write_settings_early()
end
end
local function regenerate_page_list(dialogdata)
local suggested_page_id = update_filtered_pages(dialogdata.query)
dialogdata.components = nil
if not filtered_page_by_id[dialogdata.page_id] then
dialogdata.leftscroll = 0
dialogdata.rightscroll = 0
dialogdata.page_id = suggested_page_id
end
end
local function buttonhandler(this, fields)
local dialogdata = this.data
@ -633,7 +674,8 @@ local function buttonhandler(this, fields)
dialogdata.rightscroll = core.explode_scrollbar_event(fields.rightscroll).value or dialogdata.rightscroll
dialogdata.query = fields.search_query
if fields.back then
-- "fields.quit" is for the pause menu env
if fields.back or fields.quit then
this:delete()
return true
end
@ -650,27 +692,7 @@ local function buttonhandler(this, fields)
local value = core.is_yes(fields.show_advanced)
core.settings:set_bool("show_advanced", value)
write_settings_early()
end
-- enable_touch is a checkbox in a setting component. We handle this
-- setting differently so we can hide/show pages using the next if-statement
if fields.enable_touch ~= nil then
local value = core.is_yes(fields.enable_touch)
core.settings:set_bool("enable_touch", value)
write_settings_early()
end
if fields.show_advanced ~= nil or fields.enable_touch ~= nil then
local suggested_page_id = update_filtered_pages(dialogdata.query)
dialogdata.components = nil
if not filtered_page_by_id[dialogdata.page_id] then
dialogdata.leftscroll = 0
dialogdata.rightscroll = 0
dialogdata.page_id = suggested_page_id
end
regenerate_page_list(dialogdata)
return true
end
@ -703,20 +725,26 @@ local function buttonhandler(this, fields)
end
end
for i, comp in ipairs(dialogdata.components) do
if comp.on_submit and comp:on_submit(fields, this) then
write_settings_early()
local function after_setting_change(comp)
write_settings_early()
if comp.setting and comp.setting.name == "touch_controls" then
-- Changing the "touch_controls" setting may result in a different
-- page list.
regenerate_page_list(dialogdata)
else
-- Clear components so they regenerate
dialogdata.components = nil
end
end
for i, comp in ipairs(dialogdata.components) do
if comp.on_submit and comp:on_submit(fields, this) then
after_setting_change(comp)
return true
end
if comp.setting and fields["reset_" .. i] then
core.settings:remove(comp.setting.name)
write_settings_early()
-- Clear components so they regenerate
dialogdata.components = nil
after_setting_change(comp)
return true
end
end
@ -727,7 +755,7 @@ end
local function eventhandler(event)
if event == "DialogShow" then
-- Don't show the "MINETEST" header behind the dialog.
-- Don't show the header image behind the dialog.
mm_game_theme.set_engine(true)
return true
end
@ -741,11 +769,44 @@ local function eventhandler(event)
end
function create_settings_dlg()
load()
local dlg = dialog_create("dlg_settings", get_formspec, buttonhandler, eventhandler)
if INIT == "mainmenu" then
function create_settings_dlg()
load()
local dlg = dialog_create("dlg_settings", get_formspec, buttonhandler, eventhandler)
dlg.data.page_id = update_filtered_pages("")
dlg.data.page_id = update_filtered_pages("")
return dlg
return dlg
end
else
assert(INIT == "pause_menu")
local dialog
core.register_on_formspec_input(function(formname, fields)
if dialog and formname == "__builtin:settings" then
-- buttonhandler returning true means we should update the formspec.
-- dialog is re-checked since the buttonhandler may have closed it.
if buttonhandler(dialog, fields) and dialog then
core.show_formspec("__builtin:settings", get_formspec(dialog.data))
end
return true
end
end)
core.open_settings = function()
load()
dialog = {}
dialog.data = {}
dialog.data.page_id = update_filtered_pages("")
dialog.delete = function()
dialog = nil
-- only needed for the "fields.back" case, in the "fields.quit"
-- case it's a no-op
core.show_formspec("__builtin:settings", "")
end
core.show_formspec("__builtin:settings", get_formspec(dialog.data))
end
end

View file

@ -13,10 +13,10 @@ local minetest_example_header = [[
# ../minetest.conf
# ../../minetest.conf
# Any other path can be chosen by passing the path as a parameter
# to the program, eg. "minetest.exe --config ../minetest.conf.example".
# to the program, eg. "luanti.exe --config ../minetest.conf.example".
# Further documentation:
# https://wiki.minetest.net/
# https://wiki.luanti.org/
]]
@ -61,7 +61,7 @@ local function create_minetest_conf_example(settings)
end
end
if entry.type == "key" then
local line = "See https://github.com/minetest/irrlicht/blob/master/include/Keycodes.h"
local line = "See https://github.com/luanti-org/luanti/blob/master/irr/include/Keycodes.h"
insert(result, "# " .. line .. "\n")
end
insert(result, "# type: " .. entry.type)

View file

@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2022 rubenwardy
--
--This program is free software; you can redistribute it and/or modify
@ -15,11 +15,11 @@
--with this program; if not, write to the Free Software Foundation, Inc.,
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
local path = core.get_mainmenu_path() .. DIR_DELIM .. "settings"
local path = core.get_builtin_path() .. "common" .. DIR_DELIM .. "settings" .. DIR_DELIM
dofile(path .. DIR_DELIM .. "settingtypes.lua")
dofile(path .. DIR_DELIM .. "dlg_change_mapgen_flags.lua")
dofile(path .. DIR_DELIM .. "dlg_settings.lua")
dofile(path .. "settingtypes.lua")
dofile(path .. "dlg_change_mapgen_flags.lua")
dofile(path .. "dlg_settings.lua")
-- Uncomment to generate 'minetest.conf.example' and 'settings_translation_file.cpp'.
-- For RUN_IN_PLACE the generated files may appear in the 'bin' folder.

View file

@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2015 PilzAdam
--
--This program is free software; you can redistribute it and/or modify
@ -408,7 +408,16 @@ function settingtypes.parse_config_file(read_all, parse_mods)
file:close()
end
if parse_mods then
-- TODO: Support game/mod settings in the pause menu too
-- Note that this will need to work different from how it's done in the
-- mainmenu:
-- * Only if in singleplayer / on local server, not on remote servers
-- * Only show settings for the active game and mods
-- (add API function to get them, can return nil if on a remote server)
-- (names are probably not enough, will need paths for uniqueness)
-- This means just making "pkgmgr.lua" work won't get you very far.
if INIT == "mainmenu" and parse_mods then
-- Parse games
local games_category_initialized = false
for _, game in ipairs(pkgmgr.games) do

View file

@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2021-2 x2048
--Copyright (C) 2022-3 rubenwardy
--
@ -82,7 +82,6 @@ end
return {
query_text = "Shadows",
requires = {
shaders = true,
opengl = true,
},
get_formspec = function(self, avail_w)

View file

@ -1,6 +1,7 @@
_G.core = {}
_G.vector = {metatable = {}}
dofile("builtin/common/math.lua")
dofile("builtin/common/vector.lua")
dofile("builtin/common/misc_helpers.lua")

View file

@ -0,0 +1,16 @@
_G.core = {}
dofile("builtin/common/math.lua")
describe("math", function()
it("round()", function()
assert.equal(0, math.round(0))
assert.equal(10, math.round(10.3))
assert.equal(11, math.round(10.5))
assert.equal(11, math.round(10.7))
assert.equal(-10, math.round(-10.3))
assert.equal(-11, math.round(-10.5))
assert.equal(-11, math.round(-10.7))
assert.equal(0, math.round(0.49999999999999994))
assert.equal(0, math.round(-0.49999999999999994))
end)
end)

View file

@ -1,4 +1,5 @@
_G.core = {}
dofile("builtin/common/math.lua")
dofile("builtin/common/vector.lua")
dofile("builtin/common/misc_helpers.lua")
@ -166,6 +167,16 @@ describe("table", function()
it("indexof()", function()
assert.equal(1, table.indexof({"foo", "bar"}, "foo"))
assert.equal(-1, table.indexof({"foo", "bar"}, "baz"))
assert.equal(-1, table.indexof({[2] = "foo", [3] = "bar"}, "foo"))
assert.equal(-1, table.indexof({[1] = "foo", [3] = "bar"}, "bar"))
end)
it("keyof()", function()
assert.equal("a", table.keyof({a = "foo", b = "bar"}, "foo"))
assert.equal(nil, table.keyof({a = "foo", b = "bar"}, "baz"))
assert.equal(1, table.keyof({"foo", "bar"}, "foo"))
assert.equal(2, table.keyof({[2] = "foo", [3] = "bar"}, "foo"))
assert.equal(3, table.keyof({[1] = "foo", [3] = "bar"}, "bar"))
end)
end)

View file

@ -1,4 +1,5 @@
_G.vector = {}
dofile("builtin/common/math.lua")
dofile("builtin/common/vector.lua")
describe("vector", function()
@ -113,12 +114,35 @@ describe("vector", function()
assert.equal(vector.new(0, 1, -1), a:round())
end)
it("ceil()", function()
local a = vector.new(0.1, 0.9, -0.5)
assert.equal(vector.new(1, 1, 0), vector.ceil(a))
assert.equal(vector.new(1, 1, 0), a:ceil())
end)
it("sign()", function()
local a = vector.new(-120.3, 0, 231.5)
assert.equal(vector.new(-1, 0, 1), vector.sign(a))
assert.equal(vector.new(-1, 0, 1), a:sign())
assert.equal(vector.new(0, 0, 1), vector.sign(a, 200))
assert.equal(vector.new(0, 0, 1), a:sign(200))
end)
it("abs()", function()
local a = vector.new(-123.456, 0, 13)
assert.equal(vector.new(123.456, 0, 13), vector.abs(a))
assert.equal(vector.new(123.456, 0, 13), a:abs())
end)
it("apply()", function()
local i = 0
local f = function(x)
i = i + 1
return x + i
end
local f2 = function(x, opt1, opt2, opt3)
return x + opt1 + opt2 + opt3
end
local a = vector.new(0.1, 0.9, -0.5)
assert.equal(vector.new(1, 1, 0), vector.apply(a, math.ceil))
assert.equal(vector.new(1, 1, 0), a:apply(math.ceil))
@ -126,6 +150,9 @@ describe("vector", function()
assert.equal(vector.new(0.1, 0.9, 0.5), a:apply(math.abs))
assert.equal(vector.new(1.1, 2.9, 2.5), vector.apply(a, f))
assert.equal(vector.new(4.1, 5.9, 5.5), a:apply(f))
local b = vector.new(1, 2, 3)
assert.equal(vector.new(4, 5, 6), vector.apply(b, f2, 1, 1, 1))
assert.equal(vector.new(4, 5, 6), b:apply(f2, 1, 1, 1))
end)
it("combine()", function()
@ -469,4 +496,13 @@ describe("vector", function()
assert.True(vector.in_area(vector.new(-10, -10, -10), vector.new(-10, -10, -10), vector.new(10, 10, 10)))
assert.False(vector.in_area(vector.new(-10, -10, -10), vector.new(10, 10, 10), vector.new(-11, -10, -10)))
end)
it("random_in_area()", function()
local min = vector.new(-100, -100, -100)
local max = vector.new(100, 100, 100)
for i = 1, 1000 do
local random = vector.random_in_area(min, max)
assert.True(vector.in_area(random, min, max))
end
end)
end)

View file

@ -5,6 +5,7 @@ Note: The vector.*-functions must be able to accept old vectors that had no meta
-- localize functions
local setmetatable = setmetatable
local math = math
vector = {}
@ -97,18 +98,26 @@ function vector.floor(v)
end
function vector.round(v)
return fast_new(
math.round(v.x),
math.round(v.y),
math.round(v.z)
)
return vector.apply(v, math.round)
end
function vector.apply(v, func)
function vector.ceil(v)
return vector.apply(v, math.ceil)
end
function vector.sign(v, tolerance)
return vector.apply(v, math.sign, tolerance)
end
function vector.abs(v)
return vector.apply(v, math.abs)
end
function vector.apply(v, func, ...)
return fast_new(
func(v.x),
func(v.y),
func(v.z)
func(v.x, ...),
func(v.y, ...),
func(v.z, ...)
)
end
@ -375,6 +384,26 @@ function vector.in_area(pos, min, max)
(pos.z >= min.z) and (pos.z <= max.z)
end
function vector.random_direction()
-- Generate a random direction of unit length, via rejection sampling
local x, y, z, l2
repeat -- expected less than two attempts on average (volume sphere vs. cube)
x, y, z = math.random() * 2 - 1, math.random() * 2 - 1, math.random() * 2 - 1
l2 = x*x + y*y + z*z
until l2 <= 1 and l2 >= 1e-6
-- normalize
local l = math.sqrt(l2)
return fast_new(x/l, y/l, z/l)
end
function vector.random_in_area(min, max)
return fast_new(
math.random(min.x, max.x),
math.random(min.y, max.y),
math.random(min.z, max.z)
)
end
if rawget(_G, "core") and core.set_read_vector and core.set_push_vector then
local function read_vector(v)
return v.x, v.y, v.z

View file

@ -23,6 +23,8 @@ core.add_node = core.set_node
-- we don't deal with metadata currently
core.swap_node = core.set_node
core.bulk_swap_node = core.bulk_set_node
function core.remove_node(pos)
return core.vmanip:set_node_at(pos, {name="air"})
end

View file

@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2014 sapier
--Copyright (C) 2023 Gregor Parzefall
--
@ -19,7 +19,7 @@
local BASE_SPACING = 0.1
local function get_scroll_btn_width()
return core.settings:get_bool("enable_touch") and 0.8 or 0.5
return core.settings:get_bool("touch_gui") and 0.8 or 0.5
end
local function buttonbar_formspec(self)
@ -28,10 +28,8 @@ local function buttonbar_formspec(self)
end
local formspec = {
"style_type[box;noclip=true]",
string.format("box[%f,%f;%f,%f;%s]", self.pos.x, self.pos.y, self.size.x,
self.size.y, self.bgcolor),
"style_type[box;noclip=false]",
}
local btn_size = self.size.y - 2*BASE_SPACING
@ -40,7 +38,7 @@ local function buttonbar_formspec(self)
-- `BASE_SPACING` is used as the minimum spacing, like `gap` in CSS Flexbox.
-- The number of buttons per page is always calculated as if the scroll
-- buttons were visible.
-- buttons were visible.
local avail_space = self.size.x - 2*BASE_SPACING - 2*get_scroll_btn_width()
local btns_per_page = math.floor((avail_space - BASE_SPACING) / (btn_size + BASE_SPACING))
@ -71,7 +69,7 @@ local function buttonbar_formspec(self)
y = self.pos.y + BASE_SPACING,
}
table.insert(formspec, string.format("image_button[%f,%f;%f,%f;%s;%s;%s;true;false]tooltip[%s;%s]",
table.insert(formspec, string.format("image_button[%f,%f;%f,%f;%s;%s;%s;false;false]tooltip[%s;%s]",
btn_pos.x, btn_pos.y, btn_size, btn_size, btn.image, btn.name,
btn.caption, btn.name, btn.tooltip))
end
@ -86,9 +84,6 @@ local function buttonbar_formspec(self)
y = self.pos.y + BASE_SPACING,
}
table.insert(formspec, string.format("style[%s,%s;noclip=true]",
self.btn_prev_name, self.btn_next_name))
table.insert(formspec, string.format("button[%f,%f;%f,%f;%s;<]",
btn_prev_pos.x, btn_prev_pos.y, get_scroll_btn_width(), btn_size,
self.btn_prev_name))

View file

@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2014 sapier
--
--This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2014 sapier
--
--This program is free software; you can redistribute it and/or modify
@ -66,11 +66,22 @@ local function get_formspec(self)
local content, prepend = tab.get_formspec(self, tab.name, tab.tabdata, tab.tabsize)
local tsize = tab.tabsize or { width = self.width, height = self.height }
local TOUCH_GUI = core.settings:get_bool("touch_gui")
local orig_tsize = tab.tabsize or { width = self.width, height = self.height }
local tsize = { width = orig_tsize.width, height = orig_tsize.height }
tsize.height = tsize.height
+ TABHEADER_H -- tabheader included in formspec size
+ (TOUCH_GUI and GAMEBAR_OFFSET_TOUCH or GAMEBAR_OFFSET_DESKTOP)
+ GAMEBAR_H -- gamebar included in formspec size
if self.parent == nil and not prepend then
prepend = string.format("size[%f,%f,%s]", tsize.width, tsize.height,
dump(self.fixed_size))
local anchor_pos = TABHEADER_H + orig_tsize.height / 2
prepend = prepend .. ("anchor[0.5,%f]"):format(anchor_pos / tsize.height)
if tab.formspec_version then
prepend = ("formspec_version[%d]"):format(tab.formspec_version) .. prepend
end
@ -78,12 +89,15 @@ local function get_formspec(self)
local end_button_size = 0.75
local tab_header_size = { width = tsize.width, height = 0.85 }
local tab_header_size = { width = tsize.width, height = TABHEADER_H }
if self.end_button then
tab_header_size.width = tab_header_size.width - end_button_size - 0.1
end
local formspec = (prepend or "") .. self:tab_header(tab_header_size) .. content
local formspec = (prepend or "")
formspec = formspec .. ("bgcolor[;neither]container[0,%f]box[0,0;%f,%f;#0000008C]"):format(
TABHEADER_H, orig_tsize.width, orig_tsize.height)
formspec = formspec .. self:tab_header(tab_header_size) .. content
if self.end_button then
formspec = formspec ..
@ -98,6 +112,8 @@ local function get_formspec(self)
self.end_button.name)
end
formspec = formspec .. "container_end[]"
return formspec
end

View file

@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2014 sapier
--
--This program is free software; you can redistribute it and/or modify

View file

@ -10,7 +10,7 @@ end
function core.handle_async(func, callback, ...)
assert(type(func) == "function" and type(callback) == "function",
"Invalid minetest.handle_async invocation")
"Invalid core.handle_async invocation")
local args = {n = select("#", ...), ...}
local mod_origin = core.get_last_run_mod()

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/auth.lua
--
-- Builtin authentication handler
--
@ -95,11 +93,11 @@ core.builtin_auth_handler = {
for priv, value in pairs(privileges) do
-- Warnings for improper API usage
if value == false then
core.log('deprecated', "`false` value given to `minetest.set_player_privs`, "..
core.log('deprecated', "`false` value given to `core.set_player_privs`, "..
"this is almost certainly a bug, "..
"granting a privilege rather than revoking it")
elseif value ~= true then
core.log('deprecated', "non-`true` value given to `minetest.set_player_privs`")
core.log('deprecated', "non-`true` value given to `core.set_player_privs`")
end
-- Run grant callbacks
if prev_privs[priv] == nil then
@ -196,7 +194,7 @@ function core.change_player_privs(name, changes)
elseif change == false then
privs[priv] = nil
else
error("non-bool value given to `minetest.change_player_privs`")
error("non-bool value given to `core.change_player_privs`")
end
end
core.set_player_privs(name, privs)

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/game/chat.lua
local S = core.get_translator("__builtin")
-- Helper function that implements search and replace without pattern matching
@ -221,6 +219,7 @@ core.register_chatcommand("haspriv", {
return true, S("No online player has the \"@1\" privilege.",
param)
else
table.sort(players_with_priv)
return true, S("Players online with the \"@1\" privilege: @2",
param,
table.concat(players_with_priv, ", "))

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/constants.lua
--
-- Constants values for use with the Lua API
--

View file

@ -0,0 +1,31 @@
local F = core.formspec_escape
local S = core.get_translator("__builtin")
function core.show_death_screen(player, _reason)
local fs = {
"formspec_version[1]",
"size[11,5.5,true]",
"bgcolor[#320000b4;true]",
"label[4.85,1.35;", F(S("You died")), "]",
"button_exit[4,3;3,0.5;btn_respawn;", F(S("Respawn")), "]",
}
core.show_formspec(player:get_player_name(), "__builtin:death", table.concat(fs, ""))
end
core.register_on_dieplayer(function(player, reason)
core.show_death_screen(player, reason)
end)
core.register_on_joinplayer(function(player)
if player:get_hp() == 0 then
core.show_death_screen(player, nil)
end
end)
core.register_on_player_receive_fields(function(player, formname, fields)
if formname == "__builtin:death" and fields.quit and player:get_hp() == 0 then
player:respawn()
core.log("action", player:get_player_name() .. " respawns at " ..
player:get_pos():to_string())
end
end)

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/deprecated.lua
--
-- EnvRef
--
@ -35,9 +33,9 @@ local settings = core.settings
local function setting_proxy(name)
return function(...)
core.log("deprecated", "WARNING: minetest.setting_* "..
core.log("deprecated", "WARNING: core.setting_* "..
"functions are deprecated. "..
"Use methods on the minetest.settings object.")
"Use methods on the core.settings object.")
return settings[name](settings, ...)
end
end

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/detached_inventory.lua
core.detached_inventories = {}
local create_detached_inventory_raw = core.create_detached_inventory_raw

View file

@ -1,7 +1,4 @@
-- Minetest: builtin/item.lua
local builtin_shared = ...
local SCALE = 0.667
local facedir_to_euler = {
{y = 0, x = 0, z = 0},
@ -38,9 +35,7 @@ local gravity = tonumber(core.settings:get("movement_gravity")) or 9.81
core.register_entity(":__builtin:falling_node", {
initial_properties = {
visual = "item",
visual_size = vector.new(SCALE, SCALE, SCALE),
textures = {},
visual = "node",
physical = true,
is_visible = false,
collide_with_objects = true,
@ -80,43 +75,17 @@ core.register_entity(":__builtin:falling_node", {
self.floats = core.get_item_group(node.name, "float") ~= 0
-- Save liquidtype for falling water
self.liquidtype = def.liquidtype
self.liquidtype = def.liquidtype
-- Set entity visuals
if def.drawtype == "torchlike" or def.drawtype == "signlike" then
local textures
if def.tiles and def.tiles[1] then
local tile = def.tiles[1]
if type(tile) == "table" then
tile = tile.name
end
if def.drawtype == "torchlike" then
textures = { "("..tile..")^[transformFX", tile }
else
textures = { tile, "("..tile..")^[transformFX" }
end
end
local vsize
if def.visual_scale then
local s = def.visual_scale
vsize = vector.new(s, s, s)
end
self.object:set_properties({
is_visible = true,
visual = "upright_sprite",
visual_size = vsize,
textures = textures,
glow = def.light_source,
})
elseif def.drawtype ~= "airlike" then
local itemstring = node.name
if core.is_colored_paramtype(def.paramtype2) then
itemstring = core.itemstring_with_palette(itemstring, node.param2)
end
-- FIXME: solution needed for paramtype2 == "leveled"
-- Set up entity visuals
-- For compatibility with older clients we continue to use "item" visual
-- for simple situations.
local drawtypes = {normal=true, glasslike=true, allfaces=true, nodebox=true}
local p2types = {none=true, facedir=true, ["4dir"]=true}
if drawtypes[def.drawtype] and p2types[def.paramtype2] and def.use_texture_alpha ~= "blend" then
-- Calculate size of falling node
local s = {}
s.x = (def.visual_scale or 1) * SCALE
local s = vector.zero()
s.x = (def.visual_scale or 1) * 0.667
s.y = s.x
s.z = s.x
-- Compensate for wield_scale
@ -127,10 +96,31 @@ core.register_entity(":__builtin:falling_node", {
end
self.object:set_properties({
is_visible = true,
wield_item = itemstring,
visual = "item",
wield_item = node.name,
visual_size = s,
glow = def.light_source,
})
-- Rotate as needed
if def.paramtype2 == "facedir" then
local fdir = node.param2 % 32 % 24
local euler = facedir_to_euler[fdir + 1]
if euler then
self.object:set_rotation(euler)
end
elseif def.paramtype2 == "4dir" then
local fdir = node.param2 % 4
local euler = facedir_to_euler[fdir + 1]
if euler then
self.object:set_rotation(euler)
end
end
elseif def.drawtype ~= "airlike" then
self.object:set_properties({
is_visible = true,
node = node,
glow = def.light_source,
})
end
-- Set collision box (certain nodeboxes only for now)
@ -150,111 +140,6 @@ core.register_entity(":__builtin:falling_node", {
})
end
end
-- Rotate entity
if def.drawtype == "torchlike" then
if (def.paramtype2 == "wallmounted" or def.paramtype2 == "colorwallmounted")
and node.param2 % 8 == 7 then
self.object:set_yaw(-math.pi*0.25)
else
self.object:set_yaw(math.pi*0.25)
end
elseif ((node.param2 ~= 0 or def.drawtype == "nodebox" or def.drawtype == "mesh")
and (def.wield_image == "" or def.wield_image == nil))
or def.drawtype == "signlike"
or def.drawtype == "mesh"
or def.drawtype == "normal"
or def.drawtype == "nodebox" then
if (def.paramtype2 == "facedir" or def.paramtype2 == "colorfacedir") then
local fdir = node.param2 % 32 % 24
-- Get rotation from a precalculated lookup table
local euler = facedir_to_euler[fdir + 1]
if euler then
self.object:set_rotation(euler)
end
elseif (def.paramtype2 == "4dir" or def.paramtype2 == "color4dir") then
local fdir = node.param2 % 4
-- Get rotation from a precalculated lookup table
local euler = facedir_to_euler[fdir + 1]
if euler then
self.object:set_rotation(euler)
end
elseif (def.drawtype ~= "plantlike" and def.drawtype ~= "plantlike_rooted" and
(def.paramtype2 == "wallmounted" or def.paramtype2 == "colorwallmounted" or def.drawtype == "signlike")) then
local rot = node.param2 % 8
if (def.drawtype == "signlike" and def.paramtype2 ~= "wallmounted" and def.paramtype2 ~= "colorwallmounted") then
-- Change rotation to "floor" by default for non-wallmounted paramtype2
rot = 1
end
local pitch, yaw, roll = 0, 0, 0
if def.drawtype == "nodebox" or def.drawtype == "mesh" then
if rot == 0 then
pitch, yaw = math.pi/2, 0
elseif rot == 1 then
pitch, yaw = -math.pi/2, math.pi
elseif rot == 2 then
pitch, yaw = 0, math.pi/2
elseif rot == 3 then
pitch, yaw = 0, -math.pi/2
elseif rot == 4 then
pitch, yaw = 0, math.pi
elseif rot == 6 then
pitch, yaw = math.pi/2, 0
elseif rot == 7 then
pitch, yaw = -math.pi/2, math.pi
end
else
if rot == 1 then
pitch, yaw = math.pi, math.pi
elseif rot == 2 then
pitch, yaw = math.pi/2, math.pi/2
elseif rot == 3 then
pitch, yaw = math.pi/2, -math.pi/2
elseif rot == 4 then
pitch, yaw = math.pi/2, math.pi
elseif rot == 5 then
pitch, yaw = math.pi/2, 0
elseif rot == 6 then
pitch, yaw = math.pi, -math.pi/2
elseif rot == 7 then
pitch, yaw = 0, -math.pi/2
end
end
if def.drawtype == "signlike" then
pitch = pitch - math.pi/2
if rot == 0 then
yaw = yaw + math.pi/2
elseif rot == 1 then
yaw = yaw - math.pi/2
elseif rot == 6 then
yaw = yaw - math.pi/2
pitch = pitch + math.pi
elseif rot == 7 then
yaw = yaw + math.pi/2
pitch = pitch + math.pi
end
elseif def.drawtype == "mesh" or def.drawtype == "normal" or def.drawtype == "nodebox" then
if rot == 0 or rot == 1 then
roll = roll + math.pi
elseif rot == 6 or rot == 7 then
if def.drawtype ~= "normal" then
roll = roll - math.pi/2
end
else
yaw = yaw + math.pi
end
end
self.object:set_rotation({x=pitch, y=yaw, z=roll})
elseif (def.drawtype == "mesh" and def.paramtype2 == "degrotate") then
local p2 = (node.param2 - (def.place_param2 or 0)) % 240
local yaw = (p2 / 240) * (math.pi * 2)
self.object:set_yaw(yaw)
elseif (def.drawtype == "mesh" and def.paramtype2 == "colordegrotate") then
local p2 = (node.param2 % 32 - (def.place_param2 or 0) % 32) % 24
local yaw = (p2 / 24) * (math.pi * 2)
self.object:set_yaw(yaw)
end
end
end,
get_staticdata = function(self)
@ -310,23 +195,26 @@ core.register_entity(":__builtin:falling_node", {
core.remove_node(bcp)
else
-- We are placing on top so check what's there
np.y = np.y + 1
end
-- Check what's here
local n2 = core.get_node(np)
local nd = core.registered_nodes[n2.name]
-- If it's not air or liquid, remove node and replace it with
-- it's drops
if n2.name ~= "air" and (not nd or nd.liquidtype ~= "source") then
if nd and nd.buildable_to == false then
local n2 = core.get_node(np)
local nd = core.registered_nodes[n2.name]
if not nd or nd.buildable_to then
core.remove_node(np)
else
-- 'walkable' is used to mean "falling nodes can't replace this"
-- here. Normally we would collide with the walkable node itself
-- and place our node on top (so `n2.name == "air"`), but we
-- re-check this in case we ended up inside a node.
if not nd.diggable or nd.walkable then
return false
end
nd.on_dig(np, n2, nil)
-- If it's still there, it might be protected
if core.get_node(np).name == n2.name then
return false
end
else
core.remove_node(np)
end
end

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/features.lua
core.features = {
glasslike_framed = true,
nodebox_as_selectionbox = true,
@ -42,6 +40,12 @@ core.features = {
node_interaction_actor = true,
moveresult_new_pos = true,
override_item_remove_fields = true,
hotbar_hud_element = true,
bulk_lbms = true,
abm_without_neighbors = true,
biome_weights = true,
particle_blend_clip = true,
remove_item_match_meta = true,
}
function core.has_feature(arg)

View file

@ -251,11 +251,31 @@ register_builtin_hud_element("minimap", {
position = {x = 1, y = 0},
alignment = {x = -1, y = 1},
offset = {x = -10, y = 10},
size = {x = 256, y = 256},
size = {x = 0, y = -25},
},
show_elem = function(player, flags)
local proto_ver = core.get_player_information(player:get_player_name()).protocol_version
-- Don't add a minimap for clients which already have it hardcoded in C++.
return flags.minimap and
core.get_player_information(player:get_player_name()).protocol_version >= 44
return flags.minimap and proto_ver >= 44
end,
update_def = function(player, elem_def)
local proto_ver = core.get_player_information(player:get_player_name()).protocol_version
-- Only use percentage when the client supports it.
elem_def.size = proto_ver >= 45 and {x = 0, y = -25} or {x = 256, y = 256}
end,
})
--- Hotbar
register_builtin_hud_element("hotbar", {
elem_def = {
type = "hotbar",
position = {x = 0.5, y = 1},
direction = 0,
alignment = {x = 0, y = -1},
offset = {x = 0, y = -4}, -- Extra padding below.
},
show_elem = function(player, flags)
return flags.hotbar
end,
})

View file

@ -38,6 +38,7 @@ dofile(gamepath .. "forceloading.lua")
dofile(gamepath .. "hud.lua")
dofile(gamepath .. "knockback.lua")
dofile(gamepath .. "async.lua")
dofile(gamepath .. "death_screen.lua")
core.after(0, builtin_shared.cache_content_ids)

View file

@ -1,5 +1,3 @@
-- Minetest: builtin/item.lua
local builtin_shared = ...
local function copy_pointed_thing(pointed_thing)

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