Compare commits
640 Commits
5.11.0-rc1
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
298a27c743 | ||
|
|
98fb381910 | ||
|
|
8593d38030 | ||
|
|
b6bfc494e6 | ||
|
|
e82495d98c | ||
|
|
8042b5512f | ||
|
|
2368126d0a | ||
|
|
7a6e639d61 | ||
|
|
8350fb734a | ||
|
|
329e210326 | ||
|
|
f2eabdd1d5 | ||
|
|
36f052198c | ||
|
|
631cbb3018 | ||
|
|
de5ef4ca29 | ||
|
|
1ead48c58b | ||
|
|
4b41e20000 | ||
|
|
04a443e392 | ||
|
|
ae6aac8aa9 | ||
|
|
3c60b348a6 | ||
|
|
0794912374 | ||
|
|
e924f425f2 | ||
|
|
d4d3e10531 | ||
|
|
97c9f8f709 | ||
|
|
7331156650 | ||
|
|
93ccb4b355 | ||
|
|
dde463635e | ||
|
|
4f8a847085 | ||
|
|
f1c0f292fa | ||
|
|
377cdfb601 | ||
|
|
ff15b413b0 | ||
|
|
35357e4300 | ||
|
|
4756e23477 | ||
|
|
c58a7ad98a | ||
|
|
f4977b1e33 | ||
|
|
0f943e5810 | ||
|
|
081624a229 | ||
|
|
51f19b4329 | ||
|
|
a049174f12 | ||
|
|
6b0e1e9b67 | ||
|
|
d834c45d1c | ||
|
|
5e23e478b1 | ||
|
|
1b37eb2e0b | ||
|
|
c965bb77bd | ||
|
|
7d4f80f1cc | ||
|
|
6ff4a2a3d2 | ||
|
|
7ca5f3baa0 | ||
|
|
0b13fd0b01 | ||
|
|
9213b7f164 | ||
|
|
f205f6f539 | ||
|
|
c2e2b97944 | ||
|
|
a141f8478b | ||
|
|
1a6bf66f2a | ||
|
|
35fda3710d | ||
|
|
a3e27f06fc | ||
|
|
0afb6df810 | ||
|
|
5b5b4b3eff | ||
|
|
05e86bb1e8 | ||
|
|
c4e0c9d408 | ||
|
|
06250f8b27 | ||
|
|
293544fb48 | ||
|
|
b816542e22 | ||
|
|
29476f406b | ||
|
|
76a8d8b0e2 | ||
|
|
6d1a208018 | ||
|
|
d500241e3d | ||
|
|
61f3812f73 | ||
|
|
f2be1c39c8 | ||
|
|
244dc7ac06 | ||
|
|
3a0152c491 | ||
|
|
52e36b06e6 | ||
|
|
f1f1fce2db | ||
|
|
4aae915e4f | ||
|
|
814eb21def | ||
|
|
b5eb11c0ae | ||
|
|
72b14910da | ||
|
|
bca99fc723 | ||
|
|
b6fe5fee43 | ||
|
|
23e208c7aa | ||
|
|
8b3e80f534 | ||
|
|
4f77a91e04 | ||
|
|
c2a4d5f82d | ||
|
|
4238aa423b | ||
|
|
ae35167a5e | ||
|
|
499f2284bd | ||
|
|
274d8a7c65 | ||
|
|
8f98b4f243 | ||
|
|
e3ec044ed0 | ||
|
|
dd3530dc79 | ||
|
|
421835a30e | ||
|
|
db8cd2121c | ||
|
|
ec790a3884 | ||
|
|
ee45f2db43 | ||
|
|
ca62268d16 | ||
|
|
e217961b25 | ||
|
|
7485844880 | ||
|
|
32d10f8309 | ||
|
|
87dd2184a4 | ||
|
|
10328435e8 | ||
|
|
1c710ac003 | ||
|
|
4019be74a9 | ||
|
|
887fff9709 | ||
|
|
0e6b4d11d0 | ||
|
|
fd7dbb6d45 | ||
|
|
7e68262c0c | ||
|
|
112672594b | ||
|
|
1aa3efba4a | ||
|
|
bdd08fde57 | ||
|
|
6f96c14aba | ||
|
|
2a76a50d98 | ||
|
|
773f9f14d4 | ||
|
|
a104a55348 | ||
|
|
e653f9ea66 | ||
|
|
d71609da08 | ||
|
|
bf5718144f | ||
|
|
61df8b8dc7 | ||
|
|
5d097b5533 | ||
|
|
2c0094b9bd | ||
|
|
f531b7fd72 | ||
|
|
729e60da79 | ||
|
|
6c671cc48d | ||
|
|
a9fba46454 | ||
|
|
8baca62434 | ||
|
|
254005f3e5 | ||
|
|
dc3aeea697 | ||
|
|
1086af7bc6 | ||
|
|
5f5ea13251 | ||
|
|
4c29bf6923 | ||
|
|
d5ddee6cbf | ||
|
|
20f8eb9a6c | ||
|
|
08b7870c79 | ||
|
|
afd681d013 | ||
|
|
2eded3f078 | ||
|
|
9972639e26 | ||
|
|
39f2727503 | ||
|
|
ecabcb5c58 | ||
|
|
70fbef112c | ||
|
|
2cab46280b | ||
|
|
fc6bef7de6 | ||
|
|
29490cb0f7 | ||
|
|
d932f34693 | ||
|
|
cc6b56b034 | ||
|
|
053ca6287a | ||
|
|
fcd9c73f2f | ||
|
|
f714ac0611 | ||
|
|
b6a23b1bcc | ||
|
|
69497200f9 | ||
|
|
c9d4c33174 | ||
|
|
176cadc377 | ||
|
|
5672b93007 | ||
|
|
0b66465f33 | ||
|
|
c7d45fe51a | ||
|
|
46ef0bf313 | ||
|
|
56bc7814de | ||
|
|
d24a7001ab | ||
|
|
024e1d2d27 | ||
|
|
e86d2fea8d | ||
|
|
2ef085967d | ||
|
|
f390137d6e | ||
|
|
7cbe62fe7b | ||
|
|
3f0f7f4285 | ||
|
|
04d9bd518f | ||
|
|
550b042076 | ||
|
|
ce8e8f6bf4 | ||
|
|
079169612d | ||
|
|
baaab310fe | ||
|
|
36b5374715 | ||
|
|
bb74b9d488 | ||
|
|
54d48decad | ||
|
|
1d53ec4892 | ||
|
|
e835673c5e | ||
|
|
f2eb5e7a93 | ||
|
|
6da927a548 | ||
|
|
fd3588d49c | ||
|
|
7c88996210 | ||
|
|
b6065797ce | ||
|
|
21a76d8c88 | ||
|
|
e2e571ca1f | ||
|
|
81e08fc890 | ||
|
|
2a96b31ffc | ||
|
|
a5197a6719 | ||
|
|
bbade5d3bc | ||
|
|
7a99fdf490 | ||
|
|
0b21c93324 | ||
|
|
55cca34ee9 | ||
|
|
0b9ae73369 | ||
|
|
b1cb5fcb9f | ||
|
|
ae97435d80 | ||
|
|
ecc876045f | ||
|
|
c611a1f9e8 | ||
|
|
65d498f78e | ||
|
|
a0547b3435 | ||
|
|
93dd22b901 | ||
|
|
60cd83a332 | ||
|
|
0c12c1f400 | ||
|
|
39417cf7a7 | ||
|
|
5ab66da6f7 | ||
|
|
919b7c5433 | ||
|
|
613ba689ff | ||
|
|
26aab6ecf2 | ||
|
|
d949f5ffcb | ||
|
|
9ff38bdf7f | ||
|
|
d679261488 | ||
|
|
7345b54f18 | ||
|
|
0deee5eaf0 | ||
|
|
d8640759d6 | ||
|
|
535db2be76 | ||
|
|
d60f909566 | ||
|
|
c9230c5c09 | ||
|
|
643d1cbd8d | ||
|
|
251488b3aa | ||
|
|
3cb8ce69d2 | ||
|
|
77dd86a79c | ||
|
|
0eabc252b8 | ||
|
|
e8e5ef0369 | ||
|
|
158bfa6442 | ||
|
|
23bf50a07c | ||
|
|
33940021a1 | ||
|
|
3dd99e1492 | ||
|
|
15f41eb82e | ||
|
|
ef7f1ac28f | ||
|
|
e1b057ca56 | ||
|
|
717e686ac3 | ||
|
|
adf6fe95e7 | ||
|
|
751bfad09d | ||
|
|
22c3c04f24 | ||
|
|
84b13998e6 | ||
|
|
b8f870f0e2 | ||
|
|
37f922b500 | ||
|
|
8e03e94ea9 | ||
|
|
ce2380b58e | ||
|
|
f71e1447c9 | ||
|
|
4f42b4308c | ||
|
|
e0f8243629 | ||
|
|
61551cfc3a | ||
|
|
7e22c72492 | ||
|
|
51a453ca7b | ||
|
|
2a8ee686d9 | ||
|
|
af4c182286 | ||
|
|
f93d076fa2 | ||
|
|
d945792053 | ||
|
|
dbb96b71a2 | ||
|
|
d4491d5f2f | ||
|
|
a41a24dc6c | ||
|
|
a51b518648 | ||
|
|
94c9636d7c | ||
|
|
47c0be86be | ||
|
|
4bfbfccbe0 | ||
|
|
d1d33ae4bc | ||
|
|
5b714aa932 | ||
|
|
4378757820 | ||
|
|
5026ea18f5 | ||
|
|
8e7fbed4e4 | ||
|
|
69ad83d9c9 | ||
|
|
639edcddcf | ||
|
|
21df20185c | ||
|
|
3865287b8b | ||
|
|
d7b876ba0e | ||
|
|
ec7119327a | ||
|
|
2f94347af9 | ||
|
|
17b3d5f381 | ||
|
|
9a1e83036b | ||
|
|
c3d669266e | ||
|
|
5f428ffe76 | ||
|
|
846a3baf68 | ||
|
|
a61a53db9a | ||
|
|
1472379f39 | ||
|
|
599c93633a | ||
|
|
1a58a2fd2b | ||
|
|
5b37614d23 | ||
|
|
08bc036311 | ||
|
|
83a7e22cf7 | ||
|
|
80be9bf76e | ||
|
|
43aad3711b | ||
|
|
fd0ca20ce9 | ||
|
|
fcbf05fc30 | ||
|
|
2d36d32da8 | ||
|
|
2733df78c4 | ||
|
|
6545710c8e | ||
|
|
0ea89d4112 | ||
|
|
8eceabd812 | ||
|
|
0794145b64 | ||
|
|
90c3479520 | ||
|
|
da0f8cd6b5 | ||
|
|
48ef7fff23 | ||
|
|
1297ccc537 | ||
|
|
fdc149f316 | ||
|
|
d41de3da79 | ||
|
|
49f48e0a7c | ||
|
|
81d62d01d1 | ||
|
|
225d2cf916 | ||
|
|
f75d16c1e6 | ||
|
|
aba2b6638e | ||
|
|
e452c2900f | ||
|
|
f431c12b85 | ||
|
|
38255cb6bb | ||
|
|
b9af44b194 | ||
|
|
29a9056731 | ||
|
|
4454d71d7d | ||
|
|
fde6384a09 | ||
|
|
0bb87eb1ff | ||
|
|
56a7f0b7cf | ||
|
|
a2460df316 | ||
|
|
535d757563 | ||
|
|
660b1cf9bf | ||
|
|
fcddac6c07 | ||
|
|
9f7501d20a | ||
|
|
aa1bab2156 | ||
|
|
6274a8dec4 | ||
|
|
41651c7317 | ||
|
|
e03957ec0c | ||
|
|
79e0d834fd | ||
|
|
b580c66b61 | ||
|
|
9ce9d7f433 | ||
|
|
957ebf7368 | ||
|
|
5c2599315c | ||
|
|
6ca9d75f0b | ||
|
|
ec16fb33d0 | ||
|
|
a5263dc7ed | ||
|
|
ae35f37bc3 | ||
|
|
986cd32f28 | ||
|
|
94a9b94baf | ||
|
|
da7897a822 | ||
|
|
fa0c09d202 | ||
|
|
e9b32843a5 | ||
|
|
1214a1d4a6 | ||
|
|
452160cd00 | ||
|
|
d17f22f536 | ||
|
|
2f1171e2a7 | ||
|
|
66aa5f3fac | ||
|
|
8f0838506a | ||
|
|
9b2aeb2ca2 | ||
|
|
b459d6ee63 | ||
|
|
fc1d57b666 | ||
|
|
db561ff094 | ||
|
|
f6c933d891 | ||
|
|
813f67021b | ||
|
|
1b9a5074a2 | ||
|
|
31e923e51a | ||
|
|
95695f1cd2 | ||
|
|
7ac5502fdf | ||
|
|
30e33d71cc | ||
|
|
4700939949 | ||
|
|
56ecf6d332 | ||
|
|
554dd5ddf4 | ||
|
|
8c8b7cb251 | ||
|
|
dca88be81d | ||
|
|
a817fdffd2 | ||
|
|
3020c192b2 | ||
|
|
d11d90fb8d | ||
|
|
d19640d57f | ||
|
|
7c5a0d9057 | ||
|
|
5cc44edab6 | ||
|
|
2103b0725c | ||
|
|
ccc46f9515 | ||
|
|
15315e7388 | ||
|
|
faad4d7cea | ||
|
|
2e717c2ba6 | ||
|
|
649fef4916 | ||
|
|
b0ef3ed2d5 | ||
|
|
e6511c60ed | ||
|
|
9ff00cdfbb | ||
|
|
8a28339ed3 | ||
|
|
e039f4c8af | ||
|
|
612db5b2ca | ||
|
|
57c1ab905c | ||
|
|
600763dffc | ||
|
|
959a8b5b8b | ||
|
|
5f06885ffa | ||
|
|
94dd3da2aa | ||
|
|
9b2ee1dd5d | ||
|
|
1f9a3b5875 | ||
|
|
05513467b6 | ||
|
|
34e73da424 | ||
|
|
747857bffa | ||
|
|
9ad23e4384 | ||
|
|
98b2edeb11 | ||
|
|
f4285a59ac | ||
|
|
377fa5bb14 | ||
|
|
486fb7cc4d | ||
|
|
9cb78f2dc5 | ||
|
|
b841c23701 | ||
|
|
0bdd5f294e | ||
|
|
d795c28af8 | ||
|
|
c5abecbd3c | ||
|
|
0c7149b8df | ||
|
|
d96f5e1c76 | ||
|
|
6f3735281f | ||
|
|
893a74f9d7 | ||
|
|
d937cd9b90 | ||
|
|
4164cea58f | ||
|
|
01e4395977 | ||
|
|
5113fcaedd | ||
|
|
0d414c44da | ||
|
|
33ae1af79a | ||
|
|
3497722a9d | ||
|
|
1de0eddb52 | ||
|
|
a9abeab7ee | ||
|
|
568157d9fb | ||
|
|
9be6f08cec | ||
|
|
697a3169e6 | ||
|
|
a252fc1e55 | ||
|
|
b022cc3f89 | ||
|
|
cbe2067f16 | ||
|
|
aa77bda765 | ||
|
|
e9695c788f | ||
|
|
7ccab6d37a | ||
|
|
d1153d0cdd | ||
|
|
dc62a2f212 | ||
|
|
02244a1241 | ||
|
|
dde892e64c | ||
|
|
dac654e6f0 | ||
|
|
74804e3d11 | ||
|
|
8aa043fa9a | ||
|
|
3f295acbc6 | ||
|
|
ee50f7ccf3 | ||
|
|
c561a0651a | ||
|
|
00652e1dfc | ||
|
|
7b38484c43 | ||
|
|
3376eb69fc | ||
|
|
f5785ecca4 | ||
|
|
c020c50322 | ||
|
|
a1cdb0c291 | ||
|
|
d8874704c9 | ||
|
|
46357d8eb7 | ||
|
|
02a87ce861 | ||
|
|
78e34982e7 | ||
|
|
efe120d3f6 | ||
|
|
3e5d9782cc | ||
|
|
409543566a | ||
|
|
233ffbe384 | ||
|
|
d6d045aad4 | ||
|
|
dd2e45ee82 | ||
|
|
f2ea4a4565 | ||
|
|
75f757ed2b | ||
|
|
974d915b19 | ||
|
|
4a8f84b259 | ||
|
|
2c83c67b7d | ||
|
|
6c339c62c6 | ||
|
|
7c619bdc9a | ||
|
|
00addc3e5d | ||
|
|
2a3427a39c | ||
|
|
99150fadd1 | ||
|
|
0cf1c47f6c | ||
|
|
5c6e4d35b0 | ||
|
|
c0e42c6588 | ||
|
|
900cf896db | ||
|
|
f3c2bbfb48 | ||
|
|
baa4c7cd21 | ||
|
|
b2c2a6ff47 | ||
|
|
4c4e296274 | ||
|
|
1c5776d13a | ||
|
|
c0d10b24a4 | ||
|
|
e1143783e5 | ||
|
|
695d526764 | ||
|
|
5f1ff453c9 | ||
|
|
2f464843cb | ||
|
|
23bfb2db72 | ||
|
|
c1d2124102 | ||
|
|
bf15036831 | ||
|
|
2bb7ed208c | ||
|
|
0695541bf5 | ||
|
|
7375358afd | ||
|
|
fd85737460 | ||
|
|
04e82749db | ||
|
|
cf07b56235 | ||
|
|
37d2bc8a5f | ||
|
|
a9c197b1e5 | ||
|
|
bdaabad53c | ||
|
|
60c47c51e0 | ||
|
|
75862e33b6 | ||
|
|
78293404c7 | ||
|
|
372e37faf2 | ||
|
|
124d770823 | ||
|
|
9d81c02f27 | ||
|
|
a00b9cab36 | ||
|
|
46db688cc8 | ||
|
|
d5bf094f9a | ||
|
|
427a7e4998 | ||
|
|
9ff07df45e | ||
|
|
38c3876c4e | ||
|
|
03affa1bbb | ||
|
|
7689f1f0fd | ||
|
|
a3648b0b16 | ||
|
|
bed36139db | ||
|
|
6a71095655 | ||
|
|
52b974184d | ||
|
|
a6d4cd7c15 | ||
|
|
1db5a2f950 | ||
|
|
884f411387 | ||
|
|
66dedf1e21 | ||
|
|
7dbd3a0744 | ||
|
|
47c75b3294 | ||
|
|
0179021acc | ||
|
|
2569b50252 | ||
|
|
c30c94dfaa | ||
|
|
6724068659 | ||
|
|
1281173e50 | ||
|
|
785c042f1f | ||
|
|
ae0f955a0e | ||
|
|
e6acc4e7ed | ||
|
|
2602d03b34 | ||
|
|
dea95c7339 | ||
|
|
b146673c3d | ||
|
|
e73eed247e | ||
|
|
89e3bc8d56 | ||
|
|
d7edf0b229 | ||
|
|
4bc366b984 | ||
|
|
41d43e8d95 | ||
|
|
4cd2273349 | ||
|
|
309c0a0cb6 | ||
|
|
882f132062 | ||
|
|
af1ffce084 | ||
|
|
a94c9a73ba | ||
|
|
915446417d | ||
|
|
8f8d7c4088 | ||
|
|
b0bc6ce637 | ||
|
|
fbc525d683 | ||
|
|
db15bc6466 | ||
|
|
f63436c8d3 | ||
|
|
7b746d21f9 | ||
|
|
ed40ea010b | ||
|
|
3dca2cd26a | ||
|
|
71cd25a798 | ||
|
|
ea1e8797a3 | ||
|
|
8fc7bf2af4 | ||
|
|
95d6008332 | ||
|
|
b99f90ed80 | ||
|
|
251bf0ec31 | ||
|
|
b1363fce8e | ||
|
|
4ba438a7ec | ||
|
|
ead44a27ca | ||
|
|
1f14b7cb1b | ||
|
|
a9a3b05cc3 | ||
|
|
ca047c3e58 | ||
|
|
2540667f04 | ||
|
|
4125ce877d | ||
|
|
f1364b1e0b | ||
|
|
5b2b2c7796 | ||
|
|
cc65c8bd70 | ||
|
|
e0378737b7 | ||
|
|
d085f0fb52 | ||
|
|
efded8f0bb | ||
|
|
8ac7c451e1 | ||
|
|
1f3cf59c7f | ||
|
|
c439d784ac | ||
|
|
42ac5b2f40 | ||
|
|
c07499ccfc | ||
|
|
4b85062caf | ||
|
|
077828d0d9 | ||
|
|
8717c7bd00 | ||
|
|
23d0fb2d3f | ||
|
|
afb15978d9 | ||
|
|
287880aa27 | ||
|
|
b9ed4793ea | ||
|
|
dadd097f32 | ||
|
|
017318f117 | ||
|
|
18ac8b20fa | ||
|
|
63701de45f | ||
|
|
7892541383 | ||
|
|
358658fa34 | ||
|
|
68602b2eaf | ||
|
|
e84ac56e35 | ||
|
|
47c000a293 | ||
|
|
304ce4cd54 | ||
|
|
d54646d342 | ||
|
|
7abaa8d4cd | ||
|
|
2796283550 | ||
|
|
7602308835 | ||
|
|
bc43019467 | ||
|
|
8449f5f6db | ||
|
|
0eb047ca33 | ||
|
|
98048cb06d | ||
|
|
6e995972bb | ||
|
|
08fad862aa | ||
|
|
c3477a4d08 | ||
|
|
062207e696 | ||
|
|
24c1230c7b | ||
|
|
eb79a76742 | ||
|
|
c0328e5363 | ||
|
|
8d822d8231 | ||
|
|
a11b25f3f5 | ||
|
|
90121dc66f | ||
|
|
d74af2f1a7 | ||
|
|
b6c71b2379 | ||
|
|
c261c26456 | ||
|
|
5abf220979 | ||
|
|
1ceeea34f4 | ||
|
|
3ae1fd459a | ||
|
|
0e86366324 | ||
|
|
58ad604a4b | ||
|
|
415e96184d | ||
|
|
8654e16725 | ||
|
|
eb8b449817 | ||
|
|
22c81e5292 | ||
|
|
42a35cec83 | ||
|
|
fc8c6742c4 | ||
|
|
ee9258cefd | ||
|
|
5e89371ecd | ||
|
|
abcd2e0b81 | ||
|
|
d12ce68e64 | ||
|
|
83fd837d75 | ||
|
|
7d3f0628c4 | ||
|
|
27bbe3a873 | ||
|
|
5a8720a484 | ||
|
|
e51221d247 | ||
|
|
0890125962 | ||
|
|
0667cbf5a2 | ||
|
|
ba62808fe8 | ||
|
|
50819ace8f | ||
|
|
ef0219c2ed | ||
|
|
f4bdf72aa4 | ||
|
|
cc352f3b66 | ||
|
|
215b000793 | ||
|
|
e8728acc5c | ||
|
|
166e02955e | ||
|
|
138111a542 | ||
|
|
191cb117f9 | ||
|
|
a57677120a | ||
|
|
75dcd94b90 | ||
|
|
d027fc9a88 | ||
|
|
a11d526110 | ||
|
|
eb797c502a | ||
|
|
567b9a997a | ||
|
|
319e270664 | ||
|
|
d015944f6c | ||
|
|
b7f01b0cc7 | ||
|
|
54bf5d62f2 | ||
|
|
849a583f66 | ||
|
|
0cb7735125 | ||
|
|
028949beca | ||
|
|
6bdeb10c16 | ||
|
|
44cbae8fad | ||
|
|
f7b2d4760f | ||
|
|
1ec19c2ad2 | ||
|
|
9bfd39f036 | ||
|
|
cfff6c4fd7 | ||
|
|
147dd3d372 | ||
|
|
cda3dc08ca | ||
|
|
78b4f929ce | ||
|
|
2c50066c16 |
@@ -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'
|
WarningsAsErrors: '-*,modernize-use-emplace,performance-type-promotion-in-math-fn,performance-faster-string-find,performance-implicit-cast-in-loop'
|
||||||
CheckOptions:
|
CheckOptions:
|
||||||
- key: performance-unnecessary-value-param.AllowedTypes
|
- key: performance-unnecessary-value-param.AllowedTypes
|
||||||
|
|||||||
20
.github/CONTRIBUTING.md
vendored
20
.github/CONTRIBUTING.md
vendored
@@ -25,16 +25,16 @@ Contributions are welcome! Here's how you can help:
|
|||||||
the work, to avoid disappointment.
|
the work, to avoid disappointment.
|
||||||
|
|
||||||
You may also benefit from discussing on our IRC development channel
|
You may also benefit from discussing on our IRC development channel
|
||||||
[#luanti-dev](http://www.luanti.org/irc/). Note that a proper IRC client
|
[#luanti-dev](https://docs.luanti.org/about/irc/). Note that a proper IRC client
|
||||||
is required to speak on this channel.
|
is required to speak on this channel.
|
||||||
|
|
||||||
3. Start coding!
|
3. Start coding!
|
||||||
- Refer to the
|
- Refer to the
|
||||||
[Lua API](https://github.com/luanti-org/luanti/blob/master/doc/lua_api.md),
|
[Lua API](https://github.com/luanti-org/luanti/blob/master/doc/lua_api.md),
|
||||||
[Developer Wiki](https://dev.luanti.org/) and other
|
[Luanti Documentation](https://docs.luanti.org/) and other
|
||||||
[documentation](https://github.com/luanti-org/luanti/tree/master/doc).
|
[documentation](https://github.com/luanti-org/luanti/tree/master/doc).
|
||||||
- Follow the [C/C++](https://dev.luanti.org/Code_style_guidelines) and
|
- Follow the [C/C++](https://docs.luanti.org/for-engine-devs/code-style-guidelines/) and
|
||||||
[Lua](https://dev.luanti.org/Lua_code_style_guidelines) code style guidelines.
|
[Lua](https://docs.luanti.org/for-engine-devs/lua-code-style-guidelines/) code style guidelines.
|
||||||
- Check your code works as expected and document any changes to the Lua API.
|
- 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.
|
- To avoid conflicting changes between contributions, do not do the following manually. They will be done before each release.
|
||||||
- Run `updatepo.sh` or update `luanti.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.
|
||||||
@@ -64,8 +64,8 @@ Contributions are welcome! Here's how you can help:
|
|||||||
picture of the project.
|
picture of the project.
|
||||||
2. It works.
|
2. It works.
|
||||||
3. It follows the code style for
|
3. It follows the code style for
|
||||||
[C/C++](https://dev.luanti.org/Code_style_guidelines) or
|
[C/C++](https://docs.luanti.org/for-engine-devs/code-style-guidelines/) or
|
||||||
[Lua](https://dev.luanti.org/Lua_code_style_guidelines).
|
[Lua](https://docs.luanti.org/for-engine-devs/lua-code-style-guidelines/).
|
||||||
4. The code's interfaces are well designed, regardless of other aspects that
|
4. The code's interfaces are well designed, regardless of other aspects that
|
||||||
might need more work in the future.
|
might need more work in the future.
|
||||||
5. It uses protocols and formats which include the required compatibility.
|
5. It uses protocols and formats which include the required compatibility.
|
||||||
@@ -106,7 +106,7 @@ the project page with a list of current languages
|
|||||||
Builtin (the component which contains things like server messages, chat command
|
Builtin (the component which contains things like server messages, chat command
|
||||||
descriptions, privilege descriptions) is translated separately; it needs to be
|
descriptions, privilege descriptions) is translated separately; it needs to be
|
||||||
translated by editing a `.tr` text file. See
|
translated by editing a `.tr` text file. See
|
||||||
[Translation](https://dev.luanti.org/Translation) for more information.
|
[Translation](https://docs.luanti.org/for-creators/translation/) for more information.
|
||||||
|
|
||||||
## Donations
|
## Donations
|
||||||
|
|
||||||
@@ -116,11 +116,11 @@ methods on [our website](http://www.luanti.org/development/#donate).
|
|||||||
# Maintaining
|
# Maintaining
|
||||||
|
|
||||||
* This is a concise version of the
|
* This is a concise version of the
|
||||||
[Rules & Guidelines](https://dev.luanti.org/engine-dev-process/) on the developer wiki.*
|
[Rules & Guidelines](https://docs.luanti.org/for-engine-devs/) on the Luanti Documentation.*
|
||||||
|
|
||||||
These notes are for those who have push access Luanti (core developers / maintainers).
|
These notes are for those who have push access Luanti (core developers / maintainers).
|
||||||
|
|
||||||
- See the [project organisation](https://dev.luanti.org/Organisation) for the people involved.
|
- See the [project organisation](https://docs.luanti.org/for-engine-devs/organization/) for the people involved.
|
||||||
|
|
||||||
## Concept approvals and roadmaps
|
## Concept approvals and roadmaps
|
||||||
|
|
||||||
@@ -169,4 +169,4 @@ Submit a :+1: (+1) or "Looks good" comment to show you believe the pull-request
|
|||||||
|
|
||||||
## Releasing a new version
|
## Releasing a new version
|
||||||
|
|
||||||
*Refer to [dev.luanti.org/Releasing_Luanti](https://dev.luanti.org/Releasing_Luanti)*
|
*Refer to [docs.luanti.org/for-engine-devs/releasing-luanti](https://docs.luanti.org/for-engine-devs/releasing-luanti/)*
|
||||||
|
|||||||
37
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
37
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
@@ -1,5 +1,5 @@
|
|||||||
name: Bug report
|
name: Bug report
|
||||||
description: Create a report to help us improve
|
description: Report a problem or mistake
|
||||||
labels: ["Unconfirmed bug"]
|
labels: ["Unconfirmed bug"]
|
||||||
body:
|
body:
|
||||||
- type: markdown
|
- type: markdown
|
||||||
@@ -7,16 +7,17 @@ body:
|
|||||||
value: |
|
value: |
|
||||||
Please note the following:
|
Please note the following:
|
||||||
|
|
||||||
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.
|
1. **Update Luanti to the latest stable or dev version** before submitting a bug report. 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.
|
2. This page is for reporting the bugs of **the engine itself**. For bugs in a particular game, please [search for the game on ContentDB](https://content.luanti.org/packages/?type=game) and submit a bug report to its developers.
|
||||||
* For example, you can submit issues about the Minetest Game [in its own repository](https://github.com/luanti-org/minetest_game/issues).
|
* For example, issues about Minetest Game are submitted to [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.
|
3. Please provide as many relevant details as possible.
|
||||||
|
4. If you have used an LLM/AI to format your issue description, disclose this. Try to keep it concise. No walls of text please.
|
||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Luanti version
|
label: Luanti version
|
||||||
description: |
|
description: |
|
||||||
Paste the Luanti 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 `luanti --version` on the command line.
|
Refer to the "About" tab of the menu or run `luanti --version` on the command line.
|
||||||
placeholder: |
|
placeholder: |
|
||||||
Example:
|
Example:
|
||||||
@@ -34,27 +35,28 @@ body:
|
|||||||
render: "true"
|
render: "true"
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
- type: input
|
- type: input
|
||||||
attributes:
|
attributes:
|
||||||
label: Operating system and version
|
label: Operating system and version
|
||||||
description: It is recommended to upgrade your operating system to see if the problem persists.
|
description: Keeping your OS up-to-date can solve some problems on its own.
|
||||||
placeholder: "Example: Ubuntu 22.04"
|
placeholder: "Example: Ubuntu 22.04"
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: input
|
- type: input
|
||||||
attributes:
|
attributes:
|
||||||
label: CPU model
|
label: CPU model
|
||||||
description: Usually found in OS/system settings.
|
description: Usually found in OS/system settings
|
||||||
placeholder: "Example: Intel Core i5-2410M"
|
placeholder: "Example: Intel Core i5-2410M"
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
- type: markdown
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
value: The GPU model and renderer can be omitted if the bug is not a graphical issue.
|
value: If the bug is server-side please skip the "GPU model" and "Active renderer" fields.
|
||||||
- type: input
|
- type: input
|
||||||
attributes:
|
attributes:
|
||||||
label: GPU model
|
label: GPU model
|
||||||
description: Usually found in OS/system settings.
|
description: Usually found in OS/system settings
|
||||||
placeholder: "Example: NVIDIA GeForce GTX 1660"
|
placeholder: "Example: NVIDIA GeForce GTX 1660"
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
@@ -65,15 +67,26 @@ body:
|
|||||||
placeholder: "Example: ES 3.2 / ogles2 / X11"
|
placeholder: "Example: ES 3.2 / ogles2 / X11"
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Summary
|
label: Summary
|
||||||
description: Describe your problem here.
|
description: |
|
||||||
|
Describe your problem here.
|
||||||
|
|
||||||
|
Make sure to include the all error messages you see and/or screenshots in case of visual bugs.
|
||||||
|
Attaching a copy of your `debug.txt` and `minetest.conf` can be helpful as well.
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Steps to reproduce
|
label: Steps to reproduce
|
||||||
description: Explain how the problem has happened, providing a minimal test (e.g. a minimized code snippet) where possible.
|
description: |
|
||||||
|
Explain how the problem has happened.
|
||||||
|
|
||||||
|
To the extent possible, the reproduction steps should describe not just what you did (e.g. "I open my world and it crashes")
|
||||||
|
but be detailed enough so that anyone with a fresh installation of Luanti could follow these steps to encounter the same problem.
|
||||||
|
In case of modding issues it is often useful to include a code snippet.
|
||||||
|
This will help us diagnose the problem quicker and more efficiently. Thank you.
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|||||||
1
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
1
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
@@ -8,6 +8,7 @@ body:
|
|||||||
Please note the following:
|
Please note the following:
|
||||||
1. Only submit a feature request if the feature does not exist on the latest dev version.
|
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.luanti.org/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.
|
||||||
|
3. If you have used an LLM/AI to format your issue description, disclose this. Try to keep it concise. No walls of text please.
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Problem
|
label: Problem
|
||||||
|
|||||||
64
.github/workflows/linux.yml
vendored
64
.github/workflows/linux.yml
vendored
@@ -14,6 +14,7 @@ on:
|
|||||||
- 'cmake/Modules/**'
|
- 'cmake/Modules/**'
|
||||||
- 'po/**.po'
|
- 'po/**.po'
|
||||||
- 'util/ci/**'
|
- 'util/ci/**'
|
||||||
|
- 'util/helper_mod/**'
|
||||||
- '.github/workflows/linux.yml'
|
- '.github/workflows/linux.yml'
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
@@ -27,6 +28,7 @@ on:
|
|||||||
- 'cmake/Modules/**'
|
- 'cmake/Modules/**'
|
||||||
- 'po/**.po'
|
- 'po/**.po'
|
||||||
- 'util/ci/**'
|
- 'util/ci/**'
|
||||||
|
- 'util/helper_mod/**'
|
||||||
- '.github/workflows/linux.yml'
|
- '.github/workflows/linux.yml'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
@@ -34,28 +36,32 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Older gcc version (should be close to our minimum supported version)
|
# Older gcc version (should be close to our minimum supported version)
|
||||||
gcc_7:
|
gcc_9:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: |
|
run: |
|
||||||
source ./util/ci/common.sh
|
source ./util/ci/common.sh
|
||||||
install_linux_deps g++-7
|
install_linux_deps g++-9
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
./util/ci/build.sh
|
./util/ci/build.sh
|
||||||
env:
|
env:
|
||||||
CC: gcc-7
|
CC: gcc-9
|
||||||
CXX: g++-7
|
CXX: g++-9
|
||||||
# Test fallback SHA implementations
|
CMAKE_FLAGS: '-DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_CXX_FLAGS="-fsanitize=address"'
|
||||||
CMAKE_FLAGS: '-DENABLE_OPENSSL=0'
|
|
||||||
|
|
||||||
- name: Test
|
- name: Unittest
|
||||||
run: |
|
run: |
|
||||||
./bin/luanti --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 gcc version
|
# Current gcc version
|
||||||
gcc_14:
|
gcc_14:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
@@ -72,6 +78,8 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CC: gcc-14
|
CC: gcc-14
|
||||||
CXX: g++-14
|
CXX: g++-14
|
||||||
|
# just to check that they compile correctly
|
||||||
|
CMAKE_FLAGS: '-DBUILD_BENCHMARKS=1'
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
@@ -81,32 +89,28 @@ jobs:
|
|||||||
../bin/luanti --run-unittests
|
../bin/luanti --run-unittests
|
||||||
|
|
||||||
# Older clang version (should be close to our minimum supported version)
|
# Older clang version (should be close to our minimum supported version)
|
||||||
clang_7:
|
clang_11:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: |
|
run: |
|
||||||
source ./util/ci/common.sh
|
source ./util/ci/common.sh
|
||||||
install_linux_deps clang-7 llvm-7
|
install_linux_deps clang-11
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
./util/ci/build.sh
|
./util/ci/build.sh
|
||||||
env:
|
env:
|
||||||
CC: clang-7
|
CC: clang-11
|
||||||
CXX: clang++-7
|
CXX: clang++-11
|
||||||
CMAKE_FLAGS: '-DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_CXX_FLAGS="-fsanitize=address"'
|
# Test fallback SHA implementations
|
||||||
|
CMAKE_FLAGS: '-DENABLE_OPENSSL=0'
|
||||||
|
|
||||||
- name: Unittest
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
./bin/luanti --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
|
# Current clang version
|
||||||
clang_18:
|
clang_18:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
@@ -115,7 +119,7 @@ jobs:
|
|||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: |
|
run: |
|
||||||
source ./util/ci/common.sh
|
source ./util/ci/common.sh
|
||||||
install_linux_deps clang-18 lldb
|
install_linux_deps clang-18 lldb xvfb
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
@@ -132,16 +136,20 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
./util/test_multiplayer.sh
|
./util/test_multiplayer.sh
|
||||||
|
|
||||||
# Build with prometheus-cpp (server-only)
|
- name: Singleplayer test
|
||||||
clang_11_prometheus:
|
run: |
|
||||||
name: "clang_11 (PROMETHEUS=1)"
|
xvfb-run ./util/test_singleplayer.sh
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
|
# Build with prometheus-cpp (server-only), also runs on ARM64
|
||||||
|
clang_prometheus_arm:
|
||||||
|
name: "clang (with Prometheus, ARM64)"
|
||||||
|
runs-on: ubuntu-24.04-arm
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: |
|
run: |
|
||||||
source ./util/ci/common.sh
|
source ./util/ci/common.sh
|
||||||
install_linux_deps clang-11
|
install_linux_deps --headless clang libluajit-5.1-dev
|
||||||
|
|
||||||
- name: Build prometheus-cpp
|
- name: Build prometheus-cpp
|
||||||
run: ./util/ci/build_prometheus_cpp.sh
|
run: ./util/ci/build_prometheus_cpp.sh
|
||||||
@@ -150,8 +158,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
./util/ci/build.sh
|
./util/ci/build.sh
|
||||||
env:
|
env:
|
||||||
CC: clang-11
|
CC: clang
|
||||||
CXX: clang++-11
|
CXX: clang++
|
||||||
CMAKE_FLAGS: "-DENABLE_PROMETHEUS=1 -DBUILD_CLIENT=0 -DENABLE_CURSES=0"
|
CMAKE_FLAGS: "-DENABLE_PROMETHEUS=1 -DBUILD_CLIENT=0 -DENABLE_CURSES=0"
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
|
|||||||
6
.github/workflows/lua.yml
vendored
6
.github/workflows/lua.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
|||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: |
|
run: |
|
||||||
source ./util/ci/common.sh
|
source ./util/ci/common.sh
|
||||||
install_linux_deps clang gdb libluajit-5.1-dev
|
install_linux_deps clang gdb libluajit-5.1-dev xvfb
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
@@ -37,6 +37,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
serverconf="profiler.load=true" ./util/test_multiplayer.sh
|
serverconf="profiler.load=true" ./util/test_multiplayer.sh
|
||||||
|
|
||||||
|
- name: Singleplayer test (GL3)
|
||||||
|
run: |
|
||||||
|
clientconf="video_driver=opengl3" xvfb-run ./util/test_singleplayer.sh
|
||||||
|
|
||||||
luacheck:
|
luacheck:
|
||||||
name: "Builtin Luacheck and Unit Tests"
|
name: "Builtin Luacheck and Unit Tests"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
2
.github/workflows/macos.yml
vendored
2
.github/workflows/macos.yml
vendored
@@ -45,7 +45,7 @@ jobs:
|
|||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake .. \
|
cmake .. \
|
||||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 \
|
-DCMAKE_OSX_DEPLOYMENT_TARGET=13 \
|
||||||
-DCMAKE_FIND_FRAMEWORK=LAST \
|
-DCMAKE_FIND_FRAMEWORK=LAST \
|
||||||
-DCMAKE_INSTALL_PREFIX=../build/macos/ \
|
-DCMAKE_INSTALL_PREFIX=../build/macos/ \
|
||||||
-DRUN_IN_PLACE=FALSE -DENABLE_GETTEXT=TRUE \
|
-DRUN_IN_PLACE=FALSE -DENABLE_GETTEXT=TRUE \
|
||||||
|
|||||||
27
.github/workflows/whitespace_checks.yml
vendored
27
.github/workflows/whitespace_checks.yml
vendored
@@ -50,29 +50,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
# Line endings are already ensured by .gitattributes
|
# Line endings are already ensured by .gitattributes
|
||||||
# Multiple multline comments in one line is not supported by this check
|
# Warning: Multiple multline comments in one line
|
||||||
# and there is no reason to use them
|
# is not supported by this check and may misbehave.
|
||||||
# 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
|
# This prepare files for final check
|
||||||
# See python script ./util/ci/indent_tab_preprocess.py for details.
|
# See python script ./util/ci/indent_tab_preprocess.py for details.
|
||||||
- name: Preprocess files
|
- name: Preprocess files
|
||||||
@@ -92,7 +71,7 @@ jobs:
|
|||||||
- name: Check indent spaces
|
- name: Check indent spaces
|
||||||
run: |
|
run: |
|
||||||
if git ls-files |\
|
if git ls-files |\
|
||||||
grep -E '^src/.*\.cpp$|^src/.*\.[ch]$|\.lua' |\
|
grep -E '^src/.*\.cpp$|^src/.*\.[ch]$|\.lua$' |\
|
||||||
xargs grep -n -P '^\t*[ ]';\
|
xargs grep -n -P '^\t*[ ]';\
|
||||||
then\
|
then\
|
||||||
echo -e "\033[0;31mFound incorrect indent whitespaces";\
|
echo -e "\033[0;31mFound incorrect indent whitespaces";\
|
||||||
|
|||||||
20
.github/workflows/windows.yml
vendored
20
.github/workflows/windows.yml
vendored
@@ -68,24 +68,22 @@ jobs:
|
|||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
msvc:
|
msvc:
|
||||||
name: VS 2019 ${{ matrix.config.arch }}-${{ matrix.type }}
|
name: VS 2022 ${{ matrix.config.arch }}-${{ matrix.type }}
|
||||||
runs-on: windows-2019
|
runs-on: windows-2025
|
||||||
env:
|
env:
|
||||||
VCPKG_VERSION: 01f602195983451bc83e72f4214af2cbc495aa94
|
VCPKG_DEFAULT_TRIPLET: ${{matrix.config.vcpkg_triplet}}
|
||||||
# 2024.05.24
|
|
||||||
vcpkg_packages: zlib zstd curl[winssl] openal-soft libvorbis libogg libjpeg-turbo sqlite3 freetype luajit gmp jsoncpp opengl-registry
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- {
|
- {
|
||||||
arch: x86,
|
arch: x86,
|
||||||
generator: "-G'Visual Studio 16 2019' -A Win32",
|
generator: "-G'Visual Studio 17 2022' -A Win32",
|
||||||
vcpkg_triplet: x86-windows
|
vcpkg_triplet: x86-windows
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
arch: x64,
|
arch: x64,
|
||||||
generator: "-G'Visual Studio 16 2019' -A x64",
|
generator: "-G'Visual Studio 17 2022' -A x64",
|
||||||
vcpkg_triplet: x64-windows
|
vcpkg_triplet: x64-windows
|
||||||
}
|
}
|
||||||
type: [portable]
|
type: [portable]
|
||||||
@@ -97,19 +95,17 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Restore from cache and run vcpkg
|
- name: Restore from cache and run vcpkg
|
||||||
uses: lukka/run-vcpkg@v7
|
uses: lukka/run-vcpkg@v11
|
||||||
with:
|
with:
|
||||||
vcpkgArguments: ${{env.vcpkg_packages}}
|
|
||||||
vcpkgDirectory: '${{ github.workspace }}\vcpkg'
|
vcpkgDirectory: '${{ github.workspace }}\vcpkg'
|
||||||
appendedCacheKey: ${{ matrix.config.vcpkg_triplet }}
|
|
||||||
vcpkgGitCommitId: ${{ env.VCPKG_VERSION }}
|
|
||||||
vcpkgTriplet: ${{ matrix.config.vcpkg_triplet }}
|
|
||||||
|
|
||||||
- name: CMake
|
- name: CMake
|
||||||
|
# Note: See #15976 for why CMAKE_POLICY_VERSION_MINIMUM=3.5 is set.
|
||||||
run: |
|
run: |
|
||||||
cmake ${{matrix.config.generator}} `
|
cmake ${{matrix.config.generator}} `
|
||||||
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake" `
|
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake" `
|
||||||
-DCMAKE_BUILD_TYPE=Release `
|
-DCMAKE_BUILD_TYPE=Release `
|
||||||
|
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 `
|
||||||
-DENABLE_POSTGRESQL=OFF `
|
-DENABLE_POSTGRESQL=OFF `
|
||||||
-DENABLE_LUAJIT=TRUE `
|
-DENABLE_LUAJIT=TRUE `
|
||||||
-DREQUIRE_LUAJIT=TRUE `
|
-DREQUIRE_LUAJIT=TRUE `
|
||||||
|
|||||||
19
.luacheckrc
19
.luacheckrc
@@ -19,10 +19,11 @@ read_globals = {
|
|||||||
"VoxelManip",
|
"VoxelManip",
|
||||||
"profiler",
|
"profiler",
|
||||||
"Settings",
|
"Settings",
|
||||||
"PerlinNoise", "PerlinNoiseMap",
|
"ValueNoise", "ValueNoiseMap",
|
||||||
|
"tracy",
|
||||||
|
|
||||||
string = {fields = {"split", "trim"}},
|
string = {fields = {"split", "trim"}},
|
||||||
table = {fields = {"copy", "getn", "indexof", "keyof", "insert_all"}},
|
table = {fields = {"copy", "copy_with_metatables", "getn", "indexof", "keyof", "insert_all", "shuffle"}},
|
||||||
math = {fields = {"hypot", "round"}},
|
math = {fields = {"hypot", "round"}},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,7 +34,14 @@ globals = {
|
|||||||
"_",
|
"_",
|
||||||
}
|
}
|
||||||
|
|
||||||
files["builtin/client/register.lua"] = {
|
stds.menu_common = {
|
||||||
|
globals = {
|
||||||
|
"mt_color_grey", "mt_color_blue", "mt_color_lightblue", "mt_color_green",
|
||||||
|
"mt_color_dark_green", "mt_color_orange", "mt_color_red",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
files["builtin/client/init.lua"] = {
|
||||||
globals = {
|
globals = {
|
||||||
debug = {fields={"getinfo"}},
|
debug = {fields={"getinfo"}},
|
||||||
}
|
}
|
||||||
@@ -73,11 +81,16 @@ files["builtin/common/filterlist.lua"] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
files["builtin/mainmenu"] = {
|
files["builtin/mainmenu"] = {
|
||||||
|
std = "+menu_common",
|
||||||
globals = {
|
globals = {
|
||||||
"gamedata",
|
"gamedata",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
files["builtin/common/settings"] = {
|
||||||
|
std = "+menu_common",
|
||||||
|
}
|
||||||
|
|
||||||
files["builtin/common/tests"] = {
|
files["builtin/common/tests"] = {
|
||||||
read_globals = {
|
read_globals = {
|
||||||
"describe",
|
"describe",
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
cmake_minimum_required(VERSION 3.12)
|
cmake_minimum_required(VERSION 3.12)
|
||||||
|
if(POLICY CMP0177)
|
||||||
|
cmake_policy(SET CMP0177 NEW)
|
||||||
|
endif()
|
||||||
|
|
||||||
# This can be read from ${PROJECT_NAME} after project() is called
|
# This can be read from ${PROJECT_NAME} after project() is called
|
||||||
project(luanti)
|
project(luanti)
|
||||||
@@ -11,7 +14,7 @@ set(CLANG_MINIMUM_VERSION "7.0.1")
|
|||||||
|
|
||||||
# You should not need to edit these manually, use util/bump_version.sh
|
# You should not need to edit these manually, use util/bump_version.sh
|
||||||
set(VERSION_MAJOR 5)
|
set(VERSION_MAJOR 5)
|
||||||
set(VERSION_MINOR 11)
|
set(VERSION_MINOR 15)
|
||||||
set(VERSION_PATCH 0)
|
set(VERSION_PATCH 0)
|
||||||
set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string")
|
set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string")
|
||||||
|
|
||||||
@@ -166,15 +169,15 @@ elseif(UNIX) # Linux, BSD etc
|
|||||||
set(LOCALEDIR "locale")
|
set(LOCALEDIR "locale")
|
||||||
else()
|
else()
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
set(SHAREDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}")
|
set(SHAREDIR "${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}")
|
||||||
set(BINDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
|
set(BINDIR "${CMAKE_INSTALL_FULL_BINDIR}")
|
||||||
set(DOCDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DOCDIR}")
|
set(DOCDIR "${CMAKE_INSTALL_FULL_DOCDIR}")
|
||||||
set(MANDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_MANDIR}")
|
set(MANDIR "${CMAKE_INSTALL_FULL_MANDIR}")
|
||||||
set(EXAMPLE_CONF_DIR ${DOCDIR})
|
set(EXAMPLE_CONF_DIR ${DOCDIR})
|
||||||
set(XDG_APPS_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/applications")
|
set(XDG_APPS_DIR "${CMAKE_INSTALL_FULL_DATADIR}/applications")
|
||||||
set(METAINFODIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/metainfo")
|
set(METAINFODIR "${CMAKE_INSTALL_FULL_DATADIR}/metainfo")
|
||||||
set(ICONDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/icons")
|
set(ICONDIR "${CMAKE_INSTALL_FULL_DATADIR}/icons")
|
||||||
set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LOCALEDIR}")
|
set(LOCALEDIR "${CMAKE_INSTALL_FULL_LOCALEDIR}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -262,8 +265,8 @@ install(FILES "minetest.conf.example" DESTINATION "${EXAMPLE_CONF_DIR}")
|
|||||||
|
|
||||||
if(UNIX AND NOT APPLE)
|
if(UNIX AND NOT APPLE)
|
||||||
install(FILES "doc/luanti.6" "doc/luantiserver.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/org.luanti.luanti.desktop" DESTINATION "${XDG_APPS_DIR}")
|
||||||
install(FILES "misc/net.minetest.minetest.metainfo.xml" DESTINATION "${METAINFODIR}")
|
install(FILES "misc/org.luanti.luanti.metainfo.xml" DESTINATION "${METAINFODIR}")
|
||||||
install(FILES "misc/luanti.svg" DESTINATION "${ICONDIR}/hicolor/scalable/apps")
|
install(FILES "misc/luanti.svg" DESTINATION "${ICONDIR}/hicolor/scalable/apps")
|
||||||
install(FILES "misc/luanti-xorg-icon-128.png"
|
install(FILES "misc/luanti-xorg-icon-128.png"
|
||||||
DESTINATION "${ICONDIR}/hicolor/128x128/apps"
|
DESTINATION "${ICONDIR}/hicolor/128x128/apps"
|
||||||
|
|||||||
@@ -102,6 +102,14 @@ grorp:
|
|||||||
using the font "undefined medium" (https://undefined-medium.com/),
|
using the font "undefined medium" (https://undefined-medium.com/),
|
||||||
which is licensed under the SIL Open Font License, Version 1.1
|
which is licensed under the SIL Open Font License, Version 1.1
|
||||||
modified by DS
|
modified by DS
|
||||||
|
textures/base/pack/dig_btn.png
|
||||||
|
textures/base/pack/place_btn.png
|
||||||
|
derived by editing the text in aux1_btn.svg
|
||||||
|
|
||||||
|
Material Design, Google (Apache license v2.0):
|
||||||
|
textures/base/pack/contentdb_thumb_up.png
|
||||||
|
textures/base/pack/contentdb_thumb_down.png
|
||||||
|
textures/base/pack/contentdb_neutral.png
|
||||||
|
|
||||||
License of Luanti source code
|
License of Luanti source code
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|||||||
19
README.md
19
README.md
@@ -1,13 +1,15 @@
|
|||||||
Luanti (formerly 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">
|
||||||
[](https://hosted.weblate.org/engage/minetest/?utm_source=widget)
|
<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>
|
||||||
[](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html)
|
<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>
|
||||||
|
|
||||||
Luanti is a free open-source voxel game engine with easy modding and game creation.
|
Luanti is a free open-source voxel game engine with easy modding and game creation.
|
||||||
|
|
||||||
Copyright (C) 2010-2024 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)
|
and contributors (see source file comments and the version control log)
|
||||||
|
|
||||||
Table of Contents
|
Table of Contents
|
||||||
@@ -26,7 +28,7 @@ Table of Contents
|
|||||||
Further documentation
|
Further documentation
|
||||||
----------------------
|
----------------------
|
||||||
- Website: https://www.luanti.org/
|
- Website: https://www.luanti.org/
|
||||||
- Wiki: https://wiki.luanti.org/
|
- Luanti Documentation: https://docs.luanti.org/
|
||||||
- Forum: https://forum.luanti.org/
|
- Forum: https://forum.luanti.org/
|
||||||
- GitHub: https://github.com/luanti-org/luanti/
|
- GitHub: https://github.com/luanti-org/luanti/
|
||||||
- [Developer documentation](doc/developing/)
|
- [Developer documentation](doc/developing/)
|
||||||
@@ -55,6 +57,7 @@ Some can be changed in the key config dialog in the settings tab.
|
|||||||
| T | Chat |
|
| T | Chat |
|
||||||
| / | Command |
|
| / | Command |
|
||||||
| Esc | Pause menu/abort/exit (pauses only singleplayer game) |
|
| Esc | Pause menu/abort/exit (pauses only singleplayer game) |
|
||||||
|
| Shift + Esc | Exit directly to main menu from anywhere, bypassing pause menu |
|
||||||
| + | Increase view range |
|
| + | Increase view range |
|
||||||
| - | Decrease view range |
|
| - | Decrease view range |
|
||||||
| K | Enable/disable fly mode (needs fly privilege) |
|
| K | Enable/disable fly mode (needs fly privilege) |
|
||||||
|
|||||||
@@ -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
|
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
|
--- a/android/app/src/main/java/org/libsdl/app/SDLActivity.java
|
||||||
+++ b/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
|
@@ -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) {
|
||||||
+ 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
|
+ * should be upstreamed
|
||||||
+ */
|
+ */
|
||||||
+ (source & InputDevice.SOURCE_MOUSE_RELATIVE) == InputDevice.SOURCE_MOUSE_RELATIVE) {
|
+ (source & InputDevice.SOURCE_MOUSE_RELATIVE) == InputDevice.SOURCE_MOUSE_RELATIVE) {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ android {
|
|||||||
applicationId 'net.minetest.minetest'
|
applicationId 'net.minetest.minetest'
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
compileSdk 34
|
compileSdk 34
|
||||||
targetSdkVersion 34
|
targetSdkVersion 35
|
||||||
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
|
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
|
||||||
versionCode versionMajor * 1000000 + versionMinor * 10000 + versionPatch * 100 + versionBuild
|
versionCode versionMajor * 1000000 + versionMinor * 10000 + versionPatch * 100 + versionBuild
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,14 +22,19 @@ package net.minetest.minetest;
|
|||||||
|
|
||||||
import org.libsdl.app.SDLActivity;
|
import org.libsdl.app.SDLActivity;
|
||||||
|
|
||||||
|
import android.app.Notification;
|
||||||
|
import android.app.NotificationManager;
|
||||||
|
import android.app.PendingIntent;
|
||||||
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.ActivityNotFoundException;
|
import android.content.ActivityNotFoundException;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Build;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.os.Looper;
|
||||||
import android.text.InputType;
|
import android.text.InputType;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.View;
|
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.view.inputmethod.InputMethodManager;
|
import android.view.inputmethod.InputMethodManager;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
@@ -91,6 +96,9 @@ public class GameActivity extends SDLActivity {
|
|||||||
saveSettings();
|
saveSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private NotificationManager mNotifyManager;
|
||||||
|
private boolean gameNotificationShown = false;
|
||||||
|
|
||||||
public void showTextInputDialog(String hint, String current, int editType) {
|
public void showTextInputDialog(String hint, String current, int editType) {
|
||||||
runOnUiThread(() -> showTextInputDialogUI(hint, current, editType));
|
runOnUiThread(() -> showTextInputDialogUI(hint, current, editType));
|
||||||
}
|
}
|
||||||
@@ -263,4 +271,67 @@ public class GameActivity extends SDLActivity {
|
|||||||
public boolean hasPhysicalKeyboard() {
|
public boolean hasPhysicalKeyboard() {
|
||||||
return getContext().getResources().getConfiguration().keyboard != Configuration.KEYBOARD_NOKEYS;
|
return getContext().getResources().getConfiguration().keyboard != Configuration.KEYBOARD_NOKEYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: share code with UnzipService.createNotification
|
||||||
|
private void updateGameNotification() {
|
||||||
|
if (mNotifyManager == null) {
|
||||||
|
mNotifyManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!gameNotificationShown) {
|
||||||
|
mNotifyManager.cancel(MainActivity.NOTIFICATION_ID_GAME);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Notification.Builder builder;
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
|
builder = new Notification.Builder(this, MainActivity.NOTIFICATION_CHANNEL_ID);
|
||||||
|
} else {
|
||||||
|
builder = new Notification.Builder(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
Intent notificationIntent = new Intent(this, GameActivity.class);
|
||||||
|
notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
|
||||||
|
| Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||||
|
int pendingIntentFlag = 0;
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||||
|
pendingIntentFlag = PendingIntent.FLAG_MUTABLE;
|
||||||
|
}
|
||||||
|
PendingIntent intent = PendingIntent.getActivity(this, 0,
|
||||||
|
notificationIntent, pendingIntentFlag);
|
||||||
|
|
||||||
|
builder.setContentTitle(getString(R.string.game_notification_title))
|
||||||
|
.setSmallIcon(R.mipmap.ic_launcher)
|
||||||
|
.setContentIntent(intent)
|
||||||
|
.setOngoing(true);
|
||||||
|
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
|
// This avoids a stuck notification if the app is killed while
|
||||||
|
// in-game: (1) if the user closes the app from the "Recents" screen
|
||||||
|
// or (2) if the system kills the app while it is in background.
|
||||||
|
// onStop is called too early to remove the notification and
|
||||||
|
// onDestroy is often not called at all, so there's this hack instead.
|
||||||
|
builder.setTimeoutAfter(16000);
|
||||||
|
|
||||||
|
// Replace the notification just before it expires as long as the app is
|
||||||
|
// running (and we're still in-game).
|
||||||
|
final Handler handler = new Handler(Looper.getMainLooper());
|
||||||
|
handler.postDelayed(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
if (gameNotificationShown) {
|
||||||
|
updateGameNotification();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, 15000);
|
||||||
|
}
|
||||||
|
|
||||||
|
mNotifyManager.notify(MainActivity.NOTIFICATION_ID_GAME, builder.build());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setPlayingNowNotification(boolean show) {
|
||||||
|
gameNotificationShown = show;
|
||||||
|
updateGameNotification();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ import static net.minetest.minetest.UnzipService.*;
|
|||||||
|
|
||||||
public class MainActivity extends AppCompatActivity {
|
public class MainActivity extends AppCompatActivity {
|
||||||
public static final String NOTIFICATION_CHANNEL_ID = "Minetest channel";
|
public static final String NOTIFICATION_CHANNEL_ID = "Minetest channel";
|
||||||
|
public static final int NOTIFICATION_ID_UNZIP = 1;
|
||||||
|
public static final int NOTIFICATION_ID_GAME = 2;
|
||||||
|
|
||||||
private final static int versionCode = BuildConfig.VERSION_CODE;
|
private final static int versionCode = BuildConfig.VERSION_CODE;
|
||||||
private static final String SETTINGS = "MinetestSettings";
|
private static final String SETTINGS = "MinetestSettings";
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ public class UnzipService extends IntentService {
|
|||||||
public static final int SUCCESS = -1;
|
public static final int SUCCESS = -1;
|
||||||
public static final int FAILURE = -2;
|
public static final int FAILURE = -2;
|
||||||
public static final int INDETERMINATE = -3;
|
public static final int INDETERMINATE = -3;
|
||||||
private final int id = 1;
|
|
||||||
private NotificationManager mNotifyManager;
|
private NotificationManager mNotifyManager;
|
||||||
private boolean isSuccess = true;
|
private boolean isSuccess = true;
|
||||||
private String failureMessage;
|
private String failureMessage;
|
||||||
@@ -100,11 +99,14 @@ public class UnzipService extends IntentService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: share code with GameActivity.updateGameNotification
|
||||||
@NonNull
|
@NonNull
|
||||||
private Notification.Builder createNotification() {
|
private Notification.Builder createNotification() {
|
||||||
Notification.Builder builder;
|
if (mNotifyManager == null) {
|
||||||
if (mNotifyManager == null)
|
|
||||||
mNotifyManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
mNotifyManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
|
}
|
||||||
|
|
||||||
|
Notification.Builder builder;
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
builder = new Notification.Builder(this, MainActivity.NOTIFICATION_CHANNEL_ID);
|
builder = new Notification.Builder(this, MainActivity.NOTIFICATION_CHANNEL_ID);
|
||||||
} else {
|
} else {
|
||||||
@@ -128,7 +130,7 @@ public class UnzipService extends IntentService {
|
|||||||
.setOngoing(true)
|
.setOngoing(true)
|
||||||
.setProgress(0, 0, true);
|
.setProgress(0, 0, true);
|
||||||
|
|
||||||
mNotifyManager.notify(id, builder.build());
|
mNotifyManager.notify(MainActivity.NOTIFICATION_ID_UNZIP, builder.build());
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -200,14 +202,14 @@ public class UnzipService extends IntentService {
|
|||||||
} else {
|
} else {
|
||||||
notificationBuilder.setProgress(100, progress, false);
|
notificationBuilder.setProgress(100, progress, false);
|
||||||
}
|
}
|
||||||
mNotifyManager.notify(id, notificationBuilder.build());
|
mNotifyManager.notify(MainActivity.NOTIFICATION_ID_UNZIP, notificationBuilder.build());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
mNotifyManager.cancel(id);
|
mNotifyManager.cancel(MainActivity.NOTIFICATION_ID_UNZIP);
|
||||||
publishProgress(null, R.string.loading, isSuccess ? SUCCESS : FAILURE);
|
publishProgress(null, R.string.loading, isSuccess ? SUCCESS : FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,8 +60,8 @@ import java.util.Locale;
|
|||||||
public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener {
|
public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener {
|
||||||
private static final String TAG = "SDL";
|
private static final String TAG = "SDL";
|
||||||
private static final int SDL_MAJOR_VERSION = 2;
|
private static final int SDL_MAJOR_VERSION = 2;
|
||||||
private static final int SDL_MINOR_VERSION = 30;
|
private static final int SDL_MINOR_VERSION = 32;
|
||||||
private static final int SDL_MICRO_VERSION = 8;
|
private static final int SDL_MICRO_VERSION = 10;
|
||||||
/*
|
/*
|
||||||
// Display InputType.SOURCE/CLASS of events and devices
|
// Display InputType.SOURCE/CLASS of events and devices
|
||||||
//
|
//
|
||||||
@@ -790,6 +790,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||||
SDLActivity.mFullscreenModeActive = false;
|
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 {
|
} else {
|
||||||
Log.e(TAG, "error handling message, getContext() returned no Activity");
|
Log.e(TAG, "error handling message, getContext() returned no Activity");
|
||||||
@@ -1347,7 +1350,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
|||||||
|
|
||||||
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
|
* should be upstreamed
|
||||||
*/
|
*/
|
||||||
(source & InputDevice.SOURCE_MOUSE_RELATIVE) == InputDevice.SOURCE_MOUSE_RELATIVE) {
|
(source & InputDevice.SOURCE_MOUSE_RELATIVE) == InputDevice.SOURCE_MOUSE_RELATIVE) {
|
||||||
|
|||||||
4
android/app/src/main/res/values-az/strings.xml
Normal file
4
android/app/src/main/res/values-az/strings.xml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="label">Luanti</string>
|
||||||
|
</resources>
|
||||||
11
android/app/src/main/res/values-br/strings.xml
Normal file
11
android/app/src/main/res/values-br/strings.xml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="unzip_notification_title">O kargañ Luanti</string>
|
||||||
|
<string name="label">Luanti</string>
|
||||||
|
<string name="loading">O kargañ…</string>
|
||||||
|
<string name="notification_channel_description">Evezhiadennoù gant Luanti</string>
|
||||||
|
<string name="unzip_notification_description">Nebeutoc\'h eget ur vunutenn…</string>
|
||||||
|
<string name="ime_dialog_done">Graet</string>
|
||||||
|
<string name="no_web_browser">Merdeer web ebet bet kavet</string>
|
||||||
|
<string name="notification_channel_name">Evezhiadennoù hollek</string>
|
||||||
|
</resources>
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="label">Luanti</string>
|
<string name="label">Luanti</string>
|
||||||
<string name="loading">Lädt…</string>
|
<string name="loading">Laden …</string>
|
||||||
<string name="unzip_notification_title">Luanti lädt</string>
|
<string name="unzip_notification_title">Luanti lädt</string>
|
||||||
<string name="unzip_notification_description">Weniger als 1 Minute…</string>
|
<string name="unzip_notification_description">Weniger als 1 Minute …</string>
|
||||||
<string name="ime_dialog_done">Fertig</string>
|
<string name="ime_dialog_done">Fertig</string>
|
||||||
<string name="no_web_browser">Kein Web-Browser gefunden</string>
|
<string name="no_web_browser">Keinen Web-Browser gefunden</string>
|
||||||
<string name="notification_channel_name">Allgemeine Benachrichtigung</string>
|
<string name="notification_channel_name">Allgemeine Benachrichtigung</string>
|
||||||
<string name="notification_channel_description">Benachrichtigungen von Luanti</string>
|
<string name="notification_channel_description">Benachrichtigungen von Luanti</string>
|
||||||
</resources>
|
<string name="game_notification_title">Luanti läuft</string>
|
||||||
|
</resources>
|
||||||
|
|||||||
12
android/app/src/main/res/values-el/strings.xml
Normal file
12
android/app/src/main/res/values-el/strings.xml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?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="game_notification_title">Το Luanti εκτελείται</string>
|
||||||
|
<string name="ime_dialog_done">Ολοκληρώθηκε</string>
|
||||||
|
<string name="no_web_browser">Δεν βρέθηκε πρόγραμμα περιήγησης ιστού</string>
|
||||||
|
</resources>
|
||||||
10
android/app/src/main/res/values-fil/strings.xml
Normal file
10
android/app/src/main/res/values-fil/strings.xml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="unzip_notification_title">Loading ang Luanti</string>
|
||||||
|
<string name="unzip_notification_description">Sa loob ng isang minuto…</string>
|
||||||
|
<string name="notification_channel_name">Notification na general</string>
|
||||||
|
<string name="notification_channel_description">Notification mula sa Luanti</string>
|
||||||
|
<string name="game_notification_title">Pina-pagana ang Luanti</string>
|
||||||
|
<string name="ime_dialog_done">Tapos na</string>
|
||||||
|
<string name="no_web_browser">Walang mahanap na web browser</string>
|
||||||
|
</resources>
|
||||||
12
android/app/src/main/res/values-fr/strings.xml
Normal file
12
android/app/src/main/res/values-fr/strings.xml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?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>
|
||||||
|
<string name="game_notification_title">Luanti est en cours d\'exécution</string>
|
||||||
|
</resources>
|
||||||
12
android/app/src/main/res/values-gl/strings.xml
Normal file
12
android/app/src/main/res/values-gl/strings.xml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?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>
|
||||||
|
<string name="game_notification_title">Luanti está en funcionamento</string>
|
||||||
|
</resources>
|
||||||
@@ -3,9 +3,10 @@
|
|||||||
<string name="loading">Betöltés…</string>
|
<string name="loading">Betöltés…</string>
|
||||||
<string name="notification_channel_name">Általános értesíté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="notification_channel_description">Értesítések a Luanti-től</string>
|
||||||
<string name="unzip_notification_title">Luanti betöltése…</string>
|
<string name="unzip_notification_title">A Luanti épp betölt</string>
|
||||||
<string name="ime_dialog_done">Kész</string>
|
<string name="ime_dialog_done">Kész</string>
|
||||||
<string name="no_web_browser">Nem található webböngésző</string>
|
<string name="no_web_browser">Nem található webböngésző</string>
|
||||||
<string name="label">Luanti</string>
|
<string name="label">Luanti</string>
|
||||||
<string name="unzip_notification_description">Kevesebb, mint 1 perc…</string>
|
<string name="unzip_notification_description">Kevesebb, mint 1 perc…</string>
|
||||||
</resources>
|
<string name="game_notification_title">A Luanti jelenleg fut</string>
|
||||||
|
</resources>
|
||||||
|
|||||||
4
android/app/src/main/res/values-hy/strings.xml
Normal file
4
android/app/src/main/res/values-hy/strings.xml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="label">Luanti</string>
|
||||||
|
</resources>
|
||||||
@@ -8,4 +8,5 @@
|
|||||||
<string name="unzip_notification_description">Kurang dari 1 menit…</string>
|
<string name="unzip_notification_description">Kurang dari 1 menit…</string>
|
||||||
<string name="notification_channel_description">Pemberitahuan dari Luanti</string>
|
<string name="notification_channel_description">Pemberitahuan dari Luanti</string>
|
||||||
<string name="unzip_notification_title">Memuat Luanti…</string>
|
<string name="unzip_notification_title">Memuat Luanti…</string>
|
||||||
</resources>
|
<string name="game_notification_title">Luanti sedang berjalan</string>
|
||||||
|
</resources>
|
||||||
|
|||||||
12
android/app/src/main/res/values-iw/strings.xml
Normal file
12
android/app/src/main/res/values-iw/strings.xml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="label">לואנטי</string>
|
||||||
|
<string name="loading">טוען…</string>
|
||||||
|
<string name="notification_channel_name">הודעה כללית</string>
|
||||||
|
<string name="notification_channel_description">התראות מלואנטי</string>
|
||||||
|
<string name="unzip_notification_title">טוען לואנטי</string>
|
||||||
|
<string name="game_notification_title">לואנטי רץ</string>
|
||||||
|
<string name="ime_dialog_done">בוצע</string>
|
||||||
|
<string name="no_web_browser">לא נמצא דפדפן אינטרנט</string>
|
||||||
|
<string name="unzip_notification_description">פחות מדקה אחת…</string>
|
||||||
|
</resources>
|
||||||
4
android/app/src/main/res/values-kmr/strings.xml
Normal file
4
android/app/src/main/res/values-kmr/strings.xml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="label">Luanti</string>
|
||||||
|
</resources>
|
||||||
12
android/app/src/main/res/values-pt-rBR/strings.xml
Normal file
12
android/app/src/main/res/values-pt-rBR/strings.xml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="label">Luanti</string>
|
||||||
|
<string name="loading">Carregando…</string>
|
||||||
|
<string name="notification_channel_name">Notificação geral</string>
|
||||||
|
<string name="notification_channel_description">Notificações do Luanti</string>
|
||||||
|
<string name="unzip_notification_title">Carregando Luanti</string>
|
||||||
|
<string name="unzip_notification_description">Menos de 1 minuto…</string>
|
||||||
|
<string name="game_notification_title">O Luanti está em execução</string>
|
||||||
|
<string name="ime_dialog_done">Concluído</string>
|
||||||
|
<string name="no_web_browser">Nenhum navegador encontrado</string>
|
||||||
|
</resources>
|
||||||
11
android/app/src/main/res/values-ro/strings.xml
Normal file
11
android/app/src/main/res/values-ro/strings.xml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="label">Luanti</string>
|
||||||
|
<string name="loading">Se încarcă…</string>
|
||||||
|
<string name="notification_channel_name">Notificare generală</string>
|
||||||
|
<string name="notification_channel_description">Notificări de la Luanti</string>
|
||||||
|
<string name="unzip_notification_title">Luanti pornește</string>
|
||||||
|
<string name="unzip_notification_description">Sub 1 minut…</string>
|
||||||
|
<string name="ime_dialog_done">Gata</string>
|
||||||
|
<string name="no_web_browser">Niciun navigator web găsit</string>
|
||||||
|
</resources>
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="unzip_notification_title">Загрузка Luanti</string>
|
<string name="unzip_notification_title">Загрузка Luanti</string>
|
||||||
<string name="unzip_notification_description">Меньше чам за 1 минуту…</string>
|
<string name="unzip_notification_description">Менее 1 минуты…</string>
|
||||||
<string name="ime_dialog_done">Готово</string>
|
<string name="ime_dialog_done">Готово</string>
|
||||||
<string name="label">Luаnti</string>
|
<string name="label">Luаnti</string>
|
||||||
<string name="notification_channel_description">Уведомления от Luanti</string>
|
<string name="notification_channel_description">Уведомления от Luanti</string>
|
||||||
<string name="notification_channel_name">Основные уведомления</string>
|
<string name="notification_channel_name">Основные уведомления</string>
|
||||||
<string name="loading">Загрузка…</string>
|
<string name="loading">Загрузка…</string>
|
||||||
<string name="no_web_browser">Не найдено веб-браузера</string>
|
<string name="no_web_browser">Не найдено веб-браузера</string>
|
||||||
</resources>
|
<string name="game_notification_title">Luanti запущено</string>
|
||||||
|
</resources>
|
||||||
|
|||||||
12
android/app/src/main/res/values-sk/strings.xml
Normal file
12
android/app/src/main/res/values-sk/strings.xml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="label">Luanti</string>
|
||||||
|
<string name="loading">Načítavam…</string>
|
||||||
|
<string name="notification_channel_name">Hlavné oznámenie</string>
|
||||||
|
<string name="notification_channel_description">Oznámenia Luanti</string>
|
||||||
|
<string name="unzip_notification_title">Načítanie Luanti</string>
|
||||||
|
<string name="unzip_notification_description">Už iba minútka…</string>
|
||||||
|
<string name="game_notification_title">Luanti už frčí</string>
|
||||||
|
<string name="ime_dialog_done">Hotovo</string>
|
||||||
|
<string name="no_web_browser">Nenašiel som žiaden prehliadač</string>
|
||||||
|
</resources>
|
||||||
12
android/app/src/main/res/values-sl/strings.xml
Normal file
12
android/app/src/main/res/values-sl/strings.xml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="no_web_browser">Ni bil najden spletni brskalnik</string>
|
||||||
|
<string name="notification_channel_name">Glavno obvestilo</string>
|
||||||
|
<string name="loading">Nalaganje …</string>
|
||||||
|
<string name="unzip_notification_description">Manj kot 1 minuta …</string>
|
||||||
|
<string name="label">Luanti</string>
|
||||||
|
<string name="notification_channel_description">Obvestilo od Luantia</string>
|
||||||
|
<string name="ime_dialog_done">Končano!l</string>
|
||||||
|
<string name="unzip_notification_title">Nalaganje Luantia</string>
|
||||||
|
<string name="game_notification_title">Luanti deluje</string>
|
||||||
|
</resources>
|
||||||
@@ -4,8 +4,9 @@
|
|||||||
<string name="loading">Laddar…</string>
|
<string name="loading">Laddar…</string>
|
||||||
<string name="unzip_notification_description">Mindre än 1 minut…</string>
|
<string name="unzip_notification_description">Mindre än 1 minut…</string>
|
||||||
<string name="ime_dialog_done">Färdig</string>
|
<string name="ime_dialog_done">Färdig</string>
|
||||||
<string name="no_web_browser">Ingen webbläsare kunde hittas</string>
|
<string name="no_web_browser">Ingen webbläsare hittades</string>
|
||||||
<string name="notification_channel_name">Generell notis</string>
|
<string name="notification_channel_name">Allmän notifikation</string>
|
||||||
<string name="notification_channel_description">Notiser från Luanti</string>
|
<string name="notification_channel_description">Notifikationer från Luanti</string>
|
||||||
<string name="unzip_notification_title">Laddar Luanti</string>
|
<string name="unzip_notification_title">Laddar Luanti</string>
|
||||||
</resources>
|
<string name="game_notification_title">Luanti är igång</string>
|
||||||
|
</resources>
|
||||||
|
|||||||
4
android/app/src/main/res/values-tl/strings.xml
Normal file
4
android/app/src/main/res/values-tl/strings.xml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="label">ᜎᜓᜏᜈ᜔ᜆᜒ</string>
|
||||||
|
</resources>
|
||||||
@@ -5,7 +5,8 @@
|
|||||||
<string name="loading">Завантаження…</string>
|
<string name="loading">Завантаження…</string>
|
||||||
<string name="notification_channel_name">Загальні сповіщення</string>
|
<string name="notification_channel_name">Загальні сповіщення</string>
|
||||||
<string name="unzip_notification_title">Luanti завантажується</string>
|
<string name="unzip_notification_title">Luanti завантажується</string>
|
||||||
<string name="unzip_notification_description">Менше за 1 хвилину…</string>
|
<string name="unzip_notification_description">Менше 1 хвилини…</string>
|
||||||
<string name="ime_dialog_done">Готово</string>
|
<string name="ime_dialog_done">Готово</string>
|
||||||
<string name="notification_channel_description">Сповіщення від Luanti</string>
|
<string name="notification_channel_description">Сповіщення від Luanti</string>
|
||||||
</resources>
|
<string name="game_notification_title">Luanti працює</string>
|
||||||
|
</resources>
|
||||||
|
|||||||
@@ -8,4 +8,5 @@
|
|||||||
<string name="unzip_notification_description">不到1分钟…</string>
|
<string name="unzip_notification_description">不到1分钟…</string>
|
||||||
<string name="ime_dialog_done">完成</string>
|
<string name="ime_dialog_done">完成</string>
|
||||||
<string name="no_web_browser">未找到网页浏览器</string>
|
<string name="no_web_browser">未找到网页浏览器</string>
|
||||||
|
<string name="game_notification_title">Luanti正在运行</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
<string name="notification_channel_description">Notifications from Luanti</string>
|
<string name="notification_channel_description">Notifications from Luanti</string>
|
||||||
<string name="unzip_notification_title">Loading Luanti</string>
|
<string name="unzip_notification_title">Loading Luanti</string>
|
||||||
<string name="unzip_notification_description">Less than 1 minute…</string>
|
<string name="unzip_notification_description">Less than 1 minute…</string>
|
||||||
|
<string name="game_notification_title">Luanti is running</string>
|
||||||
<string name="ime_dialog_done">Done</string>
|
<string name="ime_dialog_done">Done</string>
|
||||||
<string name="no_web_browser">No web browser found</string>
|
<string name="no_web_browser">No web browser found</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// 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("versionMajor", 5) // Version Major
|
||||||
project.ext.set("versionMinor", 11) // Version Minor
|
project.ext.set("versionMinor", 15) // Version Minor
|
||||||
project.ext.set("versionPatch", 0) // Version Patch
|
project.ext.set("versionPatch", 0) // Version Patch
|
||||||
// ^ keep in sync with cmake
|
// ^ keep in sync with cmake
|
||||||
|
|
||||||
@@ -9,14 +9,14 @@ project.ext.set("versionBuild", 0) // Version Build
|
|||||||
// ^ fourth version number to allow releasing Android-only fixes and beta versions
|
// ^ fourth version number to allow releasing Android-only fixes and beta versions
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.ndk_version = '27.2.12479018'
|
ext.ndk_version = '29.0.14206865'
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:8.5.1'
|
classpath 'com.android.tools.build:gradle:8.12.3'
|
||||||
classpath 'de.undercouch:gradle-download-task:4.1.1'
|
classpath 'de.undercouch:gradle-download-task:5.6.0'
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
}
|
}
|
||||||
@@ -30,5 +30,5 @@ allprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
task clean(type: Delete) {
|
task clean(type: Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.layout.buildDirectory
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
148
android/icons/dig_btn.svg
Normal file
148
android/icons/dig_btn.svg
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
inkscape:export-ydpi="24.000002"
|
||||||
|
inkscape:export-xdpi="24.000002"
|
||||||
|
inkscape:export-filename="../../textures/base/pack/dig_btn.png"
|
||||||
|
sodipodi:docname="dig_btn.svg"
|
||||||
|
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
|
||||||
|
id="svg8"
|
||||||
|
version="1.1"
|
||||||
|
viewBox="0 0 135.46666 135.46667"
|
||||||
|
height="512"
|
||||||
|
width="512"
|
||||||
|
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" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
inkscape:document-rotation="0"
|
||||||
|
inkscape:snap-bbox-midpoints="true"
|
||||||
|
inkscape:snap-others="true"
|
||||||
|
inkscape:snap-object-midpoints="false"
|
||||||
|
inkscape:snap-to-guides="true"
|
||||||
|
inkscape:snap-bbox="true"
|
||||||
|
showguides="true"
|
||||||
|
inkscape:snap-page="true"
|
||||||
|
inkscape:snap-grids="false"
|
||||||
|
inkscape:pagecheckerboard="false"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:window-y="32"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-height="1011"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
units="px"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:current-layer="layer2"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:cy="266.84627"
|
||||||
|
inkscape:cx="201.24514"
|
||||||
|
inkscape:zoom="1.4633894"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
borderopacity="1.0"
|
||||||
|
bordercolor="#666666"
|
||||||
|
pagecolor="#404040"
|
||||||
|
id="base"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:deskcolor="#d1d1d1">
|
||||||
|
<inkscape:grid
|
||||||
|
empopacity="0.25098039"
|
||||||
|
empcolor="#40ff40"
|
||||||
|
opacity="0.1254902"
|
||||||
|
color="#40ff40"
|
||||||
|
empspacing="4"
|
||||||
|
spacingy="0.26458333"
|
||||||
|
spacingx="0.26458333"
|
||||||
|
id="grid16"
|
||||||
|
type="xygrid"
|
||||||
|
originx="0"
|
||||||
|
originy="0"
|
||||||
|
units="px"
|
||||||
|
visible="true" />
|
||||||
|
</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" />
|
||||||
|
<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
|
||||||
|
style="display:inline"
|
||||||
|
inkscape:label="Layer 2"
|
||||||
|
id="layer2"
|
||||||
|
inkscape:groupmode="layer">
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path7055"
|
||||||
|
d=""
|
||||||
|
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path7035"
|
||||||
|
d=""
|
||||||
|
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path7005"
|
||||||
|
d=""
|
||||||
|
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path5127"
|
||||||
|
d=""
|
||||||
|
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<text
|
||||||
|
transform="scale(1.0078883,0.99217343)"
|
||||||
|
id="text4716"
|
||||||
|
y="85.59491"
|
||||||
|
x="67.78315"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48.4785px;line-height:1.25;font-family:'Bitstream Vera Sans';-inkscape-font-specification:'Bitstream Vera Sans';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#d9d9d9;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
xml:space="preserve"><tspan
|
||||||
|
style="fill:#d9d9d9;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
y="85.59491"
|
||||||
|
x="67.78315"
|
||||||
|
id="tspan4714"
|
||||||
|
sodipodi:role="line">LMB</tspan></text>
|
||||||
|
<flowRoot
|
||||||
|
transform="scale(0.26458333)"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1.25;font-family:'Bitstream Vera Sans';-inkscape-font-specification:'Bitstream Vera Sans';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"
|
||||||
|
id="flowRoot4718"
|
||||||
|
xml:space="preserve"><flowRegion
|
||||||
|
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"
|
||||||
|
id="flowRegion4720"><rect
|
||||||
|
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"
|
||||||
|
y="124.10143"
|
||||||
|
x="264.65997"
|
||||||
|
height="136.37059"
|
||||||
|
width="157.5838"
|
||||||
|
id="rect4722" /></flowRegion><flowPara
|
||||||
|
id="flowPara4724" /></flowRoot>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 5.6 KiB |
148
android/icons/place_btn.svg
Normal file
148
android/icons/place_btn.svg
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
inkscape:export-ydpi="24.000002"
|
||||||
|
inkscape:export-xdpi="24.000002"
|
||||||
|
inkscape:export-filename="../../textures/base/pack/place_btn.png"
|
||||||
|
sodipodi:docname="place_btn.svg"
|
||||||
|
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
|
||||||
|
id="svg8"
|
||||||
|
version="1.1"
|
||||||
|
viewBox="0 0 135.46666 135.46667"
|
||||||
|
height="512"
|
||||||
|
width="512"
|
||||||
|
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" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
inkscape:document-rotation="0"
|
||||||
|
inkscape:snap-bbox-midpoints="true"
|
||||||
|
inkscape:snap-others="true"
|
||||||
|
inkscape:snap-object-midpoints="false"
|
||||||
|
inkscape:snap-to-guides="true"
|
||||||
|
inkscape:snap-bbox="true"
|
||||||
|
showguides="true"
|
||||||
|
inkscape:snap-page="true"
|
||||||
|
inkscape:snap-grids="false"
|
||||||
|
inkscape:pagecheckerboard="false"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:window-y="32"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-height="1011"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
units="px"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:current-layer="layer2"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:cy="266.84627"
|
||||||
|
inkscape:cx="201.24514"
|
||||||
|
inkscape:zoom="1.4633894"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
borderopacity="1.0"
|
||||||
|
bordercolor="#666666"
|
||||||
|
pagecolor="#404040"
|
||||||
|
id="base"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:deskcolor="#d1d1d1">
|
||||||
|
<inkscape:grid
|
||||||
|
empopacity="0.25098039"
|
||||||
|
empcolor="#40ff40"
|
||||||
|
opacity="0.1254902"
|
||||||
|
color="#40ff40"
|
||||||
|
empspacing="4"
|
||||||
|
spacingy="0.26458333"
|
||||||
|
spacingx="0.26458333"
|
||||||
|
id="grid16"
|
||||||
|
type="xygrid"
|
||||||
|
originx="0"
|
||||||
|
originy="0"
|
||||||
|
units="px"
|
||||||
|
visible="true" />
|
||||||
|
</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" />
|
||||||
|
<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
|
||||||
|
style="display:inline"
|
||||||
|
inkscape:label="Layer 2"
|
||||||
|
id="layer2"
|
||||||
|
inkscape:groupmode="layer">
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path7055"
|
||||||
|
d=""
|
||||||
|
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path7035"
|
||||||
|
d=""
|
||||||
|
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path7005"
|
||||||
|
d=""
|
||||||
|
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path5127"
|
||||||
|
d=""
|
||||||
|
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<text
|
||||||
|
transform="scale(1.0078883,0.99217343)"
|
||||||
|
id="text4716"
|
||||||
|
y="85.59491"
|
||||||
|
x="67.78315"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48.4785px;line-height:1.25;font-family:'Bitstream Vera Sans';-inkscape-font-specification:'Bitstream Vera Sans';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#d9d9d9;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
xml:space="preserve"><tspan
|
||||||
|
style="fill:#d9d9d9;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
y="85.59491"
|
||||||
|
x="67.78315"
|
||||||
|
id="tspan4714"
|
||||||
|
sodipodi:role="line">RMB</tspan></text>
|
||||||
|
<flowRoot
|
||||||
|
transform="scale(0.26458333)"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1.25;font-family:'Bitstream Vera Sans';-inkscape-font-specification:'Bitstream Vera Sans';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"
|
||||||
|
id="flowRoot4718"
|
||||||
|
xml:space="preserve"><flowRegion
|
||||||
|
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"
|
||||||
|
id="flowRegion4720"><rect
|
||||||
|
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"
|
||||||
|
y="124.10143"
|
||||||
|
x="264.65997"
|
||||||
|
height="136.37059"
|
||||||
|
width="157.5838"
|
||||||
|
id="rect4722" /></flowRegion><flowPara
|
||||||
|
id="flowPara4724" /></flowRoot>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 5.6 KiB |
@@ -68,5 +68,5 @@ if (new File(depsDir, 'armeabi-v7a').exists()) {
|
|||||||
preBuild.dependsOn getDeps
|
preBuild.dependsOn getDeps
|
||||||
|
|
||||||
clean {
|
clean {
|
||||||
delete new File(buildDir.parent, 'deps')
|
delete depsDir
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ do
|
|||||||
all.registered_craftitems = {}
|
all.registered_craftitems = {}
|
||||||
all.registered_tools = {}
|
all.registered_tools = {}
|
||||||
for k, v in pairs(all.registered_items) do
|
for k, v in pairs(all.registered_items) do
|
||||||
-- Disable further modification
|
-- Ignore new keys
|
||||||
setmetatable(v, {__newindex = {}})
|
setmetatable(v, {__newindex = function() end})
|
||||||
-- Reassemble the other tables
|
-- Reassemble the other tables
|
||||||
if v.type == "node" then
|
if v.type == "node" then
|
||||||
getmetatable(v).__index = all.nodedef_default
|
getmetatable(v).__index = all.nodedef_default
|
||||||
@@ -59,6 +59,9 @@ end
|
|||||||
local alias_metatable = {
|
local alias_metatable = {
|
||||||
__index = function(t, name)
|
__index = function(t, name)
|
||||||
return rawget(t, core.registered_aliases[name])
|
return rawget(t, core.registered_aliases[name])
|
||||||
|
end,
|
||||||
|
__newindex = function()
|
||||||
|
error("table is read-only")
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
setmetatable(core.registered_items, alias_metatable)
|
setmetatable(core.registered_items, alias_metatable)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
core.log("info", "Initializing asynchronous environment")
|
core.log("info", "Initializing asynchronous environment")
|
||||||
|
|
||||||
|
|
||||||
function core.job_processor(func, serialized_param)
|
function core.job_processor(func, serialized_param)
|
||||||
local param = core.deserialize(serialized_param)
|
local param = core.deserialize(serialized_param)
|
||||||
|
|
||||||
@@ -7,3 +8,15 @@ function core.job_processor(func, serialized_param)
|
|||||||
|
|
||||||
return retval or core.serialize(nil)
|
return retval or core.serialize(nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function core.get_http_accept_languages()
|
||||||
|
local languages
|
||||||
|
local current_language = core.get_language()
|
||||||
|
if current_language ~= "" then
|
||||||
|
languages = { current_language, "en;q=0.8" }
|
||||||
|
else
|
||||||
|
languages = { "en" }
|
||||||
|
end
|
||||||
|
return "Accept-Language: " .. table.concat(languages, ", ")
|
||||||
|
end
|
||||||
|
|||||||
@@ -13,3 +13,6 @@ dofile(commonpath .. "information_formspecs.lua")
|
|||||||
dofile(clientpath .. "chatcommands.lua")
|
dofile(clientpath .. "chatcommands.lua")
|
||||||
dofile(clientpath .. "misc.lua")
|
dofile(clientpath .. "misc.lua")
|
||||||
assert(loadfile(commonpath .. "item_s.lua"))({}) -- Just for push/read node functions
|
assert(loadfile(commonpath .. "item_s.lua"))({}) -- Just for push/read node functions
|
||||||
|
|
||||||
|
-- unset, as promised in initializeSecurityClient()
|
||||||
|
debug.getinfo = nil
|
||||||
|
|||||||
@@ -1,19 +1,6 @@
|
|||||||
--Luanti
|
-- Luanti
|
||||||
--Copyright (C) 2013 sapier
|
-- Copyright (C) 2013 sapier
|
||||||
--
|
-- SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
--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
|
|
||||||
--the Free Software Foundation; either version 2.1 of the License, or
|
|
||||||
--(at your option) any later version.
|
|
||||||
--
|
|
||||||
--This program is distributed in the hope that it will be useful,
|
|
||||||
--but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
--GNU Lesser General Public License for more details.
|
|
||||||
--
|
|
||||||
--You should have received a copy of the GNU Lesser General Public License along
|
|
||||||
--with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- TODO improve doc --
|
-- TODO improve doc --
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ local facedir_to_dir_map = {
|
|||||||
1, 4, 3, 2,
|
1, 4, 3, 2,
|
||||||
}
|
}
|
||||||
function core.facedir_to_dir(facedir)
|
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
|
end
|
||||||
|
|
||||||
function core.dir_to_fourdir(dir)
|
function core.dir_to_fourdir(dir)
|
||||||
@@ -110,7 +110,7 @@ function core.dir_to_fourdir(dir)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function core.fourdir_to_dir(fourdir)
|
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
|
end
|
||||||
|
|
||||||
function core.dir_to_wallmounted(dir)
|
function core.dir_to_wallmounted(dir)
|
||||||
@@ -147,7 +147,7 @@ local wallmounted_to_dir = {
|
|||||||
vector.new( 0, -1, 0),
|
vector.new( 0, -1, 0),
|
||||||
}
|
}
|
||||||
function core.wallmounted_to_dir(wallmounted)
|
function core.wallmounted_to_dir(wallmounted)
|
||||||
return wallmounted_to_dir[wallmounted % 8]
|
return vector.copy(wallmounted_to_dir[wallmounted % 8])
|
||||||
end
|
end
|
||||||
|
|
||||||
function core.dir_to_yaw(dir)
|
function core.dir_to_yaw(dir)
|
||||||
|
|||||||
15
builtin/common/menu.lua
Normal file
15
builtin/common/menu.lua
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
-- Luanti
|
||||||
|
-- SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
|
||||||
|
-- These colors are used by the main menu and the settings menu
|
||||||
|
mt_color_grey = "#AAAAAA"
|
||||||
|
mt_color_blue = "#6389FF"
|
||||||
|
mt_color_lightblue = "#99CCFF"
|
||||||
|
mt_color_green = "#72FF63"
|
||||||
|
mt_color_dark_green = "#25C191"
|
||||||
|
mt_color_orange = "#FF8800"
|
||||||
|
mt_color_red = "#FF3300"
|
||||||
|
|
||||||
|
function core.are_keycodes_equal(k1, k2)
|
||||||
|
return core.normalize_keycode(k1) == core.normalize_keycode(k2)
|
||||||
|
end
|
||||||
@@ -1,24 +1,27 @@
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Localize functions to avoid table lookups (better performance).
|
-- Localize functions to avoid table lookups (better performance).
|
||||||
local string_sub, string_find = string.sub, string.find
|
local string_sub, string_find, string_rep = string.sub, string.find, string.rep
|
||||||
local math = math
|
local math = math
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
local function basic_dump(o)
|
local function basic_dump(o)
|
||||||
local tp = type(o)
|
local tp = type(o)
|
||||||
if tp == "number" then
|
if tp == "number" then
|
||||||
return tostring(o)
|
local s = tostring(o)
|
||||||
|
if tonumber(s) == o then
|
||||||
|
return s
|
||||||
|
end
|
||||||
|
-- Prefer an exact representation over a compact representation.
|
||||||
|
-- e.g. basic_dump(0.3) == "0.3",
|
||||||
|
-- but basic_dump(0.1 + 0.2) == "0.30000000000000004"
|
||||||
|
-- so the user can see that 0.1 + 0.2 ~= 0.3
|
||||||
|
return string.format("%.17g", o)
|
||||||
elseif tp == "string" then
|
elseif tp == "string" then
|
||||||
return string.format("%q", o)
|
return string.format("%q", o)
|
||||||
elseif tp == "boolean" then
|
elseif tp == "boolean" then
|
||||||
return tostring(o)
|
return tostring(o)
|
||||||
elseif tp == "nil" then
|
elseif tp == "nil" then
|
||||||
return "nil"
|
return "nil"
|
||||||
-- Uncomment for full function dumping support.
|
|
||||||
-- Not currently enabled because bytecode isn't very human-readable and
|
|
||||||
-- dump's output is intended for humans.
|
|
||||||
--elseif tp == "function" then
|
|
||||||
-- return string.format("loadstring(%q)", string.dump(o))
|
|
||||||
elseif tp == "userdata" then
|
elseif tp == "userdata" then
|
||||||
return tostring(o)
|
return tostring(o)
|
||||||
else
|
else
|
||||||
@@ -105,65 +108,144 @@ function dump2(o, name, dumped)
|
|||||||
return string.format("%s = {}\n%s", name, table.concat(t))
|
return string.format("%s = {}\n%s", name, table.concat(t))
|
||||||
end
|
end
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
-- This dumps values in a one-statement format.
|
-- This dumps values in a human-readable expression format.
|
||||||
|
-- If possible, the resulting string should evaluate to an equivalent value if loaded and executed.
|
||||||
-- For example, {test = {"Testing..."}} becomes:
|
-- For example, {test = {"Testing..."}} becomes:
|
||||||
-- [[{
|
-- [[{
|
||||||
-- test = {
|
-- test = {
|
||||||
-- "Testing..."
|
-- "Testing..."
|
||||||
-- }
|
-- }
|
||||||
-- }]]
|
-- }]]
|
||||||
-- This supports tables as keys, but not circular references.
|
function dump(value, indent)
|
||||||
-- It performs poorly with multiple references as it writes out the full
|
|
||||||
-- table each time.
|
|
||||||
-- The indent field specifies a indentation string, it defaults to a tab.
|
|
||||||
-- Use the empty string to disable indentation.
|
|
||||||
-- The dumped and level arguments are internal-only.
|
|
||||||
|
|
||||||
function dump(o, indent, nested, level)
|
|
||||||
local t = type(o)
|
|
||||||
if not level and t == "userdata" then
|
|
||||||
-- when userdata (e.g. player) is passed directly, print its metatable:
|
|
||||||
return "userdata metatable: " .. dump(getmetatable(o))
|
|
||||||
end
|
|
||||||
if t ~= "table" then
|
|
||||||
return basic_dump(o)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Contains table -> true/nil of currently nested tables
|
|
||||||
nested = nested or {}
|
|
||||||
if nested[o] then
|
|
||||||
return "<circular reference>"
|
|
||||||
end
|
|
||||||
nested[o] = true
|
|
||||||
indent = indent or "\t"
|
indent = indent or "\t"
|
||||||
level = level or 1
|
|
||||||
|
|
||||||
local ret = {}
|
assert(type(indent) == "string", "dump()'s second argument should be a string or nil.")
|
||||||
local dumped_indexes = {}
|
|
||||||
for i, v in ipairs(o) do
|
local newline = indent == "" and "" or "\n"
|
||||||
ret[#ret + 1] = dump(v, indent, nested, level + 1)
|
|
||||||
dumped_indexes[i] = true
|
local rope = {}
|
||||||
end
|
local write
|
||||||
for k, v in pairs(o) do
|
do
|
||||||
if not dumped_indexes[k] then
|
-- Keeping the length of the table as a local variable is *much*
|
||||||
if type(k) ~= "string" or not is_valid_identifier(k) then
|
-- faster than invoking the length operator.
|
||||||
k = "["..dump(k, indent, nested, level + 1).."]"
|
-- See https://gitspartv.github.io/LuaJIT-Benchmarks/#test12.
|
||||||
end
|
local i = 0
|
||||||
v = dump(v, indent, nested, level + 1)
|
function write(str)
|
||||||
ret[#ret + 1] = k.." = "..v
|
i = i + 1
|
||||||
|
rope[i] = str
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
nested[o] = nil
|
|
||||||
if indent ~= "" then
|
local n_refs = {}
|
||||||
local indent_str = "\n"..string.rep(indent, level)
|
local function count_refs(val)
|
||||||
local end_indent_str = "\n"..string.rep(indent, level - 1)
|
if type(val) ~= "table" then
|
||||||
return string.format("{%s%s%s}",
|
return
|
||||||
indent_str,
|
end
|
||||||
table.concat(ret, ","..indent_str),
|
local tbl = val
|
||||||
end_indent_str)
|
if n_refs[tbl] then
|
||||||
|
n_refs[tbl] = n_refs[tbl] + 1
|
||||||
|
return
|
||||||
|
end
|
||||||
|
n_refs[tbl] = 1
|
||||||
|
for k, v in pairs(tbl) do
|
||||||
|
count_refs(k)
|
||||||
|
count_refs(v)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return "{"..table.concat(ret, ", ").."}"
|
count_refs(value)
|
||||||
|
|
||||||
|
local refs = {}
|
||||||
|
local cur_ref = 1
|
||||||
|
local function write_value(val, level)
|
||||||
|
if type(val) ~= "table" then
|
||||||
|
write(basic_dump(val))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local tbl = val
|
||||||
|
if refs[tbl] then
|
||||||
|
write(refs[tbl])
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if n_refs[val] > 1 then
|
||||||
|
refs[val] = ("getref(%d)"):format(cur_ref)
|
||||||
|
write(("setref(%d)"):format(cur_ref))
|
||||||
|
cur_ref = cur_ref + 1
|
||||||
|
end
|
||||||
|
write("{")
|
||||||
|
if next(tbl) == nil then
|
||||||
|
write("}")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
write(newline)
|
||||||
|
|
||||||
|
local function write_entry(k, v)
|
||||||
|
write(string_rep(indent, level))
|
||||||
|
write("[")
|
||||||
|
write_value(k, level + 1)
|
||||||
|
write("] = ")
|
||||||
|
write_value(v, level + 1)
|
||||||
|
write(",")
|
||||||
|
write(newline)
|
||||||
|
end
|
||||||
|
|
||||||
|
local keys = {string = {}, number = {}}
|
||||||
|
for k in pairs(tbl) do
|
||||||
|
local t = type(k)
|
||||||
|
if keys[t] then
|
||||||
|
table.insert(keys[t], k)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Write string-keyed entries
|
||||||
|
table.sort(keys.string)
|
||||||
|
for _, k in ipairs(keys.string) do
|
||||||
|
local v = val[k]
|
||||||
|
if is_valid_identifier(k) then
|
||||||
|
write(string_rep(indent, level))
|
||||||
|
write(k)
|
||||||
|
write(" = ")
|
||||||
|
write_value(v, level + 1)
|
||||||
|
write(",")
|
||||||
|
write(newline)
|
||||||
|
else
|
||||||
|
write_entry(k, v)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Write number-keyed entries
|
||||||
|
local len = 0
|
||||||
|
for i in ipairs(tbl) do
|
||||||
|
len = i
|
||||||
|
end
|
||||||
|
if #keys.number == len then -- table is a list
|
||||||
|
for _, v in ipairs(tbl) do
|
||||||
|
write(string_rep(indent, level))
|
||||||
|
write_value(v, level + 1)
|
||||||
|
write(",")
|
||||||
|
write(newline)
|
||||||
|
end
|
||||||
|
else -- table harbors arbitrary number keys
|
||||||
|
table.sort(keys.number)
|
||||||
|
for _, k in ipairs(keys.number) do
|
||||||
|
write_entry(k, tbl[k])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Write all remaining entries
|
||||||
|
for k, v in pairs(val) do
|
||||||
|
if not keys[type(k)] then
|
||||||
|
write_entry(k, v)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
write(string_rep(indent, level - 1))
|
||||||
|
write("}")
|
||||||
|
end
|
||||||
|
write_value(value, 1)
|
||||||
|
return table.concat(rope)
|
||||||
end
|
end
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
@@ -457,18 +539,37 @@ do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
function table.copy(t, seen)
|
local function table_copy(value, preserve_metatables)
|
||||||
local n = {}
|
local seen = {}
|
||||||
seen = seen or {}
|
local function copy(val)
|
||||||
seen[t] = n
|
if type(val) ~= "table" then
|
||||||
for k, v in pairs(t) do
|
return val
|
||||||
n[(type(k) == "table" and (seen[k] or table.copy(k, seen))) or k] =
|
end
|
||||||
(type(v) == "table" and (seen[v] or table.copy(v, seen))) or v
|
local t = val
|
||||||
|
if seen[t] then
|
||||||
|
return seen[t]
|
||||||
|
end
|
||||||
|
local res = {}
|
||||||
|
seen[t] = res
|
||||||
|
for k, v in pairs(t) do
|
||||||
|
res[copy(k)] = copy(v)
|
||||||
|
end
|
||||||
|
if preserve_metatables then
|
||||||
|
setmetatable(res, getmetatable(t))
|
||||||
|
end
|
||||||
|
return res
|
||||||
end
|
end
|
||||||
return n
|
return copy(value)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function table.copy(value)
|
||||||
|
return table_copy(value, false)
|
||||||
|
end
|
||||||
|
|
||||||
|
function table.copy_with_metatables(value)
|
||||||
|
return table_copy(value, true)
|
||||||
|
end
|
||||||
|
|
||||||
function table.insert_all(t, other)
|
function table.insert_all(t, other)
|
||||||
if table.move then -- LuaJIT
|
if table.move then -- LuaJIT
|
||||||
@@ -536,6 +637,10 @@ if core.gettext then -- for client and mainmenu
|
|||||||
function fgettext(text, ...)
|
function fgettext(text, ...)
|
||||||
return core.formspec_escape(fgettext_ne(text, ...))
|
return core.formspec_escape(fgettext_ne(text, ...))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function hgettext(text, ...)
|
||||||
|
return core.hypertext_escape(fgettext_ne(text, ...))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local ESCAPE_CHAR = string.char(0x1b)
|
local ESCAPE_CHAR = string.char(0x1b)
|
||||||
@@ -556,7 +661,7 @@ function core.colorize(color, message)
|
|||||||
lines[i] = color_code .. line
|
lines[i] = color_code .. line
|
||||||
end
|
end
|
||||||
|
|
||||||
return table.concat(lines, "\n") .. core.get_color_escape_sequence("#ffffff")
|
return table.concat(lines, "\n") .. core.get_color_escape_sequence("#fff")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@@ -572,6 +677,7 @@ function core.strip_colors(str)
|
|||||||
return (str:gsub(ESCAPE_CHAR .. "%([bc]@[^)]+%)", ""))
|
return (str:gsub(ESCAPE_CHAR .. "%([bc]@[^)]+%)", ""))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local function translate(textdomain, str, num, ...)
|
local function translate(textdomain, str, num, ...)
|
||||||
local start_seq
|
local start_seq
|
||||||
if textdomain == "" and num == "" then
|
if textdomain == "" and num == "" then
|
||||||
@@ -751,22 +857,23 @@ Intended to be used in chat command parameter parsing.
|
|||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
* x, y, z: Parsed x, y, and z coordinates as strings
|
* x, y, z: Parsed x, y, and z coordinates as strings
|
||||||
* relative_to: Position to which to compare the position
|
* relative_to: Optional position vector as reference point
|
||||||
|
|
||||||
Syntax of x, y and z:
|
Syntax of x, y and z:
|
||||||
* "<number>": return as number
|
* "<number>": use as number
|
||||||
* "~<number>": return <number> + player position on this axis
|
* "~<number>": use <number> + reference point on this axis
|
||||||
* "~": return player position on this axis
|
* "~": use reference point on this axis
|
||||||
|
|
||||||
Returns: a vector or nil for invalid input or if player does not exist
|
Returns: a vector or nil for invalid input
|
||||||
]]
|
]]
|
||||||
function core.parse_coordinates(x, y, z, relative_to)
|
function core.parse_coordinates(x, y, z, relative_to)
|
||||||
if not relative_to then
|
if not relative_to then
|
||||||
x, y, z = tonumber(x), tonumber(y), tonumber(z)
|
x, y, z = tonumber(x), tonumber(y), tonumber(z)
|
||||||
return x and y and z and { x = x, y = y, z = z }
|
return x and y and z and vector.new(x, y, z)
|
||||||
end
|
end
|
||||||
local rx = core.parse_relative_number(x, relative_to.x)
|
local rx = core.parse_relative_number(x, relative_to.x)
|
||||||
local ry = core.parse_relative_number(y, relative_to.y)
|
local ry = core.parse_relative_number(y, relative_to.y)
|
||||||
local rz = core.parse_relative_number(z, relative_to.z)
|
local rz = core.parse_relative_number(z, relative_to.z)
|
||||||
return rx and ry and rz and { x = rx, y = ry, z = rz }
|
return rx and ry and rz and vector.new(rx, ry, rz)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
local builtin_shared = ...
|
local builtin_shared = ...
|
||||||
|
local debug_getinfo = debug.getinfo
|
||||||
|
|
||||||
do
|
do
|
||||||
local default = {mod = "??", name = "??"}
|
local default = {mod = "??", name = "??"}
|
||||||
@@ -56,7 +57,7 @@ function builtin_shared.make_registration()
|
|||||||
core.callback_origins[func] = {
|
core.callback_origins[func] = {
|
||||||
-- may be nil or return nil
|
-- may be nil or return nil
|
||||||
mod = core.get_current_modname and core.get_current_modname() or "??",
|
mod = core.get_current_modname and core.get_current_modname() or "??",
|
||||||
name = debug.getinfo(1, "n").name or "??"
|
name = debug_getinfo(1, "n").name or "??"
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
return t, registerfunc
|
return t, registerfunc
|
||||||
@@ -69,7 +70,7 @@ function builtin_shared.make_registration_reverse()
|
|||||||
core.callback_origins[func] = {
|
core.callback_origins[func] = {
|
||||||
-- may be nil or return nil
|
-- may be nil or return nil
|
||||||
mod = core.get_current_modname and core.get_current_modname() or "??",
|
mod = core.get_current_modname and core.get_current_modname() or "??",
|
||||||
name = debug.getinfo(1, "n").name or "??"
|
name = debug_getinfo(1, "n").name or "??"
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
return t, registerfunc
|
return t, registerfunc
|
||||||
|
|||||||
@@ -190,11 +190,41 @@ local function serialize(value, write)
|
|||||||
dump(value)
|
dump(value)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Whether `value` recursively contains a function
|
||||||
|
local function contains_function(value)
|
||||||
|
local seen = {}
|
||||||
|
local function check(val)
|
||||||
|
if type(val) == "function" then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
if type(val) == "table" then
|
||||||
|
if seen[val] then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
seen[val] = true
|
||||||
|
for k, v in pairs(val) do
|
||||||
|
if check(k) or check(v) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
return check(value)
|
||||||
|
end
|
||||||
|
|
||||||
function core.serialize(value)
|
function core.serialize(value)
|
||||||
|
if contains_function(value) then
|
||||||
|
core.log("deprecated", "Support for dumping functions in `core.serialize` is deprecated.")
|
||||||
|
end
|
||||||
local rope = {}
|
local rope = {}
|
||||||
|
-- Keeping the length of the table as a local variable is *much*
|
||||||
|
-- faster than invoking the length operator.
|
||||||
|
-- See https://gitspartv.github.io/LuaJIT-Benchmarks/#test12.
|
||||||
|
local i = 0
|
||||||
serialize(value, function(text)
|
serialize(value, function(text)
|
||||||
-- Faster than table.insert(rope, text) on PUC Lua 5.1
|
i = i + 1
|
||||||
rope[#rope + 1] = text
|
rope[i] = text
|
||||||
end)
|
end)
|
||||||
return table_concat(rope)
|
return table_concat(rope)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,19 +1,6 @@
|
|||||||
--Luanti
|
-- Luanti
|
||||||
--Copyright (C) 2022 rubenwardy
|
-- Copyright (C) 2022 rubenwardy
|
||||||
--
|
-- SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
--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
|
|
||||||
--the Free Software Foundation; either version 2.1 of the License, or
|
|
||||||
--(at your option) any later version.
|
|
||||||
--
|
|
||||||
--This program is distributed in the hope that it will be useful,
|
|
||||||
--but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
--GNU Lesser General Public License for more details.
|
|
||||||
--
|
|
||||||
--You should have received a copy of the GNU Lesser General Public License along
|
|
||||||
--with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
local make = {}
|
local make = {}
|
||||||
|
|
||||||
@@ -37,6 +24,7 @@ local make = {}
|
|||||||
-- * `fs` is a string for the formspec.
|
-- * `fs` is a string for the formspec.
|
||||||
-- Components should be relative to `0,0`, and not exceed `avail_w` or the returned `used_height`.
|
-- Components should be relative to `0,0`, and not exceed `avail_w` or the returned `used_height`.
|
||||||
-- * `used_height` is the space used by components in `fs`.
|
-- * `used_height` is the space used by components in `fs`.
|
||||||
|
-- * `spacing`: (Optional) the vertical margin to be added before the component (default 0.25)
|
||||||
-- * `on_submit = function(self, fields, parent)`:
|
-- * `on_submit = function(self, fields, parent)`:
|
||||||
-- * `fields`: submitted formspec fields
|
-- * `fields`: submitted formspec fields
|
||||||
-- * `parent`: the fstk element for the settings UI, use to show dialogs
|
-- * `parent`: the fstk element for the settings UI, use to show dialogs
|
||||||
@@ -442,13 +430,83 @@ local function make_noise_params(setting)
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function make.key(setting)
|
||||||
|
local btn_bind = "bind_" .. setting.name
|
||||||
|
local btn_clear = "unbind_" .. setting.name
|
||||||
|
local function add_conflict_warnings(fs, height)
|
||||||
|
local value = core.settings:get(setting.name)
|
||||||
|
if value == "" then
|
||||||
|
return height
|
||||||
|
end
|
||||||
|
|
||||||
|
local critical_keys = {
|
||||||
|
keymap_drop = true,
|
||||||
|
keymap_dig = true,
|
||||||
|
keymap_place = true,
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, o in ipairs(core.full_settingtypes) do
|
||||||
|
if o.type == "key" and o.name ~= setting.name and
|
||||||
|
core.are_keycodes_equal(core.settings:get(o.name), value) then
|
||||||
|
|
||||||
|
local is_current_close_world = setting.name == "keymap_close_world"
|
||||||
|
local is_other_close_world = o.name == "keymap_close_world"
|
||||||
|
local is_current_critical = critical_keys[setting.name]
|
||||||
|
local is_other_critical = critical_keys[o.name]
|
||||||
|
|
||||||
|
if (is_other_critical or is_current_critical) or
|
||||||
|
(not is_current_close_world and not is_other_close_world) then
|
||||||
|
table.insert(fs, ("label[0,%f;%s]"):format(height + 0.3,
|
||||||
|
core.colorize(mt_color_orange, fgettext([[Conflicts with "$1"]], fgettext(o.readable_name)))))
|
||||||
|
height = height + 0.6
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return height
|
||||||
|
end
|
||||||
|
return {
|
||||||
|
info_text = setting.comment,
|
||||||
|
setting = setting,
|
||||||
|
spacing = 0.1,
|
||||||
|
|
||||||
|
get_formspec = function(self, avail_w)
|
||||||
|
self.resettable = core.settings:has(setting.name)
|
||||||
|
local btn_bind_width = math.max(2.5, avail_w / 2)
|
||||||
|
local value = core.settings:get(setting.name)
|
||||||
|
local fs = {
|
||||||
|
("label[0,0.4;%s]"):format(get_label(setting)),
|
||||||
|
("button_key[%f,0;%f,0.8;%s;%s]"):format(
|
||||||
|
btn_bind_width, btn_bind_width - 0.8,
|
||||||
|
btn_bind, core.formspec_escape(value)),
|
||||||
|
("image_button[%f,0;0.8,0.8;%s;%s;]"):format(avail_w - 0.8,
|
||||||
|
core.formspec_escape(defaulttexturedir .. "clear.png"),
|
||||||
|
btn_clear),
|
||||||
|
("tooltip[%s;%s]"):format(btn_clear, fgettext("Remove keybinding")),
|
||||||
|
}
|
||||||
|
local height = 0.8
|
||||||
|
height = add_conflict_warnings(fs, height)
|
||||||
|
return table.concat(fs), height
|
||||||
|
end,
|
||||||
|
|
||||||
|
on_submit = function(self, fields)
|
||||||
|
if fields[btn_bind] then
|
||||||
|
core.settings:set(setting.name, fields[btn_bind])
|
||||||
|
return true
|
||||||
|
elseif fields[btn_clear] then
|
||||||
|
core.settings:set(setting.name, "")
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
if INIT == "pause_menu" then
|
if INIT == "pause_menu" then
|
||||||
-- Making the noise parameter dialog work in the pause menu settings would
|
-- Making the noise parameter dialog work in the pause menu settings would
|
||||||
-- require porting "FSTK" (at least the dialog API) from the mainmenu formspec
|
-- require porting "FSTK" (at least the dialog API) from the mainmenu formspec
|
||||||
-- API to the in-game formspec API.
|
-- API to the in-game formspec API.
|
||||||
-- There's no reason you'd want to adjust mapgen noise parameter settings
|
-- 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
|
-- in-game (they only apply to new worlds, hidden as [world_creation]),
|
||||||
-- this.
|
-- so there's no reason to implement this.
|
||||||
local empty = function()
|
local empty = function()
|
||||||
return { get_formspec = function() return "", 0 end }
|
return { get_formspec = function() return "", 0 end }
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,19 +1,6 @@
|
|||||||
--Luanti
|
-- Luanti
|
||||||
--Copyright (C) 2015 PilzAdam
|
-- Copyright (C) 2015 PilzAdam
|
||||||
--
|
-- SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
--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
|
|
||||||
--the Free Software Foundation; either version 2.1 of the License, or
|
|
||||||
--(at your option) any later version.
|
|
||||||
--
|
|
||||||
--This program is distributed in the hope that it will be useful,
|
|
||||||
--but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
--GNU Lesser General Public License for more details.
|
|
||||||
--
|
|
||||||
--You should have received a copy of the GNU Lesser General Public License along
|
|
||||||
--with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
|
|
||||||
local checkboxes = {}
|
local checkboxes = {}
|
||||||
@@ -59,33 +46,55 @@ local function get_formspec(dialogdata)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local fields = {}
|
local fields = {}
|
||||||
local function add_field(x, name, label, value)
|
local function add_field(x, name, label, value, tooltips)
|
||||||
fields[#fields + 1] = ("field[%f,%f;3.3,1;%s;%s;%s]"):format(
|
fields[#fields + 1] = ("field[%f,%f;3.3,1;%s;%s;%s]"):format(
|
||||||
x, height, name, label, core.formspec_escape(value or "")
|
x, height, name, label, core.formspec_escape(value or "")
|
||||||
)
|
)
|
||||||
|
if tooltips then
|
||||||
|
fields[#fields + 1] = ("tooltip[%s;%s]"):format(name, table.concat(tooltips, "\n"))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
-- First row
|
-- First row
|
||||||
height = height + 0.3
|
height = height + 0.3
|
||||||
add_field(0.3, "te_offset", fgettext("Offset"), t[1])
|
add_field(0.3, "te_offset", fgettext("Offset"), t[1], {fgettext("Offsets the final noise by this value.")})
|
||||||
add_field(3.6, "te_scale", fgettext("Scale"), t[2])
|
add_field(3.6, "te_scale", fgettext("Scale"), t[2], {
|
||||||
add_field(6.9, "te_seed", fgettext("Seed"), t[6])
|
fgettext("The multiplier for the noise before the offset is added.")})
|
||||||
|
add_field(6.9, "te_seed", fgettext("Seed"), t[6], {
|
||||||
|
fgettext("The random seed for the noise. The same seed results in the same noise.")})
|
||||||
height = height + 1.1
|
height = height + 1.1
|
||||||
|
|
||||||
-- Second row
|
-- Second row
|
||||||
add_field(0.3, "te_spreadx", fgettext("X spread"), t[3])
|
add_field(0.3, "te_spreadx", fgettext("$1 spread", "X"), t[3], {
|
||||||
|
fgettext("Scales the noise in the $1 axis by this value.", "X"),
|
||||||
|
fgettext("This is also the scale of the largest structures in the $1 direction of the noise.", "X")})
|
||||||
if dimension == 3 then
|
if dimension == 3 then
|
||||||
add_field(3.6, "te_spready", fgettext("Y spread"), t[4])
|
add_field(3.6, "te_spready", fgettext("$1 spread", "Y"), t[4], {
|
||||||
|
fgettext("Scales the noise in the $1 axis by this value."),
|
||||||
|
fgettext("This is also the scale of the largest structures in the $1 direction of the noise.", "Y")})
|
||||||
else
|
else
|
||||||
fields[#fields + 1] = "label[4," .. height - 0.2 .. ";" ..
|
fields[#fields + 1] = "label[4," .. height - 0.2 .. ";" ..
|
||||||
fgettext("2D Noise") .. "]"
|
fgettext("2D Noise") .. "]"
|
||||||
end
|
end
|
||||||
add_field(6.9, "te_spreadz", fgettext("Z spread"), t[5])
|
add_field(6.9, "te_spreadz", fgettext("$1 spread", "Z"), t[5], {
|
||||||
|
fgettext("Scales the noise in the $1 axis by this value.", "Z"),
|
||||||
|
fgettext("This is also the scale of the largest structures in the $1 direction of the noise.", "Z")})
|
||||||
height = height + 1.1
|
height = height + 1.1
|
||||||
|
|
||||||
-- Third row
|
-- Third row
|
||||||
add_field(0.3, "te_octaves", fgettext("Octaves"), t[7])
|
add_field(0.3, "te_octaves", fgettext("Octaves"), t[7], {
|
||||||
add_field(3.6, "te_persist", fgettext("Persistence"), t[8])
|
fgettext("Controls how many octaves (layers) the noise will have."),
|
||||||
add_field(6.9, "te_lacun", fgettext("Lacunarity"), t[9])
|
fgettext("Each octave is a simple noise generator. Each one also adds more detail to the noise."),
|
||||||
|
fgettext("Lower values will result in smoother noise and higher values will result in rougher noise."),
|
||||||
|
fgettext("Finally, all of the octaves will be combined to generate the noise."),
|
||||||
|
fgettext("Having lots of octaves is not recommended because it increases terrain generation time.")})
|
||||||
|
add_field(3.6, "te_persist", fgettext("Persistence"), t[8], {
|
||||||
|
fgettext("Amplifies every octave by (amplitude of the previous octave * Persistence)."),
|
||||||
|
fgettext("The first octave is amplified by 1."),
|
||||||
|
fgettext("Lower values make the terrain simple and higher values make the terrain rough.")})
|
||||||
|
add_field(6.9, "te_lacun", fgettext("Lacunarity"), t[9], {
|
||||||
|
fgettext("Scales every octave by (scale of the previous octave / Lacunarity)."),
|
||||||
|
fgettext("The first octave is scaled by 1."),
|
||||||
|
fgettext("Lower values make the terrain smooth and higher values make the terrain have fine detail.")})
|
||||||
height = height + 1.1
|
height = height + 1.1
|
||||||
|
|
||||||
|
|
||||||
@@ -108,6 +117,8 @@ local function get_formspec(dialogdata)
|
|||||||
for noise settings in the settings menu. ]]
|
for noise settings in the settings menu. ]]
|
||||||
.. fgettext("defaults") .. ";" -- defaults
|
.. fgettext("defaults") .. ";" -- defaults
|
||||||
.. tostring(flags["defaults"] == true) .. "]" -- to get false if nil
|
.. tostring(flags["defaults"] == true) .. "]" -- to get false if nil
|
||||||
|
.. "tooltip[cb_defaults;" .. fgettext("Overrides the 'eased' flag based on the noise type.")
|
||||||
|
.. "\n" .. fgettext("2D noise: flag on.\n3D noise: flag off.") .. "]"
|
||||||
.. "checkbox[5," .. height - 0.6 .. ";cb_eased;"
|
.. "checkbox[5," .. height - 0.6 .. ";cb_eased;"
|
||||||
--[[~ "eased" is a noise parameter flag.
|
--[[~ "eased" is a noise parameter flag.
|
||||||
It is used to make the map smoother and
|
It is used to make the map smoother and
|
||||||
@@ -115,6 +126,10 @@ local function get_formspec(dialogdata)
|
|||||||
the settings menu. ]]
|
the settings menu. ]]
|
||||||
.. fgettext("eased") .. ";" -- eased
|
.. fgettext("eased") .. ";" -- eased
|
||||||
.. tostring(flags["eased"] == true) .. "]"
|
.. tostring(flags["eased"] == true) .. "]"
|
||||||
|
.. "tooltip[cb_eased;"
|
||||||
|
.. fgettext("Maps noise gradient values onto a quintic S-curve before performing interpolation.")
|
||||||
|
.. "\n" .. fgettext("This results in smooth noise instead of gridlike noise.") .. "\n"
|
||||||
|
.. fgettext("Making 3D noise eased is not recommended because it significantly increases the load.") .. "]"
|
||||||
.. "checkbox[5," .. height - 0.15 .. ";cb_absvalue;"
|
.. "checkbox[5," .. height - 0.15 .. ";cb_absvalue;"
|
||||||
--[[~ "absvalue" is a noise parameter flag.
|
--[[~ "absvalue" is a noise parameter flag.
|
||||||
It is short for "absolute value".
|
It is short for "absolute value".
|
||||||
@@ -122,6 +137,9 @@ local function get_formspec(dialogdata)
|
|||||||
the settings menu. ]]
|
the settings menu. ]]
|
||||||
.. fgettext("absvalue") .. ";" -- absvalue
|
.. fgettext("absvalue") .. ";" -- absvalue
|
||||||
.. tostring(flags["absvalue"] == true) .. "]"
|
.. tostring(flags["absvalue"] == true) .. "]"
|
||||||
|
.. "tooltip[cb_absvalue;"
|
||||||
|
.. fgettext("Takes the absolute value of each octave while adding them together.")
|
||||||
|
.. "\n" .. fgettext("This results in spiky noise.") .. "]"
|
||||||
|
|
||||||
height = height + 1
|
height = height + 1
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,6 @@
|
|||||||
--Luanti
|
-- Luanti
|
||||||
--Copyright (C) 2022 rubenwardy
|
-- Copyright (C) 2022 rubenwardy
|
||||||
--
|
-- SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
--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
|
|
||||||
--the Free Software Foundation; either version 2.1 of the License, or
|
|
||||||
--(at your option) any later version.
|
|
||||||
--
|
|
||||||
--This program is distributed in the hope that it will be useful,
|
|
||||||
--but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
--GNU Lesser General Public License for more details.
|
|
||||||
--
|
|
||||||
--You should have received a copy of the GNU Lesser General Public License along
|
|
||||||
--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_builtin_path() .. "common" .. DIR_DELIM .. "settings" .. DIR_DELIM
|
local path = core.get_builtin_path() .. "common" .. DIR_DELIM .. "settings" .. DIR_DELIM
|
||||||
@@ -22,7 +9,6 @@ local component_funcs = dofile(path .. "components.lua")
|
|||||||
local shadows_component = dofile(path .. "shadows_component.lua")
|
local shadows_component = dofile(path .. "shadows_component.lua")
|
||||||
|
|
||||||
local loaded = false
|
local loaded = false
|
||||||
local full_settings
|
|
||||||
local info_icon_path = core.formspec_escape(defaulttexturedir .. "settings_info.png")
|
local info_icon_path = core.formspec_escape(defaulttexturedir .. "settings_info.png")
|
||||||
local reset_icon_path = core.formspec_escape(defaulttexturedir .. "settings_reset.png")
|
local reset_icon_path = core.formspec_escape(defaulttexturedir .. "settings_reset.png")
|
||||||
local all_pages = {}
|
local all_pages = {}
|
||||||
@@ -32,7 +18,7 @@ local filtered_page_by_id = page_by_id
|
|||||||
|
|
||||||
|
|
||||||
local function get_setting_info(name)
|
local function get_setting_info(name)
|
||||||
for _, entry in ipairs(full_settings) do
|
for _, entry in ipairs(core.full_settingtypes) do
|
||||||
if entry.type ~= "category" and entry.name == name then
|
if entry.type ~= "category" and entry.name == name then
|
||||||
return entry
|
return entry
|
||||||
end
|
end
|
||||||
@@ -70,7 +56,7 @@ local function load_settingtypes()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, entry in ipairs(full_settings) do
|
for _, entry in ipairs(core.full_settingtypes) do
|
||||||
if entry.type == "category" then
|
if entry.type == "category" then
|
||||||
if entry.level == 0 then
|
if entry.level == 0 then
|
||||||
section = entry.name
|
section = entry.name
|
||||||
@@ -104,29 +90,14 @@ local function load()
|
|||||||
end
|
end
|
||||||
loaded = true
|
loaded = true
|
||||||
|
|
||||||
full_settings = settingtypes.parse_config_file(false, true)
|
core.full_settingtypes = settingtypes.parse_config_file(false, true)
|
||||||
|
|
||||||
local change_keys = {
|
|
||||||
query_text = "Controls",
|
|
||||||
requires = {
|
|
||||||
keyboard_mouse = true,
|
|
||||||
},
|
|
||||||
get_formspec = function(self, avail_w)
|
|
||||||
local btn_w = math.min(avail_w, 3)
|
|
||||||
return ("button[0,0;%f,0.8;btn_change_keys;%s]"):format(btn_w, fgettext("Controls")), 0.8
|
|
||||||
end,
|
|
||||||
on_submit = function(self, fields)
|
|
||||||
if fields.btn_change_keys then
|
|
||||||
core.show_keys_menu()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
||||||
local touchscreen_layout = {
|
local touchscreen_layout = {
|
||||||
query_text = "Touchscreen layout",
|
query_text = "Touchscreen layout",
|
||||||
requires = {
|
requires = {
|
||||||
touchscreen = true,
|
touchscreen = true,
|
||||||
},
|
},
|
||||||
|
context = "client",
|
||||||
get_formspec = function(self, avail_w)
|
get_formspec = function(self, avail_w)
|
||||||
local btn_w = math.min(avail_w, 6)
|
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
|
return ("button[0,0;%f,0.8;btn_touch_layout;%s]"):format(btn_w, fgettext("Touchscreen layout")), 0.8
|
||||||
@@ -159,13 +130,11 @@ local function load()
|
|||||||
{ heading = fgettext_ne("Movement") },
|
{ heading = fgettext_ne("Movement") },
|
||||||
"arm_inertia",
|
"arm_inertia",
|
||||||
"view_bobbing_amount",
|
"view_bobbing_amount",
|
||||||
"fall_bobbing_amount",
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
load_settingtypes()
|
load_settingtypes()
|
||||||
|
|
||||||
table.insert(page_by_id.controls_keyboard_and_mouse.content, 1, change_keys)
|
|
||||||
-- insert after "touch_controls"
|
-- insert after "touch_controls"
|
||||||
table.insert(page_by_id.controls_touchscreen.content, 2, touchscreen_layout)
|
table.insert(page_by_id.controls_touchscreen.content, 2, touchscreen_layout)
|
||||||
do
|
do
|
||||||
@@ -174,18 +143,24 @@ local function load()
|
|||||||
table.insert(content, idx, shadows_component)
|
table.insert(content, idx, shadows_component)
|
||||||
|
|
||||||
idx = table.indexof(content, "enable_auto_exposure") + 1
|
idx = table.indexof(content, "enable_auto_exposure") + 1
|
||||||
|
local setting_info = get_setting_info("enable_auto_exposure")
|
||||||
local note = component_funcs.note(fgettext_ne("(The game will need to enable automatic exposure as well)"))
|
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
|
note.requires = setting_info.requires
|
||||||
|
note.context = setting_info.context
|
||||||
table.insert(content, idx, note)
|
table.insert(content, idx, note)
|
||||||
|
|
||||||
idx = table.indexof(content, "enable_bloom") + 1
|
idx = table.indexof(content, "enable_bloom") + 1
|
||||||
|
setting_info = get_setting_info("enable_bloom")
|
||||||
note = component_funcs.note(fgettext_ne("(The game will need to enable bloom as well)"))
|
note = component_funcs.note(fgettext_ne("(The game will need to enable bloom as well)"))
|
||||||
note.requires = get_setting_info("enable_bloom").requires
|
note.requires = setting_info.requires
|
||||||
|
note.context = setting_info.context
|
||||||
table.insert(content, idx, note)
|
table.insert(content, idx, note)
|
||||||
|
|
||||||
idx = table.indexof(content, "enable_volumetric_lighting") + 1
|
idx = table.indexof(content, "enable_volumetric_lighting") + 1
|
||||||
|
setting_info = get_setting_info("enable_volumetric_lighting")
|
||||||
note = component_funcs.note(fgettext_ne("(The game will need to enable volumetric lighting as well)"))
|
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
|
note.requires = setting_info.requires
|
||||||
|
note.context = setting_info.context
|
||||||
table.insert(content, idx, note)
|
table.insert(content, idx, note)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -260,6 +235,17 @@ local function load()
|
|||||||
["true"] = fgettext_ne("Enabled"),
|
["true"] = fgettext_ne("Enabled"),
|
||||||
["false"] = fgettext_ne("Disabled"),
|
["false"] = fgettext_ne("Disabled"),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_setting_info("touch_interaction_style").option_labels = {
|
||||||
|
["tap"] = fgettext_ne("Tap"),
|
||||||
|
["tap_crosshair"] = fgettext_ne("Tap with crosshair"),
|
||||||
|
["buttons_crosshair"] = fgettext("Buttons with crosshair"),
|
||||||
|
}
|
||||||
|
|
||||||
|
get_setting_info("touch_punch_gesture").option_labels = {
|
||||||
|
["short_tap"] = fgettext_ne("Short tap"),
|
||||||
|
["long_tap"] = fgettext_ne("Long tap"),
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@@ -352,7 +338,18 @@ local function update_filtered_pages(query)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local function check_requirements(name, requires)
|
local shown_contexts = {
|
||||||
|
common = true,
|
||||||
|
client = true,
|
||||||
|
server = INIT ~= "pause_menu" or core.is_internal_server(),
|
||||||
|
world_creation = INIT ~= "pause_menu",
|
||||||
|
}
|
||||||
|
|
||||||
|
local function check_requirements(name, requires, context)
|
||||||
|
if context and not shown_contexts[context] then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
if requires == nil then
|
if requires == nil then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -360,6 +357,7 @@ local function check_requirements(name, requires)
|
|||||||
local video_driver = core.get_active_driver()
|
local video_driver = core.get_active_driver()
|
||||||
local touch_support = core.irrlicht_device_supports_touch()
|
local touch_support = core.irrlicht_device_supports_touch()
|
||||||
local touch_controls = core.settings:get("touch_controls")
|
local touch_controls = core.settings:get("touch_controls")
|
||||||
|
local touch_interaction_style = core.settings:get("touch_interaction_style")
|
||||||
local special = {
|
local special = {
|
||||||
android = PLATFORM == "Android",
|
android = PLATFORM == "Android",
|
||||||
desktop = PLATFORM ~= "Android",
|
desktop = PLATFORM ~= "Android",
|
||||||
@@ -370,6 +368,7 @@ local function check_requirements(name, requires)
|
|||||||
keyboard_mouse = not touch_support or (touch_controls == "auto" or not 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"),
|
opengl = (video_driver == "opengl" or video_driver == "opengl3"),
|
||||||
gles = video_driver:sub(1, 5) == "ogles",
|
gles = video_driver:sub(1, 5) == "ogles",
|
||||||
|
touch_interaction_style_tap = touch_interaction_style ~= "buttons_crosshair",
|
||||||
}
|
}
|
||||||
|
|
||||||
for req_key, req_value in pairs(requires) do
|
for req_key, req_value in pairs(requires) do
|
||||||
@@ -411,11 +410,11 @@ function page_has_contents(page, actual_content)
|
|||||||
elseif type(item) == "string" then
|
elseif type(item) == "string" then
|
||||||
local setting = get_setting_info(item)
|
local setting = get_setting_info(item)
|
||||||
assert(setting, "Unknown setting: " .. item)
|
assert(setting, "Unknown setting: " .. item)
|
||||||
if check_requirements(setting.name, setting.requires) then
|
if check_requirements(setting.name, setting.requires, setting.context) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
elseif item.get_formspec then
|
elseif item.get_formspec then
|
||||||
if check_requirements(item.id, item.requires) then
|
if check_requirements(item.id, item.requires, item.context) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@@ -437,20 +436,22 @@ local function build_page_components(page)
|
|||||||
elseif item.heading then
|
elseif item.heading then
|
||||||
last_heading = item
|
last_heading = item
|
||||||
else
|
else
|
||||||
local name, requires
|
local name, requires, context
|
||||||
if type(item) == "string" then
|
if type(item) == "string" then
|
||||||
local setting = get_setting_info(item)
|
local setting = get_setting_info(item)
|
||||||
assert(setting, "Unknown setting: " .. item)
|
assert(setting, "Unknown setting: " .. item)
|
||||||
name = setting.name
|
name = setting.name
|
||||||
requires = setting.requires
|
requires = setting.requires
|
||||||
|
context = setting.context
|
||||||
elseif item.get_formspec then
|
elseif item.get_formspec then
|
||||||
name = item.id
|
name = item.id
|
||||||
requires = item.requires
|
requires = item.requires
|
||||||
|
context = item.context
|
||||||
else
|
else
|
||||||
error("Unknown content in page: " .. dump(item))
|
error("Unknown content in page: " .. dump(item))
|
||||||
end
|
end
|
||||||
|
|
||||||
if check_requirements(name, requires) then
|
if check_requirements(name, requires, context) then
|
||||||
if last_heading then
|
if last_heading then
|
||||||
content[#content + 1] = last_heading
|
content[#content + 1] = last_heading
|
||||||
last_heading = nil
|
last_heading = nil
|
||||||
@@ -517,7 +518,7 @@ local function get_formspec(dialogdata)
|
|||||||
|
|
||||||
("button[0,%f;%f,0.8;back;%s]"):format(
|
("button[0,%f;%f,0.8;back;%s]"):format(
|
||||||
tabsize.height + 0.2, back_w,
|
tabsize.height + 0.2, back_w,
|
||||||
fgettext(INIT == "pause_menu" and "Exit" or "Back")),
|
fgettext("Back")),
|
||||||
|
|
||||||
("box[%f,%f;%f,0.8;#0000008C]"):format(
|
("box[%f,%f;%f,0.8;#0000008C]"):format(
|
||||||
back_w + 0.2, tabsize.height + 0.2, checkbox_w),
|
back_w + 0.2, tabsize.height + 0.2, checkbox_w),
|
||||||
@@ -632,7 +633,13 @@ local function get_formspec(dialogdata)
|
|||||||
fs[#fs + 1] = "container_end[]"
|
fs[#fs + 1] = "container_end[]"
|
||||||
|
|
||||||
if used_h > 0 then
|
if used_h > 0 then
|
||||||
y = y + used_h + 0.25
|
local spacing = 0.25
|
||||||
|
local next_comp = dialogdata.components[i + 1]
|
||||||
|
if next_comp and next_comp.spacing then
|
||||||
|
spacing = next_comp.spacing
|
||||||
|
end
|
||||||
|
|
||||||
|
y = y + used_h + spacing
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -771,11 +778,11 @@ end
|
|||||||
|
|
||||||
|
|
||||||
if INIT == "mainmenu" then
|
if INIT == "mainmenu" then
|
||||||
function create_settings_dlg()
|
function create_settings_dlg(page_id)
|
||||||
load()
|
load()
|
||||||
local dlg = dialog_create("dlg_settings", get_formspec, buttonhandler, eventhandler)
|
local dlg = dialog_create("dlg_settings", get_formspec, buttonhandler, eventhandler)
|
||||||
|
|
||||||
dlg.data.page_id = update_filtered_pages("")
|
dlg.data.page_id = page_id or update_filtered_pages("")
|
||||||
|
|
||||||
return dlg
|
return dlg
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ local minetest_example_header = [[
|
|||||||
# to the program, eg. "luanti.exe --config ../minetest.conf.example".
|
# to the program, eg. "luanti.exe --config ../minetest.conf.example".
|
||||||
|
|
||||||
# Further documentation:
|
# Further documentation:
|
||||||
# https://wiki.luanti.org/
|
# https://docs.luanti.org/
|
||||||
|
|
||||||
]]
|
]]
|
||||||
|
|
||||||
@@ -44,15 +44,18 @@ local function create_minetest_conf_example(settings)
|
|||||||
insert(result, rep("#", entry.level))
|
insert(result, rep("#", entry.level))
|
||||||
insert(result, "# " .. entry.name .. "\n\n")
|
insert(result, "# " .. entry.name .. "\n\n")
|
||||||
end
|
end
|
||||||
else
|
else -- any `type` as listed in `settingtypes.txt`
|
||||||
local group_format = false
|
local group_format = false
|
||||||
if entry.noise_params and entry.values then
|
if entry.noise_params and entry.values then
|
||||||
if entry.type == "noise_params_2d" or entry.type == "noise_params_3d" then
|
if entry.type == "noise_params_2d" or entry.type == "noise_params_3d" then
|
||||||
group_format = true
|
group_format = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if entry.comment ~= "" then
|
|
||||||
for _, comment_line in ipairs(entry.comment:split("\n", true)) do
|
local comment = entry.comment ~= "" and entry.comment
|
||||||
|
or entry.readable_name -- fallback to the short description
|
||||||
|
if comment ~= "" then
|
||||||
|
for _, comment_line in ipairs(comment:split("\n", true)) do
|
||||||
if comment_line == "" then
|
if comment_line == "" then
|
||||||
insert(result, "#\n")
|
insert(result, "#\n")
|
||||||
else
|
else
|
||||||
@@ -61,7 +64,7 @@ local function create_minetest_conf_example(settings)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if entry.type == "key" then
|
if entry.type == "key" then
|
||||||
local line = "See https://github.com/minetest/irrlicht/blob/master/include/Keycodes.h"
|
local line = "See https://docs.luanti.org/for-players/controls/"
|
||||||
insert(result, "# " .. line .. "\n")
|
insert(result, "# " .. line .. "\n")
|
||||||
end
|
end
|
||||||
insert(result, "# type: " .. entry.type)
|
insert(result, "# type: " .. entry.type)
|
||||||
@@ -102,23 +105,45 @@ end
|
|||||||
local translation_file_header = [[
|
local translation_file_header = [[
|
||||||
// This file is automatically generated
|
// This file is automatically generated
|
||||||
// It contains a bunch of fake gettext calls, to tell xgettext about the strings in config files
|
// It contains a bunch of fake gettext calls, to tell xgettext about the strings in config files
|
||||||
// To update it, refer to the bottom of builtin/mainmenu/dlg_settings_advanced.lua
|
// To update it, refer to the bottom of builtin/common/settings/init.lua
|
||||||
|
|
||||||
fake_function() {]]
|
fake_function() {]]
|
||||||
|
|
||||||
|
local function add_translation_string(result, str, seen)
|
||||||
|
if seen[str] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
seen[str] = true
|
||||||
|
|
||||||
|
-- Prevent gettext from interpreting e.g. "50% of volume" as C-formatted string
|
||||||
|
-- Documentation: https://www.gnu.org/software/gettext/manual/html_node/c_002dformat-Flag.html
|
||||||
|
local force_no_c_format = str:find("%", 1, true)
|
||||||
|
local prefix = force_no_c_format and "/* xgettext:no-c-format */ " or ""
|
||||||
|
|
||||||
|
local have_newlines = str:find("\n", 1, true)
|
||||||
|
if have_newlines then
|
||||||
|
-- Formatting as "%q" inserts literal newlines. But we want '\n'.
|
||||||
|
-- Hence, use "%s" and escape relevant characters manually.
|
||||||
|
str = str:gsub("\n", "\\n")
|
||||||
|
str = str:gsub("\"", "\\\"")
|
||||||
|
insert(result, sprintf("\t%sgettext(\"%s\");", prefix, str))
|
||||||
|
else
|
||||||
|
insert(result, sprintf("\t%sgettext(%q);", prefix, str))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local function create_translation_file(settings)
|
local function create_translation_file(settings)
|
||||||
|
local seen = {} -- to deduplicate entries
|
||||||
local result = { translation_file_header }
|
local result = { translation_file_header }
|
||||||
for _, entry in ipairs(settings) do
|
for _, entry in ipairs(settings) do
|
||||||
if entry.type == "category" then
|
if entry.type == "category" then
|
||||||
insert(result, sprintf("\tgettext(%q);", entry.name))
|
add_translation_string(result, entry.name, seen)
|
||||||
else
|
else
|
||||||
if entry.readable_name then
|
if entry.readable_name then
|
||||||
insert(result, sprintf("\tgettext(%q);", entry.readable_name))
|
add_translation_string(result, entry.readable_name, seen)
|
||||||
end
|
end
|
||||||
if entry.comment ~= "" then
|
if entry.comment ~= "" then
|
||||||
local comment_escaped = entry.comment:gsub("\n", "\\n")
|
add_translation_string(result, entry.comment, seen)
|
||||||
comment_escaped = comment_escaped:gsub("\"", "\\\"")
|
|
||||||
insert(result, "\tgettext(\"" .. comment_escaped .. "\");")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,19 +1,6 @@
|
|||||||
--Luanti
|
-- Luanti
|
||||||
--Copyright (C) 2022 rubenwardy
|
-- Copyright (C) 2022 rubenwardy
|
||||||
--
|
-- SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
--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
|
|
||||||
--the Free Software Foundation; either version 2.1 of the License, or
|
|
||||||
--(at your option) any later version.
|
|
||||||
--
|
|
||||||
--This program is distributed in the hope that it will be useful,
|
|
||||||
--but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
--GNU Lesser General Public License for more details.
|
|
||||||
--
|
|
||||||
--You should have received a copy of the GNU Lesser General Public License along
|
|
||||||
--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_builtin_path() .. "common" .. DIR_DELIM .. "settings" .. DIR_DELIM
|
local path = core.get_builtin_path() .. "common" .. DIR_DELIM .. "settings" .. DIR_DELIM
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,6 @@
|
|||||||
--Luanti
|
-- Luanti
|
||||||
--Copyright (C) 2015 PilzAdam
|
-- Copyright (C) 2015 PilzAdam
|
||||||
--
|
-- SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
--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
|
|
||||||
--the Free Software Foundation; either version 2.1 of the License, or
|
|
||||||
--(at your option) any later version.
|
|
||||||
--
|
|
||||||
--This program is distributed in the hope that it will be useful,
|
|
||||||
--but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
--GNU Lesser General Public License for more details.
|
|
||||||
--
|
|
||||||
--You should have received a copy of the GNU Lesser General Public License along
|
|
||||||
--with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
settingtypes = {}
|
settingtypes = {}
|
||||||
|
|
||||||
@@ -40,12 +27,24 @@ local CHAR_CLASSES = {
|
|||||||
FLAGS = "[%w_%-%.,]",
|
FLAGS = "[%w_%-%.,]",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local valid_contexts = {common = true, client = true, server = true, world_creation = true}
|
||||||
|
|
||||||
|
local function check_context_annotation(context, force_context)
|
||||||
|
if force_context then
|
||||||
|
return "Context annotations are not allowed, context is always " .. force_context
|
||||||
|
end
|
||||||
|
if not valid_contexts[context] then
|
||||||
|
return "Unknown context"
|
||||||
|
end
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
local function flags_to_table(flags)
|
local function flags_to_table(flags)
|
||||||
return flags:gsub("%s+", ""):split(",", true) -- Remove all spaces and split
|
return flags:gsub("%s+", ""):split(",", true) -- Remove all spaces and split
|
||||||
end
|
end
|
||||||
|
|
||||||
-- returns error message, or nil
|
-- returns error message, or nil
|
||||||
local function parse_setting_line(settings, line, read_all, base_level, allow_secure)
|
local function parse_setting_line(settings, line, read_all, base_level, allow_secure, force_context)
|
||||||
|
|
||||||
-- strip carriage returns (CR, /r)
|
-- strip carriage returns (CR, /r)
|
||||||
line = line:gsub("\r", "")
|
line = line:gsub("\r", "")
|
||||||
@@ -69,9 +68,32 @@ local function parse_setting_line(settings, line, read_all, base_level, allow_se
|
|||||||
|
|
||||||
-- category
|
-- category
|
||||||
local stars, category = line:match("^%[([%*]*)([^%]]+)%]$")
|
local stars, category = line:match("^%[([%*]*)([^%]]+)%]$")
|
||||||
|
local category_context
|
||||||
|
if not category then
|
||||||
|
stars, category, category_context = line:match("^%[([%*]*)([^%]]+)%] %[([^%]]+)%]$")
|
||||||
|
end
|
||||||
if category then
|
if category then
|
||||||
local category_level = stars:len() + base_level
|
local category_level = stars:len() + base_level
|
||||||
|
|
||||||
|
if settings.current_context_level and
|
||||||
|
category_level <= settings.current_context_level then
|
||||||
|
-- The start of this category marks the end of the context annotation's scope.
|
||||||
|
settings.current_context_level = nil
|
||||||
|
settings.current_context = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
if category_context then
|
||||||
|
local err = check_context_annotation(category_context, force_context)
|
||||||
|
if err then
|
||||||
|
return err
|
||||||
|
end
|
||||||
|
if settings.current_context_level then
|
||||||
|
return "Category context annotations cannot be nested"
|
||||||
|
end
|
||||||
|
settings.current_context_level = category_level
|
||||||
|
settings.current_context = category_context
|
||||||
|
end
|
||||||
|
|
||||||
if settings.current_hide_level then
|
if settings.current_hide_level then
|
||||||
if settings.current_hide_level < category_level then
|
if settings.current_hide_level < category_level then
|
||||||
-- Skip this category, it's inside a hidden category.
|
-- Skip this category, it's inside a hidden category.
|
||||||
@@ -102,7 +124,8 @@ local function parse_setting_line(settings, line, read_all, base_level, allow_se
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- settings
|
-- settings
|
||||||
local first_part, name, readable_name, setting_type = line:match("^"
|
local function make_pattern(include_context)
|
||||||
|
return "^"
|
||||||
-- this first capture group matches the whole first part,
|
-- this first capture group matches the whole first part,
|
||||||
-- so we can later strip it from the rest of the line
|
-- so we can later strip it from the rest of the line
|
||||||
.. "("
|
.. "("
|
||||||
@@ -110,9 +133,19 @@ local function parse_setting_line(settings, line, read_all, base_level, allow_se
|
|||||||
.. CHAR_CLASSES.SPACE .. "*"
|
.. CHAR_CLASSES.SPACE .. "*"
|
||||||
.. "%(([^%)]*)%)" -- readable name
|
.. "%(([^%)]*)%)" -- readable name
|
||||||
.. CHAR_CLASSES.SPACE .. "*"
|
.. CHAR_CLASSES.SPACE .. "*"
|
||||||
|
.. (include_context and (
|
||||||
|
"%[([^%]]+)%]" -- context annotation
|
||||||
|
.. CHAR_CLASSES.SPACE .. "*"
|
||||||
|
) or "")
|
||||||
.. "(" .. CHAR_CLASSES.VARIABLE .. "+)" -- type
|
.. "(" .. CHAR_CLASSES.VARIABLE .. "+)" -- type
|
||||||
.. CHAR_CLASSES.SPACE .. "*"
|
.. CHAR_CLASSES.SPACE .. "*"
|
||||||
.. ")")
|
.. ")"
|
||||||
|
end
|
||||||
|
local first_part, name, readable_name, setting_type = line:match(make_pattern(false))
|
||||||
|
local setting_context
|
||||||
|
if not first_part then
|
||||||
|
first_part, name, readable_name, setting_context, setting_type = line:match(make_pattern(true))
|
||||||
|
end
|
||||||
|
|
||||||
if not first_part then
|
if not first_part then
|
||||||
return "Invalid line"
|
return "Invalid line"
|
||||||
@@ -122,6 +155,26 @@ local function parse_setting_line(settings, line, read_all, base_level, allow_se
|
|||||||
return "Tried to add \"secure.\" setting"
|
return "Tried to add \"secure.\" setting"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if setting_context then
|
||||||
|
local err = check_context_annotation(setting_context, force_context)
|
||||||
|
if err then
|
||||||
|
return err
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local context
|
||||||
|
if force_context then
|
||||||
|
context = force_context
|
||||||
|
else
|
||||||
|
if setting_context then
|
||||||
|
context = setting_context
|
||||||
|
elseif settings.current_context_level then
|
||||||
|
context = settings.current_context
|
||||||
|
else
|
||||||
|
return "Missing context annotation"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local requires = {}
|
local requires = {}
|
||||||
local last_line = #current_comment > 0 and current_comment[#current_comment]:trim()
|
local last_line = #current_comment > 0 and current_comment[#current_comment]:trim()
|
||||||
if last_line and last_line:lower():sub(1, 9) == "requires:" then
|
if last_line and last_line:lower():sub(1, 9) == "requires:" then
|
||||||
@@ -170,6 +223,7 @@ local function parse_setting_line(settings, line, read_all, base_level, allow_se
|
|||||||
min = min,
|
min = min,
|
||||||
max = max,
|
max = max,
|
||||||
requires = requires,
|
requires = requires,
|
||||||
|
context = context,
|
||||||
comment = comment,
|
comment = comment,
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
@@ -182,9 +236,9 @@ local function parse_setting_line(settings, line, read_all, base_level, allow_se
|
|||||||
if not default then
|
if not default then
|
||||||
return "Invalid string setting"
|
return "Invalid string setting"
|
||||||
end
|
end
|
||||||
if setting_type == "key" and not read_all then
|
|
||||||
-- ignore key type if read_all is false
|
if setting_type == "key" then
|
||||||
return
|
requires.keyboard_mouse = true
|
||||||
end
|
end
|
||||||
|
|
||||||
table.insert(settings, {
|
table.insert(settings, {
|
||||||
@@ -193,6 +247,7 @@ local function parse_setting_line(settings, line, read_all, base_level, allow_se
|
|||||||
type = setting_type,
|
type = setting_type,
|
||||||
default = default,
|
default = default,
|
||||||
requires = requires,
|
requires = requires,
|
||||||
|
context = context,
|
||||||
comment = comment,
|
comment = comment,
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
@@ -245,6 +300,7 @@ local function parse_setting_line(settings, line, read_all, base_level, allow_se
|
|||||||
},
|
},
|
||||||
values = values,
|
values = values,
|
||||||
requires = requires,
|
requires = requires,
|
||||||
|
context = context,
|
||||||
comment = comment,
|
comment = comment,
|
||||||
noise_params = true,
|
noise_params = true,
|
||||||
flags = flags_to_table("defaults,eased,absvalue")
|
flags = flags_to_table("defaults,eased,absvalue")
|
||||||
@@ -263,6 +319,7 @@ local function parse_setting_line(settings, line, read_all, base_level, allow_se
|
|||||||
type = "bool",
|
type = "bool",
|
||||||
default = remaining_line,
|
default = remaining_line,
|
||||||
requires = requires,
|
requires = requires,
|
||||||
|
context = context,
|
||||||
comment = comment,
|
comment = comment,
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
@@ -290,6 +347,7 @@ local function parse_setting_line(settings, line, read_all, base_level, allow_se
|
|||||||
min = min,
|
min = min,
|
||||||
max = max,
|
max = max,
|
||||||
requires = requires,
|
requires = requires,
|
||||||
|
context = context,
|
||||||
comment = comment,
|
comment = comment,
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
@@ -313,6 +371,7 @@ local function parse_setting_line(settings, line, read_all, base_level, allow_se
|
|||||||
default = default,
|
default = default,
|
||||||
values = values:split(",", true),
|
values = values:split(",", true),
|
||||||
requires = requires,
|
requires = requires,
|
||||||
|
context = context,
|
||||||
comment = comment,
|
comment = comment,
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
@@ -331,6 +390,7 @@ local function parse_setting_line(settings, line, read_all, base_level, allow_se
|
|||||||
type = setting_type,
|
type = setting_type,
|
||||||
default = default,
|
default = default,
|
||||||
requires = requires,
|
requires = requires,
|
||||||
|
context = context,
|
||||||
comment = comment,
|
comment = comment,
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
@@ -361,6 +421,7 @@ local function parse_setting_line(settings, line, read_all, base_level, allow_se
|
|||||||
default = default,
|
default = default,
|
||||||
possible = flags_to_table(possible),
|
possible = flags_to_table(possible),
|
||||||
requires = requires,
|
requires = requires,
|
||||||
|
context = context,
|
||||||
comment = comment,
|
comment = comment,
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
@@ -369,14 +430,14 @@ local function parse_setting_line(settings, line, read_all, base_level, allow_se
|
|||||||
return "Invalid setting type \"" .. setting_type .. "\""
|
return "Invalid setting type \"" .. setting_type .. "\""
|
||||||
end
|
end
|
||||||
|
|
||||||
local function parse_single_file(file, filepath, read_all, result, base_level, allow_secure)
|
local function parse_single_file(file, filepath, read_all, result, base_level, allow_secure, force_context)
|
||||||
-- store this helper variable in the table so it's easier to pass to parse_setting_line()
|
-- store this helper variable in the table so it's easier to pass to parse_setting_line()
|
||||||
result.current_comment = {}
|
result.current_comment = {}
|
||||||
result.current_hide_level = nil
|
result.current_hide_level = nil
|
||||||
|
|
||||||
local line = file:read("*line")
|
local line = file:read("*line")
|
||||||
while line do
|
while line do
|
||||||
local error_msg = parse_setting_line(result, line, read_all, base_level, allow_secure)
|
local error_msg = parse_setting_line(result, line, read_all, base_level, allow_secure, force_context)
|
||||||
if error_msg then
|
if error_msg then
|
||||||
core.log("error", error_msg .. " in " .. filepath .. " \"" .. line .. "\"")
|
core.log("error", error_msg .. " in " .. filepath .. " \"" .. line .. "\"")
|
||||||
end
|
end
|
||||||
@@ -411,7 +472,6 @@ function settingtypes.parse_config_file(read_all, parse_mods)
|
|||||||
-- TODO: Support game/mod settings in the pause menu too
|
-- 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
|
-- Note that this will need to work different from how it's done in the
|
||||||
-- mainmenu:
|
-- mainmenu:
|
||||||
-- * Only if in singleplayer / on local server, not on remote servers
|
|
||||||
-- * Only show settings for the active game and mods
|
-- * Only show settings for the active game and mods
|
||||||
-- (add API function to get them, can return nil if on a remote server)
|
-- (add API function to get them, can return nil if on a remote server)
|
||||||
-- (names are probably not enough, will need paths for uniqueness)
|
-- (names are probably not enough, will need paths for uniqueness)
|
||||||
@@ -441,7 +501,7 @@ function settingtypes.parse_config_file(read_all, parse_mods)
|
|||||||
type = "category",
|
type = "category",
|
||||||
})
|
})
|
||||||
|
|
||||||
parse_single_file(file, path, read_all, settings, 2, false)
|
parse_single_file(file, path, read_all, settings, 2, false, "server")
|
||||||
|
|
||||||
file:close()
|
file:close()
|
||||||
end
|
end
|
||||||
@@ -474,7 +534,7 @@ function settingtypes.parse_config_file(read_all, parse_mods)
|
|||||||
type = "category",
|
type = "category",
|
||||||
})
|
})
|
||||||
|
|
||||||
parse_single_file(file, path, read_all, settings, 2, false)
|
parse_single_file(file, path, read_all, settings, 2, false, "server")
|
||||||
|
|
||||||
file:close()
|
file:close()
|
||||||
end
|
end
|
||||||
@@ -505,7 +565,7 @@ function settingtypes.parse_config_file(read_all, parse_mods)
|
|||||||
type = "category",
|
type = "category",
|
||||||
})
|
})
|
||||||
|
|
||||||
parse_single_file(file, path, read_all, settings, 2, false)
|
parse_single_file(file, path, read_all, settings, 2, false, "client")
|
||||||
|
|
||||||
file:close()
|
file:close()
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,20 +1,7 @@
|
|||||||
--Luanti
|
-- Luanti
|
||||||
--Copyright (C) 2021-2 x2048
|
-- Copyright (C) 2021-2 x2048
|
||||||
--Copyright (C) 2022-3 rubenwardy
|
-- Copyright (C) 2022-3 rubenwardy
|
||||||
--
|
-- SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
--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
|
|
||||||
--the Free Software Foundation; either version 2.1 of the License, or
|
|
||||||
--(at your option) any later version.
|
|
||||||
--
|
|
||||||
--This program is distributed in the hope that it will be useful,
|
|
||||||
--but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
--GNU Lesser General Public License for more details.
|
|
||||||
--
|
|
||||||
--You should have received a copy of the GNU Lesser General Public License along
|
|
||||||
--with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
|
|
||||||
local shadow_levels_labels = {
|
local shadow_levels_labels = {
|
||||||
@@ -84,6 +71,7 @@ return {
|
|||||||
requires = {
|
requires = {
|
||||||
opengl = true,
|
opengl = true,
|
||||||
},
|
},
|
||||||
|
context = "client",
|
||||||
get_formspec = function(self, avail_w)
|
get_formspec = function(self, avail_w)
|
||||||
local labels = table.copy(shadow_levels_labels)
|
local labels = table.copy(shadow_levels_labels)
|
||||||
local idx = detect_mapping_idx()
|
local idx = detect_mapping_idx()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
local getinfo, rawget, rawset = debug.getinfo, rawget, rawset
|
local debug_getinfo, rawget, rawset = debug.getinfo, rawget, rawset
|
||||||
|
|
||||||
function core.global_exists(name)
|
function core.global_exists(name)
|
||||||
if type(name) ~= "string" then
|
if type(name) ~= "string" then
|
||||||
@@ -18,13 +18,15 @@ function meta:__newindex(name, value)
|
|||||||
if declared[name] then
|
if declared[name] then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local info = getinfo(2, "Sl")
|
local info = debug_getinfo(2, "Sl")
|
||||||
local desc = ("%s:%d"):format(info.short_src, info.currentline)
|
if info ~= nil then
|
||||||
local warn_key = ("%s\0%d\0%s"):format(info.source, info.currentline, name)
|
local desc = ("%s:%d"):format(info.short_src, info.currentline)
|
||||||
if not warned[warn_key] and info.what ~= "main" and info.what ~= "C" then
|
local warn_key = ("%s\0%d\0%s"):format(info.source, info.currentline, name)
|
||||||
core.log("warning", ("Assignment to undeclared global %q inside a function at %s.")
|
if not warned[warn_key] and info.what ~= "main" and info.what ~= "C" then
|
||||||
:format(name, desc))
|
core.log("warning", ("Assignment to undeclared global %q inside a function at %s.")
|
||||||
warned[warn_key] = true
|
:format(name, desc))
|
||||||
|
warned[warn_key] = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
declared[name] = true
|
declared[name] = true
|
||||||
end
|
end
|
||||||
@@ -34,7 +36,10 @@ function meta:__index(name)
|
|||||||
if declared[name] then
|
if declared[name] then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local info = getinfo(2, "Sl")
|
local info = debug_getinfo(2, "Sl")
|
||||||
|
if info == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
local warn_key = ("%s\0%d\0%s"):format(info.source, info.currentline, name)
|
local warn_key = ("%s\0%d\0%s"):format(info.source, info.currentline, name)
|
||||||
if not warned[warn_key] and info.what ~= "C" then
|
if not warned[warn_key] and info.what ~= "C" then
|
||||||
core.log("warning", ("Undeclared global variable %q accessed at %s:%s")
|
core.log("warning", ("Undeclared global variable %q accessed at %s:%s")
|
||||||
|
|||||||
@@ -178,6 +178,35 @@ describe("table", function()
|
|||||||
assert.equal(2, table.keyof({[2] = "foo", [3] = "bar"}, "foo"))
|
assert.equal(2, table.keyof({[2] = "foo", [3] = "bar"}, "foo"))
|
||||||
assert.equal(3, table.keyof({[1] = "foo", [3] = "bar"}, "bar"))
|
assert.equal(3, table.keyof({[1] = "foo", [3] = "bar"}, "bar"))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
describe("copy()", function()
|
||||||
|
it("strips metatables", function()
|
||||||
|
local v = vector.new(1, 2, 3)
|
||||||
|
local w = table.copy(v)
|
||||||
|
assert.are_not.equal(v, w)
|
||||||
|
assert.same(v, w)
|
||||||
|
assert.equal(nil, getmetatable(w))
|
||||||
|
end)
|
||||||
|
it("preserves referential structure", function()
|
||||||
|
local t = {{}, {}}
|
||||||
|
t[1][1] = t[2]
|
||||||
|
t[2][1] = t[1]
|
||||||
|
local copy = table.copy(t)
|
||||||
|
assert.same(t, copy)
|
||||||
|
assert.equal(copy[1][1], copy[2])
|
||||||
|
assert.equal(copy[2][1], copy[1])
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
|
||||||
|
describe("copy_with_metatables()", function()
|
||||||
|
it("preserves metatables", function()
|
||||||
|
local v = vector.new(1, 2, 3)
|
||||||
|
local w = table.copy_with_metatables(v)
|
||||||
|
assert.equal(getmetatable(v), getmetatable(w))
|
||||||
|
assert(vector.check(w))
|
||||||
|
assert.equal(v, w) -- vector overrides ==
|
||||||
|
end)
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
describe("formspec_escape", function()
|
describe("formspec_escape", function()
|
||||||
@@ -201,3 +230,124 @@ describe("math", function()
|
|||||||
assert.equal(0, math.round(-0.49999999999999994))
|
assert.equal(0, math.round(-0.49999999999999994))
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
describe("dump", function()
|
||||||
|
local function test_expression(expr)
|
||||||
|
local chunk = assert(loadstring("return " .. expr))
|
||||||
|
local refs = {}
|
||||||
|
setfenv(chunk, {
|
||||||
|
setref = function(id)
|
||||||
|
refs[id] = {}
|
||||||
|
return function(fields)
|
||||||
|
for k, v in pairs(fields) do
|
||||||
|
refs[id][k] = v
|
||||||
|
end
|
||||||
|
return refs[id]
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
getref = function(id)
|
||||||
|
return assert(refs[id])
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
assert.equal(expr, dump(chunk()))
|
||||||
|
end
|
||||||
|
|
||||||
|
it("nil", function()
|
||||||
|
test_expression("nil")
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("booleans", function()
|
||||||
|
test_expression("false")
|
||||||
|
test_expression("true")
|
||||||
|
end)
|
||||||
|
|
||||||
|
describe("numbers", function()
|
||||||
|
it("formats integers nicely", function()
|
||||||
|
test_expression("42")
|
||||||
|
end)
|
||||||
|
it("avoids misleading rounding", function()
|
||||||
|
test_expression("0.3")
|
||||||
|
assert.equal("0.30000000000000004", dump(0.1 + 0.2))
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("strings", function()
|
||||||
|
test_expression('"hello world"')
|
||||||
|
test_expression([["hello \"world\""]])
|
||||||
|
end)
|
||||||
|
|
||||||
|
describe("tables", function()
|
||||||
|
it("empty", function()
|
||||||
|
test_expression("{}")
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("lists", function()
|
||||||
|
test_expression([[
|
||||||
|
{
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
"foo",
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
}]])
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("number keys", function()
|
||||||
|
test_expression([[
|
||||||
|
{
|
||||||
|
[0.5] = false,
|
||||||
|
[1.5] = true,
|
||||||
|
[2.5] = "foo",
|
||||||
|
}]])
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("dicts", function()
|
||||||
|
test_expression([[{
|
||||||
|
a = 1,
|
||||||
|
b = 2,
|
||||||
|
c = 3,
|
||||||
|
}]])
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("mixed", function()
|
||||||
|
test_expression([[{
|
||||||
|
a = 1,
|
||||||
|
b = 2,
|
||||||
|
c = 3,
|
||||||
|
["d e"] = true,
|
||||||
|
"foo",
|
||||||
|
"bar",
|
||||||
|
}]])
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("nested", function()
|
||||||
|
test_expression([[{
|
||||||
|
a = {
|
||||||
|
1,
|
||||||
|
{},
|
||||||
|
},
|
||||||
|
b = "foo",
|
||||||
|
c = {
|
||||||
|
[0.5] = 0.1,
|
||||||
|
[1.5] = 0.2,
|
||||||
|
},
|
||||||
|
}]])
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("circular references", function()
|
||||||
|
test_expression([[setref(1){
|
||||||
|
child = {
|
||||||
|
parent = getref(1),
|
||||||
|
},
|
||||||
|
other_child = {
|
||||||
|
parent = getref(1),
|
||||||
|
},
|
||||||
|
}]])
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("supports variable indent", function()
|
||||||
|
assert.equal('{1,2,3,{foo = "bar",},}', dump({1, 2, 3, {foo = "bar"}}, ""))
|
||||||
|
assert.equal('{\n "x",\n "y",\n}', dump({"x", "y"}, " "))
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
|||||||
@@ -93,21 +93,49 @@ describe("serialize", function()
|
|||||||
assert_preserves(test_in)
|
assert_preserves(test_in)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it("strips functions in safe mode", function()
|
describe("safe mode", function()
|
||||||
local test_in = {
|
setup(function()
|
||||||
func = function(a, b)
|
assert(not core.log)
|
||||||
error("test")
|
-- logging a deprecation warning will be attempted
|
||||||
end,
|
function core.log() end
|
||||||
foo = "bar"
|
end)
|
||||||
}
|
teardown(function()
|
||||||
setfenv(test_in.func, _G)
|
core.log = nil
|
||||||
|
end)
|
||||||
|
it("functions are stripped", function()
|
||||||
|
local test_in = {
|
||||||
|
func = function(a, b)
|
||||||
|
error("test")
|
||||||
|
end,
|
||||||
|
foo = "bar"
|
||||||
|
}
|
||||||
|
setfenv(test_in.func, _G)
|
||||||
|
|
||||||
local str = core.serialize(test_in)
|
local str = core.serialize(test_in)
|
||||||
assert.not_nil(str:find("loadstring"))
|
assert.not_nil(str:find("loadstring"))
|
||||||
|
|
||||||
local test_out = core.deserialize(str, true)
|
local test_out = core.deserialize(str, true)
|
||||||
assert.is_nil(test_out.func)
|
assert.is_nil(test_out.func)
|
||||||
assert.equals(test_out.foo, "bar")
|
assert.equals(test_out.foo, "bar")
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
|
||||||
|
describe("deprecation warnings", function()
|
||||||
|
before_each(function()
|
||||||
|
assert(not core.log)
|
||||||
|
core.log = spy.new(function(level)
|
||||||
|
assert(level == "deprecated")
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
after_each(function()
|
||||||
|
core.log = nil
|
||||||
|
end)
|
||||||
|
it("dumping functions", function()
|
||||||
|
local t = {f = function() end, g = function() end}
|
||||||
|
t.t = t
|
||||||
|
core.serialize(t)
|
||||||
|
assert.spy(core.log).was.called(1) -- should have been called exactly *once*
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it("vectors work", function()
|
it("vectors work", function()
|
||||||
|
|||||||
@@ -432,7 +432,32 @@ describe("vector", function()
|
|||||||
assert.True(almost_equal({x = 1, y = 0, z = 0},
|
assert.True(almost_equal({x = 1, y = 0, z = 0},
|
||||||
vector.rotate({x = 1, y = 0, z = 0}, {x = math.pi / 123, y = 0, z = 0})))
|
vector.rotate({x = 1, y = 0, z = 0}, {x = math.pi / 123, y = 0, z = 0})))
|
||||||
end)
|
end)
|
||||||
it("is counterclockwise", function()
|
it("rotation order is Z-X-Y", function()
|
||||||
|
local r = vector.new(1, 2, 3)
|
||||||
|
for _, v in ipairs({
|
||||||
|
vector.new(1, 0, 0),
|
||||||
|
vector.new(0, 1, 0),
|
||||||
|
vector.new(0, 0, 1),
|
||||||
|
}) do
|
||||||
|
local expected = v:rotate(r)
|
||||||
|
local function try(order)
|
||||||
|
local rotated = v
|
||||||
|
for axis in order:gmatch(".") do
|
||||||
|
local r_axis = vector.zero()
|
||||||
|
r_axis[axis] = r[axis]
|
||||||
|
rotated = vector.rotate(rotated, r_axis)
|
||||||
|
end
|
||||||
|
return almost_equal(rotated, expected)
|
||||||
|
end
|
||||||
|
assert.False(try("xyz"))
|
||||||
|
assert.False(try("xzy"))
|
||||||
|
assert.False(try("yxz"))
|
||||||
|
assert.False(try("yzx"))
|
||||||
|
assert.True(try("zxy"))
|
||||||
|
assert.False(try("zyx"))
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
it("is right handed", function()
|
||||||
local v_before1 = {x = 0, y = 1, z = -1}
|
local v_before1 = {x = 0, y = 1, z = -1}
|
||||||
local v_after1 = vector.rotate(v_before1, {x = math.pi / 4, y = 0, z = 0})
|
local v_after1 = vector.rotate(v_before1, {x = math.pi / 4, y = 0, z = 0})
|
||||||
assert.True(almost_equal(vector.normalize(vector.cross(v_after1, v_before1)), {x = 1, y = 0, z = 0}))
|
assert.True(almost_equal(vector.normalize(vector.cross(v_after1, v_before1)), {x = 1, y = 0, z = 0}))
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ function core.get_node(pos)
|
|||||||
return core.vmanip:get_node_at(pos)
|
return core.vmanip:get_node_at(pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
function core.get_perlin(seed, octaves, persist, spread)
|
function core.get_value_noise(seed, octaves, persist, spread)
|
||||||
local params
|
local params
|
||||||
if type(seed) == "table" then
|
if type(seed) == "table" then
|
||||||
params = table.copy(seed)
|
params = table.copy(seed)
|
||||||
@@ -47,12 +47,18 @@ function core.get_perlin(seed, octaves, persist, spread)
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
params.seed = core.get_seed(params.seed) -- add mapgen seed
|
params.seed = core.get_seed(params.seed) -- add mapgen seed
|
||||||
return PerlinNoise(params)
|
return ValueNoise(params)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function core.get_value_noise_map(params, size)
|
||||||
function core.get_perlin_map(params, size)
|
|
||||||
local params2 = table.copy(params)
|
local params2 = table.copy(params)
|
||||||
params2.seed = core.get_seed(params.seed) -- add mapgen seed
|
params2.seed = core.get_seed(params.seed) -- add mapgen seed
|
||||||
return PerlinNoiseMap(params2, size)
|
return ValueNoiseMap(params2, size)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- deprecated as of 5.12, as it was not Perlin noise
|
||||||
|
-- but with no warnings (yet) for compatibility
|
||||||
|
core.get_perlin = core.get_value_noise
|
||||||
|
core.get_perlin_map = core.get_value_noise_map
|
||||||
|
PerlinNoise = ValueNoise
|
||||||
|
PerlinNoiseMap = ValueNoiseMap
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ do
|
|||||||
all.registered_craftitems = {}
|
all.registered_craftitems = {}
|
||||||
all.registered_tools = {}
|
all.registered_tools = {}
|
||||||
for k, v in pairs(all.registered_items) do
|
for k, v in pairs(all.registered_items) do
|
||||||
-- Disable further modification
|
-- Ignore new keys
|
||||||
setmetatable(v, {__newindex = {}})
|
setmetatable(v, {__newindex = function() end})
|
||||||
-- Reassemble the other tables
|
-- Reassemble the other tables
|
||||||
if v.type == "node" then
|
if v.type == "node" then
|
||||||
getmetatable(v).__index = all.nodedef_default
|
getmetatable(v).__index = all.nodedef_default
|
||||||
@@ -36,6 +36,9 @@ end
|
|||||||
local alias_metatable = {
|
local alias_metatable = {
|
||||||
__index = function(t, name)
|
__index = function(t, name)
|
||||||
return rawget(t, core.registered_aliases[name])
|
return rawget(t, core.registered_aliases[name])
|
||||||
|
end,
|
||||||
|
__newindex = function()
|
||||||
|
error("table is read-only")
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
setmetatable(core.registered_items, alias_metatable)
|
setmetatable(core.registered_items, alias_metatable)
|
||||||
|
|||||||
@@ -1,20 +1,7 @@
|
|||||||
--Luanti
|
-- Luanti
|
||||||
--Copyright (C) 2014 sapier
|
-- Copyright (C) 2014 sapier
|
||||||
--Copyright (C) 2023 Gregor Parzefall
|
-- Copyright (C) 2023 Gregor Parzefall
|
||||||
--
|
-- SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
--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
|
|
||||||
--the Free Software Foundation; either version 2.1 of the License, or
|
|
||||||
--(at your option) any later version.
|
|
||||||
--
|
|
||||||
--This program is distributed in the hope that it will be useful,
|
|
||||||
--but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
--GNU Lesser General Public License for more details.
|
|
||||||
--
|
|
||||||
--You should have received a copy of the GNU Lesser General Public License along
|
|
||||||
--with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
|
|
||||||
local BASE_SPACING = 0.1
|
local BASE_SPACING = 0.1
|
||||||
|
|||||||
@@ -1,19 +1,6 @@
|
|||||||
--Luanti
|
-- Luanti
|
||||||
--Copyright (C) 2014 sapier
|
-- Copyright (C) 2014 sapier
|
||||||
--
|
-- SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
--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
|
|
||||||
--the Free Software Foundation; either version 2.1 of the License, or
|
|
||||||
--(at your option) any later version.
|
|
||||||
--
|
|
||||||
--this program is distributed in the hope that it will be useful,
|
|
||||||
--but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
--GNU Lesser General Public License for more details.
|
|
||||||
--
|
|
||||||
--You should have received a copy of the GNU Lesser General Public License along
|
|
||||||
--with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
local function dialog_event_handler(self,event)
|
local function dialog_event_handler(self,event)
|
||||||
if self.user_eventhandler == nil or
|
if self.user_eventhandler == nil or
|
||||||
|
|||||||
@@ -1,19 +1,6 @@
|
|||||||
--Luanti
|
-- Luanti
|
||||||
--Copyright (C) 2014 sapier
|
-- Copyright (C) 2014 sapier
|
||||||
--
|
-- SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
--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
|
|
||||||
--the Free Software Foundation; either version 2.1 of the License, or
|
|
||||||
--(at your option) any later version.
|
|
||||||
--
|
|
||||||
--This program is distributed in the hope that it will be useful,
|
|
||||||
--but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
--GNU Lesser General Public License for more details.
|
|
||||||
--
|
|
||||||
--You should have received a copy of the GNU Lesser General Public License along
|
|
||||||
--with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1,19 +1,6 @@
|
|||||||
--Luanti
|
-- Luanti
|
||||||
--Copyright (C) 2014 sapier
|
-- Copyright (C) 2014 sapier
|
||||||
--
|
-- SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
--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
|
|
||||||
--the Free Software Foundation; either version 2.1 of the License, or
|
|
||||||
--(at your option) any later version.
|
|
||||||
--
|
|
||||||
--This program is distributed in the hope that it will be useful,
|
|
||||||
--but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
--GNU Lesser General Public License for more details.
|
|
||||||
--
|
|
||||||
--You should have received a copy of the GNU Lesser General Public License along
|
|
||||||
--with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
ui = {}
|
ui = {}
|
||||||
ui.childlist = {}
|
ui.childlist = {}
|
||||||
@@ -131,7 +118,7 @@ function ui.update()
|
|||||||
|
|
||||||
if (active_toplevel_ui_elements > 1) then
|
if (active_toplevel_ui_elements > 1) then
|
||||||
core.log("warning", "more than one active ui "..
|
core.log("warning", "more than one active ui "..
|
||||||
"element, self most likely isn't intended")
|
"element, this most likely isn't intended")
|
||||||
end
|
end
|
||||||
|
|
||||||
if (active_toplevel_ui_elements == 0) then
|
if (active_toplevel_ui_elements == 0) then
|
||||||
@@ -179,6 +166,10 @@ end
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
core.button_handler = function(fields)
|
core.button_handler = function(fields)
|
||||||
|
if fields["try_quit"] and not fields["key_enter"] then
|
||||||
|
core.event_handler("MenuQuit")
|
||||||
|
return
|
||||||
|
end
|
||||||
if fields["btn_reconnect_yes"] then
|
if fields["btn_reconnect_yes"] then
|
||||||
gamedata.reconnect_requested = false
|
gamedata.reconnect_requested = false
|
||||||
gamedata.errormessage = nil
|
gamedata.errormessage = nil
|
||||||
|
|||||||
@@ -8,15 +8,24 @@ function core.async_event_handler(jobid, retval)
|
|||||||
core.async_jobs[jobid] = nil
|
core.async_jobs[jobid] = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local job_metatable = {__index = {}}
|
||||||
|
|
||||||
|
function job_metatable.__index:cancel()
|
||||||
|
local cancelled = core.cancel_async_callback(self.id)
|
||||||
|
if cancelled then
|
||||||
|
core.async_jobs[self.id] = nil
|
||||||
|
end
|
||||||
|
return cancelled
|
||||||
|
end
|
||||||
|
|
||||||
function core.handle_async(func, callback, ...)
|
function core.handle_async(func, callback, ...)
|
||||||
assert(type(func) == "function" and type(callback) == "function",
|
assert(type(func) == "function" and type(callback) == "function",
|
||||||
"Invalid core.handle_async invocation")
|
"Invalid core.handle_async invocation")
|
||||||
local args = {n = select("#", ...), ...}
|
local args = {n = select("#", ...), ...}
|
||||||
local mod_origin = core.get_last_run_mod()
|
local mod_origin = core.get_last_run_mod()
|
||||||
|
|
||||||
local jobid = core.do_async_callback(func, args, mod_origin)
|
local id = core.do_async_callback(func, args, mod_origin)
|
||||||
core.async_jobs[jobid] = callback
|
core.async_jobs[id] = callback
|
||||||
|
|
||||||
return true
|
return setmetatable({id = id}, job_metatable)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ end
|
|||||||
-- Chat command handler
|
-- Chat command handler
|
||||||
--
|
--
|
||||||
|
|
||||||
core.chatcommands = core.registered_chatcommands -- BACKWARDS COMPATIBILITY
|
core.chatcommands = core.registered_chatcommands -- backwards compatibility
|
||||||
|
|
||||||
local msg_time_threshold =
|
local msg_time_threshold =
|
||||||
tonumber(core.settings:get("chatcommand_msg_time_threshold")) or 0.1
|
tonumber(core.settings:get("chatcommand_msg_time_threshold")) or 0.1
|
||||||
@@ -60,6 +60,8 @@ core.register_on_chat_message(function(name, message)
|
|||||||
|
|
||||||
param = param or ""
|
param = param or ""
|
||||||
|
|
||||||
|
core.log("verbose", string.format("Handling chat command %q with params %q", cmd, param))
|
||||||
|
|
||||||
-- Run core.registered_on_chatcommands callbacks.
|
-- Run core.registered_on_chatcommands callbacks.
|
||||||
if core.run_callbacks(core.registered_on_chatcommands, 5, name, cmd, param) then
|
if core.run_callbacks(core.registered_on_chatcommands, 5, name, cmd, param) then
|
||||||
return true
|
return true
|
||||||
@@ -900,6 +902,7 @@ core.register_chatcommand("spawnentity", {
|
|||||||
core.register_chatcommand("pulverize", {
|
core.register_chatcommand("pulverize", {
|
||||||
params = "",
|
params = "",
|
||||||
description = S("Destroy item in hand"),
|
description = S("Destroy item in hand"),
|
||||||
|
privs = {give=true},
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
local player = core.get_player_by_name(name)
|
local player = core.get_player_by_name(name)
|
||||||
if not player then
|
if not player then
|
||||||
@@ -1275,7 +1278,7 @@ core.register_chatcommand("msg", {
|
|||||||
core.log("action", "DM from " .. name .. " to " .. sendto
|
core.log("action", "DM from " .. name .. " to " .. sendto
|
||||||
.. ": " .. message)
|
.. ": " .. message)
|
||||||
core.chat_send_player(sendto, S("DM from @1: @2", name, message))
|
core.chat_send_player(sendto, S("DM from @1: @2", name, message))
|
||||||
return true, S("Message sent.")
|
return true, S("DM sent to @1: @2", sendto, message)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -1300,6 +1303,7 @@ core.register_chatcommand("last-login", {
|
|||||||
core.register_chatcommand("clearinv", {
|
core.register_chatcommand("clearinv", {
|
||||||
params = S("[<name>]"),
|
params = S("[<name>]"),
|
||||||
description = S("Clear the inventory of yourself or another player"),
|
description = S("Clear the inventory of yourself or another player"),
|
||||||
|
privs = {give=true},
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
local player
|
local player
|
||||||
if param and param ~= "" and param ~= name then
|
if param and param ~= "" and param ~= name then
|
||||||
|
|||||||
@@ -61,3 +61,10 @@ function core.register_on_auth_fail(func)
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- deprecated as of 5.12, as it was not Perlin noise
|
||||||
|
-- but with no warnings (yet) for compatibility
|
||||||
|
core.get_perlin = core.get_value_noise
|
||||||
|
core.get_perlin_map = core.get_value_noise_map
|
||||||
|
PerlinNoise = ValueNoise
|
||||||
|
PerlinNoiseMap = ValueNoiseMap
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
local builtin_shared = ...
|
local builtin_shared = ...
|
||||||
local SCALE = 0.667
|
|
||||||
|
|
||||||
local facedir_to_euler = {
|
local facedir_to_euler = {
|
||||||
{y = 0, x = 0, z = 0},
|
{y = 0, x = 0, z = 0},
|
||||||
@@ -36,9 +35,7 @@ local gravity = tonumber(core.settings:get("movement_gravity")) or 9.81
|
|||||||
|
|
||||||
core.register_entity(":__builtin:falling_node", {
|
core.register_entity(":__builtin:falling_node", {
|
||||||
initial_properties = {
|
initial_properties = {
|
||||||
visual = "item",
|
visual = "node",
|
||||||
visual_size = vector.new(SCALE, SCALE, SCALE),
|
|
||||||
textures = {},
|
|
||||||
physical = true,
|
physical = true,
|
||||||
is_visible = false,
|
is_visible = false,
|
||||||
collide_with_objects = true,
|
collide_with_objects = true,
|
||||||
@@ -80,41 +77,15 @@ core.register_entity(":__builtin:falling_node", {
|
|||||||
-- Save liquidtype for falling water
|
-- Save liquidtype for falling water
|
||||||
self.liquidtype = def.liquidtype
|
self.liquidtype = def.liquidtype
|
||||||
|
|
||||||
-- Set entity visuals
|
-- Set up entity visuals
|
||||||
if def.drawtype == "torchlike" or def.drawtype == "signlike" then
|
-- For compatibility with older clients we continue to use "item" visual
|
||||||
local textures
|
-- for simple situations.
|
||||||
if def.tiles and def.tiles[1] then
|
local drawtypes = {normal=true, glasslike=true, allfaces=true, nodebox=true}
|
||||||
local tile = def.tiles[1]
|
local p2types = {none=true, facedir=true, ["4dir"]=true}
|
||||||
if type(tile) == "table" then
|
if drawtypes[def.drawtype] and p2types[def.paramtype2] and def.use_texture_alpha ~= "blend" 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"
|
|
||||||
-- Calculate size of falling node
|
-- Calculate size of falling node
|
||||||
local s = {}
|
local s = vector.zero()
|
||||||
s.x = (def.visual_scale or 1) * SCALE
|
s.x = (def.visual_scale or 1) * 0.667
|
||||||
s.y = s.x
|
s.y = s.x
|
||||||
s.z = s.x
|
s.z = s.x
|
||||||
-- Compensate for wield_scale
|
-- Compensate for wield_scale
|
||||||
@@ -125,10 +96,31 @@ core.register_entity(":__builtin:falling_node", {
|
|||||||
end
|
end
|
||||||
self.object:set_properties({
|
self.object:set_properties({
|
||||||
is_visible = true,
|
is_visible = true,
|
||||||
wield_item = itemstring,
|
visual = "item",
|
||||||
|
wield_item = node.name,
|
||||||
visual_size = s,
|
visual_size = s,
|
||||||
glow = def.light_source,
|
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
|
end
|
||||||
|
|
||||||
-- Set collision box (certain nodeboxes only for now)
|
-- Set collision box (certain nodeboxes only for now)
|
||||||
@@ -148,111 +140,6 @@ core.register_entity(":__builtin:falling_node", {
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
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,
|
end,
|
||||||
|
|
||||||
get_staticdata = function(self)
|
get_staticdata = function(self)
|
||||||
|
|||||||
@@ -45,6 +45,14 @@ core.features = {
|
|||||||
abm_without_neighbors = true,
|
abm_without_neighbors = true,
|
||||||
biome_weights = true,
|
biome_weights = true,
|
||||||
particle_blend_clip = true,
|
particle_blend_clip = true,
|
||||||
|
remove_item_match_meta = true,
|
||||||
|
httpfetch_additional_methods = true,
|
||||||
|
object_guids = true,
|
||||||
|
on_timer_four_args = true,
|
||||||
|
particlespawner_exclude_player = true,
|
||||||
|
generate_decorations_biomes = true,
|
||||||
|
chunksize_vector = true,
|
||||||
|
item_inventory_image_animation = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
function core.has_feature(arg)
|
function core.has_feature(arg)
|
||||||
|
|||||||
@@ -353,20 +353,19 @@ function core.item_place(itemstack, placer, pointed_thing, param2)
|
|||||||
return itemstack, nil
|
return itemstack, nil
|
||||||
end
|
end
|
||||||
|
|
||||||
function core.item_secondary_use(itemstack, placer)
|
function core.item_secondary_use(itemstack, user)
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
|
||||||
function core.item_drop(itemstack, dropper, pos)
|
function core.item_drop(itemstack, dropper, pos)
|
||||||
local dropper_is_player = dropper and dropper:is_player()
|
local dropper_is_player = dropper and dropper:is_player()
|
||||||
local p = table.copy(pos)
|
local p = table.copy(pos)
|
||||||
local cnt = itemstack:get_count()
|
|
||||||
if dropper_is_player then
|
if dropper_is_player then
|
||||||
p.y = p.y + 1.2
|
p.y = p.y + 1.2
|
||||||
end
|
end
|
||||||
local item = itemstack:take_item(cnt)
|
local obj = core.add_item(p, ItemStack(itemstack))
|
||||||
local obj = core.add_item(p, item)
|
|
||||||
if obj then
|
if obj then
|
||||||
|
itemstack:clear()
|
||||||
if dropper_is_player then
|
if dropper_is_player then
|
||||||
local dir = dropper:get_look_dir()
|
local dir = dropper:get_look_dir()
|
||||||
dir.x = dir.x * 2.9
|
dir.x = dir.x * 2.9
|
||||||
@@ -375,7 +374,7 @@ function core.item_drop(itemstack, dropper, pos)
|
|||||||
obj:set_velocity(dir)
|
obj:set_velocity(dir)
|
||||||
obj:get_luaentity().dropped_by = dropper:get_player_name()
|
obj:get_luaentity().dropped_by = dropper:get_player_name()
|
||||||
end
|
end
|
||||||
return itemstack
|
return itemstack, obj
|
||||||
end
|
end
|
||||||
-- If we reach this, adding the object to the
|
-- If we reach this, adding the object to the
|
||||||
-- environment failed
|
-- environment failed
|
||||||
@@ -391,7 +390,7 @@ function core.item_pickup(itemstack, picker, pointed_thing, ...)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Pickup item.
|
-- Pick up item
|
||||||
local inv = picker and picker:get_inventory()
|
local inv = picker and picker:get_inventory()
|
||||||
if inv then
|
if inv then
|
||||||
return inv:add_item("main", itemstack)
|
return inv:add_item("main", itemstack)
|
||||||
@@ -514,7 +513,8 @@ function core.node_dig(pos, node, digger)
|
|||||||
.. node.name .. " at " .. core.pos_to_string(pos))
|
.. node.name .. " at " .. core.pos_to_string(pos))
|
||||||
|
|
||||||
local wielded = digger and digger:get_wielded_item()
|
local wielded = digger and digger:get_wielded_item()
|
||||||
local drops = core.get_node_drops(node, wielded and wielded:get_name())
|
local drops = core.get_node_drops(node, wielded and wielded:get_name(),
|
||||||
|
wielded and ItemStack(wielded), digger, vector.copy(pos))
|
||||||
|
|
||||||
if wielded then
|
if wielded then
|
||||||
local wdef = wielded:get_definition()
|
local wdef = wielded:get_definition()
|
||||||
@@ -569,6 +569,26 @@ function core.node_dig(pos, node, digger)
|
|||||||
exclude_player = diggername,
|
exclude_player = diggername,
|
||||||
}, true)
|
}, true)
|
||||||
end
|
end
|
||||||
|
-- Particles also
|
||||||
|
if diggername ~= "" and def and def.drawtype ~= "airlike" then
|
||||||
|
-- cf. ParticleManager::addDiggingParticles() et al
|
||||||
|
local gravity = tonumber(core.settings:get("movement_gravity")) or 9.81
|
||||||
|
core.add_particlespawner({
|
||||||
|
amount = 16,
|
||||||
|
time = 0.001,
|
||||||
|
minpos = vector.offset(pos, -0.25, -0.25, -0.25),
|
||||||
|
maxpos = vector.offset(pos, 0.25, 0.25, 0.25),
|
||||||
|
minvel = vector.new(-1.5, 0, -1.5),
|
||||||
|
maxvel = vector.new(1.5, 3, 1.5),
|
||||||
|
minacc = vector.new(0, -gravity, 0),
|
||||||
|
maxacc = vector.new(0, -gravity, 0),
|
||||||
|
minexptime = 0, maxexptime = 1,
|
||||||
|
minsize = 0, maxsize = 0, -- random
|
||||||
|
node = node,
|
||||||
|
blend = (def and def.use_texture_alpha == "blend") and "blend" or "clip",
|
||||||
|
exclude_player = diggername,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
-- Run callback
|
-- Run callback
|
||||||
if def and def.after_dig_node then
|
if def and def.after_dig_node then
|
||||||
@@ -639,6 +659,7 @@ core.nodedef_default = {
|
|||||||
on_drop = redef_wrapper(core, 'item_drop'), -- core.item_drop
|
on_drop = redef_wrapper(core, 'item_drop'), -- core.item_drop
|
||||||
on_pickup = redef_wrapper(core, 'item_pickup'), -- core.item_pickup
|
on_pickup = redef_wrapper(core, 'item_pickup'), -- core.item_pickup
|
||||||
on_use = nil,
|
on_use = nil,
|
||||||
|
after_use = nil,
|
||||||
can_dig = nil,
|
can_dig = nil,
|
||||||
|
|
||||||
on_punch = redef_wrapper(core, 'node_punch'), -- core.node_punch
|
on_punch = redef_wrapper(core, 'node_punch'), -- core.node_punch
|
||||||
@@ -740,16 +761,16 @@ core.noneitemdef_default = { -- This is used for the hand and unknown items
|
|||||||
--
|
--
|
||||||
|
|
||||||
local get_node_raw = core.get_node_raw
|
local get_node_raw = core.get_node_raw
|
||||||
core.get_node_raw = nil
|
local get_name_from_content_id = core.get_name_from_content_id
|
||||||
|
|
||||||
function core.get_node(pos)
|
function core.get_node(pos)
|
||||||
local content, param1, param2 = get_node_raw(pos.x, pos.y, pos.z)
|
local content, param1, param2 = get_node_raw(pos.x, pos.y, pos.z)
|
||||||
return {name = core.get_name_from_content_id(content), param1 = param1, param2 = param2}
|
return {name = get_name_from_content_id(content), param1 = param1, param2 = param2}
|
||||||
end
|
end
|
||||||
|
|
||||||
function core.get_node_or_nil(pos)
|
function core.get_node_or_nil(pos)
|
||||||
local content, param1, param2, pos_ok = get_node_raw(pos.x, pos.y, pos.z)
|
local content, param1, param2, pos_ok = get_node_raw(pos.x, pos.y, pos.z)
|
||||||
return pos_ok and
|
return pos_ok and
|
||||||
{name = core.get_name_from_content_id(content), param1 = param1, param2 = param2}
|
{name = get_name_from_content_id(content), param1 = param1, param2 = param2}
|
||||||
or nil
|
or nil
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -129,6 +129,10 @@ core.protocol_versions = {
|
|||||||
["5.9.1"] = 45,
|
["5.9.1"] = 45,
|
||||||
["5.10.0"] = 46,
|
["5.10.0"] = 46,
|
||||||
["5.11.0"] = 47,
|
["5.11.0"] = 47,
|
||||||
|
["5.12.0"] = 48,
|
||||||
|
["5.13.0"] = 49,
|
||||||
|
["5.14.0"] = 50,
|
||||||
|
["5.15.0"] = 51,
|
||||||
}
|
}
|
||||||
|
|
||||||
setmetatable(core.protocol_versions, {__newindex = function()
|
setmetatable(core.protocol_versions, {__newindex = function()
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ core.register_privilege("kick", {
|
|||||||
give_to_admin = true,
|
give_to_admin = true,
|
||||||
})
|
})
|
||||||
core.register_privilege("give", {
|
core.register_privilege("give", {
|
||||||
description = S("Can use /give and /giveme"),
|
description = S("Can use /give, /giveme, /pulverize and /clearinv"),
|
||||||
give_to_singleplayer = false,
|
give_to_singleplayer = false,
|
||||||
})
|
})
|
||||||
core.register_privilege("password", {
|
core.register_privilege("password", {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
local builtin_shared = ...
|
local builtin_shared = ...
|
||||||
local S = core.get_translator("__builtin")
|
local S = core.get_translator("__builtin")
|
||||||
|
local debug_getinfo = debug.getinfo
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Make raw registration functions inaccessible to anyone except this file
|
-- Make raw registration functions inaccessible to anyone except this file
|
||||||
@@ -61,7 +62,7 @@ local function check_modname_prefix(name)
|
|||||||
return name:sub(2)
|
return name:sub(2)
|
||||||
else
|
else
|
||||||
-- Enforce that the name starts with the correct mod name.
|
-- Enforce that the name starts with the correct mod name.
|
||||||
local expected_prefix = core.get_current_modname() .. ":"
|
local expected_prefix = (core.get_current_modname() or "") .. ":"
|
||||||
if name:sub(1, #expected_prefix) ~= expected_prefix then
|
if name:sub(1, #expected_prefix) ~= expected_prefix then
|
||||||
error("Name " .. name .. " does not follow naming conventions: " ..
|
error("Name " .. name .. " does not follow naming conventions: " ..
|
||||||
"\"" .. expected_prefix .. "\" or \":\" prefix required")
|
"\"" .. expected_prefix .. "\" or \":\" prefix required")
|
||||||
@@ -95,6 +96,7 @@ function core.register_abm(spec)
|
|||||||
check_node_list(spec.nodenames, "nodenames")
|
check_node_list(spec.nodenames, "nodenames")
|
||||||
check_node_list(spec.neighbors, "neighbors")
|
check_node_list(spec.neighbors, "neighbors")
|
||||||
assert(type(spec.action) == "function", "Required field 'action' of type function")
|
assert(type(spec.action) == "function", "Required field 'action' of type function")
|
||||||
|
|
||||||
core.registered_abms[#core.registered_abms + 1] = spec
|
core.registered_abms[#core.registered_abms + 1] = spec
|
||||||
spec.mod_origin = core.get_current_modname() or "??"
|
spec.mod_origin = core.get_current_modname() or "??"
|
||||||
end
|
end
|
||||||
@@ -128,127 +130,51 @@ function core.register_entity(name, prototype)
|
|||||||
prototype.mod_origin = core.get_current_modname() or "??"
|
prototype.mod_origin = core.get_current_modname() or "??"
|
||||||
end
|
end
|
||||||
|
|
||||||
function core.register_item(name, itemdef)
|
local function preprocess_node(nodedef)
|
||||||
-- Check name
|
-- Use the nodebox as selection box if it's not set manually
|
||||||
if name == nil then
|
if nodedef.drawtype == "nodebox" and not nodedef.selection_box then
|
||||||
error("Unable to register item: Name is nil")
|
nodedef.selection_box = nodedef.node_box
|
||||||
|
elseif nodedef.drawtype == "fencelike" and not nodedef.selection_box then
|
||||||
|
nodedef.selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-1/8, -1/2, -1/8, 1/8, 1/2, 1/8},
|
||||||
|
}
|
||||||
end
|
end
|
||||||
name = check_modname_prefix(tostring(name))
|
|
||||||
if forbidden_item_names[name] then
|
|
||||||
error("Unable to register item: Name is forbidden: " .. name)
|
|
||||||
end
|
|
||||||
itemdef.name = name
|
|
||||||
|
|
||||||
-- Apply defaults and add to registered_* table
|
if nodedef.light_source and nodedef.light_source > core.LIGHT_MAX then
|
||||||
if itemdef.type == "node" then
|
nodedef.light_source = core.LIGHT_MAX
|
||||||
-- Use the nodebox as selection box if it's not set manually
|
core.log("warning", "Node 'light_source' value exceeds maximum," ..
|
||||||
if itemdef.drawtype == "nodebox" and not itemdef.selection_box then
|
" limiting it: " .. nodedef.name)
|
||||||
itemdef.selection_box = itemdef.node_box
|
|
||||||
elseif itemdef.drawtype == "fencelike" and not itemdef.selection_box then
|
|
||||||
itemdef.selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-1/8, -1/2, -1/8, 1/8, 1/2, 1/8},
|
|
||||||
}
|
|
||||||
end
|
|
||||||
if itemdef.light_source and itemdef.light_source > core.LIGHT_MAX then
|
|
||||||
itemdef.light_source = core.LIGHT_MAX
|
|
||||||
core.log("warning", "Node 'light_source' value exceeds maximum," ..
|
|
||||||
" limiting to maximum: " ..name)
|
|
||||||
end
|
|
||||||
setmetatable(itemdef, {__index = core.nodedef_default})
|
|
||||||
core.registered_nodes[itemdef.name] = itemdef
|
|
||||||
elseif itemdef.type == "craft" then
|
|
||||||
setmetatable(itemdef, {__index = core.craftitemdef_default})
|
|
||||||
core.registered_craftitems[itemdef.name] = itemdef
|
|
||||||
elseif itemdef.type == "tool" then
|
|
||||||
setmetatable(itemdef, {__index = core.tooldef_default})
|
|
||||||
core.registered_tools[itemdef.name] = itemdef
|
|
||||||
elseif itemdef.type == "none" then
|
|
||||||
setmetatable(itemdef, {__index = core.noneitemdef_default})
|
|
||||||
else
|
|
||||||
error("Unable to register item: Type is invalid: " .. dump(itemdef))
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Flowing liquid uses param2
|
-- Flowing liquid uses param2
|
||||||
if itemdef.type == "node" and itemdef.liquidtype == "flowing" then
|
if nodedef.liquidtype == "flowing" then
|
||||||
itemdef.paramtype2 = "flowingliquid"
|
nodedef.paramtype2 = "flowingliquid"
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function preprocess_craft(itemdef)
|
||||||
-- BEGIN Legacy stuff
|
-- BEGIN Legacy stuff
|
||||||
if itemdef.cookresult_itemstring ~= nil and itemdef.cookresult_itemstring ~= "" then
|
if itemdef.inventory_image == nil and itemdef.image ~= nil then
|
||||||
core.register_craft({
|
core.log("deprecated", "The `image` field in craftitem definitions " ..
|
||||||
type="cooking",
|
"is deprecated. Use `inventory_image` instead. " ..
|
||||||
output=itemdef.cookresult_itemstring,
|
"Craftitem name: " .. itemdef.name, 3)
|
||||||
recipe=itemdef.name,
|
itemdef.inventory_image = itemdef.image
|
||||||
cooktime=itemdef.furnace_cooktime
|
|
||||||
})
|
|
||||||
end
|
|
||||||
if itemdef.furnace_burntime ~= nil and itemdef.furnace_burntime >= 0 then
|
|
||||||
core.register_craft({
|
|
||||||
type="fuel",
|
|
||||||
recipe=itemdef.name,
|
|
||||||
burntime=itemdef.furnace_burntime
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
-- END Legacy stuff
|
-- END Legacy stuff
|
||||||
|
|
||||||
itemdef.mod_origin = core.get_current_modname() or "??"
|
|
||||||
|
|
||||||
-- Disable all further modifications
|
|
||||||
getmetatable(itemdef).__newindex = {}
|
|
||||||
|
|
||||||
--core.log("Registering item: " .. itemdef.name)
|
|
||||||
core.registered_items[itemdef.name] = itemdef
|
|
||||||
core.registered_aliases[itemdef.name] = nil
|
|
||||||
register_item_raw(itemdef)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function core.unregister_item(name)
|
local function preprocess_tool(tooldef)
|
||||||
if not core.registered_items[name] then
|
|
||||||
core.log("warning", "Not unregistering item " ..name..
|
|
||||||
" because it doesn't exist.")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
-- Erase from registered_* table
|
|
||||||
local type = core.registered_items[name].type
|
|
||||||
if type == "node" then
|
|
||||||
core.registered_nodes[name] = nil
|
|
||||||
elseif type == "craft" then
|
|
||||||
core.registered_craftitems[name] = nil
|
|
||||||
elseif type == "tool" then
|
|
||||||
core.registered_tools[name] = nil
|
|
||||||
end
|
|
||||||
core.registered_items[name] = nil
|
|
||||||
|
|
||||||
|
|
||||||
unregister_item_raw(name)
|
|
||||||
end
|
|
||||||
|
|
||||||
function core.register_node(name, nodedef)
|
|
||||||
nodedef.type = "node"
|
|
||||||
core.register_item(name, nodedef)
|
|
||||||
end
|
|
||||||
|
|
||||||
function core.register_craftitem(name, craftitemdef)
|
|
||||||
craftitemdef.type = "craft"
|
|
||||||
|
|
||||||
-- BEGIN Legacy stuff
|
|
||||||
if craftitemdef.inventory_image == nil and craftitemdef.image ~= nil then
|
|
||||||
craftitemdef.inventory_image = craftitemdef.image
|
|
||||||
end
|
|
||||||
-- END Legacy stuff
|
|
||||||
|
|
||||||
core.register_item(name, craftitemdef)
|
|
||||||
end
|
|
||||||
|
|
||||||
function core.register_tool(name, tooldef)
|
|
||||||
tooldef.type = "tool"
|
|
||||||
tooldef.stack_max = 1
|
tooldef.stack_max = 1
|
||||||
|
|
||||||
-- BEGIN Legacy stuff
|
-- BEGIN Legacy stuff
|
||||||
if tooldef.inventory_image == nil and tooldef.image ~= nil then
|
if tooldef.inventory_image == nil and tooldef.image ~= nil then
|
||||||
|
core.log("deprecated", "The `image` field in tool definitions " ..
|
||||||
|
"is deprecated. Use `inventory_image` instead. " ..
|
||||||
|
"Tool name: " .. tooldef.name, 3)
|
||||||
tooldef.inventory_image = tooldef.image
|
tooldef.inventory_image = tooldef.image
|
||||||
end
|
end
|
||||||
|
|
||||||
if tooldef.tool_capabilities == nil and
|
if tooldef.tool_capabilities == nil and
|
||||||
(tooldef.full_punch_interval ~= nil or
|
(tooldef.full_punch_interval ~= nil or
|
||||||
tooldef.basetime ~= nil or
|
tooldef.basetime ~= nil or
|
||||||
@@ -261,6 +187,9 @@ function core.register_tool(name, tooldef)
|
|||||||
tooldef.dd_crackiness ~= nil or
|
tooldef.dd_crackiness ~= nil or
|
||||||
tooldef.dd_crumbliness ~= nil or
|
tooldef.dd_crumbliness ~= nil or
|
||||||
tooldef.dd_cuttability ~= nil) then
|
tooldef.dd_cuttability ~= nil) then
|
||||||
|
core.log("deprecated", "Specifying tool capabilities directly in the tool " ..
|
||||||
|
"definition is deprecated. Use the `tool_capabilities` field instead. " ..
|
||||||
|
"Tool name: " .. tooldef.name, 3)
|
||||||
tooldef.tool_capabilities = {
|
tooldef.tool_capabilities = {
|
||||||
full_punch_interval = tooldef.full_punch_interval,
|
full_punch_interval = tooldef.full_punch_interval,
|
||||||
basetime = tooldef.basetime,
|
basetime = tooldef.basetime,
|
||||||
@@ -277,7 +206,7 @@ function core.register_tool(name, tooldef)
|
|||||||
end
|
end
|
||||||
-- END Legacy stuff
|
-- END Legacy stuff
|
||||||
|
|
||||||
-- This isn't just legacy, but more of a convenience feature
|
-- Automatically set punch_attack_uses as a convenience feature
|
||||||
local toolcaps = tooldef.tool_capabilities
|
local toolcaps = tooldef.tool_capabilities
|
||||||
if toolcaps and toolcaps.punch_attack_uses == nil then
|
if toolcaps and toolcaps.punch_attack_uses == nil then
|
||||||
for _, cap in pairs(toolcaps.groupcaps or {}) do
|
for _, cap in pairs(toolcaps.groupcaps or {}) do
|
||||||
@@ -288,8 +217,126 @@ function core.register_tool(name, tooldef)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
core.register_item(name, tooldef)
|
local default_tables = {
|
||||||
|
node = core.nodedef_default,
|
||||||
|
craft = core.craftitemdef_default,
|
||||||
|
tool = core.tooldef_default,
|
||||||
|
none = core.noneitemdef_default,
|
||||||
|
}
|
||||||
|
|
||||||
|
local preprocess_fns = {
|
||||||
|
node = preprocess_node,
|
||||||
|
craft = preprocess_craft,
|
||||||
|
tool = preprocess_tool,
|
||||||
|
}
|
||||||
|
|
||||||
|
function core.register_item(name, itemdef)
|
||||||
|
-- Check name
|
||||||
|
if name == nil then
|
||||||
|
error("Unable to register item: Name is nil")
|
||||||
|
end
|
||||||
|
name = check_modname_prefix(tostring(name))
|
||||||
|
if forbidden_item_names[name] then
|
||||||
|
error("Unable to register item: Name is forbidden: " .. name)
|
||||||
|
end
|
||||||
|
|
||||||
|
itemdef.name = name
|
||||||
|
|
||||||
|
-- Compatibility stuff depending on type
|
||||||
|
local fn = preprocess_fns[itemdef.type]
|
||||||
|
if fn then
|
||||||
|
fn(itemdef)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Apply defaults
|
||||||
|
local defaults = default_tables[itemdef.type]
|
||||||
|
if defaults == nil then
|
||||||
|
error("Unable to register item: Type is invalid: " .. dump(itemdef))
|
||||||
|
end
|
||||||
|
local old_mt = getmetatable(itemdef)
|
||||||
|
-- TODO most of these checks should become an error after a while (maybe in 2026?)
|
||||||
|
if old_mt ~= nil and next(old_mt) ~= nil then
|
||||||
|
-- Note that even registering multiple identical items with the same table
|
||||||
|
-- is not allowed, due to the 'name' property.
|
||||||
|
if old_mt.__index == defaults then
|
||||||
|
core.log("warning", "Item definition table was reused between registrations. "..
|
||||||
|
"This is unsupported and broken: " .. name)
|
||||||
|
else
|
||||||
|
core.log("warning", "Item definition has a metatable, this is "..
|
||||||
|
"unsupported and it will be overwritten: " .. name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
setmetatable(itemdef, {__index = defaults})
|
||||||
|
|
||||||
|
-- BEGIN Legacy stuff
|
||||||
|
if itemdef.cookresult_itemstring ~= nil and itemdef.cookresult_itemstring ~= "" then
|
||||||
|
core.log("deprecated", "The `cookresult_itemstring` item definition " ..
|
||||||
|
"field is deprecated. Use `core.register_craft` instead. " ..
|
||||||
|
"Item name: " .. itemdef.name, 2)
|
||||||
|
core.register_craft({
|
||||||
|
type="cooking",
|
||||||
|
output=itemdef.cookresult_itemstring,
|
||||||
|
recipe=itemdef.name,
|
||||||
|
cooktime=itemdef.furnace_cooktime
|
||||||
|
})
|
||||||
|
end
|
||||||
|
if itemdef.furnace_burntime ~= nil and itemdef.furnace_burntime >= 0 then
|
||||||
|
core.log("deprecated", "The `furnace_burntime` item definition " ..
|
||||||
|
"field is deprecated. Use `core.register_craft` instead. " ..
|
||||||
|
"Item name: " .. itemdef.name, 2)
|
||||||
|
core.register_craft({
|
||||||
|
type="fuel",
|
||||||
|
recipe=itemdef.name,
|
||||||
|
burntime=itemdef.furnace_burntime
|
||||||
|
})
|
||||||
|
end
|
||||||
|
-- END Legacy stuff
|
||||||
|
|
||||||
|
itemdef.mod_origin = core.get_current_modname() or "??"
|
||||||
|
|
||||||
|
-- Ignore new keys as a failsafe to prevent mistakes
|
||||||
|
getmetatable(itemdef).__newindex = function() end
|
||||||
|
|
||||||
|
-- Add to registered_* tables
|
||||||
|
if itemdef.type == "node" then
|
||||||
|
core.registered_nodes[itemdef.name] = itemdef
|
||||||
|
elseif itemdef.type == "craft" then
|
||||||
|
core.registered_craftitems[itemdef.name] = itemdef
|
||||||
|
elseif itemdef.type == "tool" then
|
||||||
|
core.registered_tools[itemdef.name] = itemdef
|
||||||
|
end
|
||||||
|
core.registered_items[itemdef.name] = itemdef
|
||||||
|
core.registered_aliases[itemdef.name] = nil
|
||||||
|
|
||||||
|
register_item_raw(itemdef)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function make_register_item_wrapper(the_type)
|
||||||
|
return function(name, itemdef)
|
||||||
|
itemdef.type = the_type
|
||||||
|
return core.register_item(name, itemdef)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
core.register_node = make_register_item_wrapper("node")
|
||||||
|
core.register_craftitem = make_register_item_wrapper("craft")
|
||||||
|
core.register_tool = make_register_item_wrapper("tool")
|
||||||
|
|
||||||
|
function core.unregister_item(name)
|
||||||
|
if not core.registered_items[name] then
|
||||||
|
core.log("warning", "Not unregistering item " ..name..
|
||||||
|
" because it doesn't exist.")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
-- Erase from registered_* table
|
||||||
|
core.registered_nodes[name] = nil
|
||||||
|
core.registered_craftitems[name] = nil
|
||||||
|
core.registered_tools[name] = nil
|
||||||
|
core.registered_items[name] = nil
|
||||||
|
|
||||||
|
unregister_item_raw(name)
|
||||||
end
|
end
|
||||||
|
|
||||||
function core.register_alias(name, convert_to)
|
function core.register_alias(name, convert_to)
|
||||||
@@ -300,7 +347,6 @@ function core.register_alias(name, convert_to)
|
|||||||
core.log("warning", "Not registering alias, item with same name" ..
|
core.log("warning", "Not registering alias, item with same name" ..
|
||||||
" is already defined: " .. name .. " -> " .. convert_to)
|
" is already defined: " .. name .. " -> " .. convert_to)
|
||||||
else
|
else
|
||||||
--core.log("Registering alias: " .. name .. " -> " .. convert_to)
|
|
||||||
core.registered_aliases[name] = convert_to
|
core.registered_aliases[name] = convert_to
|
||||||
register_alias_raw(name, convert_to)
|
register_alias_raw(name, convert_to)
|
||||||
end
|
end
|
||||||
@@ -315,7 +361,6 @@ function core.register_alias_force(name, convert_to)
|
|||||||
core.log("info", "Removed item " ..name..
|
core.log("info", "Removed item " ..name..
|
||||||
" while attempting to force add an alias")
|
" while attempting to force add an alias")
|
||||||
end
|
end
|
||||||
--core.log("Registering alias: " .. name .. " -> " .. convert_to)
|
|
||||||
core.registered_aliases[name] = convert_to
|
core.registered_aliases[name] = convert_to
|
||||||
register_alias_raw(name, convert_to)
|
register_alias_raw(name, convert_to)
|
||||||
end
|
end
|
||||||
@@ -406,6 +451,7 @@ core.register_item(":", {
|
|||||||
groups = {not_in_creative_inventory=1},
|
groups = {not_in_creative_inventory=1},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local itemdefs_finalized = false
|
||||||
|
|
||||||
function core.override_item(name, redefinition, del_fields)
|
function core.override_item(name, redefinition, del_fields)
|
||||||
if redefinition.name ~= nil then
|
if redefinition.name ~= nil then
|
||||||
@@ -418,10 +464,16 @@ function core.override_item(name, redefinition, del_fields)
|
|||||||
if not item then
|
if not item then
|
||||||
error("Attempt to override non-existent item "..name, 2)
|
error("Attempt to override non-existent item "..name, 2)
|
||||||
end
|
end
|
||||||
|
if itemdefs_finalized then
|
||||||
|
-- TODO: it's not clear if this needs to be allowed at all?
|
||||||
|
core.log("warning", "Overriding item " .. name .. " after server startup. " ..
|
||||||
|
"This is unsupported and can cause problems related to data inconsistency.")
|
||||||
|
end
|
||||||
for k, v in pairs(redefinition) do
|
for k, v in pairs(redefinition) do
|
||||||
rawset(item, k, v)
|
rawset(item, k, v)
|
||||||
end
|
end
|
||||||
for _, field in ipairs(del_fields or {}) do
|
for _, field in ipairs(del_fields or {}) do
|
||||||
|
assert(field ~= "name" and field ~= "type")
|
||||||
rawset(item, field, nil)
|
rawset(item, field, nil)
|
||||||
end
|
end
|
||||||
register_item_raw(item)
|
register_item_raw(item)
|
||||||
@@ -497,7 +549,7 @@ function core.registered_on_player_hpchange(player, hp_change, reason)
|
|||||||
local func = core.registered_on_player_hpchanges.modifiers[i]
|
local func = core.registered_on_player_hpchanges.modifiers[i]
|
||||||
hp_change, last = func(player, hp_change, reason)
|
hp_change, last = func(player, hp_change, reason)
|
||||||
if type(hp_change) ~= "number" then
|
if type(hp_change) ~= "number" then
|
||||||
local debuginfo = debug.getinfo(func)
|
local debuginfo = debug_getinfo(func)
|
||||||
error("The register_on_hp_changes function has to return a number at " ..
|
error("The register_on_hp_changes function has to return a number at " ..
|
||||||
debuginfo.short_src .. " line " .. debuginfo.linedefined)
|
debuginfo.short_src .. " line " .. debuginfo.linedefined)
|
||||||
end
|
end
|
||||||
@@ -519,7 +571,7 @@ function core.register_on_player_hpchange(func, modifier)
|
|||||||
end
|
end
|
||||||
core.callback_origins[func] = {
|
core.callback_origins[func] = {
|
||||||
mod = core.get_current_modname() or "??",
|
mod = core.get_current_modname() or "??",
|
||||||
name = debug.getinfo(1, "n").name or "??"
|
name = debug_getinfo(1, "n").name or "??"
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -533,6 +585,7 @@ core.unregister_biome = make_wrap_deregistration(core.register_biome,
|
|||||||
local make_registration = builtin_shared.make_registration
|
local make_registration = builtin_shared.make_registration
|
||||||
local make_registration_reverse = builtin_shared.make_registration_reverse
|
local make_registration_reverse = builtin_shared.make_registration_reverse
|
||||||
|
|
||||||
|
-- keep in sync with profiler/instrumentation.lua
|
||||||
core.registered_on_chat_messages, core.register_on_chat_message = make_registration()
|
core.registered_on_chat_messages, core.register_on_chat_message = make_registration()
|
||||||
core.registered_on_chatcommands, core.register_on_chatcommand = make_registration()
|
core.registered_on_chatcommands, core.register_on_chatcommand = make_registration()
|
||||||
core.registered_globalsteps, core.register_globalstep = make_registration()
|
core.registered_globalsteps, core.register_globalstep = make_registration()
|
||||||
@@ -568,13 +621,57 @@ core.registered_on_rightclickplayers, core.register_on_rightclickplayer = make_r
|
|||||||
core.registered_on_liquid_transformed, core.register_on_liquid_transformed = make_registration()
|
core.registered_on_liquid_transformed, core.register_on_liquid_transformed = make_registration()
|
||||||
core.registered_on_mapblocks_changed, core.register_on_mapblocks_changed = make_registration()
|
core.registered_on_mapblocks_changed, core.register_on_mapblocks_changed = make_registration()
|
||||||
|
|
||||||
|
-- A bunch of registrations are read by the C++ side once on env init, so we cannot
|
||||||
|
-- allow them to change afterwards (see s_env.cpp).
|
||||||
|
-- Nodes and items do not have this problem but there are obvious consistency
|
||||||
|
-- problems if this would be allowed.
|
||||||
|
|
||||||
|
local function freeze_table(t)
|
||||||
|
-- Freezing a Lua table is not actually possible without some very intrusive
|
||||||
|
-- metatable hackery, but we can trivially prevent new additions.
|
||||||
|
local mt = table.copy(getmetatable(t) or {})
|
||||||
|
mt.__newindex = function()
|
||||||
|
error("modification forbidden")
|
||||||
|
end
|
||||||
|
setmetatable(t, mt)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function generic_reg_error(what)
|
||||||
|
return function(something)
|
||||||
|
local described = what
|
||||||
|
if type(something) == "table" and type(something.name) == "string" then
|
||||||
|
described = what .. " " .. something.name
|
||||||
|
elseif type(something) == "string" then
|
||||||
|
described = what .. " " .. something
|
||||||
|
end
|
||||||
|
error("Tried to register " .. described .. " after load time!")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
core.register_on_mods_loaded(function()
|
core.register_on_mods_loaded(function()
|
||||||
core.after(0, function()
|
core.after(0, function()
|
||||||
setmetatable(core.registered_on_mapblocks_changed, {
|
itemdefs_finalized = true
|
||||||
__newindex = function()
|
|
||||||
error("on_mapblocks_changed callbacks must be registered at load time")
|
-- prevent direct modification
|
||||||
end,
|
freeze_table(core.registered_abms)
|
||||||
})
|
freeze_table(core.registered_lbms)
|
||||||
|
freeze_table(core.registered_items)
|
||||||
|
freeze_table(core.registered_nodes)
|
||||||
|
freeze_table(core.registered_craftitems)
|
||||||
|
freeze_table(core.registered_tools)
|
||||||
|
freeze_table(core.registered_aliases)
|
||||||
|
freeze_table(core.registered_on_mapblocks_changed)
|
||||||
|
|
||||||
|
-- neutralize registration functions
|
||||||
|
core.register_abm = generic_reg_error("ABM")
|
||||||
|
core.register_lbm = generic_reg_error("LBM")
|
||||||
|
core.register_item = generic_reg_error("item")
|
||||||
|
core.unregister_item = function(name)
|
||||||
|
error("Refusing to unregister item " .. name .. " after load time")
|
||||||
|
end
|
||||||
|
core.register_alias = generic_reg_error("alias")
|
||||||
|
core.register_alias_force = generic_reg_error("alias")
|
||||||
|
core.register_on_mapblocks_changed = generic_reg_error("on_mapblocks_changed callback")
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,246 @@
|
|||||||
# textdomain: __builtin
|
# textdomain: __builtin
|
||||||
|
Empty command.=Празна команда.
|
||||||
|
Invalid command: @1=Неприемлива команда: @1
|
||||||
|
Invalid command usage.=Неприемлива употреба на команда.
|
||||||
|
(@1 s)= (@1 сек)
|
||||||
|
Command execution took @1 s=Изпълнението на командата отне @1 сек.
|
||||||
|
You don't have permission to run this command (missing privileges: @1).=Нямате права да изпълните тази команда (липсващи права: @1).
|
||||||
|
Unable to get position of player @1.=Неуспешно получаване на позицията на играч @1.
|
||||||
|
Incorrect area format. Expected: (x1,y1,z1) (x2,y2,z2)=Неправилен формат на област. Очаква се: (x1,y1,z1) (x2,y2,z2)
|
||||||
|
<action>=<действие>
|
||||||
|
Show chat action (e.g., '/me orders a pizza' displays '<player name> orders a pizza')=Показва действие в разговорите (напр. „/me поръчва пица“ показва „<име на играч> поръчва пица“)
|
||||||
|
Show the name of the server owner=Показва името на собственика на сървъра
|
||||||
|
The administrator of this server is @1.=Администраторът на този сървър е @1.
|
||||||
|
There's no administrator named in the config file.=Във файла с настройки не е зададен администратор.
|
||||||
|
@1 does not have any privileges.=@1 няма никакви права.
|
||||||
|
Privileges of @1: @2=Правата на @1: @2
|
||||||
|
[<name>]=[<име>]
|
||||||
|
Show privileges of yourself or another player=Показва вашите права или тези на друг играч
|
||||||
|
Player @1 does not exist.=Играчът @1 не съществува.
|
||||||
|
<privilege>=<права>
|
||||||
|
Return list of all online players with privilege=Показва списък на играчите на линия с дадени права
|
||||||
|
Invalid parameters (see /help haspriv).=Неприемливи параметри (вижте /help haspriv).
|
||||||
|
Unknown privilege!=Неизвестно право!
|
||||||
|
No online player has the "@1" privilege.=Няма играч на линия с правата „@1“.
|
||||||
|
Players online with the "@1" privilege: @2=Играчи на линия с правата „@1“: @2
|
||||||
|
Your privileges are insufficient.=Нямате достатъчно права.
|
||||||
|
Your privileges are insufficient. '@1' only allows you to grant: @2=Нямате достатъчно права. „@1“ ви позволява да давате само: @2
|
||||||
|
Unknown privilege: @1=Неизвестни права: @1
|
||||||
|
@1 granted you privileges: @2=@1 ви даде правото: @2
|
||||||
|
<name> (<privilege> [, <privilege2> [<...>]] | all)=<име> (<право> [, <право2> [<…>]] | all)
|
||||||
|
Give privileges to player=Дава права на играч
|
||||||
|
Invalid parameters (see /help grant).=Неприемливи параметри (вижте /help grant).
|
||||||
|
<privilege> [, <privilege2> [<...>]] | all=<право> [, <право2> [<…>]] | all
|
||||||
|
Grant privileges to yourself=Дава права на себе си
|
||||||
|
Invalid parameters (see /help grantme).=Неприемливи параметри (вижте /help grantme).
|
||||||
|
Your privileges are insufficient. '@1' only allows you to revoke: @2=Нямате достатъчно права. „@1“ ви позволява да отнемате само: @2
|
||||||
|
Note: Cannot revoke in singleplayer: @1=Забележка: Не може да отнемате права в режим един играч: @1
|
||||||
|
Note: Cannot revoke from admin: @1=Забележка: Не може да отнемате права на администратор: @1
|
||||||
|
No privileges were revoked.=Не са отнети права.
|
||||||
|
@1 revoked privileges from you: @2=@1 ви отне права: @2
|
||||||
|
Remove privileges from player=Отнема права от играч
|
||||||
|
Invalid parameters (see /help revoke).=Неприемливи параметри (вижте /help revoke).
|
||||||
|
Revoke privileges from yourself=Отнема права от себе си
|
||||||
|
Invalid parameters (see /help revokeme).=Неприемливи параметри (вижте /help revokeme).
|
||||||
|
<name> <password>=<име> <парола>
|
||||||
|
Set player's password (sent unencrypted, thus insecure)=Задава парола на играч (изпраща се нешифрована, следователно несигурно)
|
||||||
|
Name field required.=Полето за име е задължително.
|
||||||
|
Your password was cleared by @1.=Вашата парола е премахната от @1.
|
||||||
|
Password of player "@1" cleared.=Паролата на играч „@1“ е премахната.
|
||||||
|
Your password was set by @1.=Вашата парола е зададена от @1.
|
||||||
|
Password of player "@1" set.=Паролата на играча „@1“ е зададена.
|
||||||
|
<name>=<име>
|
||||||
|
Set empty password for a player=Задава празна парола на играч
|
||||||
|
Reload authentication data=Презарежда данните за удостоверяване
|
||||||
|
Done.=Готово.
|
||||||
|
Failed.=Грешка.
|
||||||
|
Remove a player's data=Премахва данните на играч
|
||||||
|
Player "@1" removed.=Играч „@1“ е премахнат.
|
||||||
|
No such player "@1" to remove.=Няма такъв играч „@1“, който да бъде премахнат.
|
||||||
|
Player "@1" is connected, cannot remove.=Играч „@1“ е свързан, не може да бъде премахнат.
|
||||||
|
Unhandled remove_player return code @1.=Неподдържан код на състояние remove_player @1.
|
||||||
|
Cannot teleport out of map bounds!=Не може да се телепортира извън границите на света!
|
||||||
|
Cannot get player with name @1.=Не може да бъде намерен играч с име @1.
|
||||||
|
Cannot teleport, @1 is attached to an object!=Не може да се телепортира, @1 е прикрепен към обект!
|
||||||
|
Teleporting @1 to @2.=Телепортиране на @1 до @2.
|
||||||
|
One does not teleport to oneself.=Не може да се телепортирате към себе си.
|
||||||
|
Cannot get teleportee with name @1.=Не може да бъде намерен телепортиран играч с име @1.
|
||||||
|
Cannot get target player with name @1.=Не може да бъде намерен целеви играч с име @1.
|
||||||
|
Teleporting @1 to @2 at @3.=Телепортиране на @1 до @2 на @3.
|
||||||
|
<X>,<Y>,<Z> | <to_name> | <name> <X>,<Y>,<Z> | <name> <to_name>=<X>,<Y>,<Z> | <до_име> | <име> <X>,<Y>,<Z> | <име> <до_име>
|
||||||
|
Teleport to position or player=Телепортира до координати или играч
|
||||||
|
You don't have permission to teleport other players (missing privilege: @1).=Нямате право да телепортирате други играчи (липсващи права: @1).
|
||||||
|
([-n] <name> <value>) | <name>=([-n] <име> <стойност>) | <име>
|
||||||
|
Set or read server configuration setting=Задава или извежда на екрата настройка на сървъра
|
||||||
|
Failed. Cannot modify secure settings. Edit the settings file manually.=Грешка! Настройките за сигурност не могат да бъдат променяни. Променете файла с настройки ръчно.
|
||||||
|
Failed. Use '/set -n <name> <value>' to create a new setting.=Грешка! Използвайте „/set -n <име> <стойност>“, за да създадете нова настройка.
|
||||||
|
@1 @= @2=@1 @= @2
|
||||||
|
<not set>=<не е зададено>
|
||||||
|
Invalid parameters (see /help set).=Неприемливи параметри (вижте /help set).
|
||||||
|
Finished emerging @1 blocks in @2ms.=Зареждането на @1 блока завърши за @2 мс.
|
||||||
|
emergeblocks update: @1/@2 blocks emerged (@3%)=обновяване на emergeblocks: @1/@2 блока заредени (@3%)
|
||||||
|
(here [<radius>]) | (<pos1> <pos2>)=(тук [<радиус>]) | (<коорд1> <коорд2>)
|
||||||
|
Load (or, if nonexistent, generate) map blocks contained in area pos1 to pos2 (<pos1> and <pos2> must be in parentheses)=Зарежда (или ако липсват, генерира) блокове от света в областта от коорд1 до коорд2 (<коорд1> и <коорд2> трябва да са в скоби)
|
||||||
|
Started emerge of area ranging from @1 to @2.=Започна зареждане на областта от @1 до @2.
|
||||||
|
Delete map blocks contained in area pos1 to pos2 (<pos1> and <pos2> must be in parentheses)=Премахва блокове от света в областта от коорд1 до коорд2 (<коорд1> и <коорд2> трябва да са в скоби)
|
||||||
|
Successfully cleared area ranging from @1 to @2.=Успешно изчистена област от @1 до @2.
|
||||||
|
Failed to clear one or more blocks in area.=Неуспешно изчистване на един или повече блока в областта.
|
||||||
|
Resets lighting in the area between pos1 and pos2 (<pos1> and <pos2> must be in parentheses)=Нулира осветлението в областта между коорд1 и коорд2 (<коорд1> и <коорд2> трябва да са в скоби)
|
||||||
|
Successfully reset light in the area ranging from @1 to @2.=Успешно нулирано осветление в област от @1 до @2.
|
||||||
|
Failed to load one or more blocks in area.=Неуспешно зареждане на един или повече блока в областта.
|
||||||
|
List mods installed on the server=Показва списък с модификациите, инсталирани на сървъра
|
||||||
|
No mods installed.=Няма инсталирани модификации.
|
||||||
|
Cannot give an empty item.=Не може да бъде даден празен предмет.
|
||||||
|
Cannot give an unknown item.=Не може да бъде даден неизвестен предмет.
|
||||||
|
Giving 'ignore' is not allowed.=Не е позволено да бъде даван „ignore“.
|
||||||
|
@1 is not a known player.=@1 не е известен играч.
|
||||||
|
@1 partially added to inventory.=@1 частично добавен в инвентара.
|
||||||
|
@1 could not be added to inventory.=@1 не може да бъде добавен в инвентара.
|
||||||
|
@1 added to inventory.=@1 добавен в инвентара.
|
||||||
|
@1 partially added to inventory of @2.=@1 частично добавен в инвентара на @2.
|
||||||
|
@1 could not be added to inventory of @2.=@1 не може да бъде добавен в инвентара на @2.
|
||||||
|
@1 added to inventory of @2.=@1 добавен в инвентара на @2.
|
||||||
|
<name> <ItemString> [<count> [<wear>]]=<име> <име-на-предмет> [<брой> [<износване>]]
|
||||||
|
Give item to player=Дава предмет на играч
|
||||||
|
Name and ItemString required.=Изисква се име и име-на-предмет.
|
||||||
|
<ItemString> [<count> [<wear>]]=<име-на-предмет> [<брой> [<износване>]]
|
||||||
|
Give item to yourself=Дава предмет на себе си
|
||||||
|
ItemString required.=Изисква се име-на-предмет.
|
||||||
|
<EntityName> [<X>,<Y>,<Z>]=<име-на-същество> [<X>,<Y>,<Z>]
|
||||||
|
Spawn entity at given (or your) position=Създава същество на дадена (или вашата) позиция
|
||||||
|
EntityName required.=Изисква се име-на-същество.
|
||||||
|
Unable to spawn entity, player is nil.=Неуспешно създаване на същество, играчът е null.
|
||||||
|
Cannot spawn an unknown entity.=Не може да бъде създадено неизвестно същество.
|
||||||
|
Invalid parameters (@1).=Неприемливи параметри (@1).
|
||||||
|
@1 spawned.=@1 е създаден.
|
||||||
|
@1 failed to spawn.=@1 не можа да бъде създаден.
|
||||||
|
Destroy item in hand=Унищожава предмета в ръката
|
||||||
|
Unable to pulverize, no player.=Неуспешно смачкване, няма играч.
|
||||||
|
Unable to pulverize, no item in hand.=Неуспешно смачкване, няма предмет в ръката.
|
||||||
|
An item was pulverized.=Предмет беше смачкан.
|
||||||
|
[<range>] [<seconds>] [<limit>]=[<обхват>] [<секунди>] [<ограничение>]
|
||||||
|
Check who last touched a node or a node near it within the time specified by <seconds>. Default: range @= 0, seconds @= 86400 @= 24h, limit @= 5. Set <seconds> to inf for no time limit=Проверява кой последно е докоснал възел или близък възел в рамките на времето, зададено от <секунди>. По подразбиране: обхват @= 0, секунди @= 86400 @= 24ч, ограничение @= 5. Задайте <секунди> на inf за без ограничение.
|
||||||
|
Rollback functions are disabled.=Функциите за отменяне на действия са изключени.
|
||||||
|
That limit is too high!=Ограничението е твърде голямо!
|
||||||
|
Checking @1 ...=Проверка @1…
|
||||||
|
Nobody has touched the specified location in @1 seconds.=Никой не е докосвал указаното място през последните @1 секунди.
|
||||||
|
@1 @2 @3 -> @4 @5 seconds ago.=@1 @2 @3 -> @4 преди @5 секунди.
|
||||||
|
Punch a node (range@=@1, seconds@=@2, limit@=@3).=Удар на възел (обхват@=@1, секунди@=@2, ограничение@=@3).
|
||||||
|
(<name> [<seconds>]) | (:<actor> [<seconds>])=(<име> [<секунди>]) | (:<променящ> [<секунди>])
|
||||||
|
Revert actions of a player. Default for <seconds> is 60. Set <seconds> to inf for no time limit=Отменя действията на играч. По подразбиране <секунди> е 60. Задайте <секунди> на inf за без ограничение.
|
||||||
|
Invalid parameters. See /help rollback and /help rollback_check.=Неприемливи параметри. Вижте /help rollback и /help rollback_check.
|
||||||
|
Reverting actions of player '@1' since @2 seconds.=Отменяне действията на играча „@1“ отпреди @2 секунди.
|
||||||
|
Reverting actions of @1 since @2 seconds.=Отменяне действията на @1 отпреди @2 секунди.
|
||||||
|
(log is too long to show)=(дневникът е твърде дълъг, за да бъде показан)
|
||||||
|
Reverting actions succeeded.=Действията са отменени.
|
||||||
|
Reverting actions FAILED.=Грешка при отменяне на действията.
|
||||||
|
Show server status=Показва състоянието на сървъра
|
||||||
|
This command was disabled by a mod or game.=Тази команда е изключена от модификация или игра.
|
||||||
|
[<0..23>:<0..59> | <0..24000>]=[<0..23>:<0..59> | <0..24000>]
|
||||||
|
Show or set time of day=Показва или задава часа на деня
|
||||||
|
Current time is @1:@2.=Текущото време е @1:@2.
|
||||||
|
You don't have permission to run this command (missing privilege: @1).=Нямате право да изпълните тази команда (липсващи права: @1).
|
||||||
|
Invalid time (must be between 0 and 24000).=Неправилно време (трябва да бъде между 0 и 24000).
|
||||||
|
Time of day changed.=Часът на деня е променен.
|
||||||
|
Invalid hour (must be between 0 and 23 inclusive).=Неверен час (трябва да бъде между 0 и 23 включително).
|
||||||
|
Invalid minute (must be between 0 and 59 inclusive).=Невярна минута (трябва да бъде между 0 и 59 включително).
|
||||||
|
Show day count since world creation=Показва броя дни от създаването на света
|
||||||
|
Current day is @1.=Текущият ден е @1.
|
||||||
|
[<delay_in_seconds> | -1] [-r] [<message>]=[<забавяне_в_секунди> | -1] [-r] [<съобщение>]
|
||||||
|
Shutdown server (-1 cancels a delayed shutdown, -r allows players to reconnect)=Изключва сървъра (-1 отменя забавено спиране, -r позволява на играчите повторно да се свързват)
|
||||||
|
Server shutting down (operator request).=Сървърът се изключва (по искане на оператор).
|
||||||
|
Ban the IP of a player or show the ban list=Забранява играч/IP или извежда списък със забранените
|
||||||
|
The ban list is empty.=Списъкът със забранени е празен.
|
||||||
|
Ban list: @1=Списък със забранени: @1
|
||||||
|
You cannot ban players in singleplayer!=Не можете да забраните играчи в режим един играч!
|
||||||
|
Player is not online.=Играчът не е на линия.
|
||||||
|
Failed to ban player.=Грешка при забраняване на играч.
|
||||||
|
Banned @1.=Играчът @1 е забранен.
|
||||||
|
<name> | <IP_address>=<име> | <IP_адрес>
|
||||||
|
Remove IP ban belonging to a player/IP=Премахва забрана по IP на играч/IP.
|
||||||
|
Failed to unban player/IP.=Грешка при премахване забраната на играч/IP.
|
||||||
|
Unbanned @1.=Премахната забрана на @1.
|
||||||
|
<name> [<reason>]=<име> [<причина>]
|
||||||
|
Kick a player=Изгонва играч
|
||||||
|
Failed to kick player @1.=Грешка при изгонване на играча @1.
|
||||||
|
Kicked @1.=Играчът @1 е изгонен.
|
||||||
|
[full | quick]=[пълно | бързо]
|
||||||
|
Clear all objects in world=Премахва всички обекти в света
|
||||||
|
Invalid usage, see /help clearobjects.=Неприемливи параметри. Вижте /help clearobjects.
|
||||||
|
Clearing all objects. This may take a long time. You may experience a timeout. (by @1)=Премахване на всички обекти. Може да отнеме време. Може и времето за връзка да изтече. (by @1)
|
||||||
|
Cleared all objects.=Премахнати са всички обекти.
|
||||||
|
<name> <message>=<име> <съобщение>
|
||||||
|
Send a direct message to a player=Изпраща лично съобщение на играч
|
||||||
|
Invalid usage, see /help msg.=Неприемливи параметри. Вижте /help msg.
|
||||||
|
The player @1 is not online.=Играчът @1 не е на линия.
|
||||||
|
DM from @1: @2=ЛС от @1: @2
|
||||||
|
DM sent to @1: @2=ЛС изпратено до @1: @2
|
||||||
|
Get the last login time of a player or yourself=Получава последното влизане на играч или себе си
|
||||||
|
@1's last login time was @2.=Последното влизане на @1 е @2.
|
||||||
|
@1's last login time is unknown.=Последното влизане на @1 е неизвестно.
|
||||||
|
Clear the inventory of yourself or another player=Изчиства инвентара на друг играч или вас
|
||||||
|
You don't have permission to clear another player's inventory (missing privilege: @1).=Нямате право да изчиствате инвентара на друг играч (липсващи права: @1).
|
||||||
|
@1 cleared your inventory.=@1 изчисти вашия инвентар.
|
||||||
|
Cleared @1's inventory.=Инвентарът на @1 е изчистен.
|
||||||
|
Player must be online to clear inventory!=Играчът трябва да е онлайн, за да изчистите инвентара му!
|
||||||
|
Players can't be killed, damage has been disabled.=Играчите не могат да бъдат убивани, щетите са изключени.
|
||||||
|
Player @1 is not online.=Играчът @1 не е на линия.
|
||||||
|
You are already dead.=Вече сте мъртви.
|
||||||
|
@1 is already dead.=@1 вече е мъртъв.
|
||||||
|
@1 has been killed.=@1 е убит.
|
||||||
|
Kill player or yourself=Убива играч или себе си
|
||||||
|
Invalid parameters (see /help @1).=Неприемливи параметри (вижте /help @1).
|
||||||
|
Too many arguments, try using just /help <command>=Твърде много аргументи, опитайте /help <команда>
|
||||||
|
Available commands: @1=Достъпни команди: @1
|
||||||
|
Use '/help <cmd>' to get more information, or '/help all' to list everything.=Използвайте „/help <cmd>“, за да получите повече информация, или „/help all“, за да видите списък с всички команди.
|
||||||
|
Available commands:=Достъпни команди:
|
||||||
|
Command not available: @1=Командата не е достъпна: @1
|
||||||
|
[all | privs | <cmd>] [-t]=[all | privs | <команда>] [-t]
|
||||||
|
Get help for commands or list privileges (-t: output in chat)=Получава помощ за команди или списък с права (-t: извежда в панела за разговори)
|
||||||
|
Available privileges:=Достъпни права:
|
||||||
You died=Умряхте
|
You died=Умряхте
|
||||||
Respawn=Прераждане
|
Respawn=Прераждане
|
||||||
|
Command=Команда
|
||||||
|
Parameters=Параметри
|
||||||
|
For more information, click on any entry in the list.=За повече информация щракнете върху елемент от списъка.
|
||||||
|
Double-click to copy the entry to the chat history.=Двоен клик за копиране на елемента в историята на разговори.
|
||||||
|
Command: @1 @2=Команда: @1 @2
|
||||||
|
Available commands: (see also: /help <cmd>)=Достъпни команди: (вижте /help <команда>)
|
||||||
|
Close=Затваряне
|
||||||
|
Privilege=Права
|
||||||
|
Description=Описание
|
||||||
|
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=
|
||||||
|
Handle the profiler and profiling data. Can output to chat (print), action log (dump), or file in world (save). Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change). Filter is a lua pattern used to limit output to matching mod names.=Управлява инструмента за профилиране и данните от него. Може да изведе в панела за разговори (print), в дневника (dump) или във файл в света (save). Форматът може да бъде txt, csv, lua, json, json_pretty (структурите може да бъдат променени). Филтърът е шаблон на lua за ограничаване на изхода до съвпадащи имена на модификации.
|
||||||
|
Statistics written to action log.=Статистиката е записана в дневника.
|
||||||
|
Statistics were reset.=Статистиката е нулирана.
|
||||||
|
@1 joined the game.=@1 се присъедини.
|
||||||
|
@1 left the game.=@1 напусна играта.
|
||||||
|
@1 left the game (timed out).=@1 напусна играта (изтекло време).
|
||||||
|
(no description)=(няма описание)
|
||||||
|
Can interact with things and modify the world=Може да взаимодейства с неща и променя света
|
||||||
|
Can speak in chat=Може да пише съобщения
|
||||||
|
Can modify basic privileges (@1)=Може да променя основните права (@1)
|
||||||
|
Can modify privileges=Може да променя права
|
||||||
|
Can teleport self=Може да телепортира себе си
|
||||||
|
Can teleport other players=Може да телепортира играчи
|
||||||
|
Can set the time of day using /time=Може да задава часа през деня чрез /time
|
||||||
|
Can do server maintenance stuff=Може да извършва поддръжка на сървъра
|
||||||
|
Can bypass node protection in the world=Може да заобикаля защитата на възли в света
|
||||||
|
Can ban and unban players=Може да забранява и разрешава играчи
|
||||||
|
Can kick players=Може да изгонва играчи
|
||||||
|
Can use /give and /giveme=Може да използва /give и /giveme
|
||||||
|
Can use /setpassword and /clearpassword=Може да използва /setpassword и /clearpassword
|
||||||
|
Can use fly mode=Може да използва режим на летене
|
||||||
|
Can use fast mode=Може да използва режим на бързо придвижване
|
||||||
|
Can fly through solid nodes using noclip mode=Може да преминава през твърди възли в режим „без изрязване“
|
||||||
|
Can use the rollback functionality=Може да използва възможността за отменяне на действия
|
||||||
|
Can enable wireframe=Може да включва телени рамки
|
||||||
|
Unknown Item=Неизвестен предмет
|
||||||
|
Air=Въздух
|
||||||
|
Ignore=Пренебрегване
|
||||||
|
You can't place 'ignore' nodes!=Не можете да поставяте възли „пренебрегване“!
|
||||||
|
Values below show absolute/relative times spend per server step by the instrumented function.=Стойностите по-долу показват абсолютното/относителното време за всяка стъпка на сървъра от замерваната функция.
|
||||||
|
A total of @1 sample(s) were taken.=Взети са общи @1 проби.
|
||||||
|
The output is limited to '@1'.=Изходът е ограничен до „@1“.
|
||||||
|
Saving of profile failed: @1=Грешка при запазване на профила: @1
|
||||||
|
Profile saved to @1=Профилът е запазен в @1
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ Send a direct message to a player=Eine Direktnachricht an einen Spieler senden
|
|||||||
Invalid usage, see /help msg.=Ungültige Verwendung, siehe /help msg.
|
Invalid usage, see /help msg.=Ungültige Verwendung, siehe /help msg.
|
||||||
The player @1 is not online.=Der Spieler @1 ist nicht online.
|
The player @1 is not online.=Der Spieler @1 ist nicht online.
|
||||||
DM from @1: @2=DN von @1: @2
|
DM from @1: @2=DN von @1: @2
|
||||||
Message sent.=Nachricht gesendet.
|
DM sent to @1: @2=DN an @1 gesendet: @2
|
||||||
Get the last login time of a player or yourself=Den letzten Loginzeitpunkt eines Spielers oder Ihren eigenen anfragen
|
Get the last login time of a player or yourself=Den letzten Loginzeitpunkt eines Spielers oder Ihren eigenen anfragen
|
||||||
@1's last login time was @2.=Letzter Loginzeitpunkt von @1 war @2.
|
@1's last login time was @2.=Letzter Loginzeitpunkt von @1 war @2.
|
||||||
@1's last login time is unknown.=Letzter Loginzeitpunkt von @1 ist unbekannt.
|
@1's last login time is unknown.=Letzter Loginzeitpunkt von @1 ist unbekannt.
|
||||||
@@ -207,6 +207,8 @@ You are already dead.=Sie sind schon tot.
|
|||||||
@1 is already dead.=@1 ist bereits tot.
|
@1 is already dead.=@1 ist bereits tot.
|
||||||
@1 has been killed.=@1 wurde getötet.
|
@1 has been killed.=@1 wurde getötet.
|
||||||
Kill player or yourself=Einen Spieler oder Sie selbst töten
|
Kill player or yourself=Einen Spieler oder Sie selbst töten
|
||||||
|
You died=Sie sind gestorben
|
||||||
|
Respawn=Wiederbeleben
|
||||||
@1 joined the game.=@1 ist dem Spiel beigetreten.
|
@1 joined the game.=@1 ist dem Spiel beigetreten.
|
||||||
@1 left the game.=@1 hat das Spiel verlassen.
|
@1 left the game.=@1 hat das Spiel verlassen.
|
||||||
@1 left the game (timed out).=@1 hat das Spiel verlassen (Netzwerkzeitüberschreitung).
|
@1 left the game (timed out).=@1 hat das Spiel verlassen (Netzwerkzeitüberschreitung).
|
||||||
@@ -234,15 +236,11 @@ Air=Luft
|
|||||||
Ignore=Ignorieren
|
Ignore=Ignorieren
|
||||||
You can't place 'ignore' nodes!=Sie können keine „ignore“-Blöcke platzieren!
|
You can't place 'ignore' nodes!=Sie können keine „ignore“-Blöcke platzieren!
|
||||||
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<Filter>] | dump [<Filter>] | save [<Format> [<Filter>]] | reset
|
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<Filter>] | dump [<Filter>] | save [<Format> [<Filter>]] | reset
|
||||||
Handle the profiler and profiling data=Den Profiler und Profilingdaten verwalten
|
Handle the profiler and profiling data. Can output to chat (print), action log (dump), or file in world (save). Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change). Filter is a lua pattern used to limit output to matching mod names.=Den Profiler benutzen und mit Profiling-Daten arbeiten. Kann in den Chat (print), in das Action-Protokoll (dump) oder in eine Datei in der Welt (save) ausgeben. Das Format kann „txt“, „csv“, „lua“, „json“ oder „json_pretty“ sein (die Strukturen könnten sich in Zukunft ändern). Filter ist ein Lua-Pattern, das benutzt wird, um die Ausgabe auf passende Modnamen einzuschränken.
|
||||||
Statistics written to action log.=Statistiken zum Aktionsprotokoll geschrieben.
|
Statistics written to action log.=Statistiken zum Aktionsprotokoll geschrieben.
|
||||||
Statistics were reset.=Statistiken wurden zurückgesetzt.
|
Statistics were reset.=Statistiken wurden zurückgesetzt.
|
||||||
Usage: @1=Verwendung: @1
|
|
||||||
Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change).=Format kann entweder „txt“, „csv“, „lua“, „json“ oder „json_pretty“ sein (die Struktur kann sich in Zukunft ändern).
|
|
||||||
Values below show absolute/relative times spend per server step by the instrumented function.=Die unten angegebenen Werte zeigen absolute/relative Zeitspannen, die je Server-Step von der instrumentierten Funktion in Anspruch genommen wurden.
|
Values below show absolute/relative times spend per server step by the instrumented function.=Die unten angegebenen Werte zeigen absolute/relative Zeitspannen, die je Server-Step von der instrumentierten Funktion in Anspruch genommen wurden.
|
||||||
A total of @1 sample(s) were taken.=Es wurden insgesamt @1 Datenpunkt(e) aufgezeichnet.
|
A total of @1 sample(s) were taken.=Es wurden insgesamt @1 Datenpunkt(e) aufgezeichnet.
|
||||||
The output is limited to '@1'.=Die Ausgabe ist beschränkt auf „@1“.
|
The output is limited to '@1'.=Die Ausgabe ist beschränkt auf „@1“.
|
||||||
Saving of profile failed: @1=Speichern des Profils fehlgeschlagen: @1
|
Saving of profile failed: @1=Speichern des Profils fehlgeschlagen: @1
|
||||||
Profile saved to @1=Profil abgespeichert nach @1
|
Profile saved to @1=Profil abgespeichert nach @1
|
||||||
You died=Sie sind gestorben
|
|
||||||
Respawn=Wiederbeleben
|
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ Send a direct message to a player=Sendu rekte privatan mesaĝon al ludanto
|
|||||||
Invalid usage, see /help msg.=Nevalida uzo, vidu /help msg.
|
Invalid usage, see /help msg.=Nevalida uzo, vidu /help msg.
|
||||||
The player @1 is not online.=La ludanto @1 ne ĉeretas.
|
The player @1 is not online.=La ludanto @1 ne ĉeretas.
|
||||||
DM from @1: @2=Privata mesaĝo de @1: @2
|
DM from @1: @2=Privata mesaĝo de @1: @2
|
||||||
Message sent.=Mesaĝo sendita.
|
DM sent to @1: @2=
|
||||||
Get the last login time of a player or yourself=Vidi la lastan salutotempon de ludanto, aŭ vi mem
|
Get the last login time of a player or yourself=Vidi la lastan salutotempon de ludanto, aŭ vi mem
|
||||||
@1's last login time was @2.=Lasta salutotempo de @1 estas @2.
|
@1's last login time was @2.=Lasta salutotempo de @1 estas @2.
|
||||||
@1's last login time is unknown.=Lasta salutotempo de @1 estas nesciata.
|
@1's last login time is unknown.=Lasta salutotempo de @1 estas nesciata.
|
||||||
@@ -207,6 +207,8 @@ You are already dead.=Vi jam estas mortinta.
|
|||||||
@1 is already dead.=@1 estas mortinta.
|
@1 is already dead.=@1 estas mortinta.
|
||||||
@1 has been killed.=@1 estas murdita.
|
@1 has been killed.=@1 estas murdita.
|
||||||
Kill player or yourself=Mortigi ludanton aŭ vin mem
|
Kill player or yourself=Mortigi ludanton aŭ vin mem
|
||||||
|
You died=Vi mortis
|
||||||
|
Respawn=Renaskiĝi
|
||||||
@1 joined the game.=@1 aliĝis la ludon.
|
@1 joined the game.=@1 aliĝis la ludon.
|
||||||
@1 left the game.=@1 foriris de la ludo.
|
@1 left the game.=@1 foriris de la ludo.
|
||||||
@1 left the game (timed out).=@1 foriris de la ludo (tempo-elĉerpo)
|
@1 left the game (timed out).=@1 foriris de la ludo (tempo-elĉerpo)
|
||||||
@@ -234,15 +236,11 @@ Air=Aero
|
|||||||
Ignore=Malatenti
|
Ignore=Malatenti
|
||||||
You can't place 'ignore' nodes!=Vi ne povas meti «malatentajn» monderojn!
|
You can't place 'ignore' nodes!=Vi ne povas meti «malatentajn» monderojn!
|
||||||
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<filtrilo>] | dump [<filtrilo>] | save [<formo> [<filtrilo>]] | reset
|
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<filtrilo>] | dump [<filtrilo>] | save [<formo> [<filtrilo>]] | reset
|
||||||
Handle the profiler and profiling data=Trakti la analizilon kaj analizajn datumojn
|
Handle the profiler and profiling data. Can output to chat (print), action log (dump), or file in world (save). Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change). Filter is a lua pattern used to limit output to matching mod names.=
|
||||||
Statistics written to action log.=Analizoj skribitaj al agoprotokolo.
|
Statistics written to action log.=Analizoj skribitaj al agoprotokolo.
|
||||||
Statistics were reset.=Analizoj forviŝitaj.
|
Statistics were reset.=Analizoj forviŝitaj.
|
||||||
Usage: @1=Uzado: @1
|
|
||||||
Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change).=Formo povas estas txt, csv, lua, json, aŭ json_pretty (struktuoj eble iam ŝanĝiĝos).
|
|
||||||
Values below show absolute/relative times spend per server step by the instrumented function.=Valoroj subaj montras la malrelativan/relativan tempon pasigitan de la servilo je ĉiu paŝo de la funkcio.
|
Values below show absolute/relative times spend per server step by the instrumented function.=Valoroj subaj montras la malrelativan/relativan tempon pasigitan de la servilo je ĉiu paŝo de la funkcio.
|
||||||
A total of @1 sample(s) were taken.=Sume @1 ekzemplero(j) konserviĝis.
|
A total of @1 sample(s) were taken.=Sume @1 ekzemplero(j) konserviĝis.
|
||||||
The output is limited to '@1'.=La eligo estas limigita al «@1».
|
The output is limited to '@1'.=La eligo estas limigita al «@1».
|
||||||
Saving of profile failed: @1=Konservado de profilo malsukcesis: @1
|
Saving of profile failed: @1=Konservado de profilo malsukcesis: @1
|
||||||
Profile saved to @1=Profilo konservita al @1
|
Profile saved to @1=Profilo konservita al @1
|
||||||
You died=Vi mortis
|
|
||||||
Respawn=Renaskiĝi
|
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ Send a direct message to a player=Envoyer un message privé à un joueur.
|
|||||||
Invalid usage, see /help msg.=Usage invalide, voir /help msg.
|
Invalid usage, see /help msg.=Usage invalide, voir /help msg.
|
||||||
The player @1 is not online.=Le joueur @1 n'est pas en ligne.
|
The player @1 is not online.=Le joueur @1 n'est pas en ligne.
|
||||||
DM from @1: @2=Message privé de @1 : @2
|
DM from @1: @2=Message privé de @1 : @2
|
||||||
Message sent.=Message privé envoyé.
|
DM sent to @1: @2=
|
||||||
Get the last login time of a player or yourself=Obtenir l'horodatage de la dernière connexion d'un joueur ou de vous-même.
|
Get the last login time of a player or yourself=Obtenir l'horodatage de la dernière connexion d'un joueur ou de vous-même.
|
||||||
@1's last login time was @2.=@1 s'est connecté pour la dernière fois au @2.
|
@1's last login time was @2.=@1 s'est connecté pour la dernière fois au @2.
|
||||||
@1's last login time is unknown.=L'horodatage de la dernière connexion de @1 est inconnu.
|
@1's last login time is unknown.=L'horodatage de la dernière connexion de @1 est inconnu.
|
||||||
@@ -207,6 +207,8 @@ You are already dead.=Vous êtes déjà mort.
|
|||||||
@1 is already dead.=@1 est déjà mort.
|
@1 is already dead.=@1 est déjà mort.
|
||||||
@1 has been killed.=@1 a été tué.
|
@1 has been killed.=@1 a été tué.
|
||||||
Kill player or yourself=Tuer un joueur ou vous-même.
|
Kill player or yourself=Tuer un joueur ou vous-même.
|
||||||
|
You died=Vous êtes mort
|
||||||
|
Respawn=Réapparaître
|
||||||
@1 joined the game.=@1 a rejoint la partie.
|
@1 joined the game.=@1 a rejoint la partie.
|
||||||
@1 left the game.=@1 a quitté la partie.
|
@1 left the game.=@1 a quitté la partie.
|
||||||
@1 left the game (timed out).=@1 a quitté la partie (inactivité).
|
@1 left the game (timed out).=@1 a quitté la partie (inactivité).
|
||||||
@@ -234,15 +236,11 @@ Air=Air
|
|||||||
Ignore=Ignorer
|
Ignore=Ignorer
|
||||||
You can't place 'ignore' nodes!=Vous ne pouvez pas placé de nœuds 'ignorés' !
|
You can't place 'ignore' nodes!=Vous ne pouvez pas placé de nœuds 'ignorés' !
|
||||||
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<filtre>] | dump [<filtre>] | save [<format> [<filtre>]] | reset
|
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<filtre>] | dump [<filtre>] | save [<format> [<filtre>]] | reset
|
||||||
Handle the profiler and profiling data=Traiter le profileur et les données de profilage
|
Handle the profiler and profiling data. Can output to chat (print), action log (dump), or file in world (save). Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change). Filter is a lua pattern used to limit output to matching mod names.=
|
||||||
Statistics written to action log.=Les statistiques sont écrites dans les journaux d'actions.
|
Statistics written to action log.=Les statistiques sont écrites dans les journaux d'actions.
|
||||||
Statistics were reset.=Les statistiques ont été réinitialisées.
|
Statistics were reset.=Les statistiques ont été réinitialisées.
|
||||||
Usage: @1=Usage : @1
|
|
||||||
Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change).=Le format peut être txt, csv, lua, json ou json_pretty (les structures sont sujettes au changement).
|
|
||||||
Values below show absolute/relative times spend per server step by the instrumented function.=Les valeurs inférieures affichent les temps absolu et relatif dépensés par étape du serveur par la fonction utilisée.
|
Values below show absolute/relative times spend per server step by the instrumented function.=Les valeurs inférieures affichent les temps absolu et relatif dépensés par étape du serveur par la fonction utilisée.
|
||||||
A total of @1 sample(s) were taken.=@1 échantillons ont été collectés.
|
A total of @1 sample(s) were taken.=@1 échantillons ont été collectés.
|
||||||
The output is limited to '@1'.=La sortie est limitée à '@1'.
|
The output is limited to '@1'.=La sortie est limitée à '@1'.
|
||||||
Saving of profile failed: @1=La sauvegarde du profil a échoué : @1
|
Saving of profile failed: @1=La sauvegarde du profil a échoué : @1
|
||||||
Profile saved to @1=Le profil a été sauvegardé dans @1
|
Profile saved to @1=Le profil a été sauvegardé dans @1
|
||||||
You died=Vous êtes mort
|
|
||||||
Respawn=Réapparaître
|
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ Send a direct message to a player=Kirim pesan langsung kepada pemain
|
|||||||
Invalid usage, see /help msg.=Penggunaan tidak sah. Lihat /help msg.
|
Invalid usage, see /help msg.=Penggunaan tidak sah. Lihat /help msg.
|
||||||
The player @1 is not online.=Pemain @1 tidak daring.
|
The player @1 is not online.=Pemain @1 tidak daring.
|
||||||
DM from @1: @2=Pesan langsung dari @1: @2
|
DM from @1: @2=Pesan langsung dari @1: @2
|
||||||
Message sent.=Pesan terkirim.
|
DM sent to @1: @2=
|
||||||
Get the last login time of a player or yourself=Ambil waktu masuk terakhir pemain atau diri Anda
|
Get the last login time of a player or yourself=Ambil waktu masuk terakhir pemain atau diri Anda
|
||||||
@1's last login time was @2.=Waktu masuk terakhir @1 adalah @2.
|
@1's last login time was @2.=Waktu masuk terakhir @1 adalah @2.
|
||||||
@1's last login time is unknown.=Waktu masuk terakhir @1 tidak diketahui.
|
@1's last login time is unknown.=Waktu masuk terakhir @1 tidak diketahui.
|
||||||
@@ -207,6 +207,8 @@ You are already dead.=Anda telah mati.
|
|||||||
@1 is already dead.=@1 telah mati.
|
@1 is already dead.=@1 telah mati.
|
||||||
@1 has been killed.=@1 telah dibunuh.
|
@1 has been killed.=@1 telah dibunuh.
|
||||||
Kill player or yourself=Bunuh pemain atau diri Anda
|
Kill player or yourself=Bunuh pemain atau diri Anda
|
||||||
|
You died=Anda mati
|
||||||
|
Respawn=Bangkit kembali
|
||||||
@1 joined the game.=@1 bergabung dalam permainan.
|
@1 joined the game.=@1 bergabung dalam permainan.
|
||||||
@1 left the game.=@1 keluar permainan.
|
@1 left the game.=@1 keluar permainan.
|
||||||
@1 left the game (timed out).=@1 keluar permainan (kehabisan waktu).
|
@1 left the game (timed out).=@1 keluar permainan (kehabisan waktu).
|
||||||
@@ -234,15 +236,11 @@ Air=Udara
|
|||||||
Ignore=Ignore
|
Ignore=Ignore
|
||||||
You can't place 'ignore' nodes!=Anda tidak dapat menaruh nodus 'ignore'!
|
You can't place 'ignore' nodes!=Anda tidak dapat menaruh nodus 'ignore'!
|
||||||
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset
|
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset
|
||||||
Handle the profiler and profiling data=Menangani profiler dan data profiling
|
Handle the profiler and profiling data. Can output to chat (print), action log (dump), or file in world (save). Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change). Filter is a lua pattern used to limit output to matching mod names.=
|
||||||
Statistics written to action log.=Statistik ditulis ke log action.
|
Statistics written to action log.=Statistik ditulis ke log action.
|
||||||
Statistics were reset.=Statistik diatur ulang.
|
Statistics were reset.=Statistik diatur ulang.
|
||||||
Usage: @1=Penggunaan: @1
|
|
||||||
Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change).=Format berupa salah satu dari txt, csv, lua, json, json_pretty (struktur mungkin berubah).
|
|
||||||
Values below show absolute/relative times spend per server step by the instrumented function.=Nilai berikut menampilkan waktu mutlak/relatif yang dihabiskan tiap langkah server oleh fungsi instrumen.
|
Values below show absolute/relative times spend per server step by the instrumented function.=Nilai berikut menampilkan waktu mutlak/relatif yang dihabiskan tiap langkah server oleh fungsi instrumen.
|
||||||
A total of @1 sample(s) were taken.=Total @1 sampel yang diambil.
|
A total of @1 sample(s) were taken.=Total @1 sampel yang diambil.
|
||||||
The output is limited to '@1'.=Keluaran dibatasi ke '@1'.
|
The output is limited to '@1'.=Keluaran dibatasi ke '@1'.
|
||||||
Saving of profile failed: @1=Penyimpanan profil gagal: @1
|
Saving of profile failed: @1=Penyimpanan profil gagal: @1
|
||||||
Profile saved to @1=Profil disimpan ke @1
|
Profile saved to @1=Profil disimpan ke @1
|
||||||
You died=Anda mati
|
|
||||||
Respawn=Bangkit kembali
|
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ Send a direct message to a player=Invia un messaggio privato a unə giocatore
|
|||||||
Invalid usage, see /help msg.=Uso incorretto, vedi /help msg
|
Invalid usage, see /help msg.=Uso incorretto, vedi /help msg
|
||||||
The player @1 is not online.=Lə giocatore @1 non è connessə.
|
The player @1 is not online.=Lə giocatore @1 non è connessə.
|
||||||
DM from @1: @2=Messaggio privato da @1: @2
|
DM from @1: @2=Messaggio privato da @1: @2
|
||||||
Message sent.=Messaggio inviato.
|
DM sent to @1: @2=
|
||||||
Get the last login time of a player or yourself=Ritorna l'ultimo accesso di unə giocatore o di te stessǝ
|
Get the last login time of a player or yourself=Ritorna l'ultimo accesso di unə giocatore o di te stessǝ
|
||||||
@1's last login time was @2.=L'ultimo accesso di @1 è avvenuto il @2.
|
@1's last login time was @2.=L'ultimo accesso di @1 è avvenuto il @2.
|
||||||
@1's last login time is unknown.=L'ultimo accesso di @1 è ignoto.
|
@1's last login time is unknown.=L'ultimo accesso di @1 è ignoto.
|
||||||
@@ -208,6 +208,8 @@ You are already dead.=Sei già mortǝ.
|
|||||||
@1 is already dead.=@1 è già mortǝ.
|
@1 is already dead.=@1 è già mortǝ.
|
||||||
@1 has been killed.=@1 è stato uccisǝ.
|
@1 has been killed.=@1 è stato uccisǝ.
|
||||||
Kill player or yourself=Uccide unə giocatore o te stessǝ
|
Kill player or yourself=Uccide unə giocatore o te stessǝ
|
||||||
|
You died=Sei morto
|
||||||
|
Respawn=Rinasci
|
||||||
@1 joined the game.=@1 si è connessə.
|
@1 joined the game.=@1 si è connessə.
|
||||||
@1 left the game.=@1 si è disconnessə.
|
@1 left the game.=@1 si è disconnessə.
|
||||||
@1 left the game (timed out).=@1 si è disconnessə (connessione scaduta).
|
@1 left the game (timed out).=@1 si è disconnessə (connessione scaduta).
|
||||||
@@ -235,15 +237,11 @@ Air=Aria
|
|||||||
Ignore=Ignora
|
Ignore=Ignora
|
||||||
You can't place 'ignore' nodes!=Non puoi piazzare nodi 'ignore'!
|
You can't place 'ignore' nodes!=Non puoi piazzare nodi 'ignore'!
|
||||||
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<filtro>] | dump [<filtro>] | save [<formato> [<filtro>]] | reset
|
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<filtro>] | dump [<filtro>] | save [<formato> [<filtro>]] | reset
|
||||||
Handle the profiler and profiling data=Gestisce il profiler e i dati da esso elaborati
|
Handle the profiler and profiling data. Can output to chat (print), action log (dump), or file in world (save). Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change). Filter is a lua pattern used to limit output to matching mod names.=
|
||||||
Statistics written to action log.=Statistiche scritte nel registro delle azioni.
|
Statistics written to action log.=Statistiche scritte nel registro delle azioni.
|
||||||
Statistics were reset.=Le statistiche sono state resettate.
|
Statistics were reset.=Le statistiche sono state resettate.
|
||||||
Usage: @1=Utilizzo: @1
|
|
||||||
Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change).=I formati supportati sono txt, csv, lua, json e json_pretty (le strutture potrebbero essere soggetti a cambiamenti).
|
|
||||||
Values below show absolute/relative times spend per server step by the instrumented function.=I valori sottostanti mostrano i tempi assoluti/relativi impiegati su ogni singolo step dalla funzione analizzata
|
Values below show absolute/relative times spend per server step by the instrumented function.=I valori sottostanti mostrano i tempi assoluti/relativi impiegati su ogni singolo step dalla funzione analizzata
|
||||||
A total of @1 sample(s) were taken.=Son stati ottenuti campioni per un totale di @1.
|
A total of @1 sample(s) were taken.=Son stati ottenuti campioni per un totale di @1.
|
||||||
The output is limited to '@1'.=L'output è limitato a '@1'.
|
The output is limited to '@1'.=L'output è limitato a '@1'.
|
||||||
Saving of profile failed: @1=Errore nel salvare il profilo: @1
|
Saving of profile failed: @1=Errore nel salvare il profilo: @1
|
||||||
Profile saved to @1=Profilo salvato in @1
|
Profile saved to @1=Profilo salvato in @1
|
||||||
You died=Sei morto
|
|
||||||
Respawn=Rinasci
|
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ Send a direct message to a player=Menghantar mesej terus kepada seorang pemain
|
|||||||
Invalid usage, see /help msg.=Kegunaan tidak sah, sila lihat /help msg.
|
Invalid usage, see /help msg.=Kegunaan tidak sah, sila lihat /help msg.
|
||||||
The player @1 is not online.=Pemain @1 tidak berada dalam talian.
|
The player @1 is not online.=Pemain @1 tidak berada dalam talian.
|
||||||
DM from @1: @2=DM daripada @1: @2
|
DM from @1: @2=DM daripada @1: @2
|
||||||
Message sent.=Mesej telah dihantar.
|
DM sent to @1: @2=
|
||||||
Get the last login time of a player or yourself=Dapatkan waktu log masuk terakhir bagi seorang pemain atau diri sendiri
|
Get the last login time of a player or yourself=Dapatkan waktu log masuk terakhir bagi seorang pemain atau diri sendiri
|
||||||
@1's last login time was @2.=Waktu log masuk terakhir @1 ialah pada @2.
|
@1's last login time was @2.=Waktu log masuk terakhir @1 ialah pada @2.
|
||||||
@1's last login time is unknown.=Waktu log masuk terakhir @1 tidak diketahui.
|
@1's last login time is unknown.=Waktu log masuk terakhir @1 tidak diketahui.
|
||||||
@@ -207,6 +207,8 @@ You are already dead.=Anda sudah pun mati.
|
|||||||
@1 is already dead.=@1 sudah pun mati.
|
@1 is already dead.=@1 sudah pun mati.
|
||||||
@1 has been killed.=@1 telah berjaya dibunuh.
|
@1 has been killed.=@1 telah berjaya dibunuh.
|
||||||
Kill player or yourself=Bunuh pemain atau diri sendiri
|
Kill player or yourself=Bunuh pemain atau diri sendiri
|
||||||
|
You died=Anda telah meninggal
|
||||||
|
Respawn=Jelma semula
|
||||||
@1 joined the game.=@1 telah menyertai permainan.
|
@1 joined the game.=@1 telah menyertai permainan.
|
||||||
@1 left the game.=@1 telah meninggalkan permainan.
|
@1 left the game.=@1 telah meninggalkan permainan.
|
||||||
@1 left the game (timed out).=@1 telah meninggalkan permainan (tamat tempoh masa).
|
@1 left the game (timed out).=@1 telah meninggalkan permainan (tamat tempoh masa).
|
||||||
@@ -234,15 +236,11 @@ Air=Udara
|
|||||||
Ignore=Abai
|
Ignore=Abai
|
||||||
You can't place 'ignore' nodes!=Anda tidak boleh meletakkan nod 'abai'!
|
You can't place 'ignore' nodes!=Anda tidak boleh meletakkan nod 'abai'!
|
||||||
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<tapisan>] | dump [<tapisan>] | save [<format> [<tapisan>]] | reset
|
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<tapisan>] | dump [<tapisan>] | save [<format> [<tapisan>]] | reset
|
||||||
Handle the profiler and profiling data=Uruskan pembukah dan data pembukahan
|
Handle the profiler and profiling data. Can output to chat (print), action log (dump), or file in world (save). Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change). Filter is a lua pattern used to limit output to matching mod names.=
|
||||||
Statistics written to action log.=Statistik telah ditulis ke log perlakuan.
|
Statistics written to action log.=Statistik telah ditulis ke log perlakuan.
|
||||||
Statistics were reset.=Statistik telah ditetapkan semula.
|
Statistics were reset.=Statistik telah ditetapkan semula.
|
||||||
Usage: @1=Kegunaan: @1
|
|
||||||
Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change).=Format boleh jadi salah satu daripada txt, csv, lua, json, json_pretty (struktur boleh berubah kemudian).
|
|
||||||
Values below show absolute/relative times spend per server step by the instrumented function.=Nilai di bawah menunjukkan masa mutlak/relatif yang digunakan oleh fungsi yang dipasangkan pada setiap langkah pelayan
|
Values below show absolute/relative times spend per server step by the instrumented function.=Nilai di bawah menunjukkan masa mutlak/relatif yang digunakan oleh fungsi yang dipasangkan pada setiap langkah pelayan
|
||||||
A total of @1 sample(s) were taken.=Sebanyak @1 sampel telah diambil secara keseluruhan.
|
A total of @1 sample(s) were taken.=Sebanyak @1 sampel telah diambil secara keseluruhan.
|
||||||
The output is limited to '@1'.=Output dihadkan kepada '@1'.
|
The output is limited to '@1'.=Output dihadkan kepada '@1'.
|
||||||
Saving of profile failed: @1=Penyimpanan profil telah gagal: @1
|
Saving of profile failed: @1=Penyimpanan profil telah gagal: @1
|
||||||
Profile saved to @1=Profil telah disimpan ke @1
|
Profile saved to @1=Profil telah disimpan ke @1
|
||||||
You died=Anda telah meninggal
|
|
||||||
Respawn=Jelma semula
|
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ Send a direct message to a player=Enviar uma mensagem direta a um jogador
|
|||||||
Invalid usage, see /help msg.=Uso inválido, veja /help msg.
|
Invalid usage, see /help msg.=Uso inválido, veja /help msg.
|
||||||
The player @1 is not online.=O jogador @1 não está online.
|
The player @1 is not online.=O jogador @1 não está online.
|
||||||
DM from @1: @2=DM de @1: @2
|
DM from @1: @2=DM de @1: @2
|
||||||
Message sent.=Mensagem enviada.
|
DM sent to @1: @2=
|
||||||
Get the last login time of a player or yourself=Pegue o último horário de login de um jogador ou de você mesmo
|
Get the last login time of a player or yourself=Pegue o último horário de login de um jogador ou de você mesmo
|
||||||
@1's last login time was @2.=O último login de @1 foi às @2.
|
@1's last login time was @2.=O último login de @1 foi às @2.
|
||||||
@1's last login time is unknown.=O último login de @1 é desconhecido.
|
@1's last login time is unknown.=O último login de @1 é desconhecido.
|
||||||
@@ -207,6 +207,8 @@ You are already dead.=Você já está morto.
|
|||||||
@1 is already dead.=@1 já está morto.
|
@1 is already dead.=@1 já está morto.
|
||||||
@1 has been killed.=@1 foi morto.
|
@1 has been killed.=@1 foi morto.
|
||||||
Kill player or yourself=Matar jogador ou a si mesmo
|
Kill player or yourself=Matar jogador ou a si mesmo
|
||||||
|
You died=Você morreu
|
||||||
|
Respawn=Reviver
|
||||||
@1 joined the game.=@1 entrou no jogo.
|
@1 joined the game.=@1 entrou no jogo.
|
||||||
@1 left the game.=@1 saiu do jogo.
|
@1 left the game.=@1 saiu do jogo.
|
||||||
@1 left the game (timed out).=@1 saiu do jogo (tempo esgotado)
|
@1 left the game (timed out).=@1 saiu do jogo (tempo esgotado)
|
||||||
@@ -234,15 +236,11 @@ Air=Ar
|
|||||||
Ignore=Ignorar
|
Ignore=Ignorar
|
||||||
You can't place 'ignore' nodes!=Você não pode colocar nós 'ignorar'!
|
You can't place 'ignore' nodes!=Você não pode colocar nós 'ignorar'!
|
||||||
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<filtro>] | dump [<filtro>] | save [<formato> [<filtro>]] | reset
|
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<filtro>] | dump [<filtro>] | save [<formato> [<filtro>]] | reset
|
||||||
Handle the profiler and profiling data=Lidar com o criador de perfil e os dados de criação de perfil
|
Handle the profiler and profiling data. Can output to chat (print), action log (dump), or file in world (save). Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change). Filter is a lua pattern used to limit output to matching mod names.=
|
||||||
Statistics written to action log.=Estatísticas salvas no log de ações.
|
Statistics written to action log.=Estatísticas salvas no log de ações.
|
||||||
Statistics were reset.=As estatísticas foram redefinidas.
|
Statistics were reset.=As estatísticas foram redefinidas.
|
||||||
Usage: @1=Uso: @1
|
|
||||||
Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change).=O formato pode ser txt, csv, lua, json, json_pretty (as estruturas podem estar sujeitas a alterações).
|
|
||||||
Values below show absolute/relative times spend per server step by the instrumented function.=Os valores abaixo mostram os tempos absolutos/relativos gastos por etapa do servidor pela função instrumentada.
|
Values below show absolute/relative times spend per server step by the instrumented function.=Os valores abaixo mostram os tempos absolutos/relativos gastos por etapa do servidor pela função instrumentada.
|
||||||
A total of @1 sample(s) were taken.=Um total de @1 amostra(s) foi coletada.
|
A total of @1 sample(s) were taken.=Um total de @1 amostra(s) foi coletada.
|
||||||
The output is limited to '@1'.=A saída é limitada a '@1'.
|
The output is limited to '@1'.=A saída é limitada a '@1'.
|
||||||
Saving of profile failed: @1=Falha ao salvar o perfil: @1
|
Saving of profile failed: @1=Falha ao salvar o perfil: @1
|
||||||
Profile saved to @1=Perfil salvo em @1
|
Profile saved to @1=Perfil salvo em @1
|
||||||
You died=Você morreu
|
|
||||||
Respawn=Reviver
|
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ Send a direct message to a player=Отправить прямое сообщен
|
|||||||
Invalid usage, see /help msg.=Недопустимое использование, см. /help msg.
|
Invalid usage, see /help msg.=Недопустимое использование, см. /help msg.
|
||||||
The player @1 is not online.=Игрок @1 не находится в игре.
|
The player @1 is not online.=Игрок @1 не находится в игре.
|
||||||
DM from @1: @2=DM от @1: @2
|
DM from @1: @2=DM от @1: @2
|
||||||
Message sent.=Сообщение отправлено.
|
DM sent to @1: @2=
|
||||||
Get the last login time of a player or yourself=Вывести время последнего входа игрока или своё
|
Get the last login time of a player or yourself=Вывести время последнего входа игрока или своё
|
||||||
@1's last login time was @2.=Время последнего входа @1: @2.
|
@1's last login time was @2.=Время последнего входа @1: @2.
|
||||||
@1's last login time is unknown.=Время последнего входа @1 неизвестно.
|
@1's last login time is unknown.=Время последнего входа @1 неизвестно.
|
||||||
@@ -207,6 +207,8 @@ You are already dead.=Ты уже мертв.
|
|||||||
@1 is already dead.=@1 уже мертв.
|
@1 is already dead.=@1 уже мертв.
|
||||||
@1 has been killed.=@1 был убит.
|
@1 has been killed.=@1 был убит.
|
||||||
Kill player or yourself=Убить игрока или себя
|
Kill player or yourself=Убить игрока или себя
|
||||||
|
You died=Вы умерли
|
||||||
|
Respawn=Возродиться
|
||||||
@1 joined the game.=@1 присоединился к игре.
|
@1 joined the game.=@1 присоединился к игре.
|
||||||
@1 left the game.=@1 вышел из игры.
|
@1 left the game.=@1 вышел из игры.
|
||||||
@1 left the game (timed out).=@1 вышел из игры (тайм-аут).
|
@1 left the game (timed out).=@1 вышел из игры (тайм-аут).
|
||||||
@@ -234,15 +236,11 @@ Air=Воздух
|
|||||||
Ignore=Игнорируемая встроенная нода (":ignore")
|
Ignore=Игнорируемая встроенная нода (":ignore")
|
||||||
You can't place 'ignore' nodes!=Вы не можете установить ноду 'ignore'!
|
You can't place 'ignore' nodes!=Вы не можете установить ноду 'ignore'!
|
||||||
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset
|
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset
|
||||||
Handle the profiler and profiling data=Работа с профайлером и данными профилирования
|
Handle the profiler and profiling data. Can output to chat (print), action log (dump), or file in world (save). Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change). Filter is a lua pattern used to limit output to matching mod names.=
|
||||||
Statistics written to action log.=Статистика записывается в журнал действий.
|
Statistics written to action log.=Статистика записывается в журнал действий.
|
||||||
Statistics were reset.=Статистика была сброшена.
|
Statistics were reset.=Статистика была сброшена.
|
||||||
Usage: @1=Использование: @1
|
|
||||||
Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change).=Формат может быть одним из txt, csv, lua, json, json_pretty (структуры могут быть изменены).
|
|
||||||
Values below show absolute/relative times spend per server step by the instrumented function.=Приведенные ниже значения показывают абсолютное/относительное время, затрачиваемое функцией на каждый шаг сервера.
|
Values below show absolute/relative times spend per server step by the instrumented function.=Приведенные ниже значения показывают абсолютное/относительное время, затрачиваемое функцией на каждый шаг сервера.
|
||||||
A total of @1 sample(s) were taken.=Всего было взято @1 образец(ов).
|
A total of @1 sample(s) were taken.=Всего было взято @1 образец(ов).
|
||||||
The output is limited to '@1'.=Вывод ограничен значением '@1'.
|
The output is limited to '@1'.=Вывод ограничен значением '@1'.
|
||||||
Saving of profile failed: @1=Не удалось сохранить данные профилирования: @1
|
Saving of profile failed: @1=Не удалось сохранить данные профилирования: @1
|
||||||
Profile saved to @1=Данные профилирования сохранены в @1
|
Profile saved to @1=Данные профилирования сохранены в @1
|
||||||
You died=Вы умерли
|
|
||||||
Respawn=Возродиться
|
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ Send a direct message to a player=
|
|||||||
Invalid usage, see /help msg.=
|
Invalid usage, see /help msg.=
|
||||||
The player @1 is not online.=
|
The player @1 is not online.=
|
||||||
DM from @1: @2=
|
DM from @1: @2=
|
||||||
Message sent.=
|
DM sent to @1: @2=
|
||||||
Get the last login time of a player or yourself=
|
Get the last login time of a player or yourself=
|
||||||
@1's last login time was @2.=
|
@1's last login time was @2.=
|
||||||
@1's last login time is unknown.=
|
@1's last login time is unknown.=
|
||||||
@@ -207,6 +207,8 @@ You are already dead.=
|
|||||||
@1 is already dead.=
|
@1 is already dead.=
|
||||||
@1 has been killed.=
|
@1 has been killed.=
|
||||||
Kill player or yourself=
|
Kill player or yourself=
|
||||||
|
You died=
|
||||||
|
Respawn=
|
||||||
@1 joined the game.=
|
@1 joined the game.=
|
||||||
@1 left the game.=
|
@1 left the game.=
|
||||||
@1 left the game (timed out).=
|
@1 left the game (timed out).=
|
||||||
@@ -234,11 +236,9 @@ Air=
|
|||||||
Ignore=
|
Ignore=
|
||||||
You can't place 'ignore' nodes!=
|
You can't place 'ignore' nodes!=
|
||||||
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=
|
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=
|
||||||
Handle the profiler and profiling data=
|
Handle the profiler and profiling data. Can output to chat (print), action log (dump), or file in world (save). Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change). Filter is a lua pattern used to limit output to matching mod names.=
|
||||||
Statistics written to action log.=
|
Statistics written to action log.=
|
||||||
Statistics were reset.=
|
Statistics were reset.=
|
||||||
Usage: @1=
|
|
||||||
Format can be one of txt, csv, lua, json, json_pretty (structures may be subject to change).=
|
|
||||||
Values below show absolute/relative times spend per server step by the instrumented function.=
|
Values below show absolute/relative times spend per server step by the instrumented function.=
|
||||||
A total of @1 sample(s) were taken.=
|
A total of @1 sample(s) were taken.=
|
||||||
The output is limited to '@1'.=
|
The output is limited to '@1'.=
|
||||||
|
|||||||
@@ -1,19 +1,6 @@
|
|||||||
--Luanti
|
-- Luanti
|
||||||
--Copyright (C) 2014 sapier
|
-- Copyright (C) 2014 sapier
|
||||||
--
|
-- SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
--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
|
|
||||||
--the Free Software Foundation; either version 2.1 of the License, or
|
|
||||||
--(at your option) any later version.
|
|
||||||
--
|
|
||||||
--This program is distributed in the hope that it will be useful,
|
|
||||||
--but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
--GNU Lesser General Public License for more details.
|
|
||||||
--
|
|
||||||
--You should have received a copy of the GNU Lesser General Public License along
|
|
||||||
--with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
-- Global menu data
|
-- Global menu data
|
||||||
menudata = {}
|
menudata = {}
|
||||||
@@ -34,7 +21,6 @@ function check_cache_age(key, max_age)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function core.on_before_close()
|
function core.on_before_close()
|
||||||
-- called before the menu is closed, either exit or to join a game
|
|
||||||
cache_settings:write()
|
cache_settings:write()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,6 @@
|
|||||||
--Luanti
|
-- Luanti
|
||||||
--Copyright (C) 2018-24 rubenwardy
|
-- Copyright (C) 2018-24 rubenwardy
|
||||||
--
|
-- SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
--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
|
|
||||||
--the Free Software Foundation; either version 2.1 of the License, or
|
|
||||||
--(at your option) any later version.
|
|
||||||
--
|
|
||||||
--This program is distributed in the hope that it will be useful,
|
|
||||||
--but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
--GNU Lesser General Public License for more details.
|
|
||||||
--
|
|
||||||
--You should have received a copy of the GNU Lesser General Public License along
|
|
||||||
--with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
if not core.get_http_api then
|
if not core.get_http_api then
|
||||||
return
|
return
|
||||||
@@ -41,6 +28,7 @@ contentdb = {
|
|||||||
REASON_DEPENDENCY = "dependency",
|
REASON_DEPENDENCY = "dependency",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- API documentation: https://content.luanti.org/help/api/
|
||||||
|
|
||||||
local function get_download_url(package, reason)
|
local function get_download_url(package, reason)
|
||||||
local base_url = core.settings:get("contentdb_url")
|
local base_url = core.settings:get("contentdb_url")
|
||||||
@@ -182,14 +170,16 @@ function contentdb.get_package_by_id(id)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function contentdb.calculate_package_id(type, author, name)
|
local function strip_game_suffix(type, name)
|
||||||
local id = author:lower() .. "/"
|
|
||||||
if (type == nil or type == "game") and #name > 5 and name:sub(#name - 4) == "_game" then
|
if (type == nil or type == "game") and #name > 5 and name:sub(#name - 4) == "_game" then
|
||||||
id = id .. name:sub(1, #name - 5)
|
return name:sub(1, #name - 5)
|
||||||
else
|
else
|
||||||
id = id .. name
|
return name
|
||||||
end
|
end
|
||||||
return id
|
end
|
||||||
|
|
||||||
|
function contentdb.calculate_package_id(type, author, name)
|
||||||
|
return author:lower() .. "/" .. strip_game_suffix(type, name)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@@ -398,7 +388,6 @@ local function fetch_pkgs()
|
|||||||
local url = base_url ..
|
local url = base_url ..
|
||||||
"/api/packages/?type=mod&type=game&type=txp&protocol_version=" ..
|
"/api/packages/?type=mod&type=game&type=txp&protocol_version=" ..
|
||||||
core.get_max_supp_proto() .. "&engine_version=" .. core.urlencode(version.string)
|
core.get_max_supp_proto() .. "&engine_version=" .. core.urlencode(version.string)
|
||||||
|
|
||||||
for _, item in pairs(core.settings:get("contentdb_flag_blacklist"):split(",")) do
|
for _, item in pairs(core.settings:get("contentdb_flag_blacklist"):split(",")) do
|
||||||
item = item:trim()
|
item = item:trim()
|
||||||
if item ~= "" then
|
if item ~= "" then
|
||||||
@@ -406,19 +395,11 @@ local function fetch_pkgs()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local languages
|
|
||||||
local current_language = core.get_language()
|
|
||||||
if current_language ~= "" then
|
|
||||||
languages = { current_language, "en;q=0.8" }
|
|
||||||
else
|
|
||||||
languages = { "en" }
|
|
||||||
end
|
|
||||||
|
|
||||||
local http = core.get_http_api()
|
local http = core.get_http_api()
|
||||||
local response = http.fetch_sync({
|
local response = http.fetch_sync({
|
||||||
url = url,
|
url = url,
|
||||||
extra_headers = {
|
extra_headers = {
|
||||||
"Accept-Language: " .. table.concat(languages, ", ")
|
core.get_http_accept_languages()
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if not response.succeeded then
|
if not response.succeeded then
|
||||||
@@ -448,7 +429,7 @@ function contentdb.set_packages_from_api(packages)
|
|||||||
-- We currently don't support name changing
|
-- We currently don't support name changing
|
||||||
local suffix = "/" .. package.name
|
local suffix = "/" .. package.name
|
||||||
if alias:sub(-#suffix) == suffix then
|
if alias:sub(-#suffix) == suffix then
|
||||||
contentdb.aliases[alias:lower()] = package.id
|
contentdb.aliases[strip_game_suffix(packages.type, alias:lower())] = package.id
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -596,57 +577,54 @@ function contentdb.filter_packages(query, by_type)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function contentdb.get_full_package_info(package, callback)
|
local function get_package_info(key, path)
|
||||||
assert(package)
|
return function(package, callback)
|
||||||
if package.full_info then
|
assert(package)
|
||||||
callback(package.full_info)
|
if package[key] then
|
||||||
return
|
callback(package[key])
|
||||||
end
|
return
|
||||||
|
|
||||||
local function fetch(params)
|
|
||||||
local version = core.get_version()
|
|
||||||
local base_url = core.settings:get("contentdb_url")
|
|
||||||
|
|
||||||
local languages
|
|
||||||
local current_language = core.get_language()
|
|
||||||
if current_language ~= "" then
|
|
||||||
languages = { current_language, "en;q=0.8" }
|
|
||||||
else
|
|
||||||
languages = { "en" }
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local url = base_url ..
|
local function fetch(params)
|
||||||
"/api/packages/" .. params.package.url_part .. "/for-client/?" ..
|
local version = core.get_version()
|
||||||
"protocol_version=" .. core.urlencode(core.get_max_supp_proto()) ..
|
local base_url = core.settings:get("contentdb_url")
|
||||||
"&engine_version=" .. core.urlencode(version.string) ..
|
local url = base_url ..
|
||||||
"&formspec_version=" .. core.urlencode(core.get_formspec_version()) ..
|
"/api/packages/" .. params.package.url_part .. params.path .. "?" ..
|
||||||
"&include_images=false"
|
"protocol_version=" .. core.urlencode(core.get_max_supp_proto()) ..
|
||||||
local http = core.get_http_api()
|
"&engine_version=" .. core.urlencode(version.string) ..
|
||||||
local response = http.fetch_sync({
|
"&formspec_version=" .. core.urlencode(core.get_formspec_version()) ..
|
||||||
url = url,
|
"&include_images=false"
|
||||||
extra_headers = {
|
local http = core.get_http_api()
|
||||||
"Accept-Language: " .. table.concat(languages, ", ")
|
local response = http.fetch_sync({
|
||||||
},
|
url = url,
|
||||||
})
|
extra_headers = {
|
||||||
if not response.succeeded then
|
core.get_http_accept_languages()
|
||||||
return nil
|
},
|
||||||
|
})
|
||||||
|
if not response.succeeded then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
return core.parse_json(response.data)
|
||||||
end
|
end
|
||||||
|
|
||||||
return core.parse_json(response.data)
|
local function my_callback(value)
|
||||||
end
|
package[key] = value
|
||||||
|
callback(value)
|
||||||
|
end
|
||||||
|
|
||||||
local function my_callback(value)
|
if not core.handle_async(fetch, { package = package, path = path }, my_callback) then
|
||||||
package.full_info = value
|
core.log("error", "ERROR: async event failed")
|
||||||
callback(value)
|
callback(nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not core.handle_async(fetch, { package = package }, my_callback) then
|
|
||||||
core.log("error", "ERROR: async event failed")
|
|
||||||
callback(nil)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
contentdb.get_full_package_info = get_package_info("full_info", "/for-client/")
|
||||||
|
contentdb.get_package_reviews = get_package_info("reviews", "/for-client/reviews/")
|
||||||
|
|
||||||
|
|
||||||
function contentdb.get_formspec_padding()
|
function contentdb.get_formspec_padding()
|
||||||
-- Padding is increased on Android to account for notches
|
-- Padding is increased on Android to account for notches
|
||||||
-- TODO: use Android API to determine size of cut outs
|
-- TODO: use Android API to determine size of cut outs
|
||||||
|
|||||||
@@ -1,19 +1,6 @@
|
|||||||
--Luanti
|
-- Luanti
|
||||||
--Copyright (C) 2018-20 rubenwardy
|
-- Copyright (C) 2018-20 rubenwardy
|
||||||
--
|
-- SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
--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
|
|
||||||
--the Free Software Foundation; either version 2.1 of the License, or
|
|
||||||
--(at your option) any later version.
|
|
||||||
--
|
|
||||||
--This program is distributed in the hope that it will be useful,
|
|
||||||
--but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
--GNU Lesser General Public License for more details.
|
|
||||||
--
|
|
||||||
--You should have received a copy of the GNU Lesser General Public License along
|
|
||||||
--with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
if not core.get_http_api then
|
if not core.get_http_api then
|
||||||
function create_contentdb_dlg()
|
function create_contentdb_dlg()
|
||||||
@@ -323,9 +310,17 @@ local function get_formspec(dlgdata)
|
|||||||
})
|
})
|
||||||
local img_w = cell_h * 3 / 2
|
local img_w = cell_h * 3 / 2
|
||||||
|
|
||||||
|
-- Use as much of the available space as possible (so no padding on the
|
||||||
|
-- right/bottom), but don't quite allow the text to touch the border.
|
||||||
|
local text_w = cell_w - img_w - 0.25 - 0.025
|
||||||
|
local text_h = cell_h - 0.25 - 0.025
|
||||||
|
|
||||||
local start_idx = (cur_page - 1) * num_per_page + 1
|
local start_idx = (cur_page - 1) * num_per_page + 1
|
||||||
for i=start_idx, math.min(#contentdb.packages, start_idx+num_per_page-1) do
|
for i=start_idx, math.min(#contentdb.packages, start_idx+num_per_page-1) do
|
||||||
local package = contentdb.packages[i]
|
local package = contentdb.packages[i]
|
||||||
|
local text = core.colorize(mt_color_green, package.title) ..
|
||||||
|
core.colorize("#BFBFBF", " by " .. package.author) .. "\n" ..
|
||||||
|
package.short_description
|
||||||
|
|
||||||
table.insert_all(formspec, {
|
table.insert_all(formspec, {
|
||||||
"container[",
|
"container[",
|
||||||
@@ -340,13 +335,14 @@ local function get_formspec(dlgdata)
|
|||||||
"image[0,0;", img_w, ",", cell_h, ";",
|
"image[0,0;", img_w, ",", cell_h, ";",
|
||||||
core.formspec_escape(get_screenshot(package, package.thumbnail, 2)), "]",
|
core.formspec_escape(get_screenshot(package, package.thumbnail, 2)), "]",
|
||||||
|
|
||||||
"label[", img_w + 0.25 + 0.05, ",0.5;",
|
"label[", img_w + 0.25, ",0.25;", text_w, ",", text_h, ";",
|
||||||
core.formspec_escape(
|
core.formspec_escape(text), "]",
|
||||||
core.colorize(mt_color_green, package.title) ..
|
|
||||||
core.colorize("#BFBFBF", " by " .. package.author)), "]",
|
|
||||||
|
|
||||||
"textarea[", img_w + 0.25, ",0.75;", cell_w - img_w - 0.25, ",", cell_h - 0.75, ";;;",
|
-- Add a tooltip in case the label overflows and the short description is cut off.
|
||||||
core.formspec_escape(package.short_description), "]",
|
"tooltip[", img_w + 0.25, ",0.25;", text_w, ",", text_h, ";",
|
||||||
|
-- Text in tooltips doesn't wrap automatically, so we do it manually to
|
||||||
|
-- avoid everything being one long line.
|
||||||
|
core.formspec_escape(core.wrap_text(package.short_description, 80)), "]",
|
||||||
|
|
||||||
"style[view_", i, ";border=false]",
|
"style[view_", i, ";border=false]",
|
||||||
"style[view_", i, ":hovered;bgimg=", core.formspec_escape(defaulttexturedir .. "button_hover_semitrans.png"), "]",
|
"style[view_", i, ":hovered;bgimg=", core.formspec_escape(defaulttexturedir .. "button_hover_semitrans.png"), "]",
|
||||||
@@ -362,7 +358,7 @@ local function get_formspec(dlgdata)
|
|||||||
end
|
end
|
||||||
|
|
||||||
table.insert_all(formspec, {
|
table.insert_all(formspec, {
|
||||||
"container[", cell_w - 0.625,",", 0.25, "]",
|
"container[", cell_w - 0.625,",", 0.125, "]",
|
||||||
})
|
})
|
||||||
|
|
||||||
if package.downloading then
|
if package.downloading then
|
||||||
|
|||||||
@@ -1,19 +1,6 @@
|
|||||||
--Luanti
|
-- Luanti
|
||||||
--Copyright (C) 2018-24 rubenwardy
|
-- Copyright (C) 2018-24 rubenwardy
|
||||||
--
|
-- SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
--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
|
|
||||||
--the Free Software Foundation; either version 2.1 of the License, or
|
|
||||||
--(at your option) any later version.
|
|
||||||
--
|
|
||||||
--This program is distributed in the hope that it will be useful,
|
|
||||||
--but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
--GNU Lesser General Public License for more details.
|
|
||||||
--
|
|
||||||
--You should have received a copy of the GNU Lesser General Public License along
|
|
||||||
--with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
local function is_still_visible(dlg)
|
local function is_still_visible(dlg)
|
||||||
local this = ui.find_by_name("install_dialog")
|
local this = ui.find_by_name("install_dialog")
|
||||||
|
|||||||
@@ -1,19 +1,6 @@
|
|||||||
--Luanti
|
-- Luanti
|
||||||
--Copyright (C) 2018-24 rubenwardy
|
-- Copyright (C) 2018-24 rubenwardy
|
||||||
--
|
-- SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
--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
|
|
||||||
--the Free Software Foundation; either version 2.1 of the License, or
|
|
||||||
--(at your option) any later version.
|
|
||||||
--
|
|
||||||
--This program is distributed in the hope that it will be useful,
|
|
||||||
--but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
--GNU Lesser General Public License for more details.
|
|
||||||
--
|
|
||||||
--You should have received a copy of the GNU Lesser General Public License along
|
|
||||||
--with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
function get_formspec(data)
|
function get_formspec(data)
|
||||||
local package = data.package
|
local package = data.package
|
||||||
|
|||||||
@@ -1,37 +1,68 @@
|
|||||||
--Luanti
|
-- Luanti
|
||||||
--Copyright (C) 2018-24 rubenwardy
|
-- Copyright (C) 2018-24 rubenwardy
|
||||||
--
|
-- SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
--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
|
|
||||||
--the Free Software Foundation; either version 2.1 of the License, or
|
|
||||||
--(at your option) any later version.
|
|
||||||
--
|
|
||||||
--This program is distributed in the hope that it will be useful,
|
|
||||||
--but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
--GNU Lesser General Public License for more details.
|
|
||||||
--
|
|
||||||
--You should have received a copy of the GNU Lesser General Public License along
|
|
||||||
--with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
|
|
||||||
local function get_info_formspec(size, padding, text)
|
local function get_description_hypertext(package, info, loading_error)
|
||||||
return table.concat({
|
-- Screenshots and description
|
||||||
"formspec_version[6]",
|
local hypertext = "<big><b>" .. core.hypertext_escape(package.short_description) .. "</b></big>\n"
|
||||||
"size[", size.x, ",", size.y, "]",
|
|
||||||
"padding[0,0]",
|
|
||||||
"bgcolor[;true]",
|
|
||||||
|
|
||||||
"label[4,4.35;", text, "]",
|
local screenshots = info and info.screenshots or {{url = package.thumbnail}}
|
||||||
"container[", padding.x, ",", size.y - 0.8 - padding.y, "]",
|
|
||||||
"button[0,0;2,0.8;back;", fgettext("Back"), "]",
|
local winfo = core.get_window_info()
|
||||||
"container_end[]",
|
local fs_to_px = winfo.size.x / winfo.max_formspec_size.x
|
||||||
})
|
for i, ss in ipairs(screenshots) do
|
||||||
|
local path = get_screenshot(package, ss.url, 2)
|
||||||
|
hypertext = hypertext .. "<action name=\"ss_".. i .. "\"><img name=\"" ..
|
||||||
|
core.hypertext_escape(path) .. "\" width=" .. (3 * fs_to_px) ..
|
||||||
|
" height=" .. (2 * fs_to_px) .. "></action>"
|
||||||
|
if i ~= #screenshots then
|
||||||
|
hypertext = hypertext .. "<img name=\"blank.png\" width=" .. (0.25 * fs_to_px) ..
|
||||||
|
" height=" .. (2.25 * fs_to_px).. ">"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if info then
|
||||||
|
hypertext = hypertext .. "\n" .. info.long_description.head
|
||||||
|
|
||||||
|
local first = true
|
||||||
|
local function add_link_button(label, name)
|
||||||
|
if info[name] then
|
||||||
|
if not first then
|
||||||
|
hypertext = hypertext .. " | "
|
||||||
|
end
|
||||||
|
hypertext = hypertext .. "<action name=link_" .. name .. ">" .. label .. "</action>"
|
||||||
|
info.long_description.links["link_" .. name] = info[name]
|
||||||
|
first = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
add_link_button(hgettext("Donate"), "donate_url")
|
||||||
|
add_link_button(hgettext("Website"), "website")
|
||||||
|
add_link_button(hgettext("Source"), "repo")
|
||||||
|
add_link_button(hgettext("Issue Tracker"), "issue_tracker")
|
||||||
|
add_link_button(hgettext("Translate"), "translation_url")
|
||||||
|
add_link_button(hgettext("Forum Topic"), "forum_url")
|
||||||
|
|
||||||
|
hypertext = hypertext .. "\n\n" .. info.long_description.body
|
||||||
|
|
||||||
|
elseif loading_error then
|
||||||
|
hypertext = hypertext .. "\n\n" .. hgettext("Error loading package information")
|
||||||
|
else
|
||||||
|
hypertext = hypertext .. "\n\n" .. hgettext("Loading...")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Fix the path to blank.png. This is needed for bullet indentation,
|
||||||
|
-- and also used for screenshot spacing.
|
||||||
|
hypertext = hypertext:gsub("<img name=\"?blank.png\"? ",
|
||||||
|
"<img name=\"" .. core.hypertext_escape(defaulttexturedir) .. "blank.png\" ")
|
||||||
|
|
||||||
|
return hypertext
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local function get_formspec(data)
|
local function get_formspec(data)
|
||||||
|
local package = data.package
|
||||||
local window_padding = contentdb.get_formspec_padding()
|
local window_padding = contentdb.get_formspec_padding()
|
||||||
local size = contentdb.get_formspec_size()
|
local size = contentdb.get_formspec_size()
|
||||||
size.x = math.min(size.x, 20)
|
size.x = math.min(size.x, 20)
|
||||||
@@ -42,7 +73,7 @@ local function get_formspec(data)
|
|||||||
if not data.loading and not data.loading_error then
|
if not data.loading and not data.loading_error then
|
||||||
data.loading = true
|
data.loading = true
|
||||||
|
|
||||||
contentdb.get_full_package_info(data.package, function(info)
|
contentdb.get_full_package_info(package, function(info)
|
||||||
data.loading = false
|
data.loading = false
|
||||||
|
|
||||||
if info == nil then
|
if info == nil then
|
||||||
@@ -53,18 +84,10 @@ local function get_formspec(data)
|
|||||||
|
|
||||||
assert(data.package.name == info.name)
|
assert(data.package.name == info.name)
|
||||||
data.info = info
|
data.info = info
|
||||||
|
-- note: get_full_package_info can also return cached info immediately
|
||||||
ui.update()
|
ui.update()
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- get_full_package_info can return cached info immediately, so
|
|
||||||
-- check to see if that happened
|
|
||||||
if not data.info then
|
|
||||||
if data.loading_error then
|
|
||||||
return get_info_formspec(size, window_padding, fgettext("No packages could be retrieved"))
|
|
||||||
end
|
|
||||||
return get_info_formspec(size, window_padding, fgettext("Loading..."))
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Check installation status
|
-- Check installation status
|
||||||
@@ -72,10 +95,14 @@ local function get_formspec(data)
|
|||||||
|
|
||||||
local info = data.info
|
local info = data.info
|
||||||
|
|
||||||
local info_line =
|
local info_line
|
||||||
fgettext("by $1 — $2 downloads — +$3 / $4 / -$5",
|
if info then
|
||||||
|
info_line = fgettext_ne("by $1 — $2 downloads — +$3 / $4 / -$5",
|
||||||
info.author, info.downloads,
|
info.author, info.downloads,
|
||||||
info.reviews.positive, info.reviews.neutral, info.reviews.negative)
|
info.reviews.positive, info.reviews.neutral, info.reviews.negative)
|
||||||
|
else
|
||||||
|
info_line = fgettext_ne("by $1", package.author)
|
||||||
|
end
|
||||||
|
|
||||||
local bottom_buttons_y = H - 0.8
|
local bottom_buttons_y = H - 0.8
|
||||||
|
|
||||||
@@ -91,7 +118,7 @@ local function get_formspec(data)
|
|||||||
"button[", W - 3, ",", bottom_buttons_y, ";3,0.8;open_contentdb;", fgettext("ContentDB page"), "]",
|
"button[", W - 3, ",", bottom_buttons_y, ";3,0.8;open_contentdb;", fgettext("ContentDB page"), "]",
|
||||||
|
|
||||||
"style_type[label;font_size=+24;font=bold]",
|
"style_type[label;font_size=+24;font=bold]",
|
||||||
"label[0,0.4;", core.formspec_escape(info.title), "]",
|
"label[0,0.4;", core.formspec_escape(package.title), "]",
|
||||||
"style_type[label;font_size=;font=]",
|
"style_type[label;font_size=;font=]",
|
||||||
|
|
||||||
"label[0,1.2;", core.formspec_escape(info_line), "]",
|
"label[0,1.2;", core.formspec_escape(info_line), "]",
|
||||||
@@ -103,23 +130,25 @@ local function get_formspec(data)
|
|||||||
|
|
||||||
local left_button_rect = "0,0;2.875,1"
|
local left_button_rect = "0,0;2.875,1"
|
||||||
local right_button_rect = "3.125,0;2.875,1"
|
local right_button_rect = "3.125,0;2.875,1"
|
||||||
if data.package.downloading then
|
if package.downloading then
|
||||||
formspec[#formspec + 1] = "animated_image[5,0;1,1;downloading;"
|
formspec[#formspec + 1] = "animated_image[5,0;1,1;downloading;"
|
||||||
formspec[#formspec + 1] = core.formspec_escape(defaulttexturedir)
|
formspec[#formspec + 1] = core.formspec_escape(defaulttexturedir)
|
||||||
formspec[#formspec + 1] = "cdb_downloading.png;3;400;]"
|
formspec[#formspec + 1] = "cdb_downloading.png;3;400;]"
|
||||||
elseif data.package.queued then
|
elseif package.queued then
|
||||||
formspec[#formspec + 1] = "style[queued;border=false]"
|
formspec[#formspec + 1] = "style[queued;border=false]"
|
||||||
formspec[#formspec + 1] = "image_button[5,0;1,1;" .. core.formspec_escape(defaulttexturedir)
|
formspec[#formspec + 1] = "image_button[5,0;1,1;" .. core.formspec_escape(defaulttexturedir)
|
||||||
formspec[#formspec + 1] = "cdb_queued.png;queued;]"
|
formspec[#formspec + 1] = "cdb_queued.png;queued;]"
|
||||||
elseif not data.package.path then
|
elseif not package.path then
|
||||||
|
local label = info and fgettext("Install [$1]", info.download_size) or
|
||||||
|
fgettext("Install")
|
||||||
formspec[#formspec + 1] = "style[install;bgcolor=green]"
|
formspec[#formspec + 1] = "style[install;bgcolor=green]"
|
||||||
formspec[#formspec + 1] = "button["
|
formspec[#formspec + 1] = "button["
|
||||||
formspec[#formspec + 1] = right_button_rect
|
formspec[#formspec + 1] = right_button_rect
|
||||||
formspec[#formspec + 1] =";install;"
|
formspec[#formspec + 1] =";install;"
|
||||||
formspec[#formspec + 1] = fgettext("Install [$1]", info.download_size)
|
formspec[#formspec + 1] = label
|
||||||
formspec[#formspec + 1] = "]"
|
formspec[#formspec + 1] = "]"
|
||||||
else
|
else
|
||||||
if data.package.installed_release < data.package.release then
|
if package.installed_release < package.release then
|
||||||
-- The install_ action also handles updating
|
-- The install_ action also handles updating
|
||||||
formspec[#formspec + 1] = "style[install;bgcolor=#28ccdf]"
|
formspec[#formspec + 1] = "style[install;bgcolor=#28ccdf]"
|
||||||
formspec[#formspec + 1] = "button["
|
formspec[#formspec + 1] = "button["
|
||||||
@@ -140,8 +169,12 @@ local function get_formspec(data)
|
|||||||
local current_tab = data.current_tab or 1
|
local current_tab = data.current_tab or 1
|
||||||
local tab_titles = {
|
local tab_titles = {
|
||||||
fgettext("Description"),
|
fgettext("Description"),
|
||||||
fgettext("Information"),
|
|
||||||
}
|
}
|
||||||
|
if info then
|
||||||
|
local review_count = info.reviews.positive + info.reviews.neutral + info.reviews.negative
|
||||||
|
table.insert(tab_titles, fgettext("Information"))
|
||||||
|
table.insert(tab_titles, fgettext("Reviews") .. core.formspec_escape(" [" .. review_count .. "]"))
|
||||||
|
end
|
||||||
|
|
||||||
local tab_body_height = bottom_buttons_y - 2.8
|
local tab_body_height = bottom_buttons_y - 2.8
|
||||||
|
|
||||||
@@ -157,59 +190,53 @@ local function get_formspec(data)
|
|||||||
})
|
})
|
||||||
|
|
||||||
if current_tab == 1 then
|
if current_tab == 1 then
|
||||||
-- Screenshots and description
|
local hypertext = get_description_hypertext(package, info, data.loading_error)
|
||||||
local hypertext = "<big><b>" .. core.hypertext_escape(info.short_description) .. "</b></big>\n"
|
|
||||||
local winfo = core.get_window_info()
|
|
||||||
local fs_to_px = winfo.size.x / winfo.max_formspec_size.x
|
|
||||||
for i, ss in ipairs(info.screenshots) do
|
|
||||||
local path = get_screenshot(data.package, ss.url, 2)
|
|
||||||
hypertext = hypertext .. "<action name=\"ss_" .. i .. "\"><img name=\"" ..
|
|
||||||
core.hypertext_escape(path) .. "\" width=" .. (3 * fs_to_px) ..
|
|
||||||
" height=" .. (2 * fs_to_px) .. "></action>"
|
|
||||||
if i ~= #info.screenshots then
|
|
||||||
hypertext = hypertext .. "<img name=\"blank.png\" width=" .. (0.25 * fs_to_px) ..
|
|
||||||
" height=" .. (2.25 * fs_to_px).. ">"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
hypertext = hypertext .. "\n" .. info.long_description.head
|
|
||||||
|
|
||||||
local first = true
|
|
||||||
local function add_link_button(label, name)
|
|
||||||
if info[name] then
|
|
||||||
if not first then
|
|
||||||
hypertext = hypertext .. " | "
|
|
||||||
end
|
|
||||||
hypertext = hypertext .. "<action name=link_" .. name .. ">" .. core.hypertext_escape(label) .. "</action>"
|
|
||||||
info.long_description.links["link_" .. name] = info[name]
|
|
||||||
first = false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
add_link_button(fgettext("Donate"), "donate_url")
|
|
||||||
add_link_button(fgettext("Website"), "website")
|
|
||||||
add_link_button(fgettext("Source"), "repo")
|
|
||||||
add_link_button(fgettext("Issue Tracker"), "issue_tracker")
|
|
||||||
add_link_button(fgettext("Translate"), "translation_url")
|
|
||||||
add_link_button(fgettext("Forum Topic"), "forum_url")
|
|
||||||
|
|
||||||
hypertext = hypertext .. "\n\n" .. info.long_description.body
|
|
||||||
|
|
||||||
hypertext = hypertext:gsub("<img name=\"?blank.png\"? ",
|
|
||||||
"<img name=\"" .. core.hypertext_escape(defaulttexturedir) .. "blank.png\" ")
|
|
||||||
|
|
||||||
table.insert_all(formspec, {
|
table.insert_all(formspec, {
|
||||||
"hypertext[0,0;", W, ",", tab_body_height - 0.375,
|
"hypertext[0,0;", W, ",", tab_body_height - 0.375,
|
||||||
";desc;", core.formspec_escape(hypertext), "]",
|
";desc;", core.formspec_escape(hypertext), "]",
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
elseif current_tab == 2 then
|
elseif current_tab == 2 then
|
||||||
|
assert(info)
|
||||||
local hypertext = info.info_hypertext.head .. info.info_hypertext.body
|
local hypertext = info.info_hypertext.head .. info.info_hypertext.body
|
||||||
|
|
||||||
table.insert_all(formspec, {
|
table.insert_all(formspec, {
|
||||||
"hypertext[0,0;", W, ",", tab_body_height - 0.375,
|
"hypertext[0,0;", W, ",", tab_body_height - 0.375,
|
||||||
";info;", core.formspec_escape(hypertext), "]",
|
";info;", core.formspec_escape(hypertext), "]",
|
||||||
})
|
})
|
||||||
|
elseif current_tab == 3 then
|
||||||
|
assert(info)
|
||||||
|
if not package.reviews and not data.reviews_error and not data.reviews_loading then
|
||||||
|
data.reviews_loading = true
|
||||||
|
|
||||||
|
contentdb.get_package_reviews(package, function(reviews)
|
||||||
|
if not reviews then
|
||||||
|
data.reviews_error = true
|
||||||
|
end
|
||||||
|
ui.update()
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
if package.reviews then
|
||||||
|
local hypertext = package.reviews.head .. package.reviews.body
|
||||||
|
-- Provide correct path to blank.png image. This is needed for bullet indentation.
|
||||||
|
hypertext = hypertext:gsub("<img name=\"?blank.png\"? ",
|
||||||
|
"<img name=\"" .. core.hypertext_escape(defaulttexturedir) .. "blank.png\" ")
|
||||||
|
-- Placeholders in reviews hypertext for icons
|
||||||
|
hypertext = hypertext:gsub("<thumbsup>",
|
||||||
|
"<img name=\"" .. core.hypertext_escape(defaulttexturedir) .. "contentdb_thumb_up.png\" width=24>")
|
||||||
|
hypertext = hypertext:gsub("<thumbsdown>",
|
||||||
|
"<img name=\"" .. core.hypertext_escape(defaulttexturedir) .. "contentdb_thumb_down.png\" width=24>")
|
||||||
|
hypertext = hypertext:gsub("<neutral>",
|
||||||
|
"<img name=\"" .. core.hypertext_escape(defaulttexturedir) .. "contentdb_neutral.png\" width=24>")
|
||||||
|
table.insert_all(formspec, {
|
||||||
|
"hypertext[0,0;", W, ",", tab_body_height - 0.375,
|
||||||
|
";reviews;", core.formspec_escape(hypertext), "]",
|
||||||
|
})
|
||||||
|
elseif data.reviews_error then
|
||||||
|
table.insert_all(formspec, {"label[2,2;", fgettext("Error loading reviews"), "]"} )
|
||||||
|
else
|
||||||
|
table.insert_all(formspec, {"label[2,2;", fgettext("Loading..."), "]"} )
|
||||||
|
end
|
||||||
else
|
else
|
||||||
error("Unknown tab " .. current_tab)
|
error("Unknown tab " .. current_tab)
|
||||||
end
|
end
|
||||||
@@ -264,14 +291,11 @@ local function handle_submit(this, fields)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
if not info then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
if fields.open_contentdb then
|
if fields.open_contentdb then
|
||||||
local url = ("%s/packages/%s/?protocol_version=%d"):format(
|
local version = core.get_version()
|
||||||
core.settings:get("contentdb_url"), package.url_part,
|
local url = core.settings:get("contentdb_url") .. "/packages/" .. package.url_part ..
|
||||||
core.get_max_supp_proto())
|
"/?protocol_version=" .. core.urlencode(core.get_max_supp_proto()) ..
|
||||||
|
"&engine_version=" .. core.urlencode(version.string)
|
||||||
core.open_url(url)
|
core.open_url(url)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -289,13 +313,20 @@ local function handle_submit(this, fields)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- The events handled below are only valid if the package info has finished
|
||||||
|
-- loading.
|
||||||
|
if not info then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
if fields.tabs then
|
if fields.tabs then
|
||||||
this.data.current_tab = tonumber(fields.tabs)
|
this.data.current_tab = tonumber(fields.tabs)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
if handle_hypertext_event(this, fields.desc, info.long_description) or
|
if handle_hypertext_event(this, fields.desc, info.long_description) or
|
||||||
handle_hypertext_event(this, fields.info, info.info_hypertext) then
|
handle_hypertext_event(this, fields.info, info.info_hypertext) or
|
||||||
|
(package.reviews and handle_hypertext_event(this, fields.reviews, package.reviews)) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,19 +1,6 @@
|
|||||||
--Luanti
|
-- Luanti
|
||||||
--Copyright (C) 2023 rubenwardy
|
-- Copyright (C) 2023 rubenwardy
|
||||||
--
|
-- SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
--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
|
|
||||||
--the Free Software Foundation; either version 2.1 of the License, or
|
|
||||||
--(at your option) any later version.
|
|
||||||
--
|
|
||||||
--This program is distributed in the hope that it will be useful,
|
|
||||||
--but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
--GNU Lesser General Public License for more details.
|
|
||||||
--
|
|
||||||
--You should have received a copy of the GNU Lesser General Public License along
|
|
||||||
--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 .. "content"
|
local path = core.get_mainmenu_path() .. DIR_DELIM .. "content"
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,6 @@
|
|||||||
--Luanti
|
-- Luanti
|
||||||
--Copyright (C) 2013 sapier
|
-- Copyright (C) 2013 sapier
|
||||||
--
|
-- SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
--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
|
|
||||||
--the Free Software Foundation; either version 2.1 of the License, or
|
|
||||||
--(at your option) any later version.
|
|
||||||
--
|
|
||||||
--This program is distributed in the hope that it will be useful,
|
|
||||||
--but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
--GNU Lesser General Public License for more details.
|
|
||||||
--
|
|
||||||
--You should have received a copy of the GNU Lesser General Public License along
|
|
||||||
--with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
local function get_last_folder(text,count)
|
local function get_last_folder(text,count)
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user