Compare commits
616 Commits
0.4.dev-20
...
0.4.6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f85c1165c2 | ||
|
|
37acadc2af | ||
|
|
82709549ff | ||
|
|
6e96bc98de | ||
|
|
60aaf65b10 | ||
|
|
7d83fefd7f | ||
|
|
2bb559be82 | ||
|
|
d27f57e48f | ||
|
|
e59d971e7b | ||
|
|
025f4d28c1 | ||
|
|
0ed34e6780 | ||
|
|
9ff8012655 | ||
|
|
7d036e3ab2 | ||
|
|
8f57246620 | ||
|
|
2985dc4fc8 | ||
|
|
dd0b8c3de5 | ||
|
|
7dd07cc7c5 | ||
|
|
8d4b768297 | ||
|
|
35ed5198fe | ||
|
|
624461c6c6 | ||
|
|
319662c0ed | ||
|
|
5b597a6bfa | ||
|
|
68fb68a83b | ||
|
|
a2e5706661 | ||
|
|
7d3b3890b5 | ||
|
|
96387ee88a | ||
|
|
23590a8383 | ||
|
|
923a97b108 | ||
|
|
c517215bcf | ||
|
|
414f0275cf | ||
|
|
04414a963c | ||
|
|
02d8df94a8 | ||
|
|
a0566270d9 | ||
|
|
0d83bdc3aa | ||
|
|
062a140b9c | ||
|
|
3e9ed6c1c7 | ||
|
|
3983019fd8 | ||
|
|
3ec3aca78d | ||
|
|
1aa50b1362 | ||
|
|
e17ae475cf | ||
|
|
6cf581e360 | ||
|
|
177ca4f4d5 | ||
|
|
16c11eb4a3 | ||
|
|
df49b93877 | ||
|
|
5e7e0347cd | ||
|
|
7d9329ecfe | ||
|
|
3640c8c051 | ||
|
|
02cbb58107 | ||
|
|
5b854f95d2 | ||
|
|
b0f39da131 | ||
|
|
dc54af7a89 | ||
|
|
d01b74d00a | ||
|
|
a782a88913 | ||
|
|
8800896824 | ||
|
|
880d9e53c3 | ||
|
|
26cad481d0 | ||
|
|
8d13967aa3 | ||
|
|
650d706d35 | ||
|
|
0e07a7157f | ||
|
|
423d69bd40 | ||
|
|
6767ed74f8 | ||
|
|
57cbb8bfd8 | ||
|
|
f70378f7f5 | ||
|
|
e1ff5b1361 | ||
|
|
ab57fdac44 | ||
|
|
dacc8cdb3a | ||
|
|
ca7043e52d | ||
|
|
6f8d40ef5d | ||
|
|
2318d19bb4 | ||
|
|
f98d0433f9 | ||
|
|
34b185e955 | ||
|
|
b6dcadeb79 | ||
|
|
c2250d95c4 | ||
|
|
adc52f3f3c | ||
|
|
0a568a6037 | ||
|
|
0747c285cd | ||
|
|
306d1ab866 | ||
|
|
9b5bb5c755 | ||
|
|
450e7ef0c5 | ||
|
|
8f0d29f931 | ||
|
|
d6026a5fee | ||
|
|
939397dd6e | ||
|
|
d207d359d1 | ||
|
|
5f88cd98ad | ||
|
|
7f51b2da28 | ||
|
|
c00c8832c6 | ||
|
|
5a9fd8f433 | ||
|
|
fc5d2074b9 | ||
|
|
10c03e1a9d | ||
|
|
67228160ae | ||
|
|
165498cecf | ||
|
|
e3badd7062 | ||
|
|
6823ce99a7 | ||
|
|
1f1ad9fd23 | ||
|
|
f5ab056b38 | ||
|
|
16c031be77 | ||
|
|
350596b94f | ||
|
|
66750dc88e | ||
|
|
d10223254a | ||
|
|
eb90c3d92d | ||
|
|
6a1670dbc3 | ||
|
|
e204bedf1d | ||
|
|
650e932ddf | ||
|
|
b7def0fcf4 | ||
|
|
e6bf6950eb | ||
|
|
17bbf4d3f6 | ||
|
|
57f5dc5dcf | ||
|
|
aa77ee66c5 | ||
|
|
b9512cab1b | ||
|
|
dd8593f2d6 | ||
|
|
5af8acfa6e | ||
|
|
ba78194636 | ||
|
|
bdbdeab005 | ||
|
|
038529c763 | ||
|
|
55097e1985 | ||
|
|
c61a2ef44f | ||
|
|
5917e86297 | ||
|
|
75a8312f4e | ||
|
|
48b999a8dd | ||
|
|
3823878305 | ||
|
|
fceb465fc9 | ||
|
|
72abd5a88e | ||
|
|
066b0314b1 | ||
|
|
22e186b4aa | ||
|
|
372acf7b8e | ||
|
|
5b16271bd6 | ||
|
|
8de315738b | ||
|
|
13504b6adc | ||
|
|
f43b90da38 | ||
|
|
1f11cd09d5 | ||
|
|
82e9faf2a9 | ||
|
|
7caa28a6aa | ||
|
|
0183bdad04 | ||
|
|
d31f07bd4b | ||
|
|
979ca23f1e | ||
|
|
9b5f182642 | ||
|
|
f00d136ab1 | ||
|
|
28c50c16cd | ||
|
|
5bd50a2d90 | ||
|
|
60e6284f30 | ||
|
|
67c59645ec | ||
|
|
5ec5b1cbd6 | ||
|
|
76217939e0 | ||
|
|
206ec36c8e | ||
|
|
3b7a445cd7 | ||
|
|
b9d8e59bbf | ||
|
|
6d0ea26c2d | ||
|
|
92c7bd02fb | ||
|
|
497ff1ecd6 | ||
|
|
22b0039ad4 | ||
|
|
b90e431fc7 | ||
|
|
9bd76f2972 | ||
|
|
f0d70d4e86 | ||
|
|
6b9906687b | ||
|
|
bc2e9dbaf2 | ||
|
|
4d73d99ebc | ||
|
|
a3ad84feef | ||
|
|
f9a8efb992 | ||
|
|
42eb8c8e3b | ||
|
|
7f240aea1e | ||
|
|
c19fc00b04 | ||
|
|
ee07c3f7cf | ||
|
|
724b0a0162 | ||
|
|
ef6b8bee07 | ||
|
|
b29834ab02 | ||
|
|
89b88917a8 | ||
|
|
93fc957036 | ||
|
|
164318bd97 | ||
|
|
fc61c8809b | ||
|
|
365c169b43 | ||
|
|
214a8b4597 | ||
|
|
d2ff536a3b | ||
|
|
8d920dd09b | ||
|
|
c88d89d26e | ||
|
|
4035bf3259 | ||
|
|
65cb318cd9 | ||
|
|
30b9a4d6b4 | ||
|
|
df3c925b3c | ||
|
|
86b906d015 | ||
|
|
b1019a88ba | ||
|
|
8e69b9cb26 | ||
|
|
9f1ae4084d | ||
|
|
2c362badd4 | ||
|
|
6b1420a58a | ||
|
|
1cda39d5bb | ||
|
|
32552fede5 | ||
|
|
6c3829c2b5 | ||
|
|
ea044adf1a | ||
|
|
47f38d2316 | ||
|
|
f944ff233d | ||
|
|
a27857e938 | ||
|
|
0cda2d5193 | ||
|
|
65fa26e93e | ||
|
|
5d4f2f1528 | ||
|
|
f8d0b7d651 | ||
|
|
7895376821 | ||
|
|
aca501df8c | ||
|
|
06ec9e2e1a | ||
|
|
f9e28285ac | ||
|
|
90a8aa1444 | ||
|
|
9a39548367 | ||
|
|
db5df028b3 | ||
|
|
7a8094a9c0 | ||
|
|
10b12cc86e | ||
|
|
9b2044351f | ||
|
|
86b33c4922 | ||
|
|
97260d09a8 | ||
|
|
c4e1a01349 | ||
|
|
f148ae58c3 | ||
|
|
bd55b9cc0f | ||
|
|
77dbad72f7 | ||
|
|
75fe948bf7 | ||
|
|
a73905401a | ||
|
|
8e5b33d359 | ||
|
|
4ba6387980 | ||
|
|
b19726db6c | ||
|
|
c48c6d188c | ||
|
|
f6e0e1f5d7 | ||
|
|
20031a1008 | ||
|
|
a933cb31d4 | ||
|
|
2868676693 | ||
|
|
366724f6bf | ||
|
|
c59a9720fd | ||
|
|
2dde1d70ec | ||
|
|
1d248cce30 | ||
|
|
c33654c21a | ||
|
|
5721ff3837 | ||
|
|
e215c9a84f | ||
|
|
e5cdf486aa | ||
|
|
820d8a920b | ||
|
|
0f6af98d09 | ||
|
|
6424c5b698 | ||
|
|
eed6e04ed1 | ||
|
|
9ebf1fd3b7 | ||
|
|
fb12a82d65 | ||
|
|
c8cdc80fd6 | ||
|
|
33cb3d713c | ||
|
|
0addefad05 | ||
|
|
3bb89bb155 | ||
|
|
9d6caa4e5f | ||
|
|
12472a44d4 | ||
|
|
cbbb6447bf | ||
|
|
154a8bb466 | ||
|
|
d1be82d97c | ||
|
|
8e2a3c7279 | ||
|
|
ebe2f704d1 | ||
|
|
63c27766ef | ||
|
|
6912f65cd7 | ||
|
|
28f5b55643 | ||
|
|
c1fee78e85 | ||
|
|
d6f0bf9eef | ||
|
|
bcc0ca93d4 | ||
|
|
eb2a8fe8b8 | ||
|
|
13358c29b8 | ||
|
|
aaee2786a7 | ||
|
|
9d69b38583 | ||
|
|
69ba485415 | ||
|
|
91e88196c7 | ||
|
|
035933f806 | ||
|
|
1163fdfa11 | ||
|
|
0a27e81704 | ||
|
|
c4af909ac8 | ||
|
|
f099861245 | ||
|
|
f214940c96 | ||
|
|
26a0efae23 | ||
|
|
e237c1d07d | ||
|
|
33be32f278 | ||
|
|
297186b834 | ||
|
|
5696ee8421 | ||
|
|
d8a0efa6af | ||
|
|
b52dfbe510 | ||
|
|
b87cd8c58b | ||
|
|
318669327e | ||
|
|
278d93a3ee | ||
|
|
b55fb4f2f6 | ||
|
|
1cd8351054 | ||
|
|
631a835e07 | ||
|
|
45cf32afc5 | ||
|
|
cde3d38766 | ||
|
|
d5029958b9 | ||
|
|
bddd5f2b98 | ||
|
|
96898c1794 | ||
|
|
11afcbff69 | ||
|
|
736b386554 | ||
|
|
a785522194 | ||
|
|
8e50e256e6 | ||
|
|
9b3287b865 | ||
|
|
14657bd29a | ||
|
|
6af8a34d91 | ||
|
|
6f93c01af9 | ||
|
|
12e9f3d010 | ||
|
|
c691d619c2 | ||
|
|
61f5ca6b16 | ||
|
|
443bbe6a78 | ||
|
|
183c81b5ec | ||
|
|
076f13cc01 | ||
|
|
8eb717d4d0 | ||
|
|
8aa190606e | ||
|
|
0437abbffb | ||
|
|
0b1d09ff4f | ||
|
|
8b75736c6f | ||
|
|
099d7ff2ad | ||
|
|
46d431e7c3 | ||
|
|
615fd498bc | ||
|
|
bc879a1453 | ||
|
|
82fd83fd12 | ||
|
|
b50da63852 | ||
|
|
5bc14e2fe4 | ||
|
|
d2b1210376 | ||
|
|
a27cdf16f4 | ||
|
|
5a13c49492 | ||
|
|
8493979d86 | ||
|
|
2c472a66d1 | ||
|
|
69bd803a32 | ||
|
|
b7de864f2e | ||
|
|
da9707950e | ||
|
|
36f03a7f4a | ||
|
|
5d18dc358b | ||
|
|
b40e599866 | ||
|
|
45029117f5 | ||
|
|
578ece8dd0 | ||
|
|
896e1a30b0 | ||
|
|
0f1d2c127c | ||
|
|
d880a5ec0c | ||
|
|
145e301269 | ||
|
|
c4172934e5 | ||
|
|
40dac4cde4 | ||
|
|
05b58501f2 | ||
|
|
29c17c14f1 | ||
|
|
f4ed37ec6f | ||
|
|
e9006f904c | ||
|
|
e301bc2d77 | ||
|
|
3578e1d4a7 | ||
|
|
aa46e5c5e7 | ||
|
|
9786202b08 | ||
|
|
52ba413185 | ||
|
|
1d13d106dd | ||
|
|
ab06fca4be | ||
|
|
fd9e226b79 | ||
|
|
7d2f0d7b1b | ||
|
|
870f7bcc93 | ||
|
|
543fc6702f | ||
|
|
5080b63435 | ||
|
|
8bb36f4650 | ||
|
|
a47b829040 | ||
|
|
07632b7d69 | ||
|
|
ec54e35757 | ||
|
|
68e36226b3 | ||
|
|
15b86a6b9b | ||
|
|
eeb0900291 | ||
|
|
804a7875a2 | ||
|
|
041585a78e | ||
|
|
cd1f604ffe | ||
|
|
566f7f638a | ||
|
|
3e07c5bf82 | ||
|
|
ca16119adb | ||
|
|
d0b9b10ee0 | ||
|
|
98fd364672 | ||
|
|
151fad1f2b | ||
|
|
27373919f4 | ||
|
|
22e6fb7056 | ||
|
|
e3258b78e2 | ||
|
|
bee170570d | ||
|
|
ba73e75ef9 | ||
|
|
f4b7e1a570 | ||
|
|
fa50341a71 | ||
|
|
fa76057e7f | ||
|
|
bb454b1846 | ||
|
|
778d9b0cd6 | ||
|
|
84ace27872 | ||
|
|
c1d8eeb70a | ||
|
|
6cf87e1d23 | ||
|
|
8a93581c8a | ||
|
|
6c8fa83ecd | ||
|
|
ab45133ab4 | ||
|
|
7b6d642300 | ||
|
|
96a286dcf5 | ||
|
|
420de7ad5e | ||
|
|
8ccdd3bdb4 | ||
|
|
23913f26cd | ||
|
|
9714612999 | ||
|
|
69cdcea9fc | ||
|
|
30ec69c7d3 | ||
|
|
f720c67f3e | ||
|
|
655bb526f4 | ||
|
|
5c26972cdd | ||
|
|
117f208826 | ||
|
|
5f798d944e | ||
|
|
6b927229f5 | ||
|
|
ffad18e424 | ||
|
|
e0eaed5fdb | ||
|
|
5bd638d4a5 | ||
|
|
eca1c96412 | ||
|
|
2f5686ca48 | ||
|
|
4fa4340b95 | ||
|
|
197542c7ec | ||
|
|
ab507f83e2 | ||
|
|
d67004a3be | ||
|
|
c8acc373c1 | ||
|
|
3d1c481f0b | ||
|
|
756db8174a | ||
|
|
fa67b46c04 | ||
|
|
4d656963e4 | ||
|
|
9259d028ac | ||
|
|
52fcb0b4b9 | ||
|
|
d7d759b43f | ||
|
|
ba3fd63e29 | ||
|
|
948b5a8be7 | ||
|
|
e42eeec8f6 | ||
|
|
118285e6ba | ||
|
|
ba4d93027f | ||
|
|
fb0c431864 | ||
|
|
9c8ba42750 | ||
|
|
f9675bd2b4 | ||
|
|
cb40b3517a | ||
|
|
0a020dbcc8 | ||
|
|
ac97a7f70e | ||
|
|
e02b95741b | ||
|
|
bbd990f2cc | ||
|
|
a0b5605db8 | ||
|
|
3ba9b26310 | ||
|
|
6c43ec2d2b | ||
|
|
9b9eb23b6d | ||
|
|
8b16e5f27d | ||
|
|
5292476841 | ||
|
|
1db0334787 | ||
|
|
6e2ba111af | ||
|
|
5f1d3ad754 | ||
|
|
46f471c89f | ||
|
|
0dd9c14ff8 | ||
|
|
0709918bd8 | ||
|
|
8e5167d726 | ||
|
|
8c3ffa3907 | ||
|
|
8540871ebc | ||
|
|
23837e4352 | ||
|
|
3cab24fbcf | ||
|
|
755df5f659 | ||
|
|
936411e4d1 | ||
|
|
21317be493 | ||
|
|
41c00e87d4 | ||
|
|
2863a3291a | ||
|
|
8adad36a66 | ||
|
|
b701f8a878 | ||
|
|
63e73f29cc | ||
|
|
7fcf153ada | ||
|
|
0443d36abf | ||
|
|
df2ad89518 | ||
|
|
10dc2b30fb | ||
|
|
f9087d14a3 | ||
|
|
25cf3757b2 | ||
|
|
72ef6f637e | ||
|
|
9cadaf824b | ||
|
|
1cc1b93e65 | ||
|
|
c4f400acd0 | ||
|
|
ac628c9b0a | ||
|
|
926830e0df | ||
|
|
9696ed31a4 | ||
|
|
c8895dd43b | ||
|
|
5dd1d354f8 | ||
|
|
a0da6bcf43 | ||
|
|
1b63f8d6b9 | ||
|
|
60932d2bd7 | ||
|
|
ee2d9d973a | ||
|
|
0e6f7a21c6 | ||
|
|
cc47ff7c4c | ||
|
|
e1a495ee30 | ||
|
|
6495007924 | ||
|
|
d53a6cd851 | ||
|
|
b6c12d2aa3 | ||
|
|
7a14171be4 | ||
|
|
5194505407 | ||
|
|
3e7957512b | ||
|
|
c0bd96d9b3 | ||
|
|
0f7728f84d | ||
|
|
c129b3852b | ||
|
|
3b43c69df4 | ||
|
|
b17d3e7ad7 | ||
|
|
6a16075912 | ||
|
|
43ebec2be1 | ||
|
|
f60227f112 | ||
|
|
f3630e95d6 | ||
|
|
8887105ffd | ||
|
|
1d7408a7b8 | ||
|
|
0b1ab41a95 | ||
|
|
b717b6505b | ||
|
|
b29d609b0b | ||
|
|
8a3c777c40 | ||
|
|
548da26ddc | ||
|
|
8e0ac70c4d | ||
|
|
1ed559bd24 | ||
|
|
e3b831e975 | ||
|
|
d05e3adbc7 | ||
|
|
a9a475ad50 | ||
|
|
d38b465b7c | ||
|
|
fd7ec2da91 | ||
|
|
c9ed379e39 | ||
|
|
e64feefc61 | ||
|
|
3e754382af | ||
|
|
7ef0a13250 | ||
|
|
0de3fb786d | ||
|
|
1d44a98f2f | ||
|
|
98ff4eb4ee | ||
|
|
a9d8df83d2 | ||
|
|
508b7b5e51 | ||
|
|
f7dc72f8aa | ||
|
|
0190f9b077 | ||
|
|
0c91a0d59d | ||
|
|
a26a66a8c4 | ||
|
|
100345f1e4 | ||
|
|
4535166a3b | ||
|
|
0346e68deb | ||
|
|
db62c227c8 | ||
|
|
983e45ae92 | ||
|
|
0a18dda158 | ||
|
|
9eaf93d41d | ||
|
|
2ac20982e0 | ||
|
|
96eac87d47 | ||
|
|
0cf1ed544c | ||
|
|
558e284e25 | ||
|
|
5c31445117 | ||
|
|
717ae67995 | ||
|
|
e8331f0c1d | ||
|
|
c009aa3a22 | ||
|
|
9af9d8f5d0 | ||
|
|
2c027b03db | ||
|
|
aef1332e42 | ||
|
|
16fc8b5fc2 | ||
|
|
fd845f27f5 | ||
|
|
ea62ee4b61 | ||
|
|
cd6becd442 | ||
|
|
829f262c79 | ||
|
|
246520b5cb | ||
|
|
38bb649582 | ||
|
|
82855a04ec | ||
|
|
6dfefaf229 | ||
|
|
d44f8a854b | ||
|
|
acf3a43095 | ||
|
|
4cc98d7add | ||
|
|
506203345b | ||
|
|
c259f7c8bd | ||
|
|
c62a121cca | ||
|
|
136eb32389 | ||
|
|
e3ddbe8c6b | ||
|
|
d085139057 | ||
|
|
28e7443f9b | ||
|
|
e79ad21aeb | ||
|
|
0b61253931 | ||
|
|
a2738dec59 | ||
|
|
1788709e2d | ||
|
|
47d30d12cb | ||
|
|
43df78102c | ||
|
|
cc10eec6c6 | ||
|
|
15bf9a7026 | ||
|
|
2795f44f03 | ||
|
|
b0ba05c9ac | ||
|
|
71c6845a94 | ||
|
|
4b97023251 | ||
|
|
369046bbb4 | ||
|
|
38580fbee7 | ||
|
|
08e1d40d6e | ||
|
|
80f35467d8 | ||
|
|
1b19020bf4 | ||
|
|
61e58ee9b7 | ||
|
|
f21af8da9c | ||
|
|
dece3a3600 | ||
|
|
16ad10e62f | ||
|
|
02fb912a95 | ||
|
|
48790c0751 | ||
|
|
c57e5083e8 | ||
|
|
c9a2058361 | ||
|
|
7039dfafd6 | ||
|
|
22ae83a589 | ||
|
|
1575448b1a | ||
|
|
9f031a6759 | ||
|
|
d0ea6f9920 | ||
|
|
1bc37d576c | ||
|
|
d159591b9a | ||
|
|
57550b2b3d | ||
|
|
d15d6c4e6b | ||
|
|
6b598f61a6 | ||
|
|
9e21204f8b | ||
|
|
e6b86fa304 | ||
|
|
268e50dfbd | ||
|
|
07ccc15fc2 | ||
|
|
2b500d72e5 | ||
|
|
cd0014b24f | ||
|
|
b3786d84c5 | ||
|
|
fd1135c7af | ||
|
|
f0678979b1 | ||
|
|
f4a7e11bce | ||
|
|
6a0388bb4b | ||
|
|
7ba72f2763 | ||
|
|
f7147d9c0a | ||
|
|
523a5fd2e5 | ||
|
|
ff85e2343c | ||
|
|
e74668ef7f | ||
|
|
22502f80db | ||
|
|
4b2cc38aba | ||
|
|
a8eb68142e | ||
|
|
81554fbf72 | ||
|
|
a435cfcd82 | ||
|
|
7631918a12 | ||
|
|
e070f1e525 | ||
|
|
430d6e1cca | ||
|
|
3a0562bebc | ||
|
|
c3658e7c79 | ||
|
|
b0f81c3253 | ||
|
|
31c171fc1e | ||
|
|
e9c123b1b9 | ||
|
|
037b259197 | ||
|
|
a569961e0f | ||
|
|
7eabde6aee | ||
|
|
ed772da0cc | ||
|
|
f48882213e | ||
|
|
1cd2076d42 | ||
|
|
816b9c8d71 |
13
.gitignore
vendored
@@ -4,13 +4,16 @@
|
||||
*bak*
|
||||
tags
|
||||
*.vim
|
||||
*.orig
|
||||
*.rej
|
||||
|
||||
## Non-static Minetest directories
|
||||
/bin/
|
||||
/games/*
|
||||
!/games/minimal/
|
||||
/cache/
|
||||
/textures/
|
||||
/textures/*
|
||||
!/textures/base/
|
||||
/sounds/
|
||||
/mods/*
|
||||
!/mods/minetest/
|
||||
@@ -36,6 +39,14 @@ src/jthread/cmake_install.cmake
|
||||
src/jthread/libjthread.a
|
||||
src/lua/build/
|
||||
src/lua/CMakeFiles/
|
||||
src/cguittfont/CMakeFiles/
|
||||
src/cguittfont/libcguittfont.a
|
||||
src/cguittfont/cmake_install.cmake
|
||||
src/cguittfont/Makefile
|
||||
src/json/CMakeFiles/
|
||||
src/json/libjsoncpp.a
|
||||
src/sqlite/CMakeFiles/*
|
||||
src/sqlite/libsqlite3.a
|
||||
CMakeCache.txt
|
||||
CPackConfig.cmake
|
||||
CPackSourceConfig.cmake
|
||||
|
||||
10
.travis.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
language: cpp
|
||||
compiler:
|
||||
- gcc
|
||||
- clang
|
||||
before_install:
|
||||
- if [ $CC = "clang" ]; then export PATH="/usr/bin/:$PATH"; sudo sh -c 'echo "deb http://ppa.launchpad.net/eudoxos/llvm-3.1/ubuntu precise main" >> /etc/apt/sources.list'; sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 92DE8183; sudo apt-get update; sudo apt-get install llvm-3.1; sudo apt-get install clang; fi
|
||||
- sudo apt-get install libirrlicht-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev
|
||||
script: cmake . && make
|
||||
notifications:
|
||||
email: false
|
||||
@@ -12,7 +12,7 @@ set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string")
|
||||
# Also remember to set PROTOCOL_VERSION in clientserver.h when releasing
|
||||
set(VERSION_MAJOR 0)
|
||||
set(VERSION_MINOR 4)
|
||||
set(VERSION_PATCH dev-20120603)
|
||||
set(VERSION_PATCH 6)
|
||||
if(VERSION_EXTRA)
|
||||
set(VERSION_PATCH ${VERSION_PATCH}-${VERSION_EXTRA})
|
||||
endif()
|
||||
@@ -62,7 +62,7 @@ if(WIN32)
|
||||
elseif(APPLE)
|
||||
# Random placeholders; this isn't usually used and may not work
|
||||
# See https://github.com/toabi/minetest-mac/
|
||||
set(SHAREDIR "share/${PROJECT_NAME}")
|
||||
set(SHAREDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}")
|
||||
set(BINDIR "bin")
|
||||
set(DOCDIR "share/doc/${PROJECT_NAME}")
|
||||
set(EXAMPLE_CONF_DIR ${DOCDIR})
|
||||
@@ -78,19 +78,66 @@ elseif(UNIX) # Linux, BSD etc
|
||||
set(ICONDIR "unix/icons")
|
||||
set(LOCALEDIR "locale")
|
||||
else()
|
||||
set(SHAREDIR "share/${PROJECT_NAME}")
|
||||
set(BINDIR "bin")
|
||||
set(DOCDIR "share/doc/${PROJECT_NAME}")
|
||||
set(MANDIR "share/man")
|
||||
set(SHAREDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}")
|
||||
set(BINDIR "${CMAKE_INSTALL_PREFIX}/bin")
|
||||
set(DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}")
|
||||
set(MANDIR "${CMAKE_INSTALL_PREFIX}/share/man")
|
||||
set(EXAMPLE_CONF_DIR ${DOCDIR})
|
||||
set(XDG_APPS_DIR "share/applications")
|
||||
set(ICONDIR "share/icons")
|
||||
set(LOCALEDIR "share/locale")
|
||||
set(XDG_APPS_DIR "${CMAKE_INSTALL_PREFIX}/share/applications")
|
||||
set(ICONDIR "${CMAKE_INSTALL_PREFIX}/share/icons")
|
||||
set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/locale")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CUSTOM_SHAREDIR "" CACHE STRING "Directory to install data files into")
|
||||
if(NOT CUSTOM_SHAREDIR STREQUAL "")
|
||||
set(SHAREDIR "${CUSTOM_SHAREDIR}")
|
||||
message(STATUS "Using SHAREDIR=${SHAREDIR}")
|
||||
endif()
|
||||
set(CUSTOM_BINDIR "" CACHE STRING "Directory to install binaries into")
|
||||
if(NOT CUSTOM_BINDIR STREQUAL "")
|
||||
set(BINDIR "${CUSTOM_BINDIR}")
|
||||
message(STATUS "Using BINDIR=${BINDIR}")
|
||||
endif()
|
||||
set(CUSTOM_DOCDIR "" CACHE STRING "Directory to install documentation into")
|
||||
if(NOT CUSTOM_DOCDIR STREQUAL "")
|
||||
set(DOCDIR "${CUSTOM_DOCDIR}")
|
||||
message(STATUS "Using DOCDIR=${DOCDIR}")
|
||||
endif()
|
||||
set(CUSTOM_MANDIR "" CACHE STRING "Directory to install manpages into")
|
||||
if(NOT CUSTOM_MANDIR STREQUAL "")
|
||||
set(MANDIR "${CUSTOM_MANDIR}")
|
||||
message(STATUS "Using MANDIR=${MANDIR}")
|
||||
endif()
|
||||
set(CUSTOM_EXAMPLE_CONF_DIR "" CACHE STRING "Directory to install example config file into")
|
||||
if(NOT CUSTOM_EXAMPLE_CONF_DIR STREQUAL "")
|
||||
set(EXAMPLE_CONF_DIR "${CUSTOM_EXAMPLE_CONF_DIR}")
|
||||
message(STATUS "Using EXAMPLE_CONF_DIR=${EXAMPLE_CONF_DIR}")
|
||||
endif()
|
||||
set(CUSTOM_XDG_APPS_DIR "" CACHE STRING "Directory to install .desktop files into")
|
||||
if(NOT CUSTOM_XDG_APPS_DIR STREQUAL "")
|
||||
set(XDG_APPS_DIR "${CUSTOM_XDG_APPS_DIR}")
|
||||
message(STATUS "Using XDG_APPS_DIR=${XDG_APPS_DIR}")
|
||||
endif()
|
||||
set(CUSTOM_ICONDIR "" CACHE STRING "Directory to install icons into")
|
||||
if(NOT CUSTOM_ICONDIR STREQUAL "")
|
||||
set(ICONDIR "${CUSTOM_ICONDIR}")
|
||||
message(STATUS "Using ICONDIR=${ICONDIR}")
|
||||
endif()
|
||||
set(CUSTOM_LOCALEDIR "" CACHE STRING "Directory to install l10n files into")
|
||||
if(NOT CUSTOM_LOCALEDIR STREQUAL "")
|
||||
set(LOCALEDIR "${CUSTOM_LOCALEDIR}")
|
||||
message(STATUS "Using LOCALEDIR=${LOCALEDIR}")
|
||||
endif()
|
||||
|
||||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/builtin" DESTINATION "${SHAREDIR}")
|
||||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/client" DESTINATION "${SHAREDIR}")
|
||||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/games/minimal" DESTINATION "${SHAREDIR}/games")
|
||||
set(COMMON_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/games/common")
|
||||
if(EXISTS ${COMMON_SOURCE} AND IS_DIRECTORY ${COMMON_SOURCE})
|
||||
install(FILES ${COMMON_SOURCE}/README.txt DESTINATION "${SHAREDIR}/games/common/")
|
||||
install(DIRECTORY ${COMMON_SOURCE}/mods DESTINATION "${SHAREDIR}/games/common")
|
||||
endif()
|
||||
set(MINETEST_GAME_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/games/minetest_game")
|
||||
if(EXISTS ${MINETEST_GAME_SOURCE} AND IS_DIRECTORY ${MINETEST_GAME_SOURCE})
|
||||
install(FILES ${MINETEST_GAME_SOURCE}/game.conf DESTINATION "${SHAREDIR}/games/minetest_game/")
|
||||
@@ -106,6 +153,8 @@ if(RUN_IN_PLACE)
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/textures/all/textures_here.txt" DESTINATION "${SHAREDIR}/textures/all")
|
||||
endif()
|
||||
|
||||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/fonts" DESTINATION "${SHAREDIR}")
|
||||
|
||||
install(FILES "README.txt" DESTINATION "${DOCDIR}")
|
||||
install(FILES "doc/lua_api.txt" DESTINATION "${DOCDIR}")
|
||||
install(FILES "doc/mapformat.txt" DESTINATION "${DOCDIR}")
|
||||
|
||||
76
README.txt
@@ -1,24 +1,26 @@
|
||||
Minetest-c55
|
||||
Minetest
|
||||
============
|
||||
|
||||
An InfiniMiner/Minecraft inspired game.
|
||||
|
||||
Copyright (c) 2010-2012 Perttu Ahola <celeron55@gmail.com>
|
||||
and ther contributors (see source file comments and the version control log)
|
||||
Copyright (c) 2010-2013 Perttu Ahola <celeron55@gmail.com>
|
||||
and contributors (see source file comments and the version control log)
|
||||
|
||||
In case you downloaded the source code:
|
||||
---------------------------------------
|
||||
If you downloaded the Minetest Engine source code in which this file is
|
||||
contained, you probably want to download the minetest_game project too:
|
||||
https://github.com/celeron55/minetest_game/
|
||||
See the README.txt in it.
|
||||
contained, you probably want to download these projects too:
|
||||
https://github.com/minetest/common/
|
||||
https://github.com/minetest/minetest_game/
|
||||
See the README.txt in them.
|
||||
|
||||
Further documentation
|
||||
----------------------
|
||||
- Website: http://c55.me/minetest/
|
||||
- Wiki: http://c55.me/minetest/wiki/
|
||||
- Forum: http://c55.me/minetest/forum/
|
||||
- Github: https://github.com/celeron55/minetest/
|
||||
- Website: http://minetest.net/
|
||||
- Wiki: http://wiki.minetest.com/
|
||||
- Developer wiki: http://dev.minetest.net/
|
||||
- Forum: http://forum.minetest.net/
|
||||
- Github: https://github.com/minetest/minetest/
|
||||
- doc/ directory of source distribution
|
||||
|
||||
This game is not finished
|
||||
@@ -40,7 +42,7 @@ Default Controls
|
||||
Paths
|
||||
------
|
||||
$bin - Compiled binaries
|
||||
$share - Cistributed read-only data
|
||||
$share - Distributed read-only data
|
||||
$user - User-created modifiable data
|
||||
|
||||
Windows .zip / RUN_IN_PLACE source:
|
||||
@@ -79,18 +81,25 @@ Compiling on GNU/Linux:
|
||||
-----------------------
|
||||
|
||||
Install dependencies. Here's an example for Debian/Ubuntu:
|
||||
$ apt-get install build-essential libirrlicht-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev
|
||||
$ apt-get install build-essential libirrlicht-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev
|
||||
|
||||
Download source, extract (this is the URL to the latest of source repository, which might not work at all times):
|
||||
$ wget https://github.com/celeron55/minetest/tarball/master -O master.tar.gz
|
||||
$ wget https://github.com/minetest/minetest/tarball/master -O master.tar.gz
|
||||
$ tar xf master.tar.gz
|
||||
$ cd celeron55-minetest-286edd4 (or similar)
|
||||
$ cd minetest-minetest-286edd4 (or similar)
|
||||
|
||||
Download common (needed for minetest_game and some others)
|
||||
$ cd games/
|
||||
$ wget https://github.com/minetest/common/tarball/master -O common.tar.gz
|
||||
$ tar xf common.tar.gz
|
||||
$ mv minetest-common-* common
|
||||
$ cd ..
|
||||
|
||||
Download minetest_game (otherwise only the "Minimal development test" game is available)
|
||||
$ cd games/
|
||||
$ wget https://github.com/celeron55/minetest_game/tarball/master -O master.tar.gz
|
||||
$ tar xf master.tar.gz
|
||||
$ mv celeron55-minetest_game-* minetest_game
|
||||
$ wget https://github.com/minetest/minetest_game/tarball/master -O minetest_game.tar.gz
|
||||
$ tar xf minetest_game.tar.gz
|
||||
$ mv minetest-minetest_game-* minetest_game
|
||||
$ cd ..
|
||||
|
||||
Build a version that runs directly from the source directory:
|
||||
@@ -106,11 +115,12 @@ $ ./minetest
|
||||
- You can build a bare server or a bare client by specifying -DBUILD_CLIENT=0 or -DBUILD_SERVER=0
|
||||
- You can select between Release and Debug build by -DCMAKE_BUILD_TYPE=<Debug or Release>
|
||||
- Debug build is slower, but gives much more useful output in a debugger
|
||||
- If you build a bare server, you don't need to have Irrlicht installed. In that case use -DIRRLICHT_SOURCE_DIR=/the/irrlicht/source
|
||||
|
||||
Compiling on Windows:
|
||||
---------------------
|
||||
- This section is outdated. In addition to what is described here:
|
||||
- In addition to minetest, you need to download minetest_game.
|
||||
- In addition to minetest, you need to download common and minetest_game.
|
||||
- If you wish to have sound support, you need libogg, libvorbis and libopenal
|
||||
|
||||
- You need:
|
||||
@@ -125,11 +135,11 @@ Compiling on Windows:
|
||||
http://www.winimage.com/zLibDll/index.html
|
||||
* Zlib library (zlibwapi.lib and zlibwapi.dll from zlib125dll.zip):
|
||||
http://www.winimage.com/zLibDll/index.html
|
||||
* Optional: gettext bibrary and tools:
|
||||
* Optional: gettext library and tools:
|
||||
http://gnuwin32.sourceforge.net/downlinks/gettext.php
|
||||
- This is used for other UI languages. Feel free to leave it out.
|
||||
* And, of course, Minetest-c55:
|
||||
http://c55.me/minetest/download
|
||||
* And, of course, Minetest:
|
||||
http://minetest.net/download.php
|
||||
- Steps:
|
||||
- Select a directory called DIR hereafter in which you will operate.
|
||||
- Make sure you have CMake and a compiler installed.
|
||||
@@ -244,24 +254,24 @@ popd
|
||||
echo Failed.
|
||||
exit /b 1
|
||||
|
||||
License of Minetest-c55 textures and sounds
|
||||
-------------------------------------------
|
||||
License of Minetest textures and sounds
|
||||
---------------------------------------
|
||||
|
||||
This applies to textures and sounds contained in the main Minetest
|
||||
distribution.
|
||||
|
||||
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
||||
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
||||
http://creativecommons.org/licenses/by-sa/3.0/
|
||||
|
||||
License of Minetest-c55 source code
|
||||
-----------------------------------
|
||||
License of Minetest source code
|
||||
-------------------------------
|
||||
|
||||
Minetest-c55
|
||||
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Minetest
|
||||
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
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,
|
||||
@@ -269,7 +279,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
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.
|
||||
|
||||
@@ -371,4 +381,8 @@ DejaVu Sans Mono:
|
||||
|
||||
Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved.
|
||||
|
||||
Liberation Fonts Copyright:
|
||||
|
||||
Copyright (c) 2007 Red Hat, Inc. All rights reserved. LIBERATION is a trademark of Red Hat, Inc.
|
||||
|
||||
|
||||
|
||||
@@ -8,8 +8,10 @@
|
||||
-- Initialize some very basic things
|
||||
print = minetest.debug
|
||||
math.randomseed(os.time())
|
||||
os.setlocale("C", "numeric")
|
||||
|
||||
-- Load other files
|
||||
dofile(minetest.get_modpath("__builtin").."/serialize.lua")
|
||||
dofile(minetest.get_modpath("__builtin").."/misc_helpers.lua")
|
||||
dofile(minetest.get_modpath("__builtin").."/item.lua")
|
||||
dofile(minetest.get_modpath("__builtin").."/misc_register.lua")
|
||||
@@ -20,4 +22,6 @@ dofile(minetest.get_modpath("__builtin").."/privileges.lua")
|
||||
dofile(minetest.get_modpath("__builtin").."/auth.lua")
|
||||
dofile(minetest.get_modpath("__builtin").."/chatcommands.lua")
|
||||
dofile(minetest.get_modpath("__builtin").."/static_spawn.lua")
|
||||
dofile(minetest.get_modpath("__builtin").."/detached_inventory.lua")
|
||||
dofile(minetest.get_modpath("__builtin").."/falling.lua")
|
||||
|
||||
|
||||
@@ -20,18 +20,13 @@ minetest.register_on_chat_message(function(name, message)
|
||||
end
|
||||
local cmd_def = minetest.chatcommands[cmd]
|
||||
if cmd_def then
|
||||
if not cmd_def.func then
|
||||
-- This is a C++ command
|
||||
return false
|
||||
local has_privs, missing_privs = minetest.check_player_privs(name, cmd_def.privs)
|
||||
if has_privs then
|
||||
cmd_def.func(name, param)
|
||||
else
|
||||
local has_privs, missing_privs = minetest.check_player_privs(name, cmd_def.privs)
|
||||
if has_privs then
|
||||
cmd_def.func(name, param)
|
||||
else
|
||||
minetest.chat_send_player(name, "You don't have permission to run this command (missing privileges: "..table.concat(missing_privs, ", ")..")")
|
||||
end
|
||||
return true -- handled chat message
|
||||
minetest.chat_send_player(name, "You don't have permission to run this command (missing privileges: "..table.concat(missing_privs, ", ")..")")
|
||||
end
|
||||
return true -- handled chat message
|
||||
end
|
||||
return false
|
||||
end)
|
||||
@@ -39,17 +34,15 @@ end)
|
||||
--
|
||||
-- Chat commands
|
||||
--
|
||||
minetest.register_chatcommand("me", {
|
||||
params = "<action>",
|
||||
description = "chat action (eg. /me orders a pizza)",
|
||||
privs = {shout=true},
|
||||
func = function(name, param)
|
||||
minetest.chat_send_all("* " .. name .. " " .. param)
|
||||
end,
|
||||
})
|
||||
|
||||
-- Register C++ commands without functions
|
||||
minetest.register_chatcommand("me", {params = nil, description = "chat action (eg. /me orders a pizza)"})
|
||||
minetest.register_chatcommand("status", {description = "print server status line"})
|
||||
minetest.register_chatcommand("shutdown", {params = "", description = "shutdown server", privs = {server=true}})
|
||||
minetest.register_chatcommand("clearobjects", {params = "", description = "clear all objects in world", privs = {server=true}})
|
||||
minetest.register_chatcommand("time", {params = "<0...24000>", description = "set time of day", privs = {settime=true}})
|
||||
minetest.register_chatcommand("ban", {params = "<name>", description = "ban IP of player", privs = {ban=true}})
|
||||
minetest.register_chatcommand("unban", {params = "<name/ip>", description = "remove IP ban", privs = {ban=true}})
|
||||
|
||||
-- Register other commands
|
||||
minetest.register_chatcommand("help", {
|
||||
privs = {},
|
||||
params = "(nothing)/all/privs/<cmd>",
|
||||
@@ -123,6 +116,9 @@ minetest.register_chatcommand("grant", {
|
||||
if not grantname or not grantprivstr then
|
||||
minetest.chat_send_player(name, "Invalid parameters (see /help grant)")
|
||||
return
|
||||
elseif not minetest.auth_table[grantname] then
|
||||
minetest.chat_send_player(name, "Player "..grantname.." does not exist.")
|
||||
return
|
||||
end
|
||||
local grantprivs = minetest.string_to_privs(grantprivstr)
|
||||
if grantprivstr == "all" then
|
||||
@@ -145,6 +141,7 @@ minetest.register_chatcommand("grant", {
|
||||
return
|
||||
end
|
||||
minetest.set_player_privs(grantname, privs)
|
||||
minetest.log(name..' granted ('..minetest.privs_to_string(grantprivs, ', ')..') privileges to '..grantname)
|
||||
minetest.chat_send_player(name, "Privileges of "..grantname..": "..minetest.privs_to_string(minetest.get_player_privs(grantname), ' '))
|
||||
if grantname ~= name then
|
||||
minetest.chat_send_player(grantname, name.." granted you privileges: "..minetest.privs_to_string(grantprivs, ' '))
|
||||
@@ -165,6 +162,9 @@ minetest.register_chatcommand("revoke", {
|
||||
if not revokename or not revokeprivstr then
|
||||
minetest.chat_send_player(name, "Invalid parameters (see /help revoke)")
|
||||
return
|
||||
elseif not minetest.auth_table[revokename] then
|
||||
minetest.chat_send_player(name, "Player "..revokename.." does not exist.")
|
||||
return
|
||||
end
|
||||
local revokeprivs = minetest.string_to_privs(revokeprivstr)
|
||||
local privs = minetest.get_player_privs(revokename)
|
||||
@@ -182,6 +182,7 @@ minetest.register_chatcommand("revoke", {
|
||||
end
|
||||
end
|
||||
minetest.set_player_privs(revokename, privs)
|
||||
minetest.log(name..' revoked ('..minetest.privs_to_string(revokeprivs, ', ')..') privileges from '..revokename)
|
||||
minetest.chat_send_player(name, "Privileges of "..revokename..": "..minetest.privs_to_string(minetest.get_player_privs(revokename), ' '))
|
||||
if revokename ~= name then
|
||||
minetest.chat_send_player(revokename, name.." revoked privileges from you: "..minetest.privs_to_string(revokeprivs, ' '))
|
||||
@@ -193,12 +194,27 @@ minetest.register_chatcommand("setpassword", {
|
||||
description = "set given password",
|
||||
privs = {password=true},
|
||||
func = function(name, param)
|
||||
if param == "" then
|
||||
minetest.chat_send_player(name, "Password field required")
|
||||
local toname, raw_password = string.match(param, "^([^ ]+) +(.+)$")
|
||||
if not toname then
|
||||
toname = string.match(param, "^([^ ]+) *$")
|
||||
raw_password = nil
|
||||
end
|
||||
if not toname then
|
||||
minetest.chat_send_player(name, "Name field required")
|
||||
return
|
||||
end
|
||||
minetest.set_player_password(name, param)
|
||||
minetest.chat_send_player(name, "Password set")
|
||||
local actstr = "?"
|
||||
if not raw_password then
|
||||
minetest.set_player_password(toname, "")
|
||||
actstr = "cleared"
|
||||
else
|
||||
minetest.set_player_password(toname, minetest.get_password_hash(toname, raw_password))
|
||||
actstr = "set"
|
||||
end
|
||||
minetest.chat_send_player(name, "Password of player \""..toname.."\" "..actstr)
|
||||
if toname ~= name then
|
||||
minetest.chat_send_player(toname, "Your password was "..actstr.." by "..name)
|
||||
end
|
||||
end,
|
||||
})
|
||||
minetest.register_chatcommand("clearpassword", {
|
||||
@@ -206,8 +222,13 @@ minetest.register_chatcommand("clearpassword", {
|
||||
description = "set empty password",
|
||||
privs = {password=true},
|
||||
func = function(name, param)
|
||||
minetest.set_player_password(name, '')
|
||||
minetest.chat_send_player(name, "Password cleared")
|
||||
toname = param
|
||||
if toname == "" then
|
||||
minetest.chat_send_player(name, "Name field required")
|
||||
return
|
||||
end
|
||||
minetest.set_player_password(toname, '')
|
||||
minetest.chat_send_player(name, "Password of player \""..toname.."\" cleared")
|
||||
end,
|
||||
})
|
||||
|
||||
@@ -351,3 +372,296 @@ minetest.register_chatcommand("set", {
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_chatcommand("mods", {
|
||||
params = "",
|
||||
description = "lists mods installed on the server",
|
||||
privs = {},
|
||||
func = function(name, param)
|
||||
local response = ""
|
||||
local modnames = minetest.get_modnames()
|
||||
for i, mod in ipairs(modnames) do
|
||||
response = response .. mod
|
||||
-- Add space if not at the end
|
||||
if i ~= #modnames then
|
||||
response = response .. " "
|
||||
end
|
||||
end
|
||||
minetest.chat_send_player(name, response)
|
||||
end,
|
||||
})
|
||||
|
||||
local function handle_give_command(cmd, giver, receiver, stackstring)
|
||||
minetest.log("action", giver.." invoked "..cmd..', stackstring="'
|
||||
..stackstring..'"')
|
||||
minetest.log(cmd..' invoked, stackstring="'..stackstring..'"')
|
||||
local itemstack = ItemStack(stackstring)
|
||||
if itemstack:is_empty() then
|
||||
minetest.chat_send_player(giver, 'error: cannot give an empty item')
|
||||
return
|
||||
elseif not itemstack:is_known() then
|
||||
minetest.chat_send_player(giver, 'error: cannot give an unknown item')
|
||||
return
|
||||
end
|
||||
local receiverref = minetest.env:get_player_by_name(receiver)
|
||||
if receiverref == nil then
|
||||
minetest.chat_send_player(giver, receiver..' is not a known player')
|
||||
return
|
||||
end
|
||||
local leftover = receiverref:get_inventory():add_item("main", itemstack)
|
||||
if leftover:is_empty() then
|
||||
partiality = ""
|
||||
elseif leftover:get_count() == itemstack:get_count() then
|
||||
partiality = "could not be "
|
||||
else
|
||||
partiality = "partially "
|
||||
end
|
||||
-- The actual item stack string may be different from what the "giver"
|
||||
-- entered (e.g. big numbers are always interpreted as 2^16-1).
|
||||
stackstring = itemstack:to_string()
|
||||
if giver == receiver then
|
||||
minetest.chat_send_player(giver, '"'..stackstring
|
||||
..'" '..partiality..'added to inventory.');
|
||||
else
|
||||
minetest.chat_send_player(giver, '"'..stackstring
|
||||
..'" '..partiality..'added to '..receiver..'\'s inventory.');
|
||||
minetest.chat_send_player(receiver, '"'..stackstring
|
||||
..'" '..partiality..'added to inventory.');
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_chatcommand("give", {
|
||||
params = "<name> <itemstring>",
|
||||
description = "give item to player",
|
||||
privs = {give=true},
|
||||
func = function(name, param)
|
||||
local toname, itemstring = string.match(param, "^([^ ]+) +(.+)$")
|
||||
if not toname or not itemstring then
|
||||
minetest.chat_send_player(name, "name and itemstring required")
|
||||
return
|
||||
end
|
||||
handle_give_command("/give", name, toname, itemstring)
|
||||
end,
|
||||
})
|
||||
minetest.register_chatcommand("giveme", {
|
||||
params = "<itemstring>",
|
||||
description = "give item to yourself",
|
||||
privs = {give=true},
|
||||
func = function(name, param)
|
||||
local itemstring = string.match(param, "(.+)$")
|
||||
if not itemstring then
|
||||
minetest.chat_send_player(name, "itemstring required")
|
||||
return
|
||||
end
|
||||
handle_give_command("/giveme", name, name, itemstring)
|
||||
end,
|
||||
})
|
||||
minetest.register_chatcommand("spawnentity", {
|
||||
params = "<entityname>",
|
||||
description = "spawn entity at your position",
|
||||
privs = {give=true, interact=true},
|
||||
func = function(name, param)
|
||||
local entityname = string.match(param, "(.+)$")
|
||||
if not entityname then
|
||||
minetest.chat_send_player(name, "entityname required")
|
||||
return
|
||||
end
|
||||
print('/spawnentity invoked, entityname="'..entityname..'"')
|
||||
local player = minetest.env:get_player_by_name(name)
|
||||
if player == nil then
|
||||
print("Unable to spawn entity, player is nil")
|
||||
return true -- Handled chat message
|
||||
end
|
||||
local p = player:getpos()
|
||||
p.y = p.y + 1
|
||||
minetest.env:add_entity(p, entityname)
|
||||
minetest.chat_send_player(name, '"'..entityname
|
||||
..'" spawned.');
|
||||
end,
|
||||
})
|
||||
minetest.register_chatcommand("pulverize", {
|
||||
params = "",
|
||||
description = "delete item in hand",
|
||||
privs = {},
|
||||
func = function(name, param)
|
||||
local player = minetest.env:get_player_by_name(name)
|
||||
if player == nil then
|
||||
print("Unable to pulverize, player is nil")
|
||||
return true -- Handled chat message
|
||||
end
|
||||
if player:get_wielded_item():is_empty() then
|
||||
minetest.chat_send_player(name, 'Unable to pulverize, no item in hand.')
|
||||
else
|
||||
player:set_wielded_item(nil)
|
||||
minetest.chat_send_player(name, 'An item was pulverized.')
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- Key = player name
|
||||
minetest.rollback_punch_callbacks = {}
|
||||
|
||||
minetest.register_on_punchnode(function(pos, node, puncher)
|
||||
local name = puncher:get_player_name()
|
||||
if minetest.rollback_punch_callbacks[name] then
|
||||
minetest.rollback_punch_callbacks[name](pos, node, puncher)
|
||||
minetest.rollback_punch_callbacks[name] = nil
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_chatcommand("rollback_check", {
|
||||
params = "[<range>] [<seconds>]",
|
||||
description = "check who has last touched a node or near it, "..
|
||||
"max. <seconds> ago (default range=0, seconds=86400=24h)",
|
||||
privs = {rollback=true},
|
||||
func = function(name, param)
|
||||
local range, seconds = string.match(param, "(%d+) *(%d*)")
|
||||
range = tonumber(range) or 0
|
||||
seconds = tonumber(seconds) or 86400
|
||||
minetest.chat_send_player(name, "Punch a node (limits set: range="..
|
||||
dump(range).." seconds="..dump(seconds).."s)")
|
||||
minetest.rollback_punch_callbacks[name] = function(pos, node, puncher)
|
||||
local name = puncher:get_player_name()
|
||||
minetest.chat_send_player(name, "Checking...")
|
||||
local actor, act_p, act_seconds =
|
||||
minetest.rollback_get_last_node_actor(pos, range, seconds)
|
||||
if actor == "" then
|
||||
minetest.chat_send_player(name, "Nobody has touched the "..
|
||||
"specified location in "..dump(seconds).." seconds")
|
||||
return
|
||||
end
|
||||
local nodedesc = "this node"
|
||||
if act_p.x ~= pos.x or act_p.y ~= pos.y or act_p.z ~= pos.z then
|
||||
nodedesc = minetest.pos_to_string(act_p)
|
||||
end
|
||||
local nodename = minetest.env:get_node(act_p).name
|
||||
minetest.chat_send_player(name, "Last actor on "..nodedesc..
|
||||
" was "..actor..", "..dump(act_seconds)..
|
||||
"s ago (node is now "..nodename..")")
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_chatcommand("rollback", {
|
||||
params = "<player name> [<seconds>] | :<actor> [<seconds>]",
|
||||
description = "revert actions of a player; default for <seconds> is 60",
|
||||
privs = {rollback=true},
|
||||
func = function(name, param)
|
||||
local target_name, seconds = string.match(param, ":([^ ]+) *(%d*)")
|
||||
if not target_name then
|
||||
local player_name = nil;
|
||||
player_name, seconds = string.match(param, "([^ ]+) *(%d*)")
|
||||
if not player_name then
|
||||
minetest.chat_send_player(name, "Invalid parameters. See /help rollback and /help rollback_check")
|
||||
return
|
||||
end
|
||||
target_name = "player:"..player_name
|
||||
end
|
||||
seconds = tonumber(seconds) or 60
|
||||
minetest.chat_send_player(name, "Reverting actions of "..
|
||||
dump(target_name).." since "..dump(seconds).." seconds.")
|
||||
local success, log = minetest.rollback_revert_actions_by(
|
||||
target_name, seconds)
|
||||
if #log > 10 then
|
||||
minetest.chat_send_player(name, "(log is too long to show)")
|
||||
else
|
||||
for _,line in ipairs(log) do
|
||||
minetest.chat_send_player(name, line)
|
||||
end
|
||||
end
|
||||
if success then
|
||||
minetest.chat_send_player(name, "Reverting actions succeeded.")
|
||||
else
|
||||
minetest.chat_send_player(name, "Reverting actions FAILED.")
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_chatcommand("status", {
|
||||
params = "",
|
||||
description = "print server status line",
|
||||
privs = {},
|
||||
func = function(name, param)
|
||||
minetest.chat_send_player(name, minetest.get_server_status())
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_chatcommand("time", {
|
||||
params = "<0...24000>",
|
||||
description = "set time of day",
|
||||
privs = {settime=true},
|
||||
func = function(name, param)
|
||||
if param == "" then
|
||||
minetest.chat_send_player(name, "Missing parameter")
|
||||
return
|
||||
end
|
||||
local newtime = tonumber(param)
|
||||
if newtime == nil then
|
||||
minetest.chat_send_player(name, "Invalid time")
|
||||
else
|
||||
minetest.env:set_timeofday((newtime % 24000) / 24000)
|
||||
minetest.chat_send_player(name, "Time of day changed.")
|
||||
minetest.log("action", name .. " sets time " .. newtime)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_chatcommand("shutdown", {
|
||||
params = "",
|
||||
description = "shutdown server",
|
||||
privs = {server=true},
|
||||
func = function(name, param)
|
||||
minetest.log("action", name .. " shuts down server")
|
||||
minetest.request_shutdown()
|
||||
minetest.chat_send_all("*** Server shutting down (operator request).")
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_chatcommand("ban", {
|
||||
params = "<name>",
|
||||
description = "ban IP of player",
|
||||
privs = {ban=true},
|
||||
func = function(name, param)
|
||||
if param == "" then
|
||||
minetest.chat_send_player(name, "Ban list: " .. minetest.get_ban_list())
|
||||
return
|
||||
end
|
||||
if not minetest.env:get_player_by_name(param) then
|
||||
minetest.chat_send_player(name, "No such player")
|
||||
return
|
||||
end
|
||||
if not minetest.ban_player(param) then
|
||||
minetest.chat_send_player(name, "Failed to ban player")
|
||||
else
|
||||
local desc = minetest.get_ban_description(param)
|
||||
minetest.chat_send_player(name, "Banned " .. desc .. ".")
|
||||
minetest.log("action", name .. " bans " .. desc .. ".")
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_chatcommand("unban", {
|
||||
params = "<name/ip>",
|
||||
description = "remove IP ban",
|
||||
privs = {ban=true},
|
||||
func = function(name, param)
|
||||
if not minetest.unban_player_or_ip(param) then
|
||||
minetest.chat_send_player(name, "Failed to unban player/IP")
|
||||
else
|
||||
minetest.chat_send_player(name, "Unbanned " .. param)
|
||||
minetest.log("action", name .. " unbans " .. param)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_chatcommand("clearobjects", {
|
||||
params = "",
|
||||
description = "clear all objects in world",
|
||||
privs = {server=true},
|
||||
func = function(name, param)
|
||||
minetest.log("action", name .. " clears all objects")
|
||||
minetest.chat_send_all("Clearing all objects. This may take long. You may experience a timeout. (by " .. name .. ")")
|
||||
minetest.env:clear_objects()
|
||||
minetest.log("action", "object clearing done")
|
||||
minetest.chat_send_all("*** Cleared all objects.")
|
||||
end,
|
||||
})
|
||||
|
||||
@@ -16,4 +16,11 @@ minetest.digprop_woodlike = digprop_err
|
||||
minetest.digprop_leaveslike = digprop_err
|
||||
minetest.digprop_glasslike = digprop_err
|
||||
|
||||
minetest.node_metadata_inventory_move_allow_all = function()
|
||||
minetest.log("info", "WARNING: minetest.node_metadata_inventory_move_allow_all is obsolete and does nothing.")
|
||||
end
|
||||
|
||||
minetest.add_to_creative_inventory = function(itemstring)
|
||||
minetest.log('info', "WARNING: minetest.add_to_creative_inventory: This function is deprecated and does nothing.")
|
||||
end
|
||||
|
||||
|
||||
19
builtin/detached_inventory.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
-- Minetest: builtin/detached_inventory.lua
|
||||
|
||||
minetest.detached_inventories = {}
|
||||
|
||||
function minetest.create_detached_inventory(name, callbacks)
|
||||
local stuff = {}
|
||||
stuff.name = name
|
||||
if callbacks then
|
||||
stuff.allow_move = callbacks.allow_move
|
||||
stuff.allow_put = callbacks.allow_put
|
||||
stuff.allow_take = callbacks.allow_take
|
||||
stuff.on_move = callbacks.on_move
|
||||
stuff.on_put = callbacks.on_put
|
||||
stuff.on_take = callbacks.on_take
|
||||
end
|
||||
minetest.detached_inventories[name] = stuff
|
||||
return minetest.create_detached_inventory_raw(name)
|
||||
end
|
||||
|
||||
196
builtin/falling.lua
Normal file
@@ -0,0 +1,196 @@
|
||||
-- Minetest: builtin/item.lua
|
||||
|
||||
--
|
||||
-- Falling stuff
|
||||
--
|
||||
|
||||
minetest.register_entity("__builtin:falling_node", {
|
||||
initial_properties = {
|
||||
physical = true,
|
||||
collisionbox = {-0.5,-0.5,-0.5, 0.5,0.5,0.5},
|
||||
visual = "wielditem",
|
||||
textures = {},
|
||||
visual_size = {x=0.667, y=0.667},
|
||||
},
|
||||
|
||||
nodename = "",
|
||||
|
||||
set_node = function(self, nodename)
|
||||
self.nodename = nodename
|
||||
local stack = ItemStack(nodename)
|
||||
local itemtable = stack:to_table()
|
||||
local itemname = nil
|
||||
if itemtable then
|
||||
itemname = stack:to_table().name
|
||||
end
|
||||
local item_texture = nil
|
||||
local item_type = ""
|
||||
if minetest.registered_items[itemname] then
|
||||
item_texture = minetest.registered_items[itemname].inventory_image
|
||||
item_type = minetest.registered_items[itemname].type
|
||||
end
|
||||
prop = {
|
||||
is_visible = true,
|
||||
textures = {nodename},
|
||||
}
|
||||
self.object:set_properties(prop)
|
||||
end,
|
||||
|
||||
get_staticdata = function(self)
|
||||
return self.nodename
|
||||
end,
|
||||
|
||||
on_activate = function(self, staticdata)
|
||||
self.nodename = staticdata
|
||||
self.object:set_armor_groups({immortal=1})
|
||||
--self.object:setacceleration({x=0, y=-10, z=0})
|
||||
self:set_node(self.nodename)
|
||||
end,
|
||||
|
||||
on_step = function(self, dtime)
|
||||
-- Set gravity
|
||||
self.object:setacceleration({x=0, y=-10, z=0})
|
||||
-- Turn to actual sand when collides to ground or just move
|
||||
local pos = self.object:getpos()
|
||||
local bcp = {x=pos.x, y=pos.y-0.7, z=pos.z} -- Position of bottom center point
|
||||
local bcn = minetest.env:get_node(bcp)
|
||||
-- Note: walkable is in the node definition, not in item groups
|
||||
if minetest.registered_nodes[bcn.name] and
|
||||
minetest.registered_nodes[bcn.name].walkable then
|
||||
if minetest.registered_nodes[bcn.name].buildable_to then
|
||||
minetest.env:remove_node(bcp)
|
||||
return
|
||||
end
|
||||
local np = {x=bcp.x, y=bcp.y+1, z=bcp.z}
|
||||
-- Check what's here
|
||||
local n2 = minetest.env:get_node(np)
|
||||
-- If it's not air or liquid, remove node and replace it with
|
||||
-- it's drops
|
||||
if n2.name ~= "air" and (not minetest.registered_nodes[n2.name] or
|
||||
minetest.registered_nodes[n2.name].liquidtype == "none") then
|
||||
local drops = minetest.get_node_drops(n2.name, "")
|
||||
minetest.env:remove_node(np)
|
||||
-- Add dropped items
|
||||
local _, dropped_item
|
||||
for _, dropped_item in ipairs(drops) do
|
||||
minetest.env:add_item(np, dropped_item)
|
||||
end
|
||||
-- Run script hook
|
||||
local _, callback
|
||||
for _, callback in ipairs(minetest.registered_on_dignodes) do
|
||||
callback(np, n2, nil)
|
||||
end
|
||||
end
|
||||
-- Create node and remove entity
|
||||
minetest.env:add_node(np, {name=self.nodename})
|
||||
self.object:remove()
|
||||
nodeupdate(np)
|
||||
else
|
||||
-- Do nothing
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
function spawn_falling_node(p, nodename)
|
||||
obj = minetest.env:add_entity(p, "__builtin:falling_node")
|
||||
obj:get_luaentity():set_node(nodename)
|
||||
end
|
||||
|
||||
function drop_attached_node(p)
|
||||
local nn = minetest.env:get_node(p).name
|
||||
minetest.env:remove_node(p)
|
||||
for _,item in ipairs(minetest.get_node_drops(nn, "")) do
|
||||
local pos = {
|
||||
x = p.x + math.random()/2 - 0.25,
|
||||
y = p.y + math.random()/2 - 0.25,
|
||||
z = p.z + math.random()/2 - 0.25,
|
||||
}
|
||||
minetest.env:add_item(pos, item)
|
||||
end
|
||||
end
|
||||
|
||||
function check_attached_node(p, n)
|
||||
local def = minetest.registered_nodes[n.name]
|
||||
local d = {x=0, y=0, z=0}
|
||||
if def.paramtype2 == "wallmounted" then
|
||||
if n.param2 == 0 then
|
||||
d.y = 1
|
||||
elseif n.param2 == 1 then
|
||||
d.y = -1
|
||||
elseif n.param2 == 2 then
|
||||
d.x = 1
|
||||
elseif n.param2 == 3 then
|
||||
d.x = -1
|
||||
elseif n.param2 == 4 then
|
||||
d.z = 1
|
||||
elseif n.param2 == 5 then
|
||||
d.z = -1
|
||||
end
|
||||
else
|
||||
d.y = -1
|
||||
end
|
||||
local p2 = {x=p.x+d.x, y=p.y+d.y, z=p.z+d.z}
|
||||
local nn = minetest.env:get_node(p2).name
|
||||
local def2 = minetest.registered_nodes[nn]
|
||||
if def2 and not def2.walkable then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
--
|
||||
-- Some common functions
|
||||
--
|
||||
|
||||
function nodeupdate_single(p)
|
||||
n = minetest.env:get_node(p)
|
||||
if minetest.get_node_group(n.name, "falling_node") ~= 0 then
|
||||
p_bottom = {x=p.x, y=p.y-1, z=p.z}
|
||||
n_bottom = minetest.env:get_node(p_bottom)
|
||||
-- Note: walkable is in the node definition, not in item groups
|
||||
if minetest.registered_nodes[n_bottom.name] and
|
||||
(not minetest.registered_nodes[n_bottom.name].walkable or
|
||||
minetest.registered_nodes[n_bottom.name].buildable_to) then
|
||||
minetest.env:remove_node(p)
|
||||
spawn_falling_node(p, n.name)
|
||||
nodeupdate(p)
|
||||
end
|
||||
end
|
||||
|
||||
if minetest.get_node_group(n.name, "attached_node") ~= 0 then
|
||||
if not check_attached_node(p, n) then
|
||||
drop_attached_node(p)
|
||||
nodeupdate(p)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function nodeupdate(p)
|
||||
-- Round p to prevent falling entities to get stuck
|
||||
p.x = math.floor(p.x+0.5)
|
||||
p.y = math.floor(p.y+0.5)
|
||||
p.z = math.floor(p.z+0.5)
|
||||
|
||||
for x = -1,1 do
|
||||
for y = -1,1 do
|
||||
for z = -1,1 do
|
||||
p2 = {x=p.x+x, y=p.y+y, z=p.z+z}
|
||||
nodeupdate_single(p2)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--
|
||||
-- Global callbacks
|
||||
--
|
||||
|
||||
function on_placenode(p, node)
|
||||
nodeupdate(p)
|
||||
end
|
||||
minetest.register_on_placenode(on_placenode)
|
||||
|
||||
function on_dignode(p, node)
|
||||
nodeupdate(p)
|
||||
end
|
||||
minetest.register_on_dignode(on_dignode)
|
||||
262
builtin/item.lua
@@ -76,10 +76,10 @@ function minetest.get_node_drops(nodename, toolname)
|
||||
local drop = ItemStack({name=nodename}):get_definition().drop
|
||||
if drop == nil then
|
||||
-- default drop
|
||||
return {ItemStack({name=nodename})}
|
||||
return {nodename}
|
||||
elseif type(drop) == "string" then
|
||||
-- itemstring drop
|
||||
return {ItemStack(drop)}
|
||||
return {drop}
|
||||
elseif drop.items == nil then
|
||||
-- drop = {} to disable default drop
|
||||
return {}
|
||||
@@ -124,51 +124,105 @@ end
|
||||
function minetest.item_place_node(itemstack, placer, pointed_thing)
|
||||
local item = itemstack:peek_item()
|
||||
local def = itemstack:get_definition()
|
||||
if def.type == "node" and pointed_thing.type == "node" then
|
||||
local pos = pointed_thing.above
|
||||
local oldnode = minetest.env:get_node(pos)
|
||||
local olddef = ItemStack({name=oldnode.name}):get_definition()
|
||||
if def.type ~= "node" or pointed_thing.type ~= "node" then
|
||||
return itemstack
|
||||
end
|
||||
|
||||
if not olddef.buildable_to then
|
||||
minetest.log("info", placer:get_player_name() .. " tried to place"
|
||||
.. " node in invalid position " .. minetest.pos_to_string(pos)
|
||||
.. ", replacing " .. oldnode.name)
|
||||
return
|
||||
end
|
||||
local under = pointed_thing.under
|
||||
local oldnode_under = minetest.env:get_node_or_nil(under)
|
||||
local above = pointed_thing.above
|
||||
local oldnode_above = minetest.env:get_node_or_nil(above)
|
||||
|
||||
minetest.log("action", placer:get_player_name() .. " places node "
|
||||
.. def.name .. " at " .. minetest.pos_to_string(pos))
|
||||
if not oldnode_under or not oldnode_above then
|
||||
minetest.log("info", placer:get_player_name() .. " tried to place"
|
||||
.. " node in unloaded position " .. minetest.pos_to_string(above))
|
||||
return itemstack
|
||||
end
|
||||
|
||||
local newnode = {name = def.name, param1 = 0, param2 = 0}
|
||||
local olddef_under = ItemStack({name=oldnode_under.name}):get_definition()
|
||||
olddef_under = olddef_under or minetest.nodedef_default
|
||||
local olddef_above = ItemStack({name=oldnode_above.name}):get_definition()
|
||||
olddef_above = olddef_above or minetest.nodedef_default
|
||||
|
||||
-- Calculate direction for wall mounted stuff like torches and signs
|
||||
if def.paramtype2 == 'wallmounted' then
|
||||
local under = pointed_thing.under
|
||||
local above = pointed_thing.above
|
||||
local dir = {x = under.x - above.x, y = under.y - above.y, z = under.z - above.z}
|
||||
newnode.param2 = minetest.dir_to_wallmounted(dir)
|
||||
-- Calculate the direction for furnaces and chests and stuff
|
||||
elseif def.paramtype2 == 'facedir' then
|
||||
local playerpos = placer:getpos()
|
||||
local dir = {x = pos.x - playerpos.x, y = pos.y - playerpos.y, z = pos.z - playerpos.z}
|
||||
if not olddef_above.buildable_to and not olddef_under.buildable_to then
|
||||
minetest.log("info", placer:get_player_name() .. " tried to place"
|
||||
.. " node in invalid position " .. minetest.pos_to_string(above)
|
||||
.. ", replacing " .. oldnode_above.name)
|
||||
return itemstack
|
||||
end
|
||||
|
||||
-- Place above pointed node
|
||||
local place_to = {x = above.x, y = above.y, z = above.z}
|
||||
|
||||
-- If node under is buildable_to, place into it instead (eg. snow)
|
||||
if olddef_under.buildable_to then
|
||||
minetest.log("info", "node under is buildable to")
|
||||
place_to = {x = under.x, y = under.y, z = under.z}
|
||||
end
|
||||
|
||||
minetest.log("action", placer:get_player_name() .. " places node "
|
||||
.. def.name .. " at " .. minetest.pos_to_string(place_to))
|
||||
|
||||
local oldnode = minetest.env:get_node(place_to)
|
||||
local newnode = {name = def.name, param1 = 0, param2 = 0}
|
||||
|
||||
-- Calculate direction for wall mounted stuff like torches and signs
|
||||
if def.paramtype2 == 'wallmounted' then
|
||||
local dir = {
|
||||
x = under.x - above.x,
|
||||
y = under.y - above.y,
|
||||
z = under.z - above.z
|
||||
}
|
||||
newnode.param2 = minetest.dir_to_wallmounted(dir)
|
||||
-- Calculate the direction for furnaces and chests and stuff
|
||||
elseif def.paramtype2 == 'facedir' then
|
||||
local placer_pos = placer:getpos()
|
||||
if placer_pos then
|
||||
local dir = {
|
||||
x = above.x - placer_pos.x,
|
||||
y = above.y - placer_pos.y,
|
||||
z = above.z - placer_pos.z
|
||||
}
|
||||
newnode.param2 = minetest.dir_to_facedir(dir)
|
||||
minetest.log("action", "facedir: " .. newnode.param2)
|
||||
end
|
||||
end
|
||||
|
||||
-- Add node and update
|
||||
minetest.env:add_node(pos, newnode)
|
||||
-- Check if the node is attached and if it can be placed there
|
||||
if minetest.get_item_group(def.name, "attached_node") ~= 0 and
|
||||
not check_attached_node(place_to, newnode) then
|
||||
minetest.log("action", "attached node " .. def.name ..
|
||||
" can not be placed at " .. minetest.pos_to_string(place_to))
|
||||
return itemstack
|
||||
end
|
||||
|
||||
-- Run callback
|
||||
if def.after_place_node then
|
||||
def.after_place_node(pos, placer)
|
||||
-- Add node and update
|
||||
minetest.env:add_node(place_to, newnode)
|
||||
|
||||
local take_item = true
|
||||
|
||||
-- Run callback
|
||||
if def.after_place_node then
|
||||
-- Copy place_to because callback can modify it
|
||||
local place_to_copy = {x=place_to.x, y=place_to.y, z=place_to.z}
|
||||
if def.after_place_node(place_to_copy, placer, itemstack) then
|
||||
take_item = false
|
||||
end
|
||||
end
|
||||
|
||||
-- Run script hook (deprecated)
|
||||
local _, callback
|
||||
for _, callback in ipairs(minetest.registered_on_placenodes) do
|
||||
callback(pos, newnode, placer)
|
||||
-- Run script hook
|
||||
local _, callback
|
||||
for _, callback in ipairs(minetest.registered_on_placenodes) do
|
||||
-- Copy pos and node because callback can modify them
|
||||
local place_to_copy = {x=place_to.x, y=place_to.y, z=place_to.z}
|
||||
local newnode_copy = {name=newnode.name, param1=newnode.param1, param2=newnode.param2}
|
||||
local oldnode_copy = {name=oldnode.name, param1=oldnode.param1, param2=oldnode.param2}
|
||||
if callback(place_to_copy, newnode_copy, placer, oldnode_copy, itemstack) then
|
||||
take_item = false
|
||||
end
|
||||
end
|
||||
|
||||
if take_item then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
@@ -184,11 +238,20 @@ function minetest.item_place_object(itemstack, placer, pointed_thing)
|
||||
end
|
||||
|
||||
function minetest.item_place(itemstack, placer, pointed_thing)
|
||||
-- Call on_rightclick if the pointed node defines it
|
||||
if pointed_thing.type == "node" and placer and
|
||||
not placer:get_player_control().sneak then
|
||||
local n = minetest.env:get_node(pointed_thing.under)
|
||||
local nn = n.name
|
||||
if minetest.registered_nodes[nn] and minetest.registered_nodes[nn].on_rightclick then
|
||||
return minetest.registered_nodes[nn].on_rightclick(pointed_thing.under, n, placer, itemstack) or itemstack
|
||||
end
|
||||
end
|
||||
|
||||
if itemstack:get_definition().type == "node" then
|
||||
return minetest.item_place_node(itemstack, placer, pointed_thing)
|
||||
else
|
||||
return minetest.item_place_object(itemstack, placer, pointed_thing)
|
||||
end
|
||||
return itemstack
|
||||
end
|
||||
|
||||
function minetest.item_drop(itemstack, dropper, pos)
|
||||
@@ -196,14 +259,16 @@ function minetest.item_drop(itemstack, dropper, pos)
|
||||
local v = dropper:get_look_dir()
|
||||
local p = {x=pos.x+v.x, y=pos.y+1.5+v.y, z=pos.z+v.z}
|
||||
local obj = minetest.env:add_item(p, itemstack)
|
||||
v.x = v.x*2
|
||||
v.y = v.y*2 + 1
|
||||
v.z = v.z*2
|
||||
obj:setvelocity(v)
|
||||
if obj then
|
||||
v.x = v.x*2
|
||||
v.y = v.y*2 + 1
|
||||
v.z = v.z*2
|
||||
obj:setvelocity(v)
|
||||
end
|
||||
else
|
||||
minetest.env:add_item(pos, itemstack)
|
||||
end
|
||||
return ""
|
||||
return ItemStack("")
|
||||
end
|
||||
|
||||
function minetest.item_eat(hp_change, replace_with_item)
|
||||
@@ -220,16 +285,37 @@ function minetest.node_punch(pos, node, puncher)
|
||||
-- Run script hook
|
||||
local _, callback
|
||||
for _, callback in ipairs(minetest.registered_on_punchnodes) do
|
||||
callback(pos, node, puncher)
|
||||
-- Copy pos and node because callback can modify them
|
||||
local pos_copy = {x=pos.x, y=pos.y, z=pos.z}
|
||||
local node_copy = {name=node.name, param1=node.param1, param2=node.param2}
|
||||
callback(pos_copy, node_copy, puncher)
|
||||
end
|
||||
end
|
||||
|
||||
function minetest.handle_node_drops(pos, drops, digger)
|
||||
-- Add dropped items to object's inventory
|
||||
if digger:get_inventory() then
|
||||
local _, dropped_item
|
||||
for _, dropped_item in ipairs(drops) do
|
||||
local left = digger:get_inventory():add_item("main", dropped_item)
|
||||
if not left:is_empty() then
|
||||
local p = {
|
||||
x = pos.x + math.random()/2-0.25,
|
||||
y = pos.y + math.random()/2-0.25,
|
||||
z = pos.z + math.random()/2-0.25,
|
||||
}
|
||||
minetest.env:add_item(p, left)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function minetest.node_dig(pos, node, digger)
|
||||
minetest.debug("node_dig")
|
||||
|
||||
local def = ItemStack({name=node.name}):get_definition()
|
||||
if not def.diggable or (def.can_dig and not def.can_dig(pos,digger)) then
|
||||
-- Check if def ~= 0 because we always want to be able to remove unknown nodes
|
||||
if #def ~= 0 and not def.diggable or (def.can_dig and not def.can_dig(pos,digger)) then
|
||||
minetest.debug("not diggable")
|
||||
minetest.log("info", digger:get_player_name() .. " tried to dig "
|
||||
.. node.name .. " which is not diggable "
|
||||
@@ -240,27 +326,20 @@ function minetest.node_dig(pos, node, digger)
|
||||
minetest.log('action', digger:get_player_name() .. " digs "
|
||||
.. node.name .. " at " .. minetest.pos_to_string(pos))
|
||||
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
local wielded = digger:get_wielded_item()
|
||||
local drops = minetest.get_node_drops(node.name, wielded:get_name())
|
||||
local wielded = digger:get_wielded_item()
|
||||
local drops = minetest.get_node_drops(node.name, wielded:get_name())
|
||||
|
||||
-- Wear out tool
|
||||
tp = wielded:get_tool_capabilities()
|
||||
dp = minetest.get_dig_params(def.groups, tp)
|
||||
wielded:add_wear(dp.wear)
|
||||
digger:set_wielded_item(wielded)
|
||||
|
||||
-- Add dropped items
|
||||
local _, dropped_item
|
||||
for _, dropped_item in ipairs(drops) do
|
||||
digger:get_inventory():add_item("main", dropped_item)
|
||||
end
|
||||
end
|
||||
-- Wear out tool
|
||||
local tp = wielded:get_tool_capabilities()
|
||||
local dp = minetest.get_dig_params(def.groups, tp)
|
||||
wielded:add_wear(dp.wear)
|
||||
digger:set_wielded_item(wielded)
|
||||
|
||||
local oldnode = nil
|
||||
-- Handle drops
|
||||
minetest.handle_node_drops(pos, drops, digger)
|
||||
|
||||
local oldmetadata = nil
|
||||
if def.after_dig_node then
|
||||
oldnode = node;
|
||||
oldmetadata = minetest.env:get_meta(pos):to_table()
|
||||
end
|
||||
|
||||
@@ -269,51 +348,22 @@ function minetest.node_dig(pos, node, digger)
|
||||
|
||||
-- Run callback
|
||||
if def.after_dig_node then
|
||||
def.after_dig_node(pos, oldnode, oldmetadata, digger)
|
||||
-- Copy pos and node because callback can modify them
|
||||
local pos_copy = {x=pos.x, y=pos.y, z=pos.z}
|
||||
local node_copy = {name=node.name, param1=node.param1, param2=node.param2}
|
||||
def.after_dig_node(pos_copy, node_copy, oldmetadata, digger)
|
||||
end
|
||||
|
||||
-- Run script hook (deprecated)
|
||||
-- Run script hook
|
||||
local _, callback
|
||||
for _, callback in ipairs(minetest.registered_on_dignodes) do
|
||||
callback(pos, node, digger)
|
||||
-- Copy pos and node because callback can modify them
|
||||
local pos_copy = {x=pos.x, y=pos.y, z=pos.z}
|
||||
local node_copy = {name=node.name, param1=node.param1, param2=node.param2}
|
||||
callback(pos_copy, node_copy, digger)
|
||||
end
|
||||
end
|
||||
|
||||
function minetest.node_metadata_inventory_move_allow_all(pos, from_list,
|
||||
from_index, to_list, to_index, count, player)
|
||||
minetest.log("verbose", "node_metadata_inventory_move_allow_all")
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
|
||||
local from_stack = inv:get_stack(from_list, from_index)
|
||||
local taken_items = from_stack:take_item(count)
|
||||
inv:set_stack(from_list, from_index, from_stack)
|
||||
|
||||
local to_stack = inv:get_stack(to_list, to_index)
|
||||
to_stack:add_item(taken_items)
|
||||
inv:set_stack(to_list, to_index, to_stack)
|
||||
end
|
||||
|
||||
function minetest.node_metadata_inventory_offer_allow_all(pos, listname, index, stack, player)
|
||||
minetest.log("verbose", "node_metadata_inventory_offer_allow_all")
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local the_stack = inv:get_stack(listname, index)
|
||||
the_stack:add_item(stack)
|
||||
inv:set_stack(listname, index, the_stack)
|
||||
return ItemStack("")
|
||||
end
|
||||
|
||||
function minetest.node_metadata_inventory_take_allow_all(pos, listname, index, count, player)
|
||||
minetest.log("verbose", "node_metadata_inventory_take_allow_all")
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local the_stack = inv:get_stack(listname, index)
|
||||
local taken_items = the_stack:take_item(count)
|
||||
inv:set_stack(listname, index, the_stack)
|
||||
return taken_items
|
||||
end
|
||||
|
||||
-- This is used to allow mods to redefine minetest.item_place and so on
|
||||
-- NOTE: This is not the preferred way. Preferred way is to provide enough
|
||||
-- callbacks to not require redefining global functions. -celeron55
|
||||
@@ -340,6 +390,7 @@ minetest.nodedef_default = {
|
||||
usable = false,
|
||||
liquids_pointable = false,
|
||||
tool_capabilities = nil,
|
||||
node_placement_prediction = nil,
|
||||
|
||||
-- Interaction callbacks
|
||||
on_place = redef_wrapper(minetest, 'item_place'), -- minetest.item_place
|
||||
@@ -348,6 +399,7 @@ minetest.nodedef_default = {
|
||||
can_dig = nil,
|
||||
|
||||
on_punch = redef_wrapper(minetest, 'node_punch'), -- minetest.node_punch
|
||||
on_rightclick = nil,
|
||||
on_dig = redef_wrapper(minetest, 'node_dig'), -- minetest.node_dig
|
||||
|
||||
on_receive_fields = nil,
|
||||
@@ -359,11 +411,13 @@ minetest.nodedef_default = {
|
||||
-- Node properties
|
||||
drawtype = "normal",
|
||||
visual_scale = 1.0,
|
||||
tile_images = {""},
|
||||
special_materials = {
|
||||
{image="", backface_culling=true},
|
||||
{image="", backface_culling=true},
|
||||
},
|
||||
-- Don't define these because otherwise the old tile_images and
|
||||
-- special_materials wouldn't be read
|
||||
--tiles ={""},
|
||||
--special_tiles = {
|
||||
-- {name="", backface_culling=true},
|
||||
-- {name="", backface_culling=true},
|
||||
--},
|
||||
alpha = 255,
|
||||
post_effect_color = {a=0, r=0, g=0, b=0},
|
||||
paramtype = "none",
|
||||
@@ -435,7 +489,7 @@ minetest.noneitemdef_default = { -- This is used for the hand and unknown items
|
||||
tool_capabilities = nil,
|
||||
|
||||
-- Interaction callbacks
|
||||
on_place = nil,
|
||||
on_place = redef_wrapper(minetest, 'item_place'),
|
||||
on_drop = nil,
|
||||
on_use = nil,
|
||||
}
|
||||
|
||||
@@ -57,11 +57,23 @@ minetest.register_entity("__builtin:item", {
|
||||
end,
|
||||
|
||||
get_staticdata = function(self)
|
||||
return self.itemstring
|
||||
--return self.itemstring
|
||||
return minetest.serialize({
|
||||
itemstring = self.itemstring,
|
||||
always_collect = self.always_collect,
|
||||
})
|
||||
end,
|
||||
|
||||
on_activate = function(self, staticdata)
|
||||
self.itemstring = staticdata
|
||||
if string.sub(staticdata, 1, string.len("return")) == "return" then
|
||||
local data = minetest.deserialize(staticdata)
|
||||
if data and type(data) == "table" then
|
||||
self.itemstring = data.itemstring
|
||||
self.always_collect = data.always_collect
|
||||
end
|
||||
else
|
||||
self.itemstring = staticdata
|
||||
end
|
||||
self.object:set_armor_groups({immortal=1})
|
||||
self.object:setvelocity({x=0, y=2, z=0})
|
||||
self.object:setacceleration({x=0, y=-10, z=0})
|
||||
@@ -72,7 +84,9 @@ minetest.register_entity("__builtin:item", {
|
||||
local p = self.object:getpos()
|
||||
p.y = p.y - 0.3
|
||||
local nn = minetest.env:get_node(p).name
|
||||
if minetest.registered_nodes[nn].walkable then
|
||||
-- If node is not registered or node is walkably solid and resting on nodebox
|
||||
local v = self.object:getvelocity()
|
||||
if not minetest.registered_nodes[nn] or minetest.registered_nodes[nn].walkable and v.y == 0 then
|
||||
if self.physical_state then
|
||||
self.object:setvelocity({x=0,y=0,z=0})
|
||||
self.object:setacceleration({x=0, y=0, z=0})
|
||||
@@ -95,7 +109,11 @@ minetest.register_entity("__builtin:item", {
|
||||
|
||||
on_punch = function(self, hitter)
|
||||
if self.itemstring ~= '' then
|
||||
hitter:get_inventory():add_item("main", self.itemstring)
|
||||
local left = hitter:get_inventory():add_item("main", self.itemstring)
|
||||
if not left:is_empty() then
|
||||
self.itemstring = left:to_string()
|
||||
return
|
||||
end
|
||||
end
|
||||
self.object:remove()
|
||||
end,
|
||||
|
||||
@@ -14,14 +14,14 @@ minetest.register_globalstep(function(dtime)
|
||||
for index, timer in ipairs(minetest.timers) do
|
||||
timer.time = timer.time - dtime
|
||||
if timer.time <= 0 then
|
||||
timer.func(timer.param)
|
||||
timer.func(unpack(timer.args or {}))
|
||||
table.remove(minetest.timers,index)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
function minetest.after(time, func, param)
|
||||
table.insert(minetest.timers_to_add, {time=time, func=func, param=param})
|
||||
function minetest.after(time, func, ...)
|
||||
table.insert(minetest.timers_to_add, {time=time, func=func, args={...}})
|
||||
end
|
||||
|
||||
function minetest.check_player_privs(name, privs)
|
||||
@@ -99,3 +99,10 @@ function minetest.setting_get_pos(name)
|
||||
return minetest.string_to_pos(value)
|
||||
end
|
||||
|
||||
function minetest.formspec_escape(str)
|
||||
str = string.gsub(str, "\\", "\\\\")
|
||||
str = string.gsub(str, "%[", "\\[")
|
||||
str = string.gsub(str, "%]", "\\]")
|
||||
return str
|
||||
end
|
||||
|
||||
|
||||
@@ -244,6 +244,7 @@ minetest.register_item(":unknown", {
|
||||
inventory_image = "unknown_item.png",
|
||||
on_place = minetest.item_place,
|
||||
on_drop = minetest.item_drop,
|
||||
groups = {not_in_creative_inventory=1},
|
||||
})
|
||||
|
||||
minetest.register_node(":air", {
|
||||
@@ -258,6 +259,8 @@ minetest.register_node(":air", {
|
||||
diggable = false,
|
||||
buildable_to = true,
|
||||
air_equivalent = true,
|
||||
drop = "",
|
||||
groups = {not_in_creative_inventory=1},
|
||||
})
|
||||
|
||||
minetest.register_node(":ignore", {
|
||||
@@ -272,23 +275,16 @@ minetest.register_node(":ignore", {
|
||||
diggable = false,
|
||||
buildable_to = true, -- A way to remove accidentally placed ignores
|
||||
air_equivalent = true,
|
||||
drop = "",
|
||||
groups = {not_in_creative_inventory=1},
|
||||
})
|
||||
|
||||
-- The hand (bare definition)
|
||||
minetest.register_item(":", {
|
||||
type = "none",
|
||||
groups = {not_in_creative_inventory=1},
|
||||
})
|
||||
|
||||
--
|
||||
-- Creative inventory
|
||||
--
|
||||
|
||||
minetest.creative_inventory = {}
|
||||
|
||||
minetest.add_to_creative_inventory = function(itemstring)
|
||||
table.insert(minetest.creative_inventory, itemstring)
|
||||
end
|
||||
|
||||
--
|
||||
-- Callback registration
|
||||
--
|
||||
@@ -299,26 +295,23 @@ local function make_registration()
|
||||
return t, registerfunc
|
||||
end
|
||||
|
||||
local function make_registration_reverse()
|
||||
local t = {}
|
||||
local registerfunc = function(func) table.insert(t, 1, func) end
|
||||
return t, registerfunc
|
||||
end
|
||||
|
||||
minetest.registered_on_chat_messages, minetest.register_on_chat_message = make_registration()
|
||||
minetest.registered_globalsteps, minetest.register_globalstep = make_registration()
|
||||
minetest.registered_on_shutdown, minetest.register_on_shutdown = make_registration()
|
||||
minetest.registered_on_punchnodes, minetest.register_on_punchnode = make_registration()
|
||||
minetest.registered_on_placenodes, minetest.register_on_placenode = make_registration()
|
||||
minetest.registered_on_dignodes, minetest.register_on_dignode = make_registration()
|
||||
minetest.registered_on_generateds, minetest.register_on_generated = make_registration()
|
||||
minetest.registered_on_newplayers, minetest.register_on_newplayer = make_registration()
|
||||
minetest.registered_on_dieplayers, minetest.register_on_dieplayer = make_registration()
|
||||
minetest.registered_on_respawnplayers, minetest.register_on_respawnplayer = make_registration()
|
||||
minetest.registered_on_joinplayers, minetest.register_on_joinplayer = make_registration()
|
||||
minetest.registered_on_leaveplayers, minetest.register_on_leaveplayer = make_registration()
|
||||
|
||||
minetest.registered_on_placenodes = {}
|
||||
minetest.register_on_placenode = function(callback)
|
||||
minetest.log("info", debug.traceback())
|
||||
minetest.log("info", "WARNING: minetest.register_on_placenode is deprecated. Use on_construct or after_place_node in node definition instead.")
|
||||
table.insert(minetest.registered_on_placenodes, callback)
|
||||
end
|
||||
minetest.registered_on_dignodes = {}
|
||||
minetest.register_on_dignode = function(callback)
|
||||
minetest.log("info", debug.traceback())
|
||||
minetest.log("info", "WARNING: minetest.register_on_dignode is deprecated. Use on_destruct or after_dig_node in node definition instead.")
|
||||
table.insert(minetest.registered_on_dignodes, callback)
|
||||
end
|
||||
minetest.registered_on_player_receive_fields, minetest.register_on_player_receive_fields = make_registration_reverse()
|
||||
|
||||
|
||||
@@ -44,5 +44,9 @@ minetest.register_privilege("fast", {
|
||||
description = "Can walk fast using the fast_move mode",
|
||||
give_to_singleplayer = false,
|
||||
})
|
||||
|
||||
minetest.register_privilege("noclip", {
|
||||
description = "Can fly through walls",
|
||||
give_to_singleplayer = false,
|
||||
})
|
||||
minetest.register_privilege("rollback", "Can use the rollback functionality")
|
||||
|
||||
|
||||
207
builtin/serialize.lua
Normal file
@@ -0,0 +1,207 @@
|
||||
-- Minetest: builtin/serialize.lua
|
||||
|
||||
-- https://github.com/fab13n/metalua/blob/no-dll/src/lib/serialize.lua
|
||||
-- Copyright (c) 2006-2997 Fabien Fleutot <metalua@gmail.com>
|
||||
-- License: MIT
|
||||
--------------------------------------------------------------------------------
|
||||
-- Serialize an object into a source code string. This string, when passed as
|
||||
-- an argument to deserialize(), returns an object structurally identical
|
||||
-- to the original one. The following are currently supported:
|
||||
-- * strings, numbers, booleans, nil
|
||||
-- * tables thereof. Tables can have shared part, but can't be recursive yet.
|
||||
-- Caveat: metatables and environments aren't saved.
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
local no_identity = { number=1, boolean=1, string=1, ['nil']=1 }
|
||||
|
||||
function minetest.serialize(x)
|
||||
|
||||
local gensym_max = 0 -- index of the gensym() symbol generator
|
||||
local seen_once = { } -- element->true set of elements seen exactly once in the table
|
||||
local multiple = { } -- element->varname set of elements seen more than once
|
||||
local nested = { } -- transient, set of elements currently being traversed
|
||||
local nest_points = { }
|
||||
local nest_patches = { }
|
||||
|
||||
local function gensym()
|
||||
gensym_max = gensym_max + 1 ; return gensym_max
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
-- nest_points are places where a table appears within itself, directly or not.
|
||||
-- for instance, all of these chunks create nest points in table x:
|
||||
-- "x = { }; x[x] = 1", "x = { }; x[1] = x", "x = { }; x[1] = { y = { x } }".
|
||||
-- To handle those, two tables are created by mark_nest_point:
|
||||
-- * nest_points [parent] associates all keys and values in table parent which
|
||||
-- create a nest_point with boolean `true'
|
||||
-- * nest_patches contain a list of { parent, key, value } tuples creating
|
||||
-- a nest point. They're all dumped after all the other table operations
|
||||
-- have been performed.
|
||||
--
|
||||
-- mark_nest_point (p, k, v) fills tables nest_points and nest_patches with
|
||||
-- informations required to remember that key/value (k,v) create a nest point
|
||||
-- in table parent. It also marks `parent' as occuring multiple times, since
|
||||
-- several references to it will be required in order to patch the nest
|
||||
-- points.
|
||||
-----------------------------------------------------------------------------
|
||||
local function mark_nest_point (parent, k, v)
|
||||
local nk, nv = nested[k], nested[v]
|
||||
assert (not nk or seen_once[k] or multiple[k])
|
||||
assert (not nv or seen_once[v] or multiple[v])
|
||||
local mode = (nk and nv and "kv") or (nk and "k") or ("v")
|
||||
local parent_np = nest_points [parent]
|
||||
local pair = { k, v }
|
||||
if not parent_np then parent_np = { }; nest_points [parent] = parent_np end
|
||||
parent_np [k], parent_np [v] = nk, nv
|
||||
table.insert (nest_patches, { parent, k, v })
|
||||
seen_once [parent], multiple [parent] = nil, true
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
-- First pass, list the tables and functions which appear more than once in x
|
||||
-----------------------------------------------------------------------------
|
||||
local function mark_multiple_occurences (x)
|
||||
if no_identity [type(x)] then return end
|
||||
if seen_once [x] then seen_once [x], multiple [x] = nil, true
|
||||
elseif multiple [x] then -- pass
|
||||
else seen_once [x] = true end
|
||||
|
||||
if type (x) == 'table' then
|
||||
nested [x] = true
|
||||
for k, v in pairs (x) do
|
||||
if nested[k] or nested[v] then mark_nest_point (x, k, v) else
|
||||
mark_multiple_occurences (k)
|
||||
mark_multiple_occurences (v)
|
||||
end
|
||||
end
|
||||
nested [x] = nil
|
||||
end
|
||||
end
|
||||
|
||||
local dumped = { } -- multiply occuring values already dumped in localdefs
|
||||
local localdefs = { } -- already dumped local definitions as source code lines
|
||||
|
||||
-- mutually recursive functions:
|
||||
local dump_val, dump_or_ref_val
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- if x occurs multiple times, dump the local var rather than the
|
||||
-- value. If it's the first time it's dumped, also dump the content
|
||||
-- in localdefs.
|
||||
--------------------------------------------------------------------
|
||||
function dump_or_ref_val (x)
|
||||
if nested[x] then return 'false' end -- placeholder for recursive reference
|
||||
if not multiple[x] then return dump_val (x) end
|
||||
local var = dumped [x]
|
||||
if var then return "_[" .. var .. "]" end -- already referenced
|
||||
local val = dump_val(x) -- first occurence, create and register reference
|
||||
var = gensym()
|
||||
table.insert(localdefs, "_["..var.."]="..val)
|
||||
dumped [x] = var
|
||||
return "_[" .. var .. "]"
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
-- Second pass, dump the object; subparts occuring multiple times are dumped
|
||||
-- in local variables which can be referenced multiple times;
|
||||
-- care is taken to dump locla vars in asensible order.
|
||||
-----------------------------------------------------------------------------
|
||||
function dump_val(x)
|
||||
local t = type(x)
|
||||
if x==nil then return 'nil'
|
||||
elseif t=="number" then return tostring(x)
|
||||
elseif t=="string" then return string.format("%q", x)
|
||||
elseif t=="boolean" then return x and "true" or "false"
|
||||
elseif t=="table" then
|
||||
local acc = { }
|
||||
local idx_dumped = { }
|
||||
local np = nest_points [x]
|
||||
for i, v in ipairs(x) do
|
||||
if np and np[v] then
|
||||
table.insert (acc, 'false') -- placeholder
|
||||
else
|
||||
table.insert (acc, dump_or_ref_val(v))
|
||||
end
|
||||
idx_dumped[i] = true
|
||||
end
|
||||
for k, v in pairs(x) do
|
||||
if np and (np[k] or np[v]) then
|
||||
--check_multiple(k); check_multiple(v) -- force dumps in localdefs
|
||||
elseif not idx_dumped[k] then
|
||||
table.insert (acc, "[" .. dump_or_ref_val(k) .. "] = " .. dump_or_ref_val(v))
|
||||
end
|
||||
end
|
||||
return "{ "..table.concat(acc,", ").." }"
|
||||
else
|
||||
error ("Can't serialize data of type "..t)
|
||||
end
|
||||
end
|
||||
|
||||
local function dump_nest_patches()
|
||||
for _, entry in ipairs(nest_patches) do
|
||||
local p, k, v = unpack (entry)
|
||||
assert (multiple[p])
|
||||
local set = dump_or_ref_val (p) .. "[" .. dump_or_ref_val (k) .. "] = " ..
|
||||
dump_or_ref_val (v) .. " -- rec "
|
||||
table.insert (localdefs, set)
|
||||
end
|
||||
end
|
||||
|
||||
mark_multiple_occurences (x)
|
||||
local toplevel = dump_or_ref_val (x)
|
||||
dump_nest_patches()
|
||||
|
||||
if next (localdefs) then
|
||||
return "local _={ }\n" ..
|
||||
table.concat (localdefs, "\n") ..
|
||||
"\nreturn " .. toplevel
|
||||
else
|
||||
return "return " .. toplevel
|
||||
end
|
||||
end
|
||||
|
||||
-- Deserialization.
|
||||
-- http://stackoverflow.com/questions/5958818/loading-serialized-data-into-a-table
|
||||
--
|
||||
|
||||
local function stringtotable(sdata)
|
||||
if sdata:byte(1) == 27 then return nil, "binary bytecode prohibited" end
|
||||
local f, message = assert(loadstring(sdata))
|
||||
if not f then return nil, message end
|
||||
setfenv(f, table)
|
||||
return f()
|
||||
end
|
||||
|
||||
function minetest.deserialize(sdata)
|
||||
local table = {}
|
||||
local okay,results = pcall(stringtotable, sdata)
|
||||
if okay then
|
||||
return results
|
||||
end
|
||||
print('error:'.. results)
|
||||
return nil
|
||||
end
|
||||
|
||||
-- Run some unit tests
|
||||
local function unit_test()
|
||||
function unitTest(name, success)
|
||||
if not success then
|
||||
error(name .. ': failed')
|
||||
end
|
||||
end
|
||||
|
||||
unittest_input = {cat={sound="nyan", speed=400}, dog={sound="woof"}}
|
||||
unittest_output = minetest.deserialize(minetest.serialize(unittest_input))
|
||||
|
||||
unitTest("test 1a", unittest_input.cat.sound == unittest_output.cat.sound)
|
||||
unitTest("test 1b", unittest_input.cat.speed == unittest_output.cat.speed)
|
||||
unitTest("test 1c", unittest_input.dog.sound == unittest_output.dog.sound)
|
||||
|
||||
unittest_input = {escapechars="\n\r\t\v\\\"\'\[\]", noneuropean="θשׁ٩∂"}
|
||||
unittest_output = minetest.deserialize(minetest.serialize(unittest_input))
|
||||
unitTest("test 3a", unittest_input.escapechars == unittest_output.escapechars)
|
||||
unitTest("test 3b", unittest_input.noneuropean == unittest_output.noneuropean)
|
||||
end
|
||||
unit_test() -- Run it
|
||||
unit_test = nil -- Hide it
|
||||
|
||||
2
client/serverlist/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
1
client/shaders/test_shader_1/base.txt
Normal file
@@ -0,0 +1 @@
|
||||
trans_alphach_ref
|
||||
25
client/shaders/test_shader_1/opengl_fragment.glsl
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
uniform sampler2D myTexture;
|
||||
uniform vec4 skyBgColor;
|
||||
uniform float fogDistance;
|
||||
|
||||
varying vec3 vPosition;
|
||||
|
||||
void main (void)
|
||||
{
|
||||
//vec4 col = vec4(1.0, 0.0, 0.0, 1.0);
|
||||
vec4 col = texture2D(myTexture, vec2(gl_TexCoord[0]));
|
||||
float a = col.a;
|
||||
col *= gl_Color;
|
||||
col = col * col; // SRGB -> Linear
|
||||
col *= 1.8;
|
||||
col.r = 1.0 - exp(1.0 - col.r) / exp(1.0);
|
||||
col.g = 1.0 - exp(1.0 - col.g) / exp(1.0);
|
||||
col.b = 1.0 - exp(1.0 - col.b) / exp(1.0);
|
||||
col = sqrt(col); // Linear -> SRGB
|
||||
if(fogDistance != 0.0){
|
||||
float d = max(0.0, min(vPosition.z / fogDistance * 1.5 - 0.6, 1.0));
|
||||
col = mix(col, skyBgColor, d);
|
||||
}
|
||||
gl_FragColor = vec4(col.r, col.g, col.b, a);
|
||||
}
|
||||
58
client/shaders/test_shader_1/opengl_vertex.glsl
Normal file
@@ -0,0 +1,58 @@
|
||||
|
||||
uniform mat4 mWorldViewProj;
|
||||
uniform mat4 mInvWorld;
|
||||
uniform mat4 mTransWorld;
|
||||
uniform float dayNightRatio;
|
||||
|
||||
varying vec3 vPosition;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = mWorldViewProj * gl_Vertex;
|
||||
|
||||
vPosition = (mWorldViewProj * gl_Vertex).xyz;
|
||||
|
||||
vec4 color;
|
||||
//color = vec4(1.0, 1.0, 1.0, 1.0);
|
||||
|
||||
float day = gl_Color.r;
|
||||
float night = gl_Color.g;
|
||||
float light_source = gl_Color.b;
|
||||
|
||||
/*color.r = mix(night, day, dayNightRatio);
|
||||
color.g = color.r;
|
||||
color.b = color.r;*/
|
||||
|
||||
float rg = mix(night, day, dayNightRatio);
|
||||
rg += light_source * 1.0; // Make light sources brighter
|
||||
float b = rg;
|
||||
|
||||
// Moonlight is blue
|
||||
b += (day - night) / 13.0;
|
||||
rg -= (day - night) / 13.0;
|
||||
|
||||
// Emphase blue a bit in darker places
|
||||
// See C++ implementation in mapblock_mesh.cpp finalColorBlend()
|
||||
b += max(0.0, (1.0 - abs(b - 0.13)/0.17) * 0.025);
|
||||
|
||||
// Artificial light is yellow-ish
|
||||
// See C++ implementation in mapblock_mesh.cpp finalColorBlend()
|
||||
rg += max(0.0, (1.0 - abs(rg - 0.85)/0.15) * 0.065);
|
||||
|
||||
color.r = rg;
|
||||
color.g = rg;
|
||||
color.b = b;
|
||||
|
||||
// Make sides and bottom darker than the top
|
||||
color = color * color; // SRGB -> Linear
|
||||
if(gl_Normal.y <= 0.5)
|
||||
color *= 0.6;
|
||||
//color *= 0.7;
|
||||
color = sqrt(color); // Linear -> SRGB
|
||||
|
||||
color.a = gl_Color.a;
|
||||
|
||||
gl_FrontColor = gl_BackColor = color;
|
||||
|
||||
gl_TexCoord[0] = gl_MultiTexCoord0;
|
||||
}
|
||||
1
client/shaders/test_shader_2/base.txt
Normal file
@@ -0,0 +1 @@
|
||||
trans_alphach
|
||||
23
client/shaders/test_shader_2/opengl_fragment.glsl
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
uniform sampler2D myTexture;
|
||||
uniform float fogDistance;
|
||||
|
||||
varying vec3 vPosition;
|
||||
|
||||
void main (void)
|
||||
{
|
||||
vec4 col = texture2D(myTexture, vec2(gl_TexCoord[0]));
|
||||
col *= gl_Color;
|
||||
float a = gl_Color.a;
|
||||
col = col * col; // SRGB -> Linear
|
||||
col *= 1.8;
|
||||
col.r = 1.0 - exp(1.0 - col.r) / exp(1.0);
|
||||
col.g = 1.0 - exp(1.0 - col.g) / exp(1.0);
|
||||
col.b = 1.0 - exp(1.0 - col.b) / exp(1.0);
|
||||
col = sqrt(col); // Linear -> SRGB
|
||||
if(fogDistance != 0.0){
|
||||
float d = max(0.0, min(vPosition.z / fogDistance * 1.5 - 0.6, 1.0));
|
||||
a = mix(a, 0.0, d);
|
||||
}
|
||||
gl_FragColor = vec4(col.r, col.g, col.b, a);
|
||||
}
|
||||
51
client/shaders/test_shader_2/opengl_vertex.glsl
Normal file
@@ -0,0 +1,51 @@
|
||||
|
||||
uniform mat4 mWorldViewProj;
|
||||
uniform mat4 mInvWorld;
|
||||
uniform mat4 mTransWorld;
|
||||
uniform float dayNightRatio;
|
||||
|
||||
varying vec3 vPosition;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = mWorldViewProj * gl_Vertex;
|
||||
|
||||
vPosition = (mWorldViewProj * gl_Vertex).xyz;
|
||||
|
||||
vec4 color;
|
||||
//color = vec4(1.0, 1.0, 1.0, 1.0);
|
||||
|
||||
float day = gl_Color.r;
|
||||
float night = gl_Color.g;
|
||||
float light_source = gl_Color.b;
|
||||
|
||||
/*color.r = mix(night, day, dayNightRatio);
|
||||
color.g = color.r;
|
||||
color.b = color.r;*/
|
||||
|
||||
float rg = mix(night, day, dayNightRatio);
|
||||
rg += light_source * 1.0; // Make light sources brighter
|
||||
float b = rg;
|
||||
|
||||
// Moonlight is blue
|
||||
b += (day - night) / 13.0;
|
||||
rg -= (day - night) / 13.0;
|
||||
|
||||
// Emphase blue a bit in darker places
|
||||
// See C++ implementation in mapblock_mesh.cpp finalColorBlend()
|
||||
b += max(0.0, (1.0 - abs(b - 0.13)/0.17) * 0.025);
|
||||
|
||||
// Artificial light is yellow-ish
|
||||
// See C++ implementation in mapblock_mesh.cpp finalColorBlend()
|
||||
rg += max(0.0, (1.0 - abs(rg - 0.85)/0.15) * 0.065);
|
||||
|
||||
color.r = rg;
|
||||
color.g = rg;
|
||||
color.b = b;
|
||||
|
||||
color.a = gl_Color.a;
|
||||
|
||||
gl_FrontColor = gl_BackColor = color;
|
||||
|
||||
gl_TexCoord[0] = gl_MultiTexCoord0;
|
||||
}
|
||||
42
cmake/Modules/FindCURL.cmake
Normal file
@@ -0,0 +1,42 @@
|
||||
# - Find curl
|
||||
# Find the native CURL headers and libraries.
|
||||
#
|
||||
# CURL_INCLUDE_DIR - where to find curl/curl.h, etc.
|
||||
# CURL_LIBRARY - List of libraries when using curl.
|
||||
# CURL_FOUND - True if curl found.
|
||||
|
||||
if( UNIX )
|
||||
FIND_PATH(CURL_INCLUDE_DIR NAMES curl.h
|
||||
PATHS
|
||||
/usr/local/include/curl
|
||||
/usr/include/curl
|
||||
)
|
||||
|
||||
FIND_LIBRARY(CURL_LIBRARY NAMES curl
|
||||
PATHS
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
)
|
||||
else( UNIX )
|
||||
FIND_PATH(CURL_INCLUDE_DIR NAMES curl/curl.h) # Look for the header file.
|
||||
FIND_LIBRARY(CURL_LIBRARY NAMES curl) # Look for the library.
|
||||
INCLUDE(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set CURL_FOUND to TRUE if
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CURL DEFAULT_MSG CURL_LIBRARY CURL_INCLUDE_DIR) # all listed variables are TRUE
|
||||
endif( UNIX )
|
||||
|
||||
if( WIN32 )
|
||||
if( CURL_LIBRARY AND CURL_INCLUDE_DIR AND CURL_DLL ) # libcurl.dll is required on Windows
|
||||
SET(CURL_FOUND TRUE)
|
||||
else( CURL_LIBRARY AND CURL_INCLUDE_DIR AND CURL_DLL )
|
||||
SET(CURL_FOUND FALSE)
|
||||
endif( CURL_LIBRARY AND CURL_INCLUDE_DIR AND CURL_DLL )
|
||||
else ( WIN32 )
|
||||
if( CURL_LIBRARY AND CURL_INCLUDE_DIR )
|
||||
SET(CURL_FOUND TRUE)
|
||||
else( CURL_LIBRARY AND CURL_INCLUDE_DIR )
|
||||
SET(CURL_FOUND FALSE)
|
||||
endif( CURL_LIBRARY AND CURL_INCLUDE_DIR )
|
||||
endif ( WIN32 )
|
||||
|
||||
MESSAGE(STATUS "CURL_INCLUDE_DIR = ${CURL_INCLUDE_DIR}")
|
||||
MESSAGE(STATUS "CURL_LIBRARY = ${CURL_LIBRARY}")
|
||||
18
cmake/Modules/FindJson.cmake
Normal file
@@ -0,0 +1,18 @@
|
||||
# Look for json, use our own if not found
|
||||
|
||||
#FIND_PATH(JSON_INCLUDE_DIR json.h)
|
||||
|
||||
#FIND_LIBRARY(JSON_LIBRARY NAMES jsoncpp)
|
||||
|
||||
#IF(JSON_LIBRARY AND JSON_INCLUDE_DIR)
|
||||
# SET( JSON_FOUND TRUE )
|
||||
#ENDIF(JSON_LIBRARY AND JSON_INCLUDE_DIR)
|
||||
|
||||
#IF(JSON_FOUND)
|
||||
# MESSAGE(STATUS "Found system jsoncpp header file in ${JSON_INCLUDE_DIR}")
|
||||
# MESSAGE(STATUS "Found system jsoncpp library ${JSON_LIBRARY}")
|
||||
#ELSE(JSON_FOUND)
|
||||
SET(JSON_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/json)
|
||||
SET(JSON_LIBRARY jsoncpp)
|
||||
MESSAGE(STATUS "Using project jsoncpp library")
|
||||
#ENDIF(JSON_FOUND)
|
||||
130
cmake/Modules/FindOpenGLES2.cmake
Normal file
@@ -0,0 +1,130 @@
|
||||
#-------------------------------------------------------------------
|
||||
# This file is stolen from part of the CMake build system for OGRE (Object-oriented Graphics Rendering Engine) http://www.ogre3d.org/
|
||||
#
|
||||
# The contents of this file are placed in the public domain. Feel
|
||||
# free to make use of it in any way you like.
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
# - Try to find OpenGLES and EGL
|
||||
# Once done this will define
|
||||
#
|
||||
# OPENGLES2_FOUND - system has OpenGLES
|
||||
# OPENGLES2_INCLUDE_DIR - the GL include directory
|
||||
# OPENGLES2_LIBRARIES - Link these to use OpenGLES
|
||||
#
|
||||
# EGL_FOUND - system has EGL
|
||||
# EGL_INCLUDE_DIR - the EGL include directory
|
||||
# EGL_LIBRARIES - Link these to use EGL
|
||||
|
||||
# win32, apple, android NOT TESED
|
||||
# linux tested and works
|
||||
|
||||
IF (WIN32)
|
||||
IF (CYGWIN)
|
||||
|
||||
FIND_PATH(OPENGLES2_INCLUDE_DIR GLES2/gl2.h )
|
||||
|
||||
FIND_LIBRARY(OPENGLES2_gl_LIBRARY libGLESv2 )
|
||||
|
||||
ELSE (CYGWIN)
|
||||
|
||||
IF(BORLAND)
|
||||
SET (OPENGLES2_gl_LIBRARY import32 CACHE STRING "OpenGL ES 2.x library for win32")
|
||||
ELSE(BORLAND)
|
||||
# todo
|
||||
# SET (OPENGLES_gl_LIBRARY ${SOURCE_DIR}/Dependencies/lib/release/libGLESv2.lib CACHE STRING "OpenGL ES 2.x library for win32"
|
||||
ENDIF(BORLAND)
|
||||
|
||||
ENDIF (CYGWIN)
|
||||
|
||||
ELSE (WIN32)
|
||||
|
||||
IF (APPLE)
|
||||
|
||||
create_search_paths(/Developer/Platforms)
|
||||
findpkg_framework(OpenGLES2)
|
||||
set(OPENGLES2_gl_LIBRARY "-framework OpenGLES")
|
||||
|
||||
ELSE(APPLE)
|
||||
|
||||
FIND_PATH(OPENGLES2_INCLUDE_DIR GLES2/gl2.h
|
||||
/usr/openwin/share/include
|
||||
/opt/graphics/OpenGL/include /usr/X11R6/include
|
||||
/usr/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(OPENGLES2_gl_LIBRARY
|
||||
NAMES GLESv2
|
||||
PATHS /opt/graphics/OpenGL/lib
|
||||
/usr/openwin/lib
|
||||
/usr/shlib /usr/X11R6/lib
|
||||
/usr/lib
|
||||
)
|
||||
|
||||
IF (NOT BUILD_ANDROID)
|
||||
FIND_PATH(EGL_INCLUDE_DIR EGL/egl.h
|
||||
/usr/openwin/share/include
|
||||
/opt/graphics/OpenGL/include /usr/X11R6/include
|
||||
/usr/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(EGL_egl_LIBRARY
|
||||
NAMES EGL
|
||||
PATHS /opt/graphics/OpenGL/lib
|
||||
/usr/openwin/lib
|
||||
/usr/shlib /usr/X11R6/lib
|
||||
/usr/lib
|
||||
)
|
||||
|
||||
# On Unix OpenGL most certainly always requires X11.
|
||||
# Feel free to tighten up these conditions if you don't
|
||||
# think this is always true.
|
||||
# It's not true on OSX.
|
||||
|
||||
IF (OPENGLES2_gl_LIBRARY)
|
||||
IF(NOT X11_FOUND)
|
||||
INCLUDE(FindX11)
|
||||
ENDIF(NOT X11_FOUND)
|
||||
IF (X11_FOUND)
|
||||
IF (NOT APPLE)
|
||||
SET (OPENGLES2_LIBRARIES ${X11_LIBRARIES})
|
||||
ENDIF (NOT APPLE)
|
||||
ENDIF (X11_FOUND)
|
||||
ENDIF (OPENGLES2_gl_LIBRARY)
|
||||
ENDIF ()
|
||||
|
||||
ENDIF(APPLE)
|
||||
ENDIF (WIN32)
|
||||
|
||||
#SET( OPENGLES2_LIBRARIES ${OPENGLES2_gl_LIBRARY} ${OPENGLES2_LIBRARIES})
|
||||
|
||||
IF (BUILD_ANDROID)
|
||||
IF(OPENGLES2_gl_LIBRARY)
|
||||
SET( OPENGLES2_LIBRARIES ${OPENGLES2_gl_LIBRARY} ${OPENGLES2_LIBRARIES})
|
||||
SET( EGL_LIBRARIES)
|
||||
SET( OPENGLES2_FOUND "YES" )
|
||||
ENDIF(OPENGLES2_gl_LIBRARY)
|
||||
ELSE ()
|
||||
|
||||
SET( OPENGLES2_LIBRARIES ${OPENGLES2_gl_LIBRARY} ${OPENGLES2_LIBRARIES})
|
||||
|
||||
IF(OPENGLES2_gl_LIBRARY AND EGL_egl_LIBRARY)
|
||||
SET( OPENGLES2_LIBRARIES ${OPENGLES2_gl_LIBRARY} ${OPENGLES2_LIBRARIES})
|
||||
SET( EGL_LIBRARIES ${EGL_egl_LIBRARY} ${EGL_LIBRARIES})
|
||||
SET( OPENGLES2_FOUND "YES" )
|
||||
ENDIF(OPENGLES2_gl_LIBRARY AND EGL_egl_LIBRARY)
|
||||
|
||||
ENDIF ()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OPENGLES2_INCLUDE_DIR
|
||||
OPENGLES2_gl_LIBRARY
|
||||
EGL_INCLUDE_DIR
|
||||
EGL_egl_LIBRARY
|
||||
)
|
||||
|
||||
IF(OPENGLES2_FOUND)
|
||||
MESSAGE(STATUS "Found system opengles2 library ${OPENGLES2_LIBRARIES}")
|
||||
ELSE ()
|
||||
SET(OPENGLES2_LIBRARIES "")
|
||||
ENDIF ()
|
||||
767
doc/lua_api.txt
@@ -1,13 +1,16 @@
|
||||
=================================================
|
||||
Minetest World Format used as of 0.4.dev-20120322
|
||||
=================================================
|
||||
=============================
|
||||
Minetest World Format 22...25
|
||||
=============================
|
||||
|
||||
This applies to a world format carrying the block serialization version 22
|
||||
which is used at least in version 0.4.dev-20120322.
|
||||
This applies to a world format carrying the block serialization version
|
||||
22...25, used at least in
|
||||
- 0.4.dev-20120322 ... 0.4.dev-20120606 (22...23)
|
||||
- 0.4.0 (23)
|
||||
- 24 was never released as stable and existed for ~2 days
|
||||
|
||||
The block serialization version used is 22. It does not fully specify every
|
||||
aspect of this format; if compliance with this format is to be checked, it
|
||||
needs to be done by detecting if the files and data indeed follows it.
|
||||
The block serialization version does not fully specify every aspect of this
|
||||
format; if compliance with this format is to be checked, it needs to be
|
||||
done by detecting if the files and data indeed follows it.
|
||||
|
||||
Legacy stuff
|
||||
=============
|
||||
@@ -20,8 +23,8 @@ Files
|
||||
Everything is contained in a directory, the name of which is freeform, but
|
||||
often serves as the name of the world.
|
||||
|
||||
Currently the authentication and ban data is stored on a per-world basis. It
|
||||
can be copied over from an old world to a newly created world.
|
||||
Currently the authentication and ban data is stored on a per-world basis.
|
||||
It can be copied over from an old world to a newly created world.
|
||||
|
||||
World
|
||||
|-- auth.txt ----- Authentication data
|
||||
@@ -260,17 +263,26 @@ u8 flags
|
||||
|
||||
u8 content_width
|
||||
- Number of bytes in the content (param0) fields of nodes
|
||||
- Always 1
|
||||
if map format version <= 23:
|
||||
- Always 1
|
||||
if map format version >= 24:
|
||||
- Always 2
|
||||
|
||||
u8 params_width
|
||||
- Number of bytes used for parameters per node
|
||||
- Always 2
|
||||
|
||||
zlib-compressed node data:
|
||||
- content:
|
||||
u8[4096]: param0 fields
|
||||
u8[4096]: param1 fields
|
||||
u8[4096]: param2 fields
|
||||
if content_width == 1:
|
||||
- content:
|
||||
u8[4096]: param0 fields
|
||||
u8[4096]: param1 fields
|
||||
u8[4096]: param2 fields
|
||||
if content_width == 2:
|
||||
- content:
|
||||
u16[4096]: param0 fields
|
||||
u8[4096]: param1 fields
|
||||
u8[4096]: param2 fields
|
||||
- The location of a node in each of those arrays is (z*16*16 + y*16 + x).
|
||||
|
||||
zlib-compressed node metadata list
|
||||
@@ -283,9 +295,19 @@ zlib-compressed node metadata list
|
||||
u16 content_size
|
||||
u8[content_size] (content of metadata)
|
||||
|
||||
u16 mapblockobject_count
|
||||
- Always 0
|
||||
- Should be removed in version 23 (TODO)
|
||||
- Node timers
|
||||
if map format version == 23:
|
||||
u8 unused version (always 0)
|
||||
if map format version == 24: (NOTE: Not released as stable)
|
||||
u8 nodetimer_version
|
||||
if nodetimer_version == 0:
|
||||
(nothing else)
|
||||
if nodetimer_version == 1:
|
||||
u16 num_of_timers
|
||||
foreach num_of_timers:
|
||||
u16 timer position (z*16*16 + y*16 + x)
|
||||
s32 timeout*1000
|
||||
s32 elapsed*1000
|
||||
|
||||
u8 static object version:
|
||||
- Always 0
|
||||
@@ -315,17 +337,29 @@ foreach num_name_id_mappings
|
||||
u16 name_len
|
||||
u8[name_len] name
|
||||
|
||||
- Node timers
|
||||
if map format version == 25:
|
||||
u8 length of the data of a single timer (always 2+4+4=10)
|
||||
u16 num_of_timers
|
||||
foreach num_of_timers:
|
||||
u16 timer position (z*16*16 + y*16 + x)
|
||||
s32 timeout*1000
|
||||
s32 elapsed*1000
|
||||
|
||||
EOF.
|
||||
|
||||
Format of nodes
|
||||
----------------
|
||||
A node is composed of the u8 fields param0, param1 and param2.
|
||||
|
||||
The content id of a node is determined as so:
|
||||
- If param0 < 0x80,
|
||||
content_id = param0
|
||||
- Otherwise
|
||||
content_id = (param0<<4) + (param2>>4)
|
||||
if map format version <= 23:
|
||||
The content id of a node is determined as so:
|
||||
- If param0 < 0x80,
|
||||
content_id = param0
|
||||
- Otherwise
|
||||
content_id = (param0<<4) + (param2>>4)
|
||||
if map format version >= 24:
|
||||
The content id of a node is param0.
|
||||
|
||||
The purpose of param1 and param2 depend on the definition of the node.
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ Show allowed options
|
||||
Set logfile path (debug.txt)
|
||||
.TP
|
||||
\-\-map\-dir <value>
|
||||
Same as --world (deprecated)
|
||||
Same as \-\-world (deprecated)
|
||||
.TP
|
||||
\-\-name <value>
|
||||
Set player name
|
||||
|
||||
@@ -35,7 +35,7 @@ Show allowed options
|
||||
Set logfile path (debug.txt)
|
||||
.TP
|
||||
\-\-map\-dir <value>
|
||||
Same as --world (deprecated)
|
||||
Same as \-\-world (deprecated)
|
||||
.TP
|
||||
\-\-port <value>
|
||||
Set network port (UDP) to use
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Minetest-c55 protocol (incomplete, early draft):
|
||||
Minetest protocol (incomplete, early draft):
|
||||
Updated 2011-06-18
|
||||
|
||||
A custom protocol over UDP.
|
||||
@@ -70,3 +70,39 @@ function check_if_minetestserver_up($host, $port)
|
||||
return false;
|
||||
}
|
||||
|
||||
- Here's a Python script for checking if a minetest server is up, confirmed working
|
||||
#!/usr/bin/env python
|
||||
import sys, time, socket
|
||||
address = ""
|
||||
port = 30000
|
||||
if len(sys.argv) <= 1:
|
||||
print("Usage: %s <address>" % sys.argv[0])
|
||||
exit()
|
||||
if ':' in sys.argv[1]:
|
||||
address = sys.argv[1].split(':')[0]
|
||||
try:
|
||||
port = int(sys.argv[1].split(':')[1])
|
||||
except ValueError:
|
||||
print("Please specify a valid port")
|
||||
exit()
|
||||
else:
|
||||
address = sys.argv[1]
|
||||
|
||||
try:
|
||||
start = time.time()
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
sock.settimeout(2.0)
|
||||
buf = "\x4f\x45\x74\x03\x00\x00\x00\x01"
|
||||
sock.sendto(buf, (address, port))
|
||||
data, addr = sock.recvfrom(1000)
|
||||
if data:
|
||||
peer_id = data[12:14]
|
||||
buf = "\x4f\x45\x74\x03" + peer_id + "\x00\x00\x03"
|
||||
sock.sendto(buf, (address, port))
|
||||
sock.close()
|
||||
end = time.time()
|
||||
print("%s is up (%0.5fms)" % (sys.argv[1],end-start))
|
||||
else:
|
||||
print("%s seems to be down " % sys.argv[1])
|
||||
except:
|
||||
print("%s seems to be down " % sys.argv[1])
|
||||
|
||||
BIN
fonts/liberationmono.ttf
Normal file
BIN
fonts/liberationsans.ttf
Normal file
@@ -90,6 +90,6 @@ bucket.register_liquid(
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "default:bucket_lava",
|
||||
recipe = "bucket:bucket_lava",
|
||||
burntime = 60,
|
||||
})
|
||||
|
||||
@@ -27,52 +27,74 @@ minetest.register_alias("mapgen_mese", "default:mese")
|
||||
-- Ore generation
|
||||
--
|
||||
|
||||
local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, ore_per_chunk, height_min, height_max)
|
||||
if maxp.y < height_min or minp.y > height_max then
|
||||
return
|
||||
end
|
||||
local y_min = math.max(minp.y, height_min)
|
||||
local y_max = math.min(maxp.y, height_max)
|
||||
local volume = (maxp.x-minp.x+1)*(y_max-y_min+1)*(maxp.z-minp.z+1)
|
||||
local pr = PseudoRandom(seed)
|
||||
local num_chunks = math.floor(chunks_per_volume * volume)
|
||||
local chunk_size = 3
|
||||
if ore_per_chunk <= 4 then
|
||||
chunk_size = 2
|
||||
end
|
||||
local inverse_chance = math.floor(chunk_size*chunk_size*chunk_size / ore_per_chunk)
|
||||
--print("generate_ore num_chunks: "..dump(num_chunks))
|
||||
for i=1,num_chunks do
|
||||
local y0 = pr:next(y_min, y_max-chunk_size+1)
|
||||
if y0 >= height_min and y0 <= height_max then
|
||||
local x0 = pr:next(minp.x, maxp.x-chunk_size+1)
|
||||
local z0 = pr:next(minp.z, maxp.z-chunk_size+1)
|
||||
local p0 = {x=x0, y=y0, z=z0}
|
||||
for x1=0,chunk_size-1 do
|
||||
for y1=0,chunk_size-1 do
|
||||
for z1=0,chunk_size-1 do
|
||||
if pr:next(1,inverse_chance) == 1 then
|
||||
local x2 = x0+x1
|
||||
local y2 = y0+y1
|
||||
local z2 = z0+z1
|
||||
local p2 = {x=x2, y=y2, z=z2}
|
||||
if minetest.env:get_node(p2).name == wherein then
|
||||
minetest.env:set_node(p2, {name=name})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
--print("generate_ore done")
|
||||
end
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_coal",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 8*8*8,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 3,
|
||||
height_min = -31000,
|
||||
height_max = 64,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_iron",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 16*16*16,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 3,
|
||||
height_min = -5,
|
||||
height_max = 7,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_iron",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 12*12*12,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 3,
|
||||
height_min = -16,
|
||||
height_max = -5,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_iron",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 9*9*9,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 3,
|
||||
height_min = -31000,
|
||||
height_max = -17,
|
||||
})
|
||||
|
||||
-- for float islands and far scaled
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_coal",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 8*8*8,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 3,
|
||||
height_min = 200,
|
||||
height_max = 31000,
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_iron",
|
||||
wherein = "default:stone",
|
||||
clust_scarcity = 9*9*9,
|
||||
clust_num_ores = 5,
|
||||
clust_size = 3,
|
||||
height_min = 200,
|
||||
height_max = 31000,
|
||||
})
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp, seed)
|
||||
generate_ore("default:stone_with_coal", "default:stone", minp, maxp, seed, 1/8/8/8, 5, -31000, 64)
|
||||
generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+1, 1/16/16/16, 5, -5, 7)
|
||||
generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+2, 1/12/12/12, 5, -16, -5)
|
||||
generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+3, 1/9/9/9, 5, -31000, -17)
|
||||
-- Generate clay
|
||||
if maxp.y >= 2 and minp.y <= 0 then
|
||||
-- Assume X and Z lengths are equal
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
BIN
games/minimal/mods/default/textures/crack_anylength.png
Normal file
|
After Width: | Height: | Size: 367 B |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 303 B After Width: | Height: | Size: 317 B |
|
Before Width: | Height: | Size: 410 B After Width: | Height: | Size: 378 B |
|
Before Width: | Height: | Size: 203 B After Width: | Height: | Size: 206 B |
|
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 231 B |
@@ -6,6 +6,11 @@
|
||||
|
||||
experimental = {}
|
||||
|
||||
function experimental.print_to_everything(msg)
|
||||
minetest.log("action", msg)
|
||||
minetest.chat_send_all(msg)
|
||||
end
|
||||
|
||||
--[[
|
||||
experimental.player_visual_index = 0
|
||||
function switch_player_visual()
|
||||
@@ -97,235 +102,10 @@ function on_step(dtime)
|
||||
end
|
||||
minetest.register_globalstep(on_step)
|
||||
|
||||
-- An example furnace-thing implemented in Lua
|
||||
|
||||
--[[
|
||||
minetest.register_node("experimental:luafurnace", {
|
||||
tile_images = {"default_lava.png", "default_furnace_side.png",
|
||||
"default_furnace_side.png", "default_furnace_side.png",
|
||||
"default_furnace_side.png", "default_furnace_front.png"},
|
||||
--inventory_image = "furnace_front.png",
|
||||
inventory_image = minetest.inventorycube("default_furnace_front.png"),
|
||||
paramtype = "facedir_simple",
|
||||
metadata_name = "generic",
|
||||
material = minetest.digprop_stonelike(3.0),
|
||||
})
|
||||
|
||||
minetest.register_on_placenode(function(pos, newnode, placer)
|
||||
if newnode.name == "experimental:luafurnace" then
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
meta:inventory_set_list("fuel", {""})
|
||||
meta:inventory_set_list("src", {""})
|
||||
meta:inventory_set_list("dst", {"","","",""})
|
||||
meta:set_inventory_draw_spec(
|
||||
"invsize[8,9;]"
|
||||
.."list[current_name;fuel;2,3;1,1;]"
|
||||
.."list[current_name;src;2,1;1,1;]"
|
||||
.."list[current_name;dst;5,1;2,2;]"
|
||||
.."list[current_player;main;0,5;8,4;]"
|
||||
)
|
||||
|
||||
local total_cooked = 0;
|
||||
meta:set_string("total_cooked", total_cooked)
|
||||
meta:set_infotext("Lua Furnace: total cooked: "..total_cooked)
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"experimental:luafurnace"},
|
||||
interval = 1.0,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
for i, name in ipairs({
|
||||
"fuel_totaltime",
|
||||
"fuel_time",
|
||||
"src_totaltime",
|
||||
"src_time"
|
||||
}) do
|
||||
if not meta:get_string(name) then
|
||||
meta:set_string(name, 0)
|
||||
end
|
||||
end
|
||||
|
||||
local inv = meta:get_inventory()
|
||||
|
||||
local fuelitem = inv:get_stack("fuel", 1):peek_item()
|
||||
local srcitem = inv:get_stack("src", 1):peek_item()
|
||||
--print("fuelitem="..dump(fuelitem))
|
||||
--print("srcitem="..dump(srcitem))
|
||||
|
||||
local was_active = false
|
||||
|
||||
local src_cooktime = -1
|
||||
local result_stackstring = nil
|
||||
|
||||
if srcitem then
|
||||
local prop = get_item_definition(srcitem)
|
||||
if prop and prop.cookresult_itemstring ~= "" then
|
||||
result_stackstring = prop.cookresult_itemstring
|
||||
src_cooktime = prop.furnace_cooktime or 3
|
||||
end
|
||||
end
|
||||
|
||||
print("src_cooktime="..dump(src_cooktime))
|
||||
print("result_stackstring="..dump(result_stackstring))
|
||||
|
||||
if tonumber(meta:get_string("fuel_time")) < tonumber(meta:get_string("fuel_totaltime")) then
|
||||
was_active = true
|
||||
meta:set_string("fuel_time", tonumber(meta:get_string("fuel_time")) + 1)
|
||||
meta:set_string("src_time", tonumber(meta:get_string("src_time")) + 1)
|
||||
--print("result_stackstring="..dump(result_stackstring))
|
||||
--print('tonumber(meta:get_string("src_time"))='..dump(tonumber(meta:get_string("src_time"))))
|
||||
--print("src_cooktime="..dump(src_cooktime))
|
||||
if result_stackstring and tonumber(meta:get_string("src_time")) >= src_cooktime and src_cooktime >= 0 then
|
||||
-- Put result in "dst" list
|
||||
success = inv:autoinsert_stackstring("dst", result_stackstring)
|
||||
if not success then
|
||||
print("Could not autoinsert '"..result_stackstring.."'")
|
||||
end
|
||||
-- If succeeded, take stuff from "src" list
|
||||
if success then
|
||||
srcstack = inv:get_stack("src", 1)
|
||||
srcstack:take_item()
|
||||
inv:set_stack("src", 1, srcstack)
|
||||
end
|
||||
meta:set_string("src_time", 0)
|
||||
end
|
||||
end
|
||||
|
||||
if tonumber(meta:get_string("fuel_time")) < tonumber(meta:get_string("fuel_totaltime")) then
|
||||
meta:set_infotext("Furnace active: "..(tonumber(meta:get_string("fuel_time"))/tonumber(meta:get_string("fuel_totaltime"))*100).."%")
|
||||
return
|
||||
end
|
||||
|
||||
local srcitem = inv:get_stack("src", 1):peek_item()
|
||||
|
||||
local src_cooktime = 0
|
||||
local result_stackstring = nil
|
||||
|
||||
if srcitem then
|
||||
local prop = get_item_definition(srcitem)
|
||||
if prop and prop.cookresult_itemstring ~= "" then
|
||||
result_stackstring = prop.cookresult_itemstring
|
||||
src_cooktime = prop.furnace_cooktime or 3
|
||||
end
|
||||
end
|
||||
|
||||
local fuelitem = inv:get_stack("fuel", 1):peek_item()
|
||||
|
||||
if not result_stackstring or not fuelitem then
|
||||
if was_active then
|
||||
meta:set_infotext("Furnace is empty")
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
local burntime = -1
|
||||
if fuelitem then
|
||||
local prop = get_item_definition(fuelitem)
|
||||
if prop then
|
||||
burntime = prop.furnace_burntime or -1
|
||||
end
|
||||
end
|
||||
|
||||
if burntime <= 0 then
|
||||
meta:set_infotext("Furnace out of fuel")
|
||||
return
|
||||
end
|
||||
|
||||
meta:set_string("fuel_totaltime", burntime)
|
||||
meta:set_string("fuel_time", 0)
|
||||
|
||||
local stack = inv:get_stack("fuel", 1)
|
||||
stack:take_item()
|
||||
inv:set_stack("fuel", 1, stack)
|
||||
end,
|
||||
})
|
||||
minetest.register_abm({
|
||||
nodenames = {"experimental:luafurnace"},
|
||||
interval = 1.0,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
local fuellist = meta:inventory_get_list("fuel")
|
||||
local srclist = meta:inventory_get_list("src")
|
||||
local dstlist = meta:inventory_get_list("dst")
|
||||
if fuellist == nil or srclist == nil or dstlist == nil then
|
||||
return
|
||||
end
|
||||
_, srcitem = stackstring_take_item(srclist[1])
|
||||
_, fuelitem = stackstring_take_item(fuellist[1])
|
||||
if not srcitem or not fuelitem then return end
|
||||
if fuelitem.type == "node" then
|
||||
local prop = minetest.registered_nodes[fuelitem.name]
|
||||
if prop == nil then return end
|
||||
if prop.furnace_burntime < 0 then return end
|
||||
else
|
||||
return
|
||||
end
|
||||
local resultstack = nil
|
||||
if srcitem.type == "node" then
|
||||
local prop = minetest.registered_nodes[srcitem.name]
|
||||
if prop == nil then return end
|
||||
if prop.cookresult_item == "" then return end
|
||||
resultstack = prop.cookresult_item
|
||||
else
|
||||
return
|
||||
end
|
||||
|
||||
if resultstack == nil then
|
||||
return
|
||||
end
|
||||
|
||||
dstlist[1], success = stackstring_put_stackstring(dstlist[1], resultstack)
|
||||
if not success then
|
||||
return
|
||||
end
|
||||
|
||||
fuellist[1], _ = stackstring_take_item(fuellist[1])
|
||||
srclist[1], _ = stackstring_take_item(srclist[1])
|
||||
|
||||
meta:inventory_set_list("fuel", fuellist)
|
||||
meta:inventory_set_list("src", srclist)
|
||||
meta:inventory_set_list("dst", dstlist)
|
||||
|
||||
local total_cooked = meta:get_string("total_cooked")
|
||||
total_cooked = tonumber(total_cooked) + 1
|
||||
meta:set_string("total_cooked", total_cooked)
|
||||
meta:set_infotext("Lua Furnace: total cooked: "..total_cooked)
|
||||
end,
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = 'node "experimental:luafurnace" 1',
|
||||
recipe = {
|
||||
{'node "default:cobble"', 'node "default:cobble"', 'node "default:cobble"'},
|
||||
{'node "default:cobble"', 'node "default:steel_ingot"', 'node "default:cobble"'},
|
||||
{'node "default:cobble"', 'node "default:cobble"', 'node "default:cobble"'},
|
||||
}
|
||||
})
|
||||
--]]
|
||||
|
||||
--
|
||||
-- Random stuff
|
||||
--
|
||||
|
||||
--[[
|
||||
minetest.register_tool("experimental:horribletool", {
|
||||
image = "default_lava.png",
|
||||
basetime = 2.0
|
||||
dt_weight = 0.2
|
||||
dt_crackiness = 0.2
|
||||
dt_crumbliness = 0.2
|
||||
dt_cuttability = 0.2
|
||||
basedurability = 50
|
||||
dd_weight = -5
|
||||
dd_crackiness = -5
|
||||
dd_crumbliness = -5
|
||||
dd_cuttability = -5
|
||||
})
|
||||
--]]
|
||||
|
||||
--
|
||||
-- TNT (not functional)
|
||||
--
|
||||
@@ -662,6 +442,149 @@ minetest.register_abm({
|
||||
end,
|
||||
})--]]
|
||||
|
||||
minetest.register_node("experimental:tester_node_1", {
|
||||
description = "Tester Node 1 (construct/destruct/timer)",
|
||||
tile_images = {"wieldhand.png"},
|
||||
groups = {oddly_breakable_by_hand=2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
-- This was known to cause a bug in minetest.item_place_node() when used
|
||||
-- via minetest.env:place_node(), causing a placer with no position
|
||||
paramtype2 = "facedir",
|
||||
|
||||
on_construct = function(pos)
|
||||
experimental.print_to_everything("experimental:tester_node_1:on_construct("..minetest.pos_to_string(pos)..")")
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
meta:set_string("mine", "test")
|
||||
local timer = minetest.env:get_node_timer(pos)
|
||||
timer:start(4, 3)
|
||||
end,
|
||||
|
||||
after_place_node = function(pos, placer)
|
||||
experimental.print_to_everything("experimental:tester_node_1:after_place_node("..minetest.pos_to_string(pos)..")")
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
if meta:get_string("mine") == "test" then
|
||||
experimental.print_to_everything("correct metadata found")
|
||||
else
|
||||
experimental.print_to_everything("incorrect metadata found")
|
||||
end
|
||||
end,
|
||||
|
||||
on_destruct = function(pos)
|
||||
experimental.print_to_everything("experimental:tester_node_1:on_destruct("..minetest.pos_to_string(pos)..")")
|
||||
end,
|
||||
|
||||
after_destruct = function(pos)
|
||||
experimental.print_to_everything("experimental:tester_node_1:after_destruct("..minetest.pos_to_string(pos)..")")
|
||||
end,
|
||||
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
experimental.print_to_everything("experimental:tester_node_1:after_dig_node("..minetest.pos_to_string(pos)..")")
|
||||
end,
|
||||
|
||||
on_timer = function(pos, elapsed)
|
||||
experimental.print_to_everything("on_timer(): elapsed="..dump(elapsed))
|
||||
return true
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craftitem("experimental:tester_tool_1", {
|
||||
description = "Tester Tool 1",
|
||||
inventory_image = "experimental_tester_tool_1.png",
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
--print(dump(pointed_thing))
|
||||
if pointed_thing.type == "node" then
|
||||
if minetest.env:get_node(pointed_thing.under).name == "experimental:tester_node_1" then
|
||||
local p = pointed_thing.under
|
||||
minetest.log("action", "Tester tool used at "..minetest.pos_to_string(p))
|
||||
minetest.env:dig_node(p)
|
||||
else
|
||||
local p = pointed_thing.above
|
||||
minetest.log("action", "Tester tool used at "..minetest.pos_to_string(p))
|
||||
minetest.env:place_node(p, {name="experimental:tester_node_1"})
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'experimental:tester_tool_1',
|
||||
recipe = {
|
||||
{'group:crumbly'},
|
||||
{'group:crumbly'},
|
||||
}
|
||||
})
|
||||
|
||||
--[[minetest.register_on_joinplayer(function(player)
|
||||
minetest.after(3, function()
|
||||
player:set_inventory_formspec("size[8,7.5]"..
|
||||
"image[1,0.6;1,2;player.png]"..
|
||||
"list[current_player;main;0,3.5;8,4;]"..
|
||||
"list[current_player;craft;3,0;3,3;]"..
|
||||
"list[current_player;craftpreview;7,1;1,1;]")
|
||||
end)
|
||||
end)]]
|
||||
|
||||
-- Create a detached inventory
|
||||
local inv = minetest.create_detached_inventory("test_inventory", {
|
||||
allow_move = function(inv, from_list, from_index, to_list, to_index, count, player)
|
||||
experimental.print_to_everything("allow move asked")
|
||||
return count -- Allow all
|
||||
end,
|
||||
allow_put = function(inv, listname, index, stack, player)
|
||||
experimental.print_to_everything("allow put asked")
|
||||
return 1 -- Allow only 1
|
||||
end,
|
||||
allow_take = function(inv, listname, index, stack, player)
|
||||
experimental.print_to_everything("allow take asked")
|
||||
return 4 -- Allow 4 at max
|
||||
end,
|
||||
on_move = function(inv, from_list, from_index, to_list, to_index, count, player)
|
||||
experimental.print_to_everything(player:get_player_name().." moved items")
|
||||
end,
|
||||
on_put = function(inv, listname, index, stack, player)
|
||||
experimental.print_to_everything(player:get_player_name().." put items")
|
||||
end,
|
||||
on_take = function(inv, listname, index, stack, player)
|
||||
experimental.print_to_everything(player:get_player_name().." took items")
|
||||
end,
|
||||
})
|
||||
inv:set_size("main", 4*6)
|
||||
inv:add_item("main", "experimental:tester_tool_1")
|
||||
inv:add_item("main", "experimental:tnt 5")
|
||||
|
||||
minetest.register_chatcommand("test1", {
|
||||
params = "",
|
||||
description = "Test 1: Modify player's inventory view",
|
||||
func = function(name, param)
|
||||
local player = minetest.env:get_player_by_name(name)
|
||||
if not player then
|
||||
return
|
||||
end
|
||||
player:set_inventory_formspec(
|
||||
"size[13,7.5]"..
|
||||
"image[6,0.6;1,2;player.png]"..
|
||||
"list[current_player;main;5,3.5;8,4;]"..
|
||||
"list[current_player;craft;8,0;3,3;]"..
|
||||
"list[current_player;craftpreview;12,1;1,1;]"..
|
||||
"list[detached:test_inventory;main;0,0;4,6;0]"..
|
||||
"button[0.5,7;2,1;button1;Button 1]"..
|
||||
"button_exit[2.5,7;2,1;button2;Exit Button]"
|
||||
)
|
||||
minetest.chat_send_player(name, "Done.");
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
experimental.print_to_everything("Inventory fields 1: player="..player:get_player_name()..", fields="..dump(fields))
|
||||
end)
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
experimental.print_to_everything("Inventory fields 2: player="..player:get_player_name()..", fields="..dump(fields))
|
||||
return true -- Disable the first callback
|
||||
end)
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
experimental.print_to_everything("Inventory fields 3: player="..player:get_player_name()..", fields="..dump(fields))
|
||||
end)
|
||||
|
||||
minetest.log("experimental modname="..dump(minetest.get_current_modname()))
|
||||
minetest.log("experimental modpath="..dump(minetest.get_modpath("experimental")))
|
||||
minetest.log("experimental worldpath="..dump(minetest.get_worldpath()))
|
||||
|
||||
|
After Width: | Height: | Size: 209 B |
@@ -11,5 +11,6 @@ minetest.register_on_newplayer(function(player)
|
||||
player:get_inventory():add_item('main', 'default:pick_mese')
|
||||
player:get_inventory():add_item('main', 'default:mese 99')
|
||||
player:get_inventory():add_item('main', 'default:water_source 99')
|
||||
player:get_inventory():add_item('main', 'experimental:tester_tool_1')
|
||||
end)
|
||||
|
||||
|
||||
1
games/minimal/mods/stairs/depends.txt
Normal file
@@ -0,0 +1 @@
|
||||
default
|
||||
93
games/minimal/mods/stairs/init.lua
Normal file
@@ -0,0 +1,93 @@
|
||||
stairs = {}
|
||||
|
||||
-- Node will be called stairs:stair_<subname>
|
||||
function stairs.register_stair(subname, recipeitem, groups, images, description)
|
||||
minetest.register_node("stairs:stair_" .. subname, {
|
||||
description = description,
|
||||
drawtype = "nodebox",
|
||||
tile_images = images,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = true,
|
||||
groups = groups,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
{-0.5, 0, 0, 0.5, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'stairs:stair_' .. subname .. ' 4',
|
||||
recipe = {
|
||||
{recipeitem, "", ""},
|
||||
{recipeitem, recipeitem, ""},
|
||||
{recipeitem, recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
-- Node will be called stairs:slab_<subname>
|
||||
function stairs.register_slab(subname, recipeitem, groups, images, description)
|
||||
minetest.register_node("stairs:slab_" .. subname, {
|
||||
description = description,
|
||||
drawtype = "nodebox",
|
||||
tile_images = images,
|
||||
paramtype = "light",
|
||||
is_ground_content = true,
|
||||
groups = groups,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'stairs:slab_' .. subname .. ' 3',
|
||||
recipe = {
|
||||
{recipeitem, recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
-- Nodes will be called stairs:{stair,slab}_<subname>
|
||||
function stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab)
|
||||
stairs.register_stair(subname, recipeitem, groups, images, desc_stair)
|
||||
stairs.register_slab(subname, recipeitem, groups, images, desc_slab)
|
||||
end
|
||||
|
||||
stairs.register_stair_and_slab("wood", "default:wood",
|
||||
{snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
||||
{"default_wood.png"},
|
||||
"Wooden stair",
|
||||
"Wooden slab")
|
||||
|
||||
stairs.register_stair_and_slab("stone", "default:stone",
|
||||
{cracky=3},
|
||||
{"default_stone.png"},
|
||||
"Stone stair",
|
||||
"Stone slab")
|
||||
|
||||
stairs.register_stair_and_slab("cobble", "default:cobble",
|
||||
{cracky=3},
|
||||
{"default_cobble.png"},
|
||||
"Cobble stair",
|
||||
"Cobble slab")
|
||||
|
||||
stairs.register_stair_and_slab("brick", "default:brick",
|
||||
{cracky=3},
|
||||
{"default_brick.png"},
|
||||
"Brick stair",
|
||||
"Brick slab")
|
||||
|
||||
stairs.register_stair_and_slab("sandstone", "default:sandstone",
|
||||
{crumbly=2,cracky=2},
|
||||
{"default_sandstone.png"},
|
||||
"Sandstone stair",
|
||||
"Sandstone slab")
|
||||
@@ -15,7 +15,7 @@
|
||||
# https://bitbucket.org/celeron55/minetest/src/tip/src/defaultsettings.cpp
|
||||
#
|
||||
# A vim command to convert most of defaultsettings.cpp to conf file format:
|
||||
# :'<,'>s/\tg_settings\.setDefault("\([^"]*\)", "\([^"]*\)");.*/#\1 = \2/g
|
||||
# :'<,'>s/\tsettings->setDefault("\([^"]*\)", "\([^"]*\)");.*/#\1 = \2/g
|
||||
# Note: Some of the settings are implemented in Lua
|
||||
|
||||
#
|
||||
@@ -49,10 +49,21 @@
|
||||
#keymap_freemove = KEY_KEY_K
|
||||
#keymap_fastmove = KEY_KEY_J
|
||||
#keymap_screenshot = KEY_F12
|
||||
# If true, keymap_special1 instead of keymap_sneak is used for climbing down and descending
|
||||
#aux1_descends = false
|
||||
# Doubletaping the jump key toogles fly mode
|
||||
#doubletap_jump = false
|
||||
# If false aux1 is used to fly fast
|
||||
#always_fly_fast = true
|
||||
# Some (temporary) keys for debugging
|
||||
#keymap_print_debug_stacks = KEY_KEY_P
|
||||
#keymap_quicktune_prev = KEY_HOME
|
||||
#keymap_quicktune_next = KEY_END
|
||||
#keymap_quicktune_dec = KEY_NEXT
|
||||
#keymap_quicktune_inc = KEY_PRIOR
|
||||
|
||||
# The desired FPS
|
||||
# Minimum FPS
|
||||
# The amount of rendered stuff is dynamically set according to this
|
||||
#wanted_fps = 30
|
||||
# If FPS would go higher than this, limit it by sleeping
|
||||
# (to not waste CPU power for no benefit)
|
||||
@@ -69,6 +80,7 @@
|
||||
# when set to higher number than 0
|
||||
#fsaa = 0
|
||||
#vsync = false
|
||||
#fov = 72
|
||||
# Address to connect to (#blank = start local server)
|
||||
#address =
|
||||
# Enable random user input, for testing
|
||||
@@ -79,6 +91,16 @@
|
||||
#enable_fog = true
|
||||
# Enable a bit lower water surface; disable for speed (not quite optimized)
|
||||
#new_style_water = false
|
||||
# Constant volume liquids
|
||||
#liquid_finite = false
|
||||
# Update liquids every .. recommend for finite: 0.2
|
||||
#liquid_update = 1.0
|
||||
# When finite liquid: relax flowing blocks to source if level near max and N nearby source blocks, more realistic, but not true constant. values: 0,1,2,3,4 : 0 - disable, 1 - most aggresive
|
||||
#liquid_relax = 2
|
||||
# Optimization: faster cave flood (and not true constant)
|
||||
#liquid_fast_flood = 1
|
||||
# Underground water and lava springs, its infnity sources if liquid_finite enabled
|
||||
#underground_springs = 1
|
||||
# Enable nice leaves; disable for speed
|
||||
#new_style_leaves = true
|
||||
# Enable smooth lighting with simple ambient occlusion;
|
||||
@@ -86,7 +108,7 @@
|
||||
#smooth_lighting = true
|
||||
# Enable combining mainly used textures to a bigger one for improved speed
|
||||
# disable if it causes graphics glitches.
|
||||
#enable_texture_atlas = true
|
||||
#enable_texture_atlas = false
|
||||
# Path to texture directory. All textures are first searched from here.
|
||||
#texture_path =
|
||||
# Video back-end.
|
||||
@@ -106,22 +128,75 @@
|
||||
#farmesh_distance = 40
|
||||
# Enable/disable clouds
|
||||
#enable_clouds = true
|
||||
#cloud_height = 120
|
||||
#enable_3d_clouds = true
|
||||
# Use a cloud animation for the main menu background
|
||||
#menu_clouds = true
|
||||
# Path for screenshots
|
||||
#screenshot_path = .
|
||||
# Amount of view bobbing (0 = no view bobbing, 1.0 = normal, 2.0 = double)
|
||||
#view_bobbing_amount = 1.0
|
||||
# Anaglyph stereo
|
||||
#anaglyph = false
|
||||
#anaglyph_strength = 0.1
|
||||
# In-game chat console background color (R,G,B)
|
||||
#console_color = (0,0,0)
|
||||
# In-game chat console background alpha (opaqueness, between 0 and 255)
|
||||
#console_alpha = 200
|
||||
# Selection box border color (R,G,B)
|
||||
#selectionbox_color = (0,0,0)
|
||||
# Crosshair color (R,G,B)
|
||||
#crosshair_color = (255,255,255)
|
||||
# Cross alpha (opaqueness, between 0 and 255)
|
||||
#crosshair_alpha = 255
|
||||
# Sound settings
|
||||
#enable_sound = true
|
||||
#sound_volume = 0.7
|
||||
# Whether node texture animations should be desynchronized per MapBlock
|
||||
#desynchronize_mapblock_texture_animation = true
|
||||
# Texture filtering settings
|
||||
#mip_map = false
|
||||
#anisotropic_filter = false
|
||||
#bilinear_filter = false
|
||||
#trilinear_filter = false
|
||||
# Set to true to pre-generate all item visuals
|
||||
#preload_item_visuals = true
|
||||
# 0: disable shaders
|
||||
# (1: low level shaders; not implemented)
|
||||
# 2: enable high level shaders
|
||||
#enable_shaders = 2
|
||||
# The time in seconds it takes between repeated
|
||||
# right clicks when holding the right mouse button
|
||||
#repeat_rightclick_time = 0.25
|
||||
|
||||
# will only work for servers which use remote_media setting
|
||||
# and only for clients compiled with cURL
|
||||
#media_fetch_threads = 8
|
||||
|
||||
# Url to the server list displayed in the Multiplayer Tab
|
||||
#serverlist_url = servers.minetest.net
|
||||
# File in client/serverlist/ that contains your favorite servers displayed in the Multiplayer Tab
|
||||
#serverlist_file = favoriteservers.txt
|
||||
|
||||
#font_path = fonts/liberationsans.ttf
|
||||
#font_size = 13
|
||||
#mono_font_path = fonts/liberationmono.ttf
|
||||
#mono_font_size = 13
|
||||
|
||||
#
|
||||
# Server stuff
|
||||
#
|
||||
|
||||
# Name of server
|
||||
#server_name = Minetest server
|
||||
# Description of server
|
||||
#server_description = mine here
|
||||
# Domain name of server
|
||||
#server_address = game.minetest.net
|
||||
# Homepage of server
|
||||
#server_url = http://minetest.net
|
||||
# Automaticaly report to masterserver
|
||||
#server_announce = 0
|
||||
# Default game (default when creating a new world)
|
||||
#default_game = minetest
|
||||
# World directory (everything in the world is stored here)
|
||||
@@ -130,8 +205,8 @@
|
||||
#motd = Welcome to this awesome Minetest server!
|
||||
# Maximum number of players connected simultaneously
|
||||
#max_users = 100
|
||||
# Set to false to allow old clients to connect
|
||||
#strict_protocol_version_checking = true
|
||||
# Set to true to disallow old clients from connecting
|
||||
#strict_protocol_version_checking = false
|
||||
# Set to true to enable creative mode (unlimited inventory)
|
||||
#creative_mode = false
|
||||
# Enable players getting damage and dying
|
||||
@@ -144,14 +219,21 @@
|
||||
#give_initial_stuff = false
|
||||
# New users need to input this password
|
||||
#default_password =
|
||||
# Available privileges: build, teleport, settime, privs, shout
|
||||
#default_privs = build, shout
|
||||
# Available privileges: interact, shout, teleport, settime, privs, ...
|
||||
# See /privs in game for a full list on your server and mod configuration.
|
||||
#default_privs = interact, shout
|
||||
# Whether players are shown to clients without any range limit
|
||||
#unlimited_player_transfer_distance = true
|
||||
# Whether to enable players killing each other
|
||||
#enable_pvp = true
|
||||
# If this is set, players will always (re)spawn at the given position
|
||||
#static_spawnpoint = 0, 10, 0
|
||||
# If true, new players cannot join with an empty password
|
||||
#disallow_empty_password = false
|
||||
# If true, disable cheat prevention in multiplayer
|
||||
#disable_anticheat = false
|
||||
# If true, actions are recorded for rollback
|
||||
#enable_rollback_recording = false
|
||||
|
||||
# Profiler data print interval. #0 = disable.
|
||||
#profiler_print_interval = 0
|
||||
@@ -178,4 +260,96 @@
|
||||
# To reduce lag, block transfers are slowed down when a player is building something.
|
||||
# This determines how long they are slowed down after placing or removing a node.
|
||||
#full_block_send_enable_min_time_from_building = 2.0
|
||||
# Length of a server tick and the interval at which objects are generally updated over network
|
||||
#dedicated_server_step = 0.1
|
||||
# Can be set to true to disable shutting down on invalid world data
|
||||
#ignore_world_load_errors = false
|
||||
# Congestion control parameters
|
||||
# time in seconds, rate in ~500B packets
|
||||
#congestion_control_aim_rtt = 0.2
|
||||
#congestion_control_max_rate = 400
|
||||
#congestion_control_min_rate = 10
|
||||
# Specifies URL from which client fetches media instead of using UDP
|
||||
# $filename should be accessible from $remote_media$filename via cURL
|
||||
# (obviously, remote_media should end with a slash)
|
||||
# Files that are not present would be fetched the usual way
|
||||
#remote_media =
|
||||
# Level of logging to be written to debug.txt.
|
||||
# 0 = none, 1 = errors and debug, 2 = action, 3 = info, 4 = verbose
|
||||
#debug_log_level = 2
|
||||
# Maximum number of blocks that can be queued for loading.
|
||||
#emergequeue_limit_total = 256
|
||||
# Maximum number of blocks to be queued that are to be loaded from file.
|
||||
# Leave blank for an appropriate amount to be chosen automatically.
|
||||
#emergequeue_limit_diskonly =
|
||||
# Maximum number of blocks to be queued that are to be generated.
|
||||
# Leave blank for an appropriate amount to be chosen automatically.
|
||||
#emergequeue_limit_generate =
|
||||
# Number of emerge threads to use. Make this field blank, or increase this number, to use multiple threads.
|
||||
# On multiprocessor systems, this will improve mapgen speed greatly, at the cost of slightly buggy caves.
|
||||
#num_emerge_threads = 1
|
||||
|
||||
#
|
||||
# Physics stuff
|
||||
#
|
||||
|
||||
#movement_acceleration_default = 3
|
||||
#movement_acceleration_air = 2
|
||||
#movement_acceleration_fast = 10
|
||||
#movement_speed_walk = 4
|
||||
#movement_speed_crouch = 1.35
|
||||
#movement_speed_fast = 20
|
||||
#movement_speed_climb = 2
|
||||
#movement_speed_jump = 6.5
|
||||
#movement_speed_descend = 6
|
||||
#movement_liquid_fluidity = 1
|
||||
#movement_liquid_fluidity_smooth = 0.5
|
||||
#movement_liquid_sink = 10
|
||||
#movement_gravity = 9.81
|
||||
|
||||
#
|
||||
# Mapgen stuff
|
||||
#
|
||||
|
||||
# Name of map generator to be used. Currently v6, indev and singlenode are supported.
|
||||
#mg_name = v6
|
||||
# Water level of map.
|
||||
#water_level = 1
|
||||
# Size of chunks to be generated.
|
||||
#chunksize = 5
|
||||
# Map generation attributes. Currently supported: trees, caves, flat, v6_biome_blend, v6_jungles, dungeons
|
||||
#mg_flags = trees, caves, v6_biome_blend
|
||||
# How large deserts and beaches are
|
||||
#mgv6_freq_desert = 0.45
|
||||
#mgv6_freq_beach = 0.15
|
||||
# Perlin noise attributes for different map generation parameters
|
||||
# Offset, scale, spread factor, seed offset, number of octaves, persistence
|
||||
#mgv6_np_terrain_base = -4, 20, (250, 250, 250), 82341, 5, 0.6
|
||||
#mgv6_np_terrain_higher = 20, 16, (500, 500, 500), 85039, 5, 0.6
|
||||
#mgv6_np_steepness = 0.85, 0.5, (125, 125, 125), -932, 5, 0.7
|
||||
#mgv6_np_height_select = 0.5, 1, (250, 250, 250), 4213, 5, 0.69
|
||||
#mgv6_np_mud = 4, 2, (200, 200, 200), 91013, 3, 0.55
|
||||
#mgv6_np_beach = 0, 1, (250, 250, 250), 59420, 3, 0.50
|
||||
#mgv6_np_biome = 0, 1, (250, 250, 250), 9130, 3, 0.50
|
||||
#mgv6_np_cave = 6, 6, (250, 250, 250), 34329, 3, 0.50
|
||||
#mgv6_np_humidity = 0.5, 0.5, (500, 500, 500), 72384, 4, 0.66
|
||||
#mgv6_np_trees = 0, 1, (125, 125, 125), 2, 4, 0.66
|
||||
#mgv6_np_apple_trees = 0, 1, (100, 100, 100), 342902, 3, 0.45
|
||||
|
||||
#mgv7_np_terrain = 10, 12, (350, 350, 350), 82341, 5, 0.6
|
||||
#mgv7_np_bgroup = 0.5, 0.3125, (350, 350, 350), 5923, 2, 0.6
|
||||
#mgv7_np_heat = 25, 50, (500, 500, 500), 35293, 1, 0
|
||||
#mgv7_np_humidity = 50, 31.25, (750, 750, 750), 12094, 2, 0.6
|
||||
|
||||
# Offset, scale, spread factor, seed offset, number of octaves, persistence, farscale, farspread
|
||||
#mgindev_np_terrain_base = -4, 20, (250, 250, 250), 82341, 5, 0.6, 10, 10
|
||||
#mgindev_np_terrain_higher = 20, 16, (500, 500, 500), 85039, 5, 0.6, 10, 10
|
||||
#mgindev_np_steepness = 0.85, 0.5, (125, 125, 125), -932, 5, 0.7, 2, 10
|
||||
#mgindev_np_mud = 4, 2, (200, 200, 200), 91013, 3, 0.55, 1, 1
|
||||
#mgindev_np_float_islands1 = 0, 1, (64, 64, 64 ), 3683, 5, 0.5, 1, 1.5
|
||||
#mgindev_np_float_islands2 = 0, 1, (8, 8, 8 ), 9292, 2, 0.5, 1, 1.5
|
||||
#mgindev_np_float_islands3 = 0, 1, (256, 256, 256), 6412, 2, 0.5, 1, 0.5
|
||||
#mgindev_np_biome = 0, 1, (250, 250, 250), 9130, 3, 0.50, 1, 10
|
||||
|
||||
# Float islands starts from height, 0 to disable
|
||||
#mgindev_float_islands = 500
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Minetest-c55 changelog
|
||||
Minetest changelog
|
||||
----------------------
|
||||
This should contain all the major changes.
|
||||
For minor stuff, refer to the commit log of the repository.
|
||||
|
||||
1125
po/da/minetest.po
1117
po/de/minetest.po
779
po/es/minetest.po
Normal file
@@ -0,0 +1,779 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: minetest\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-03-30 19:56+0100\n"
|
||||
"PO-Revision-Date: 2013-04-03 17:22+0200\n"
|
||||
"Last-Translator: Diego Martínez <lkaezadl3@gmail.com>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: es\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Weblate 1.4-dev\n"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:125
|
||||
msgid ""
|
||||
"Warning: Some mods are not configured yet.\n"
|
||||
"They will be enabled by default when you save the configuration. "
|
||||
msgstr ""
|
||||
"ADVERTENCIA: Algunos mods no están aún configurados.\n"
|
||||
"Se habilitarán de forma predeterminada al guardar la configuración. "
|
||||
|
||||
#: src/guiConfigureWorld.cpp:144
|
||||
msgid ""
|
||||
"Warning: Some configured mods are missing.\n"
|
||||
"Their setting will be removed when you save the configuration. "
|
||||
msgstr ""
|
||||
"ADVERTENCIA: Algunos mods configurados faltan.\n"
|
||||
"Su ajuste se quitará al guardar la configuración. "
|
||||
|
||||
#: src/guiConfigureWorld.cpp:208
|
||||
msgid "enabled"
|
||||
msgstr "Activado"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:215
|
||||
msgid "Enable All"
|
||||
msgstr "Activar todos"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:222
|
||||
msgid "Disable All"
|
||||
msgstr "Desactivar todos"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:228
|
||||
msgid "depends on:"
|
||||
msgstr "Dependencias:"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:240
|
||||
msgid "is required by:"
|
||||
msgstr "es requerido por:"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:262 src/guiCreateWorld.cpp:165
|
||||
#: src/guiKeyChangeMenu.cpp:179 src/keycode.cpp:223
|
||||
msgid "Cancel"
|
||||
msgstr "Cancelar"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:268 src/guiKeyChangeMenu.cpp:173
|
||||
msgid "Save"
|
||||
msgstr "Guardar"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:394
|
||||
msgid "Configuration saved. "
|
||||
msgstr "Configuración guardada. "
|
||||
|
||||
#: src/guiConfigureWorld.cpp:402
|
||||
msgid "Warning: Configuration not consistent. "
|
||||
msgstr "ADVERTENCIA: La configuración no corresponde. "
|
||||
|
||||
#: src/guiConfirmMenu.cpp:120
|
||||
msgid "Yes"
|
||||
msgstr "Sí"
|
||||
|
||||
#: src/guiConfirmMenu.cpp:126
|
||||
msgid "No"
|
||||
msgstr "No"
|
||||
|
||||
#: src/guiCreateWorld.cpp:116
|
||||
msgid "World name"
|
||||
msgstr "Nombre del mundo"
|
||||
|
||||
#: src/guiCreateWorld.cpp:135
|
||||
msgid "Game"
|
||||
msgstr "Juego"
|
||||
|
||||
#: src/guiCreateWorld.cpp:159
|
||||
msgid "Create"
|
||||
msgstr "Crear"
|
||||
|
||||
#: src/guiDeathScreen.cpp:96
|
||||
msgid "You died."
|
||||
msgstr "Has muerto."
|
||||
|
||||
#: src/guiDeathScreen.cpp:104
|
||||
msgid "Respawn"
|
||||
msgstr "Revivir"
|
||||
|
||||
#: src/guiFormSpecMenu.cpp:582
|
||||
msgid "Left click: Move all items, Right click: Move single item"
|
||||
msgstr ""
|
||||
"Click izquierdo: Mover todos los objetos. Click derecho: Mover un objeto."
|
||||
|
||||
#: src/guiFormSpecMenu.cpp:607 src/guiMessageMenu.cpp:109
|
||||
#: src/guiTextInputMenu.cpp:131
|
||||
msgid "Proceed"
|
||||
msgstr "Continuar"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:114
|
||||
msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)"
|
||||
msgstr ""
|
||||
"Combinaciones de teclas.(Si este menú da error, cambiar configuración en "
|
||||
"minetest.conf)"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:151
|
||||
msgid "\"Use\" = climb down"
|
||||
msgstr "\"Usar\" = Descender"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:164
|
||||
msgid "Double tap \"jump\" to toggle fly"
|
||||
msgstr "Dos veces \"saltar\" para volar"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:269
|
||||
msgid "Key already in use"
|
||||
msgstr "La tecla se está utilizando"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:347
|
||||
msgid "press key"
|
||||
msgstr "Pulsa una tecla"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:372
|
||||
msgid "Forward"
|
||||
msgstr "Adelante"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:373
|
||||
msgid "Backward"
|
||||
msgstr "Atrás"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:374 src/keycode.cpp:228
|
||||
msgid "Left"
|
||||
msgstr "Izquierda"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:375 src/keycode.cpp:228
|
||||
msgid "Right"
|
||||
msgstr "Derecha"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:376
|
||||
msgid "Use"
|
||||
msgstr "Usar"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:377
|
||||
msgid "Jump"
|
||||
msgstr "Saltar"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:378
|
||||
msgid "Sneak"
|
||||
msgstr "Caminar"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:379
|
||||
msgid "Drop"
|
||||
msgstr "Tirar"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:380
|
||||
msgid "Inventory"
|
||||
msgstr "Inventario"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:381
|
||||
msgid "Chat"
|
||||
msgstr "Chat"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:382
|
||||
msgid "Command"
|
||||
msgstr "Comando"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:383
|
||||
msgid "Console"
|
||||
msgstr "Consola"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:384
|
||||
msgid "Toggle fly"
|
||||
msgstr "Activar Volar"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:385
|
||||
msgid "Toggle fast"
|
||||
msgstr "Activar Modo Rápido"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:386
|
||||
msgid "Toggle noclip"
|
||||
msgstr "Activar noclip"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:387
|
||||
msgid "Range select"
|
||||
msgstr "Seleccionar distancia"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:388
|
||||
msgid "Print stacks"
|
||||
msgstr "Imprimir Pilas"
|
||||
|
||||
#: src/guiMainMenu.cpp:92
|
||||
msgid "Cannot create world: Name contains invalid characters"
|
||||
msgstr "No se puede crear el mundo: El nombre contiene caracteres no válidos"
|
||||
|
||||
#: src/guiMainMenu.cpp:101
|
||||
msgid "Cannot create world: A world by this name already exists"
|
||||
msgstr "No se puede crear el mundo: Hay un mundo con este nombre"
|
||||
|
||||
#: src/guiMainMenu.cpp:283
|
||||
msgid "Singleplayer"
|
||||
msgstr "Un jugador"
|
||||
|
||||
#: src/guiMainMenu.cpp:284
|
||||
msgid "Multiplayer"
|
||||
msgstr "Multijugador"
|
||||
|
||||
#: src/guiMainMenu.cpp:285
|
||||
msgid "Advanced"
|
||||
msgstr "Avanzado"
|
||||
|
||||
#: src/guiMainMenu.cpp:286
|
||||
msgid "Settings"
|
||||
msgstr "Configuración"
|
||||
|
||||
#: src/guiMainMenu.cpp:287
|
||||
msgid "Credits"
|
||||
msgstr "Créditos"
|
||||
|
||||
#: src/guiMainMenu.cpp:317
|
||||
msgid "Select World:"
|
||||
msgstr "Selecciona un mundo:"
|
||||
|
||||
#: src/guiMainMenu.cpp:339 src/guiMainMenu.cpp:511 src/keycode.cpp:229
|
||||
msgid "Delete"
|
||||
msgstr "Borrar"
|
||||
|
||||
#: src/guiMainMenu.cpp:346
|
||||
msgid "New"
|
||||
msgstr "Nuevo"
|
||||
|
||||
#: src/guiMainMenu.cpp:354
|
||||
msgid "Configure"
|
||||
msgstr "Configurar"
|
||||
|
||||
#: src/guiMainMenu.cpp:369 src/keycode.cpp:248
|
||||
msgid "Play"
|
||||
msgstr "Jugar"
|
||||
|
||||
#: src/guiMainMenu.cpp:380 src/guiMainMenu.cpp:619
|
||||
msgid "Creative Mode"
|
||||
msgstr "Modo creativo"
|
||||
|
||||
#: src/guiMainMenu.cpp:386 src/guiMainMenu.cpp:625
|
||||
msgid "Enable Damage"
|
||||
msgstr "Permitir daños"
|
||||
|
||||
#: src/guiMainMenu.cpp:406 src/guiMainMenu.cpp:541
|
||||
msgid "Name/Password"
|
||||
msgstr "Nombre/Clave"
|
||||
|
||||
#: src/guiMainMenu.cpp:442 src/guiMainMenu.cpp:459 src/guiMainMenu.cpp:1184
|
||||
msgid "Favorites:"
|
||||
msgstr "Favoritos:"
|
||||
|
||||
#: src/guiMainMenu.cpp:450 src/guiMainMenu.cpp:1194
|
||||
msgid "Public Server List:"
|
||||
msgstr "Lista de Servidores Públicos:"
|
||||
|
||||
#: src/guiMainMenu.cpp:470 src/guiMainMenu.cpp:568
|
||||
msgid "Address/Port"
|
||||
msgstr "Dirección/Puerto"
|
||||
|
||||
#: src/guiMainMenu.cpp:497 src/guiMainMenu.cpp:1183
|
||||
msgid "Show Public"
|
||||
msgstr "Servidores Públicos"
|
||||
|
||||
#: src/guiMainMenu.cpp:501 src/guiMainMenu.cpp:1193
|
||||
msgid "Show Favorites"
|
||||
msgstr "Mostrar Favoritos"
|
||||
|
||||
#: src/guiMainMenu.cpp:521
|
||||
msgid "Connect"
|
||||
msgstr "Conectar"
|
||||
|
||||
#: src/guiMainMenu.cpp:591
|
||||
msgid "Leave address blank to start a local server."
|
||||
msgstr "Dejar la dirección en blanco para iniciar un servidor local."
|
||||
|
||||
#: src/guiMainMenu.cpp:600
|
||||
msgid "Start Game / Connect"
|
||||
msgstr "Iniciar juego/Conectar"
|
||||
|
||||
#: src/guiMainMenu.cpp:632
|
||||
msgid "Public"
|
||||
msgstr "Público"
|
||||
|
||||
#: src/guiMainMenu.cpp:640 src/guiMainMenu.cpp:1113
|
||||
msgid "Delete world"
|
||||
msgstr "Eliminar Mundo"
|
||||
|
||||
#: src/guiMainMenu.cpp:647
|
||||
msgid "Create world"
|
||||
msgstr "Crear Mundo"
|
||||
|
||||
#: src/guiMainMenu.cpp:681
|
||||
msgid "Fancy trees"
|
||||
msgstr "Árboles detallados"
|
||||
|
||||
#: src/guiMainMenu.cpp:687
|
||||
msgid "Smooth Lighting"
|
||||
msgstr "Iluminación Suave"
|
||||
|
||||
#: src/guiMainMenu.cpp:693
|
||||
msgid "3D Clouds"
|
||||
msgstr "Nubes 3D"
|
||||
|
||||
#: src/guiMainMenu.cpp:699
|
||||
msgid "Opaque water"
|
||||
msgstr "Agua Opaca"
|
||||
|
||||
#: src/guiMainMenu.cpp:709
|
||||
msgid "Mip-Mapping"
|
||||
msgstr "Mip-Mapping"
|
||||
|
||||
#: src/guiMainMenu.cpp:716
|
||||
msgid "Anisotropic Filtering"
|
||||
msgstr "Filtrado Anisotrópico"
|
||||
|
||||
#: src/guiMainMenu.cpp:723
|
||||
msgid "Bi-Linear Filtering"
|
||||
msgstr "Filtrado Bi-Lineal"
|
||||
|
||||
#: src/guiMainMenu.cpp:730
|
||||
msgid "Tri-Linear Filtering"
|
||||
msgstr "Filtrado Tri-Lineal"
|
||||
|
||||
#: src/guiMainMenu.cpp:738
|
||||
msgid "Shaders"
|
||||
msgstr "Sombreadores"
|
||||
|
||||
#: src/guiMainMenu.cpp:745
|
||||
msgid "Preload item visuals"
|
||||
msgstr "Precarga elementos visuales"
|
||||
|
||||
#: src/guiMainMenu.cpp:752
|
||||
msgid "Enable Particles"
|
||||
msgstr "Habilitar partículas"
|
||||
|
||||
#: src/guiMainMenu.cpp:759
|
||||
msgid "Finite liquid"
|
||||
msgstr "Líquidos Finitos"
|
||||
|
||||
#: src/guiMainMenu.cpp:769
|
||||
msgid "Change keys"
|
||||
msgstr "Configurar Teclas"
|
||||
|
||||
#: src/guiMainMenu.cpp:1084
|
||||
msgid "Address required."
|
||||
msgstr "Requiere una dirección."
|
||||
|
||||
#: src/guiMainMenu.cpp:1102
|
||||
msgid "Cannot delete world: Nothing selected"
|
||||
msgstr "No se puede eliminar el mundo: ninguno ha sido seleccionado"
|
||||
|
||||
#: src/guiMainMenu.cpp:1117
|
||||
msgid "Files to be deleted"
|
||||
msgstr "Archivos que se eliminarán"
|
||||
|
||||
#: src/guiMainMenu.cpp:1133
|
||||
msgid "Cannot create world: No games found"
|
||||
msgstr "No se puede crear el mundo: No se encontraron juegos"
|
||||
|
||||
#: src/guiMainMenu.cpp:1149
|
||||
msgid "Cannot configure world: Nothing selected"
|
||||
msgstr "No se puede configurar el mundo: Ninguno seleccionado"
|
||||
|
||||
#: src/guiMainMenu.cpp:1256
|
||||
msgid "Failed to delete all world files"
|
||||
msgstr "No se pudo eliminar todos los archivos del mundo"
|
||||
|
||||
#: src/guiPasswordChange.cpp:108
|
||||
msgid "Old Password"
|
||||
msgstr "Contraseña anterior"
|
||||
|
||||
#: src/guiPasswordChange.cpp:125
|
||||
msgid "New Password"
|
||||
msgstr "Nueva contraseña"
|
||||
|
||||
#: src/guiPasswordChange.cpp:141
|
||||
msgid "Confirm Password"
|
||||
msgstr "Confirmar contraseña"
|
||||
|
||||
#: src/guiPasswordChange.cpp:158
|
||||
msgid "Change"
|
||||
msgstr "Cambiar"
|
||||
|
||||
#: src/guiPasswordChange.cpp:167
|
||||
msgid "Passwords do not match!"
|
||||
msgstr "¡Las contraseñas no coinciden!"
|
||||
|
||||
#: src/guiPauseMenu.cpp:123
|
||||
msgid "Continue"
|
||||
msgstr "Continuar"
|
||||
|
||||
#: src/guiPauseMenu.cpp:132
|
||||
msgid "Change Password"
|
||||
msgstr "Modificar contraseña"
|
||||
|
||||
#: src/guiPauseMenu.cpp:140
|
||||
msgid "Sound Volume"
|
||||
msgstr "Volúmen del Sonido"
|
||||
|
||||
#: src/guiPauseMenu.cpp:147
|
||||
msgid "Exit to Menu"
|
||||
msgstr "Salir al menú"
|
||||
|
||||
#: src/guiPauseMenu.cpp:154
|
||||
msgid "Exit to OS"
|
||||
msgstr "Salir al S.O."
|
||||
|
||||
#: src/guiPauseMenu.cpp:161
|
||||
msgid ""
|
||||
"Default Controls:\n"
|
||||
"- WASD: Walk\n"
|
||||
"- Mouse left: dig/hit\n"
|
||||
"- Mouse right: place/use\n"
|
||||
"- Mouse wheel: select item\n"
|
||||
"- 0...9: select item\n"
|
||||
"- Shift: sneak\n"
|
||||
"- R: Toggle viewing all loaded chunks\n"
|
||||
"- I: Inventory menu\n"
|
||||
"- ESC: This menu\n"
|
||||
"- T: Chat\n"
|
||||
msgstr ""
|
||||
"Controles predeterminados:\n"
|
||||
"- WASD: Caminar \n"
|
||||
"- Ratón, izquierdo: Cavar/Golpear\n"
|
||||
"- Ratón, derecho: Poner bloque/Usar\n"
|
||||
"- Ratón, rueda: seleccionar objecto\n"
|
||||
"- 0... 9: Seleccionar objecto\n"
|
||||
"- Mayúscula: caminar despacio\n"
|
||||
"- R: Ajustar distancia de los pedazos cargados\n"
|
||||
"- I: Inventario \n"
|
||||
"- ESC: Este Menu\n"
|
||||
"- T: Conversar\n"
|
||||
|
||||
#: src/guiVolumeChange.cpp:108
|
||||
msgid "Sound Volume: "
|
||||
msgstr "Volúmen del Sonido: "
|
||||
|
||||
#: src/guiVolumeChange.cpp:121
|
||||
msgid "Exit"
|
||||
msgstr "Salir"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Left Button"
|
||||
msgstr "Click Izquierdo"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Middle Button"
|
||||
msgstr "Click Centro"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Right Button"
|
||||
msgstr "Click Derecho"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "X Button 1"
|
||||
msgstr "X Button 1"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Back"
|
||||
msgstr "Atras"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Clear"
|
||||
msgstr "Limpiar"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Return"
|
||||
msgstr "Intro"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Tab"
|
||||
msgstr "Tabulador"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "X Button 2"
|
||||
msgstr "X Button 2"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Capital"
|
||||
msgstr "Bloq mayús"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Control"
|
||||
msgstr "Control"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Kana"
|
||||
msgstr "Kana"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Menu"
|
||||
msgstr "Menú"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Pause"
|
||||
msgstr "Pausa"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Shift"
|
||||
msgstr "Mayús"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Convert"
|
||||
msgstr "Convertir"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Escape"
|
||||
msgstr "Escape"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Final"
|
||||
msgstr "Final"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Junja"
|
||||
msgstr "Junja"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Kanji"
|
||||
msgstr "Kanji"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Nonconvert"
|
||||
msgstr "No convertir"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Accept"
|
||||
msgstr "Aceptar"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "End"
|
||||
msgstr "Fin"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Home"
|
||||
msgstr "Inicio"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Mode Change"
|
||||
msgstr "Cambio de modo"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Next"
|
||||
msgstr "Siguiente"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Prior"
|
||||
msgstr "Anterior"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Space"
|
||||
msgstr "Espacio"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Down"
|
||||
msgstr "Abajo"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Execute"
|
||||
msgstr "Ejecutar"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Print"
|
||||
msgstr "Captura"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Select"
|
||||
msgstr "Seleccionar"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Up"
|
||||
msgstr "Arriba"
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Help"
|
||||
msgstr "Ayuda"
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Insert"
|
||||
msgstr "Introducir"
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Snapshot"
|
||||
msgstr "Captura de pantalla"
|
||||
|
||||
#: src/keycode.cpp:232
|
||||
msgid "Left Windows"
|
||||
msgstr "Win Izquierdo"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Apps"
|
||||
msgstr "Aplicaciones"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Numpad 0"
|
||||
msgstr "Teclado numérico 0"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Numpad 1"
|
||||
msgstr "Teclado Numérico 1"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Right Windows"
|
||||
msgstr "Win Derecho"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Sleep"
|
||||
msgstr "Suspender"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 2"
|
||||
msgstr "Teclado numérico 2"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 3"
|
||||
msgstr "Teclado Numérico 3"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 4"
|
||||
msgstr "Teclado numérico 4"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 5"
|
||||
msgstr "Teclado Numérico 5"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 6"
|
||||
msgstr "Teclado Numérico 6"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 7"
|
||||
msgstr "Teclado numérico 7"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad *"
|
||||
msgstr "Teclado numérico *"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad +"
|
||||
msgstr "Teclado Numérico +"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad -"
|
||||
msgstr "Teclado Numérico -"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad /"
|
||||
msgstr "Teclado Numérico /"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad 8"
|
||||
msgstr "Teclado Numérico 8"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad 9"
|
||||
msgstr "Teclado Numérico 9"
|
||||
|
||||
#: src/keycode.cpp:239
|
||||
msgid "Num Lock"
|
||||
msgstr "Bloq Núm"
|
||||
|
||||
#: src/keycode.cpp:239
|
||||
msgid "Scroll Lock"
|
||||
msgstr "Bloq Despl"
|
||||
|
||||
#: src/keycode.cpp:240
|
||||
msgid "Left Shift"
|
||||
msgstr "Mayús Izqda"
|
||||
|
||||
#: src/keycode.cpp:240
|
||||
msgid "Right Shift"
|
||||
msgstr "Mayús Dcha"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Left Control"
|
||||
msgstr "Control Izqdo"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Left Menu"
|
||||
msgstr "Menú Izquierdo"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Right Control"
|
||||
msgstr "Control Dcho"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Right Menu"
|
||||
msgstr "Menú Derecho"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Comma"
|
||||
msgstr "Coma"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Minus"
|
||||
msgstr "Menos"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Period"
|
||||
msgstr "Punto"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Plus"
|
||||
msgstr "Más"
|
||||
|
||||
#: src/keycode.cpp:247
|
||||
msgid "Attn"
|
||||
msgstr "Attn"
|
||||
|
||||
#: src/keycode.cpp:247
|
||||
msgid "CrSel"
|
||||
msgstr "CrSel"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "Erase OEF"
|
||||
msgstr "Borrar OEF"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "ExSel"
|
||||
msgstr "ExSel"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "OEM Clear"
|
||||
msgstr "OEM Limpiar"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "PA1"
|
||||
msgstr "PA1"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "Zoom"
|
||||
msgstr "Zoom"
|
||||
|
||||
#: src/main.cpp:1506
|
||||
msgid "Main Menu"
|
||||
msgstr "Menú Principal"
|
||||
|
||||
#: src/main.cpp:1830
|
||||
msgid "Failed to initialize world"
|
||||
msgstr "Fallo al iniciar el mundo"
|
||||
|
||||
#: src/main.cpp:1842
|
||||
msgid "No world selected and no address provided. Nothing to do."
|
||||
msgstr ""
|
||||
"No se seleccionó mundo y no se ha especificado una dirección. Nada que hacer."
|
||||
|
||||
#: src/main.cpp:1850
|
||||
msgid "Could not find or load game \""
|
||||
msgstr "No se puede encontrar o cargar el juego \""
|
||||
|
||||
#: src/main.cpp:1864
|
||||
msgid "Invalid gamespec."
|
||||
msgstr "Juego especificado no válido."
|
||||
|
||||
#: src/main.cpp:1904
|
||||
msgid "Connection error (timed out?)"
|
||||
msgstr "Error de conexión (¿tiempo agotado?)"
|
||||
|
||||
#: src/main.cpp:1915
|
||||
msgid ""
|
||||
"\n"
|
||||
"Check debug.txt for details."
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Consulta debug.txt para obtener más detalles."
|
||||
778
po/et/minetest.po
Normal file
@@ -0,0 +1,778 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: minetest\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-03-30 19:56+0100\n"
|
||||
"PO-Revision-Date: 2013-04-03 17:02+0200\n"
|
||||
"Last-Translator: Pilz Adam <PilzAdam@gmx.de>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: et\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Weblate 1.4-dev\n"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:125
|
||||
msgid ""
|
||||
"Warning: Some mods are not configured yet.\n"
|
||||
"They will be enabled by default when you save the configuration. "
|
||||
msgstr ""
|
||||
"Hoiatus: Mõned modifikatsioonid pole sätitud veel.\n"
|
||||
"Need lülitatakse sisse kohe pärast sätete salvestamist."
|
||||
|
||||
#: src/guiConfigureWorld.cpp:144
|
||||
msgid ""
|
||||
"Warning: Some configured mods are missing.\n"
|
||||
"Their setting will be removed when you save the configuration. "
|
||||
msgstr ""
|
||||
"Hoiatus: Mõned konfigureeritud modifikatsioonid on kaotsi läinud.\n"
|
||||
"Nende sätted kustutatakse kui salvestada konfiguratsioon."
|
||||
|
||||
#: src/guiConfigureWorld.cpp:208
|
||||
msgid "enabled"
|
||||
msgstr "Sisse lülitatud"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:215
|
||||
msgid "Enable All"
|
||||
msgstr "Lülita kõik sisse"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:222
|
||||
msgid "Disable All"
|
||||
msgstr "Lülita kõik välja"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:228
|
||||
msgid "depends on:"
|
||||
msgstr "Vajab:"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:240
|
||||
msgid "is required by:"
|
||||
msgstr "Seda vajavad:"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:262 src/guiCreateWorld.cpp:165
|
||||
#: src/guiKeyChangeMenu.cpp:179 src/keycode.cpp:223
|
||||
msgid "Cancel"
|
||||
msgstr "Tühista"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:268 src/guiKeyChangeMenu.cpp:173
|
||||
msgid "Save"
|
||||
msgstr "Salvesta"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:394
|
||||
msgid "Configuration saved. "
|
||||
msgstr "Konfiguratsioon salvestatud. "
|
||||
|
||||
#: src/guiConfigureWorld.cpp:402
|
||||
msgid "Warning: Configuration not consistent. "
|
||||
msgstr "Hoiatus: Konfiguratsioon pole kindel."
|
||||
|
||||
#: src/guiConfirmMenu.cpp:120
|
||||
msgid "Yes"
|
||||
msgstr "Jah"
|
||||
|
||||
#: src/guiConfirmMenu.cpp:126
|
||||
msgid "No"
|
||||
msgstr "Ei"
|
||||
|
||||
#: src/guiCreateWorld.cpp:116
|
||||
msgid "World name"
|
||||
msgstr "Maailma nimi"
|
||||
|
||||
#: src/guiCreateWorld.cpp:135
|
||||
msgid "Game"
|
||||
msgstr "Mäng"
|
||||
|
||||
#: src/guiCreateWorld.cpp:159
|
||||
msgid "Create"
|
||||
msgstr "Loo"
|
||||
|
||||
#: src/guiDeathScreen.cpp:96
|
||||
msgid "You died."
|
||||
msgstr "Sa surid."
|
||||
|
||||
#: src/guiDeathScreen.cpp:104
|
||||
msgid "Respawn"
|
||||
msgstr "Ärka ellu"
|
||||
|
||||
#: src/guiFormSpecMenu.cpp:582
|
||||
msgid "Left click: Move all items, Right click: Move single item"
|
||||
msgstr ""
|
||||
"Vasak hiireklõps: Liiguta kõiki asju, Parem hiireklõps: Liiguta üksikut asja"
|
||||
|
||||
#: src/guiFormSpecMenu.cpp:607 src/guiMessageMenu.cpp:109
|
||||
#: src/guiTextInputMenu.cpp:131
|
||||
msgid "Proceed"
|
||||
msgstr "Jätka"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:114
|
||||
msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)"
|
||||
msgstr ""
|
||||
"Nupusätted. (Kui see menüü sassi läheb, siis kustuta asju failist minetest."
|
||||
"conf)"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:151
|
||||
msgid "\"Use\" = climb down"
|
||||
msgstr "\"Tegevus\" = Roni alla"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:164
|
||||
msgid "Double tap \"jump\" to toggle fly"
|
||||
msgstr "Topeltklõpsa \"Hüppamist\" et sisse lülitada lendamine"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:269
|
||||
msgid "Key already in use"
|
||||
msgstr "Nupp juba kasutuses"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:347
|
||||
msgid "press key"
|
||||
msgstr "Vajuta nuppu"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:372
|
||||
msgid "Forward"
|
||||
msgstr "Edasi"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:373
|
||||
msgid "Backward"
|
||||
msgstr "Tagasi"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:374 src/keycode.cpp:228
|
||||
msgid "Left"
|
||||
msgstr "Vasakule"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:375 src/keycode.cpp:228
|
||||
msgid "Right"
|
||||
msgstr "Paremale"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:376
|
||||
msgid "Use"
|
||||
msgstr "Tegevus"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:377
|
||||
msgid "Jump"
|
||||
msgstr "Hüppamine"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:378
|
||||
msgid "Sneak"
|
||||
msgstr "Hiilimine"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:379
|
||||
msgid "Drop"
|
||||
msgstr "Viska maha"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:380
|
||||
msgid "Inventory"
|
||||
msgstr "Seljakott"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:381
|
||||
msgid "Chat"
|
||||
msgstr "Jututuba"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:382
|
||||
msgid "Command"
|
||||
msgstr "Käsklus"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:383
|
||||
msgid "Console"
|
||||
msgstr "Konsool"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:384
|
||||
msgid "Toggle fly"
|
||||
msgstr "Lülita lendamine sisse"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:385
|
||||
msgid "Toggle fast"
|
||||
msgstr "Lülita kiirus sisse"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:386
|
||||
msgid "Toggle noclip"
|
||||
msgstr "Lülita läbi seinte minek sisse"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:387
|
||||
msgid "Range select"
|
||||
msgstr "Kauguse valik"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:388
|
||||
msgid "Print stacks"
|
||||
msgstr "Prindi kogused"
|
||||
|
||||
#: src/guiMainMenu.cpp:92
|
||||
msgid "Cannot create world: Name contains invalid characters"
|
||||
msgstr "Maailma loomine ebaõnnestus: Nimes esineb keelatud tähti"
|
||||
|
||||
#: src/guiMainMenu.cpp:101
|
||||
msgid "Cannot create world: A world by this name already exists"
|
||||
msgstr "Maailma loomine ebaõnnestus: Samanimeline maailm on juba olemas"
|
||||
|
||||
#: src/guiMainMenu.cpp:283
|
||||
msgid "Singleplayer"
|
||||
msgstr "Üksikmäng"
|
||||
|
||||
#: src/guiMainMenu.cpp:284
|
||||
msgid "Multiplayer"
|
||||
msgstr "Mitmikmäng"
|
||||
|
||||
#: src/guiMainMenu.cpp:285
|
||||
msgid "Advanced"
|
||||
msgstr "Arenenud sätted"
|
||||
|
||||
#: src/guiMainMenu.cpp:286
|
||||
msgid "Settings"
|
||||
msgstr "Sätted"
|
||||
|
||||
#: src/guiMainMenu.cpp:287
|
||||
msgid "Credits"
|
||||
msgstr "Tänuavaldused"
|
||||
|
||||
#: src/guiMainMenu.cpp:317
|
||||
msgid "Select World:"
|
||||
msgstr "Vali maailm:"
|
||||
|
||||
#: src/guiMainMenu.cpp:339 src/guiMainMenu.cpp:511 src/keycode.cpp:229
|
||||
msgid "Delete"
|
||||
msgstr "Kustuta"
|
||||
|
||||
#: src/guiMainMenu.cpp:346
|
||||
msgid "New"
|
||||
msgstr "Uus"
|
||||
|
||||
#: src/guiMainMenu.cpp:354
|
||||
msgid "Configure"
|
||||
msgstr "Konfigureeri"
|
||||
|
||||
#: src/guiMainMenu.cpp:369 src/keycode.cpp:248
|
||||
msgid "Play"
|
||||
msgstr "Mängi"
|
||||
|
||||
#: src/guiMainMenu.cpp:380 src/guiMainMenu.cpp:619
|
||||
msgid "Creative Mode"
|
||||
msgstr "Kujunduslik mängumood"
|
||||
|
||||
#: src/guiMainMenu.cpp:386 src/guiMainMenu.cpp:625
|
||||
msgid "Enable Damage"
|
||||
msgstr "Lülita valu sisse"
|
||||
|
||||
#: src/guiMainMenu.cpp:406 src/guiMainMenu.cpp:541
|
||||
msgid "Name/Password"
|
||||
msgstr "Nimi/Parool"
|
||||
|
||||
#: src/guiMainMenu.cpp:442 src/guiMainMenu.cpp:459 src/guiMainMenu.cpp:1184
|
||||
msgid "Favorites:"
|
||||
msgstr "Lemmikud:"
|
||||
|
||||
#: src/guiMainMenu.cpp:450 src/guiMainMenu.cpp:1194
|
||||
msgid "Public Server List:"
|
||||
msgstr "Avatud serverite nimekiri:"
|
||||
|
||||
#: src/guiMainMenu.cpp:470 src/guiMainMenu.cpp:568
|
||||
msgid "Address/Port"
|
||||
msgstr "IP/Port"
|
||||
|
||||
#: src/guiMainMenu.cpp:497 src/guiMainMenu.cpp:1183
|
||||
msgid "Show Public"
|
||||
msgstr "Näita avalikke"
|
||||
|
||||
#: src/guiMainMenu.cpp:501 src/guiMainMenu.cpp:1193
|
||||
msgid "Show Favorites"
|
||||
msgstr "Näita lemmikuid"
|
||||
|
||||
#: src/guiMainMenu.cpp:521
|
||||
msgid "Connect"
|
||||
msgstr "Liitu"
|
||||
|
||||
#: src/guiMainMenu.cpp:591
|
||||
msgid "Leave address blank to start a local server."
|
||||
msgstr "Jäta IP lahter tühjaks et alustada LAN serverit."
|
||||
|
||||
#: src/guiMainMenu.cpp:600
|
||||
msgid "Start Game / Connect"
|
||||
msgstr "Alusta mängu / Liitu"
|
||||
|
||||
#: src/guiMainMenu.cpp:632
|
||||
msgid "Public"
|
||||
msgstr "Avalik"
|
||||
|
||||
#: src/guiMainMenu.cpp:640 src/guiMainMenu.cpp:1113
|
||||
msgid "Delete world"
|
||||
msgstr "Kustuta maailm"
|
||||
|
||||
#: src/guiMainMenu.cpp:647
|
||||
msgid "Create world"
|
||||
msgstr "Loo maailm"
|
||||
|
||||
#: src/guiMainMenu.cpp:681
|
||||
msgid "Fancy trees"
|
||||
msgstr "Uhked puud"
|
||||
|
||||
#: src/guiMainMenu.cpp:687
|
||||
msgid "Smooth Lighting"
|
||||
msgstr "Ilus valgustus"
|
||||
|
||||
#: src/guiMainMenu.cpp:693
|
||||
msgid "3D Clouds"
|
||||
msgstr "3D pilved"
|
||||
|
||||
#: src/guiMainMenu.cpp:699
|
||||
msgid "Opaque water"
|
||||
msgstr "Läbipaistmatu vesi"
|
||||
|
||||
#: src/guiMainMenu.cpp:709
|
||||
msgid "Mip-Mapping"
|
||||
msgstr "Väga hea kvaliteet"
|
||||
|
||||
#: src/guiMainMenu.cpp:716
|
||||
msgid "Anisotropic Filtering"
|
||||
msgstr "Anisotroopne Filtreerimine"
|
||||
|
||||
#: src/guiMainMenu.cpp:723
|
||||
msgid "Bi-Linear Filtering"
|
||||
msgstr "Bi-lineaarsed Filtreerimine"
|
||||
|
||||
#: src/guiMainMenu.cpp:730
|
||||
msgid "Tri-Linear Filtering"
|
||||
msgstr "Tri-Linear Filtreerimine"
|
||||
|
||||
#: src/guiMainMenu.cpp:738
|
||||
msgid "Shaders"
|
||||
msgstr "Varjutajad"
|
||||
|
||||
#: src/guiMainMenu.cpp:745
|
||||
msgid "Preload item visuals"
|
||||
msgstr "Lae asjade visuaale"
|
||||
|
||||
#: src/guiMainMenu.cpp:752
|
||||
msgid "Enable Particles"
|
||||
msgstr "Lülita osakesed sisse"
|
||||
|
||||
#: src/guiMainMenu.cpp:759
|
||||
msgid "Finite liquid"
|
||||
msgstr "Löppev vedelik"
|
||||
|
||||
#: src/guiMainMenu.cpp:769
|
||||
msgid "Change keys"
|
||||
msgstr "Vaheta nuppe"
|
||||
|
||||
#: src/guiMainMenu.cpp:1084
|
||||
msgid "Address required."
|
||||
msgstr "IP on vajalkik."
|
||||
|
||||
#: src/guiMainMenu.cpp:1102
|
||||
msgid "Cannot delete world: Nothing selected"
|
||||
msgstr "Maailma kustutamine ebaõnnestus: Maailma pole valitud"
|
||||
|
||||
#: src/guiMainMenu.cpp:1117
|
||||
msgid "Files to be deleted"
|
||||
msgstr "Failid mida kustutada"
|
||||
|
||||
#: src/guiMainMenu.cpp:1133
|
||||
msgid "Cannot create world: No games found"
|
||||
msgstr "Maailma loomine ebaõnnestus: Mängu ei leitud"
|
||||
|
||||
#: src/guiMainMenu.cpp:1149
|
||||
msgid "Cannot configure world: Nothing selected"
|
||||
msgstr "Maailma konfigureerimine ebaõnnestus: Pole midagi valitud"
|
||||
|
||||
#: src/guiMainMenu.cpp:1256
|
||||
msgid "Failed to delete all world files"
|
||||
msgstr "Kõigi maailma failide kustutamine ebaõnnestus"
|
||||
|
||||
#: src/guiPasswordChange.cpp:108
|
||||
msgid "Old Password"
|
||||
msgstr "Vana parool"
|
||||
|
||||
#: src/guiPasswordChange.cpp:125
|
||||
msgid "New Password"
|
||||
msgstr "Uus parool"
|
||||
|
||||
#: src/guiPasswordChange.cpp:141
|
||||
msgid "Confirm Password"
|
||||
msgstr "Kinnita parooli"
|
||||
|
||||
#: src/guiPasswordChange.cpp:158
|
||||
msgid "Change"
|
||||
msgstr "Muuda"
|
||||
|
||||
#: src/guiPasswordChange.cpp:167
|
||||
msgid "Passwords do not match!"
|
||||
msgstr "Paroolid ei ole samad!"
|
||||
|
||||
#: src/guiPauseMenu.cpp:123
|
||||
msgid "Continue"
|
||||
msgstr "Jätka"
|
||||
|
||||
#: src/guiPauseMenu.cpp:132
|
||||
msgid "Change Password"
|
||||
msgstr "Vaheta parooli"
|
||||
|
||||
#: src/guiPauseMenu.cpp:140
|
||||
msgid "Sound Volume"
|
||||
msgstr "Hääle volüüm"
|
||||
|
||||
#: src/guiPauseMenu.cpp:147
|
||||
msgid "Exit to Menu"
|
||||
msgstr "Välju menüüsse"
|
||||
|
||||
#: src/guiPauseMenu.cpp:154
|
||||
msgid "Exit to OS"
|
||||
msgstr "Välju mängust"
|
||||
|
||||
#: src/guiPauseMenu.cpp:161
|
||||
msgid ""
|
||||
"Default Controls:\n"
|
||||
"- WASD: Walk\n"
|
||||
"- Mouse left: dig/hit\n"
|
||||
"- Mouse right: place/use\n"
|
||||
"- Mouse wheel: select item\n"
|
||||
"- 0...9: select item\n"
|
||||
"- Shift: sneak\n"
|
||||
"- R: Toggle viewing all loaded chunks\n"
|
||||
"- I: Inventory menu\n"
|
||||
"- ESC: This menu\n"
|
||||
"- T: Chat\n"
|
||||
msgstr ""
|
||||
"Algsed nupusätted:\n"
|
||||
"- WASD: Kõnni\n"
|
||||
"- Vasak hiireklõps: Kaeva/löö\n"
|
||||
"- Parem hiireklõps: Aseta/kasuta\n"
|
||||
"- Hiireratas: Vali asi\n"
|
||||
"- 0...9: Vali asi\n"
|
||||
"- Shift: Hiili\n"
|
||||
"- R: Vaheta nägemiskaugust\n"
|
||||
"- I: Seljakott\n"
|
||||
"- ESC: Menüü\n"
|
||||
"- T: Jututupa\n"
|
||||
|
||||
#: src/guiVolumeChange.cpp:108
|
||||
msgid "Sound Volume: "
|
||||
msgstr "Hääle Volüüm: "
|
||||
|
||||
#: src/guiVolumeChange.cpp:121
|
||||
msgid "Exit"
|
||||
msgstr "Välju"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Left Button"
|
||||
msgstr "Vasak nupp"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Middle Button"
|
||||
msgstr "Keskmine nupp"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Right Button"
|
||||
msgstr "Parem nupp"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "X Button 1"
|
||||
msgstr "X Nuppp 1"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Back"
|
||||
msgstr "Tagasi"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Clear"
|
||||
msgstr "Tühjenda"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Return"
|
||||
msgstr "Enter"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Tab"
|
||||
msgstr "Reavahetus"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "X Button 2"
|
||||
msgstr "X Nupp 2"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Capital"
|
||||
msgstr "Caps Lock"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Control"
|
||||
msgstr "CTRL"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Kana"
|
||||
msgstr "Kana"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Menu"
|
||||
msgstr "Menüü"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Pause"
|
||||
msgstr "Paus"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Shift"
|
||||
msgstr "Shift,"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Convert"
|
||||
msgstr "Konverteeri"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Escape"
|
||||
msgstr "Põgene"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Final"
|
||||
msgstr "Viimane"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Junja"
|
||||
msgstr "Junja"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Kanji"
|
||||
msgstr "Kanji"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Nonconvert"
|
||||
msgstr "Konverteerimatta"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Accept"
|
||||
msgstr "Nõustu"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "End"
|
||||
msgstr "Lõpeta"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Home"
|
||||
msgstr "Kodu"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Mode Change"
|
||||
msgstr "Moodi vahetamine"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Next"
|
||||
msgstr "Järgmine"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Prior"
|
||||
msgstr "Eelnev"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Space"
|
||||
msgstr "Tühik"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Down"
|
||||
msgstr "Alla"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Execute"
|
||||
msgstr "Soorita"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Print"
|
||||
msgstr "Prindi"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Select"
|
||||
msgstr "Vali"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Up"
|
||||
msgstr "Üles"
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Help"
|
||||
msgstr "Abi"
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Insert"
|
||||
msgstr "Sisesta"
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Snapshot"
|
||||
msgstr "Mängupilt"
|
||||
|
||||
#: src/keycode.cpp:232
|
||||
msgid "Left Windows"
|
||||
msgstr "Vasak Windowsi nupp"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Apps"
|
||||
msgstr "Aplikatsioonid"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Numpad 0"
|
||||
msgstr "Numbrilaual 0"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Numpad 1"
|
||||
msgstr "Numbrilaual 1"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Right Windows"
|
||||
msgstr "Parem Windowsi nupp"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Sleep"
|
||||
msgstr "Maga"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 2"
|
||||
msgstr "Numbrilaual 2"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 3"
|
||||
msgstr "Numbrilaual 3"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 4"
|
||||
msgstr "Numbrilaual 4"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 5"
|
||||
msgstr "Numbrilaual 5"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 6"
|
||||
msgstr "Numbrilaual 6"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 7"
|
||||
msgstr "Numbrilaual 7"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad *"
|
||||
msgstr "Numbrilaual *"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad +"
|
||||
msgstr "Numbrilaual +"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad -"
|
||||
msgstr "Numbrilaual -"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad /"
|
||||
msgstr "Numbrilaual /"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad 8"
|
||||
msgstr "Numbrilaual 8"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad 9"
|
||||
msgstr "Numbrilaual 9"
|
||||
|
||||
#: src/keycode.cpp:239
|
||||
msgid "Num Lock"
|
||||
msgstr "Numbrilaual Num Lock"
|
||||
|
||||
#: src/keycode.cpp:239
|
||||
msgid "Scroll Lock"
|
||||
msgstr "Scroll lukk"
|
||||
|
||||
#: src/keycode.cpp:240
|
||||
msgid "Left Shift"
|
||||
msgstr "Vasak Shift"
|
||||
|
||||
#: src/keycode.cpp:240
|
||||
msgid "Right Shift"
|
||||
msgstr "Parem Shift"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Left Control"
|
||||
msgstr "Vasak CTRL"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Left Menu"
|
||||
msgstr "Vasak Menüü"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Right Control"
|
||||
msgstr "Parem CTRL"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Right Menu"
|
||||
msgstr "Parem Menüü"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Comma"
|
||||
msgstr "Koma"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Minus"
|
||||
msgstr "Miinus"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Period"
|
||||
msgstr "Punkt"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Plus"
|
||||
msgstr "Pluss"
|
||||
|
||||
#: src/keycode.cpp:247
|
||||
msgid "Attn"
|
||||
msgstr "Attn"
|
||||
|
||||
#: src/keycode.cpp:247
|
||||
msgid "CrSel"
|
||||
msgstr "CrSel"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "Erase OEF"
|
||||
msgstr "Kustuta OEF"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "ExSel"
|
||||
msgstr "ExSel"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "OEM Clear"
|
||||
msgstr "OEM Tühi"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "PA1"
|
||||
msgstr "PA1"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "Zoom"
|
||||
msgstr "Suumi"
|
||||
|
||||
#: src/main.cpp:1506
|
||||
msgid "Main Menu"
|
||||
msgstr "Menüü"
|
||||
|
||||
#: src/main.cpp:1830
|
||||
msgid "Failed to initialize world"
|
||||
msgstr "Maailma initsialiseerimine ebaõnnestus"
|
||||
|
||||
#: src/main.cpp:1842
|
||||
msgid "No world selected and no address provided. Nothing to do."
|
||||
msgstr "Pole valitud ei maailma ega IP aadressi. Pole midagi teha."
|
||||
|
||||
#: src/main.cpp:1850
|
||||
msgid "Could not find or load game \""
|
||||
msgstr "Ei leia ega suuda jätkata mängu."
|
||||
|
||||
#: src/main.cpp:1864
|
||||
msgid "Invalid gamespec."
|
||||
msgstr "Vale mängu ID."
|
||||
|
||||
#: src/main.cpp:1904
|
||||
msgid "Connection error (timed out?)"
|
||||
msgstr "Ühenduse viga (Aeg otsas?)"
|
||||
|
||||
#: src/main.cpp:1915
|
||||
msgid ""
|
||||
"\n"
|
||||
"Check debug.txt for details."
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Vaata debug.txt info jaoks."
|
||||
1123
po/fr/minetest.po
1120
po/it/minetest.po
801
po/ja/minetest.po
Normal file
@@ -0,0 +1,801 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: minetest\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-03-30 19:56+0100\n"
|
||||
"PO-Revision-Date: 2013-03-07 23:06+0200\n"
|
||||
"Last-Translator: Mitori Itoshiki <mito551@gmail.com>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: ja\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Weblate 1.4-dev\n"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:125
|
||||
msgid ""
|
||||
"Warning: Some mods are not configured yet.\n"
|
||||
"They will be enabled by default when you save the configuration. "
|
||||
msgstr ""
|
||||
"警告: マインテストの改造がいくつか設定されていません。\n"
|
||||
"これらを設定を保存すると自動で有効化されます。 "
|
||||
|
||||
#: src/guiConfigureWorld.cpp:144
|
||||
msgid ""
|
||||
"Warning: Some configured mods are missing.\n"
|
||||
"Their setting will be removed when you save the configuration. "
|
||||
msgstr ""
|
||||
"警告: いくつかの設定みの改造ファイルが見つかりません.\n"
|
||||
"これらの情報は設定を保存すると削除されます. "
|
||||
|
||||
#: src/guiConfigureWorld.cpp:208
|
||||
msgid "enabled"
|
||||
msgstr "有効にしました"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:215
|
||||
msgid "Enable All"
|
||||
msgstr "全部を有効にしました"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:222
|
||||
msgid "Disable All"
|
||||
msgstr "全部を無効にしました"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:228
|
||||
msgid "depends on:"
|
||||
msgstr "この改造ファイルが必要です:"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:240
|
||||
msgid "is required by:"
|
||||
msgstr "この改造に必要されます:"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:262 src/guiCreateWorld.cpp:165
|
||||
#: src/guiKeyChangeMenu.cpp:179 src/keycode.cpp:223
|
||||
msgid "Cancel"
|
||||
msgstr "キャンセル"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:268 src/guiKeyChangeMenu.cpp:173
|
||||
msgid "Save"
|
||||
msgstr "保存"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:394
|
||||
msgid "Configuration saved. "
|
||||
msgstr "設定を保存しました. "
|
||||
|
||||
#: src/guiConfigureWorld.cpp:402
|
||||
msgid "Warning: Configuration not consistent. "
|
||||
msgstr "注意:設定が一定でわありません。"
|
||||
|
||||
#: src/guiConfirmMenu.cpp:120
|
||||
msgid "Yes"
|
||||
msgstr "はい"
|
||||
|
||||
#: src/guiConfirmMenu.cpp:126
|
||||
msgid "No"
|
||||
msgstr "いいえ"
|
||||
|
||||
#: src/guiCreateWorld.cpp:116
|
||||
msgid "World name"
|
||||
msgstr "ワールド名"
|
||||
|
||||
#: src/guiCreateWorld.cpp:135
|
||||
msgid "Game"
|
||||
msgstr "ゲーム"
|
||||
|
||||
#: src/guiCreateWorld.cpp:159
|
||||
msgid "Create"
|
||||
msgstr "作成"
|
||||
|
||||
#: src/guiDeathScreen.cpp:96
|
||||
msgid "You died."
|
||||
msgstr "死亡しました。"
|
||||
|
||||
#: src/guiDeathScreen.cpp:104
|
||||
msgid "Respawn"
|
||||
msgstr "リスポーン"
|
||||
|
||||
#: src/guiFormSpecMenu.cpp:582
|
||||
msgid "Left click: Move all items, Right click: Move single item"
|
||||
msgstr "左クリックは全部のアイテムを動かす,右クリックは一つのアイテムを動かす"
|
||||
|
||||
#: src/guiFormSpecMenu.cpp:607 src/guiMessageMenu.cpp:109
|
||||
#: src/guiTextInputMenu.cpp:131
|
||||
msgid "Proceed"
|
||||
msgstr "続く"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:114
|
||||
msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)"
|
||||
msgstr "キーバインド"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:151
|
||||
msgid "\"Use\" = climb down"
|
||||
msgstr "「使う」は下りる"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:164
|
||||
msgid "Double tap \"jump\" to toggle fly"
|
||||
msgstr "「ジャンプ」を二回押すと飛べる"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:269
|
||||
msgid "Key already in use"
|
||||
msgstr "既に使われているキーです"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:347
|
||||
msgid "press key"
|
||||
msgstr "キー入力待ち"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:372
|
||||
msgid "Forward"
|
||||
msgstr "前進"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:373
|
||||
msgid "Backward"
|
||||
msgstr "後退"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:374 src/keycode.cpp:228
|
||||
msgid "Left"
|
||||
msgstr "左へ進む"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:375 src/keycode.cpp:228
|
||||
msgid "Right"
|
||||
msgstr "右へ進む"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:376
|
||||
msgid "Use"
|
||||
msgstr "使う"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:377
|
||||
msgid "Jump"
|
||||
msgstr "ジャンプ"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:378
|
||||
msgid "Sneak"
|
||||
msgstr "こっそり進む"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:379
|
||||
msgid "Drop"
|
||||
msgstr "落とす"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:380
|
||||
msgid "Inventory"
|
||||
msgstr "インベントリ"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:381
|
||||
msgid "Chat"
|
||||
msgstr "チャット"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:382
|
||||
msgid "Command"
|
||||
msgstr "コマンド"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:383
|
||||
msgid "Console"
|
||||
msgstr "コンソール"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:384
|
||||
msgid "Toggle fly"
|
||||
msgstr "飛べるモードをトグル"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:385
|
||||
msgid "Toggle fast"
|
||||
msgstr "ファストモードをトグル"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:386
|
||||
msgid "Toggle noclip"
|
||||
msgstr "ノクリップモードをトグル"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:387
|
||||
msgid "Range select"
|
||||
msgstr "範囲選択"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:388
|
||||
msgid "Print stacks"
|
||||
msgstr "スタックの表示"
|
||||
|
||||
#: src/guiMainMenu.cpp:92
|
||||
msgid "Cannot create world: Name contains invalid characters"
|
||||
msgstr "ワールドを作成できません: 名前に無効な文字が含まれています"
|
||||
|
||||
#: src/guiMainMenu.cpp:101
|
||||
msgid "Cannot create world: A world by this name already exists"
|
||||
msgstr "ワールドを作成できません: 同名のワールドが既に存在しています"
|
||||
|
||||
#: src/guiMainMenu.cpp:283
|
||||
msgid "Singleplayer"
|
||||
msgstr "シングルプレイヤー"
|
||||
|
||||
#: src/guiMainMenu.cpp:284
|
||||
msgid "Multiplayer"
|
||||
msgstr "マルチプレイヤー"
|
||||
|
||||
#: src/guiMainMenu.cpp:285
|
||||
msgid "Advanced"
|
||||
msgstr "高度"
|
||||
|
||||
#: src/guiMainMenu.cpp:286
|
||||
msgid "Settings"
|
||||
msgstr "設定"
|
||||
|
||||
#: src/guiMainMenu.cpp:287
|
||||
msgid "Credits"
|
||||
msgstr "クレジット"
|
||||
|
||||
#: src/guiMainMenu.cpp:317
|
||||
msgid "Select World:"
|
||||
msgstr "ワールド選択:"
|
||||
|
||||
#: src/guiMainMenu.cpp:339 src/guiMainMenu.cpp:511 src/keycode.cpp:229
|
||||
msgid "Delete"
|
||||
msgstr "削除"
|
||||
|
||||
#: src/guiMainMenu.cpp:346
|
||||
msgid "New"
|
||||
msgstr "新規作成"
|
||||
|
||||
#: src/guiMainMenu.cpp:354
|
||||
msgid "Configure"
|
||||
msgstr "設定"
|
||||
|
||||
#: src/guiMainMenu.cpp:369 src/keycode.cpp:248
|
||||
msgid "Play"
|
||||
msgstr "選択した世界に入る"
|
||||
|
||||
#: src/guiMainMenu.cpp:380 src/guiMainMenu.cpp:619
|
||||
msgid "Creative Mode"
|
||||
msgstr "クリエイティブモード"
|
||||
|
||||
#: src/guiMainMenu.cpp:386 src/guiMainMenu.cpp:625
|
||||
msgid "Enable Damage"
|
||||
msgstr "ダメージ有効"
|
||||
|
||||
#: src/guiMainMenu.cpp:406 src/guiMainMenu.cpp:541
|
||||
msgid "Name/Password"
|
||||
msgstr "名前/パスワード"
|
||||
|
||||
#: src/guiMainMenu.cpp:442 src/guiMainMenu.cpp:459 src/guiMainMenu.cpp:1184
|
||||
#, fuzzy
|
||||
msgid "Favorites:"
|
||||
msgstr "お気に入りを見せる"
|
||||
|
||||
#: src/guiMainMenu.cpp:450 src/guiMainMenu.cpp:1194
|
||||
msgid "Public Server List:"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:470 src/guiMainMenu.cpp:568
|
||||
msgid "Address/Port"
|
||||
msgstr "アドレス/ポート"
|
||||
|
||||
#: src/guiMainMenu.cpp:497 src/guiMainMenu.cpp:1183
|
||||
msgid "Show Public"
|
||||
msgstr "公共を見せる"
|
||||
|
||||
#: src/guiMainMenu.cpp:501 src/guiMainMenu.cpp:1193
|
||||
msgid "Show Favorites"
|
||||
msgstr "お気に入りを見せる"
|
||||
|
||||
#: src/guiMainMenu.cpp:521
|
||||
msgid "Connect"
|
||||
msgstr "接続"
|
||||
|
||||
#: src/guiMainMenu.cpp:591
|
||||
msgid "Leave address blank to start a local server."
|
||||
msgstr "アドレスを入力しないかぎりロカルサーバーを開始。"
|
||||
|
||||
#: src/guiMainMenu.cpp:600
|
||||
msgid "Start Game / Connect"
|
||||
msgstr "ゲーム開始 / 接続"
|
||||
|
||||
#: src/guiMainMenu.cpp:632
|
||||
#, fuzzy
|
||||
msgid "Public"
|
||||
msgstr "公共を見せる"
|
||||
|
||||
#: src/guiMainMenu.cpp:640 src/guiMainMenu.cpp:1113
|
||||
msgid "Delete world"
|
||||
msgstr "ワールド削除"
|
||||
|
||||
#: src/guiMainMenu.cpp:647
|
||||
msgid "Create world"
|
||||
msgstr "ワールド作成"
|
||||
|
||||
#: src/guiMainMenu.cpp:681
|
||||
msgid "Fancy trees"
|
||||
msgstr "きれいな木"
|
||||
|
||||
#: src/guiMainMenu.cpp:687
|
||||
#, fuzzy
|
||||
msgid "Smooth Lighting"
|
||||
msgstr "自然な光表現"
|
||||
|
||||
#: src/guiMainMenu.cpp:693
|
||||
msgid "3D Clouds"
|
||||
msgstr "3Dの雲"
|
||||
|
||||
#: src/guiMainMenu.cpp:699
|
||||
msgid "Opaque water"
|
||||
msgstr "不透明な水面"
|
||||
|
||||
#: src/guiMainMenu.cpp:709
|
||||
msgid "Mip-Mapping"
|
||||
msgstr "ミップマップ"
|
||||
|
||||
#: src/guiMainMenu.cpp:716
|
||||
msgid "Anisotropic Filtering"
|
||||
msgstr "異方性フィルタリング"
|
||||
|
||||
#: src/guiMainMenu.cpp:723
|
||||
msgid "Bi-Linear Filtering"
|
||||
msgstr "バイリニアフィルタリング"
|
||||
|
||||
#: src/guiMainMenu.cpp:730
|
||||
msgid "Tri-Linear Filtering"
|
||||
msgstr "トリリニアフィルタリング"
|
||||
|
||||
#: src/guiMainMenu.cpp:738
|
||||
msgid "Shaders"
|
||||
msgstr "シェーダー"
|
||||
|
||||
#: src/guiMainMenu.cpp:745
|
||||
msgid "Preload item visuals"
|
||||
msgstr "アイテム外観のプリロード"
|
||||
|
||||
#: src/guiMainMenu.cpp:752
|
||||
msgid "Enable Particles"
|
||||
msgstr "破片表現の有効化"
|
||||
|
||||
#: src/guiMainMenu.cpp:759
|
||||
msgid "Finite liquid"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:769
|
||||
msgid "Change keys"
|
||||
msgstr "キー割当て変更"
|
||||
|
||||
#: src/guiMainMenu.cpp:1084
|
||||
msgid "Address required."
|
||||
msgstr "アドレスが必要です."
|
||||
|
||||
#: src/guiMainMenu.cpp:1102
|
||||
msgid "Cannot delete world: Nothing selected"
|
||||
msgstr "ワールドを削除できません: 何も選択されていません"
|
||||
|
||||
#: src/guiMainMenu.cpp:1117
|
||||
msgid "Files to be deleted"
|
||||
msgstr "削除されるファイル"
|
||||
|
||||
#: src/guiMainMenu.cpp:1133
|
||||
msgid "Cannot create world: No games found"
|
||||
msgstr "ワールドを作成できません: ゲームが見つかりませんでした"
|
||||
|
||||
#: src/guiMainMenu.cpp:1149
|
||||
msgid "Cannot configure world: Nothing selected"
|
||||
msgstr "ワールドの設定ができません: 何も選択されていません"
|
||||
|
||||
#: src/guiMainMenu.cpp:1256
|
||||
msgid "Failed to delete all world files"
|
||||
msgstr "ワールドファイルの全ての削除に失敗"
|
||||
|
||||
#: src/guiPasswordChange.cpp:108
|
||||
msgid "Old Password"
|
||||
msgstr "古いパスワード"
|
||||
|
||||
#: src/guiPasswordChange.cpp:125
|
||||
msgid "New Password"
|
||||
msgstr "新しいパスワード"
|
||||
|
||||
#: src/guiPasswordChange.cpp:141
|
||||
msgid "Confirm Password"
|
||||
msgstr "パスワードの確認"
|
||||
|
||||
#: src/guiPasswordChange.cpp:158
|
||||
msgid "Change"
|
||||
msgstr "変更"
|
||||
|
||||
#: src/guiPasswordChange.cpp:167
|
||||
msgid "Passwords do not match!"
|
||||
msgstr "新しいパスワードが一致しません!"
|
||||
|
||||
#: src/guiPauseMenu.cpp:123
|
||||
msgid "Continue"
|
||||
msgstr "続ける"
|
||||
|
||||
#: src/guiPauseMenu.cpp:132
|
||||
msgid "Change Password"
|
||||
msgstr "パスワードの変更"
|
||||
|
||||
#: src/guiPauseMenu.cpp:140
|
||||
msgid "Sound Volume"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPauseMenu.cpp:147
|
||||
msgid "Exit to Menu"
|
||||
msgstr "メニューへ戻る"
|
||||
|
||||
#: src/guiPauseMenu.cpp:154
|
||||
msgid "Exit to OS"
|
||||
msgstr "終了"
|
||||
|
||||
#: src/guiPauseMenu.cpp:161
|
||||
msgid ""
|
||||
"Default Controls:\n"
|
||||
"- WASD: Walk\n"
|
||||
"- Mouse left: dig/hit\n"
|
||||
"- Mouse right: place/use\n"
|
||||
"- Mouse wheel: select item\n"
|
||||
"- 0...9: select item\n"
|
||||
"- Shift: sneak\n"
|
||||
"- R: Toggle viewing all loaded chunks\n"
|
||||
"- I: Inventory menu\n"
|
||||
"- ESC: This menu\n"
|
||||
"- T: Chat\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiVolumeChange.cpp:108
|
||||
msgid "Sound Volume: "
|
||||
msgstr ""
|
||||
|
||||
#: src/guiVolumeChange.cpp:121
|
||||
msgid "Exit"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Left Button"
|
||||
msgstr "左ボタン"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Middle Button"
|
||||
msgstr "中ボタン"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Right Button"
|
||||
msgstr "右ボタン"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "X Button 1"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Back"
|
||||
msgstr "Back Space"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Clear"
|
||||
msgstr "消す"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Return"
|
||||
msgstr "Enter"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Tab"
|
||||
msgstr "Tab"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "X Button 2"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Capital"
|
||||
msgstr "Caps Lock"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Control"
|
||||
msgstr "Ctrl"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Kana"
|
||||
msgstr "カタカナ/ひらがな"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Menu"
|
||||
msgstr "メニュー"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Pause"
|
||||
msgstr "Pause"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Shift"
|
||||
msgstr "Shift"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Convert"
|
||||
msgstr "変換"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Escape"
|
||||
msgstr "Esc"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Final"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Junja"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Kanji"
|
||||
msgstr "半角/全角"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Nonconvert"
|
||||
msgstr "無変換"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
#, fuzzy
|
||||
msgid "Accept"
|
||||
msgstr "Accept"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "End"
|
||||
msgstr "End"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Home"
|
||||
msgstr "Home"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Mode Change"
|
||||
msgstr "モードを変更"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Next"
|
||||
msgstr "Page Down"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Prior"
|
||||
msgstr "Page Up"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
#, fuzzy
|
||||
msgid "Space"
|
||||
msgstr "Space"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
#, fuzzy
|
||||
msgid "Down"
|
||||
msgstr "Down"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
#, fuzzy
|
||||
msgid "Execute"
|
||||
msgstr "Execute"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
#, fuzzy
|
||||
msgid "Print"
|
||||
msgstr "Print"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
#, fuzzy
|
||||
msgid "Select"
|
||||
msgstr "Select"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
#, fuzzy
|
||||
msgid "Up"
|
||||
msgstr "Up"
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
#, fuzzy
|
||||
msgid "Help"
|
||||
msgstr "Help"
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Insert"
|
||||
msgstr "Insert"
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
#, fuzzy
|
||||
msgid "Snapshot"
|
||||
msgstr "Snapshot"
|
||||
|
||||
#: src/keycode.cpp:232
|
||||
#, fuzzy
|
||||
msgid "Left Windows"
|
||||
msgstr "Left Windows"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
#, fuzzy
|
||||
msgid "Apps"
|
||||
msgstr "Apps"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
#, fuzzy
|
||||
msgid "Numpad 0"
|
||||
msgstr "Numpad 0"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
#, fuzzy
|
||||
msgid "Numpad 1"
|
||||
msgstr "Numpad 1"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
#, fuzzy
|
||||
msgid "Right Windows"
|
||||
msgstr "Right Windows"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
#, fuzzy
|
||||
msgid "Sleep"
|
||||
msgstr "Sleep"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
#, fuzzy
|
||||
msgid "Numpad 2"
|
||||
msgstr "Numpad 2"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
#, fuzzy
|
||||
msgid "Numpad 3"
|
||||
msgstr "Numpad 3"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
#, fuzzy
|
||||
msgid "Numpad 4"
|
||||
msgstr "Numpad 4"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
#, fuzzy
|
||||
msgid "Numpad 5"
|
||||
msgstr "Numpad 5"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
#, fuzzy
|
||||
msgid "Numpad 6"
|
||||
msgstr "Numpad 6"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
#, fuzzy
|
||||
msgid "Numpad 7"
|
||||
msgstr "Numpad 7"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
#, fuzzy
|
||||
msgid "Numpad *"
|
||||
msgstr "Numpad *"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
#, fuzzy
|
||||
msgid "Numpad +"
|
||||
msgstr "Numpad +"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
#, fuzzy
|
||||
msgid "Numpad -"
|
||||
msgstr "Numpad -"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
#, fuzzy
|
||||
msgid "Numpad /"
|
||||
msgstr "Numpad /"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
#, fuzzy
|
||||
msgid "Numpad 8"
|
||||
msgstr "Numpad 8"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
#, fuzzy
|
||||
msgid "Numpad 9"
|
||||
msgstr "Numpad 9"
|
||||
|
||||
#: src/keycode.cpp:239
|
||||
msgid "Num Lock"
|
||||
msgstr "Num Lock"
|
||||
|
||||
#: src/keycode.cpp:239
|
||||
msgid "Scroll Lock"
|
||||
msgstr "Scroll Lock"
|
||||
|
||||
#: src/keycode.cpp:240
|
||||
msgid "Left Shift"
|
||||
msgstr "左Shift"
|
||||
|
||||
#: src/keycode.cpp:240
|
||||
msgid "Right Shift"
|
||||
msgstr "右Shift"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Left Control"
|
||||
msgstr "左Ctrl"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Left Menu"
|
||||
msgstr "左メニュー"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Right Control"
|
||||
msgstr "右Ctrl"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Right Menu"
|
||||
msgstr "右メニュー"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Comma"
|
||||
msgstr "読点"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
#, fuzzy
|
||||
msgid "Minus"
|
||||
msgstr "Minus"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
#, fuzzy
|
||||
msgid "Period"
|
||||
msgstr "Period"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
#, fuzzy
|
||||
msgid "Plus"
|
||||
msgstr "Plus"
|
||||
|
||||
#: src/keycode.cpp:247
|
||||
#, fuzzy
|
||||
msgid "Attn"
|
||||
msgstr "Attn"
|
||||
|
||||
#: src/keycode.cpp:247
|
||||
#, fuzzy
|
||||
msgid "CrSel"
|
||||
msgstr "CrSel"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
#, fuzzy
|
||||
msgid "Erase OEF"
|
||||
msgstr "Erase OEF"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
#, fuzzy
|
||||
msgid "ExSel"
|
||||
msgstr "ExSel"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
#, fuzzy
|
||||
msgid "OEM Clear"
|
||||
msgstr "OEM Clear"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
#, fuzzy
|
||||
msgid "PA1"
|
||||
msgstr "PA1"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "Zoom"
|
||||
msgstr "ズーム"
|
||||
|
||||
#: src/main.cpp:1506
|
||||
msgid "Main Menu"
|
||||
msgstr "メインメニュー"
|
||||
|
||||
#: src/main.cpp:1830
|
||||
msgid "Failed to initialize world"
|
||||
msgstr "ワールドの初期化に失敗"
|
||||
|
||||
#: src/main.cpp:1842
|
||||
msgid "No world selected and no address provided. Nothing to do."
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:1850
|
||||
msgid "Could not find or load game \""
|
||||
msgstr "ゲームをロードか見つかるのに失敗"
|
||||
|
||||
#: src/main.cpp:1864
|
||||
msgid "Invalid gamespec."
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:1904
|
||||
msgid "Connection error (timed out?)"
|
||||
msgstr "接続エラー (タイムアウトか?)"
|
||||
|
||||
#: src/main.cpp:1915
|
||||
msgid ""
|
||||
"\n"
|
||||
"Check debug.txt for details."
|
||||
msgstr ""
|
||||
757
po/ko/minetest.po
Normal file
@@ -0,0 +1,757 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: minetest\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-03-30 19:56+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:125
|
||||
msgid ""
|
||||
"Warning: Some mods are not configured yet.\n"
|
||||
"They will be enabled by default when you save the configuration. "
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:144
|
||||
msgid ""
|
||||
"Warning: Some configured mods are missing.\n"
|
||||
"Their setting will be removed when you save the configuration. "
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:208
|
||||
msgid "enabled"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:215
|
||||
msgid "Enable All"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:222
|
||||
msgid "Disable All"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:228
|
||||
msgid "depends on:"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:240
|
||||
msgid "is required by:"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:262 src/guiCreateWorld.cpp:165
|
||||
#: src/guiKeyChangeMenu.cpp:179 src/keycode.cpp:223
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:268 src/guiKeyChangeMenu.cpp:173
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:394
|
||||
msgid "Configuration saved. "
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:402
|
||||
msgid "Warning: Configuration not consistent. "
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfirmMenu.cpp:120
|
||||
msgid "Yes"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfirmMenu.cpp:126
|
||||
msgid "No"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiCreateWorld.cpp:116
|
||||
msgid "World name"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiCreateWorld.cpp:135
|
||||
msgid "Game"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiCreateWorld.cpp:159
|
||||
msgid "Create"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiDeathScreen.cpp:96
|
||||
msgid "You died."
|
||||
msgstr ""
|
||||
|
||||
#: src/guiDeathScreen.cpp:104
|
||||
msgid "Respawn"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiFormSpecMenu.cpp:582
|
||||
msgid "Left click: Move all items, Right click: Move single item"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiFormSpecMenu.cpp:607 src/guiMessageMenu.cpp:109
|
||||
#: src/guiTextInputMenu.cpp:131
|
||||
msgid "Proceed"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:114
|
||||
msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:151
|
||||
msgid "\"Use\" = climb down"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:164
|
||||
msgid "Double tap \"jump\" to toggle fly"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:269
|
||||
msgid "Key already in use"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:347
|
||||
msgid "press key"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:372
|
||||
msgid "Forward"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:373
|
||||
msgid "Backward"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:374 src/keycode.cpp:228
|
||||
msgid "Left"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:375 src/keycode.cpp:228
|
||||
msgid "Right"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:376
|
||||
msgid "Use"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:377
|
||||
msgid "Jump"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:378
|
||||
msgid "Sneak"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:379
|
||||
msgid "Drop"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:380
|
||||
msgid "Inventory"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:381
|
||||
msgid "Chat"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:382
|
||||
msgid "Command"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:383
|
||||
msgid "Console"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:384
|
||||
msgid "Toggle fly"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:385
|
||||
msgid "Toggle fast"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:386
|
||||
msgid "Toggle noclip"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:387
|
||||
msgid "Range select"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:388
|
||||
msgid "Print stacks"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:92
|
||||
msgid "Cannot create world: Name contains invalid characters"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:101
|
||||
msgid "Cannot create world: A world by this name already exists"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:283
|
||||
msgid "Singleplayer"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:284
|
||||
msgid "Multiplayer"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:285
|
||||
msgid "Advanced"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:286
|
||||
msgid "Settings"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:287
|
||||
msgid "Credits"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:317
|
||||
msgid "Select World:"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:339 src/guiMainMenu.cpp:511 src/keycode.cpp:229
|
||||
msgid "Delete"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:346
|
||||
msgid "New"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:354
|
||||
msgid "Configure"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:369 src/keycode.cpp:248
|
||||
msgid "Play"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:380 src/guiMainMenu.cpp:619
|
||||
msgid "Creative Mode"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:386 src/guiMainMenu.cpp:625
|
||||
msgid "Enable Damage"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:406 src/guiMainMenu.cpp:541
|
||||
msgid "Name/Password"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:442 src/guiMainMenu.cpp:459 src/guiMainMenu.cpp:1184
|
||||
msgid "Favorites:"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:450 src/guiMainMenu.cpp:1194
|
||||
msgid "Public Server List:"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:470 src/guiMainMenu.cpp:568
|
||||
msgid "Address/Port"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:497 src/guiMainMenu.cpp:1183
|
||||
msgid "Show Public"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:501 src/guiMainMenu.cpp:1193
|
||||
msgid "Show Favorites"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:521
|
||||
msgid "Connect"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:591
|
||||
msgid "Leave address blank to start a local server."
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:600
|
||||
msgid "Start Game / Connect"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:632
|
||||
msgid "Public"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:640 src/guiMainMenu.cpp:1113
|
||||
msgid "Delete world"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:647
|
||||
msgid "Create world"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:681
|
||||
msgid "Fancy trees"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:687
|
||||
msgid "Smooth Lighting"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:693
|
||||
msgid "3D Clouds"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:699
|
||||
msgid "Opaque water"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:709
|
||||
msgid "Mip-Mapping"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:716
|
||||
msgid "Anisotropic Filtering"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:723
|
||||
msgid "Bi-Linear Filtering"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:730
|
||||
msgid "Tri-Linear Filtering"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:738
|
||||
msgid "Shaders"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:745
|
||||
msgid "Preload item visuals"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:752
|
||||
msgid "Enable Particles"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:759
|
||||
msgid "Finite liquid"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:769
|
||||
msgid "Change keys"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:1084
|
||||
msgid "Address required."
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:1102
|
||||
msgid "Cannot delete world: Nothing selected"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:1117
|
||||
msgid "Files to be deleted"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:1133
|
||||
msgid "Cannot create world: No games found"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:1149
|
||||
msgid "Cannot configure world: Nothing selected"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:1256
|
||||
msgid "Failed to delete all world files"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPasswordChange.cpp:108
|
||||
msgid "Old Password"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPasswordChange.cpp:125
|
||||
msgid "New Password"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPasswordChange.cpp:141
|
||||
msgid "Confirm Password"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPasswordChange.cpp:158
|
||||
msgid "Change"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPasswordChange.cpp:167
|
||||
msgid "Passwords do not match!"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPauseMenu.cpp:123
|
||||
msgid "Continue"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPauseMenu.cpp:132
|
||||
msgid "Change Password"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPauseMenu.cpp:140
|
||||
msgid "Sound Volume"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPauseMenu.cpp:147
|
||||
msgid "Exit to Menu"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPauseMenu.cpp:154
|
||||
msgid "Exit to OS"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPauseMenu.cpp:161
|
||||
msgid ""
|
||||
"Default Controls:\n"
|
||||
"- WASD: Walk\n"
|
||||
"- Mouse left: dig/hit\n"
|
||||
"- Mouse right: place/use\n"
|
||||
"- Mouse wheel: select item\n"
|
||||
"- 0...9: select item\n"
|
||||
"- Shift: sneak\n"
|
||||
"- R: Toggle viewing all loaded chunks\n"
|
||||
"- I: Inventory menu\n"
|
||||
"- ESC: This menu\n"
|
||||
"- T: Chat\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiVolumeChange.cpp:108
|
||||
msgid "Sound Volume: "
|
||||
msgstr ""
|
||||
|
||||
#: src/guiVolumeChange.cpp:121
|
||||
msgid "Exit"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Left Button"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Middle Button"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Right Button"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "X Button 1"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Back"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Return"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Tab"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "X Button 2"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Capital"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Control"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Kana"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Menu"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Pause"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Shift"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Convert"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Escape"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Final"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Junja"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Kanji"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Nonconvert"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Accept"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "End"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Home"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Mode Change"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Next"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Prior"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Space"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Down"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Execute"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Print"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Select"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Up"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Help"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Insert"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Snapshot"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:232
|
||||
msgid "Left Windows"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Apps"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Numpad 0"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Numpad 1"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Right Windows"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Sleep"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 2"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 3"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 4"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 5"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 6"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 7"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad *"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad +"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad -"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad /"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad 8"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad 9"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:239
|
||||
msgid "Num Lock"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:239
|
||||
msgid "Scroll Lock"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:240
|
||||
msgid "Left Shift"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:240
|
||||
msgid "Right Shift"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Left Control"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Left Menu"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Right Control"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Right Menu"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Comma"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Minus"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Period"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Plus"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:247
|
||||
msgid "Attn"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:247
|
||||
msgid "CrSel"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "Erase OEF"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "ExSel"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "OEM Clear"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "PA1"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "Zoom"
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:1506
|
||||
msgid "Main Menu"
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:1830
|
||||
msgid "Failed to initialize world"
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:1842
|
||||
msgid "No world selected and no address provided. Nothing to do."
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:1850
|
||||
msgid "Could not find or load game \""
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:1864
|
||||
msgid "Invalid gamespec."
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:1904
|
||||
msgid "Connection error (timed out?)"
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:1915
|
||||
msgid ""
|
||||
"\n"
|
||||
"Check debug.txt for details."
|
||||
msgstr ""
|
||||
758
po/ky/minetest.po
Normal file
@@ -0,0 +1,758 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: minetest\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-03-30 19:56+0100\n"
|
||||
"PO-Revision-Date: 2013-03-31 15:40+0200\n"
|
||||
"Last-Translator: Chynggyz Jumaliev <translatorky@lavabit.com>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: ky\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Weblate 1.4-dev\n"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:125
|
||||
msgid ""
|
||||
"Warning: Some mods are not configured yet.\n"
|
||||
"They will be enabled by default when you save the configuration. "
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:144
|
||||
msgid ""
|
||||
"Warning: Some configured mods are missing.\n"
|
||||
"Their setting will be removed when you save the configuration. "
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:208
|
||||
msgid "enabled"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:215
|
||||
msgid "Enable All"
|
||||
msgstr "Баарын күйгүзүү"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:222
|
||||
msgid "Disable All"
|
||||
msgstr "Баарын өчүрүү"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:228
|
||||
msgid "depends on:"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:240
|
||||
msgid "is required by:"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:262 src/guiCreateWorld.cpp:165
|
||||
#: src/guiKeyChangeMenu.cpp:179 src/keycode.cpp:223
|
||||
msgid "Cancel"
|
||||
msgstr "Жокко чыгаруу"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:268 src/guiKeyChangeMenu.cpp:173
|
||||
msgid "Save"
|
||||
msgstr "Сактоо"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:394
|
||||
msgid "Configuration saved. "
|
||||
msgstr "Ырастоолор сакталды. "
|
||||
|
||||
#: src/guiConfigureWorld.cpp:402
|
||||
msgid "Warning: Configuration not consistent. "
|
||||
msgstr "Эскертүү: Туура эмес конфигурация. "
|
||||
|
||||
#: src/guiConfirmMenu.cpp:120
|
||||
msgid "Yes"
|
||||
msgstr "Ооба"
|
||||
|
||||
#: src/guiConfirmMenu.cpp:126
|
||||
msgid "No"
|
||||
msgstr "Жок"
|
||||
|
||||
#: src/guiCreateWorld.cpp:116
|
||||
msgid "World name"
|
||||
msgstr "Дүйнөнүн аты"
|
||||
|
||||
#: src/guiCreateWorld.cpp:135
|
||||
msgid "Game"
|
||||
msgstr "Оюн"
|
||||
|
||||
#: src/guiCreateWorld.cpp:159
|
||||
msgid "Create"
|
||||
msgstr "Жаратуу"
|
||||
|
||||
#: src/guiDeathScreen.cpp:96
|
||||
msgid "You died."
|
||||
msgstr "Сиз өлдүңүз."
|
||||
|
||||
#: src/guiDeathScreen.cpp:104
|
||||
msgid "Respawn"
|
||||
msgstr "Кайтадан жаралуу"
|
||||
|
||||
#: src/guiFormSpecMenu.cpp:582
|
||||
msgid "Left click: Move all items, Right click: Move single item"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiFormSpecMenu.cpp:607 src/guiMessageMenu.cpp:109
|
||||
#: src/guiTextInputMenu.cpp:131
|
||||
msgid "Proceed"
|
||||
msgstr "Улантуу"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:114
|
||||
msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:151
|
||||
msgid "\"Use\" = climb down"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:164
|
||||
msgid "Double tap \"jump\" to toggle fly"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:269
|
||||
msgid "Key already in use"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:347
|
||||
msgid "press key"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:372
|
||||
msgid "Forward"
|
||||
msgstr "Алга"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:373
|
||||
msgid "Backward"
|
||||
msgstr "Артка"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:374 src/keycode.cpp:228
|
||||
msgid "Left"
|
||||
msgstr "Солго"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:375 src/keycode.cpp:228
|
||||
msgid "Right"
|
||||
msgstr "Оңго"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:376
|
||||
msgid "Use"
|
||||
msgstr "Колдонуу"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:377
|
||||
msgid "Jump"
|
||||
msgstr "Секирүү"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:378
|
||||
msgid "Sneak"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:379
|
||||
msgid "Drop"
|
||||
msgstr "Ыргытуу"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:380
|
||||
msgid "Inventory"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:381
|
||||
msgid "Chat"
|
||||
msgstr "Маек"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:382
|
||||
msgid "Command"
|
||||
msgstr "Команда"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:383
|
||||
msgid "Console"
|
||||
msgstr "Консоль"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:384
|
||||
msgid "Toggle fly"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:385
|
||||
msgid "Toggle fast"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:386
|
||||
msgid "Toggle noclip"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:387
|
||||
msgid "Range select"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:388
|
||||
msgid "Print stacks"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:92
|
||||
msgid "Cannot create world: Name contains invalid characters"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:101
|
||||
msgid "Cannot create world: A world by this name already exists"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:283
|
||||
msgid "Singleplayer"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:284
|
||||
msgid "Multiplayer"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:285
|
||||
msgid "Advanced"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:286
|
||||
msgid "Settings"
|
||||
msgstr "Ырастоолор"
|
||||
|
||||
#: src/guiMainMenu.cpp:287
|
||||
msgid "Credits"
|
||||
msgstr "Алкыштар"
|
||||
|
||||
#: src/guiMainMenu.cpp:317
|
||||
msgid "Select World:"
|
||||
msgstr "Дүйнөнү тандаңыз:"
|
||||
|
||||
#: src/guiMainMenu.cpp:339 src/guiMainMenu.cpp:511 src/keycode.cpp:229
|
||||
msgid "Delete"
|
||||
msgstr "Өчүрүү"
|
||||
|
||||
#: src/guiMainMenu.cpp:346
|
||||
msgid "New"
|
||||
msgstr "Жаңы"
|
||||
|
||||
#: src/guiMainMenu.cpp:354
|
||||
msgid "Configure"
|
||||
msgstr "Ырастоо"
|
||||
|
||||
#: src/guiMainMenu.cpp:369 src/keycode.cpp:248
|
||||
msgid "Play"
|
||||
msgstr "Ойноо"
|
||||
|
||||
#: src/guiMainMenu.cpp:380 src/guiMainMenu.cpp:619
|
||||
msgid "Creative Mode"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:386 src/guiMainMenu.cpp:625
|
||||
msgid "Enable Damage"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:406 src/guiMainMenu.cpp:541
|
||||
msgid "Name/Password"
|
||||
msgstr "Атыңыз/Сырсөзүңүз"
|
||||
|
||||
#: src/guiMainMenu.cpp:442 src/guiMainMenu.cpp:459 src/guiMainMenu.cpp:1184
|
||||
msgid "Favorites:"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:450 src/guiMainMenu.cpp:1194
|
||||
msgid "Public Server List:"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:470 src/guiMainMenu.cpp:568
|
||||
msgid "Address/Port"
|
||||
msgstr "Адреси/Порту"
|
||||
|
||||
#: src/guiMainMenu.cpp:497 src/guiMainMenu.cpp:1183
|
||||
msgid "Show Public"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:501 src/guiMainMenu.cpp:1193
|
||||
msgid "Show Favorites"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:521
|
||||
msgid "Connect"
|
||||
msgstr "Туташуу"
|
||||
|
||||
#: src/guiMainMenu.cpp:591
|
||||
msgid "Leave address blank to start a local server."
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:600
|
||||
msgid "Start Game / Connect"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:632
|
||||
msgid "Public"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:640 src/guiMainMenu.cpp:1113
|
||||
msgid "Delete world"
|
||||
msgstr "Дүйнөнү өчүрүү"
|
||||
|
||||
#: src/guiMainMenu.cpp:647
|
||||
msgid "Create world"
|
||||
msgstr "Дүйнөнү жаратуу"
|
||||
|
||||
#: src/guiMainMenu.cpp:681
|
||||
msgid "Fancy trees"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:687
|
||||
msgid "Smooth Lighting"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:693
|
||||
msgid "3D Clouds"
|
||||
msgstr "3D булуттар"
|
||||
|
||||
#: src/guiMainMenu.cpp:699
|
||||
msgid "Opaque water"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:709
|
||||
msgid "Mip-Mapping"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:716
|
||||
msgid "Anisotropic Filtering"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:723
|
||||
msgid "Bi-Linear Filtering"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:730
|
||||
msgid "Tri-Linear Filtering"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:738
|
||||
msgid "Shaders"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:745
|
||||
msgid "Preload item visuals"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:752
|
||||
msgid "Enable Particles"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:759
|
||||
msgid "Finite liquid"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:769
|
||||
msgid "Change keys"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:1084
|
||||
msgid "Address required."
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:1102
|
||||
msgid "Cannot delete world: Nothing selected"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:1117
|
||||
msgid "Files to be deleted"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:1133
|
||||
msgid "Cannot create world: No games found"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:1149
|
||||
msgid "Cannot configure world: Nothing selected"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:1256
|
||||
msgid "Failed to delete all world files"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPasswordChange.cpp:108
|
||||
msgid "Old Password"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPasswordChange.cpp:125
|
||||
msgid "New Password"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPasswordChange.cpp:141
|
||||
msgid "Confirm Password"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPasswordChange.cpp:158
|
||||
msgid "Change"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPasswordChange.cpp:167
|
||||
msgid "Passwords do not match!"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPauseMenu.cpp:123
|
||||
msgid "Continue"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPauseMenu.cpp:132
|
||||
msgid "Change Password"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPauseMenu.cpp:140
|
||||
msgid "Sound Volume"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPauseMenu.cpp:147
|
||||
msgid "Exit to Menu"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPauseMenu.cpp:154
|
||||
msgid "Exit to OS"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPauseMenu.cpp:161
|
||||
msgid ""
|
||||
"Default Controls:\n"
|
||||
"- WASD: Walk\n"
|
||||
"- Mouse left: dig/hit\n"
|
||||
"- Mouse right: place/use\n"
|
||||
"- Mouse wheel: select item\n"
|
||||
"- 0...9: select item\n"
|
||||
"- Shift: sneak\n"
|
||||
"- R: Toggle viewing all loaded chunks\n"
|
||||
"- I: Inventory menu\n"
|
||||
"- ESC: This menu\n"
|
||||
"- T: Chat\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiVolumeChange.cpp:108
|
||||
msgid "Sound Volume: "
|
||||
msgstr ""
|
||||
|
||||
#: src/guiVolumeChange.cpp:121
|
||||
msgid "Exit"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Left Button"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Middle Button"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Right Button"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "X Button 1"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Back"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Return"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Tab"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "X Button 2"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Capital"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Control"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Kana"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Menu"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Pause"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Shift"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Convert"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Escape"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Final"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Junja"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Kanji"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Nonconvert"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Accept"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "End"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Home"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Mode Change"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Next"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Prior"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Space"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Down"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Execute"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Print"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Select"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Up"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Help"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Insert"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Snapshot"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:232
|
||||
msgid "Left Windows"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Apps"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Numpad 0"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Numpad 1"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Right Windows"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Sleep"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 2"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 3"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 4"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 5"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 6"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 7"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad *"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad +"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad -"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad /"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad 8"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad 9"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:239
|
||||
msgid "Num Lock"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:239
|
||||
msgid "Scroll Lock"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:240
|
||||
msgid "Left Shift"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:240
|
||||
msgid "Right Shift"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Left Control"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Left Menu"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Right Control"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Right Menu"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Comma"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Minus"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Period"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Plus"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:247
|
||||
msgid "Attn"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:247
|
||||
msgid "CrSel"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "Erase OEF"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "ExSel"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "OEM Clear"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "PA1"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "Zoom"
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:1506
|
||||
msgid "Main Menu"
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:1830
|
||||
msgid "Failed to initialize world"
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:1842
|
||||
msgid "No world selected and no address provided. Nothing to do."
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:1850
|
||||
msgid "Could not find or load game \""
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:1864
|
||||
msgid "Invalid gamespec."
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:1904
|
||||
msgid "Connection error (timed out?)"
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:1915
|
||||
msgid ""
|
||||
"\n"
|
||||
"Check debug.txt for details."
|
||||
msgstr ""
|
||||
1046
po/minetest.pot
780
po/pl/minetest.po
Normal file
@@ -0,0 +1,780 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: minetest\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-03-30 19:56+0100\n"
|
||||
"PO-Revision-Date: 2013-04-03 16:42+0200\n"
|
||||
"Last-Translator: Dêivan Ortiz Munhoz <deivan@novoseusadosinformatica.com.br>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: pl\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
|
||||
"|| n%100>=20) ? 1 : 2);\n"
|
||||
"X-Generator: Weblate 1.4-dev\n"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:125
|
||||
msgid ""
|
||||
"Warning: Some mods are not configured yet.\n"
|
||||
"They will be enabled by default when you save the configuration. "
|
||||
msgstr ""
|
||||
"Ostrzeżenie: Niektóre z modyfikacji nie zostały jeszcze skonfigurowane.\n"
|
||||
"Zostaną domyślnie włączone gdy zapiszesz konfigurację. "
|
||||
|
||||
#: src/guiConfigureWorld.cpp:144
|
||||
msgid ""
|
||||
"Warning: Some configured mods are missing.\n"
|
||||
"Their setting will be removed when you save the configuration. "
|
||||
msgstr ""
|
||||
"Ostrzeżenie: Niektóre z modyfikacji nie zostały znalezione.\n"
|
||||
"Ich ustawienia zostaną usunięte gdy zapiszesz konfigurację. "
|
||||
|
||||
#: src/guiConfigureWorld.cpp:208
|
||||
msgid "enabled"
|
||||
msgstr "włączone"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:215
|
||||
msgid "Enable All"
|
||||
msgstr "Włącz wszystkie"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:222
|
||||
msgid "Disable All"
|
||||
msgstr "Wyłącz wszystkie"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:228
|
||||
msgid "depends on:"
|
||||
msgstr "zależne od:"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:240
|
||||
msgid "is required by:"
|
||||
msgstr "wymagane przez:"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:262 src/guiCreateWorld.cpp:165
|
||||
#: src/guiKeyChangeMenu.cpp:179 src/keycode.cpp:223
|
||||
msgid "Cancel"
|
||||
msgstr "Anuluj"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:268 src/guiKeyChangeMenu.cpp:173
|
||||
msgid "Save"
|
||||
msgstr "Zapisz"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:394
|
||||
msgid "Configuration saved. "
|
||||
msgstr "Konfiguracja zapisana. "
|
||||
|
||||
#: src/guiConfigureWorld.cpp:402
|
||||
msgid "Warning: Configuration not consistent. "
|
||||
msgstr "Ostrzeżenie: Plik konfiguracyjny niespójny. "
|
||||
|
||||
#: src/guiConfirmMenu.cpp:120
|
||||
msgid "Yes"
|
||||
msgstr "Tak"
|
||||
|
||||
#: src/guiConfirmMenu.cpp:126
|
||||
msgid "No"
|
||||
msgstr "Nie"
|
||||
|
||||
#: src/guiCreateWorld.cpp:116
|
||||
msgid "World name"
|
||||
msgstr "Nazwa świata"
|
||||
|
||||
#: src/guiCreateWorld.cpp:135
|
||||
msgid "Game"
|
||||
msgstr "Gra"
|
||||
|
||||
#: src/guiCreateWorld.cpp:159
|
||||
msgid "Create"
|
||||
msgstr "Utwórz"
|
||||
|
||||
#: src/guiDeathScreen.cpp:96
|
||||
msgid "You died."
|
||||
msgstr "Zginąłeś."
|
||||
|
||||
#: src/guiDeathScreen.cpp:104
|
||||
msgid "Respawn"
|
||||
msgstr "Wróć do gry"
|
||||
|
||||
#: src/guiFormSpecMenu.cpp:582
|
||||
msgid "Left click: Move all items, Right click: Move single item"
|
||||
msgstr ""
|
||||
"Lewy klik: Przenieś wszystkie przedmioty, Prawy klik: przenieś pojedynczy "
|
||||
"przedmiot"
|
||||
|
||||
#: src/guiFormSpecMenu.cpp:607 src/guiMessageMenu.cpp:109
|
||||
#: src/guiTextInputMenu.cpp:131
|
||||
msgid "Proceed"
|
||||
msgstr "Kontynuuj"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:114
|
||||
msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)"
|
||||
msgstr ""
|
||||
"Zdefiniowane klawisze. (Jeżeli to menu nie działa, usuń skonfigurowane "
|
||||
"klawisze z pliku minetest.conf)"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:151
|
||||
msgid "\"Use\" = climb down"
|
||||
msgstr "\"Użyj\" = wspinaj się"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:164
|
||||
msgid "Double tap \"jump\" to toggle fly"
|
||||
msgstr "Wciśnij dwukrotnie \"Skok\" by włączyć tryb latania"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:269
|
||||
msgid "Key already in use"
|
||||
msgstr "Klawisz już zdefiniowany"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:347
|
||||
msgid "press key"
|
||||
msgstr "naciśnij klawisz"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:372
|
||||
msgid "Forward"
|
||||
msgstr "Do przodu"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:373
|
||||
msgid "Backward"
|
||||
msgstr "Do tyłu"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:374 src/keycode.cpp:228
|
||||
msgid "Left"
|
||||
msgstr "Lewo"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:375 src/keycode.cpp:228
|
||||
msgid "Right"
|
||||
msgstr "Prawo"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:376
|
||||
msgid "Use"
|
||||
msgstr "Użyj"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:377
|
||||
msgid "Jump"
|
||||
msgstr "Skok"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:378
|
||||
msgid "Sneak"
|
||||
msgstr "Skradanie"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:379
|
||||
msgid "Drop"
|
||||
msgstr "Upuść"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:380
|
||||
msgid "Inventory"
|
||||
msgstr "Inwentarz"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:381
|
||||
msgid "Chat"
|
||||
msgstr "Czat"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:382
|
||||
msgid "Command"
|
||||
msgstr "Komenda"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:383
|
||||
msgid "Console"
|
||||
msgstr "Konsola"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:384
|
||||
msgid "Toggle fly"
|
||||
msgstr "Przełącz tryb latania"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:385
|
||||
msgid "Toggle fast"
|
||||
msgstr "Przełącz tryb szybki"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:386
|
||||
msgid "Toggle noclip"
|
||||
msgstr "Przełącz tryb noclip"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:387
|
||||
msgid "Range select"
|
||||
msgstr "Zasięg widzenia"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:388
|
||||
msgid "Print stacks"
|
||||
msgstr "stosy Drukuj"
|
||||
|
||||
#: src/guiMainMenu.cpp:92
|
||||
msgid "Cannot create world: Name contains invalid characters"
|
||||
msgstr "Nie można stworzyć świata: nazwa zawiera niedozwolone znaki"
|
||||
|
||||
#: src/guiMainMenu.cpp:101
|
||||
msgid "Cannot create world: A world by this name already exists"
|
||||
msgstr "Nie można stworzyć świata: Istnieje już świat o takiej nazwie"
|
||||
|
||||
#: src/guiMainMenu.cpp:283
|
||||
msgid "Singleplayer"
|
||||
msgstr "Pojedynczy gracz"
|
||||
|
||||
#: src/guiMainMenu.cpp:284
|
||||
msgid "Multiplayer"
|
||||
msgstr "Gra wieloosobowa"
|
||||
|
||||
#: src/guiMainMenu.cpp:285
|
||||
msgid "Advanced"
|
||||
msgstr "Zaawansowane"
|
||||
|
||||
#: src/guiMainMenu.cpp:286
|
||||
msgid "Settings"
|
||||
msgstr "Ustawienia"
|
||||
|
||||
#: src/guiMainMenu.cpp:287
|
||||
msgid "Credits"
|
||||
msgstr "Autorzy"
|
||||
|
||||
#: src/guiMainMenu.cpp:317
|
||||
msgid "Select World:"
|
||||
msgstr "Wybierz świat:"
|
||||
|
||||
#: src/guiMainMenu.cpp:339 src/guiMainMenu.cpp:511 src/keycode.cpp:229
|
||||
msgid "Delete"
|
||||
msgstr "Skasuj"
|
||||
|
||||
#: src/guiMainMenu.cpp:346
|
||||
msgid "New"
|
||||
msgstr "Nowy"
|
||||
|
||||
#: src/guiMainMenu.cpp:354
|
||||
msgid "Configure"
|
||||
msgstr "Ustaw"
|
||||
|
||||
#: src/guiMainMenu.cpp:369 src/keycode.cpp:248
|
||||
msgid "Play"
|
||||
msgstr "Graj"
|
||||
|
||||
#: src/guiMainMenu.cpp:380 src/guiMainMenu.cpp:619
|
||||
msgid "Creative Mode"
|
||||
msgstr "Tryb kreatywny"
|
||||
|
||||
#: src/guiMainMenu.cpp:386 src/guiMainMenu.cpp:625
|
||||
msgid "Enable Damage"
|
||||
msgstr "Włącz obrażenia"
|
||||
|
||||
#: src/guiMainMenu.cpp:406 src/guiMainMenu.cpp:541
|
||||
msgid "Name/Password"
|
||||
msgstr "Nazwa gracza/Hasło"
|
||||
|
||||
#: src/guiMainMenu.cpp:442 src/guiMainMenu.cpp:459 src/guiMainMenu.cpp:1184
|
||||
msgid "Favorites:"
|
||||
msgstr "Ulubione:"
|
||||
|
||||
#: src/guiMainMenu.cpp:450 src/guiMainMenu.cpp:1194
|
||||
msgid "Public Server List:"
|
||||
msgstr "Lista publicznych serwerów:"
|
||||
|
||||
#: src/guiMainMenu.cpp:470 src/guiMainMenu.cpp:568
|
||||
msgid "Address/Port"
|
||||
msgstr "Adres/Port"
|
||||
|
||||
#: src/guiMainMenu.cpp:497 src/guiMainMenu.cpp:1183
|
||||
msgid "Show Public"
|
||||
msgstr "Pokaż publiczne"
|
||||
|
||||
#: src/guiMainMenu.cpp:501 src/guiMainMenu.cpp:1193
|
||||
msgid "Show Favorites"
|
||||
msgstr "Pokaż ulubione"
|
||||
|
||||
#: src/guiMainMenu.cpp:521
|
||||
msgid "Connect"
|
||||
msgstr "Połącz"
|
||||
|
||||
#: src/guiMainMenu.cpp:591
|
||||
msgid "Leave address blank to start a local server."
|
||||
msgstr "Nie wpisuj adresu by uruchomić lokalny serwer."
|
||||
|
||||
#: src/guiMainMenu.cpp:600
|
||||
msgid "Start Game / Connect"
|
||||
msgstr "Rozpocznij grę/Połącz"
|
||||
|
||||
#: src/guiMainMenu.cpp:632
|
||||
msgid "Public"
|
||||
msgstr "Publiczne"
|
||||
|
||||
#: src/guiMainMenu.cpp:640 src/guiMainMenu.cpp:1113
|
||||
msgid "Delete world"
|
||||
msgstr "Skasuj świat"
|
||||
|
||||
#: src/guiMainMenu.cpp:647
|
||||
msgid "Create world"
|
||||
msgstr "Stwórz świat"
|
||||
|
||||
#: src/guiMainMenu.cpp:681
|
||||
msgid "Fancy trees"
|
||||
msgstr "Ozdobne drzewa"
|
||||
|
||||
#: src/guiMainMenu.cpp:687
|
||||
msgid "Smooth Lighting"
|
||||
msgstr "Płynne oświetlenie"
|
||||
|
||||
#: src/guiMainMenu.cpp:693
|
||||
msgid "3D Clouds"
|
||||
msgstr "Chmury 3D"
|
||||
|
||||
#: src/guiMainMenu.cpp:699
|
||||
msgid "Opaque water"
|
||||
msgstr "Nieprzeźroczysta woda"
|
||||
|
||||
#: src/guiMainMenu.cpp:709
|
||||
msgid "Mip-Mapping"
|
||||
msgstr "Mip-Mappowanie"
|
||||
|
||||
#: src/guiMainMenu.cpp:716
|
||||
msgid "Anisotropic Filtering"
|
||||
msgstr "Filtrowanie anizotropowe"
|
||||
|
||||
#: src/guiMainMenu.cpp:723
|
||||
msgid "Bi-Linear Filtering"
|
||||
msgstr "Dwuliniowe filtrowanie"
|
||||
|
||||
#: src/guiMainMenu.cpp:730
|
||||
msgid "Tri-Linear Filtering"
|
||||
msgstr "Trójliniowe filtrowanie"
|
||||
|
||||
#: src/guiMainMenu.cpp:738
|
||||
msgid "Shaders"
|
||||
msgstr "Shadery"
|
||||
|
||||
#: src/guiMainMenu.cpp:745
|
||||
msgid "Preload item visuals"
|
||||
msgstr "Ładuj obrazy przedmiotów"
|
||||
|
||||
#: src/guiMainMenu.cpp:752
|
||||
msgid "Enable Particles"
|
||||
msgstr "Włącz cząstki"
|
||||
|
||||
#: src/guiMainMenu.cpp:759
|
||||
msgid "Finite liquid"
|
||||
msgstr "Realistyczne ciecze"
|
||||
|
||||
#: src/guiMainMenu.cpp:769
|
||||
msgid "Change keys"
|
||||
msgstr "Zmień klawisze"
|
||||
|
||||
#: src/guiMainMenu.cpp:1084
|
||||
msgid "Address required."
|
||||
msgstr "Wymagany adres."
|
||||
|
||||
#: src/guiMainMenu.cpp:1102
|
||||
msgid "Cannot delete world: Nothing selected"
|
||||
msgstr "Nie można skasować świata: nic nie zaznaczono"
|
||||
|
||||
#: src/guiMainMenu.cpp:1117
|
||||
msgid "Files to be deleted"
|
||||
msgstr "Pliki do skasowania"
|
||||
|
||||
#: src/guiMainMenu.cpp:1133
|
||||
msgid "Cannot create world: No games found"
|
||||
msgstr "Nie można utworzyć świata: Nie znaleziono żadnego trybu gry"
|
||||
|
||||
#: src/guiMainMenu.cpp:1149
|
||||
msgid "Cannot configure world: Nothing selected"
|
||||
msgstr "Nie można skonfigurować świata: Nic nie zaznaczono"
|
||||
|
||||
#: src/guiMainMenu.cpp:1256
|
||||
msgid "Failed to delete all world files"
|
||||
msgstr "Nie można skasować wszystkich plików świata"
|
||||
|
||||
#: src/guiPasswordChange.cpp:108
|
||||
msgid "Old Password"
|
||||
msgstr "Stare hasło"
|
||||
|
||||
#: src/guiPasswordChange.cpp:125
|
||||
msgid "New Password"
|
||||
msgstr "Nowe hasło"
|
||||
|
||||
#: src/guiPasswordChange.cpp:141
|
||||
msgid "Confirm Password"
|
||||
msgstr "Potwierdź hasło"
|
||||
|
||||
#: src/guiPasswordChange.cpp:158
|
||||
msgid "Change"
|
||||
msgstr "Zmień"
|
||||
|
||||
#: src/guiPasswordChange.cpp:167
|
||||
msgid "Passwords do not match!"
|
||||
msgstr "Hasła nie są jednakowe!"
|
||||
|
||||
#: src/guiPauseMenu.cpp:123
|
||||
msgid "Continue"
|
||||
msgstr "Dalej"
|
||||
|
||||
#: src/guiPauseMenu.cpp:132
|
||||
msgid "Change Password"
|
||||
msgstr "Zmień hasło"
|
||||
|
||||
#: src/guiPauseMenu.cpp:140
|
||||
msgid "Sound Volume"
|
||||
msgstr "Głośność"
|
||||
|
||||
#: src/guiPauseMenu.cpp:147
|
||||
msgid "Exit to Menu"
|
||||
msgstr "Wyjdź do menu"
|
||||
|
||||
#: src/guiPauseMenu.cpp:154
|
||||
msgid "Exit to OS"
|
||||
msgstr "Wyjście z gry"
|
||||
|
||||
#: src/guiPauseMenu.cpp:161
|
||||
msgid ""
|
||||
"Default Controls:\n"
|
||||
"- WASD: Walk\n"
|
||||
"- Mouse left: dig/hit\n"
|
||||
"- Mouse right: place/use\n"
|
||||
"- Mouse wheel: select item\n"
|
||||
"- 0...9: select item\n"
|
||||
"- Shift: sneak\n"
|
||||
"- R: Toggle viewing all loaded chunks\n"
|
||||
"- I: Inventory menu\n"
|
||||
"- ESC: This menu\n"
|
||||
"- T: Chat\n"
|
||||
msgstr ""
|
||||
"Domyślne ustawienia:\n"
|
||||
"- WASD: poruszanie\n"
|
||||
"- Lewy przycisk myszki: kop/uderz\n"
|
||||
"- Prawy przycisk myszki: połóż/użyj\n"
|
||||
"- Kółko myszki: wybieranie przedmiotu\n"
|
||||
"- 0...9: wybieranie przedmiotu\n"
|
||||
"- Shift: skradanie\n"
|
||||
"- R: przełączanie trybu widoczności\n"
|
||||
"- I: menu posiadanych przedmiotów\n"
|
||||
"- ESC: to menu\n"
|
||||
"- T: Czat\n"
|
||||
|
||||
#: src/guiVolumeChange.cpp:108
|
||||
msgid "Sound Volume: "
|
||||
msgstr "Głośność: "
|
||||
|
||||
#: src/guiVolumeChange.cpp:121
|
||||
msgid "Exit"
|
||||
msgstr "Wyjście"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Left Button"
|
||||
msgstr "Lewy przycisk myszki"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Middle Button"
|
||||
msgstr "Środkowy przycisk myszki"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Right Button"
|
||||
msgstr "Prawy przycisk myszki"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "X Button 1"
|
||||
msgstr "X Button 1"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Back"
|
||||
msgstr "Backspace"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Clear"
|
||||
msgstr "Delete"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Return"
|
||||
msgstr "Enter"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Tab"
|
||||
msgstr "Tab"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "X Button 2"
|
||||
msgstr "X Button 2"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Capital"
|
||||
msgstr "Caps Lock"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Control"
|
||||
msgstr "Control"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Kana"
|
||||
msgstr "Kana"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Menu"
|
||||
msgstr "Menu"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Pause"
|
||||
msgstr "Pause"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Shift"
|
||||
msgstr "Shift"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Convert"
|
||||
msgstr "Convert"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Escape"
|
||||
msgstr "Escape"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Final"
|
||||
msgstr "Final"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Junja"
|
||||
msgstr "Junja"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Kanji"
|
||||
msgstr "Kanji"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Nonconvert"
|
||||
msgstr "Nonconvert"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Accept"
|
||||
msgstr "Accept"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "End"
|
||||
msgstr "End"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Home"
|
||||
msgstr "Home"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Mode Change"
|
||||
msgstr "Mode Change"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Next"
|
||||
msgstr "Next"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Prior"
|
||||
msgstr "Prior"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Space"
|
||||
msgstr "Spacja"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Down"
|
||||
msgstr "Dół"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Execute"
|
||||
msgstr "Execute"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Print"
|
||||
msgstr "Print"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Select"
|
||||
msgstr "Select"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Up"
|
||||
msgstr "Góra"
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Help"
|
||||
msgstr "Help"
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Insert"
|
||||
msgstr "Insert"
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Snapshot"
|
||||
msgstr "Snapshot"
|
||||
|
||||
#: src/keycode.cpp:232
|
||||
msgid "Left Windows"
|
||||
msgstr "Lewy Windows"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Apps"
|
||||
msgstr "Apps"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Numpad 0"
|
||||
msgstr "Numpad 0"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Numpad 1"
|
||||
msgstr "Numpad 1"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Right Windows"
|
||||
msgstr "Prawy Windows"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Sleep"
|
||||
msgstr "Sleep"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 2"
|
||||
msgstr "Numpad 2"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 3"
|
||||
msgstr "Numpad 3"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 4"
|
||||
msgstr "Numpad 4"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 5"
|
||||
msgstr "Numpad 5"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 6"
|
||||
msgstr "Numpad 6"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 7"
|
||||
msgstr "Numpad 7"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad *"
|
||||
msgstr "Numpad *"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad +"
|
||||
msgstr "Numpad +"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad -"
|
||||
msgstr "Numpad -"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad /"
|
||||
msgstr "Numpad /"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad 8"
|
||||
msgstr "Numpad 8"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad 9"
|
||||
msgstr "Numpad 9"
|
||||
|
||||
#: src/keycode.cpp:239
|
||||
msgid "Num Lock"
|
||||
msgstr "Num Lock"
|
||||
|
||||
#: src/keycode.cpp:239
|
||||
msgid "Scroll Lock"
|
||||
msgstr "Scroll Lock"
|
||||
|
||||
#: src/keycode.cpp:240
|
||||
msgid "Left Shift"
|
||||
msgstr "Lewy Shift"
|
||||
|
||||
#: src/keycode.cpp:240
|
||||
msgid "Right Shift"
|
||||
msgstr "Prawy Shift"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Left Control"
|
||||
msgstr "Lewy Control"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Left Menu"
|
||||
msgstr "Lewy Menu"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Right Control"
|
||||
msgstr "Prawy Control"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Right Menu"
|
||||
msgstr "Prawy Menu"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Comma"
|
||||
msgstr "Przecinek"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Minus"
|
||||
msgstr "Minus"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Period"
|
||||
msgstr "Kropka"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Plus"
|
||||
msgstr "Plus"
|
||||
|
||||
#: src/keycode.cpp:247
|
||||
msgid "Attn"
|
||||
msgstr "Attn"
|
||||
|
||||
#: src/keycode.cpp:247
|
||||
msgid "CrSel"
|
||||
msgstr "CrSel"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "Erase OEF"
|
||||
msgstr "Erase OEF"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "ExSel"
|
||||
msgstr "ExSel"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "OEM Clear"
|
||||
msgstr "OEM Clear"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "PA1"
|
||||
msgstr "PA1"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "Zoom"
|
||||
msgstr "Zoom"
|
||||
|
||||
#: src/main.cpp:1506
|
||||
msgid "Main Menu"
|
||||
msgstr "Menu główne"
|
||||
|
||||
#: src/main.cpp:1830
|
||||
msgid "Failed to initialize world"
|
||||
msgstr "Inicjalizacja świata nie powiodła się"
|
||||
|
||||
#: src/main.cpp:1842
|
||||
msgid "No world selected and no address provided. Nothing to do."
|
||||
msgstr "Nie wybrano świata ani adresu."
|
||||
|
||||
#: src/main.cpp:1850
|
||||
msgid "Could not find or load game \""
|
||||
msgstr "Nie można znaleźć lub wczytać trybu gry \""
|
||||
|
||||
#: src/main.cpp:1864
|
||||
msgid "Invalid gamespec."
|
||||
msgstr "Nieprawidłowa specyfikacja trybu gry."
|
||||
|
||||
#: src/main.cpp:1904
|
||||
msgid "Connection error (timed out?)"
|
||||
msgstr "Błąd połączenia (brak odpowiedzi?)"
|
||||
|
||||
#: src/main.cpp:1915
|
||||
msgid ""
|
||||
"\n"
|
||||
"Check debug.txt for details."
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Sprawdź plik debug.txt by uzyskać więcej informacji."
|
||||
776
po/pt/minetest.po
Normal file
@@ -0,0 +1,776 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: minetest\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-03-30 19:56+0100\n"
|
||||
"PO-Revision-Date: 2013-04-03 16:35+0200\n"
|
||||
"Last-Translator: Dêivan Ortiz Munhoz <deivan@novoseusadosinformatica.com.br>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: pt\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Weblate 1.4-dev\n"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:125
|
||||
msgid ""
|
||||
"Warning: Some mods are not configured yet.\n"
|
||||
"They will be enabled by default when you save the configuration. "
|
||||
msgstr ""
|
||||
"Alerta: Alguns mods ainda não estão configurados.\n"
|
||||
"Eles vão ser ativos por predefinição quando guardar a configuração. "
|
||||
|
||||
#: src/guiConfigureWorld.cpp:144
|
||||
msgid ""
|
||||
"Warning: Some configured mods are missing.\n"
|
||||
"Their setting will be removed when you save the configuration. "
|
||||
msgstr ""
|
||||
"Alerta: Alguns mods configurados estão em falta.\n"
|
||||
"As definições vão ser removidas quando gravar a configuração. "
|
||||
|
||||
#: src/guiConfigureWorld.cpp:208
|
||||
msgid "enabled"
|
||||
msgstr "ativo"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:215
|
||||
msgid "Enable All"
|
||||
msgstr "Ativar Tudo"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:222
|
||||
msgid "Disable All"
|
||||
msgstr "Desativar Tudo"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:228
|
||||
msgid "depends on:"
|
||||
msgstr "depende de:"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:240
|
||||
msgid "is required by:"
|
||||
msgstr "é necessário pelo:"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:262 src/guiCreateWorld.cpp:165
|
||||
#: src/guiKeyChangeMenu.cpp:179 src/keycode.cpp:223
|
||||
msgid "Cancel"
|
||||
msgstr "Cancelar"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:268 src/guiKeyChangeMenu.cpp:173
|
||||
msgid "Save"
|
||||
msgstr "Guardar"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:394
|
||||
msgid "Configuration saved. "
|
||||
msgstr "Configuração gravada. "
|
||||
|
||||
#: src/guiConfigureWorld.cpp:402
|
||||
msgid "Warning: Configuration not consistent. "
|
||||
msgstr "Alerta: Configuração não compativel. "
|
||||
|
||||
#: src/guiConfirmMenu.cpp:120
|
||||
msgid "Yes"
|
||||
msgstr "Sim"
|
||||
|
||||
#: src/guiConfirmMenu.cpp:126
|
||||
msgid "No"
|
||||
msgstr "Não"
|
||||
|
||||
#: src/guiCreateWorld.cpp:116
|
||||
msgid "World name"
|
||||
msgstr "Nome do Mundo"
|
||||
|
||||
#: src/guiCreateWorld.cpp:135
|
||||
msgid "Game"
|
||||
msgstr "Jogo"
|
||||
|
||||
#: src/guiCreateWorld.cpp:159
|
||||
msgid "Create"
|
||||
msgstr "Criar"
|
||||
|
||||
#: src/guiDeathScreen.cpp:96
|
||||
msgid "You died."
|
||||
msgstr "Estás morto."
|
||||
|
||||
#: src/guiDeathScreen.cpp:104
|
||||
msgid "Respawn"
|
||||
msgstr "Renascer"
|
||||
|
||||
#: src/guiFormSpecMenu.cpp:582
|
||||
msgid "Left click: Move all items, Right click: Move single item"
|
||||
msgstr "Botão esq.: Mover todos os items, Botão dir.: Mover um item"
|
||||
|
||||
#: src/guiFormSpecMenu.cpp:607 src/guiMessageMenu.cpp:109
|
||||
#: src/guiTextInputMenu.cpp:131
|
||||
msgid "Proceed"
|
||||
msgstr "Continuar"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:114
|
||||
msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)"
|
||||
msgstr "Teclas. (Se este menu estragar-se, remova as linhas do minetest.conf)"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:151
|
||||
msgid "\"Use\" = climb down"
|
||||
msgstr "\"Use\" = ir para baixo"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:164
|
||||
msgid "Double tap \"jump\" to toggle fly"
|
||||
msgstr "Duas vezes \"saltar\" para ativar vôo"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:269
|
||||
msgid "Key already in use"
|
||||
msgstr "Tecla já em uso"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:347
|
||||
msgid "press key"
|
||||
msgstr "pressione tecla"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:372
|
||||
msgid "Forward"
|
||||
msgstr "Avançar"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:373
|
||||
msgid "Backward"
|
||||
msgstr "Para trás"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:374 src/keycode.cpp:228
|
||||
msgid "Left"
|
||||
msgstr "Esquerda"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:375 src/keycode.cpp:228
|
||||
msgid "Right"
|
||||
msgstr "Direita"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:376
|
||||
msgid "Use"
|
||||
msgstr "Usar"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:377
|
||||
msgid "Jump"
|
||||
msgstr "Saltar"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:378
|
||||
msgid "Sneak"
|
||||
msgstr "Agachar"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:379
|
||||
msgid "Drop"
|
||||
msgstr "Dropar"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:380
|
||||
msgid "Inventory"
|
||||
msgstr "Inventário"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:381
|
||||
msgid "Chat"
|
||||
msgstr "CHAT"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:382
|
||||
msgid "Command"
|
||||
msgstr "Comando"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:383
|
||||
msgid "Console"
|
||||
msgstr "Consola"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:384
|
||||
msgid "Toggle fly"
|
||||
msgstr "Ativar vôo"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:385
|
||||
msgid "Toggle fast"
|
||||
msgstr "Ativar correr"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:386
|
||||
msgid "Toggle noclip"
|
||||
msgstr "Ativar noclip"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:387
|
||||
msgid "Range select"
|
||||
msgstr "Seleccionar Distância"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:388
|
||||
msgid "Print stacks"
|
||||
msgstr "Imprimir stacks"
|
||||
|
||||
#: src/guiMainMenu.cpp:92
|
||||
msgid "Cannot create world: Name contains invalid characters"
|
||||
msgstr "Não foi possível criar mundo: Nome com carácteres inválidos"
|
||||
|
||||
#: src/guiMainMenu.cpp:101
|
||||
msgid "Cannot create world: A world by this name already exists"
|
||||
msgstr "Não foi possivel criar mundo: Mundo com este nome já existente"
|
||||
|
||||
#: src/guiMainMenu.cpp:283
|
||||
msgid "Singleplayer"
|
||||
msgstr "Um Jogador"
|
||||
|
||||
#: src/guiMainMenu.cpp:284
|
||||
msgid "Multiplayer"
|
||||
msgstr "Multijogador"
|
||||
|
||||
#: src/guiMainMenu.cpp:285
|
||||
msgid "Advanced"
|
||||
msgstr "Avançado"
|
||||
|
||||
#: src/guiMainMenu.cpp:286
|
||||
msgid "Settings"
|
||||
msgstr "Definições"
|
||||
|
||||
#: src/guiMainMenu.cpp:287
|
||||
msgid "Credits"
|
||||
msgstr "Créditos"
|
||||
|
||||
#: src/guiMainMenu.cpp:317
|
||||
msgid "Select World:"
|
||||
msgstr "Seleccionar Mundo:"
|
||||
|
||||
#: src/guiMainMenu.cpp:339 src/guiMainMenu.cpp:511 src/keycode.cpp:229
|
||||
msgid "Delete"
|
||||
msgstr "Eliminar"
|
||||
|
||||
#: src/guiMainMenu.cpp:346
|
||||
msgid "New"
|
||||
msgstr "Novo"
|
||||
|
||||
#: src/guiMainMenu.cpp:354
|
||||
msgid "Configure"
|
||||
msgstr "Configurar"
|
||||
|
||||
#: src/guiMainMenu.cpp:369 src/keycode.cpp:248
|
||||
msgid "Play"
|
||||
msgstr "Jogar"
|
||||
|
||||
#: src/guiMainMenu.cpp:380 src/guiMainMenu.cpp:619
|
||||
msgid "Creative Mode"
|
||||
msgstr "Modo Criativo"
|
||||
|
||||
#: src/guiMainMenu.cpp:386 src/guiMainMenu.cpp:625
|
||||
msgid "Enable Damage"
|
||||
msgstr "Ativar Dano"
|
||||
|
||||
#: src/guiMainMenu.cpp:406 src/guiMainMenu.cpp:541
|
||||
msgid "Name/Password"
|
||||
msgstr "Nome/Senha"
|
||||
|
||||
#: src/guiMainMenu.cpp:442 src/guiMainMenu.cpp:459 src/guiMainMenu.cpp:1184
|
||||
msgid "Favorites:"
|
||||
msgstr "Favoritos:"
|
||||
|
||||
#: src/guiMainMenu.cpp:450 src/guiMainMenu.cpp:1194
|
||||
msgid "Public Server List:"
|
||||
msgstr "Lista de servidor públicos:"
|
||||
|
||||
#: src/guiMainMenu.cpp:470 src/guiMainMenu.cpp:568
|
||||
msgid "Address/Port"
|
||||
msgstr "Endereço/Porta"
|
||||
|
||||
#: src/guiMainMenu.cpp:497 src/guiMainMenu.cpp:1183
|
||||
msgid "Show Public"
|
||||
msgstr "Mostrar Públicos"
|
||||
|
||||
#: src/guiMainMenu.cpp:501 src/guiMainMenu.cpp:1193
|
||||
msgid "Show Favorites"
|
||||
msgstr "Mostrar Favoritos"
|
||||
|
||||
#: src/guiMainMenu.cpp:521
|
||||
msgid "Connect"
|
||||
msgstr "Conectar"
|
||||
|
||||
#: src/guiMainMenu.cpp:591
|
||||
msgid "Leave address blank to start a local server."
|
||||
msgstr "Deixe endereço em branco para iniciar servidor local."
|
||||
|
||||
#: src/guiMainMenu.cpp:600
|
||||
msgid "Start Game / Connect"
|
||||
msgstr "Iniciar Jogo / Conectar"
|
||||
|
||||
#: src/guiMainMenu.cpp:632
|
||||
msgid "Public"
|
||||
msgstr "Público"
|
||||
|
||||
#: src/guiMainMenu.cpp:640 src/guiMainMenu.cpp:1113
|
||||
msgid "Delete world"
|
||||
msgstr "Eliminar mundo"
|
||||
|
||||
#: src/guiMainMenu.cpp:647
|
||||
msgid "Create world"
|
||||
msgstr "Criar mundo"
|
||||
|
||||
#: src/guiMainMenu.cpp:681
|
||||
msgid "Fancy trees"
|
||||
msgstr "Árvores Melhoradas"
|
||||
|
||||
#: src/guiMainMenu.cpp:687
|
||||
msgid "Smooth Lighting"
|
||||
msgstr "Iluminação Suave"
|
||||
|
||||
#: src/guiMainMenu.cpp:693
|
||||
msgid "3D Clouds"
|
||||
msgstr "Nuvens 3D"
|
||||
|
||||
#: src/guiMainMenu.cpp:699
|
||||
msgid "Opaque water"
|
||||
msgstr "Água Opaca"
|
||||
|
||||
#: src/guiMainMenu.cpp:709
|
||||
msgid "Mip-Mapping"
|
||||
msgstr "Mip-Mapping"
|
||||
|
||||
#: src/guiMainMenu.cpp:716
|
||||
msgid "Anisotropic Filtering"
|
||||
msgstr "Filtro Anisotropico"
|
||||
|
||||
#: src/guiMainMenu.cpp:723
|
||||
msgid "Bi-Linear Filtering"
|
||||
msgstr "Filtro Bi-Linear"
|
||||
|
||||
#: src/guiMainMenu.cpp:730
|
||||
msgid "Tri-Linear Filtering"
|
||||
msgstr "Filtro Tri-Linear"
|
||||
|
||||
#: src/guiMainMenu.cpp:738
|
||||
msgid "Shaders"
|
||||
msgstr "Sombras"
|
||||
|
||||
#: src/guiMainMenu.cpp:745
|
||||
msgid "Preload item visuals"
|
||||
msgstr "Precarregamento dos items"
|
||||
|
||||
#: src/guiMainMenu.cpp:752
|
||||
msgid "Enable Particles"
|
||||
msgstr "Ativar Particulas"
|
||||
|
||||
#: src/guiMainMenu.cpp:759
|
||||
msgid "Finite liquid"
|
||||
msgstr "Líquido finito"
|
||||
|
||||
#: src/guiMainMenu.cpp:769
|
||||
msgid "Change keys"
|
||||
msgstr "Mudar teclas"
|
||||
|
||||
#: src/guiMainMenu.cpp:1084
|
||||
msgid "Address required."
|
||||
msgstr "Endereço necessário."
|
||||
|
||||
#: src/guiMainMenu.cpp:1102
|
||||
msgid "Cannot delete world: Nothing selected"
|
||||
msgstr "Não foi possível eliminar mundo: Nada seleccionado"
|
||||
|
||||
#: src/guiMainMenu.cpp:1117
|
||||
msgid "Files to be deleted"
|
||||
msgstr "Ficheiros para eliminar"
|
||||
|
||||
#: src/guiMainMenu.cpp:1133
|
||||
msgid "Cannot create world: No games found"
|
||||
msgstr "Não foi possivel criar mundo: Jogos não detectados"
|
||||
|
||||
#: src/guiMainMenu.cpp:1149
|
||||
msgid "Cannot configure world: Nothing selected"
|
||||
msgstr "Não foi possivel configurar mundo: Nada seleccionado"
|
||||
|
||||
#: src/guiMainMenu.cpp:1256
|
||||
msgid "Failed to delete all world files"
|
||||
msgstr "Remoção dos ficheiros dos mundos falhada"
|
||||
|
||||
#: src/guiPasswordChange.cpp:108
|
||||
msgid "Old Password"
|
||||
msgstr "Senha antiga"
|
||||
|
||||
#: src/guiPasswordChange.cpp:125
|
||||
msgid "New Password"
|
||||
msgstr "Senha Nova"
|
||||
|
||||
#: src/guiPasswordChange.cpp:141
|
||||
msgid "Confirm Password"
|
||||
msgstr "Confirmar Senha"
|
||||
|
||||
#: src/guiPasswordChange.cpp:158
|
||||
msgid "Change"
|
||||
msgstr "Mudar"
|
||||
|
||||
#: src/guiPasswordChange.cpp:167
|
||||
msgid "Passwords do not match!"
|
||||
msgstr "Senhas não correspondem!"
|
||||
|
||||
#: src/guiPauseMenu.cpp:123
|
||||
msgid "Continue"
|
||||
msgstr "Continuar"
|
||||
|
||||
#: src/guiPauseMenu.cpp:132
|
||||
msgid "Change Password"
|
||||
msgstr "Mudar Senha"
|
||||
|
||||
#: src/guiPauseMenu.cpp:140
|
||||
msgid "Sound Volume"
|
||||
msgstr "Volume do som"
|
||||
|
||||
#: src/guiPauseMenu.cpp:147
|
||||
msgid "Exit to Menu"
|
||||
msgstr "Sair para Menu"
|
||||
|
||||
#: src/guiPauseMenu.cpp:154
|
||||
msgid "Exit to OS"
|
||||
msgstr "Sair para SO"
|
||||
|
||||
#: src/guiPauseMenu.cpp:161
|
||||
msgid ""
|
||||
"Default Controls:\n"
|
||||
"- WASD: Walk\n"
|
||||
"- Mouse left: dig/hit\n"
|
||||
"- Mouse right: place/use\n"
|
||||
"- Mouse wheel: select item\n"
|
||||
"- 0...9: select item\n"
|
||||
"- Shift: sneak\n"
|
||||
"- R: Toggle viewing all loaded chunks\n"
|
||||
"- I: Inventory menu\n"
|
||||
"- ESC: This menu\n"
|
||||
"- T: Chat\n"
|
||||
msgstr ""
|
||||
"Controlos Normais:\n"
|
||||
"- WASD: Andar\n"
|
||||
"- Botão esq.: partir/atacar\n"
|
||||
"- Botão dir.: colocar/usar\n"
|
||||
"- Roda do Rato: seleccionar item\n"
|
||||
"- 0...9: seleccionar item\n"
|
||||
"- Shift: agachar\n"
|
||||
"- R: Mudar visualização de todos os chunks\n"
|
||||
"- I: Inventário\n"
|
||||
"- ESC: Este menu\n"
|
||||
"- T: Chat\n"
|
||||
|
||||
#: src/guiVolumeChange.cpp:108
|
||||
msgid "Sound Volume: "
|
||||
msgstr "Volume do som: "
|
||||
|
||||
#: src/guiVolumeChange.cpp:121
|
||||
msgid "Exit"
|
||||
msgstr "Saida"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Left Button"
|
||||
msgstr "Botão Esquerdo"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Middle Button"
|
||||
msgstr "Roda do Rato"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Right Button"
|
||||
msgstr "Botão Direito"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "X Button 1"
|
||||
msgstr "Botão X 1"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Back"
|
||||
msgstr "Voltar"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Clear"
|
||||
msgstr "Limpar"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Return"
|
||||
msgstr "Enter"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Tab"
|
||||
msgstr "Tabulação"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "X Button 2"
|
||||
msgstr "Botão X 2"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Capital"
|
||||
msgstr "Capital"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Control"
|
||||
msgstr "Control"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Kana"
|
||||
msgstr "Kana"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Menu"
|
||||
msgstr "Menu"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Pause"
|
||||
msgstr "Pausa"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Shift"
|
||||
msgstr "SHIFT"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Convert"
|
||||
msgstr "Converter"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Escape"
|
||||
msgstr "ESC"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Final"
|
||||
msgstr "Final"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Junja"
|
||||
msgstr "Junja"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Kanji"
|
||||
msgstr "Kanji"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Nonconvert"
|
||||
msgstr "Nãoconverter"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Accept"
|
||||
msgstr "Aceitar"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "End"
|
||||
msgstr "END"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Home"
|
||||
msgstr "HOME"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Mode Change"
|
||||
msgstr "MODE Change"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Next"
|
||||
msgstr "Próximo"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Prior"
|
||||
msgstr "Prévio"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Space"
|
||||
msgstr "Espaço"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Down"
|
||||
msgstr "Baixo"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Execute"
|
||||
msgstr "Executar"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Print"
|
||||
msgstr "PRINT"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Select"
|
||||
msgstr "Seleccionar"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Up"
|
||||
msgstr "Cima"
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Help"
|
||||
msgstr "Ajuda"
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Insert"
|
||||
msgstr "INSERT"
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Snapshot"
|
||||
msgstr "Screenshot"
|
||||
|
||||
#: src/keycode.cpp:232
|
||||
msgid "Left Windows"
|
||||
msgstr "WINDOWS Esq."
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Apps"
|
||||
msgstr "App"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Numpad 0"
|
||||
msgstr "Numpad 0"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Numpad 1"
|
||||
msgstr "Numpad 1"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Right Windows"
|
||||
msgstr "WINDOWS Dir."
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Sleep"
|
||||
msgstr "Suspender"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 2"
|
||||
msgstr "Numpad 2"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 3"
|
||||
msgstr "Numpad 3"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 4"
|
||||
msgstr "Numpad 4"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 5"
|
||||
msgstr "Numpad 5"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 6"
|
||||
msgstr "Numpad 6"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 7"
|
||||
msgstr "Numpad 7"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad *"
|
||||
msgstr "Numpad *"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad +"
|
||||
msgstr "Numpad +"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad -"
|
||||
msgstr "Numpad -"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad /"
|
||||
msgstr "Numpad /"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad 8"
|
||||
msgstr "Numpad 8"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad 9"
|
||||
msgstr "Numpad 9"
|
||||
|
||||
#: src/keycode.cpp:239
|
||||
msgid "Num Lock"
|
||||
msgstr "Num Lock"
|
||||
|
||||
#: src/keycode.cpp:239
|
||||
msgid "Scroll Lock"
|
||||
msgstr "Scroll Lock"
|
||||
|
||||
#: src/keycode.cpp:240
|
||||
msgid "Left Shift"
|
||||
msgstr "Shift Esquerdo"
|
||||
|
||||
#: src/keycode.cpp:240
|
||||
msgid "Right Shift"
|
||||
msgstr "Shift Direito"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Left Control"
|
||||
msgstr "Control Esq"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Left Menu"
|
||||
msgstr "Menu Esquerdo"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Right Control"
|
||||
msgstr "Control Direito"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Right Menu"
|
||||
msgstr "Menu Direito"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Comma"
|
||||
msgstr "Virgula"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Minus"
|
||||
msgstr "Menos"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Period"
|
||||
msgstr "Período"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Plus"
|
||||
msgstr "Mais"
|
||||
|
||||
#: src/keycode.cpp:247
|
||||
msgid "Attn"
|
||||
msgstr "Attm"
|
||||
|
||||
#: src/keycode.cpp:247
|
||||
msgid "CrSel"
|
||||
msgstr "CrSel"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "Erase OEF"
|
||||
msgstr "Apagar OEF"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "ExSel"
|
||||
msgstr "ExSel"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "OEM Clear"
|
||||
msgstr "Limpar OEM"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "PA1"
|
||||
msgstr "PAL"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "Zoom"
|
||||
msgstr "Zoom"
|
||||
|
||||
#: src/main.cpp:1506
|
||||
msgid "Main Menu"
|
||||
msgstr "Menu Principal"
|
||||
|
||||
#: src/main.cpp:1830
|
||||
msgid "Failed to initialize world"
|
||||
msgstr "Falha ao iniciar mundo"
|
||||
|
||||
#: src/main.cpp:1842
|
||||
msgid "No world selected and no address provided. Nothing to do."
|
||||
msgstr ""
|
||||
"Nenhum mundo seleccionado e nenhum endereço providenciado. Nada para fazer."
|
||||
|
||||
#: src/main.cpp:1850
|
||||
msgid "Could not find or load game \""
|
||||
msgstr "Não foi possível encontrar ou carregar jogo \""
|
||||
|
||||
#: src/main.cpp:1864
|
||||
msgid "Invalid gamespec."
|
||||
msgstr "gamespec inválido."
|
||||
|
||||
#: src/main.cpp:1904
|
||||
msgid "Connection error (timed out?)"
|
||||
msgstr "Erro de conexão (excedeu tempo?)"
|
||||
|
||||
#: src/main.cpp:1915
|
||||
msgid ""
|
||||
"\n"
|
||||
"Check debug.txt for details."
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Verifique debug.txt para mais detalhes."
|
||||
757
po/ro/minetest.po
Normal file
@@ -0,0 +1,757 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: minetest\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-03-30 19:56+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:125
|
||||
msgid ""
|
||||
"Warning: Some mods are not configured yet.\n"
|
||||
"They will be enabled by default when you save the configuration. "
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:144
|
||||
msgid ""
|
||||
"Warning: Some configured mods are missing.\n"
|
||||
"Their setting will be removed when you save the configuration. "
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:208
|
||||
msgid "enabled"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:215
|
||||
msgid "Enable All"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:222
|
||||
msgid "Disable All"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:228
|
||||
msgid "depends on:"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:240
|
||||
msgid "is required by:"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:262 src/guiCreateWorld.cpp:165
|
||||
#: src/guiKeyChangeMenu.cpp:179 src/keycode.cpp:223
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:268 src/guiKeyChangeMenu.cpp:173
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:394
|
||||
msgid "Configuration saved. "
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfigureWorld.cpp:402
|
||||
msgid "Warning: Configuration not consistent. "
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfirmMenu.cpp:120
|
||||
msgid "Yes"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiConfirmMenu.cpp:126
|
||||
msgid "No"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiCreateWorld.cpp:116
|
||||
msgid "World name"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiCreateWorld.cpp:135
|
||||
msgid "Game"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiCreateWorld.cpp:159
|
||||
msgid "Create"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiDeathScreen.cpp:96
|
||||
msgid "You died."
|
||||
msgstr ""
|
||||
|
||||
#: src/guiDeathScreen.cpp:104
|
||||
msgid "Respawn"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiFormSpecMenu.cpp:582
|
||||
msgid "Left click: Move all items, Right click: Move single item"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiFormSpecMenu.cpp:607 src/guiMessageMenu.cpp:109
|
||||
#: src/guiTextInputMenu.cpp:131
|
||||
msgid "Proceed"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:114
|
||||
msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:151
|
||||
msgid "\"Use\" = climb down"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:164
|
||||
msgid "Double tap \"jump\" to toggle fly"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:269
|
||||
msgid "Key already in use"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:347
|
||||
msgid "press key"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:372
|
||||
msgid "Forward"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:373
|
||||
msgid "Backward"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:374 src/keycode.cpp:228
|
||||
msgid "Left"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:375 src/keycode.cpp:228
|
||||
msgid "Right"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:376
|
||||
msgid "Use"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:377
|
||||
msgid "Jump"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:378
|
||||
msgid "Sneak"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:379
|
||||
msgid "Drop"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:380
|
||||
msgid "Inventory"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:381
|
||||
msgid "Chat"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:382
|
||||
msgid "Command"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:383
|
||||
msgid "Console"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:384
|
||||
msgid "Toggle fly"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:385
|
||||
msgid "Toggle fast"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:386
|
||||
msgid "Toggle noclip"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:387
|
||||
msgid "Range select"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:388
|
||||
msgid "Print stacks"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:92
|
||||
msgid "Cannot create world: Name contains invalid characters"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:101
|
||||
msgid "Cannot create world: A world by this name already exists"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:283
|
||||
msgid "Singleplayer"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:284
|
||||
msgid "Multiplayer"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:285
|
||||
msgid "Advanced"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:286
|
||||
msgid "Settings"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:287
|
||||
msgid "Credits"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:317
|
||||
msgid "Select World:"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:339 src/guiMainMenu.cpp:511 src/keycode.cpp:229
|
||||
msgid "Delete"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:346
|
||||
msgid "New"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:354
|
||||
msgid "Configure"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:369 src/keycode.cpp:248
|
||||
msgid "Play"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:380 src/guiMainMenu.cpp:619
|
||||
msgid "Creative Mode"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:386 src/guiMainMenu.cpp:625
|
||||
msgid "Enable Damage"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:406 src/guiMainMenu.cpp:541
|
||||
msgid "Name/Password"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:442 src/guiMainMenu.cpp:459 src/guiMainMenu.cpp:1184
|
||||
msgid "Favorites:"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:450 src/guiMainMenu.cpp:1194
|
||||
msgid "Public Server List:"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:470 src/guiMainMenu.cpp:568
|
||||
msgid "Address/Port"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:497 src/guiMainMenu.cpp:1183
|
||||
msgid "Show Public"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:501 src/guiMainMenu.cpp:1193
|
||||
msgid "Show Favorites"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:521
|
||||
msgid "Connect"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:591
|
||||
msgid "Leave address blank to start a local server."
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:600
|
||||
msgid "Start Game / Connect"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:632
|
||||
msgid "Public"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:640 src/guiMainMenu.cpp:1113
|
||||
msgid "Delete world"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:647
|
||||
msgid "Create world"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:681
|
||||
msgid "Fancy trees"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:687
|
||||
msgid "Smooth Lighting"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:693
|
||||
msgid "3D Clouds"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:699
|
||||
msgid "Opaque water"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:709
|
||||
msgid "Mip-Mapping"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:716
|
||||
msgid "Anisotropic Filtering"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:723
|
||||
msgid "Bi-Linear Filtering"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:730
|
||||
msgid "Tri-Linear Filtering"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:738
|
||||
msgid "Shaders"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:745
|
||||
msgid "Preload item visuals"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:752
|
||||
msgid "Enable Particles"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:759
|
||||
msgid "Finite liquid"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:769
|
||||
msgid "Change keys"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:1084
|
||||
msgid "Address required."
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:1102
|
||||
msgid "Cannot delete world: Nothing selected"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:1117
|
||||
msgid "Files to be deleted"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:1133
|
||||
msgid "Cannot create world: No games found"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:1149
|
||||
msgid "Cannot configure world: Nothing selected"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:1256
|
||||
msgid "Failed to delete all world files"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPasswordChange.cpp:108
|
||||
msgid "Old Password"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPasswordChange.cpp:125
|
||||
msgid "New Password"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPasswordChange.cpp:141
|
||||
msgid "Confirm Password"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPasswordChange.cpp:158
|
||||
msgid "Change"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPasswordChange.cpp:167
|
||||
msgid "Passwords do not match!"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPauseMenu.cpp:123
|
||||
msgid "Continue"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPauseMenu.cpp:132
|
||||
msgid "Change Password"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPauseMenu.cpp:140
|
||||
msgid "Sound Volume"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPauseMenu.cpp:147
|
||||
msgid "Exit to Menu"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPauseMenu.cpp:154
|
||||
msgid "Exit to OS"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPauseMenu.cpp:161
|
||||
msgid ""
|
||||
"Default Controls:\n"
|
||||
"- WASD: Walk\n"
|
||||
"- Mouse left: dig/hit\n"
|
||||
"- Mouse right: place/use\n"
|
||||
"- Mouse wheel: select item\n"
|
||||
"- 0...9: select item\n"
|
||||
"- Shift: sneak\n"
|
||||
"- R: Toggle viewing all loaded chunks\n"
|
||||
"- I: Inventory menu\n"
|
||||
"- ESC: This menu\n"
|
||||
"- T: Chat\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiVolumeChange.cpp:108
|
||||
msgid "Sound Volume: "
|
||||
msgstr ""
|
||||
|
||||
#: src/guiVolumeChange.cpp:121
|
||||
msgid "Exit"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Left Button"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Middle Button"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Right Button"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "X Button 1"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Back"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Return"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Tab"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "X Button 2"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Capital"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Control"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Kana"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Menu"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Pause"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Shift"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Convert"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Escape"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Final"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Junja"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Kanji"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Nonconvert"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Accept"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "End"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Home"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Mode Change"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Next"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Prior"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Space"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Down"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Execute"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Print"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Select"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Up"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Help"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Insert"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Snapshot"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:232
|
||||
msgid "Left Windows"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Apps"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Numpad 0"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Numpad 1"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Right Windows"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Sleep"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 2"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 3"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 4"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 5"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 6"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 7"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad *"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad +"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad -"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad /"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad 8"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad 9"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:239
|
||||
msgid "Num Lock"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:239
|
||||
msgid "Scroll Lock"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:240
|
||||
msgid "Left Shift"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:240
|
||||
msgid "Right Shift"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Left Control"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Left Menu"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Right Control"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Right Menu"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Comma"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Minus"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Period"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Plus"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:247
|
||||
msgid "Attn"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:247
|
||||
msgid "CrSel"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "Erase OEF"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "ExSel"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "OEM Clear"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "PA1"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "Zoom"
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:1506
|
||||
msgid "Main Menu"
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:1830
|
||||
msgid "Failed to initialize world"
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:1842
|
||||
msgid "No world selected and no address provided. Nothing to do."
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:1850
|
||||
msgid "Could not find or load game \""
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:1864
|
||||
msgid "Invalid gamespec."
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:1904
|
||||
msgid "Connection error (timed out?)"
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:1915
|
||||
msgid ""
|
||||
"\n"
|
||||
"Check debug.txt for details."
|
||||
msgstr ""
|
||||
796
po/ru/minetest.po
Normal file
@@ -0,0 +1,796 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: minetest\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-03-30 19:56+0100\n"
|
||||
"PO-Revision-Date: 2013-03-28 15:29+0200\n"
|
||||
"Last-Translator: Anton Tsyganenko <anton-tsyganenko@yandex.ru>\n"
|
||||
"Language-Team: Russian\n"
|
||||
"Language: ru\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
||||
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
"X-Generator: Weblate 1.4-dev\n"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:125
|
||||
msgid ""
|
||||
"Warning: Some mods are not configured yet.\n"
|
||||
"They will be enabled by default when you save the configuration. "
|
||||
msgstr ""
|
||||
"Предупреждение: Некоторые моды еще не настроены.\n"
|
||||
"Они будут включены, когда вы сохраните конфигурацию. "
|
||||
|
||||
#: src/guiConfigureWorld.cpp:144
|
||||
msgid ""
|
||||
"Warning: Some configured mods are missing.\n"
|
||||
"Their setting will be removed when you save the configuration. "
|
||||
msgstr ""
|
||||
"Предупреждение: Некоторые моды не найдены.\n"
|
||||
"Их настройки будут удалены, когда вы сохраните конфигурацию. "
|
||||
|
||||
#: src/guiConfigureWorld.cpp:208
|
||||
msgid "enabled"
|
||||
msgstr "включено"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:215
|
||||
msgid "Enable All"
|
||||
msgstr "Включить всё"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:222
|
||||
msgid "Disable All"
|
||||
msgstr "Отключить всё"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:228
|
||||
msgid "depends on:"
|
||||
msgstr "зависит от:"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:240
|
||||
msgid "is required by:"
|
||||
msgstr "требуется для:"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:262 src/guiCreateWorld.cpp:165
|
||||
#: src/guiKeyChangeMenu.cpp:179 src/keycode.cpp:223
|
||||
msgid "Cancel"
|
||||
msgstr "Отменить"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:268 src/guiKeyChangeMenu.cpp:173
|
||||
msgid "Save"
|
||||
msgstr "Сохранить"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:394
|
||||
msgid "Configuration saved. "
|
||||
msgstr "Настройки сохранены. "
|
||||
|
||||
#: src/guiConfigureWorld.cpp:402
|
||||
msgid "Warning: Configuration not consistent. "
|
||||
msgstr "Предупреждение: Неверная конфигурация. "
|
||||
|
||||
#: src/guiConfirmMenu.cpp:120
|
||||
msgid "Yes"
|
||||
msgstr "Да"
|
||||
|
||||
#: src/guiConfirmMenu.cpp:126
|
||||
msgid "No"
|
||||
msgstr "Нет"
|
||||
|
||||
#: src/guiCreateWorld.cpp:116
|
||||
msgid "World name"
|
||||
msgstr "Название мира"
|
||||
|
||||
#: src/guiCreateWorld.cpp:135
|
||||
msgid "Game"
|
||||
msgstr "Игра"
|
||||
|
||||
#: src/guiCreateWorld.cpp:159
|
||||
msgid "Create"
|
||||
msgstr "Создать"
|
||||
|
||||
#: src/guiDeathScreen.cpp:96
|
||||
msgid "You died."
|
||||
msgstr "Вы умерли."
|
||||
|
||||
#: src/guiDeathScreen.cpp:104
|
||||
msgid "Respawn"
|
||||
msgstr "Воскреснуть"
|
||||
|
||||
#: src/guiFormSpecMenu.cpp:582
|
||||
msgid "Left click: Move all items, Right click: Move single item"
|
||||
msgstr "ЛКМ: Переместить все предметы, ПКМ: Переместить один предмет"
|
||||
|
||||
#: src/guiFormSpecMenu.cpp:607 src/guiMessageMenu.cpp:109
|
||||
#: src/guiTextInputMenu.cpp:131
|
||||
msgid "Proceed"
|
||||
msgstr "Продолжить"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:114
|
||||
msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)"
|
||||
msgstr ""
|
||||
"Сочетания клавиш. (Если это меню сломалось, удалите настройки из minetest."
|
||||
"conf)"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:151
|
||||
msgid "\"Use\" = climb down"
|
||||
msgstr "\"Использовать\" = спускаться"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:164
|
||||
msgid "Double tap \"jump\" to toggle fly"
|
||||
msgstr "Дважды нажмите «прыгнуть», чтобы включить полет"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:269
|
||||
msgid "Key already in use"
|
||||
msgstr "Клавиша уже используется"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:347
|
||||
msgid "press key"
|
||||
msgstr "нажмите клавишу"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:372
|
||||
msgid "Forward"
|
||||
msgstr "Вперед"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:373
|
||||
msgid "Backward"
|
||||
msgstr "Назад"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:374 src/keycode.cpp:228
|
||||
msgid "Left"
|
||||
msgstr "Влево"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:375 src/keycode.cpp:228
|
||||
msgid "Right"
|
||||
msgstr "Вправо"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:376
|
||||
msgid "Use"
|
||||
msgstr "Использовать"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:377
|
||||
msgid "Jump"
|
||||
msgstr "Прыжок"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:378
|
||||
msgid "Sneak"
|
||||
msgstr "Красться"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:379
|
||||
msgid "Drop"
|
||||
msgstr "Выбросить"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:380
|
||||
msgid "Inventory"
|
||||
msgstr "Инвентарь"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:381
|
||||
msgid "Chat"
|
||||
msgstr "Чат"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:382
|
||||
msgid "Command"
|
||||
msgstr "Команда"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:383
|
||||
msgid "Console"
|
||||
msgstr "Консоль"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:384
|
||||
msgid "Toggle fly"
|
||||
msgstr "Полёт"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:385
|
||||
msgid "Toggle fast"
|
||||
msgstr "Ускорение"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:386
|
||||
msgid "Toggle noclip"
|
||||
msgstr "Проходить сквозь стены"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:387
|
||||
msgid "Range select"
|
||||
msgstr "Выбор зоны видимости"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:388
|
||||
#, fuzzy
|
||||
msgid "Print stacks"
|
||||
msgstr "напечатать стеки"
|
||||
|
||||
#: src/guiMainMenu.cpp:92
|
||||
msgid "Cannot create world: Name contains invalid characters"
|
||||
msgstr "Невозможно создать мир: Имя содержит недопустимые символы"
|
||||
|
||||
#: src/guiMainMenu.cpp:101
|
||||
msgid "Cannot create world: A world by this name already exists"
|
||||
msgstr "Невозможно создать мир: Мир под таким названием уже существует"
|
||||
|
||||
#: src/guiMainMenu.cpp:283
|
||||
msgid "Singleplayer"
|
||||
msgstr "Одиночная игра"
|
||||
|
||||
#: src/guiMainMenu.cpp:284
|
||||
msgid "Multiplayer"
|
||||
msgstr "Многопользовательская игра"
|
||||
|
||||
#: src/guiMainMenu.cpp:285
|
||||
msgid "Advanced"
|
||||
msgstr "Дополнительно"
|
||||
|
||||
#: src/guiMainMenu.cpp:286
|
||||
msgid "Settings"
|
||||
msgstr "Настройки"
|
||||
|
||||
#: src/guiMainMenu.cpp:287
|
||||
msgid "Credits"
|
||||
msgstr "Благодарности"
|
||||
|
||||
#: src/guiMainMenu.cpp:317
|
||||
msgid "Select World:"
|
||||
msgstr "Выберите мир:"
|
||||
|
||||
#: src/guiMainMenu.cpp:339 src/guiMainMenu.cpp:511 src/keycode.cpp:229
|
||||
msgid "Delete"
|
||||
msgstr "Удалить"
|
||||
|
||||
#: src/guiMainMenu.cpp:346
|
||||
msgid "New"
|
||||
msgstr "Новый"
|
||||
|
||||
#: src/guiMainMenu.cpp:354
|
||||
msgid "Configure"
|
||||
msgstr "Настроить"
|
||||
|
||||
#: src/guiMainMenu.cpp:369 src/keycode.cpp:248
|
||||
msgid "Play"
|
||||
msgstr "Играть"
|
||||
|
||||
#: src/guiMainMenu.cpp:380 src/guiMainMenu.cpp:619
|
||||
msgid "Creative Mode"
|
||||
msgstr "Режим создания"
|
||||
|
||||
#: src/guiMainMenu.cpp:386 src/guiMainMenu.cpp:625
|
||||
msgid "Enable Damage"
|
||||
msgstr "Включить повреждения"
|
||||
|
||||
#: src/guiMainMenu.cpp:406 src/guiMainMenu.cpp:541
|
||||
msgid "Name/Password"
|
||||
msgstr "Имя/Пароль"
|
||||
|
||||
#: src/guiMainMenu.cpp:442 src/guiMainMenu.cpp:459 src/guiMainMenu.cpp:1184
|
||||
#, fuzzy
|
||||
msgid "Favorites:"
|
||||
msgstr "Сохраненные"
|
||||
|
||||
#: src/guiMainMenu.cpp:450 src/guiMainMenu.cpp:1194
|
||||
msgid "Public Server List:"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:470 src/guiMainMenu.cpp:568
|
||||
msgid "Address/Port"
|
||||
msgstr "Адрес/Порт"
|
||||
|
||||
#: src/guiMainMenu.cpp:497 src/guiMainMenu.cpp:1183
|
||||
msgid "Show Public"
|
||||
msgstr "Публичные"
|
||||
|
||||
#: src/guiMainMenu.cpp:501 src/guiMainMenu.cpp:1193
|
||||
msgid "Show Favorites"
|
||||
msgstr "Сохраненные"
|
||||
|
||||
#: src/guiMainMenu.cpp:521
|
||||
msgid "Connect"
|
||||
msgstr "Подключиться"
|
||||
|
||||
#: src/guiMainMenu.cpp:591
|
||||
msgid "Leave address blank to start a local server."
|
||||
msgstr "Оставьте адрес пустым для запуска локального сервера."
|
||||
|
||||
#: src/guiMainMenu.cpp:600
|
||||
msgid "Start Game / Connect"
|
||||
msgstr "Начать игру"
|
||||
|
||||
#: src/guiMainMenu.cpp:632
|
||||
#, fuzzy
|
||||
msgid "Public"
|
||||
msgstr "Публичные"
|
||||
|
||||
#: src/guiMainMenu.cpp:640 src/guiMainMenu.cpp:1113
|
||||
msgid "Delete world"
|
||||
msgstr "Удалить мир"
|
||||
|
||||
#: src/guiMainMenu.cpp:647
|
||||
msgid "Create world"
|
||||
msgstr "Создать мир"
|
||||
|
||||
#: src/guiMainMenu.cpp:681
|
||||
msgid "Fancy trees"
|
||||
msgstr "Красивые деревья"
|
||||
|
||||
#: src/guiMainMenu.cpp:687
|
||||
msgid "Smooth Lighting"
|
||||
msgstr "Мягкое освещение"
|
||||
|
||||
#: src/guiMainMenu.cpp:693
|
||||
msgid "3D Clouds"
|
||||
msgstr "3D облака"
|
||||
|
||||
#: src/guiMainMenu.cpp:699
|
||||
msgid "Opaque water"
|
||||
msgstr "Непрозрачная вода"
|
||||
|
||||
#: src/guiMainMenu.cpp:709
|
||||
msgid "Mip-Mapping"
|
||||
msgstr "Mip-текстурирование"
|
||||
|
||||
#: src/guiMainMenu.cpp:716
|
||||
msgid "Anisotropic Filtering"
|
||||
msgstr "Анизотропный фильтр"
|
||||
|
||||
#: src/guiMainMenu.cpp:723
|
||||
msgid "Bi-Linear Filtering"
|
||||
msgstr "Билинейный фильтр"
|
||||
|
||||
#: src/guiMainMenu.cpp:730
|
||||
msgid "Tri-Linear Filtering"
|
||||
msgstr "Трилинейный фильтр"
|
||||
|
||||
#: src/guiMainMenu.cpp:738
|
||||
msgid "Shaders"
|
||||
msgstr "Шейдеры"
|
||||
|
||||
#: src/guiMainMenu.cpp:745
|
||||
#, fuzzy
|
||||
msgid "Preload item visuals"
|
||||
msgstr "Кэшировать предметы"
|
||||
|
||||
#: src/guiMainMenu.cpp:752
|
||||
msgid "Enable Particles"
|
||||
msgstr "Включить частицы"
|
||||
|
||||
#: src/guiMainMenu.cpp:759
|
||||
msgid "Finite liquid"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:769
|
||||
msgid "Change keys"
|
||||
msgstr "Сменить управление"
|
||||
|
||||
#: src/guiMainMenu.cpp:1084
|
||||
msgid "Address required."
|
||||
msgstr "Нужно ввести адрес."
|
||||
|
||||
#: src/guiMainMenu.cpp:1102
|
||||
msgid "Cannot delete world: Nothing selected"
|
||||
msgstr "Не могу удалить мир: Ничего не выбрано"
|
||||
|
||||
#: src/guiMainMenu.cpp:1117
|
||||
msgid "Files to be deleted"
|
||||
msgstr "Следующие файлы будут удалены"
|
||||
|
||||
#: src/guiMainMenu.cpp:1133
|
||||
msgid "Cannot create world: No games found"
|
||||
msgstr "Не могу создать мир: Ни одной игры не найдено"
|
||||
|
||||
#: src/guiMainMenu.cpp:1149
|
||||
msgid "Cannot configure world: Nothing selected"
|
||||
msgstr "Не могу настроить мир: ничего не выбрано"
|
||||
|
||||
#: src/guiMainMenu.cpp:1256
|
||||
msgid "Failed to delete all world files"
|
||||
msgstr "Ошибка при удалении файлов мира"
|
||||
|
||||
#: src/guiPasswordChange.cpp:108
|
||||
msgid "Old Password"
|
||||
msgstr "Старый пароль"
|
||||
|
||||
#: src/guiPasswordChange.cpp:125
|
||||
msgid "New Password"
|
||||
msgstr "Новый пароль"
|
||||
|
||||
#: src/guiPasswordChange.cpp:141
|
||||
msgid "Confirm Password"
|
||||
msgstr "Подтверждение пароля"
|
||||
|
||||
#: src/guiPasswordChange.cpp:158
|
||||
msgid "Change"
|
||||
msgstr "Изменить"
|
||||
|
||||
#: src/guiPasswordChange.cpp:167
|
||||
msgid "Passwords do not match!"
|
||||
msgstr "Пароли не совпадают!"
|
||||
|
||||
#: src/guiPauseMenu.cpp:123
|
||||
msgid "Continue"
|
||||
msgstr "Продолжить"
|
||||
|
||||
#: src/guiPauseMenu.cpp:132
|
||||
msgid "Change Password"
|
||||
msgstr "Изменить пароль"
|
||||
|
||||
#: src/guiPauseMenu.cpp:140
|
||||
msgid "Sound Volume"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPauseMenu.cpp:147
|
||||
msgid "Exit to Menu"
|
||||
msgstr "Выход в меню"
|
||||
|
||||
#: src/guiPauseMenu.cpp:154
|
||||
msgid "Exit to OS"
|
||||
msgstr "Выход в ОС"
|
||||
|
||||
#: src/guiPauseMenu.cpp:161
|
||||
msgid ""
|
||||
"Default Controls:\n"
|
||||
"- WASD: Walk\n"
|
||||
"- Mouse left: dig/hit\n"
|
||||
"- Mouse right: place/use\n"
|
||||
"- Mouse wheel: select item\n"
|
||||
"- 0...9: select item\n"
|
||||
"- Shift: sneak\n"
|
||||
"- R: Toggle viewing all loaded chunks\n"
|
||||
"- I: Inventory menu\n"
|
||||
"- ESC: This menu\n"
|
||||
"- T: Chat\n"
|
||||
msgstr ""
|
||||
"Управление по умолчанию:\n"
|
||||
"- WASD: перемещение\n"
|
||||
"- ЛКМ: копать/ударить\n"
|
||||
"- ПКМ: поставить/использовать\n"
|
||||
"- Колесо мыши: выбор предмета\n"
|
||||
"- 0...9: выбор предмета\n"
|
||||
"- Shift: красться\n"
|
||||
"- R: переключить видимость всех загруженных чанков\n"
|
||||
"- I: инвентарь\n"
|
||||
"- ESC: это меню\n"
|
||||
"- T: чат\n"
|
||||
|
||||
#: src/guiVolumeChange.cpp:108
|
||||
msgid "Sound Volume: "
|
||||
msgstr ""
|
||||
|
||||
#: src/guiVolumeChange.cpp:121
|
||||
msgid "Exit"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Left Button"
|
||||
msgstr "Левая клавиша"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Middle Button"
|
||||
msgstr "Средняя клавиша"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Right Button"
|
||||
msgstr "Правая клавиша"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "X Button 1"
|
||||
msgstr "Доп. кнопка 1"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Back"
|
||||
msgstr "назад"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Clear"
|
||||
msgstr "Очистить"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Return"
|
||||
msgstr "Вернуться"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
#, fuzzy
|
||||
msgid "Tab"
|
||||
msgstr "Tab"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "X Button 2"
|
||||
msgstr "Доп. кнопка 2"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Capital"
|
||||
msgstr "Caps Lock"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Control"
|
||||
msgstr "Ctrl"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Kana"
|
||||
msgstr "Кана"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Menu"
|
||||
msgstr "меню"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Pause"
|
||||
msgstr "Пауза"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Shift"
|
||||
msgstr "Shift"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
#, fuzzy
|
||||
msgid "Convert"
|
||||
msgstr "Преобразовать"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Escape"
|
||||
msgstr "Escape"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
#, fuzzy
|
||||
msgid "Final"
|
||||
msgstr "Final"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
#, fuzzy
|
||||
msgid "Junja"
|
||||
msgstr "Junja"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Kanji"
|
||||
msgstr "Кандзи"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Nonconvert"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Accept"
|
||||
msgstr "Принять"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "End"
|
||||
msgstr "End"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Home"
|
||||
msgstr "Home"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
#, fuzzy
|
||||
msgid "Mode Change"
|
||||
msgstr "Смена режима"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
#, fuzzy
|
||||
msgid "Next"
|
||||
msgstr "След."
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
#, fuzzy
|
||||
msgid "Prior"
|
||||
msgstr "Пред."
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Space"
|
||||
msgstr "Пробел"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Down"
|
||||
msgstr "Вниз"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Execute"
|
||||
msgstr "Выполнить"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
#, fuzzy
|
||||
msgid "Print"
|
||||
msgstr "Печать"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
#, fuzzy
|
||||
msgid "Select"
|
||||
msgstr "Выбор"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Up"
|
||||
msgstr "Вверх"
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Help"
|
||||
msgstr "Справка"
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Insert"
|
||||
msgstr "Insert"
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Snapshot"
|
||||
msgstr "снимок"
|
||||
|
||||
#: src/keycode.cpp:232
|
||||
msgid "Left Windows"
|
||||
msgstr "Левая кл. Win"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
#, fuzzy
|
||||
msgid "Apps"
|
||||
msgstr "Приложения"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Numpad 0"
|
||||
msgstr "Доп. клав. 0"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Numpad 1"
|
||||
msgstr "Доп. клав. 1"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Right Windows"
|
||||
msgstr "Прав. кл. Win"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
#, fuzzy
|
||||
msgid "Sleep"
|
||||
msgstr "Сон"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 2"
|
||||
msgstr "Доп. клав. 2"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 3"
|
||||
msgstr "Доп. клав. 3"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 4"
|
||||
msgstr "Доп. клав. 4"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 5"
|
||||
msgstr "Доп. клав. 5"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 6"
|
||||
msgstr "Доп. клав. 6"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 7"
|
||||
msgstr "Доп. клав. 7"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad *"
|
||||
msgstr "Доп. клав. *"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad +"
|
||||
msgstr "Доп. клав. +"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad -"
|
||||
msgstr "Доп. клав. -"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad /"
|
||||
msgstr "Доп. клав. /"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad 8"
|
||||
msgstr "Доп. клав. 8"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad 9"
|
||||
msgstr "Доп. клав. 9"
|
||||
|
||||
#: src/keycode.cpp:239
|
||||
msgid "Num Lock"
|
||||
msgstr "Num Lock"
|
||||
|
||||
#: src/keycode.cpp:239
|
||||
msgid "Scroll Lock"
|
||||
msgstr "Scroll Lock"
|
||||
|
||||
#: src/keycode.cpp:240
|
||||
msgid "Left Shift"
|
||||
msgstr "Левый Shift"
|
||||
|
||||
#: src/keycode.cpp:240
|
||||
msgid "Right Shift"
|
||||
msgstr "Правый Shift"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Left Control"
|
||||
msgstr "Левый Ctrl"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Left Menu"
|
||||
msgstr "Левая клавиша меню"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Right Control"
|
||||
msgstr "Правый Ctrl"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Right Menu"
|
||||
msgstr "Правая клавиша меню"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Comma"
|
||||
msgstr "Запятая"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Minus"
|
||||
msgstr "Минус"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
#, fuzzy
|
||||
msgid "Period"
|
||||
msgstr "период"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Plus"
|
||||
msgstr "Плюс"
|
||||
|
||||
#: src/keycode.cpp:247
|
||||
#, fuzzy
|
||||
msgid "Attn"
|
||||
msgstr "внимание"
|
||||
|
||||
#: src/keycode.cpp:247
|
||||
msgid "CrSel"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "Erase OEF"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "ExSel"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "OEM Clear"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "PA1"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
#, fuzzy
|
||||
msgid "Zoom"
|
||||
msgstr "Масштаб"
|
||||
|
||||
#: src/main.cpp:1506
|
||||
msgid "Main Menu"
|
||||
msgstr "Главное меню"
|
||||
|
||||
#: src/main.cpp:1830
|
||||
msgid "Failed to initialize world"
|
||||
msgstr "Ошибка при инициализации мира"
|
||||
|
||||
#: src/main.cpp:1842
|
||||
msgid "No world selected and no address provided. Nothing to do."
|
||||
msgstr "Не выбран мир и не введен адрес."
|
||||
|
||||
#: src/main.cpp:1850
|
||||
msgid "Could not find or load game \""
|
||||
msgstr "Невозможно найти или загрузить игру \""
|
||||
|
||||
#: src/main.cpp:1864
|
||||
msgid "Invalid gamespec."
|
||||
msgstr ""
|
||||
|
||||
#: src/main.cpp:1904
|
||||
msgid "Connection error (timed out?)"
|
||||
msgstr "Ошибка соединения (таймаут пинга?)"
|
||||
|
||||
#: src/main.cpp:1915
|
||||
msgid ""
|
||||
"\n"
|
||||
"Check debug.txt for details."
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Подробная информация в debug.txt."
|
||||
778
po/zh_CN/minetest.po
Normal file
@@ -0,0 +1,778 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: minetest\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2013-03-30 19:56+0100\n"
|
||||
"PO-Revision-Date: 2013-03-09 09:41+0200\n"
|
||||
"Last-Translator: Shen Zheyu <arsdragonfly@gmail.com>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: zh_CN\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Weblate 1.4-dev\n"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:125
|
||||
msgid ""
|
||||
"Warning: Some mods are not configured yet.\n"
|
||||
"They will be enabled by default when you save the configuration. "
|
||||
msgstr ""
|
||||
"警告:一些MOD仍未设定。\n"
|
||||
"它们会在你保存配置的时候自动启用。 "
|
||||
|
||||
#: src/guiConfigureWorld.cpp:144
|
||||
msgid ""
|
||||
"Warning: Some configured mods are missing.\n"
|
||||
"Their setting will be removed when you save the configuration. "
|
||||
msgstr ""
|
||||
"警告:缺少一些设定了的MOD。\n"
|
||||
"它们的设置会在你保存配置的时候被移除。 "
|
||||
|
||||
#: src/guiConfigureWorld.cpp:208
|
||||
msgid "enabled"
|
||||
msgstr "启用"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:215
|
||||
msgid "Enable All"
|
||||
msgstr "全部启用"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:222
|
||||
msgid "Disable All"
|
||||
msgstr "全部禁用"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:228
|
||||
msgid "depends on:"
|
||||
msgstr "依赖于:"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:240
|
||||
msgid "is required by:"
|
||||
msgstr "需要:"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:262 src/guiCreateWorld.cpp:165
|
||||
#: src/guiKeyChangeMenu.cpp:179 src/keycode.cpp:223
|
||||
msgid "Cancel"
|
||||
msgstr "取消"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:268 src/guiKeyChangeMenu.cpp:173
|
||||
msgid "Save"
|
||||
msgstr "保存"
|
||||
|
||||
#: src/guiConfigureWorld.cpp:394
|
||||
msgid "Configuration saved. "
|
||||
msgstr "配置已保存。 "
|
||||
|
||||
#: src/guiConfigureWorld.cpp:402
|
||||
msgid "Warning: Configuration not consistent. "
|
||||
msgstr "警告:配置不一致。 "
|
||||
|
||||
#: src/guiConfirmMenu.cpp:120
|
||||
msgid "Yes"
|
||||
msgstr "是"
|
||||
|
||||
#: src/guiConfirmMenu.cpp:126
|
||||
msgid "No"
|
||||
msgstr "否"
|
||||
|
||||
#: src/guiCreateWorld.cpp:116
|
||||
msgid "World name"
|
||||
msgstr "世界名称"
|
||||
|
||||
#: src/guiCreateWorld.cpp:135
|
||||
msgid "Game"
|
||||
msgstr "游戏"
|
||||
|
||||
#: src/guiCreateWorld.cpp:159
|
||||
msgid "Create"
|
||||
msgstr "创建"
|
||||
|
||||
#: src/guiDeathScreen.cpp:96
|
||||
msgid "You died."
|
||||
msgstr "你死了。"
|
||||
|
||||
#: src/guiDeathScreen.cpp:104
|
||||
msgid "Respawn"
|
||||
msgstr "重生"
|
||||
|
||||
#: src/guiFormSpecMenu.cpp:582
|
||||
msgid "Left click: Move all items, Right click: Move single item"
|
||||
msgstr "左键:移动所有物品,右键:移动单个物品"
|
||||
|
||||
#: src/guiFormSpecMenu.cpp:607 src/guiMessageMenu.cpp:109
|
||||
#: src/guiTextInputMenu.cpp:131
|
||||
msgid "Proceed"
|
||||
msgstr "继续游戏"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:114
|
||||
msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)"
|
||||
msgstr "键位配置。(如果这个菜单被弄乱,从minetest.conf中删掉点东西)"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:151
|
||||
msgid "\"Use\" = climb down"
|
||||
msgstr "“使用” = 向下爬"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:164
|
||||
msgid "Double tap \"jump\" to toggle fly"
|
||||
msgstr "连按两次“跳”切换飞行状态"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:269
|
||||
msgid "Key already in use"
|
||||
msgstr "按键已被占用"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:347
|
||||
msgid "press key"
|
||||
msgstr "按键"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:372
|
||||
msgid "Forward"
|
||||
msgstr "向前"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:373
|
||||
msgid "Backward"
|
||||
msgstr "向后"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:374 src/keycode.cpp:228
|
||||
msgid "Left"
|
||||
msgstr "向左"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:375 src/keycode.cpp:228
|
||||
msgid "Right"
|
||||
msgstr "向右"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:376
|
||||
msgid "Use"
|
||||
msgstr "使用"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:377
|
||||
msgid "Jump"
|
||||
msgstr "跳"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:378
|
||||
msgid "Sneak"
|
||||
msgstr "潜行"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:379
|
||||
msgid "Drop"
|
||||
msgstr "丢出"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:380
|
||||
msgid "Inventory"
|
||||
msgstr "物品栏"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:381
|
||||
msgid "Chat"
|
||||
msgstr "聊天"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:382
|
||||
msgid "Command"
|
||||
msgstr "命令"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:383
|
||||
msgid "Console"
|
||||
msgstr "控制台"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:384
|
||||
msgid "Toggle fly"
|
||||
msgstr "切换飞行状态"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:385
|
||||
msgid "Toggle fast"
|
||||
msgstr "切换快速移动状态"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:386
|
||||
msgid "Toggle noclip"
|
||||
msgstr "切换穿墙模式"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:387
|
||||
msgid "Range select"
|
||||
msgstr "选择范围"
|
||||
|
||||
#: src/guiKeyChangeMenu.cpp:388
|
||||
msgid "Print stacks"
|
||||
msgstr "打印栈"
|
||||
|
||||
#: src/guiMainMenu.cpp:92
|
||||
msgid "Cannot create world: Name contains invalid characters"
|
||||
msgstr "无法创建世界:名字包含非法字符"
|
||||
|
||||
#: src/guiMainMenu.cpp:101
|
||||
msgid "Cannot create world: A world by this name already exists"
|
||||
msgstr "无法创建世界:同名世界已经存在"
|
||||
|
||||
#: src/guiMainMenu.cpp:283
|
||||
msgid "Singleplayer"
|
||||
msgstr "单人游戏"
|
||||
|
||||
#: src/guiMainMenu.cpp:284
|
||||
msgid "Multiplayer"
|
||||
msgstr "多人游戏"
|
||||
|
||||
#: src/guiMainMenu.cpp:285
|
||||
msgid "Advanced"
|
||||
msgstr "高级联机设置"
|
||||
|
||||
#: src/guiMainMenu.cpp:286
|
||||
msgid "Settings"
|
||||
msgstr "设置"
|
||||
|
||||
#: src/guiMainMenu.cpp:287
|
||||
msgid "Credits"
|
||||
msgstr "关于"
|
||||
|
||||
#: src/guiMainMenu.cpp:317
|
||||
msgid "Select World:"
|
||||
msgstr "选择世界:"
|
||||
|
||||
#: src/guiMainMenu.cpp:339 src/guiMainMenu.cpp:511 src/keycode.cpp:229
|
||||
msgid "Delete"
|
||||
msgstr "删除"
|
||||
|
||||
#: src/guiMainMenu.cpp:346
|
||||
msgid "New"
|
||||
msgstr "新建"
|
||||
|
||||
#: src/guiMainMenu.cpp:354
|
||||
msgid "Configure"
|
||||
msgstr "配置"
|
||||
|
||||
#: src/guiMainMenu.cpp:369 src/keycode.cpp:248
|
||||
msgid "Play"
|
||||
msgstr "开始游戏"
|
||||
|
||||
#: src/guiMainMenu.cpp:380 src/guiMainMenu.cpp:619
|
||||
msgid "Creative Mode"
|
||||
msgstr "创造模式"
|
||||
|
||||
#: src/guiMainMenu.cpp:386 src/guiMainMenu.cpp:625
|
||||
msgid "Enable Damage"
|
||||
msgstr "开启伤害"
|
||||
|
||||
#: src/guiMainMenu.cpp:406 src/guiMainMenu.cpp:541
|
||||
msgid "Name/Password"
|
||||
msgstr "名字/密码"
|
||||
|
||||
#: src/guiMainMenu.cpp:442 src/guiMainMenu.cpp:459 src/guiMainMenu.cpp:1184
|
||||
#, fuzzy
|
||||
msgid "Favorites:"
|
||||
msgstr "显示最爱"
|
||||
|
||||
#: src/guiMainMenu.cpp:450 src/guiMainMenu.cpp:1194
|
||||
msgid "Public Server List:"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:470 src/guiMainMenu.cpp:568
|
||||
msgid "Address/Port"
|
||||
msgstr "地址/端口"
|
||||
|
||||
#: src/guiMainMenu.cpp:497 src/guiMainMenu.cpp:1183
|
||||
msgid "Show Public"
|
||||
msgstr "显示公共"
|
||||
|
||||
#: src/guiMainMenu.cpp:501 src/guiMainMenu.cpp:1193
|
||||
msgid "Show Favorites"
|
||||
msgstr "显示最爱"
|
||||
|
||||
#: src/guiMainMenu.cpp:521
|
||||
msgid "Connect"
|
||||
msgstr "连接"
|
||||
|
||||
#: src/guiMainMenu.cpp:591
|
||||
msgid "Leave address blank to start a local server."
|
||||
msgstr "地址栏留空可启动本地服务器。"
|
||||
|
||||
#: src/guiMainMenu.cpp:600
|
||||
msgid "Start Game / Connect"
|
||||
msgstr "启动游戏/连接"
|
||||
|
||||
#: src/guiMainMenu.cpp:632
|
||||
#, fuzzy
|
||||
msgid "Public"
|
||||
msgstr "显示公共"
|
||||
|
||||
#: src/guiMainMenu.cpp:640 src/guiMainMenu.cpp:1113
|
||||
msgid "Delete world"
|
||||
msgstr "删除世界"
|
||||
|
||||
#: src/guiMainMenu.cpp:647
|
||||
msgid "Create world"
|
||||
msgstr "创造世界"
|
||||
|
||||
#: src/guiMainMenu.cpp:681
|
||||
msgid "Fancy trees"
|
||||
msgstr "更漂亮的树"
|
||||
|
||||
#: src/guiMainMenu.cpp:687
|
||||
msgid "Smooth Lighting"
|
||||
msgstr "平滑光照"
|
||||
|
||||
#: src/guiMainMenu.cpp:693
|
||||
msgid "3D Clouds"
|
||||
msgstr "3D云彩"
|
||||
|
||||
#: src/guiMainMenu.cpp:699
|
||||
msgid "Opaque water"
|
||||
msgstr "不反光的水"
|
||||
|
||||
#: src/guiMainMenu.cpp:709
|
||||
msgid "Mip-Mapping"
|
||||
msgstr "贴图处理"
|
||||
|
||||
#: src/guiMainMenu.cpp:716
|
||||
msgid "Anisotropic Filtering"
|
||||
msgstr "各向异性过滤"
|
||||
|
||||
#: src/guiMainMenu.cpp:723
|
||||
msgid "Bi-Linear Filtering"
|
||||
msgstr "双线性过滤"
|
||||
|
||||
#: src/guiMainMenu.cpp:730
|
||||
msgid "Tri-Linear Filtering"
|
||||
msgstr "三线性过滤"
|
||||
|
||||
#: src/guiMainMenu.cpp:738
|
||||
msgid "Shaders"
|
||||
msgstr "着色器"
|
||||
|
||||
#: src/guiMainMenu.cpp:745
|
||||
msgid "Preload item visuals"
|
||||
msgstr "预先加载物品图像"
|
||||
|
||||
#: src/guiMainMenu.cpp:752
|
||||
msgid "Enable Particles"
|
||||
msgstr "启用粒子效果"
|
||||
|
||||
#: src/guiMainMenu.cpp:759
|
||||
msgid "Finite liquid"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiMainMenu.cpp:769
|
||||
msgid "Change keys"
|
||||
msgstr "改变键位设置"
|
||||
|
||||
#: src/guiMainMenu.cpp:1084
|
||||
msgid "Address required."
|
||||
msgstr "需要地址。"
|
||||
|
||||
#: src/guiMainMenu.cpp:1102
|
||||
msgid "Cannot delete world: Nothing selected"
|
||||
msgstr "无法删除世界:没有选择世界"
|
||||
|
||||
#: src/guiMainMenu.cpp:1117
|
||||
msgid "Files to be deleted"
|
||||
msgstr "将被删除的文件"
|
||||
|
||||
#: src/guiMainMenu.cpp:1133
|
||||
msgid "Cannot create world: No games found"
|
||||
msgstr "无法创造世界:未找到游戏模式"
|
||||
|
||||
#: src/guiMainMenu.cpp:1149
|
||||
msgid "Cannot configure world: Nothing selected"
|
||||
msgstr "无法配置世界:没有选择世界"
|
||||
|
||||
#: src/guiMainMenu.cpp:1256
|
||||
msgid "Failed to delete all world files"
|
||||
msgstr "无法删除所有该世界的文件"
|
||||
|
||||
#: src/guiPasswordChange.cpp:108
|
||||
msgid "Old Password"
|
||||
msgstr "旧密码"
|
||||
|
||||
#: src/guiPasswordChange.cpp:125
|
||||
msgid "New Password"
|
||||
msgstr "新密码"
|
||||
|
||||
#: src/guiPasswordChange.cpp:141
|
||||
msgid "Confirm Password"
|
||||
msgstr "确认密码"
|
||||
|
||||
#: src/guiPasswordChange.cpp:158
|
||||
msgid "Change"
|
||||
msgstr "更改"
|
||||
|
||||
#: src/guiPasswordChange.cpp:167
|
||||
msgid "Passwords do not match!"
|
||||
msgstr "密码不匹配!"
|
||||
|
||||
#: src/guiPauseMenu.cpp:123
|
||||
msgid "Continue"
|
||||
msgstr "继续"
|
||||
|
||||
#: src/guiPauseMenu.cpp:132
|
||||
msgid "Change Password"
|
||||
msgstr "更改密码"
|
||||
|
||||
#: src/guiPauseMenu.cpp:140
|
||||
msgid "Sound Volume"
|
||||
msgstr ""
|
||||
|
||||
#: src/guiPauseMenu.cpp:147
|
||||
msgid "Exit to Menu"
|
||||
msgstr "退出至菜单"
|
||||
|
||||
#: src/guiPauseMenu.cpp:154
|
||||
msgid "Exit to OS"
|
||||
msgstr "退出至操作系统"
|
||||
|
||||
#: src/guiPauseMenu.cpp:161
|
||||
msgid ""
|
||||
"Default Controls:\n"
|
||||
"- WASD: Walk\n"
|
||||
"- Mouse left: dig/hit\n"
|
||||
"- Mouse right: place/use\n"
|
||||
"- Mouse wheel: select item\n"
|
||||
"- 0...9: select item\n"
|
||||
"- Shift: sneak\n"
|
||||
"- R: Toggle viewing all loaded chunks\n"
|
||||
"- I: Inventory menu\n"
|
||||
"- ESC: This menu\n"
|
||||
"- T: Chat\n"
|
||||
msgstr ""
|
||||
"默认控制:\n"
|
||||
"W/A/S/D: 走\n"
|
||||
"空格: 跳\n"
|
||||
"鼠标左键: 挖方块/攻击\n"
|
||||
"鼠标右键: 放置/使用\n"
|
||||
"鼠标滚轮: 选择物品\n"
|
||||
"0-9: 选择物品\n"
|
||||
"Shift: 潜行\n"
|
||||
"R:切换查看所有已载入区块\n"
|
||||
"I:物品栏\n"
|
||||
"ESC:菜单\n"
|
||||
"T:聊天\n"
|
||||
|
||||
#: src/guiVolumeChange.cpp:108
|
||||
msgid "Sound Volume: "
|
||||
msgstr ""
|
||||
|
||||
#: src/guiVolumeChange.cpp:121
|
||||
msgid "Exit"
|
||||
msgstr ""
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Left Button"
|
||||
msgstr "左键"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Middle Button"
|
||||
msgstr "中键"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "Right Button"
|
||||
msgstr "右键"
|
||||
|
||||
#: src/keycode.cpp:223
|
||||
msgid "X Button 1"
|
||||
msgstr "X键1"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Back"
|
||||
msgstr "退格"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Clear"
|
||||
msgstr "Clear键"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Return"
|
||||
msgstr "回车"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "Tab"
|
||||
msgstr "Tab键"
|
||||
|
||||
#: src/keycode.cpp:224
|
||||
msgid "X Button 2"
|
||||
msgstr "X键2"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Capital"
|
||||
msgstr "大写"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Control"
|
||||
msgstr "Ctrl"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Kana"
|
||||
msgstr "假名"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Menu"
|
||||
msgstr "菜单"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Pause"
|
||||
msgstr "暂停"
|
||||
|
||||
#: src/keycode.cpp:225
|
||||
msgid "Shift"
|
||||
msgstr "Shift键"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Convert"
|
||||
msgstr "转换"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Escape"
|
||||
msgstr "Escape键"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Final"
|
||||
msgstr "Final键"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Junja"
|
||||
msgstr "Junja键"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Kanji"
|
||||
msgstr "Kanji键"
|
||||
|
||||
#: src/keycode.cpp:226
|
||||
msgid "Nonconvert"
|
||||
msgstr "无变换"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Accept"
|
||||
msgstr "接受"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "End"
|
||||
msgstr "End键"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Home"
|
||||
msgstr "Home键"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Mode Change"
|
||||
msgstr "改变模式"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Next"
|
||||
msgstr "下一个"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Prior"
|
||||
msgstr "Prior键"
|
||||
|
||||
#: src/keycode.cpp:227
|
||||
msgid "Space"
|
||||
msgstr "空格"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Down"
|
||||
msgstr "向下"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Execute"
|
||||
msgstr "执行"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Print"
|
||||
msgstr "打印"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Select"
|
||||
msgstr "选择"
|
||||
|
||||
#: src/keycode.cpp:228
|
||||
msgid "Up"
|
||||
msgstr "向上"
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Help"
|
||||
msgstr "帮助"
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Insert"
|
||||
msgstr "插入"
|
||||
|
||||
#: src/keycode.cpp:229
|
||||
msgid "Snapshot"
|
||||
msgstr "快照"
|
||||
|
||||
#: src/keycode.cpp:232
|
||||
msgid "Left Windows"
|
||||
msgstr "左窗口"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Apps"
|
||||
msgstr "应用"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Numpad 0"
|
||||
msgstr "小键盘0"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Numpad 1"
|
||||
msgstr "小键盘1"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Right Windows"
|
||||
msgstr "右窗口"
|
||||
|
||||
#: src/keycode.cpp:233
|
||||
msgid "Sleep"
|
||||
msgstr "睡眠"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 2"
|
||||
msgstr "小键盘2"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 3"
|
||||
msgstr "小键盘3"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 4"
|
||||
msgstr "小键盘4"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 5"
|
||||
msgstr "小键盘5"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 6"
|
||||
msgstr "小键盘6"
|
||||
|
||||
#: src/keycode.cpp:234
|
||||
msgid "Numpad 7"
|
||||
msgstr "小键盘7"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad *"
|
||||
msgstr "小键盘*"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad +"
|
||||
msgstr "小键盘+"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad -"
|
||||
msgstr "小键盘-"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad /"
|
||||
msgstr "小键盘/"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad 8"
|
||||
msgstr "小键盘8"
|
||||
|
||||
#: src/keycode.cpp:235
|
||||
msgid "Numpad 9"
|
||||
msgstr "小键盘9"
|
||||
|
||||
#: src/keycode.cpp:239
|
||||
msgid "Num Lock"
|
||||
msgstr "小键盘锁"
|
||||
|
||||
#: src/keycode.cpp:239
|
||||
msgid "Scroll Lock"
|
||||
msgstr "Scroll Lock键"
|
||||
|
||||
#: src/keycode.cpp:240
|
||||
msgid "Left Shift"
|
||||
msgstr "左Shift键"
|
||||
|
||||
#: src/keycode.cpp:240
|
||||
msgid "Right Shift"
|
||||
msgstr "右Shift键"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Left Control"
|
||||
msgstr "左Control键"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Left Menu"
|
||||
msgstr "左菜单"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Right Control"
|
||||
msgstr "右Control键"
|
||||
|
||||
#: src/keycode.cpp:241
|
||||
msgid "Right Menu"
|
||||
msgstr "右菜单"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Comma"
|
||||
msgstr "逗号"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Minus"
|
||||
msgstr "减号"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Period"
|
||||
msgstr "句号"
|
||||
|
||||
#: src/keycode.cpp:243
|
||||
msgid "Plus"
|
||||
msgstr "加号"
|
||||
|
||||
#: src/keycode.cpp:247
|
||||
msgid "Attn"
|
||||
msgstr "Attn键"
|
||||
|
||||
#: src/keycode.cpp:247
|
||||
msgid "CrSel"
|
||||
msgstr "CrSel键"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "Erase OEF"
|
||||
msgstr "Erase OEF键"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "ExSel"
|
||||
msgstr "ExSel键"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "OEM Clear"
|
||||
msgstr "OEM Clear键"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "PA1"
|
||||
msgstr "PA1键"
|
||||
|
||||
#: src/keycode.cpp:248
|
||||
msgid "Zoom"
|
||||
msgstr "缩放"
|
||||
|
||||
#: src/main.cpp:1506
|
||||
msgid "Main Menu"
|
||||
msgstr "主菜单"
|
||||
|
||||
#: src/main.cpp:1830
|
||||
msgid "Failed to initialize world"
|
||||
msgstr "无法初始化世界"
|
||||
|
||||
#: src/main.cpp:1842
|
||||
msgid "No world selected and no address provided. Nothing to do."
|
||||
msgstr "没有选择世界或提供地址。未执行操作。"
|
||||
|
||||
#: src/main.cpp:1850
|
||||
msgid "Could not find or load game \""
|
||||
msgstr "无法找到或载入游戏模式“"
|
||||
|
||||
#: src/main.cpp:1864
|
||||
msgid "Invalid gamespec."
|
||||
msgstr "非法游戏模式规格。"
|
||||
|
||||
#: src/main.cpp:1904
|
||||
msgid "Connection error (timed out?)"
|
||||
msgstr "连接出错(超时?)"
|
||||
|
||||
#: src/main.cpp:1915
|
||||
msgid ""
|
||||
"\n"
|
||||
"Check debug.txt for details."
|
||||
msgstr ""
|
||||
"\n"
|
||||
"查看 debug.txt 以获得详细信息。"
|
||||
@@ -1,14 +1,26 @@
|
||||
project(minetest)
|
||||
cmake_minimum_required( VERSION 2.6 )
|
||||
|
||||
if(RUN_IN_PLACE)
|
||||
add_definitions ( -DRUN_IN_PLACE )
|
||||
endif(RUN_IN_PLACE)
|
||||
|
||||
# Set some random things default to not being visible in the GUI
|
||||
mark_as_advanced(EXECUTABLE_OUTPUT_PATH LIBRARY_OUTPUT_PATH)
|
||||
mark_as_advanced(JTHREAD_INCLUDE_DIR JTHREAD_LIBRARY)
|
||||
mark_as_advanced(SQLITE3_INCLUDE_DIR SQLITE3_LIBRARY)
|
||||
mark_as_advanced(JSON_INCLUDE_DIR JSON_LIBRARY)
|
||||
|
||||
option(ENABLE_CURL "Enable cURL support for fetching media" 1)
|
||||
|
||||
if (NOT ENABLE_CURL)
|
||||
mark_as_advanced(CLEAR CURL_LIBRARY CURL_INCLUDE_DIR)
|
||||
endif(NOT ENABLE_CURL)
|
||||
|
||||
if( ENABLE_CURL )
|
||||
find_package(CURL)
|
||||
endif( ENABLE_CURL )
|
||||
set(USE_CURL 0)
|
||||
if (CURL_FOUND AND ENABLE_CURL)
|
||||
message(STATUS "cURL support enabled")
|
||||
set(USE_CURL 1)
|
||||
endif(CURL_FOUND AND ENABLE_CURL)
|
||||
|
||||
# user-visible option to enable/disable gettext usage
|
||||
OPTION(ENABLE_GETTEXT "Use GetText for internationalization" 0)
|
||||
@@ -82,6 +94,12 @@ if(USE_SOUND)
|
||||
)
|
||||
endif()
|
||||
|
||||
option(ENABLE_FREETYPE "Enable freetype2 (truetype fonts and basic unicode support)" OFF)
|
||||
set(USE_FREETYPE 0)
|
||||
if(ENABLE_FREETYPE)
|
||||
set(USE_FREETYPE 1)
|
||||
endif(ENABLE_FREETYPE)
|
||||
|
||||
if(NOT MSVC)
|
||||
set(USE_GPROF 0 CACHE BOOL "Use -pg flag for g++")
|
||||
endif()
|
||||
@@ -106,6 +124,14 @@ if(WIN32)
|
||||
CACHE FILEPATH "Path to zlibwapi.dll (for installation)")
|
||||
set(IRRLICHT_SOURCE_DIR "${PROJECT_SOURCE_DIR}/../../irrlicht-1.7.2"
|
||||
CACHE PATH "irrlicht dir")
|
||||
if(USE_FREETYPE)
|
||||
set(FREETYPE_INCLUDE_DIR_ft2build "${PROJECT_SOURCE_DIR}/../../freetype2/include/"
|
||||
CACHE PATH "freetype include dir")
|
||||
set(FREETYPE_INCLUDE_DIR_freetype2 "${PROJECT_SOURCE_DIR}/../../freetype2/include/freetype"
|
||||
CACHE PATH "freetype include dir")
|
||||
set(FREETYPE_LIBRARY "${PROJECT_SOURCE_DIR}/../../freetype2/objs/win32/vc2005/freetype247.lib"
|
||||
CACHE FILEPATH "Path to freetype247.lib")
|
||||
endif(USE_FREETYPE)
|
||||
set(MINGWM10_DLL ""
|
||||
CACHE FILEPATH "Path to mingwm10.dll (for installation)")
|
||||
if(ENABLE_SOUND)
|
||||
@@ -135,17 +161,27 @@ else()
|
||||
endif(APPLE)
|
||||
endif(BUILD_CLIENT)
|
||||
find_package(ZLIB REQUIRED)
|
||||
set(PLATFORM_LIBS -lpthread ${CMAKE_DL_LIBS})
|
||||
set(PLATFORM_LIBS -lpthread -lrt ${CMAKE_DL_LIBS})
|
||||
#set(CLIENT_PLATFORM_LIBS -lXxf86vm)
|
||||
# This way Xxf86vm is found on OpenBSD too
|
||||
find_library(XXF86VM_LIBRARY Xxf86vm)
|
||||
mark_as_advanced(XXF86VM_LIBRARY)
|
||||
set(CLIENT_PLATFORM_LIBS ${CLIENT_PLATFORM_LIBS} ${XXF86VM_LIBRARY})
|
||||
endif()
|
||||
|
||||
find_package(Jthread REQUIRED)
|
||||
find_package(Sqlite3 REQUIRED)
|
||||
find_package(Json REQUIRED)
|
||||
find_package(OpenGLES2)
|
||||
|
||||
# TODO: Create proper find script for Lua
|
||||
if(USE_FREETYPE)
|
||||
find_package(Freetype REQUIRED)
|
||||
set(CGUITTFONT_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cguittfont")
|
||||
set(CGUITTFONT_LIBRARY cguittfont)
|
||||
endif(USE_FREETYPE)
|
||||
|
||||
# Do not use system-wide installation of Lua, because it'll likely be a
|
||||
# different version and/or has different build options.
|
||||
set(LUA_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lua/src")
|
||||
set(LUA_LIBRARY "lua")
|
||||
|
||||
@@ -155,6 +191,8 @@ configure_file(
|
||||
)
|
||||
|
||||
set(common_SRCS
|
||||
rollback_interface.cpp
|
||||
rollback.cpp
|
||||
genericobject.cpp
|
||||
voxelalgorithms.cpp
|
||||
sound.cpp
|
||||
@@ -168,11 +206,31 @@ set(common_SRCS
|
||||
itemdef.cpp
|
||||
nodedef.cpp
|
||||
object_properties.cpp
|
||||
scriptapi_types.cpp
|
||||
scriptapi_common.cpp
|
||||
scriptapi_content.cpp
|
||||
scriptapi_craft.cpp
|
||||
scriptapi_node.cpp
|
||||
scriptapi_item.cpp
|
||||
scriptapi_env.cpp
|
||||
scriptapi_nodetimer.cpp
|
||||
scriptapi_noise.cpp
|
||||
scriptapi_entity.cpp
|
||||
scriptapi_object.cpp
|
||||
scriptapi_nodemeta.cpp
|
||||
scriptapi_inventory.cpp
|
||||
scriptapi_particles.cpp
|
||||
scriptapi.cpp
|
||||
script.cpp
|
||||
log.cpp
|
||||
content_sao.cpp
|
||||
emerge.cpp
|
||||
mapgen.cpp
|
||||
mapgen_v6.cpp
|
||||
mapgen_indev.cpp
|
||||
mapgen_singlenode.cpp
|
||||
treegen.cpp
|
||||
dungeongen.cpp
|
||||
content_nodemeta.cpp
|
||||
content_mapnode.cpp
|
||||
collision.cpp
|
||||
@@ -193,17 +251,25 @@ set(common_SRCS
|
||||
connection.cpp
|
||||
environment.cpp
|
||||
server.cpp
|
||||
servercommand.cpp
|
||||
socket.cpp
|
||||
mapblock.cpp
|
||||
mapsector.cpp
|
||||
map.cpp
|
||||
player.cpp
|
||||
utility.cpp
|
||||
test.cpp
|
||||
sha1.cpp
|
||||
base64.cpp
|
||||
ban.cpp
|
||||
biome.cpp
|
||||
clientserver.cpp
|
||||
staticobject.cpp
|
||||
serverlist.cpp
|
||||
util/serialize.cpp
|
||||
util/directiontables.cpp
|
||||
util/numeric.cpp
|
||||
util/pointedthing.cpp
|
||||
util/string.cpp
|
||||
util/timetaker.cpp
|
||||
)
|
||||
|
||||
# This gives us the icon
|
||||
@@ -240,26 +306,37 @@ set(minetest_SRCS
|
||||
keycode.cpp
|
||||
camera.cpp
|
||||
clouds.cpp
|
||||
particles.cpp
|
||||
clientobject.cpp
|
||||
chat.cpp
|
||||
guiMainMenu.cpp
|
||||
guiKeyChangeMenu.cpp
|
||||
guiMessageMenu.cpp
|
||||
guiTextInputMenu.cpp
|
||||
guiInventoryMenu.cpp
|
||||
guiFormSpecMenu.cpp
|
||||
guiPauseMenu.cpp
|
||||
guiPasswordChange.cpp
|
||||
guiVolumeChange.cpp
|
||||
guiDeathScreen.cpp
|
||||
guiChatConsole.cpp
|
||||
guiCreateWorld.cpp
|
||||
guiConfigureWorld.cpp
|
||||
guiConfirmMenu.cpp
|
||||
client.cpp
|
||||
filecache.cpp
|
||||
tile.cpp
|
||||
shader.cpp
|
||||
game.cpp
|
||||
main.cpp
|
||||
)
|
||||
|
||||
if(USE_FREETYPE)
|
||||
set(minetest_SRCS
|
||||
${minetest_SRCS}
|
||||
intlGUIEditBox.cpp
|
||||
)
|
||||
endif(USE_FREETYPE)
|
||||
|
||||
# Server sources
|
||||
set(minetestserver_SRCS
|
||||
${common_SRCS}
|
||||
@@ -277,8 +354,22 @@ include_directories(
|
||||
${JTHREAD_INCLUDE_DIR}
|
||||
${SQLITE3_INCLUDE_DIR}
|
||||
${LUA_INCLUDE_DIR}
|
||||
${JSON_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
if(USE_FREETYPE)
|
||||
include_directories(
|
||||
${FREETYPE_INCLUDE_DIRS}
|
||||
${CGUITTFONT_INCLUDE_DIR}
|
||||
)
|
||||
endif(USE_FREETYPE)
|
||||
|
||||
if(USE_CURL)
|
||||
include_directories(
|
||||
${CURL_INCLUDE_DIR}
|
||||
)
|
||||
endif(USE_CURL)
|
||||
|
||||
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin")
|
||||
|
||||
if(BUILD_CLIENT)
|
||||
@@ -297,9 +388,24 @@ if(BUILD_CLIENT)
|
||||
${JTHREAD_LIBRARY}
|
||||
${SQLITE3_LIBRARY}
|
||||
${LUA_LIBRARY}
|
||||
${JSON_LIBRARY}
|
||||
${OPENGLES2_LIBRARIES}
|
||||
${PLATFORM_LIBS}
|
||||
${CLIENT_PLATFORM_LIBS}
|
||||
)
|
||||
if(USE_CURL)
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
${CURL_LIBRARY}
|
||||
)
|
||||
endif(USE_CURL)
|
||||
if(USE_FREETYPE)
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
${FREETYPE_LIBRARY}
|
||||
${CGUITTFONT_LIBRARY}
|
||||
)
|
||||
endif(USE_FREETYPE)
|
||||
endif(BUILD_CLIENT)
|
||||
|
||||
if(BUILD_SERVER)
|
||||
@@ -309,11 +415,20 @@ if(BUILD_SERVER)
|
||||
${ZLIB_LIBRARIES}
|
||||
${JTHREAD_LIBRARY}
|
||||
${SQLITE3_LIBRARY}
|
||||
${JSON_LIBRARY}
|
||||
${GETTEXT_LIBRARY}
|
||||
${LUA_LIBRARY}
|
||||
${PLATFORM_LIBS}
|
||||
)
|
||||
if(USE_CURL)
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME}server
|
||||
${CURL_LIBRARY}
|
||||
)
|
||||
endif(USE_CURL)
|
||||
endif(BUILD_SERVER)
|
||||
|
||||
|
||||
#
|
||||
# Set some optimizations and tweaks
|
||||
#
|
||||
@@ -406,6 +521,9 @@ if(WIN32)
|
||||
if(VORBISFILE_DLL)
|
||||
install(FILES ${VORBISFILE_DLL} DESTINATION ${BINDIR})
|
||||
endif()
|
||||
if(CURL_DLL)
|
||||
install(FILES ${CURL_DLL} DESTINATION ${BINDIR})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -477,9 +595,18 @@ else (SQLITE3_FOUND)
|
||||
add_subdirectory(sqlite)
|
||||
endif (SQLITE3_FOUND)
|
||||
|
||||
if (BUILD_CLIENT AND USE_FREETYPE)
|
||||
add_subdirectory(cguittfont)
|
||||
endif (BUILD_CLIENT AND USE_FREETYPE)
|
||||
|
||||
if (LUA_FOUND)
|
||||
else (LUA_FOUND)
|
||||
add_subdirectory(lua)
|
||||
endif (LUA_FOUND)
|
||||
|
||||
if (JSON_FOUND)
|
||||
else (JSON_FOUND)
|
||||
add_subdirectory(json)
|
||||
endif (JSON_FOUND)
|
||||
|
||||
#end
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
Minetest-c55
|
||||
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Minetest
|
||||
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
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 General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
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.
|
||||
*/
|
||||
@@ -20,7 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#ifndef ACTIVEOBJECT_HEADER
|
||||
#define ACTIVEOBJECT_HEADER
|
||||
|
||||
#include "irrlichttypes.h"
|
||||
#include "irrlichttypes_bloated.h"
|
||||
#include <string>
|
||||
|
||||
#define ACTIVEOBJECT_TYPE_INVALID 0
|
||||
@@ -61,7 +61,7 @@ class ActiveObject
|
||||
}
|
||||
|
||||
virtual u8 getType() const = 0;
|
||||
|
||||
virtual bool getCollisionBox(aabb3f *toset) = 0;
|
||||
protected:
|
||||
u16 m_id; // 0 is invalid, "no id"
|
||||
};
|
||||
|
||||
12
src/ban.cpp
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
Minetest-c55
|
||||
Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Minetest
|
||||
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
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 General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
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.
|
||||
*/
|
||||
|
||||
13
src/ban.h
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
Minetest-c55
|
||||
Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Minetest
|
||||
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
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 General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
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.
|
||||
*/
|
||||
@@ -24,7 +24,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include <string>
|
||||
#include <jthread.h>
|
||||
#include <jmutex.h>
|
||||
#include "common_irrlicht.h"
|
||||
#include "exceptions.h"
|
||||
|
||||
class BanManager
|
||||
|
||||
@@ -40,7 +40,7 @@ static inline bool is_base64(unsigned char c) {
|
||||
|
||||
bool base64_is_valid(std::string const& s)
|
||||
{
|
||||
for(int i=0; i<s.size(); i++)
|
||||
for(size_t i=0; i<s.size(); i++)
|
||||
if(!is_base64(s[i])) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
#ifndef BASE64_HEADER
|
||||
#define BASE64_HEADER
|
||||
|
||||
#include <string>
|
||||
|
||||
bool base64_is_valid(std::string const& s);
|
||||
std::string base64_encode(unsigned char const* , unsigned int len);
|
||||
std::string base64_decode(std::string const& s);
|
||||
|
||||
#endif // BASE64_HEADER
|
||||
|
||||
233
src/biome.cpp
Normal file
@@ -0,0 +1,233 @@
|
||||
/*
|
||||
Minetest
|
||||
Copyright (C) 2010-2013 kwolekr, Ryan Kwolek <kwolekr2@cs.scranton.edu>
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#include "biome.h"
|
||||
#include "nodedef.h"
|
||||
#include "map.h" //for ManualMapVoxelManipulator
|
||||
#include "log.h"
|
||||
#include "main.h"
|
||||
|
||||
#define BT_NONE 0
|
||||
#define BT_OCEAN 1
|
||||
#define BT_LAKE 2
|
||||
#define BT_SBEACH 3
|
||||
#define BT_GBEACH 4
|
||||
#define BT_PLAINS 5
|
||||
#define BT_HILLS 6
|
||||
#define BT_EXTREMEHILLS 7
|
||||
#define BT_MOUNTAINS 8
|
||||
#define BT_DESERT 9
|
||||
#define BT_DESERTHILLS 10
|
||||
#define BT_HELL 11
|
||||
#define BT_AETHER 12
|
||||
|
||||
#define BT_BTMASK 0x3F
|
||||
|
||||
#define BTF_SNOW 0x40
|
||||
#define BTF_FOREST 0x80
|
||||
|
||||
#define BGFREQ_1 ( 0.40)
|
||||
#define BGFREQ_2 (BGFREQ_1 + 0.05)
|
||||
#define BGFREQ_3 (BGFREQ_2 + 0.08)
|
||||
#define BGFREQ_4 (BGFREQ_3 + 0.35)
|
||||
#define BGFREQ_5 (BGFREQ_4 + 0.18)
|
||||
//BGFREQ_5 is not checked as an upper bound; it ought to sum up to 1.00, but it's okay if it doesn't.
|
||||
|
||||
|
||||
/*float bg1_temps[] = {0.0};
|
||||
int bg1_biomes[] = {BT_OCEAN};
|
||||
|
||||
float bg2_temps[] = {10.0};
|
||||
int bg2_biomes[] = {BT_GBEACH, BT_SBEACH};
|
||||
|
||||
float bg3_temps[] = {30.0, 40.0};
|
||||
int bg3_biomes[] = {BT_HILLS, BT_EXTREMEHILLS, BT_MOUNTAINS};
|
||||
|
||||
float bg4_temps[] = {25.0, 30.0, 35.0, 40.0};
|
||||
int bg4_biomes[] = {BT_HILLS, BT_EXTREMEHILLS, BT_MOUNTAINS, BT_DESERT, BT_DESERTHILLS};
|
||||
|
||||
float bg5_temps[] = {5.0, 40.0};
|
||||
int bg5_biomes[] = {BT_LAKE, BT_PLAINS, BT_DESERT};*/
|
||||
|
||||
NoiseParams np_default = {20.0, 15.0, v3f(250., 250., 250.), 82341, 5, 0.6};
|
||||
|
||||
|
||||
BiomeDefManager::BiomeDefManager(IGameDef *gamedef) {
|
||||
this->m_gamedef = gamedef;
|
||||
this->ndef = gamedef->ndef();
|
||||
|
||||
//the initial biome group
|
||||
bgroups.push_back(new std::vector<Biome *>);
|
||||
}
|
||||
|
||||
|
||||
BiomeDefManager::~BiomeDefManager() {
|
||||
for (unsigned int i = 0; i != bgroups.size(); i++)
|
||||
delete bgroups[i];
|
||||
}
|
||||
|
||||
|
||||
Biome *BiomeDefManager::createBiome(BiomeTerrainType btt) {
|
||||
switch (btt) {
|
||||
case BIOME_TERRAIN_NORMAL:
|
||||
return new Biome;
|
||||
case BIOME_TERRAIN_LIQUID:
|
||||
return new BiomeLiquid;
|
||||
case BIOME_TERRAIN_NETHER:
|
||||
return new BiomeHell;
|
||||
case BIOME_TERRAIN_AETHER:
|
||||
return new BiomeAether;
|
||||
case BIOME_TERRAIN_FLAT:
|
||||
return new BiomeSuperflat;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
void BiomeDefManager::addBiomeGroup(float freq) {
|
||||
int size = bgroup_freqs.size();
|
||||
float newfreq = freq;
|
||||
|
||||
if (size)
|
||||
newfreq += bgroup_freqs[size - 1];
|
||||
bgroup_freqs.push_back(newfreq);
|
||||
bgroups.push_back(new std::vector<Biome *>);
|
||||
|
||||
verbosestream << "BiomeDefManager: added biome group with frequency " <<
|
||||
newfreq << std::endl;
|
||||
}
|
||||
|
||||
|
||||
void BiomeDefManager::addBiome(Biome *b) {
|
||||
std::vector<Biome *> *bgroup;
|
||||
|
||||
if ((unsigned int)b->groupid >= bgroups.size()) {
|
||||
errorstream << "BiomeDefManager: attempted to add biome '" << b->name
|
||||
<< "' to nonexistent biome group " << b->groupid << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
bgroup = bgroups[b->groupid];
|
||||
bgroup->push_back(b);
|
||||
|
||||
verbosestream << "BiomeDefManager: added biome '" << b->name <<
|
||||
"' to biome group " << (int)b->groupid << std::endl;
|
||||
}
|
||||
|
||||
|
||||
void BiomeDefManager::addDefaultBiomes() {
|
||||
Biome *b;
|
||||
|
||||
b = new Biome;
|
||||
b->name = "Default";
|
||||
b->n_top = MapNode(ndef->getId("mapgen_stone"));
|
||||
b->n_filler = b->n_top;
|
||||
b->ntopnodes = 0;
|
||||
b->height_min = -MAP_GENERATION_LIMIT;
|
||||
b->height_max = MAP_GENERATION_LIMIT;
|
||||
b->heat_min = FLT_MIN;
|
||||
b->heat_max = FLT_MAX;
|
||||
b->humidity_min = FLT_MIN;
|
||||
b->humidity_max = FLT_MAX;
|
||||
b->np = &np_default;
|
||||
biome_default = b;
|
||||
}
|
||||
|
||||
|
||||
Biome *BiomeDefManager::getBiome(float bgfreq, float heat, float humidity) {
|
||||
std::vector<Biome *> *bgroup;
|
||||
Biome *b;
|
||||
int i;
|
||||
|
||||
int ngroups = bgroup_freqs.size();
|
||||
if (!ngroups)
|
||||
return biome_default;
|
||||
for (i = 0; (i != ngroups) && (bgfreq > bgroup_freqs[i]); i++);
|
||||
bgroup = bgroups[i];
|
||||
|
||||
int nbiomes = bgroup->size();
|
||||
for (i = 0; i != nbiomes; i++) {
|
||||
b = bgroup->operator[](i);
|
||||
if (heat >= b->heat_min && heat <= b->heat_max &&
|
||||
humidity >= b->humidity_min && humidity <= b->humidity_max)
|
||||
return b;
|
||||
}
|
||||
|
||||
return biome_default;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////// [ Generic biome ] ////////////////////////////////
|
||||
|
||||
|
||||
int Biome::getSurfaceHeight(float noise_terrain) {
|
||||
return np->offset + np->scale * noise_terrain;
|
||||
}
|
||||
|
||||
|
||||
void Biome::genColumn(Mapgen *mapgen, int x, int z, int y1, int y2) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////// [ Ocean biome ] /////////////////////////////////
|
||||
|
||||
|
||||
void BiomeLiquid::genColumn(Mapgen *mapgen, int x, int z, int y1, int y2) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////// [ Nether biome ] /////////////////////////////////
|
||||
|
||||
|
||||
int BiomeHell::getSurfaceHeight(float noise_terrain) {
|
||||
return np->offset + np->scale * noise_terrain;
|
||||
}
|
||||
|
||||
|
||||
void BiomeHell::genColumn(Mapgen *mapgen, int x, int z, int y1, int y2) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////// [ Aether biome ] ////////////////////////////////
|
||||
|
||||
|
||||
int BiomeAether::getSurfaceHeight(float noise_terrain) {
|
||||
return np->offset + np->scale * noise_terrain;
|
||||
}
|
||||
|
||||
|
||||
void BiomeAether::genColumn(Mapgen *mapgen, int x, int z, int y1, int y2) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////// [ Superflat biome ] ///////////////////////////////
|
||||
|
||||
|
||||
int BiomeSuperflat::getSurfaceHeight(float noise_terrain) {
|
||||
return ntopnodes;
|
||||
}
|
||||
|
||||
|
||||
void BiomeSuperflat::genColumn(Mapgen *mapgen, int x, int z, int y1, int y2) {
|
||||
|
||||
}
|
||||
98
src/biome.h
Normal file
@@ -0,0 +1,98 @@
|
||||
/*
|
||||
Minetest
|
||||
Copyright (C) 2010-2013 kwolekr, Ryan Kwolek <kwolekr2@cs.scranton.edu>
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef BIOME_HEADER
|
||||
#define BIOME_HEADER
|
||||
|
||||
#include <string>
|
||||
#include "nodedef.h"
|
||||
#include "gamedef.h"
|
||||
#include "mapnode.h"
|
||||
#include "noise.h"
|
||||
#include "mapgen.h"
|
||||
|
||||
|
||||
enum BiomeTerrainType
|
||||
{
|
||||
BIOME_TERRAIN_NORMAL,
|
||||
BIOME_TERRAIN_LIQUID,
|
||||
BIOME_TERRAIN_NETHER,
|
||||
BIOME_TERRAIN_AETHER,
|
||||
BIOME_TERRAIN_FLAT
|
||||
};
|
||||
|
||||
class Biome {
|
||||
public:
|
||||
MapNode n_top;
|
||||
MapNode n_filler;
|
||||
s16 ntopnodes;
|
||||
s8 groupid;
|
||||
s8 flags;
|
||||
s16 height_min;
|
||||
s16 height_max;
|
||||
float heat_min;
|
||||
float heat_max;
|
||||
float humidity_min;
|
||||
float humidity_max;
|
||||
std::string name;
|
||||
NoiseParams *np;
|
||||
|
||||
virtual void genColumn(Mapgen *mg, int x, int z, int y1, int y2);
|
||||
virtual int getSurfaceHeight(float noise_terrain);
|
||||
};
|
||||
|
||||
class BiomeLiquid : public Biome {
|
||||
virtual void genColumn(Mapgen *mg, int x, int z, int y1, int y2);
|
||||
};
|
||||
|
||||
class BiomeHell : public Biome {
|
||||
virtual void genColumn(Mapgen *mg, int x, int z, int y1, int y2);
|
||||
virtual int getSurfaceHeight(float noise_terrain);
|
||||
};
|
||||
|
||||
class BiomeAether : public Biome {
|
||||
virtual void genColumn(Mapgen *mg, int x, int z, int y1, int y2);
|
||||
virtual int getSurfaceHeight(float noise_terrain);
|
||||
};
|
||||
|
||||
class BiomeSuperflat : public Biome {
|
||||
virtual void genColumn(Mapgen *mg, int x, int z, int y1, int y2);
|
||||
virtual int getSurfaceHeight(float noise_terrain);
|
||||
};
|
||||
|
||||
class BiomeDefManager {
|
||||
public:
|
||||
std::vector<float> bgroup_freqs;
|
||||
std::vector<std::vector<Biome *> *> bgroups;
|
||||
Biome *biome_default;
|
||||
IGameDef *m_gamedef;
|
||||
INodeDefManager *ndef;
|
||||
|
||||
BiomeDefManager(IGameDef *gamedef);
|
||||
~BiomeDefManager();
|
||||
|
||||
Biome *createBiome(BiomeTerrainType btt);
|
||||
Biome *getBiome(float bgfreq, float heat, float humidity);
|
||||
|
||||
void addBiomeGroup(float freq);
|
||||
void addBiome(Biome *b);
|
||||
void addDefaultBiomes();
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
Minetest-c55
|
||||
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Minetest
|
||||
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
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 General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
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.
|
||||
*/
|
||||
@@ -33,6 +33,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "gamedef.h"
|
||||
#include "sound.h"
|
||||
#include "event.h"
|
||||
#include "util/numeric.h"
|
||||
#include "util/mathconstants.h"
|
||||
|
||||
Camera::Camera(scene::ISceneManager* smgr, MapDrawControl& draw_control,
|
||||
IGameDef *gamedef):
|
||||
@@ -212,14 +214,31 @@ void Camera::step(f32 dtime)
|
||||
void Camera::update(LocalPlayer* player, f32 frametime, v2u32 screensize,
|
||||
f32 tool_reload_ratio)
|
||||
{
|
||||
// Get player position
|
||||
// Smooth the movement when walking up stairs
|
||||
v3f old_player_position = m_playernode->getPosition();
|
||||
v3f player_position = player->getPosition();
|
||||
//if(player->touching_ground && player_position.Y > old_player_position.Y)
|
||||
if(player->touching_ground &&
|
||||
player_position.Y > old_player_position.Y)
|
||||
{
|
||||
f32 oldy = old_player_position.Y;
|
||||
f32 newy = player_position.Y;
|
||||
f32 t = exp(-23*frametime);
|
||||
player_position.Y = oldy * t + newy * (1-t);
|
||||
}
|
||||
|
||||
// Set player node transformation
|
||||
m_playernode->setPosition(player->getPosition());
|
||||
m_playernode->setPosition(player_position);
|
||||
m_playernode->setRotation(v3f(0, -1 * player->getYaw(), 0));
|
||||
m_playernode->updateAbsolutePosition();
|
||||
|
||||
//Get camera tilt timer (hurt animation)
|
||||
float cameratilt = fabs(fabs(player->hurt_tilt_timer-0.75)-0.75);
|
||||
|
||||
// Set head node transformation
|
||||
m_headnode->setPosition(player->getEyeOffset());
|
||||
m_headnode->setRotation(v3f(player->getPitch(), 0, 0));
|
||||
m_headnode->setPosition(player->getEyeOffset()+v3f(0,cameratilt*-player->hurt_tilt_strength,0));
|
||||
m_headnode->setRotation(v3f(player->getPitch(), 0, cameratilt*player->hurt_tilt_strength));
|
||||
m_headnode->updateAbsolutePosition();
|
||||
|
||||
// Compute relative camera position and target
|
||||
@@ -234,17 +253,17 @@ void Camera::update(LocalPlayer* player, f32 frametime, v2u32 screensize,
|
||||
|
||||
#if 1
|
||||
f32 bobknob = 1.2;
|
||||
f32 bobtmp = sin(pow(bobfrac, bobknob) * PI);
|
||||
//f32 bobtmp2 = cos(pow(bobfrac, bobknob) * PI);
|
||||
f32 bobtmp = sin(pow(bobfrac, bobknob) * M_PI);
|
||||
//f32 bobtmp2 = cos(pow(bobfrac, bobknob) * M_PI);
|
||||
|
||||
v3f bobvec = v3f(
|
||||
0.3 * bobdir * sin(bobfrac * PI),
|
||||
0.3 * bobdir * sin(bobfrac * M_PI),
|
||||
-0.28 * bobtmp * bobtmp,
|
||||
0.);
|
||||
|
||||
//rel_cam_pos += 0.2 * bobvec;
|
||||
//rel_cam_target += 0.03 * bobvec;
|
||||
//rel_cam_up.rotateXYBy(0.02 * bobdir * bobtmp * PI);
|
||||
//rel_cam_up.rotateXYBy(0.02 * bobdir * bobtmp * M_PI);
|
||||
float f = 1.0;
|
||||
f *= g_settings->getFloat("view_bobbing_amount");
|
||||
rel_cam_pos += bobvec * f;
|
||||
@@ -253,10 +272,10 @@ void Camera::update(LocalPlayer* player, f32 frametime, v2u32 screensize,
|
||||
rel_cam_target.Z -= 0.005 * bobvec.Z * f;
|
||||
//rel_cam_target.X -= 0.005 * bobvec.X * f;
|
||||
//rel_cam_target.Y -= 0.005 * bobvec.Y * f;
|
||||
rel_cam_up.rotateXYBy(-0.03 * bobdir * bobtmp * PI * f);
|
||||
rel_cam_up.rotateXYBy(-0.03 * bobdir * bobtmp * M_PI * f);
|
||||
#else
|
||||
f32 angle_deg = 1 * bobdir * sin(bobfrac * PI);
|
||||
f32 angle_rad = angle_deg * PI / 180;
|
||||
f32 angle_deg = 1 * bobdir * sin(bobfrac * M_PI);
|
||||
f32 angle_rad = angle_deg * M_PI / 180;
|
||||
f32 r = 0.05;
|
||||
v3f off = v3f(
|
||||
r * sin(angle_rad),
|
||||
@@ -289,7 +308,7 @@ void Camera::update(LocalPlayer* player, f32 frametime, v2u32 screensize,
|
||||
|
||||
// FOV and aspect ratio
|
||||
m_aspect = (f32)screensize.X / (f32) screensize.Y;
|
||||
m_fov_y = fov_degrees * PI / 180.0;
|
||||
m_fov_y = fov_degrees * M_PI / 180.0;
|
||||
// Increase vertical FOV on lower aspect ratios (<16:10)
|
||||
m_fov_y *= MYMAX(1.0, MYMIN(1.4, sqrt(16./10. / m_aspect)));
|
||||
// WTF is this? It can't be right
|
||||
@@ -320,22 +339,22 @@ void Camera::update(LocalPlayer* player, f32 frametime, v2u32 screensize,
|
||||
if (m_digging_button != -1)
|
||||
{
|
||||
f32 digfrac = m_digging_anim;
|
||||
wield_position.X -= 30 * sin(pow(digfrac, 0.8f) * PI);
|
||||
wield_position.Y += 15 * sin(digfrac * 2 * PI);
|
||||
wield_position.Z += 5 * digfrac;
|
||||
|
||||
wield_position.X -= 50 * sin(pow(digfrac, 0.8f) * M_PI);
|
||||
wield_position.Y += 24 * sin(digfrac * 1.8 * M_PI);
|
||||
wield_position.Z += 25 * 0.5;
|
||||
|
||||
// Euler angles are PURE EVIL, so why not use quaternions?
|
||||
core::quaternion quat_begin(wield_rotation * core::DEGTORAD);
|
||||
core::quaternion quat_end(v3f(90, -10, -130) * core::DEGTORAD);
|
||||
core::quaternion quat_end(v3f(80, 30, 100) * core::DEGTORAD);
|
||||
core::quaternion quat_slerp;
|
||||
quat_slerp.slerp(quat_begin, quat_end, sin(digfrac * PI));
|
||||
quat_slerp.slerp(quat_begin, quat_end, sin(digfrac * M_PI));
|
||||
quat_slerp.toEuler(wield_rotation);
|
||||
wield_rotation *= core::RADTODEG;
|
||||
}
|
||||
else {
|
||||
f32 bobfrac = my_modf(m_view_bobbing_anim);
|
||||
wield_position.X -= sin(bobfrac*PI*2.0) * 3.0;
|
||||
wield_position.Y += sin(my_modf(bobfrac*2.0)*PI) * 3.0;
|
||||
wield_position.X -= sin(bobfrac*M_PI*2.0) * 3.0;
|
||||
wield_position.Y += sin(my_modf(bobfrac*2.0)*M_PI) * 3.0;
|
||||
}
|
||||
m_wieldnode->setPosition(wield_position);
|
||||
m_wieldnode->setRotation(wield_rotation);
|
||||
@@ -513,7 +532,7 @@ void Camera::setDigging(s32 button)
|
||||
void Camera::wield(const ItemStack &item)
|
||||
{
|
||||
IItemDefManager *idef = m_gamedef->idef();
|
||||
scene::IMesh *wield_mesh = item.getDefinition(idef).wield_mesh;
|
||||
scene::IMesh *wield_mesh = idef->getWieldMesh(item.getDefinition(idef).name, m_gamedef);
|
||||
if(wield_mesh)
|
||||
{
|
||||
m_wieldnode->setMesh(wield_mesh);
|
||||
@@ -528,7 +547,7 @@ void Camera::wield(const ItemStack &item)
|
||||
void Camera::drawWieldedTool()
|
||||
{
|
||||
// Set vertex colors of wield mesh according to light level
|
||||
u8 li = decode_light(m_wieldlight);
|
||||
u8 li = m_wieldlight;
|
||||
video::SColor color(255,li,li,li);
|
||||
setMeshColor(m_wieldnode->getMesh(), color);
|
||||
|
||||
@@ -538,7 +557,7 @@ void Camera::drawWieldedTool()
|
||||
// Draw the wielded node (in a separate scene manager)
|
||||
scene::ICameraSceneNode* cam = m_wieldmgr->getActiveCamera();
|
||||
cam->setAspectRatio(m_cameranode->getAspectRatio());
|
||||
cam->setFOV(72.0*PI/180.0);
|
||||
cam->setFOV(72.0*M_PI/180.0);
|
||||
cam->setNearValue(0.1);
|
||||
cam->setFarValue(100);
|
||||
m_wieldmgr->drawAll();
|
||||
|
||||
16
src/camera.h
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
Minetest-c55
|
||||
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Minetest
|
||||
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
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 General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
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.
|
||||
*/
|
||||
@@ -20,11 +20,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#ifndef CAMERA_HEADER
|
||||
#define CAMERA_HEADER
|
||||
|
||||
#include "common_irrlicht.h"
|
||||
#include "irrlichttypes_extrabloated.h"
|
||||
#include "inventory.h"
|
||||
#include "mesh.h"
|
||||
#include "tile.h"
|
||||
#include "utility.h"
|
||||
#include "util/numeric.h"
|
||||
#include <ICameraSceneNode.h>
|
||||
|
||||
class LocalPlayer;
|
||||
|
||||
1146
src/cguittfont/CGUITTFont.cpp
Normal file
377
src/cguittfont/CGUITTFont.h
Normal file
@@ -0,0 +1,377 @@
|
||||
/*
|
||||
CGUITTFont FreeType class for Irrlicht
|
||||
Copyright (c) 2009-2010 John Norman
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any
|
||||
damages arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any
|
||||
purpose, including commercial applications, and to alter it and
|
||||
redistribute it freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you
|
||||
must not claim that you wrote the original software. If you use
|
||||
this software in a product, an acknowledgment in the product
|
||||
documentation would be appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and
|
||||
must not be misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source
|
||||
distribution.
|
||||
|
||||
The original version of this class can be located at:
|
||||
http://irrlicht.suckerfreegames.com/
|
||||
|
||||
John Norman
|
||||
john@suckerfreegames.com
|
||||
*/
|
||||
|
||||
#ifndef __C_GUI_TTFONT_H_INCLUDED__
|
||||
#define __C_GUI_TTFONT_H_INCLUDED__
|
||||
|
||||
#include <irrlicht.h>
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace gui
|
||||
{
|
||||
struct SGUITTFace;
|
||||
class CGUITTFont;
|
||||
|
||||
//! Class to assist in deleting glyphs.
|
||||
class CGUITTAssistDelete
|
||||
{
|
||||
public:
|
||||
template <class T, typename TAlloc>
|
||||
static void Delete(core::array<T, TAlloc>& a)
|
||||
{
|
||||
TAlloc allocator;
|
||||
allocator.deallocate(a.pointer());
|
||||
}
|
||||
};
|
||||
|
||||
//! Structure representing a single TrueType glyph.
|
||||
struct SGUITTGlyph
|
||||
{
|
||||
//! Constructor.
|
||||
SGUITTGlyph() : isLoaded(false), glyph_page(0), surface(0), parent(0) {}
|
||||
|
||||
//! Destructor.
|
||||
~SGUITTGlyph() { unload(); }
|
||||
|
||||
//! Preload the glyph.
|
||||
//! The preload process occurs when the program tries to cache the glyph from FT_Library.
|
||||
//! However, it simply defines the SGUITTGlyph's properties and will only create the page
|
||||
//! textures if necessary. The actual creation of the textures should only occur right
|
||||
//! before the batch draw call.
|
||||
void preload(u32 char_index, FT_Face face, video::IVideoDriver* driver, u32 font_size, const FT_Int32 loadFlags);
|
||||
|
||||
//! Unloads the glyph.
|
||||
void unload();
|
||||
|
||||
//! Creates the IImage object from the FT_Bitmap.
|
||||
video::IImage* createGlyphImage(const FT_Bitmap& bits, video::IVideoDriver* driver) const;
|
||||
|
||||
//! If true, the glyph has been loaded.
|
||||
bool isLoaded;
|
||||
|
||||
//! The page the glyph is on.
|
||||
u32 glyph_page;
|
||||
|
||||
//! The source rectangle for the glyph.
|
||||
core::recti source_rect;
|
||||
|
||||
//! The offset of glyph when drawn.
|
||||
core::vector2di offset;
|
||||
|
||||
//! Glyph advance information.
|
||||
FT_Vector advance;
|
||||
|
||||
//! This is just the temporary image holder. After this glyph is paged,
|
||||
//! it will be dropped.
|
||||
mutable video::IImage* surface;
|
||||
|
||||
//! The pointer pointing to the parent (CGUITTFont)
|
||||
CGUITTFont* parent;
|
||||
};
|
||||
|
||||
//! Holds a sheet of glyphs.
|
||||
class CGUITTGlyphPage
|
||||
{
|
||||
public:
|
||||
CGUITTGlyphPage(video::IVideoDriver* Driver, const io::path& texture_name) :texture(0), available_slots(0), used_slots(0), dirty(false), driver(Driver), name(texture_name) {}
|
||||
~CGUITTGlyphPage()
|
||||
{
|
||||
if (texture)
|
||||
{
|
||||
if (driver)
|
||||
driver->removeTexture(texture);
|
||||
else texture->drop();
|
||||
}
|
||||
}
|
||||
|
||||
//! Create the actual page texture,
|
||||
bool createPageTexture(const u8& pixel_mode, const core::dimension2du& texture_size)
|
||||
{
|
||||
if( texture )
|
||||
return false;
|
||||
|
||||
bool flgmip = driver->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS);
|
||||
driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false);
|
||||
|
||||
// Set the texture color format.
|
||||
switch (pixel_mode)
|
||||
{
|
||||
case FT_PIXEL_MODE_MONO:
|
||||
texture = driver->addTexture(texture_size, name, video::ECF_A1R5G5B5);
|
||||
break;
|
||||
case FT_PIXEL_MODE_GRAY:
|
||||
default:
|
||||
texture = driver->addTexture(texture_size, name, video::ECF_A8R8G8B8);
|
||||
break;
|
||||
}
|
||||
|
||||
// Restore our texture creation flags.
|
||||
driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, flgmip);
|
||||
return texture ? true : false;
|
||||
}
|
||||
|
||||
//! Add the glyph to a list of glyphs to be paged.
|
||||
//! This collection will be cleared after updateTexture is called.
|
||||
void pushGlyphToBePaged(const SGUITTGlyph* glyph)
|
||||
{
|
||||
glyph_to_be_paged.push_back(glyph);
|
||||
}
|
||||
|
||||
//! Updates the texture atlas with new glyphs.
|
||||
void updateTexture()
|
||||
{
|
||||
if (!dirty) return;
|
||||
|
||||
void* ptr = texture->lock();
|
||||
video::ECOLOR_FORMAT format = texture->getColorFormat();
|
||||
core::dimension2du size = texture->getOriginalSize();
|
||||
video::IImage* pageholder = driver->createImageFromData(format, size, ptr, true, false);
|
||||
|
||||
for (u32 i = 0; i < glyph_to_be_paged.size(); ++i)
|
||||
{
|
||||
const SGUITTGlyph* glyph = glyph_to_be_paged[i];
|
||||
if (glyph && glyph->isLoaded)
|
||||
{
|
||||
if (glyph->surface)
|
||||
{
|
||||
glyph->surface->copyTo(pageholder, glyph->source_rect.UpperLeftCorner);
|
||||
glyph->surface->drop();
|
||||
glyph->surface = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
; // TODO: add error message?
|
||||
//currently, if we failed to create the image, just ignore this operation.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pageholder->drop();
|
||||
texture->unlock();
|
||||
glyph_to_be_paged.clear();
|
||||
dirty = false;
|
||||
}
|
||||
|
||||
video::ITexture* texture;
|
||||
u32 available_slots;
|
||||
u32 used_slots;
|
||||
bool dirty;
|
||||
|
||||
core::array<core::vector2di> render_positions;
|
||||
core::array<core::recti> render_source_rects;
|
||||
|
||||
private:
|
||||
core::array<const SGUITTGlyph*> glyph_to_be_paged;
|
||||
video::IVideoDriver* driver;
|
||||
io::path name;
|
||||
};
|
||||
|
||||
//! Class representing a TrueType font.
|
||||
class CGUITTFont : public IGUIFont
|
||||
{
|
||||
public:
|
||||
//! Creates a new TrueType font and returns a pointer to it. The pointer must be drop()'ed when finished.
|
||||
//! \param env The IGUIEnvironment the font loads out of.
|
||||
//! \param filename The filename of the font.
|
||||
//! \param size The size of the font glyphs in pixels. Since this is the size of the individual glyphs, the true height of the font may change depending on the characters used.
|
||||
//! \param antialias set the use_monochrome (opposite to antialias) flag
|
||||
//! \param transparency set the use_transparency flag
|
||||
//! \return Returns a pointer to a CGUITTFont. Will return 0 if the font failed to load.
|
||||
static CGUITTFont* createTTFont(IGUIEnvironment *env, const io::path& filename, const u32 size, const bool antialias = true, const bool transparency = true);
|
||||
static CGUITTFont* createTTFont(IrrlichtDevice *device, const io::path& filename, const u32 size, const bool antialias = true, const bool transparency = true);
|
||||
static CGUITTFont* create(IGUIEnvironment *env, const io::path& filename, const u32 size, const bool antialias = true, const bool transparency = true);
|
||||
static CGUITTFont* create(IrrlichtDevice *device, const io::path& filename, const u32 size, const bool antialias = true, const bool transparency = true);
|
||||
|
||||
//! Destructor
|
||||
virtual ~CGUITTFont();
|
||||
|
||||
//! Sets the amount of glyphs to batch load.
|
||||
virtual void setBatchLoadSize(u32 batch_size) { batch_load_size = batch_size; }
|
||||
|
||||
//! Sets the maximum texture size for a page of glyphs.
|
||||
virtual void setMaxPageTextureSize(const core::dimension2du& texture_size) { max_page_texture_size = texture_size; }
|
||||
|
||||
//! Get the font size.
|
||||
virtual u32 getFontSize() const { return size; }
|
||||
|
||||
//! Check the font's transparency.
|
||||
virtual bool isTransparent() const { return use_transparency; }
|
||||
|
||||
//! Check if the font auto-hinting is enabled.
|
||||
//! Auto-hinting is FreeType's built-in font hinting engine.
|
||||
virtual bool useAutoHinting() const { return use_auto_hinting; }
|
||||
|
||||
//! Check if the font hinting is enabled.
|
||||
virtual bool useHinting() const { return use_hinting; }
|
||||
|
||||
//! Check if the font is being loaded as a monochrome font.
|
||||
//! The font can either be a 256 color grayscale font, or a 2 color monochrome font.
|
||||
virtual bool useMonochrome() const { return use_monochrome; }
|
||||
|
||||
//! Tells the font to allow transparency when rendering.
|
||||
//! Default: true.
|
||||
//! \param flag If true, the font draws using transparency.
|
||||
virtual void setTransparency(const bool flag);
|
||||
|
||||
//! Tells the font to use monochrome rendering.
|
||||
//! Default: false.
|
||||
//! \param flag If true, the font draws using a monochrome image. If false, the font uses a grayscale image.
|
||||
virtual void setMonochrome(const bool flag);
|
||||
|
||||
//! Enables or disables font hinting.
|
||||
//! Default: Hinting and auto-hinting true.
|
||||
//! \param enable If false, font hinting is turned off. If true, font hinting is turned on.
|
||||
//! \param enable_auto_hinting If true, FreeType uses its own auto-hinting algorithm. If false, it tries to use the algorithm specified by the font.
|
||||
virtual void setFontHinting(const bool enable, const bool enable_auto_hinting = true);
|
||||
|
||||
//! Draws some text and clips it to the specified rectangle if wanted.
|
||||
virtual void draw(const core::stringw& text, const core::rect<s32>& position,
|
||||
video::SColor color, bool hcenter=false, bool vcenter=false,
|
||||
const core::rect<s32>* clip=0);
|
||||
|
||||
//! Returns the dimension of a character produced by this font.
|
||||
virtual core::dimension2d<u32> getCharDimension(const wchar_t ch) const;
|
||||
|
||||
//! Returns the dimension of a text string.
|
||||
virtual core::dimension2d<u32> getDimension(const wchar_t* text) const;
|
||||
virtual core::dimension2d<u32> getDimension(const core::ustring& text) const;
|
||||
|
||||
//! Calculates the index of the character in the text which is on a specific position.
|
||||
virtual s32 getCharacterFromPos(const wchar_t* text, s32 pixel_x) const;
|
||||
virtual s32 getCharacterFromPos(const core::ustring& text, s32 pixel_x) const;
|
||||
|
||||
//! Sets global kerning width for the font.
|
||||
virtual void setKerningWidth(s32 kerning);
|
||||
|
||||
//! Sets global kerning height for the font.
|
||||
virtual void setKerningHeight(s32 kerning);
|
||||
|
||||
//! Gets kerning values (distance between letters) for the font. If no parameters are provided,
|
||||
virtual s32 getKerningWidth(const wchar_t* thisLetter=0, const wchar_t* previousLetter=0) const;
|
||||
virtual s32 getKerningWidth(const uchar32_t thisLetter=0, const uchar32_t previousLetter=0) const;
|
||||
|
||||
//! Returns the distance between letters
|
||||
virtual s32 getKerningHeight() const;
|
||||
|
||||
//! Define which characters should not be drawn by the font.
|
||||
virtual void setInvisibleCharacters(const wchar_t *s);
|
||||
virtual void setInvisibleCharacters(const core::ustring& s);
|
||||
|
||||
//! Get the last glyph page if there's still available slots.
|
||||
//! If not, it will return zero.
|
||||
CGUITTGlyphPage* getLastGlyphPage() const;
|
||||
|
||||
//! Create a new glyph page texture.
|
||||
//! \param pixel_mode the pixel mode defined by FT_Pixel_Mode
|
||||
//should be better typed. fix later.
|
||||
CGUITTGlyphPage* createGlyphPage(const u8& pixel_mode);
|
||||
|
||||
//! Get the last glyph page's index.
|
||||
u32 getLastGlyphPageIndex() const { return Glyph_Pages.size() - 1; }
|
||||
|
||||
//! Create corresponding character's software image copy from the font,
|
||||
//! so you can use this data just like any ordinary video::IImage.
|
||||
//! \param ch The character you need
|
||||
virtual video::IImage* createTextureFromChar(const uchar32_t& ch);
|
||||
|
||||
//! This function is for debugging mostly. If the page doesn't exist it returns zero.
|
||||
//! \param page_index Simply return the texture handle of a given page index.
|
||||
virtual video::ITexture* getPageTextureByIndex(const u32& page_index) const;
|
||||
|
||||
//! Add a list of scene nodes generated by putting font textures on the 3D planes.
|
||||
virtual core::array<scene::ISceneNode*> addTextSceneNode
|
||||
(const wchar_t* text, scene::ISceneManager* smgr, scene::ISceneNode* parent = 0,
|
||||
const video::SColor& color = video::SColor(255, 0, 0, 0), bool center = false );
|
||||
|
||||
protected:
|
||||
bool use_monochrome;
|
||||
bool use_transparency;
|
||||
bool use_hinting;
|
||||
bool use_auto_hinting;
|
||||
u32 size;
|
||||
u32 batch_load_size;
|
||||
core::dimension2du max_page_texture_size;
|
||||
|
||||
private:
|
||||
// Manages the FreeType library.
|
||||
static FT_Library c_library;
|
||||
static core::map<io::path, SGUITTFace*> c_faces;
|
||||
static bool c_libraryLoaded;
|
||||
static scene::IMesh* shared_plane_ptr_;
|
||||
static scene::SMesh shared_plane_;
|
||||
|
||||
CGUITTFont(IGUIEnvironment *env);
|
||||
bool load(const io::path& filename, const u32 size, const bool antialias, const bool transparency);
|
||||
void reset_images();
|
||||
void update_glyph_pages() const;
|
||||
void update_load_flags()
|
||||
{
|
||||
// Set up our loading flags.
|
||||
load_flags = FT_LOAD_DEFAULT | FT_LOAD_RENDER;
|
||||
if (!useHinting()) load_flags |= FT_LOAD_NO_HINTING;
|
||||
if (!useAutoHinting()) load_flags |= FT_LOAD_NO_AUTOHINT;
|
||||
if (useMonochrome()) load_flags |= FT_LOAD_MONOCHROME | FT_LOAD_TARGET_MONO | FT_RENDER_MODE_MONO;
|
||||
else load_flags |= FT_LOAD_TARGET_NORMAL;
|
||||
}
|
||||
u32 getWidthFromCharacter(wchar_t c) const;
|
||||
u32 getWidthFromCharacter(uchar32_t c) const;
|
||||
u32 getHeightFromCharacter(wchar_t c) const;
|
||||
u32 getHeightFromCharacter(uchar32_t c) const;
|
||||
u32 getGlyphIndexByChar(wchar_t c) const;
|
||||
u32 getGlyphIndexByChar(uchar32_t c) const;
|
||||
core::vector2di getKerning(const wchar_t thisLetter, const wchar_t previousLetter) const;
|
||||
core::vector2di getKerning(const uchar32_t thisLetter, const uchar32_t previousLetter) const;
|
||||
core::dimension2d<u32> getDimensionUntilEndOfLine(const wchar_t* p) const;
|
||||
|
||||
void createSharedPlane();
|
||||
|
||||
irr::IrrlichtDevice* Device;
|
||||
gui::IGUIEnvironment* Environment;
|
||||
video::IVideoDriver* Driver;
|
||||
io::path filename;
|
||||
FT_Face tt_face;
|
||||
FT_Size_Metrics font_metrics;
|
||||
FT_Int32 load_flags;
|
||||
|
||||
mutable core::array<CGUITTGlyphPage*> Glyph_Pages;
|
||||
mutable core::array<SGUITTGlyph> Glyphs;
|
||||
|
||||
s32 GlobalKerningWidth;
|
||||
s32 GlobalKerningHeight;
|
||||
core::ustring Invisible;
|
||||
};
|
||||
|
||||
} // end namespace gui
|
||||
} // end namespace irr
|
||||
|
||||
#endif // __C_GUI_TTFONT_H_INCLUDED__
|
||||
17
src/cguittfont/CMakeLists.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
include_directories(
|
||||
${IRRLICHT_INCLUDE_DIR}
|
||||
${FREETYPE_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# CGUITTFont authors, y u no include headers you use?
|
||||
# Do not add CGUITTFont.cpp to the line below.
|
||||
# xCGUITTFont.cpp is a wrapper file that includes
|
||||
# additional required headers.
|
||||
add_library(cguittfont xCGUITTFont.cpp)
|
||||
|
||||
target_link_libraries(
|
||||
cguittfont
|
||||
${IRRLICHT_LIBRARY}
|
||||
${FREETYPE_LIBRARY}
|
||||
${ZLIB_LIBRARIES} # needed by freetype, repeated here for safety
|
||||
)
|
||||
3877
src/cguittfont/irrUString.h
Normal file
5
src/cguittfont/xCGUITTFont.cpp
Normal file
@@ -0,0 +1,5 @@
|
||||
// A wrapper source file to avoid hack with gcc and modifying
|
||||
// the CGUITTFont files.
|
||||
|
||||
#include "xCGUITTFont.h"
|
||||
#include "CGUITTFont.cpp"
|
||||
7
src/cguittfont/xCGUITTFont.h
Normal file
@@ -0,0 +1,7 @@
|
||||
// A wrapper header to avoid hack with gcc and modifying
|
||||
// the CGUITTFont files.
|
||||
|
||||
#include <algorithm>
|
||||
#include <stddef.h>
|
||||
#include "irrUString.h"
|
||||
#include "CGUITTFont.h"
|
||||
35
src/chat.cpp
@@ -1,28 +1,29 @@
|
||||
/*
|
||||
Minetest-c55
|
||||
Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Minetest
|
||||
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
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 General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
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.
|
||||
*/
|
||||
|
||||
#include "chat.h"
|
||||
#include "debug.h"
|
||||
#include "utility.h"
|
||||
#include <cassert>
|
||||
#include <cctype>
|
||||
#include <sstream>
|
||||
#include "util/string.h"
|
||||
#include "util/numeric.h"
|
||||
|
||||
ChatBuffer::ChatBuffer(u32 scrollback):
|
||||
m_scrollback(scrollback),
|
||||
@@ -116,8 +117,8 @@ void ChatBuffer::deleteOldest(u32 count)
|
||||
--count;
|
||||
}
|
||||
|
||||
m_unformatted.erase(0, del_unformatted);
|
||||
m_formatted.erase(0, del_formatted);
|
||||
m_unformatted.erase(m_unformatted.begin(), m_unformatted.begin() + del_unformatted);
|
||||
m_formatted.erase(m_formatted.begin(), m_formatted.begin() + del_formatted);
|
||||
}
|
||||
|
||||
void ChatBuffer::deleteByAge(f32 maxAge)
|
||||
@@ -231,10 +232,10 @@ void ChatBuffer::scrollTop()
|
||||
}
|
||||
|
||||
u32 ChatBuffer::formatChatLine(const ChatLine& line, u32 cols,
|
||||
core::array<ChatFormattedLine>& destination) const
|
||||
std::vector<ChatFormattedLine>& destination) const
|
||||
{
|
||||
u32 num_added = 0;
|
||||
core::array<ChatFormattedFragment> next_frags;
|
||||
std::vector<ChatFormattedFragment> next_frags;
|
||||
ChatFormattedLine next_line;
|
||||
ChatFormattedFragment temp_frag;
|
||||
u32 out_column = 0;
|
||||
@@ -291,7 +292,7 @@ u32 ChatBuffer::formatChatLine(const ChatLine& line, u32 cols,
|
||||
frag.column = out_column;
|
||||
next_line.fragments.push_back(frag);
|
||||
out_column += frag.text.size();
|
||||
next_frags.erase(0, 1);
|
||||
next_frags.erase(next_frags.begin());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -413,7 +414,7 @@ std::wstring ChatPrompt::submit()
|
||||
if (!line.empty())
|
||||
m_history.push_back(line);
|
||||
if (m_history.size() > m_history_limit)
|
||||
m_history.erase(0);
|
||||
m_history.erase(m_history.begin());
|
||||
m_history_index = m_history.size();
|
||||
m_view = 0;
|
||||
m_cursor = 0;
|
||||
@@ -463,7 +464,7 @@ void ChatPrompt::historyNext()
|
||||
}
|
||||
}
|
||||
|
||||
void ChatPrompt::nickCompletion(const core::list<std::wstring>& names, bool backwards)
|
||||
void ChatPrompt::nickCompletion(const std::list<std::wstring>& names, bool backwards)
|
||||
{
|
||||
// Two cases:
|
||||
// (a) m_nick_completion_start == m_nick_completion_end == 0
|
||||
@@ -491,10 +492,10 @@ void ChatPrompt::nickCompletion(const core::list<std::wstring>& names, bool back
|
||||
std::wstring prefix = m_line.substr(prefix_start, prefix_end - prefix_start);
|
||||
|
||||
// find all names that start with the selected prefix
|
||||
core::array<std::wstring> completions;
|
||||
for (core::list<std::wstring>::ConstIterator
|
||||
std::vector<std::wstring> completions;
|
||||
for (std::list<std::wstring>::const_iterator
|
||||
i = names.begin();
|
||||
i != names.end(); i++)
|
||||
i != names.end(); ++i)
|
||||
{
|
||||
if (str_starts_with(*i, prefix, true))
|
||||
{
|
||||
|
||||
28
src/chat.h
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
Minetest-c55
|
||||
Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Minetest
|
||||
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
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 General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
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.
|
||||
*/
|
||||
@@ -20,8 +20,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#ifndef CHAT_HEADER
|
||||
#define CHAT_HEADER
|
||||
|
||||
#include "common_irrlicht.h"
|
||||
#include "irrlichttypes_bloated.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <list>
|
||||
|
||||
// Chat console related classes, only used by the client
|
||||
|
||||
@@ -55,7 +57,7 @@ struct ChatFormattedFragment
|
||||
struct ChatFormattedLine
|
||||
{
|
||||
// Array of text fragments
|
||||
core::array<ChatFormattedFragment> fragments;
|
||||
std::vector<ChatFormattedFragment> fragments;
|
||||
// true if first line of one formatted ChatLine
|
||||
bool first;
|
||||
};
|
||||
@@ -110,7 +112,7 @@ class ChatBuffer
|
||||
// Appends the formatted lines to the destination array and
|
||||
// returns the number of formatted lines.
|
||||
u32 formatChatLine(const ChatLine& line, u32 cols,
|
||||
core::array<ChatFormattedLine>& destination) const;
|
||||
std::vector<ChatFormattedLine>& destination) const;
|
||||
|
||||
protected:
|
||||
s32 getTopScrollPos() const;
|
||||
@@ -120,7 +122,7 @@ class ChatBuffer
|
||||
// Scrollback size
|
||||
u32 m_scrollback;
|
||||
// Array of unformatted chat lines
|
||||
core::array<ChatLine> m_unformatted;
|
||||
std::vector<ChatLine> m_unformatted;
|
||||
|
||||
// Number of character columns in console
|
||||
u32 m_cols;
|
||||
@@ -129,7 +131,7 @@ class ChatBuffer
|
||||
// Scroll position (console's top line index into m_formatted)
|
||||
s32 m_scroll;
|
||||
// Array of formatted lines
|
||||
core::array<ChatFormattedLine> m_formatted;
|
||||
std::vector<ChatFormattedLine> m_formatted;
|
||||
// Empty formatted line, for error returns
|
||||
ChatFormattedLine m_empty_formatted_line;
|
||||
};
|
||||
@@ -158,7 +160,7 @@ class ChatPrompt
|
||||
void historyNext();
|
||||
|
||||
// Nick completion
|
||||
void nickCompletion(const core::list<std::wstring>& names, bool backwards);
|
||||
void nickCompletion(const std::list<std::wstring>& names, bool backwards);
|
||||
|
||||
// Update console size and reformat the visible portion of the prompt
|
||||
void reformat(u32 cols);
|
||||
@@ -209,7 +211,7 @@ class ChatPrompt
|
||||
// Currently edited line
|
||||
std::wstring m_line;
|
||||
// History buffer
|
||||
core::array<std::wstring> m_history;
|
||||
std::vector<std::wstring> m_history;
|
||||
// History index (0 <= m_history_index <= m_history.size())
|
||||
u32 m_history_index;
|
||||
// Maximum number of history entries
|
||||
|
||||
602
src/client.cpp
@@ -1,24 +1,23 @@
|
||||
/*
|
||||
Minetest-c55
|
||||
Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Minetest
|
||||
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
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 General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
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.
|
||||
*/
|
||||
|
||||
#include "client.h"
|
||||
#include "utility.h"
|
||||
#include <iostream>
|
||||
#include "clientserver.h"
|
||||
#include "jmutexautolock.h"
|
||||
@@ -34,29 +33,28 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "nodemetadata.h"
|
||||
#include "nodedef.h"
|
||||
#include "itemdef.h"
|
||||
#include "shader.h"
|
||||
#include <IFileSystem.h>
|
||||
#include "sha1.h"
|
||||
#include "base64.h"
|
||||
#include "clientmap.h"
|
||||
#include "filecache.h"
|
||||
#include "sound.h"
|
||||
#include "utility_string.h"
|
||||
#include "util/string.h"
|
||||
#include "hex.h"
|
||||
#include "IMeshCache.h"
|
||||
#include "util/serialize.h"
|
||||
#include "config.h"
|
||||
|
||||
#if USE_CURL
|
||||
#include <curl/curl.h>
|
||||
#endif
|
||||
|
||||
static std::string getMediaCacheDir()
|
||||
{
|
||||
return porting::path_user + DIR_DELIM + "cache" + DIR_DELIM + "media";
|
||||
}
|
||||
|
||||
struct MediaRequest
|
||||
{
|
||||
std::string name;
|
||||
|
||||
MediaRequest(const std::string &name_=""):
|
||||
name(name_)
|
||||
{}
|
||||
};
|
||||
|
||||
/*
|
||||
QueuedMeshUpdate
|
||||
*/
|
||||
@@ -221,18 +219,60 @@ void * MeshUpdateThread::Thread()
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void * MediaFetchThread::Thread()
|
||||
{
|
||||
ThreadStarted();
|
||||
|
||||
log_register_thread("MediaFetchThread");
|
||||
|
||||
DSTACK(__FUNCTION_NAME);
|
||||
|
||||
BEGIN_DEBUG_EXCEPTION_HANDLER
|
||||
|
||||
#if USE_CURL
|
||||
CURL *curl;
|
||||
CURLcode res;
|
||||
for (std::list<MediaRequest>::iterator i = m_file_requests.begin();
|
||||
i != m_file_requests.end(); ++i) {
|
||||
curl = curl_easy_init();
|
||||
assert(curl);
|
||||
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_URL, (m_remote_url + i->name).c_str());
|
||||
curl_easy_setopt(curl, CURLOPT_FAILONERROR, true);
|
||||
std::ostringstream stream;
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_write_data);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &stream);
|
||||
res = curl_easy_perform(curl);
|
||||
if (res == CURLE_OK) {
|
||||
std::string data = stream.str();
|
||||
m_file_data.push_back(make_pair(i->name, data));
|
||||
} else {
|
||||
m_failed.push_back(*i);
|
||||
infostream << "cURL request failed for " << i->name << std::endl;
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
#endif
|
||||
|
||||
END_DEBUG_EXCEPTION_HANDLER(errorstream)
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Client::Client(
|
||||
IrrlichtDevice *device,
|
||||
const char *playername,
|
||||
std::string password,
|
||||
MapDrawControl &control,
|
||||
IWritableTextureSource *tsrc,
|
||||
IWritableShaderSource *shsrc,
|
||||
IWritableItemDefManager *itemdef,
|
||||
IWritableNodeDefManager *nodedef,
|
||||
ISoundManager *sound,
|
||||
MtEventManager *event
|
||||
):
|
||||
m_tsrc(tsrc),
|
||||
m_shsrc(shsrc),
|
||||
m_itemdef(itemdef),
|
||||
m_nodedef(nodedef),
|
||||
m_sound(sound),
|
||||
@@ -259,13 +299,15 @@ Client::Client(
|
||||
m_password(password),
|
||||
m_access_denied(false),
|
||||
m_media_cache(getMediaCacheDir()),
|
||||
m_media_receive_progress(0),
|
||||
m_media_received(false),
|
||||
m_media_receive_started(false),
|
||||
m_media_count(0),
|
||||
m_media_received_count(0),
|
||||
m_itemdef_received(false),
|
||||
m_nodedef_received(false),
|
||||
m_time_of_day_set(false),
|
||||
m_last_time_of_day_f(-1),
|
||||
m_time_of_day_update_timer(0),
|
||||
m_recommended_send_interval(0.1),
|
||||
m_removed_sounds_check_timer(0)
|
||||
{
|
||||
m_packetcounter_timer = 0.0;
|
||||
@@ -291,6 +333,9 @@ Client::Client(
|
||||
|
||||
m_env.addPlayer(player);
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < g_settings->getU16("media_fetch_threads"); ++i)
|
||||
m_media_fetch_threads.push_back(new MediaFetchThread(this));
|
||||
}
|
||||
|
||||
Client::~Client()
|
||||
@@ -305,6 +350,19 @@ Client::~Client()
|
||||
sleep_ms(100);
|
||||
|
||||
delete m_inventory_from_server;
|
||||
|
||||
// Delete detached inventories
|
||||
{
|
||||
for(std::map<std::string, Inventory*>::iterator
|
||||
i = m_detached_inventories.begin();
|
||||
i != m_detached_inventories.end(); i++){
|
||||
delete i->second;
|
||||
}
|
||||
}
|
||||
|
||||
for (std::list<MediaFetchThread*>::iterator i = m_media_fetch_threads.begin();
|
||||
i != m_media_fetch_threads.end(); ++i)
|
||||
delete *i;
|
||||
}
|
||||
|
||||
void Client::connect(Address address)
|
||||
@@ -490,8 +548,9 @@ void Client::step(float dtime)
|
||||
// [2] u8 SER_FMT_VER_HIGHEST
|
||||
// [3] u8[20] player_name
|
||||
// [23] u8[28] password (new in some version)
|
||||
// [51] u16 client network protocol version (new in some version)
|
||||
SharedBuffer<u8> data(2+1+PLAYERNAME_SIZE+PASSWORD_SIZE+2);
|
||||
// [51] u16 minimum supported network protocol version (added sometime)
|
||||
// [53] u16 maximum supported network protocol version (added later than the previous one)
|
||||
SharedBuffer<u8> data(2+1+PLAYERNAME_SIZE+PASSWORD_SIZE+2+2);
|
||||
writeU16(&data[0], TOSERVER_INIT);
|
||||
writeU8(&data[2], SER_FMT_VER_HIGHEST);
|
||||
|
||||
@@ -504,8 +563,8 @@ void Client::step(float dtime)
|
||||
memset((char*)&data[23], 0, PASSWORD_SIZE);
|
||||
snprintf((char*)&data[23], PASSWORD_SIZE, "%s", m_password.c_str());
|
||||
|
||||
// This should be incremented in each version
|
||||
writeU16(&data[51], PROTOCOL_VERSION);
|
||||
writeU16(&data[51], CLIENT_PROTOCOL_VERSION_MIN);
|
||||
writeU16(&data[53], CLIENT_PROTOCOL_VERSION_MAX);
|
||||
|
||||
// Send as unreliable
|
||||
Send(0, data, false);
|
||||
@@ -526,7 +585,7 @@ void Client::step(float dtime)
|
||||
if(m_map_timer_and_unload_interval.step(dtime, map_timer_and_unload_dtime))
|
||||
{
|
||||
ScopeProfiler sp(g_profiler, "Client: map timer and unload");
|
||||
core::list<v3s16> deleted_blocks;
|
||||
std::list<v3s16> deleted_blocks;
|
||||
m_env.getMap().timerUpdate(map_timer_and_unload_dtime,
|
||||
g_settings->getFloat("client_unload_unused_data_timeout"),
|
||||
&deleted_blocks);
|
||||
@@ -540,8 +599,8 @@ void Client::step(float dtime)
|
||||
NOTE: This loop is intentionally iterated the way it is.
|
||||
*/
|
||||
|
||||
core::list<v3s16>::Iterator i = deleted_blocks.begin();
|
||||
core::list<v3s16> sendlist;
|
||||
std::list<v3s16>::iterator i = deleted_blocks.begin();
|
||||
std::list<v3s16> sendlist;
|
||||
for(;;)
|
||||
{
|
||||
if(sendlist.size() == 255 || i == deleted_blocks.end())
|
||||
@@ -560,9 +619,9 @@ void Client::step(float dtime)
|
||||
writeU16(&reply[0], TOSERVER_DELETEDBLOCKS);
|
||||
reply[2] = sendlist.size();
|
||||
u32 k = 0;
|
||||
for(core::list<v3s16>::Iterator
|
||||
for(std::list<v3s16>::iterator
|
||||
j = sendlist.begin();
|
||||
j != sendlist.end(); j++)
|
||||
j != sendlist.end(); ++j)
|
||||
{
|
||||
writeV3S16(&reply[2+1+6*k], *j);
|
||||
k++;
|
||||
@@ -576,7 +635,7 @@ void Client::step(float dtime)
|
||||
}
|
||||
|
||||
sendlist.push_back(*i);
|
||||
i++;
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -647,7 +706,7 @@ void Client::step(float dtime)
|
||||
{
|
||||
float &counter = m_playerpos_send_timer;
|
||||
counter += dtime;
|
||||
if(counter >= 0.2)
|
||||
if(counter >= m_recommended_send_interval)
|
||||
{
|
||||
counter = 0.0;
|
||||
sendPlayerPos();
|
||||
@@ -668,7 +727,7 @@ void Client::step(float dtime)
|
||||
<<std::endl;*/
|
||||
|
||||
int num_processed_meshes = 0;
|
||||
while(m_mesh_update_thread.m_queue_out.size() > 0)
|
||||
while(!m_mesh_update_thread.m_queue_out.empty())
|
||||
{
|
||||
num_processed_meshes++;
|
||||
MeshUpdateResult r = m_mesh_update_thread.m_queue_out.pop_front();
|
||||
@@ -715,6 +774,62 @@ void Client::step(float dtime)
|
||||
g_profiler->graphAdd("num_processed_meshes", num_processed_meshes);
|
||||
}
|
||||
|
||||
/*
|
||||
Load fetched media
|
||||
*/
|
||||
if (m_media_receive_started) {
|
||||
bool all_stopped = true;
|
||||
for (std::list<MediaFetchThread*>::iterator thread = m_media_fetch_threads.begin();
|
||||
thread != m_media_fetch_threads.end(); ++thread) {
|
||||
all_stopped &= !(*thread)->IsRunning();
|
||||
while (!(*thread)->m_file_data.empty()) {
|
||||
std::pair <std::string, std::string> out = (*thread)->m_file_data.pop_front();
|
||||
++m_media_received_count;
|
||||
|
||||
bool success = loadMedia(out.second, out.first);
|
||||
if(success){
|
||||
verbosestream<<"Client: Loaded received media: "
|
||||
<<"\""<<out.first<<"\". Caching."<<std::endl;
|
||||
} else{
|
||||
infostream<<"Client: Failed to load received media: "
|
||||
<<"\""<<out.first<<"\". Not caching."<<std::endl;
|
||||
continue;
|
||||
}
|
||||
|
||||
bool did = fs::CreateAllDirs(getMediaCacheDir());
|
||||
if(!did){
|
||||
errorstream<<"Could not create media cache directory"
|
||||
<<std::endl;
|
||||
}
|
||||
|
||||
{
|
||||
std::map<std::string, std::string>::iterator n;
|
||||
n = m_media_name_sha1_map.find(out.first);
|
||||
if(n == m_media_name_sha1_map.end())
|
||||
errorstream<<"The server sent a file that has not "
|
||||
<<"been announced."<<std::endl;
|
||||
else
|
||||
m_media_cache.update_sha1(out.second);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (all_stopped) {
|
||||
std::list<MediaRequest> fetch_failed;
|
||||
for (std::list<MediaFetchThread*>::iterator thread = m_media_fetch_threads.begin();
|
||||
thread != m_media_fetch_threads.end(); ++thread) {
|
||||
for (std::list<MediaRequest>::iterator request = (*thread)->m_failed.begin();
|
||||
request != (*thread)->m_failed.end(); ++request)
|
||||
fetch_failed.push_back(*request);
|
||||
(*thread)->m_failed.clear();
|
||||
}
|
||||
if (fetch_failed.size() > 0) {
|
||||
infostream << "Failed to remote-fetch " << fetch_failed.size() << " files. "
|
||||
<< "Requesting them the usual way." << std::endl;
|
||||
request_media(fetch_failed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
If the server didn't update the inventory in a while, revert
|
||||
the local inventory (so the player notices the lag problem
|
||||
@@ -813,7 +928,7 @@ bool Client::loadMedia(const std::string &data, const std::string &filename)
|
||||
if(name != "")
|
||||
{
|
||||
verbosestream<<"Client: Attempting to load image "
|
||||
<<"file \""<<filename<<"\""<<std::endl;
|
||||
<<"file \""<<filename<<"\""<<std::endl;
|
||||
|
||||
io::IFileSystem *irrfs = m_device->getFileSystem();
|
||||
video::IVideoDriver *vdrv = m_device->getVideoDriver();
|
||||
@@ -847,11 +962,33 @@ bool Client::loadMedia(const std::string &data, const std::string &filename)
|
||||
if(name != "")
|
||||
{
|
||||
verbosestream<<"Client: Attempting to load sound "
|
||||
<<"file \""<<filename<<"\""<<std::endl;
|
||||
<<"file \""<<filename<<"\""<<std::endl;
|
||||
m_sound->loadSoundData(name, data);
|
||||
return true;
|
||||
}
|
||||
|
||||
const char *model_ext[] = {
|
||||
".x", ".b3d", ".md2", ".obj",
|
||||
NULL
|
||||
};
|
||||
name = removeStringEnd(filename, model_ext);
|
||||
if(name != "")
|
||||
{
|
||||
verbosestream<<"Client: Storing model into Irrlicht: "
|
||||
<<"\""<<filename<<"\""<<std::endl;
|
||||
|
||||
io::IFileSystem *irrfs = m_device->getFileSystem();
|
||||
io::IReadFile *rfile = irrfs->createMemoryReadFile(
|
||||
*data_rw, data_rw.getSize(), filename.c_str());
|
||||
assert(rfile);
|
||||
|
||||
scene::ISceneManager *smgr = m_device->getSceneManager();
|
||||
scene::IAnimatedMesh *mesh = smgr->getMesh(rfile);
|
||||
smgr->getMeshCache()->addMesh(filename.c_str(), mesh);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
errorstream<<"Client: Don't know how to load file \""
|
||||
<<filename<<"\""<<std::endl;
|
||||
return false;
|
||||
@@ -870,6 +1007,34 @@ void Client::deletingPeer(con::Peer *peer, bool timeout)
|
||||
<<"(timeout="<<timeout<<")"<<std::endl;
|
||||
}
|
||||
|
||||
/*
|
||||
u16 command
|
||||
u16 number of files requested
|
||||
for each file {
|
||||
u16 length of name
|
||||
string name
|
||||
}
|
||||
*/
|
||||
void Client::request_media(const std::list<MediaRequest> &file_requests)
|
||||
{
|
||||
std::ostringstream os(std::ios_base::binary);
|
||||
writeU16(os, TOSERVER_REQUEST_MEDIA);
|
||||
writeU16(os, file_requests.size());
|
||||
|
||||
for(std::list<MediaRequest>::const_iterator i = file_requests.begin();
|
||||
i != file_requests.end(); ++i) {
|
||||
os<<serializeString(i->name);
|
||||
}
|
||||
|
||||
// Make data buffer
|
||||
std::string s = os.str();
|
||||
SharedBuffer<u8> data((u8*)s.c_str(), s.size());
|
||||
// Send as reliable
|
||||
Send(0, data, true);
|
||||
infostream<<"Client: Sending media request list to server ("
|
||||
<<file_requests.size()<<" files)"<<std::endl;
|
||||
}
|
||||
|
||||
void Client::ReceiveAll()
|
||||
{
|
||||
DSTACK(__FUNCTION_NAME);
|
||||
@@ -989,6 +1154,14 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
|
||||
m_map_seed = readU64(&data[2+1+6]);
|
||||
infostream<<"Client: received map seed: "<<m_map_seed<<std::endl;
|
||||
}
|
||||
|
||||
if(datasize >= 2+1+6+8+4)
|
||||
{
|
||||
// Get map seed
|
||||
m_recommended_send_interval = readF1000(&data[2+1+6+8]);
|
||||
infostream<<"Client: received recommended send interval "
|
||||
<<m_recommended_send_interval<<std::endl;
|
||||
}
|
||||
|
||||
// Reply to server
|
||||
u32 replysize = 2;
|
||||
@@ -1341,6 +1514,26 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(command == TOCLIENT_MOVEMENT)
|
||||
{
|
||||
std::string datastring((char*)&data[2], datasize-2);
|
||||
std::istringstream is(datastring, std::ios_base::binary);
|
||||
Player *player = m_env.getLocalPlayer();
|
||||
assert(player != NULL);
|
||||
|
||||
player->movement_acceleration_default = readF1000(is) * BS;
|
||||
player->movement_acceleration_air = readF1000(is) * BS;
|
||||
player->movement_acceleration_fast = readF1000(is) * BS;
|
||||
player->movement_speed_walk = readF1000(is) * BS;
|
||||
player->movement_speed_crouch = readF1000(is) * BS;
|
||||
player->movement_speed_fast = readF1000(is) * BS;
|
||||
player->movement_speed_climb = readF1000(is) * BS;
|
||||
player->movement_speed_jump = readF1000(is) * BS;
|
||||
player->movement_liquid_fluidity = readF1000(is) * BS;
|
||||
player->movement_liquid_fluidity_smooth = readF1000(is) * BS;
|
||||
player->movement_liquid_sink = readF1000(is) * BS;
|
||||
player->movement_gravity = readF1000(is) * BS;
|
||||
}
|
||||
else if(command == TOCLIENT_HP)
|
||||
{
|
||||
std::string datastring((char*)&data[2], datasize-2);
|
||||
@@ -1426,10 +1619,10 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
|
||||
|
||||
int num_files = readU16(is);
|
||||
|
||||
verbosestream<<"Client received TOCLIENT_ANNOUNCE_MEDIA ("
|
||||
<<num_files<<" files)"<<std::endl;
|
||||
infostream<<"Client: Received media announcement: packet size: "
|
||||
<<datasize<<std::endl;
|
||||
|
||||
core::list<MediaRequest> file_requests;
|
||||
std::list<MediaRequest> file_requests;
|
||||
|
||||
for(int i=0; i<num_files; i++)
|
||||
{
|
||||
@@ -1448,7 +1641,7 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
|
||||
std::string sha1_hex = hex_encode(sha1_raw);
|
||||
std::ostringstream tmp_os(std::ios_base::binary);
|
||||
bool found_in_cache = m_media_cache.load_sha1(sha1_raw, tmp_os);
|
||||
m_media_name_sha1_map.set(name, sha1_raw);
|
||||
m_media_name_sha1_map[name] = sha1_raw;
|
||||
|
||||
// If found in cache, try to load it from there
|
||||
if(found_in_cache)
|
||||
@@ -1469,37 +1662,52 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
|
||||
file_requests.push_back(MediaRequest(name));
|
||||
}
|
||||
|
||||
std::string remote_media = "";
|
||||
try {
|
||||
remote_media = deSerializeString(is);
|
||||
}
|
||||
catch(SerializationError) {
|
||||
// not supported by server or turned off
|
||||
}
|
||||
|
||||
m_media_count = file_requests.size();
|
||||
m_media_receive_started = true;
|
||||
|
||||
if (remote_media == "" || !USE_CURL) {
|
||||
request_media(file_requests);
|
||||
} else {
|
||||
#if USE_CURL
|
||||
std::list<MediaFetchThread*>::iterator cur = m_media_fetch_threads.begin();
|
||||
for(std::list<MediaRequest>::iterator i = file_requests.begin();
|
||||
i != file_requests.end(); ++i) {
|
||||
(*cur)->m_file_requests.push_back(*i);
|
||||
cur++;
|
||||
if (cur == m_media_fetch_threads.end())
|
||||
cur = m_media_fetch_threads.begin();
|
||||
}
|
||||
for (std::list<MediaFetchThread*>::iterator i = m_media_fetch_threads.begin();
|
||||
i != m_media_fetch_threads.end(); ++i) {
|
||||
(*i)->m_remote_url = remote_media;
|
||||
(*i)->Start();
|
||||
}
|
||||
#endif
|
||||
|
||||
// notify server we received everything
|
||||
std::ostringstream os(std::ios_base::binary);
|
||||
writeU16(os, TOSERVER_RECEIVED_MEDIA);
|
||||
std::string s = os.str();
|
||||
SharedBuffer<u8> data((u8*)s.c_str(), s.size());
|
||||
// Send as reliable
|
||||
Send(0, data, true);
|
||||
}
|
||||
ClientEvent event;
|
||||
event.type = CE_TEXTURES_UPDATED;
|
||||
m_client_event_queue.push_back(event);
|
||||
|
||||
/*
|
||||
u16 command
|
||||
u16 number of files requested
|
||||
for each file {
|
||||
u16 length of name
|
||||
string name
|
||||
}
|
||||
*/
|
||||
std::ostringstream os(std::ios_base::binary);
|
||||
writeU16(os, TOSERVER_REQUEST_MEDIA);
|
||||
writeU16(os, file_requests.size());
|
||||
|
||||
for(core::list<MediaRequest>::Iterator i = file_requests.begin();
|
||||
i != file_requests.end(); i++) {
|
||||
os<<serializeString(i->name);
|
||||
}
|
||||
|
||||
// Make data buffer
|
||||
std::string s = os.str();
|
||||
SharedBuffer<u8> data((u8*)s.c_str(), s.size());
|
||||
// Send as reliable
|
||||
Send(0, data, true);
|
||||
infostream<<"Client: Sending media request list to server ("
|
||||
<<file_requests.size()<<" files)"<<std::endl;
|
||||
}
|
||||
else if(command == TOCLIENT_MEDIA)
|
||||
{
|
||||
if (m_media_count == 0)
|
||||
return;
|
||||
std::string datastring((char*)&data[2], datasize-2);
|
||||
std::istringstream is(datastring, std::ios_base::binary);
|
||||
|
||||
@@ -1521,17 +1729,12 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
|
||||
*/
|
||||
int num_bunches = readU16(is);
|
||||
int bunch_i = readU16(is);
|
||||
if(num_bunches >= 2)
|
||||
m_media_receive_progress = (float)bunch_i / (float)(num_bunches - 1);
|
||||
else
|
||||
m_media_receive_progress = 1.0;
|
||||
if(bunch_i == num_bunches - 1)
|
||||
m_media_received = true;
|
||||
int num_files = readU32(is);
|
||||
infostream<<"Client: Received files: bunch "<<bunch_i<<"/"
|
||||
<<num_bunches<<" files="<<num_files
|
||||
<<" size="<<datasize<<std::endl;
|
||||
for(int i=0; i<num_files; i++){
|
||||
m_media_received_count++;
|
||||
std::string name = deSerializeString(is);
|
||||
std::string data = deSerializeLongString(is);
|
||||
|
||||
@@ -1559,9 +1762,9 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
|
||||
}
|
||||
|
||||
{
|
||||
core::map<std::string, std::string>::Node *n;
|
||||
std::map<std::string, std::string>::iterator n;
|
||||
n = m_media_name_sha1_map.find(name);
|
||||
if(n == NULL)
|
||||
if(n == m_media_name_sha1_map.end())
|
||||
errorstream<<"The server sent a file that has not "
|
||||
<<"been announced."<<std::endl;
|
||||
else
|
||||
@@ -1689,6 +1892,133 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
|
||||
}
|
||||
infostream<<std::endl;
|
||||
}
|
||||
else if(command == TOCLIENT_INVENTORY_FORMSPEC)
|
||||
{
|
||||
std::string datastring((char*)&data[2], datasize-2);
|
||||
std::istringstream is(datastring, std::ios_base::binary);
|
||||
|
||||
// Store formspec in LocalPlayer
|
||||
Player *player = m_env.getLocalPlayer();
|
||||
assert(player != NULL);
|
||||
player->inventory_formspec = deSerializeLongString(is);
|
||||
}
|
||||
else if(command == TOCLIENT_DETACHED_INVENTORY)
|
||||
{
|
||||
std::string datastring((char*)&data[2], datasize-2);
|
||||
std::istringstream is(datastring, std::ios_base::binary);
|
||||
|
||||
std::string name = deSerializeString(is);
|
||||
|
||||
infostream<<"Client: Detached inventory update: \""<<name<<"\""<<std::endl;
|
||||
|
||||
Inventory *inv = NULL;
|
||||
if(m_detached_inventories.count(name) > 0)
|
||||
inv = m_detached_inventories[name];
|
||||
else{
|
||||
inv = new Inventory(m_itemdef);
|
||||
m_detached_inventories[name] = inv;
|
||||
}
|
||||
inv->deSerialize(is);
|
||||
}
|
||||
else if(command == TOCLIENT_SHOW_FORMSPEC)
|
||||
{
|
||||
std::string datastring((char*)&data[2], datasize-2);
|
||||
std::istringstream is(datastring, std::ios_base::binary);
|
||||
|
||||
std::string formspec = deSerializeLongString(is);
|
||||
std::string formname = deSerializeString(is);
|
||||
|
||||
ClientEvent event;
|
||||
event.type = CE_SHOW_FORMSPEC;
|
||||
// pointer is required as event is a struct only!
|
||||
// adding a std:string to a struct isn't possible
|
||||
event.show_formspec.formspec = new std::string(formspec);
|
||||
event.show_formspec.formname = new std::string(formname);
|
||||
m_client_event_queue.push_back(event);
|
||||
}
|
||||
else if(command == TOCLIENT_SPAWN_PARTICLE)
|
||||
{
|
||||
std::string datastring((char*)&data[2], datasize-2);
|
||||
std::istringstream is(datastring, std::ios_base::binary);
|
||||
|
||||
v3f pos = readV3F1000(is);
|
||||
v3f vel = readV3F1000(is);
|
||||
v3f acc = readV3F1000(is);
|
||||
float expirationtime = readF1000(is);
|
||||
float size = readF1000(is);
|
||||
bool collisiondetection = readU8(is);
|
||||
std::string texture = deSerializeLongString(is);
|
||||
|
||||
ClientEvent event;
|
||||
event.type = CE_SPAWN_PARTICLE;
|
||||
event.spawn_particle.pos = new v3f (pos);
|
||||
event.spawn_particle.vel = new v3f (vel);
|
||||
event.spawn_particle.acc = new v3f (acc);
|
||||
|
||||
event.spawn_particle.expirationtime = expirationtime;
|
||||
event.spawn_particle.size = size;
|
||||
event.add_particlespawner.collisiondetection =
|
||||
collisiondetection;
|
||||
event.spawn_particle.texture = new std::string(texture);
|
||||
|
||||
m_client_event_queue.push_back(event);
|
||||
}
|
||||
else if(command == TOCLIENT_ADD_PARTICLESPAWNER)
|
||||
{
|
||||
std::string datastring((char*)&data[2], datasize-2);
|
||||
std::istringstream is(datastring, std::ios_base::binary);
|
||||
|
||||
u16 amount = readU16(is);
|
||||
float spawntime = readF1000(is);
|
||||
v3f minpos = readV3F1000(is);
|
||||
v3f maxpos = readV3F1000(is);
|
||||
v3f minvel = readV3F1000(is);
|
||||
v3f maxvel = readV3F1000(is);
|
||||
v3f minacc = readV3F1000(is);
|
||||
v3f maxacc = readV3F1000(is);
|
||||
float minexptime = readF1000(is);
|
||||
float maxexptime = readF1000(is);
|
||||
float minsize = readF1000(is);
|
||||
float maxsize = readF1000(is);
|
||||
bool collisiondetection = readU8(is);
|
||||
std::string texture = deSerializeLongString(is);
|
||||
u32 id = readU32(is);
|
||||
|
||||
ClientEvent event;
|
||||
event.type = CE_ADD_PARTICLESPAWNER;
|
||||
event.add_particlespawner.amount = amount;
|
||||
event.add_particlespawner.spawntime = spawntime;
|
||||
|
||||
event.add_particlespawner.minpos = new v3f (minpos);
|
||||
event.add_particlespawner.maxpos = new v3f (maxpos);
|
||||
event.add_particlespawner.minvel = new v3f (minvel);
|
||||
event.add_particlespawner.maxvel = new v3f (maxvel);
|
||||
event.add_particlespawner.minacc = new v3f (minacc);
|
||||
event.add_particlespawner.maxacc = new v3f (maxacc);
|
||||
|
||||
event.add_particlespawner.minexptime = minexptime;
|
||||
event.add_particlespawner.maxexptime = maxexptime;
|
||||
event.add_particlespawner.minsize = minsize;
|
||||
event.add_particlespawner.maxsize = maxsize;
|
||||
event.add_particlespawner.collisiondetection = collisiondetection;
|
||||
event.add_particlespawner.texture = new std::string(texture);
|
||||
event.add_particlespawner.id = id;
|
||||
|
||||
m_client_event_queue.push_back(event);
|
||||
}
|
||||
else if(command == TOCLIENT_DELETE_PARTICLESPAWNER)
|
||||
{
|
||||
std::string datastring((char*)&data[2], datasize-2);
|
||||
std::istringstream is(datastring, std::ios_base::binary);
|
||||
|
||||
u32 id = readU16(is);
|
||||
|
||||
ClientEvent event;
|
||||
event.type = CE_DELETE_PARTICLESPAWNER;
|
||||
event.delete_particlespawner.id = id;
|
||||
|
||||
m_client_event_queue.push_back(event);
|
||||
}
|
||||
else
|
||||
{
|
||||
infostream<<"Client: Ignoring unknown command "
|
||||
@@ -1764,6 +2094,29 @@ void Client::sendNodemetaFields(v3s16 p, const std::string &formname,
|
||||
Send(0, data, true);
|
||||
}
|
||||
|
||||
void Client::sendInventoryFields(const std::string &formname,
|
||||
const std::map<std::string, std::string> &fields)
|
||||
{
|
||||
std::ostringstream os(std::ios_base::binary);
|
||||
|
||||
writeU16(os, TOSERVER_INVENTORY_FIELDS);
|
||||
os<<serializeString(formname);
|
||||
writeU16(os, fields.size());
|
||||
for(std::map<std::string, std::string>::const_iterator
|
||||
i = fields.begin(); i != fields.end(); i++){
|
||||
const std::string &name = i->first;
|
||||
const std::string &value = i->second;
|
||||
os<<serializeString(name);
|
||||
os<<serializeLongString(value);
|
||||
}
|
||||
|
||||
// Make data buffer
|
||||
std::string s = os.str();
|
||||
SharedBuffer<u8> data((u8*)s.c_str(), s.size());
|
||||
// Send as reliable
|
||||
Send(0, data, true);
|
||||
}
|
||||
|
||||
void Client::sendInventoryAction(InventoryAction *a)
|
||||
{
|
||||
std::ostringstream os(std::ios_base::binary);
|
||||
@@ -1880,10 +2233,24 @@ void Client::sendPlayerPos()
|
||||
{
|
||||
//JMutexAutoLock envlock(m_env_mutex); //bulk comment-out
|
||||
|
||||
Player *myplayer = m_env.getLocalPlayer();
|
||||
LocalPlayer *myplayer = m_env.getLocalPlayer();
|
||||
if(myplayer == NULL)
|
||||
return;
|
||||
|
||||
|
||||
// Save bandwidth by only updating position when something changed
|
||||
if(myplayer->last_position == myplayer->getPosition() &&
|
||||
myplayer->last_speed == myplayer->getSpeed() &&
|
||||
myplayer->last_pitch == myplayer->getPitch() &&
|
||||
myplayer->last_yaw == myplayer->getYaw() &&
|
||||
myplayer->last_keyPressed == myplayer->keyPressed)
|
||||
return;
|
||||
|
||||
myplayer->last_position = myplayer->getPosition();
|
||||
myplayer->last_speed = myplayer->getSpeed();
|
||||
myplayer->last_pitch = myplayer->getPitch();
|
||||
myplayer->last_yaw = myplayer->getYaw();
|
||||
myplayer->last_keyPressed = myplayer->keyPressed;
|
||||
|
||||
u16 our_peer_id;
|
||||
{
|
||||
//JMutexAutoLock lock(m_con_mutex); //bulk comment-out
|
||||
@@ -1902,7 +2269,7 @@ void Client::sendPlayerPos()
|
||||
v3s32 speed(sf.X*100, sf.Y*100, sf.Z*100);
|
||||
s32 pitch = myplayer->getPitch() * 100;
|
||||
s32 yaw = myplayer->getYaw() * 100;
|
||||
|
||||
u32 keyPressed=myplayer->keyPressed;
|
||||
/*
|
||||
Format:
|
||||
[0] u16 command
|
||||
@@ -1910,15 +2277,15 @@ void Client::sendPlayerPos()
|
||||
[2+12] v3s32 speed*100
|
||||
[2+12+12] s32 pitch*100
|
||||
[2+12+12+4] s32 yaw*100
|
||||
[2+12+12+4+4] u32 keyPressed
|
||||
*/
|
||||
|
||||
SharedBuffer<u8> data(2+12+12+4+4);
|
||||
SharedBuffer<u8> data(2+12+12+4+4+4);
|
||||
writeU16(&data[0], TOSERVER_PLAYERPOS);
|
||||
writeV3S32(&data[2], position);
|
||||
writeV3S32(&data[2+12], speed);
|
||||
writeS32(&data[2+12+12], pitch);
|
||||
writeS32(&data[2+12+12+4], yaw);
|
||||
|
||||
writeS32(&data[2+12+12+4], yaw);
|
||||
writeU32(&data[2+12+12+4+4], keyPressed);
|
||||
// Send as unreliable
|
||||
Send(0, data, false);
|
||||
}
|
||||
@@ -1947,7 +2314,7 @@ void Client::sendPlayerItem(u16 item)
|
||||
|
||||
void Client::removeNode(v3s16 p)
|
||||
{
|
||||
core::map<v3s16, MapBlock*> modified_blocks;
|
||||
std::map<v3s16, MapBlock*> modified_blocks;
|
||||
|
||||
try
|
||||
{
|
||||
@@ -1961,12 +2328,11 @@ void Client::removeNode(v3s16 p)
|
||||
// add urgent task to update the modified node
|
||||
addUpdateMeshTaskForNode(p, false, true);
|
||||
|
||||
for(core::map<v3s16, MapBlock * >::Iterator
|
||||
i = modified_blocks.getIterator();
|
||||
i.atEnd() == false; i++)
|
||||
for(std::map<v3s16, MapBlock * >::iterator
|
||||
i = modified_blocks.begin();
|
||||
i != modified_blocks.end(); ++i)
|
||||
{
|
||||
v3s16 p = i.getNode()->getKey();
|
||||
addUpdateMeshTaskWithEdge(p);
|
||||
addUpdateMeshTaskWithEdge(i->first);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1974,7 +2340,7 @@ void Client::addNode(v3s16 p, MapNode n)
|
||||
{
|
||||
TimeTaker timer1("Client::addNode()");
|
||||
|
||||
core::map<v3s16, MapBlock*> modified_blocks;
|
||||
std::map<v3s16, MapBlock*> modified_blocks;
|
||||
|
||||
try
|
||||
{
|
||||
@@ -1984,12 +2350,11 @@ void Client::addNode(v3s16 p, MapNode n)
|
||||
catch(InvalidPositionException &e)
|
||||
{}
|
||||
|
||||
for(core::map<v3s16, MapBlock * >::Iterator
|
||||
i = modified_blocks.getIterator();
|
||||
i.atEnd() == false; i++)
|
||||
for(std::map<v3s16, MapBlock * >::iterator
|
||||
i = modified_blocks.begin();
|
||||
i != modified_blocks.end(); ++i)
|
||||
{
|
||||
v3s16 p = i.getNode()->getKey();
|
||||
addUpdateMeshTaskWithEdge(p);
|
||||
addUpdateMeshTaskWithEdge(i->first);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2058,6 +2423,13 @@ Inventory* Client::getInventory(const InventoryLocation &loc)
|
||||
return meta->getInventory();
|
||||
}
|
||||
break;
|
||||
case InventoryLocation::DETACHED:
|
||||
{
|
||||
if(m_detached_inventories.count(loc.name) == 0)
|
||||
return NULL;
|
||||
return m_detached_inventories[loc.name];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
@@ -2082,7 +2454,7 @@ ClientActiveObject * Client::getSelectedActiveObject(
|
||||
core::line3d<f32> shootline_on_map
|
||||
)
|
||||
{
|
||||
core::array<DistanceSortedActiveObject> objects;
|
||||
std::vector<DistanceSortedActiveObject> objects;
|
||||
|
||||
m_env.getActiveObjects(from_pos_f_on_map, max_d, objects);
|
||||
|
||||
@@ -2090,7 +2462,7 @@ ClientActiveObject * Client::getSelectedActiveObject(
|
||||
|
||||
// Sort them.
|
||||
// After this, the closest object is the first in the array.
|
||||
objects.sort();
|
||||
std::sort(objects.begin(), objects.end());
|
||||
|
||||
for(u32 i=0; i<objects.size(); i++)
|
||||
{
|
||||
@@ -2129,13 +2501,13 @@ void Client::printDebugInfo(std::ostream &os)
|
||||
<<std::endl;*/
|
||||
}
|
||||
|
||||
core::list<std::wstring> Client::getConnectedPlayerNames()
|
||||
std::list<std::wstring> Client::getConnectedPlayerNames()
|
||||
{
|
||||
core::list<Player*> players = m_env.getPlayers(true);
|
||||
core::list<std::wstring> playerNames;
|
||||
for(core::list<Player*>::Iterator
|
||||
std::list<Player*> players = m_env.getPlayers(true);
|
||||
std::list<std::wstring> playerNames;
|
||||
for(std::list<Player*>::iterator
|
||||
i = players.begin();
|
||||
i != players.end(); i++)
|
||||
i != players.end(); ++i)
|
||||
{
|
||||
Player *player = *i;
|
||||
playerNames.push_back(narrow_to_wide(player->getName()));
|
||||
@@ -2338,41 +2710,53 @@ ClientEvent Client::getClientEvent()
|
||||
|
||||
void Client::afterContentReceived()
|
||||
{
|
||||
verbosestream<<"Client::afterContentReceived() started"<<std::endl;
|
||||
infostream<<"Client::afterContentReceived() started"<<std::endl;
|
||||
assert(m_itemdef_received);
|
||||
assert(m_nodedef_received);
|
||||
assert(m_media_received);
|
||||
assert(texturesReceived());
|
||||
|
||||
// remove the information about which checksum each texture
|
||||
// ought to have
|
||||
m_media_name_sha1_map.clear();
|
||||
|
||||
// Rebuild inherited images and recreate textures
|
||||
verbosestream<<"Rebuilding images and textures"<<std::endl;
|
||||
infostream<<"- Rebuilding images and textures"<<std::endl;
|
||||
m_tsrc->rebuildImagesAndTextures();
|
||||
|
||||
// Update texture atlas
|
||||
verbosestream<<"Updating texture atlas"<<std::endl;
|
||||
infostream<<"- Updating texture atlas"<<std::endl;
|
||||
if(g_settings->getBool("enable_texture_atlas"))
|
||||
m_tsrc->buildMainAtlas(this);
|
||||
|
||||
// Rebuild shaders
|
||||
m_shsrc->rebuildShaders();
|
||||
|
||||
// Update node aliases
|
||||
verbosestream<<"Updating node aliases"<<std::endl;
|
||||
infostream<<"- Updating node aliases"<<std::endl;
|
||||
m_nodedef->updateAliases(m_itemdef);
|
||||
|
||||
// Update node textures
|
||||
verbosestream<<"Updating node textures"<<std::endl;
|
||||
infostream<<"- Updating node textures"<<std::endl;
|
||||
m_nodedef->updateTextures(m_tsrc);
|
||||
|
||||
// Update item textures and meshes
|
||||
verbosestream<<"Updating item textures and meshes"<<std::endl;
|
||||
m_itemdef->updateTexturesAndMeshes(this);
|
||||
// Preload item textures and meshes if configured to
|
||||
if(g_settings->getBool("preload_item_visuals"))
|
||||
{
|
||||
verbosestream<<"Updating item textures and meshes"<<std::endl;
|
||||
std::set<std::string> names = m_itemdef->getAll();
|
||||
for(std::set<std::string>::const_iterator
|
||||
i = names.begin(); i != names.end(); ++i){
|
||||
// Asking for these caches the result
|
||||
m_itemdef->getInventoryTexture(*i, this);
|
||||
m_itemdef->getWieldMesh(*i, this);
|
||||
}
|
||||
}
|
||||
|
||||
// Start mesh update thread after setting up content definitions
|
||||
verbosestream<<"Starting mesh update thread"<<std::endl;
|
||||
infostream<<"- Starting mesh update thread"<<std::endl;
|
||||
m_mesh_update_thread.Start();
|
||||
|
||||
verbosestream<<"Client::afterContentReceived() done"<<std::endl;
|
||||
infostream<<"Client::afterContentReceived() done"<<std::endl;
|
||||
}
|
||||
|
||||
float Client::getRTT(void)
|
||||
@@ -2403,6 +2787,10 @@ ITextureSource* Client::getTextureSource()
|
||||
{
|
||||
return m_tsrc;
|
||||
}
|
||||
IShaderSource* Client::getShaderSource()
|
||||
{
|
||||
return m_shsrc;
|
||||
}
|
||||
u16 Client::allocateUnknownNodeId(const std::string &name)
|
||||
{
|
||||
errorstream<<"Client::allocateUnknownNodeId(): "
|
||||
|
||||
112
src/client.h
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
Minetest-c55
|
||||
Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Minetest
|
||||
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
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 General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
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.
|
||||
*/
|
||||
@@ -22,23 +22,27 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
|
||||
#include "connection.h"
|
||||
#include "environment.h"
|
||||
#include "common_irrlicht.h"
|
||||
#include "irrlichttypes_extrabloated.h"
|
||||
#include "jmutex.h"
|
||||
#include <ostream>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
#include "clientobject.h"
|
||||
#include "utility.h" // For IntervalLimiter
|
||||
#include "gamedef.h"
|
||||
#include "inventorymanager.h"
|
||||
#include "filesys.h"
|
||||
#include "filecache.h"
|
||||
#include "localplayer.h"
|
||||
#include "server.h"
|
||||
#include "particles.h"
|
||||
#include "util/pointedthing.h"
|
||||
#include <algorithm>
|
||||
|
||||
struct MeshMakeData;
|
||||
class MapBlockMesh;
|
||||
class IGameDef;
|
||||
class IWritableTextureSource;
|
||||
class IWritableShaderSource;
|
||||
class IWritableItemDefManager;
|
||||
class IWritableNodeDefManager;
|
||||
//class IWritableCraftDefManager;
|
||||
@@ -128,13 +132,35 @@ class MeshUpdateThread : public SimpleThread
|
||||
IGameDef *m_gamedef;
|
||||
};
|
||||
|
||||
class MediaFetchThread : public SimpleThread
|
||||
{
|
||||
public:
|
||||
|
||||
MediaFetchThread(IGameDef *gamedef):
|
||||
m_gamedef(gamedef)
|
||||
{
|
||||
}
|
||||
|
||||
void * Thread();
|
||||
|
||||
std::list<MediaRequest> m_file_requests;
|
||||
MutexedQueue<std::pair<std::string, std::string> > m_file_data;
|
||||
std::list<MediaRequest> m_failed;
|
||||
std::string m_remote_url;
|
||||
IGameDef *m_gamedef;
|
||||
};
|
||||
|
||||
enum ClientEventType
|
||||
{
|
||||
CE_NONE,
|
||||
CE_PLAYER_DAMAGE,
|
||||
CE_PLAYER_FORCE_MOVE,
|
||||
CE_DEATHSCREEN,
|
||||
CE_TEXTURES_UPDATED
|
||||
CE_TEXTURES_UPDATED,
|
||||
CE_SHOW_FORMSPEC,
|
||||
CE_SPAWN_PARTICLE,
|
||||
CE_ADD_PARTICLESPAWNER,
|
||||
CE_DELETE_PARTICLESPAWNER
|
||||
};
|
||||
|
||||
struct ClientEvent
|
||||
@@ -156,8 +182,41 @@ struct ClientEvent
|
||||
f32 camera_point_target_y;
|
||||
f32 camera_point_target_z;
|
||||
} deathscreen;
|
||||
struct{
|
||||
std::string* formspec;
|
||||
std::string* formname;
|
||||
} show_formspec;
|
||||
struct{
|
||||
} textures_updated;
|
||||
struct{
|
||||
v3f *pos;
|
||||
v3f *vel;
|
||||
v3f *acc;
|
||||
f32 expirationtime;
|
||||
f32 size;
|
||||
bool collisiondetection;
|
||||
std::string *texture;
|
||||
} spawn_particle;
|
||||
struct{
|
||||
u16 amount;
|
||||
f32 spawntime;
|
||||
v3f *minpos;
|
||||
v3f *maxpos;
|
||||
v3f *minvel;
|
||||
v3f *maxvel;
|
||||
v3f *minacc;
|
||||
v3f *maxacc;
|
||||
f32 minexptime;
|
||||
f32 maxexptime;
|
||||
f32 minsize;
|
||||
f32 maxsize;
|
||||
bool collisiondetection;
|
||||
std::string *texture;
|
||||
u32 id;
|
||||
} add_particlespawner;
|
||||
struct{
|
||||
u32 id;
|
||||
} delete_particlespawner;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -174,6 +233,7 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
|
||||
std::string password,
|
||||
MapDrawControl &control,
|
||||
IWritableTextureSource *tsrc,
|
||||
IWritableShaderSource *shsrc,
|
||||
IWritableItemDefManager *itemdef,
|
||||
IWritableNodeDefManager *nodedef,
|
||||
ISoundManager *sound,
|
||||
@@ -212,6 +272,8 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
|
||||
|
||||
void sendNodemetaFields(v3s16 p, const std::string &formname,
|
||||
const std::map<std::string, std::string> &fields);
|
||||
void sendInventoryFields(const std::string &formname,
|
||||
const std::map<std::string, std::string> &fields);
|
||||
void sendInventoryAction(InventoryAction *a);
|
||||
void sendChatMessage(const std::wstring &message);
|
||||
void sendChangePassword(const std::wstring oldpassword,
|
||||
@@ -253,7 +315,7 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
|
||||
// Prints a line or two of info
|
||||
void printDebugInfo(std::ostream &os);
|
||||
|
||||
core::list<std::wstring> getConnectedPlayerNames();
|
||||
std::list<std::wstring> getConnectedPlayerNames();
|
||||
|
||||
float getAnimationTime();
|
||||
|
||||
@@ -285,10 +347,13 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
|
||||
{ return m_access_denied_reason; }
|
||||
|
||||
float mediaReceiveProgress()
|
||||
{ return m_media_receive_progress; }
|
||||
{
|
||||
if (!m_media_receive_started) return 0;
|
||||
return 1.0 * m_media_received_count / m_media_count;
|
||||
}
|
||||
|
||||
bool texturesReceived()
|
||||
{ return m_media_received; }
|
||||
{ return m_media_receive_started && m_media_received_count == m_media_count; }
|
||||
bool itemdefReceived()
|
||||
{ return m_itemdef_received; }
|
||||
bool nodedefReceived()
|
||||
@@ -303,6 +368,7 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
|
||||
virtual INodeDefManager* getNodeDefManager();
|
||||
virtual ICraftDefManager* getCraftDefManager();
|
||||
virtual ITextureSource* getTextureSource();
|
||||
virtual IShaderSource* getShaderSource();
|
||||
virtual u16 allocateUnknownNodeId(const std::string &name);
|
||||
virtual ISoundManager* getSoundManager();
|
||||
virtual MtEventManager* getEventManager();
|
||||
@@ -313,7 +379,9 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
|
||||
|
||||
// Insert a media file appropriately into the appropriate manager
|
||||
bool loadMedia(const std::string &data, const std::string &filename);
|
||||
|
||||
|
||||
void request_media(const std::list<MediaRequest> &file_requests);
|
||||
|
||||
// Virtual methods from con::PeerHandler
|
||||
void peerAdded(con::Peer *peer);
|
||||
void deletingPeer(con::Peer *peer, bool timeout);
|
||||
@@ -335,12 +403,14 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
|
||||
IntervalLimiter m_map_timer_and_unload_interval;
|
||||
|
||||
IWritableTextureSource *m_tsrc;
|
||||
IWritableShaderSource *m_shsrc;
|
||||
IWritableItemDefManager *m_itemdef;
|
||||
IWritableNodeDefManager *m_nodedef;
|
||||
ISoundManager *m_sound;
|
||||
MtEventManager *m_event;
|
||||
|
||||
MeshUpdateThread m_mesh_update_thread;
|
||||
std::list<MediaFetchThread*> m_media_fetch_threads;
|
||||
ClientEnvironment m_env;
|
||||
con::Connection m_con;
|
||||
IrrlichtDevice *m_device;
|
||||
@@ -350,7 +420,7 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
|
||||
bool m_inventory_updated;
|
||||
Inventory *m_inventory_from_server;
|
||||
float m_inventory_from_server_age;
|
||||
core::map<v3s16, bool> m_active_blocks;
|
||||
std::set<v3s16> m_active_blocks;
|
||||
PacketCounter m_packetcounter;
|
||||
// Block mesh animation parameters
|
||||
float m_animation_time;
|
||||
@@ -368,9 +438,10 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
|
||||
Queue<ClientEvent> m_client_event_queue;
|
||||
FileCache m_media_cache;
|
||||
// Mapping from media file name to SHA1 checksum
|
||||
core::map<std::string, std::string> m_media_name_sha1_map;
|
||||
float m_media_receive_progress;
|
||||
bool m_media_received;
|
||||
std::map<std::string, std::string> m_media_name_sha1_map;
|
||||
bool m_media_receive_started;
|
||||
u32 m_media_count;
|
||||
u32 m_media_received_count;
|
||||
bool m_itemdef_received;
|
||||
bool m_nodedef_received;
|
||||
friend class FarMesh;
|
||||
@@ -380,6 +451,9 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
|
||||
float m_last_time_of_day_f;
|
||||
float m_time_of_day_update_timer;
|
||||
|
||||
// An interval for generally sending object positions and stuff
|
||||
float m_recommended_send_interval;
|
||||
|
||||
// Sounds
|
||||
float m_removed_sounds_check_timer;
|
||||
// Mapping from server sound ids to our sound ids
|
||||
@@ -391,6 +465,10 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
|
||||
|
||||
// Privileges
|
||||
std::set<std::string> m_privileges;
|
||||
|
||||
// Detached inventories
|
||||
// key = name
|
||||
std::map<std::string, Inventory*> m_detached_inventories;
|
||||
};
|
||||
|
||||
#endif // !CLIENT_HEADER
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
Minetest-c55
|
||||
Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Minetest
|
||||
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
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 General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
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.
|
||||
*/
|
||||
@@ -29,6 +29,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "mapblock.h"
|
||||
#include "profiler.h"
|
||||
#include "settings.h"
|
||||
#include "util/mathconstants.h"
|
||||
#include <algorithm>
|
||||
|
||||
#define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"
|
||||
|
||||
@@ -46,7 +48,7 @@ ClientMap::ClientMap(
|
||||
m_control(control),
|
||||
m_camera_position(0,0,0),
|
||||
m_camera_direction(0,0,1),
|
||||
m_camera_fov(PI)
|
||||
m_camera_fov(M_PI)
|
||||
{
|
||||
m_camera_mutex.Init();
|
||||
assert(m_camera_mutex.IsInitialized());
|
||||
@@ -82,7 +84,7 @@ MapSector * ClientMap::emergeSector(v2s16 p2d)
|
||||
|
||||
{
|
||||
//JMutexAutoLock lock(m_sector_mutex); // Bulk comment-out
|
||||
m_sectors.insert(p2d, sector);
|
||||
m_sectors[p2d] = sector;
|
||||
}
|
||||
|
||||
return sector;
|
||||
@@ -156,43 +158,21 @@ static bool isOccluded(Map *map, v3s16 p0, v3s16 p1, float step, float stepfac,
|
||||
return false;
|
||||
}
|
||||
|
||||
void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
|
||||
void ClientMap::updateDrawList(video::IVideoDriver* driver)
|
||||
{
|
||||
ScopeProfiler sp(g_profiler, "CM::updateDrawList()", SPT_AVG);
|
||||
g_profiler->add("CM::updateDrawList() count", 1);
|
||||
|
||||
INodeDefManager *nodemgr = m_gamedef->ndef();
|
||||
|
||||
//m_dout<<DTIME<<"Rendering map..."<<std::endl;
|
||||
DSTACK(__FUNCTION_NAME);
|
||||
|
||||
bool is_transparent_pass = pass == scene::ESNRP_TRANSPARENT;
|
||||
|
||||
std::string prefix;
|
||||
if(pass == scene::ESNRP_SOLID)
|
||||
prefix = "CM: solid: ";
|
||||
else
|
||||
prefix = "CM: transparent: ";
|
||||
|
||||
/*
|
||||
This is called two times per frame, reset on the non-transparent one
|
||||
*/
|
||||
if(pass == scene::ESNRP_SOLID)
|
||||
for(std::map<v3s16, MapBlock*>::iterator
|
||||
i = m_drawlist.begin();
|
||||
i != m_drawlist.end(); ++i)
|
||||
{
|
||||
m_last_drawn_sectors.clear();
|
||||
MapBlock *block = i->second;
|
||||
block->refDrop();
|
||||
}
|
||||
|
||||
/*
|
||||
Get time for measuring timeout.
|
||||
|
||||
Measuring time is very useful for long delays when the
|
||||
machine is swapping a lot.
|
||||
*/
|
||||
int time1 = time(0);
|
||||
|
||||
/*
|
||||
Get animation parameters
|
||||
*/
|
||||
float animation_time = m_client->getAnimationTime();
|
||||
int crack = m_client->getCrackLevel();
|
||||
u32 daynight_ratio = m_client->getEnv().getDayNightRatio();
|
||||
m_drawlist.clear();
|
||||
|
||||
m_camera_mutex.Lock();
|
||||
v3f camera_position = m_camera_position;
|
||||
@@ -200,17 +180,15 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
|
||||
f32 camera_fov = m_camera_fov;
|
||||
m_camera_mutex.Unlock();
|
||||
|
||||
/*
|
||||
Get all blocks and draw all visible ones
|
||||
*/
|
||||
// Use a higher fov to accomodate faster camera movements.
|
||||
// Blocks are cropped better when they are drawn.
|
||||
// Or maybe they aren't? Well whatever.
|
||||
camera_fov *= 1.2;
|
||||
|
||||
v3s16 cam_pos_nodes = floatToInt(camera_position, BS);
|
||||
|
||||
v3s16 box_nodes_d = m_control.wanted_range * v3s16(1,1,1);
|
||||
|
||||
v3s16 p_nodes_min = cam_pos_nodes - box_nodes_d;
|
||||
v3s16 p_nodes_max = cam_pos_nodes + box_nodes_d;
|
||||
|
||||
// Take a fair amount as we will be dropping more out later
|
||||
// Umm... these additions are a bit strange but they are needed.
|
||||
v3s16 p_blocks_min(
|
||||
@@ -222,13 +200,6 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
|
||||
p_nodes_max.Y / MAP_BLOCKSIZE + 1,
|
||||
p_nodes_max.Z / MAP_BLOCKSIZE + 1);
|
||||
|
||||
u32 vertex_count = 0;
|
||||
u32 meshbuffer_count = 0;
|
||||
|
||||
// For limiting number of mesh animations per frame
|
||||
u32 mesh_animate_count = 0;
|
||||
u32 mesh_animate_count_far = 0;
|
||||
|
||||
// Number of blocks in rendering range
|
||||
u32 blocks_in_range = 0;
|
||||
// Number of blocks occlusion culled
|
||||
@@ -241,24 +212,15 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
|
||||
// Blocks that were drawn and had a mesh
|
||||
u32 blocks_drawn = 0;
|
||||
// Blocks which had a corresponding meshbuffer for this pass
|
||||
u32 blocks_had_pass_meshbuf = 0;
|
||||
//u32 blocks_had_pass_meshbuf = 0;
|
||||
// Blocks from which stuff was actually drawn
|
||||
u32 blocks_without_stuff = 0;
|
||||
|
||||
/*
|
||||
Collect a set of blocks for drawing
|
||||
*/
|
||||
|
||||
core::map<v3s16, MapBlock*> drawset;
|
||||
//u32 blocks_without_stuff = 0;
|
||||
|
||||
for(std::map<v2s16, MapSector*>::iterator
|
||||
si = m_sectors.begin();
|
||||
si != m_sectors.end(); ++si)
|
||||
{
|
||||
ScopeProfiler sp(g_profiler, prefix+"collecting blocks for drawing", SPT_AVG);
|
||||
|
||||
for(core::map<v2s16, MapSector*>::Iterator
|
||||
si = m_sectors.getIterator();
|
||||
si.atEnd() == false; si++)
|
||||
{
|
||||
MapSector *sector = si.getNode()->getValue();
|
||||
MapSector *sector = si->second;
|
||||
v2s16 sp = sector->getPos();
|
||||
|
||||
if(m_control.range_all == false)
|
||||
@@ -270,7 +232,7 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
|
||||
continue;
|
||||
}
|
||||
|
||||
core::list< MapBlock * > sectorblocks;
|
||||
std::list< MapBlock * > sectorblocks;
|
||||
sector->getBlocks(sectorblocks);
|
||||
|
||||
/*
|
||||
@@ -279,7 +241,7 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
|
||||
|
||||
u32 sector_blocks_drawn = 0;
|
||||
|
||||
core::list< MapBlock * >::Iterator i;
|
||||
std::list< MapBlock * >::iterator i;
|
||||
for(i=sectorblocks.begin(); i!=sectorblocks.end(); i++)
|
||||
{
|
||||
MapBlock *block = *i;
|
||||
@@ -379,46 +341,144 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
|
||||
&& d > m_control.wanted_min_range * BS)
|
||||
continue;
|
||||
|
||||
// Mesh animation
|
||||
{
|
||||
//JMutexAutoLock lock(block->mesh_mutex);
|
||||
MapBlockMesh *mapBlockMesh = block->mesh;
|
||||
// Pretty random but this should work somewhat nicely
|
||||
bool faraway = d >= BS*50;
|
||||
//bool faraway = d >= m_control.wanted_range * BS;
|
||||
if(mapBlockMesh->isAnimationForced() ||
|
||||
!faraway ||
|
||||
mesh_animate_count_far < (m_control.range_all ? 200 : 50))
|
||||
{
|
||||
bool animated = mapBlockMesh->animate(
|
||||
faraway,
|
||||
animation_time,
|
||||
crack,
|
||||
daynight_ratio);
|
||||
if(animated)
|
||||
mesh_animate_count++;
|
||||
if(animated && faraway)
|
||||
mesh_animate_count_far++;
|
||||
}
|
||||
else
|
||||
{
|
||||
mapBlockMesh->decreaseAnimationForceTimer();
|
||||
}
|
||||
}
|
||||
|
||||
// Add to set
|
||||
drawset[block->getPos()] = block;
|
||||
|
||||
block->refGrab();
|
||||
m_drawlist[block->getPos()] = block;
|
||||
|
||||
sector_blocks_drawn++;
|
||||
blocks_drawn++;
|
||||
|
||||
} // foreach sectorblocks
|
||||
|
||||
if(sector_blocks_drawn != 0)
|
||||
m_last_drawn_sectors[sp] = true;
|
||||
m_last_drawn_sectors.insert(sp);
|
||||
}
|
||||
} // ScopeProfiler
|
||||
|
||||
m_control.blocks_would_have_drawn = blocks_would_have_drawn;
|
||||
m_control.blocks_drawn = blocks_drawn;
|
||||
|
||||
g_profiler->avg("CM: blocks in range", blocks_in_range);
|
||||
g_profiler->avg("CM: blocks occlusion culled", blocks_occlusion_culled);
|
||||
if(blocks_in_range != 0)
|
||||
g_profiler->avg("CM: blocks in range without mesh (frac)",
|
||||
(float)blocks_in_range_without_mesh/blocks_in_range);
|
||||
g_profiler->avg("CM: blocks drawn", blocks_drawn);
|
||||
g_profiler->avg("CM: wanted max blocks", m_control.wanted_max_blocks);
|
||||
}
|
||||
|
||||
struct MeshBufList
|
||||
{
|
||||
video::SMaterial m;
|
||||
std::list<scene::IMeshBuffer*> bufs;
|
||||
};
|
||||
|
||||
struct MeshBufListList
|
||||
{
|
||||
std::list<MeshBufList> lists;
|
||||
|
||||
void clear()
|
||||
{
|
||||
lists.clear();
|
||||
}
|
||||
|
||||
void add(scene::IMeshBuffer *buf)
|
||||
{
|
||||
for(std::list<MeshBufList>::iterator i = lists.begin();
|
||||
i != lists.end(); ++i){
|
||||
MeshBufList &l = *i;
|
||||
if(l.m == buf->getMaterial()){
|
||||
l.bufs.push_back(buf);
|
||||
return;
|
||||
}
|
||||
}
|
||||
MeshBufList l;
|
||||
l.m = buf->getMaterial();
|
||||
l.bufs.push_back(buf);
|
||||
lists.push_back(l);
|
||||
}
|
||||
};
|
||||
|
||||
void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
|
||||
{
|
||||
DSTACK(__FUNCTION_NAME);
|
||||
|
||||
bool is_transparent_pass = pass == scene::ESNRP_TRANSPARENT;
|
||||
|
||||
std::string prefix;
|
||||
if(pass == scene::ESNRP_SOLID)
|
||||
prefix = "CM: solid: ";
|
||||
else
|
||||
prefix = "CM: transparent: ";
|
||||
|
||||
/*
|
||||
This is called two times per frame, reset on the non-transparent one
|
||||
*/
|
||||
if(pass == scene::ESNRP_SOLID)
|
||||
{
|
||||
m_last_drawn_sectors.clear();
|
||||
}
|
||||
|
||||
bool use_trilinear_filter = g_settings->getBool("trilinear_filter");
|
||||
bool use_bilinear_filter = g_settings->getBool("bilinear_filter");
|
||||
bool use_anisotropic_filter = g_settings->getBool("anisotropic_filter");
|
||||
|
||||
/*
|
||||
Get time for measuring timeout.
|
||||
|
||||
Measuring time is very useful for long delays when the
|
||||
machine is swapping a lot.
|
||||
*/
|
||||
int time1 = time(0);
|
||||
|
||||
/*
|
||||
Get animation parameters
|
||||
*/
|
||||
float animation_time = m_client->getAnimationTime();
|
||||
int crack = m_client->getCrackLevel();
|
||||
u32 daynight_ratio = m_client->getEnv().getDayNightRatio();
|
||||
|
||||
m_camera_mutex.Lock();
|
||||
v3f camera_position = m_camera_position;
|
||||
v3f camera_direction = m_camera_direction;
|
||||
f32 camera_fov = m_camera_fov;
|
||||
m_camera_mutex.Unlock();
|
||||
|
||||
/*
|
||||
Get all blocks and draw all visible ones
|
||||
*/
|
||||
|
||||
v3s16 cam_pos_nodes = floatToInt(camera_position, BS);
|
||||
|
||||
v3s16 box_nodes_d = m_control.wanted_range * v3s16(1,1,1);
|
||||
|
||||
v3s16 p_nodes_min = cam_pos_nodes - box_nodes_d;
|
||||
v3s16 p_nodes_max = cam_pos_nodes + box_nodes_d;
|
||||
|
||||
// Take a fair amount as we will be dropping more out later
|
||||
// Umm... these additions are a bit strange but they are needed.
|
||||
v3s16 p_blocks_min(
|
||||
p_nodes_min.X / MAP_BLOCKSIZE - 3,
|
||||
p_nodes_min.Y / MAP_BLOCKSIZE - 3,
|
||||
p_nodes_min.Z / MAP_BLOCKSIZE - 3);
|
||||
v3s16 p_blocks_max(
|
||||
p_nodes_max.X / MAP_BLOCKSIZE + 1,
|
||||
p_nodes_max.Y / MAP_BLOCKSIZE + 1,
|
||||
p_nodes_max.Z / MAP_BLOCKSIZE + 1);
|
||||
|
||||
u32 vertex_count = 0;
|
||||
u32 meshbuffer_count = 0;
|
||||
|
||||
// For limiting number of mesh animations per frame
|
||||
u32 mesh_animate_count = 0;
|
||||
u32 mesh_animate_count_far = 0;
|
||||
|
||||
// Blocks that were drawn and had a mesh
|
||||
u32 blocks_drawn = 0;
|
||||
// Blocks which had a corresponding meshbuffer for this pass
|
||||
u32 blocks_had_pass_meshbuf = 0;
|
||||
// Blocks from which stuff was actually drawn
|
||||
u32 blocks_without_stuff = 0;
|
||||
|
||||
/*
|
||||
Draw the selected MapBlocks
|
||||
*/
|
||||
@@ -426,10 +486,95 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
|
||||
{
|
||||
ScopeProfiler sp(g_profiler, prefix+"drawing blocks", SPT_AVG);
|
||||
|
||||
MeshBufListList drawbufs;
|
||||
|
||||
for(std::map<v3s16, MapBlock*>::iterator
|
||||
i = m_drawlist.begin();
|
||||
i != m_drawlist.end(); ++i)
|
||||
{
|
||||
MapBlock *block = i->second;
|
||||
|
||||
// If the mesh of the block happened to get deleted, ignore it
|
||||
if(block->mesh == NULL)
|
||||
continue;
|
||||
|
||||
float d = 0.0;
|
||||
if(isBlockInSight(block->getPos(), camera_position,
|
||||
camera_direction, camera_fov,
|
||||
100000*BS, &d) == false)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Mesh animation
|
||||
{
|
||||
//JMutexAutoLock lock(block->mesh_mutex);
|
||||
MapBlockMesh *mapBlockMesh = block->mesh;
|
||||
assert(mapBlockMesh);
|
||||
// Pretty random but this should work somewhat nicely
|
||||
bool faraway = d >= BS*50;
|
||||
//bool faraway = d >= m_control.wanted_range * BS;
|
||||
if(mapBlockMesh->isAnimationForced() ||
|
||||
!faraway ||
|
||||
mesh_animate_count_far < (m_control.range_all ? 200 : 50))
|
||||
{
|
||||
bool animated = mapBlockMesh->animate(
|
||||
faraway,
|
||||
animation_time,
|
||||
crack,
|
||||
daynight_ratio);
|
||||
if(animated)
|
||||
mesh_animate_count++;
|
||||
if(animated && faraway)
|
||||
mesh_animate_count_far++;
|
||||
}
|
||||
else
|
||||
{
|
||||
mapBlockMesh->decreaseAnimationForceTimer();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Get the meshbuffers of the block
|
||||
*/
|
||||
{
|
||||
//JMutexAutoLock lock(block->mesh_mutex);
|
||||
|
||||
MapBlockMesh *mapBlockMesh = block->mesh;
|
||||
assert(mapBlockMesh);
|
||||
|
||||
scene::SMesh *mesh = mapBlockMesh->getMesh();
|
||||
assert(mesh);
|
||||
|
||||
u32 c = mesh->getMeshBufferCount();
|
||||
for(u32 i=0; i<c; i++)
|
||||
{
|
||||
scene::IMeshBuffer *buf = mesh->getMeshBuffer(i);
|
||||
|
||||
buf->getMaterial().setFlag(video::EMF_TRILINEAR_FILTER, use_trilinear_filter);
|
||||
buf->getMaterial().setFlag(video::EMF_BILINEAR_FILTER, use_bilinear_filter);
|
||||
buf->getMaterial().setFlag(video::EMF_ANISOTROPIC_FILTER, use_anisotropic_filter);
|
||||
|
||||
const video::SMaterial& material = buf->getMaterial();
|
||||
video::IMaterialRenderer* rnd =
|
||||
driver->getMaterialRenderer(material.MaterialType);
|
||||
bool transparent = (rnd && rnd->isTransparent());
|
||||
if(transparent == is_transparent_pass)
|
||||
{
|
||||
if(buf->getVertexCount() == 0)
|
||||
errorstream<<"Block ["<<analyze_block(block)
|
||||
<<"] contains an empty meshbuf"<<std::endl;
|
||||
drawbufs.add(buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::list<MeshBufList> &lists = drawbufs.lists;
|
||||
|
||||
int timecheck_counter = 0;
|
||||
for(core::map<v3s16, MapBlock*>::Iterator
|
||||
i = drawset.getIterator();
|
||||
i.atEnd() == false; i++)
|
||||
for(std::list<MeshBufList>::iterator i = lists.begin();
|
||||
i != lists.end(); ++i)
|
||||
{
|
||||
{
|
||||
timecheck_counter++;
|
||||
@@ -446,9 +591,20 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MapBlock *block = i.getNode()->getValue();
|
||||
|
||||
MeshBufList &list = *i;
|
||||
|
||||
driver->setMaterial(list.m);
|
||||
|
||||
for(std::list<scene::IMeshBuffer*>::iterator j = list.bufs.begin();
|
||||
j != list.bufs.end(); ++j)
|
||||
{
|
||||
scene::IMeshBuffer *buf = *j;
|
||||
driver->drawMeshBuffer(buf);
|
||||
vertex_count += buf->getVertexCount();
|
||||
meshbuffer_count++;
|
||||
}
|
||||
#if 0
|
||||
/*
|
||||
Draw the faces of the block
|
||||
*/
|
||||
@@ -493,17 +649,12 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
|
||||
else
|
||||
blocks_without_stuff++;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
} // ScopeProfiler
|
||||
|
||||
// Log only on solid pass because values are the same
|
||||
if(pass == scene::ESNRP_SOLID){
|
||||
g_profiler->avg("CM: blocks in range", blocks_in_range);
|
||||
g_profiler->avg("CM: blocks occlusion culled", blocks_occlusion_culled);
|
||||
if(blocks_in_range != 0)
|
||||
g_profiler->avg("CM: blocks in range without mesh (frac)",
|
||||
(float)blocks_in_range_without_mesh/blocks_in_range);
|
||||
g_profiler->avg("CM: blocks drawn", blocks_drawn);
|
||||
g_profiler->avg("CM: animated meshes", mesh_animate_count);
|
||||
g_profiler->avg("CM: animated meshes (far)", mesh_animate_count_far);
|
||||
}
|
||||
@@ -516,9 +667,6 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
|
||||
g_profiler->avg(prefix+"empty blocks (frac)",
|
||||
(float)blocks_without_stuff / blocks_drawn);
|
||||
|
||||
m_control.blocks_drawn = blocks_drawn;
|
||||
m_control.blocks_would_have_drawn = blocks_would_have_drawn;
|
||||
|
||||
/*infostream<<"renderMap(): is_transparent_pass="<<is_transparent_pass
|
||||
<<", rendered "<<vertex_count<<" vertices."<<std::endl;*/
|
||||
}
|
||||
@@ -622,7 +770,7 @@ int ClientMap::getBackgroundBrightness(float max_d, u32 daylight_factor,
|
||||
float sunlight_min_d = max_d*0.8;
|
||||
if(sunlight_min_d > 35*BS)
|
||||
sunlight_min_d = 35*BS;
|
||||
core::array<int> values;
|
||||
std::vector<int> values;
|
||||
for(u32 i=0; i<sizeof(z_directions)/sizeof(*z_directions); i++){
|
||||
v3f z_dir = z_directions[i];
|
||||
z_dir.normalize();
|
||||
@@ -651,7 +799,7 @@ int ClientMap::getBackgroundBrightness(float max_d, u32 daylight_factor,
|
||||
}
|
||||
int brightness_sum = 0;
|
||||
int brightness_count = 0;
|
||||
values.sort();
|
||||
std::sort(values.begin(), values.end());
|
||||
u32 num_values_to_use = values.size();
|
||||
if(num_values_to_use >= 10)
|
||||
num_values_to_use -= num_values_to_use/2;
|
||||
@@ -717,7 +865,7 @@ void ClientMap::renderPostFx()
|
||||
// - If the player is in liquid, draw a semi-transparent overlay.
|
||||
const ContentFeatures& features = nodemgr->get(n);
|
||||
video::SColor post_effect_color = features.post_effect_color;
|
||||
if(features.solidness == 2 && g_settings->getBool("free_move") == false)
|
||||
if(features.solidness == 2 && !(g_settings->getBool("noclip") && m_gamedef->checkLocalPrivilege("noclip")))
|
||||
{
|
||||
post_effect_color = video::SColor(255, 0, 0, 0);
|
||||
}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
Minetest-c55
|
||||
Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Minetest
|
||||
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
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 General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
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.
|
||||
*/
|
||||
@@ -20,8 +20,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#ifndef CLIENTMAP_HEADER
|
||||
#define CLIENTMAP_HEADER
|
||||
|
||||
#include "common_irrlicht.h"
|
||||
#include "irrlichttypes_extrabloated.h"
|
||||
#include "map.h"
|
||||
#include <set>
|
||||
#include <map>
|
||||
|
||||
struct MapDrawControl
|
||||
{
|
||||
@@ -113,7 +115,8 @@ class ClientMap : public Map, public scene::ISceneNode
|
||||
{
|
||||
return m_box;
|
||||
}
|
||||
|
||||
|
||||
void updateDrawList(video::IVideoDriver* driver);
|
||||
void renderMap(video::IVideoDriver* driver, s32 pass);
|
||||
|
||||
int getBackgroundBrightness(float max_d, u32 daylight_factor,
|
||||
@@ -127,7 +130,7 @@ class ClientMap : public Map, public scene::ISceneNode
|
||||
// Check if sector was drawn on last render()
|
||||
bool sectorWasDrawn(v2s16 p)
|
||||
{
|
||||
return (m_last_drawn_sectors.find(p) != NULL);
|
||||
return (m_last_drawn_sectors.find(p) != m_last_drawn_sectors.end());
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -141,8 +144,10 @@ class ClientMap : public Map, public scene::ISceneNode
|
||||
v3f m_camera_direction;
|
||||
f32 m_camera_fov;
|
||||
JMutex m_camera_mutex;
|
||||
|
||||
std::map<v3s16, MapBlock*> m_drawlist;
|
||||
|
||||
core::map<v2s16, bool> m_last_drawn_sectors;
|
||||
std::set<v2s16> m_last_drawn_sectors;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
Minetest-c55
|
||||
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Minetest
|
||||
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
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 General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
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.
|
||||
*/
|
||||
@@ -36,16 +36,16 @@ ClientActiveObject::ClientActiveObject(u16 id, IGameDef *gamedef,
|
||||
|
||||
ClientActiveObject::~ClientActiveObject()
|
||||
{
|
||||
removeFromScene();
|
||||
removeFromScene(true);
|
||||
}
|
||||
|
||||
ClientActiveObject* ClientActiveObject::create(u8 type, IGameDef *gamedef,
|
||||
ClientEnvironment *env)
|
||||
{
|
||||
// Find factory function
|
||||
core::map<u16, Factory>::Node *n;
|
||||
std::map<u16, Factory>::iterator n;
|
||||
n = m_types.find(type);
|
||||
if(n == NULL)
|
||||
if(n == m_types.end())
|
||||
{
|
||||
// If factory is not found, just return.
|
||||
dstream<<"WARNING: ClientActiveObject: No factory for type="
|
||||
@@ -53,18 +53,18 @@ ClientActiveObject* ClientActiveObject::create(u8 type, IGameDef *gamedef,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Factory f = n->getValue();
|
||||
Factory f = n->second;
|
||||
ClientActiveObject *object = (*f)(gamedef, env);
|
||||
return object;
|
||||
}
|
||||
|
||||
void ClientActiveObject::registerType(u16 type, Factory f)
|
||||
{
|
||||
core::map<u16, Factory>::Node *n;
|
||||
std::map<u16, Factory>::iterator n;
|
||||
n = m_types.find(type);
|
||||
if(n)
|
||||
if(n != m_types.end())
|
||||
return;
|
||||
m_types.insert(type, f);
|
||||
m_types[type] = f;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
Minetest-c55
|
||||
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Minetest
|
||||
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
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 General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
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.
|
||||
*/
|
||||
@@ -20,8 +20,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#ifndef CLIENTOBJECT_HEADER
|
||||
#define CLIENTOBJECT_HEADER
|
||||
|
||||
#include "common_irrlicht.h"
|
||||
#include "irrlichttypes_extrabloated.h"
|
||||
#include "activeobject.h"
|
||||
#include <map>
|
||||
|
||||
/*
|
||||
|
||||
@@ -49,13 +50,19 @@ class ClientActiveObject : public ActiveObject
|
||||
|
||||
virtual void addToScene(scene::ISceneManager *smgr, ITextureSource *tsrc,
|
||||
IrrlichtDevice *irr){}
|
||||
virtual void removeFromScene(){}
|
||||
virtual void removeFromScene(bool permanent){}
|
||||
// 0 <= light_at_pos <= LIGHT_SUN
|
||||
virtual void updateLight(u8 light_at_pos){}
|
||||
virtual v3s16 getLightPosition(){return v3s16(0,0,0);}
|
||||
virtual core::aabbox3d<f32>* getSelectionBox(){return NULL;}
|
||||
virtual core::aabbox3d<f32>* getCollisionBox(){return NULL;}
|
||||
virtual v3f getPosition(){return v3f(0,0,0);}
|
||||
virtual scene::IMeshSceneNode *getMeshSceneNode(){return NULL;}
|
||||
virtual scene::IAnimatedMeshSceneNode *getAnimatedMeshSceneNode(){return NULL;}
|
||||
virtual scene::IBillboardSceneNode *getSpriteSceneNode(){return NULL;}
|
||||
virtual bool isPlayer(){return false;}
|
||||
virtual bool isLocalPlayer(){return false;}
|
||||
virtual void setAttachments(){}
|
||||
virtual bool doShowSelectionBox(){return true;}
|
||||
|
||||
// Step object in time
|
||||
@@ -90,7 +97,7 @@ class ClientActiveObject : public ActiveObject
|
||||
ClientEnvironment *m_env;
|
||||
private:
|
||||
// Used for creating objects based on type
|
||||
static core::map<u16, Factory> m_types;
|
||||
static std::map<u16, Factory> m_types;
|
||||
};
|
||||
|
||||
struct DistanceSortedActiveObject
|
||||
@@ -104,7 +111,7 @@ struct DistanceSortedActiveObject
|
||||
d = a_d;
|
||||
}
|
||||
|
||||
bool operator < (DistanceSortedActiveObject &other)
|
||||
bool operator < (const DistanceSortedActiveObject &other) const
|
||||
{
|
||||
return d < other.d;
|
||||
}
|
||||
|
||||
31
src/clientserver.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
Minetest
|
||||
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#include "clientserver.h"
|
||||
#include "util/serialize.h"
|
||||
|
||||
SharedBuffer<u8> makePacket_TOCLIENT_TIME_OF_DAY(u16 time, float time_speed)
|
||||
{
|
||||
SharedBuffer<u8> data(2+2+4);
|
||||
writeU16(&data[0], TOCLIENT_TIME_OF_DAY);
|
||||
writeU16(&data[2], time);
|
||||
writeF1000(&data[4], time_speed);
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
Minetest-c55
|
||||
Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Minetest
|
||||
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
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 General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
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.
|
||||
*/
|
||||
@@ -20,7 +20,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#ifndef CLIENTSERVER_HEADER
|
||||
#define CLIENTSERVER_HEADER
|
||||
|
||||
#include "utility.h"
|
||||
#include "util/pointer.h"
|
||||
|
||||
SharedBuffer<u8> makePacket_TOCLIENT_TIME_OF_DAY(u16 time, float time_speed);
|
||||
|
||||
/*
|
||||
changes by PROTOCOL_VERSION:
|
||||
@@ -54,10 +56,51 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
PROTOCOL_VERSION 10:
|
||||
TOCLIENT_PRIVILEGES
|
||||
Version raised to force 'fly' and 'fast' privileges into effect.
|
||||
Node metadata change (came in later; somewhat incompatible)
|
||||
PROTOCOL_VERSION 11:
|
||||
TileDef in ContentFeatures
|
||||
Nodebox drawtype
|
||||
(some dev snapshot)
|
||||
TOCLIENT_INVENTORY_FORMSPEC
|
||||
(0.4.0, 0.4.1)
|
||||
PROTOCOL_VERSION 12:
|
||||
TOSERVER_INVENTORY_FIELDS
|
||||
16-bit node ids
|
||||
TOCLIENT_DETACHED_INVENTORY
|
||||
PROTOCOL_VERSION 13:
|
||||
InventoryList field "Width" (deserialization fails with old versions)
|
||||
PROTOCOL_VERSION 14:
|
||||
Added transfer of player pressed keys to the server
|
||||
Added new messages for mesh and bone animation, as well as attachments
|
||||
GENERIC_CMD_SET_ANIMATION
|
||||
GENERIC_CMD_SET_BONE_POSITION
|
||||
GENERIC_CMD_SET_ATTACHMENT
|
||||
PROTOCOL_VERSION 15:
|
||||
Serialization format changes
|
||||
PROTOCOL_VERSION 16:
|
||||
TOCLIENT_SHOW_FORMSPEC
|
||||
PROTOCOL_VERSION 17:
|
||||
Serialization format change: include backface_culling flag in TileDef
|
||||
Added rightclickable field in nodedef
|
||||
TOCLIENT_SPAWN_PARTICLE
|
||||
TOCLIENT_ADD_PARTICLESPAWNER
|
||||
TOCLIENT_DELETE_PARTICLESPAWNER
|
||||
PROTOCOL_VERSION 18:
|
||||
damageGroups added to ToolCapabilities
|
||||
sound_place added to ItemDefinition
|
||||
*/
|
||||
|
||||
#define PROTOCOL_VERSION 10
|
||||
#define LATEST_PROTOCOL_VERSION 18
|
||||
|
||||
// Server's supported network protocol range
|
||||
#define SERVER_PROTOCOL_VERSION_MIN 13
|
||||
#define SERVER_PROTOCOL_VERSION_MAX LATEST_PROTOCOL_VERSION
|
||||
|
||||
// Client's supported network protocol range
|
||||
#define CLIENT_PROTOCOL_VERSION_MIN 13
|
||||
#define CLIENT_PROTOCOL_VERSION_MAX LATEST_PROTOCOL_VERSION
|
||||
|
||||
// Constant that differentiates the protocol from random data and other protocols
|
||||
#define PROTOCOL_ID 0x4f457403
|
||||
|
||||
#define PASSWORD_SIZE 28 // Maximum password length. Allows for
|
||||
@@ -76,6 +119,7 @@ enum ToClientCommand
|
||||
[2] u8 deployed version
|
||||
[3] v3s16 player's position + v3f(0,BS/2,0) floatToInt'd
|
||||
[12] u64 map seed (new as of 2011-02-27)
|
||||
[20] f1000 recommended send interval (in seconds) (new as of 14)
|
||||
|
||||
NOTE: The position in here is deprecated; position is
|
||||
explicitly sent afterwards
|
||||
@@ -234,6 +278,8 @@ enum ToClientCommand
|
||||
u32 length of data
|
||||
data
|
||||
}
|
||||
u16 length of remote media server url (if applicable)
|
||||
string url
|
||||
*/
|
||||
|
||||
TOCLIENT_TOOLDEF = 0x39,
|
||||
@@ -304,6 +350,87 @@ enum ToClientCommand
|
||||
u16 len
|
||||
u8[len] privilege
|
||||
*/
|
||||
|
||||
TOCLIENT_INVENTORY_FORMSPEC = 0x42,
|
||||
/*
|
||||
u16 command
|
||||
u32 len
|
||||
u8[len] formspec
|
||||
*/
|
||||
|
||||
TOCLIENT_DETACHED_INVENTORY = 0x43,
|
||||
/*
|
||||
[0] u16 command
|
||||
u16 len
|
||||
u8[len] name
|
||||
[2] serialized inventory
|
||||
*/
|
||||
|
||||
TOCLIENT_SHOW_FORMSPEC = 0x44,
|
||||
/*
|
||||
[0] u16 command
|
||||
u32 len
|
||||
u8[len] formspec
|
||||
u16 len
|
||||
u8[len] formname
|
||||
*/
|
||||
|
||||
TOCLIENT_MOVEMENT = 0x45,
|
||||
/*
|
||||
u16 command
|
||||
f1000 movement_acceleration_default
|
||||
f1000 movement_acceleration_air
|
||||
f1000 movement_acceleration_fast
|
||||
f1000 movement_speed_walk
|
||||
f1000 movement_speed_crouch
|
||||
f1000 movement_speed_fast
|
||||
f1000 movement_speed_climb
|
||||
f1000 movement_speed_jump
|
||||
f1000 movement_liquid_fluidity
|
||||
f1000 movement_liquid_fluidity_smooth
|
||||
f1000 movement_liquid_sink
|
||||
f1000 movement_gravity
|
||||
*/
|
||||
|
||||
TOCLIENT_SPAWN_PARTICLE = 0x46,
|
||||
/*
|
||||
u16 command
|
||||
v3f1000 pos
|
||||
v3f1000 velocity
|
||||
v3f1000 acceleration
|
||||
f1000 expirationtime
|
||||
f1000 size
|
||||
u8 bool collisiondetection
|
||||
u32 len
|
||||
u8[len] texture
|
||||
*/
|
||||
|
||||
TOCLIENT_ADD_PARTICLESPAWNER = 0x47,
|
||||
/*
|
||||
u16 command
|
||||
u16 amount
|
||||
f1000 spawntime
|
||||
v3f1000 minpos
|
||||
v3f1000 maxpos
|
||||
v3f1000 minvel
|
||||
v3f1000 maxvel
|
||||
v3f1000 minacc
|
||||
v3f1000 maxacc
|
||||
f1000 minexptime
|
||||
f1000 maxexptime
|
||||
f1000 minsize
|
||||
f1000 maxsize
|
||||
u8 bool collisiondetection
|
||||
u32 len
|
||||
u8[len] texture
|
||||
u32 id
|
||||
*/
|
||||
|
||||
TOCLIENT_DELETE_PARTICLESPAWNER = 0x48,
|
||||
/*
|
||||
u16 command
|
||||
u32 id
|
||||
*/
|
||||
};
|
||||
|
||||
enum ToServerCommand
|
||||
@@ -316,7 +443,8 @@ enum ToServerCommand
|
||||
[2] u8 SER_FMT_VER_HIGHEST
|
||||
[3] u8[20] player_name
|
||||
[23] u8[28] password (new in some version)
|
||||
[51] u16 client network protocol version (new in some version)
|
||||
[51] u16 minimum supported network protocol version (added sometime)
|
||||
[53] u16 maximum supported network protocol version (added later than the previous one)
|
||||
*/
|
||||
|
||||
TOSERVER_INIT2 = 0x11,
|
||||
@@ -338,6 +466,7 @@ enum ToServerCommand
|
||||
[2+12] v3s32 speed*100
|
||||
[2+12+12] s32 pitch*100
|
||||
[2+12+12+4] s32 yaw*100
|
||||
[2+12+12+4+4] u32 keyPressed
|
||||
*/
|
||||
|
||||
TOSERVER_GOTBLOCKS = 0x24,
|
||||
@@ -498,6 +627,19 @@ enum ToServerCommand
|
||||
u8[len] field value
|
||||
*/
|
||||
|
||||
TOSERVER_INVENTORY_FIELDS = 0x3c,
|
||||
/*
|
||||
u16 command
|
||||
u16 len
|
||||
u8[len] form name (reserved for future use)
|
||||
u16 number of fields
|
||||
for each field:
|
||||
u16 len
|
||||
u8[len] field name
|
||||
u32 len
|
||||
u8[len] field value
|
||||
*/
|
||||
|
||||
TOSERVER_REQUEST_MEDIA = 0x40,
|
||||
/*
|
||||
u16 command
|
||||
@@ -508,16 +650,11 @@ enum ToServerCommand
|
||||
}
|
||||
*/
|
||||
|
||||
TOSERVER_RECEIVED_MEDIA = 0x41,
|
||||
/*
|
||||
u16 command
|
||||
*/
|
||||
};
|
||||
|
||||
inline SharedBuffer<u8> makePacket_TOCLIENT_TIME_OF_DAY(u16 time, float time_speed)
|
||||
{
|
||||
SharedBuffer<u8> data(2+2+4);
|
||||
writeU16(&data[0], TOCLIENT_TIME_OF_DAY);
|
||||
writeU16(&data[2], time);
|
||||
writeF1000(&data[4], time_speed);
|
||||
return data;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
Minetest-c55
|
||||
Copyright (C) 2012 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Minetest
|
||||
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
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 General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
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.
|
||||
*/
|
||||
@@ -20,7 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#ifndef CLIENTSIMPLEOBJECT_HEADER
|
||||
#define CLIENTSIMPLEOBJECT_HEADER
|
||||
|
||||
#include "irrlichttypes.h"
|
||||
#include "irrlichttypes_bloated.h"
|
||||
class ClientEnvironment;
|
||||
|
||||
class ClientSimpleObject
|
||||
|
||||
182
src/clouds.cpp
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
Minetest-c55
|
||||
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Minetest
|
||||
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
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 General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
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.
|
||||
*/
|
||||
@@ -29,7 +29,8 @@ Clouds::Clouds(
|
||||
scene::ISceneNode* parent,
|
||||
scene::ISceneManager* mgr,
|
||||
s32 id,
|
||||
u32 seed
|
||||
u32 seed,
|
||||
s16 cloudheight
|
||||
):
|
||||
scene::ISceneNode(parent, mgr, id),
|
||||
m_seed(seed),
|
||||
@@ -45,8 +46,8 @@ Clouds::Clouds(
|
||||
//m_material.MaterialType = video::EMT_TRANSPARENT_VERTEX_ALPHA;
|
||||
m_material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
|
||||
|
||||
m_cloud_y = BS*100;
|
||||
//m_cloud_y = BS*50;
|
||||
m_cloud_y = BS * (cloudheight ? cloudheight :
|
||||
g_settings->getS16("cloud_height"));
|
||||
|
||||
m_box = core::aabbox3d<f32>(-BS*1000000,m_cloud_y-BS,-BS*1000000,
|
||||
BS*1000000,m_cloud_y+BS,BS*1000000);
|
||||
@@ -213,8 +214,7 @@ void Clouds::render()
|
||||
|
||||
v2f p0 = v2f(xi,zi)*cloud_size + world_center_of_drawing_in_noise_f;
|
||||
|
||||
video::S3DVertex v[4] =
|
||||
{
|
||||
video::S3DVertex v[4] = {
|
||||
video::S3DVertex(0,0,0, 0,0,0, c_top, 0, 1),
|
||||
video::S3DVertex(0,0,0, 0,0,0, c_top, 1, 1),
|
||||
video::S3DVertex(0,0,0, 0,0,0, c_top, 1, 0),
|
||||
@@ -236,88 +236,88 @@ void Clouds::render()
|
||||
{
|
||||
switch(i)
|
||||
{
|
||||
case 0: // top
|
||||
for(int j=0;j<4;j++){
|
||||
v[j].Normal = v3f(0,1,0);
|
||||
}
|
||||
v[0].Pos.X=-rx; v[0].Pos.Y= ry; v[0].Pos.Z=-rz;
|
||||
v[1].Pos.X=-rx; v[1].Pos.Y= ry; v[1].Pos.Z= rz;
|
||||
v[2].Pos.X= rx; v[2].Pos.Y= ry; v[2].Pos.Z= rz;
|
||||
v[3].Pos.X= rx; v[3].Pos.Y= ry, v[3].Pos.Z=-rz;
|
||||
break;
|
||||
case 1: // back
|
||||
if(CONTAINS(xi, zi-1, cloud_radius_i)){
|
||||
u32 j = GETINDEX(xi, zi-1, cloud_radius_i);
|
||||
if(grid[j])
|
||||
continue;
|
||||
}
|
||||
for(int j=0;j<4;j++){
|
||||
v[j].Color=c_side_1;
|
||||
v[j].Normal = v3f(0,0,-1);
|
||||
}
|
||||
v[0].Pos.X=-rx; v[0].Pos.Y= ry; v[0].Pos.Z=-rz;
|
||||
v[1].Pos.X= rx; v[1].Pos.Y= ry; v[1].Pos.Z=-rz;
|
||||
v[2].Pos.X= rx; v[2].Pos.Y=-ry; v[2].Pos.Z=-rz;
|
||||
v[3].Pos.X=-rx; v[3].Pos.Y=-ry, v[3].Pos.Z=-rz;
|
||||
break;
|
||||
case 2: //right
|
||||
if(CONTAINS(xi+1, zi, cloud_radius_i)){
|
||||
u32 j = GETINDEX(xi+1, zi, cloud_radius_i);
|
||||
if(grid[j])
|
||||
continue;
|
||||
}
|
||||
for(int j=0;j<4;j++){
|
||||
v[j].Color=c_side_2;
|
||||
v[j].Normal = v3f(1,0,0);
|
||||
}
|
||||
v[0].Pos.X= rx; v[0].Pos.Y= ry; v[0].Pos.Z=-rz;
|
||||
v[1].Pos.X= rx; v[1].Pos.Y= ry; v[1].Pos.Z= rz;
|
||||
v[2].Pos.X= rx; v[2].Pos.Y=-ry; v[2].Pos.Z= rz;
|
||||
v[3].Pos.X= rx; v[3].Pos.Y=-ry, v[3].Pos.Z=-rz;
|
||||
break;
|
||||
case 3: // front
|
||||
if(CONTAINS(xi, zi+1, cloud_radius_i)){
|
||||
u32 j = GETINDEX(xi, zi+1, cloud_radius_i);
|
||||
if(grid[j])
|
||||
continue;
|
||||
}
|
||||
for(int j=0;j<4;j++){
|
||||
v[j].Color=c_side_1;
|
||||
v[j].Normal = v3f(0,0,-1);
|
||||
}
|
||||
v[0].Pos.X= rx; v[0].Pos.Y= ry; v[0].Pos.Z= rz;
|
||||
v[1].Pos.X=-rx; v[1].Pos.Y= ry; v[1].Pos.Z= rz;
|
||||
v[2].Pos.X=-rx; v[2].Pos.Y=-ry; v[2].Pos.Z= rz;
|
||||
v[3].Pos.X= rx; v[3].Pos.Y=-ry, v[3].Pos.Z= rz;
|
||||
break;
|
||||
case 4: // left
|
||||
if(CONTAINS(xi-1, zi, cloud_radius_i)){
|
||||
u32 j = GETINDEX(xi-1, zi, cloud_radius_i);
|
||||
if(grid[j])
|
||||
continue;
|
||||
}
|
||||
for(int j=0;j<4;j++){
|
||||
v[j].Color=c_side_2;
|
||||
v[j].Normal = v3f(-1,0,0);
|
||||
}
|
||||
v[0].Pos.X=-rx; v[0].Pos.Y= ry; v[0].Pos.Z= rz;
|
||||
v[1].Pos.X=-rx; v[1].Pos.Y= ry; v[1].Pos.Z=-rz;
|
||||
v[2].Pos.X=-rx; v[2].Pos.Y=-ry; v[2].Pos.Z=-rz;
|
||||
v[3].Pos.X=-rx; v[3].Pos.Y=-ry, v[3].Pos.Z= rz;
|
||||
break;
|
||||
case 5: // bottom
|
||||
for(int j=0;j<4;j++){
|
||||
v[j].Color=c_bottom;
|
||||
v[j].Normal = v3f(0,-1,0);
|
||||
}
|
||||
v[0].Pos.X= rx; v[0].Pos.Y=-ry; v[0].Pos.Z= rz;
|
||||
v[1].Pos.X=-rx; v[1].Pos.Y=-ry; v[1].Pos.Z= rz;
|
||||
v[2].Pos.X=-rx; v[2].Pos.Y=-ry; v[2].Pos.Z=-rz;
|
||||
v[3].Pos.X= rx; v[3].Pos.Y=-ry, v[3].Pos.Z=-rz;
|
||||
break;
|
||||
case 0: // top
|
||||
for(int j=0;j<4;j++){
|
||||
v[j].Normal.set(0,1,0);
|
||||
}
|
||||
v[0].Pos.set(-rx, ry,-rz);
|
||||
v[1].Pos.set(-rx, ry, rz);
|
||||
v[2].Pos.set( rx, ry, rz);
|
||||
v[3].Pos.set( rx, ry,-rz);
|
||||
break;
|
||||
case 1: // back
|
||||
if(CONTAINS(xi, zi-1, cloud_radius_i)){
|
||||
u32 j = GETINDEX(xi, zi-1, cloud_radius_i);
|
||||
if(grid[j])
|
||||
continue;
|
||||
}
|
||||
for(int j=0;j<4;j++){
|
||||
v[j].Color = c_side_1;
|
||||
v[j].Normal.set(0,0,-1);
|
||||
}
|
||||
v[0].Pos.set(-rx, ry,-rz);
|
||||
v[1].Pos.set( rx, ry,-rz);
|
||||
v[2].Pos.set( rx,-ry,-rz);
|
||||
v[3].Pos.set(-rx,-ry,-rz);
|
||||
break;
|
||||
case 2: //right
|
||||
if(CONTAINS(xi+1, zi, cloud_radius_i)){
|
||||
u32 j = GETINDEX(xi+1, zi, cloud_radius_i);
|
||||
if(grid[j])
|
||||
continue;
|
||||
}
|
||||
for(int j=0;j<4;j++){
|
||||
v[j].Color = c_side_2;
|
||||
v[j].Normal.set(1,0,0);
|
||||
}
|
||||
v[0].Pos.set( rx, ry,-rz);
|
||||
v[1].Pos.set( rx, ry, rz);
|
||||
v[2].Pos.set( rx,-ry, rz);
|
||||
v[3].Pos.set( rx,-ry,-rz);
|
||||
break;
|
||||
case 3: // front
|
||||
if(CONTAINS(xi, zi+1, cloud_radius_i)){
|
||||
u32 j = GETINDEX(xi, zi+1, cloud_radius_i);
|
||||
if(grid[j])
|
||||
continue;
|
||||
}
|
||||
for(int j=0;j<4;j++){
|
||||
v[j].Color = c_side_1;
|
||||
v[j].Normal.set(0,0,-1);
|
||||
}
|
||||
v[0].Pos.set( rx, ry, rz);
|
||||
v[1].Pos.set(-rx, ry, rz);
|
||||
v[2].Pos.set(-rx,-ry, rz);
|
||||
v[3].Pos.set( rx,-ry, rz);
|
||||
break;
|
||||
case 4: // left
|
||||
if(CONTAINS(xi-1, zi, cloud_radius_i)){
|
||||
u32 j = GETINDEX(xi-1, zi, cloud_radius_i);
|
||||
if(grid[j])
|
||||
continue;
|
||||
}
|
||||
for(int j=0;j<4;j++){
|
||||
v[j].Color = c_side_2;
|
||||
v[j].Normal.set(-1,0,0);
|
||||
}
|
||||
v[0].Pos.set(-rx, ry, rz);
|
||||
v[1].Pos.set(-rx, ry,-rz);
|
||||
v[2].Pos.set(-rx,-ry,-rz);
|
||||
v[3].Pos.set(-rx,-ry, rz);
|
||||
break;
|
||||
case 5: // bottom
|
||||
for(int j=0;j<4;j++){
|
||||
v[j].Color = c_bottom;
|
||||
v[j].Normal.set(0,-1,0);
|
||||
}
|
||||
v[0].Pos.set( rx,-ry, rz);
|
||||
v[1].Pos.set(-rx,-ry, rz);
|
||||
v[2].Pos.set(-rx,-ry,-rz);
|
||||
v[3].Pos.set( rx,-ry,-rz);
|
||||
break;
|
||||
}
|
||||
|
||||
v3f pos = v3f(p0.X,m_cloud_y,p0.Y);
|
||||
v3f pos(p0.X, m_cloud_y, p0.Y);
|
||||
|
||||
for(u16 i=0; i<4; i++)
|
||||
v[i].Pos += pos;
|
||||
|
||||
17
src/clouds.h
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
Minetest-c55
|
||||
Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Minetest
|
||||
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
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 General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
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.
|
||||
*/
|
||||
@@ -20,7 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#ifndef CLOUDS_HEADER
|
||||
#define CLOUDS_HEADER
|
||||
|
||||
#include "common_irrlicht.h"
|
||||
#include "irrlichttypes_extrabloated.h"
|
||||
#include <iostream>
|
||||
|
||||
class Clouds : public scene::ISceneNode
|
||||
@@ -30,7 +30,8 @@ class Clouds : public scene::ISceneNode
|
||||
scene::ISceneNode* parent,
|
||||
scene::ISceneManager* mgr,
|
||||
s32 id,
|
||||
u32 seed
|
||||
u32 seed,
|
||||
s16 cloudheight=0
|
||||
);
|
||||
|
||||
~Clouds();
|
||||
|
||||
@@ -4,16 +4,20 @@
|
||||
#define CMAKE_CONFIG_H
|
||||
|
||||
#define CMAKE_PROJECT_NAME "@PROJECT_NAME@"
|
||||
#define CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
|
||||
#define CMAKE_VERSION_STRING "@VERSION_STRING@"
|
||||
#define CMAKE_RUN_IN_PLACE @RUN_IN_PLACE@
|
||||
#define CMAKE_USE_GETTEXT @USE_GETTEXT@
|
||||
#define CMAKE_USE_CURL @USE_CURL@
|
||||
#define CMAKE_USE_SOUND @USE_SOUND@
|
||||
#define CMAKE_USE_FREETYPE @USE_FREETYPE@
|
||||
#define CMAKE_STATIC_SHAREDIR "@SHAREDIR@"
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define CMAKE_BUILD_TYPE "Release"
|
||||
#else
|
||||
#define CMAKE_BUILD_TYPE "Debug"
|
||||
#endif
|
||||
#define CMAKE_USE_GETTEXT @USE_GETTEXT@
|
||||
#define CMAKE_USE_SOUND @USE_SOUND@
|
||||
#define CMAKE_BUILD_INFO "VER=@VERSION_STRING@ BUILD_TYPE="CMAKE_BUILD_TYPE" RUN_IN_PLACE=@RUN_IN_PLACE@ USE_GETTEXT=@USE_GETTEXT@ USE_SOUND=@USE_SOUND@ INSTALL_PREFIX=@CMAKE_INSTALL_PREFIX@"
|
||||
#define CMAKE_BUILD_INFO "VER=@VERSION_STRING@ BUILD_TYPE="CMAKE_BUILD_TYPE" RUN_IN_PLACE=@RUN_IN_PLACE@ USE_GETTEXT=@USE_GETTEXT@ USE_SOUND=@USE_SOUND@ STATIC_SHAREDIR=@SHAREDIR@"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
Minetest-c55
|
||||
Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Minetest
|
||||
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
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 General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
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.
|
||||
*/
|
||||
@@ -22,32 +22,328 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "map.h"
|
||||
#include "nodedef.h"
|
||||
#include "gamedef.h"
|
||||
#include "log.h"
|
||||
#include "environment.h"
|
||||
#include "serverobject.h"
|
||||
#include <vector>
|
||||
#include <set>
|
||||
#include "util/timetaker.h"
|
||||
#include "main.h" // g_profiler
|
||||
#include "profiler.h"
|
||||
|
||||
collisionMoveResult collisionMoveSimple(Map *map, IGameDef *gamedef,
|
||||
f32 pos_max_d, const core::aabbox3d<f32> &box_0,
|
||||
f32 dtime, v3f &pos_f, v3f &speed_f)
|
||||
// Helper function:
|
||||
// Checks for collision of a moving aabbox with a static aabbox
|
||||
// Returns -1 if no collision, 0 if X collision, 1 if Y collision, 2 if Z collision
|
||||
// The time after which the collision occurs is stored in dtime.
|
||||
int axisAlignedCollision(
|
||||
const aabb3f &staticbox, const aabb3f &movingbox,
|
||||
const v3f &speed, f32 d, f32 &dtime)
|
||||
{
|
||||
//TimeTaker tt("axisAlignedCollision");
|
||||
|
||||
f32 xsize = (staticbox.MaxEdge.X - staticbox.MinEdge.X);
|
||||
f32 ysize = (staticbox.MaxEdge.Y - staticbox.MinEdge.Y);
|
||||
f32 zsize = (staticbox.MaxEdge.Z - staticbox.MinEdge.Z);
|
||||
|
||||
aabb3f relbox(
|
||||
movingbox.MinEdge.X - staticbox.MinEdge.X,
|
||||
movingbox.MinEdge.Y - staticbox.MinEdge.Y,
|
||||
movingbox.MinEdge.Z - staticbox.MinEdge.Z,
|
||||
movingbox.MaxEdge.X - staticbox.MinEdge.X,
|
||||
movingbox.MaxEdge.Y - staticbox.MinEdge.Y,
|
||||
movingbox.MaxEdge.Z - staticbox.MinEdge.Z
|
||||
);
|
||||
|
||||
if(speed.X > 0) // Check for collision with X- plane
|
||||
{
|
||||
if(relbox.MaxEdge.X <= d)
|
||||
{
|
||||
dtime = - relbox.MaxEdge.X / speed.X;
|
||||
if((relbox.MinEdge.Y + speed.Y * dtime < ysize) &&
|
||||
(relbox.MaxEdge.Y + speed.Y * dtime > 0) &&
|
||||
(relbox.MinEdge.Z + speed.Z * dtime < zsize) &&
|
||||
(relbox.MaxEdge.Z + speed.Z * dtime > 0))
|
||||
return 0;
|
||||
}
|
||||
else if(relbox.MinEdge.X > xsize)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else if(speed.X < 0) // Check for collision with X+ plane
|
||||
{
|
||||
if(relbox.MinEdge.X >= xsize - d)
|
||||
{
|
||||
dtime = (xsize - relbox.MinEdge.X) / speed.X;
|
||||
if((relbox.MinEdge.Y + speed.Y * dtime < ysize) &&
|
||||
(relbox.MaxEdge.Y + speed.Y * dtime > 0) &&
|
||||
(relbox.MinEdge.Z + speed.Z * dtime < zsize) &&
|
||||
(relbox.MaxEdge.Z + speed.Z * dtime > 0))
|
||||
return 0;
|
||||
}
|
||||
else if(relbox.MaxEdge.X < 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// NO else if here
|
||||
|
||||
if(speed.Y > 0) // Check for collision with Y- plane
|
||||
{
|
||||
if(relbox.MaxEdge.Y <= d)
|
||||
{
|
||||
dtime = - relbox.MaxEdge.Y / speed.Y;
|
||||
if((relbox.MinEdge.X + speed.X * dtime < xsize) &&
|
||||
(relbox.MaxEdge.X + speed.X * dtime > 0) &&
|
||||
(relbox.MinEdge.Z + speed.Z * dtime < zsize) &&
|
||||
(relbox.MaxEdge.Z + speed.Z * dtime > 0))
|
||||
return 1;
|
||||
}
|
||||
else if(relbox.MinEdge.Y > ysize)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else if(speed.Y < 0) // Check for collision with Y+ plane
|
||||
{
|
||||
if(relbox.MinEdge.Y >= ysize - d)
|
||||
{
|
||||
dtime = (ysize - relbox.MinEdge.Y) / speed.Y;
|
||||
if((relbox.MinEdge.X + speed.X * dtime < xsize) &&
|
||||
(relbox.MaxEdge.X + speed.X * dtime > 0) &&
|
||||
(relbox.MinEdge.Z + speed.Z * dtime < zsize) &&
|
||||
(relbox.MaxEdge.Z + speed.Z * dtime > 0))
|
||||
return 1;
|
||||
}
|
||||
else if(relbox.MaxEdge.Y < 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// NO else if here
|
||||
|
||||
if(speed.Z > 0) // Check for collision with Z- plane
|
||||
{
|
||||
if(relbox.MaxEdge.Z <= d)
|
||||
{
|
||||
dtime = - relbox.MaxEdge.Z / speed.Z;
|
||||
if((relbox.MinEdge.X + speed.X * dtime < xsize) &&
|
||||
(relbox.MaxEdge.X + speed.X * dtime > 0) &&
|
||||
(relbox.MinEdge.Y + speed.Y * dtime < ysize) &&
|
||||
(relbox.MaxEdge.Y + speed.Y * dtime > 0))
|
||||
return 2;
|
||||
}
|
||||
//else if(relbox.MinEdge.Z > zsize)
|
||||
//{
|
||||
// return -1;
|
||||
//}
|
||||
}
|
||||
else if(speed.Z < 0) // Check for collision with Z+ plane
|
||||
{
|
||||
if(relbox.MinEdge.Z >= zsize - d)
|
||||
{
|
||||
dtime = (zsize - relbox.MinEdge.Z) / speed.Z;
|
||||
if((relbox.MinEdge.X + speed.X * dtime < xsize) &&
|
||||
(relbox.MaxEdge.X + speed.X * dtime > 0) &&
|
||||
(relbox.MinEdge.Y + speed.Y * dtime < ysize) &&
|
||||
(relbox.MaxEdge.Y + speed.Y * dtime > 0))
|
||||
return 2;
|
||||
}
|
||||
//else if(relbox.MaxEdge.Z < 0)
|
||||
//{
|
||||
// return -1;
|
||||
//}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Helper function:
|
||||
// Checks if moving the movingbox up by the given distance would hit a ceiling.
|
||||
bool wouldCollideWithCeiling(
|
||||
const std::vector<aabb3f> &staticboxes,
|
||||
const aabb3f &movingbox,
|
||||
f32 y_increase, f32 d)
|
||||
{
|
||||
//TimeTaker tt("wouldCollideWithCeiling");
|
||||
|
||||
assert(y_increase >= 0);
|
||||
|
||||
for(std::vector<aabb3f>::const_iterator
|
||||
i = staticboxes.begin();
|
||||
i != staticboxes.end(); i++)
|
||||
{
|
||||
const aabb3f& staticbox = *i;
|
||||
if((movingbox.MaxEdge.Y - d <= staticbox.MinEdge.Y) &&
|
||||
(movingbox.MaxEdge.Y + y_increase > staticbox.MinEdge.Y) &&
|
||||
(movingbox.MinEdge.X < staticbox.MaxEdge.X) &&
|
||||
(movingbox.MaxEdge.X > staticbox.MinEdge.X) &&
|
||||
(movingbox.MinEdge.Z < staticbox.MaxEdge.Z) &&
|
||||
(movingbox.MaxEdge.Z > staticbox.MinEdge.Z))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
|
||||
f32 pos_max_d, const aabb3f &box_0,
|
||||
f32 stepheight, f32 dtime,
|
||||
v3f &pos_f, v3f &speed_f, v3f &accel_f)
|
||||
{
|
||||
Map *map = &env->getMap();
|
||||
//TimeTaker tt("collisionMoveSimple");
|
||||
ScopeProfiler sp(g_profiler, "collisionMoveSimple avg", SPT_AVG);
|
||||
|
||||
collisionMoveResult result;
|
||||
|
||||
// If there is no speed, there are no collisions
|
||||
/*
|
||||
Calculate new velocity
|
||||
*/
|
||||
if( dtime > 0.5 ) {
|
||||
infostream<<"collisionMoveSimple: WARNING: maximum step interval exceeded, lost movement details!"<<std::endl;
|
||||
dtime = 0.5;
|
||||
}
|
||||
speed_f += accel_f * dtime;
|
||||
|
||||
// If there is no speed, there are no collisions
|
||||
if(speed_f.getLength() == 0)
|
||||
return result;
|
||||
|
||||
v3f oldpos_f = pos_f;
|
||||
v3s16 oldpos_i = floatToInt(oldpos_f, BS);
|
||||
|
||||
/*
|
||||
Calculate new position
|
||||
Collect node boxes in movement range
|
||||
*/
|
||||
pos_f += speed_f * dtime;
|
||||
std::vector<aabb3f> cboxes;
|
||||
std::vector<bool> is_unloaded;
|
||||
std::vector<bool> is_step_up;
|
||||
std::vector<bool> is_object;
|
||||
std::vector<int> bouncy_values;
|
||||
std::vector<v3s16> node_positions;
|
||||
{
|
||||
//TimeTaker tt2("collisionMoveSimple collect boxes");
|
||||
ScopeProfiler sp(g_profiler, "collisionMoveSimple collect boxes avg", SPT_AVG);
|
||||
|
||||
v3s16 oldpos_i = floatToInt(pos_f, BS);
|
||||
v3s16 newpos_i = floatToInt(pos_f + speed_f * dtime, BS);
|
||||
s16 min_x = MYMIN(oldpos_i.X, newpos_i.X) + (box_0.MinEdge.X / BS) - 1;
|
||||
s16 min_y = MYMIN(oldpos_i.Y, newpos_i.Y) + (box_0.MinEdge.Y / BS) - 1;
|
||||
s16 min_z = MYMIN(oldpos_i.Z, newpos_i.Z) + (box_0.MinEdge.Z / BS) - 1;
|
||||
s16 max_x = MYMAX(oldpos_i.X, newpos_i.X) + (box_0.MaxEdge.X / BS) + 1;
|
||||
s16 max_y = MYMAX(oldpos_i.Y, newpos_i.Y) + (box_0.MaxEdge.Y / BS) + 1;
|
||||
s16 max_z = MYMAX(oldpos_i.Z, newpos_i.Z) + (box_0.MaxEdge.Z / BS) + 1;
|
||||
|
||||
for(s16 x = min_x; x <= max_x; x++)
|
||||
for(s16 y = min_y; y <= max_y; y++)
|
||||
for(s16 z = min_z; z <= max_z; z++)
|
||||
{
|
||||
v3s16 p(x,y,z);
|
||||
try{
|
||||
// Object collides into walkable nodes
|
||||
MapNode n = map->getNode(p);
|
||||
const ContentFeatures &f = gamedef->getNodeDefManager()->get(n);
|
||||
if(f.walkable == false)
|
||||
continue;
|
||||
int n_bouncy_value = itemgroup_get(f.groups, "bouncy");
|
||||
|
||||
std::vector<aabb3f> nodeboxes = n.getNodeBoxes(gamedef->ndef());
|
||||
for(std::vector<aabb3f>::iterator
|
||||
i = nodeboxes.begin();
|
||||
i != nodeboxes.end(); i++)
|
||||
{
|
||||
aabb3f box = *i;
|
||||
box.MinEdge += v3f(x, y, z)*BS;
|
||||
box.MaxEdge += v3f(x, y, z)*BS;
|
||||
cboxes.push_back(box);
|
||||
is_unloaded.push_back(false);
|
||||
is_step_up.push_back(false);
|
||||
bouncy_values.push_back(n_bouncy_value);
|
||||
node_positions.push_back(p);
|
||||
is_object.push_back(false);
|
||||
}
|
||||
}
|
||||
catch(InvalidPositionException &e)
|
||||
{
|
||||
// Collide with unloaded nodes
|
||||
aabb3f box = getNodeBox(p, BS);
|
||||
cboxes.push_back(box);
|
||||
is_unloaded.push_back(true);
|
||||
is_step_up.push_back(false);
|
||||
bouncy_values.push_back(0);
|
||||
node_positions.push_back(p);
|
||||
is_object.push_back(false);
|
||||
}
|
||||
}
|
||||
} // tt2
|
||||
|
||||
{
|
||||
ScopeProfiler sp(g_profiler, "collisionMoveSimple objects avg", SPT_AVG);
|
||||
//TimeTaker tt3("collisionMoveSimple collect object boxes");
|
||||
|
||||
/* add object boxes to cboxes */
|
||||
|
||||
|
||||
std::list<ActiveObject*> objects;
|
||||
#ifndef SERVER
|
||||
ClientEnvironment *c_env = dynamic_cast<ClientEnvironment*>(env);
|
||||
if (c_env != 0)
|
||||
{
|
||||
f32 distance = speed_f.getLength();
|
||||
std::vector<DistanceSortedActiveObject> clientobjects;
|
||||
c_env->getActiveObjects(pos_f,distance * 1.5,clientobjects);
|
||||
for (int i=0; i < clientobjects.size(); i++)
|
||||
{
|
||||
objects.push_back((ActiveObject*)clientobjects[i].obj);
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
ServerEnvironment *s_env = dynamic_cast<ServerEnvironment*>(env);
|
||||
if (s_env != 0)
|
||||
{
|
||||
f32 distance = speed_f.getLength();
|
||||
std::set<u16> s_objects = s_env->getObjectsInsideRadius(pos_f,distance * 1.5);
|
||||
for (std::set<u16>::iterator iter = s_objects.begin(); iter != s_objects.end(); iter++)
|
||||
{
|
||||
ServerActiveObject *current = s_env->getActiveObject(*iter);
|
||||
objects.push_back((ActiveObject*)current);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (std::list<ActiveObject*>::const_iterator iter = objects.begin();iter != objects.end(); ++iter)
|
||||
{
|
||||
ActiveObject *object = *iter;
|
||||
|
||||
if (object != NULL)
|
||||
{
|
||||
aabb3f object_collisionbox;
|
||||
if (object->getCollisionBox(&object_collisionbox))
|
||||
{
|
||||
cboxes.push_back(object_collisionbox);
|
||||
is_unloaded.push_back(false);
|
||||
is_step_up.push_back(false);
|
||||
bouncy_values.push_back(0);
|
||||
node_positions.push_back(v3s16(0,0,0));
|
||||
is_object.push_back(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
} //tt3
|
||||
|
||||
assert(cboxes.size() == is_unloaded.size());
|
||||
assert(cboxes.size() == is_step_up.size());
|
||||
assert(cboxes.size() == bouncy_values.size());
|
||||
assert(cboxes.size() == node_positions.size());
|
||||
assert(cboxes.size() == is_object.size());
|
||||
|
||||
/*
|
||||
Collision detection
|
||||
*/
|
||||
|
||||
// position in nodes
|
||||
v3s16 pos_i = floatToInt(pos_f, BS);
|
||||
|
||||
|
||||
/*
|
||||
Collision uncertainty radius
|
||||
Make it a bit larger than the maximum distance of movement
|
||||
@@ -58,49 +354,165 @@ collisionMoveResult collisionMoveSimple(Map *map, IGameDef *gamedef,
|
||||
|
||||
// This should always apply, otherwise there are glitches
|
||||
assert(d > pos_max_d);
|
||||
|
||||
/*
|
||||
Calculate collision box
|
||||
*/
|
||||
core::aabbox3d<f32> box = box_0;
|
||||
box.MaxEdge += pos_f;
|
||||
box.MinEdge += pos_f;
|
||||
core::aabbox3d<f32> oldbox = box_0;
|
||||
oldbox.MaxEdge += oldpos_f;
|
||||
oldbox.MinEdge += oldpos_f;
|
||||
|
||||
/*
|
||||
If the object lies on a walkable node, this is set to true.
|
||||
*/
|
||||
result.touching_ground = false;
|
||||
|
||||
/*
|
||||
Go through every node around the object
|
||||
*/
|
||||
s16 min_x = (box_0.MinEdge.X / BS) - 2;
|
||||
s16 min_y = (box_0.MinEdge.Y / BS) - 2;
|
||||
s16 min_z = (box_0.MinEdge.Z / BS) - 2;
|
||||
s16 max_x = (box_0.MaxEdge.X / BS) + 1;
|
||||
s16 max_y = (box_0.MaxEdge.Y / BS) + 1;
|
||||
s16 max_z = (box_0.MaxEdge.Z / BS) + 1;
|
||||
for(s16 y = oldpos_i.Y + min_y; y <= oldpos_i.Y + max_y; y++)
|
||||
for(s16 z = oldpos_i.Z + min_z; z <= oldpos_i.Z + max_z; z++)
|
||||
for(s16 x = oldpos_i.X + min_x; x <= oldpos_i.X + max_x; x++)
|
||||
int loopcount = 0;
|
||||
|
||||
while(dtime > BS*1e-10)
|
||||
{
|
||||
try{
|
||||
// Object collides into walkable nodes
|
||||
MapNode n = map->getNode(v3s16(x,y,z));
|
||||
if(gamedef->getNodeDefManager()->get(n).walkable == false)
|
||||
continue;
|
||||
}
|
||||
catch(InvalidPositionException &e)
|
||||
//TimeTaker tt3("collisionMoveSimple dtime loop");
|
||||
ScopeProfiler sp(g_profiler, "collisionMoveSimple dtime loop avg", SPT_AVG);
|
||||
|
||||
// Avoid infinite loop
|
||||
loopcount++;
|
||||
if(loopcount >= 100)
|
||||
{
|
||||
// Doing nothing here will block the object from
|
||||
// walking over map borders
|
||||
infostream<<"collisionMoveSimple: WARNING: Loop count exceeded, aborting to avoid infiniite loop"<<std::endl;
|
||||
dtime = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
core::aabbox3d<f32> nodebox = getNodeBox(v3s16(x,y,z), BS);
|
||||
|
||||
aabb3f movingbox = box_0;
|
||||
movingbox.MinEdge += pos_f;
|
||||
movingbox.MaxEdge += pos_f;
|
||||
|
||||
int nearest_collided = -1;
|
||||
f32 nearest_dtime = dtime;
|
||||
u32 nearest_boxindex = -1;
|
||||
|
||||
/*
|
||||
Go through every nodebox, find nearest collision
|
||||
*/
|
||||
for(u32 boxindex = 0; boxindex < cboxes.size(); boxindex++)
|
||||
{
|
||||
// Ignore if already stepped up this nodebox.
|
||||
if(is_step_up[boxindex])
|
||||
continue;
|
||||
|
||||
// Find nearest collision of the two boxes (raytracing-like)
|
||||
f32 dtime_tmp;
|
||||
int collided = axisAlignedCollision(
|
||||
cboxes[boxindex], movingbox, speed_f, d, dtime_tmp);
|
||||
|
||||
if(collided == -1 || dtime_tmp >= nearest_dtime)
|
||||
continue;
|
||||
|
||||
nearest_dtime = dtime_tmp;
|
||||
nearest_collided = collided;
|
||||
nearest_boxindex = boxindex;
|
||||
}
|
||||
|
||||
if(nearest_collided == -1)
|
||||
{
|
||||
// No collision with any collision box.
|
||||
pos_f += speed_f * dtime;
|
||||
dtime = 0; // Set to 0 to avoid "infinite" loop due to small FP numbers
|
||||
}
|
||||
else
|
||||
{
|
||||
// Otherwise, a collision occurred.
|
||||
|
||||
const aabb3f& cbox = cboxes[nearest_boxindex];
|
||||
|
||||
// Check for stairs.
|
||||
bool step_up = (nearest_collided != 1) && // must not be Y direction
|
||||
(movingbox.MinEdge.Y < cbox.MaxEdge.Y) &&
|
||||
(movingbox.MinEdge.Y + stepheight > cbox.MaxEdge.Y) &&
|
||||
(!wouldCollideWithCeiling(cboxes, movingbox,
|
||||
cbox.MaxEdge.Y - movingbox.MinEdge.Y,
|
||||
d));
|
||||
|
||||
// Get bounce multiplier
|
||||
bool bouncy = (bouncy_values[nearest_boxindex] >= 1);
|
||||
float bounce = -(float)bouncy_values[nearest_boxindex] / 100.0;
|
||||
|
||||
// Move to the point of collision and reduce dtime by nearest_dtime
|
||||
if(nearest_dtime < 0)
|
||||
{
|
||||
// Handle negative nearest_dtime (can be caused by the d allowance)
|
||||
if(!step_up)
|
||||
{
|
||||
if(nearest_collided == 0)
|
||||
pos_f.X += speed_f.X * nearest_dtime;
|
||||
if(nearest_collided == 1)
|
||||
pos_f.Y += speed_f.Y * nearest_dtime;
|
||||
if(nearest_collided == 2)
|
||||
pos_f.Z += speed_f.Z * nearest_dtime;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pos_f += speed_f * nearest_dtime;
|
||||
dtime -= nearest_dtime;
|
||||
}
|
||||
|
||||
bool is_collision = true;
|
||||
if(is_unloaded[nearest_boxindex])
|
||||
is_collision = false;
|
||||
|
||||
CollisionInfo info;
|
||||
if (is_object[nearest_boxindex]) {
|
||||
info.type = COLLISION_OBJECT;
|
||||
}
|
||||
else
|
||||
info.type = COLLISION_NODE;
|
||||
info.node_p = node_positions[nearest_boxindex];
|
||||
info.bouncy = bouncy;
|
||||
info.old_speed = speed_f;
|
||||
|
||||
// Set the speed component that caused the collision to zero
|
||||
if(step_up)
|
||||
{
|
||||
// Special case: Handle stairs
|
||||
is_step_up[nearest_boxindex] = true;
|
||||
is_collision = false;
|
||||
}
|
||||
else if(nearest_collided == 0) // X
|
||||
{
|
||||
if(fabs(speed_f.X) > BS*3)
|
||||
speed_f.X *= bounce;
|
||||
else
|
||||
speed_f.X = 0;
|
||||
result.collides = true;
|
||||
result.collides_xz = true;
|
||||
}
|
||||
else if(nearest_collided == 1) // Y
|
||||
{
|
||||
if(fabs(speed_f.Y) > BS*3)
|
||||
speed_f.Y *= bounce;
|
||||
else
|
||||
speed_f.Y = 0;
|
||||
result.collides = true;
|
||||
}
|
||||
else if(nearest_collided == 2) // Z
|
||||
{
|
||||
if(fabs(speed_f.Z) > BS*3)
|
||||
speed_f.Z *= bounce;
|
||||
else
|
||||
speed_f.Z = 0;
|
||||
result.collides = true;
|
||||
result.collides_xz = true;
|
||||
}
|
||||
|
||||
info.new_speed = speed_f;
|
||||
if(info.new_speed.getDistanceFrom(info.old_speed) < 0.1*BS)
|
||||
is_collision = false;
|
||||
|
||||
if(is_collision){
|
||||
result.collisions.push_back(info);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Final touches: Check if standing on ground, step up stairs.
|
||||
*/
|
||||
aabb3f box = box_0;
|
||||
box.MinEdge += pos_f;
|
||||
box.MaxEdge += pos_f;
|
||||
for(u32 boxindex = 0; boxindex < cboxes.size(); boxindex++)
|
||||
{
|
||||
const aabb3f& cbox = cboxes[boxindex];
|
||||
|
||||
/*
|
||||
See if the object is touching ground.
|
||||
|
||||
@@ -111,112 +523,50 @@ collisionMoveResult collisionMoveSimple(Map *map, IGameDef *gamedef,
|
||||
Use 0.15*BS so that it is easier to get on a node.
|
||||
*/
|
||||
if(
|
||||
//fabs(nodebox.MaxEdge.Y-box.MinEdge.Y) < d
|
||||
fabs(nodebox.MaxEdge.Y-box.MinEdge.Y) < 0.15*BS
|
||||
&& nodebox.MaxEdge.X-d > box.MinEdge.X
|
||||
&& nodebox.MinEdge.X+d < box.MaxEdge.X
|
||||
&& nodebox.MaxEdge.Z-d > box.MinEdge.Z
|
||||
&& nodebox.MinEdge.Z+d < box.MaxEdge.Z
|
||||
cbox.MaxEdge.X-d > box.MinEdge.X &&
|
||||
cbox.MinEdge.X+d < box.MaxEdge.X &&
|
||||
cbox.MaxEdge.Z-d > box.MinEdge.Z &&
|
||||
cbox.MinEdge.Z+d < box.MaxEdge.Z
|
||||
){
|
||||
result.touching_ground = true;
|
||||
}
|
||||
|
||||
// If object doesn't intersect with node, ignore node.
|
||||
if(box.intersectsWithBox(nodebox) == false)
|
||||
continue;
|
||||
|
||||
/*
|
||||
Go through every axis
|
||||
*/
|
||||
v3f dirs[3] = {
|
||||
v3f(0,0,1), // back-front
|
||||
v3f(0,1,0), // top-bottom
|
||||
v3f(1,0,0), // right-left
|
||||
};
|
||||
for(u16 i=0; i<3; i++)
|
||||
{
|
||||
/*
|
||||
Calculate values along the axis
|
||||
*/
|
||||
f32 nodemax = nodebox.MaxEdge.dotProduct(dirs[i]);
|
||||
f32 nodemin = nodebox.MinEdge.dotProduct(dirs[i]);
|
||||
f32 objectmax = box.MaxEdge.dotProduct(dirs[i]);
|
||||
f32 objectmin = box.MinEdge.dotProduct(dirs[i]);
|
||||
f32 objectmax_old = oldbox.MaxEdge.dotProduct(dirs[i]);
|
||||
f32 objectmin_old = oldbox.MinEdge.dotProduct(dirs[i]);
|
||||
|
||||
/*
|
||||
Check collision for the axis.
|
||||
Collision happens when object is going through a surface.
|
||||
*/
|
||||
bool negative_axis_collides =
|
||||
(nodemax > objectmin && nodemax <= objectmin_old + d
|
||||
&& speed_f.dotProduct(dirs[i]) < 0);
|
||||
bool positive_axis_collides =
|
||||
(nodemin < objectmax && nodemin >= objectmax_old - d
|
||||
&& speed_f.dotProduct(dirs[i]) > 0);
|
||||
bool main_axis_collides =
|
||||
negative_axis_collides || positive_axis_collides;
|
||||
|
||||
/*
|
||||
Check overlap of object and node in other axes
|
||||
*/
|
||||
bool other_axes_overlap = true;
|
||||
for(u16 j=0; j<3; j++)
|
||||
if(is_step_up[boxindex])
|
||||
{
|
||||
if(j == i)
|
||||
continue;
|
||||
f32 nodemax = nodebox.MaxEdge.dotProduct(dirs[j]);
|
||||
f32 nodemin = nodebox.MinEdge.dotProduct(dirs[j]);
|
||||
f32 objectmax = box.MaxEdge.dotProduct(dirs[j]);
|
||||
f32 objectmin = box.MinEdge.dotProduct(dirs[j]);
|
||||
if(!(nodemax - d > objectmin && nodemin + d < objectmax))
|
||||
{
|
||||
other_axes_overlap = false;
|
||||
break;
|
||||
}
|
||||
pos_f.Y += (cbox.MaxEdge.Y - box.MinEdge.Y);
|
||||
box = box_0;
|
||||
box.MinEdge += pos_f;
|
||||
box.MaxEdge += pos_f;
|
||||
}
|
||||
|
||||
/*
|
||||
If this is a collision, revert the pos_f in the main
|
||||
direction.
|
||||
*/
|
||||
if(other_axes_overlap && main_axis_collides)
|
||||
if(fabs(cbox.MaxEdge.Y-box.MinEdge.Y) < 0.15*BS)
|
||||
{
|
||||
speed_f -= speed_f.dotProduct(dirs[i]) * dirs[i];
|
||||
pos_f -= pos_f.dotProduct(dirs[i]) * dirs[i];
|
||||
pos_f += oldpos_f.dotProduct(dirs[i]) * dirs[i];
|
||||
result.collides = true;
|
||||
result.touching_ground = true;
|
||||
if(is_unloaded[boxindex])
|
||||
result.standing_on_unloaded = true;
|
||||
}
|
||||
|
||||
}
|
||||
} // xyz
|
||||
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#if 0
|
||||
// This doesn't seem to work and isn't used
|
||||
collisionMoveResult collisionMovePrecise(Map *map, IGameDef *gamedef,
|
||||
f32 pos_max_d, const core::aabbox3d<f32> &box_0,
|
||||
f32 dtime, v3f &pos_f, v3f &speed_f)
|
||||
f32 pos_max_d, const aabb3f &box_0,
|
||||
f32 stepheight, f32 dtime,
|
||||
v3f &pos_f, v3f &speed_f, v3f &accel_f)
|
||||
{
|
||||
collisionMoveResult final_result;
|
||||
//TimeTaker tt("collisionMovePrecise");
|
||||
ScopeProfiler sp(g_profiler, "collisionMovePrecise avg", SPT_AVG);
|
||||
|
||||
collisionMoveResult final_result;
|
||||
|
||||
// If there is no speed, there are no collisions
|
||||
if(speed_f.getLength() == 0)
|
||||
return final_result;
|
||||
|
||||
// Maximum time increment (for collision detection etc)
|
||||
// time = distance / speed
|
||||
f32 dtime_max_increment = pos_max_d / speed_f.getLength();
|
||||
|
||||
// Maximum time increment is 10ms or lower
|
||||
if(dtime_max_increment > 0.01)
|
||||
dtime_max_increment = 0.01;
|
||||
|
||||
// Don't allow overly huge dtime
|
||||
if(dtime > 2.0)
|
||||
dtime = 2.0;
|
||||
|
||||
|
||||
f32 dtime_downcount = dtime;
|
||||
|
||||
u32 loopcount = 0;
|
||||
@@ -224,6 +574,16 @@ collisionMoveResult collisionMovePrecise(Map *map, IGameDef *gamedef,
|
||||
{
|
||||
loopcount++;
|
||||
|
||||
// Maximum time increment (for collision detection etc)
|
||||
// time = distance / speed
|
||||
f32 dtime_max_increment = 1.0;
|
||||
if(speed_f.getLength() != 0)
|
||||
dtime_max_increment = pos_max_d / speed_f.getLength();
|
||||
|
||||
// Maximum time increment is 10ms or lower
|
||||
if(dtime_max_increment > 0.01)
|
||||
dtime_max_increment = 0.01;
|
||||
|
||||
f32 dtime_part;
|
||||
if(dtime_downcount > dtime_max_increment)
|
||||
{
|
||||
@@ -242,17 +602,20 @@ collisionMoveResult collisionMovePrecise(Map *map, IGameDef *gamedef,
|
||||
}
|
||||
|
||||
collisionMoveResult result = collisionMoveSimple(map, gamedef,
|
||||
pos_max_d, box_0, dtime_part, pos_f, speed_f);
|
||||
pos_max_d, box_0, stepheight, dtime_part,
|
||||
pos_f, speed_f, accel_f);
|
||||
|
||||
if(result.touching_ground)
|
||||
final_result.touching_ground = true;
|
||||
if(result.collides)
|
||||
final_result.collides = true;
|
||||
if(result.collides_xz)
|
||||
final_result.collides_xz = true;
|
||||
if(result.standing_on_unloaded)
|
||||
final_result.standing_on_unloaded = true;
|
||||
}
|
||||
while(dtime_downcount > 0.001);
|
||||
|
||||
|
||||
return final_result;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
Minetest-c55
|
||||
Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Minetest
|
||||
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
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 General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
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.
|
||||
*/
|
||||
@@ -20,42 +20,82 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#ifndef COLLISION_HEADER
|
||||
#define COLLISION_HEADER
|
||||
|
||||
#include "common_irrlicht.h"
|
||||
#include "irrlichttypes_bloated.h"
|
||||
#include <vector>
|
||||
|
||||
class Map;
|
||||
class IGameDef;
|
||||
class Environment;
|
||||
|
||||
enum CollisionType
|
||||
{
|
||||
COLLISION_NODE,
|
||||
COLLISION_OBJECT,
|
||||
};
|
||||
|
||||
struct CollisionInfo
|
||||
{
|
||||
enum CollisionType type;
|
||||
v3s16 node_p; // COLLISION_NODE
|
||||
bool bouncy;
|
||||
v3f old_speed;
|
||||
v3f new_speed;
|
||||
|
||||
CollisionInfo():
|
||||
type(COLLISION_NODE),
|
||||
node_p(-32768,-32768,-32768),
|
||||
bouncy(false),
|
||||
old_speed(0,0,0),
|
||||
new_speed(0,0,0)
|
||||
{}
|
||||
};
|
||||
|
||||
struct collisionMoveResult
|
||||
{
|
||||
bool touching_ground;
|
||||
bool collides;
|
||||
bool collides_xz;
|
||||
bool standing_on_unloaded;
|
||||
std::vector<CollisionInfo> collisions;
|
||||
|
||||
collisionMoveResult():
|
||||
touching_ground(false),
|
||||
collides(false)
|
||||
collides(false),
|
||||
collides_xz(false),
|
||||
standing_on_unloaded(false)
|
||||
{}
|
||||
};
|
||||
|
||||
// Moves using a single iteration; speed should not exceed pos_max_d/dtime
|
||||
collisionMoveResult collisionMoveSimple(Map *map, IGameDef *gamedef,
|
||||
f32 pos_max_d, const core::aabbox3d<f32> &box_0,
|
||||
f32 dtime, v3f &pos_f, v3f &speed_f);
|
||||
collisionMoveResult collisionMoveSimple(Environment *env,IGameDef *gamedef,
|
||||
f32 pos_max_d, const aabb3f &box_0,
|
||||
f32 stepheight, f32 dtime,
|
||||
v3f &pos_f, v3f &speed_f, v3f &accel_f);
|
||||
|
||||
#if 0
|
||||
// This doesn't seem to work and isn't used
|
||||
// Moves using as many iterations as needed
|
||||
collisionMoveResult collisionMovePrecise(Map *map, IGameDef *gamedef,
|
||||
f32 pos_max_d, const core::aabbox3d<f32> &box_0,
|
||||
f32 dtime, v3f &pos_f, v3f &speed_f);
|
||||
f32 pos_max_d, const aabb3f &box_0,
|
||||
f32 stepheight, f32 dtime,
|
||||
v3f &pos_f, v3f &speed_f, v3f &accel_f);
|
||||
#endif
|
||||
|
||||
enum CollisionType
|
||||
{
|
||||
COLLISION_FALL
|
||||
};
|
||||
// Helper function:
|
||||
// Checks for collision of a moving aabbox with a static aabbox
|
||||
// Returns -1 if no collision, 0 if X collision, 1 if Y collision, 2 if Z collision
|
||||
// dtime receives time until first collision, invalid if -1 is returned
|
||||
int axisAlignedCollision(
|
||||
const aabb3f &staticbox, const aabb3f &movingbox,
|
||||
const v3f &speed, f32 d, f32 &dtime);
|
||||
|
||||
// Helper function:
|
||||
// Checks if moving the movingbox up by the given distance would hit a ceiling.
|
||||
bool wouldCollideWithCeiling(
|
||||
const std::vector<aabb3f> &staticboxes,
|
||||
const aabb3f &movingbox,
|
||||
f32 y_increase, f32 d);
|
||||
|
||||
struct CollisionInfo
|
||||
{
|
||||
CollisionType t;
|
||||
f32 speed;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
15
src/config.h
@@ -8,9 +8,12 @@
|
||||
|
||||
#define PROJECT_NAME "Minetest"
|
||||
#define VERSION_STRING "unknown"
|
||||
#define BUILD_TYPE "unknown"
|
||||
#define RUN_IN_PLACE 0
|
||||
#define USE_GETTEXT 0
|
||||
#define USE_SOUND 0
|
||||
#define USE_CURL 0
|
||||
#define USE_FREETYPE 0
|
||||
#define STATIC_SHAREDIR ""
|
||||
#define BUILD_INFO "non-cmake"
|
||||
|
||||
#ifdef USE_CMAKE_CONFIG_H
|
||||
@@ -19,12 +22,18 @@
|
||||
#define PROJECT_NAME CMAKE_PROJECT_NAME
|
||||
#undef VERSION_STRING
|
||||
#define VERSION_STRING CMAKE_VERSION_STRING
|
||||
#undef BUILD_INFO
|
||||
#define BUILD_INFO CMAKE_BUILD_INFO
|
||||
#undef RUN_IN_PLACE
|
||||
#define RUN_IN_PLACE CMAKE_RUN_IN_PLACE
|
||||
#undef USE_GETTEXT
|
||||
#define USE_GETTEXT CMAKE_USE_GETTEXT
|
||||
#undef USE_SOUND
|
||||
#define USE_SOUND CMAKE_USE_SOUND
|
||||
#undef USE_CURL
|
||||
#define USE_CURL CMAKE_USE_CURL
|
||||
#undef USE_FREETYPE
|
||||
#define USE_FREETYPE CMAKE_USE_FREETYPE
|
||||
#undef STATIC_SHAREDIR
|
||||
#define STATIC_SHAREDIR CMAKE_STATIC_SHAREDIR
|
||||
#undef BUILD_INFO
|
||||
#define BUILD_INFO CMAKE_BUILD_INFO
|
||||
#endif
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
Minetest-c55
|
||||
Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Minetest
|
||||
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
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 General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
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.
|
||||
*/
|
||||
@@ -22,10 +22,23 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "serialization.h"
|
||||
#include "log.h"
|
||||
#include "porting.h"
|
||||
#include "util/serialize.h"
|
||||
#include "util/numeric.h"
|
||||
#include "util/string.h"
|
||||
#include "settings.h"
|
||||
|
||||
namespace con
|
||||
{
|
||||
|
||||
static u16 readPeerId(u8 *packetdata)
|
||||
{
|
||||
return readU16(&packetdata[4]);
|
||||
}
|
||||
static u8 readChannel(u8 *packetdata)
|
||||
{
|
||||
return readU8(&packetdata[6]);
|
||||
}
|
||||
|
||||
BufferedPacket makePacket(Address &address, u8 *data, u32 datasize,
|
||||
u32 protocol_id, u16 sender_peer_id, u8 channel)
|
||||
{
|
||||
@@ -63,19 +76,20 @@ SharedBuffer<u8> makeOriginalPacket(
|
||||
return b;
|
||||
}
|
||||
|
||||
core::list<SharedBuffer<u8> > makeSplitPacket(
|
||||
std::list<SharedBuffer<u8> > makeSplitPacket(
|
||||
SharedBuffer<u8> data,
|
||||
u32 chunksize_max,
|
||||
u16 seqnum)
|
||||
{
|
||||
// Chunk packets, containing the TYPE_SPLIT header
|
||||
core::list<SharedBuffer<u8> > chunks;
|
||||
std::list<SharedBuffer<u8> > chunks;
|
||||
|
||||
u32 chunk_header_size = 7;
|
||||
u32 maximum_data_size = chunksize_max - chunk_header_size;
|
||||
u32 start = 0;
|
||||
u32 end = 0;
|
||||
u32 chunk_num = 0;
|
||||
u16 chunk_count = 0;
|
||||
do{
|
||||
end = start + maximum_data_size - 1;
|
||||
if(end > data.getSize() - 1)
|
||||
@@ -93,16 +107,15 @@ core::list<SharedBuffer<u8> > makeSplitPacket(
|
||||
memcpy(&chunk[chunk_header_size], &data[start], payload_size);
|
||||
|
||||
chunks.push_back(chunk);
|
||||
chunk_count++;
|
||||
|
||||
start = end + 1;
|
||||
chunk_num++;
|
||||
}
|
||||
while(end != data.getSize() - 1);
|
||||
|
||||
u16 chunk_count = chunks.getSize();
|
||||
|
||||
core::list<SharedBuffer<u8> >::Iterator i = chunks.begin();
|
||||
for(; i != chunks.end(); i++)
|
||||
for(std::list<SharedBuffer<u8> >::iterator i = chunks.begin();
|
||||
i != chunks.end(); ++i)
|
||||
{
|
||||
// Write chunk_count
|
||||
writeU16(&((*i)[3]), chunk_count);
|
||||
@@ -111,13 +124,13 @@ core::list<SharedBuffer<u8> > makeSplitPacket(
|
||||
return chunks;
|
||||
}
|
||||
|
||||
core::list<SharedBuffer<u8> > makeAutoSplitPacket(
|
||||
std::list<SharedBuffer<u8> > makeAutoSplitPacket(
|
||||
SharedBuffer<u8> data,
|
||||
u32 chunksize_max,
|
||||
u16 &split_seqnum)
|
||||
{
|
||||
u32 original_header_size = 1;
|
||||
core::list<SharedBuffer<u8> > list;
|
||||
std::list<SharedBuffer<u8> > list;
|
||||
if(data.getSize() + original_header_size > chunksize_max)
|
||||
{
|
||||
list = makeSplitPacket(data, chunksize_max, split_seqnum);
|
||||
@@ -157,11 +170,13 @@ SharedBuffer<u8> makeReliablePacket(
|
||||
ReliablePacketBuffer
|
||||
*/
|
||||
|
||||
ReliablePacketBuffer::ReliablePacketBuffer(): m_list_size(0) {}
|
||||
|
||||
void ReliablePacketBuffer::print()
|
||||
{
|
||||
core::list<BufferedPacket>::Iterator i;
|
||||
i = m_list.begin();
|
||||
for(; i != m_list.end(); i++)
|
||||
for(std::list<BufferedPacket>::iterator i = m_list.begin();
|
||||
i != m_list.end();
|
||||
++i)
|
||||
{
|
||||
u16 s = readU16(&(i->data[BASE_HEADER_SIZE+1]));
|
||||
dout_con<<s<<" ";
|
||||
@@ -173,13 +188,12 @@ bool ReliablePacketBuffer::empty()
|
||||
}
|
||||
u32 ReliablePacketBuffer::size()
|
||||
{
|
||||
return m_list.getSize();
|
||||
return m_list_size;
|
||||
}
|
||||
RPBSearchResult ReliablePacketBuffer::findPacket(u16 seqnum)
|
||||
{
|
||||
core::list<BufferedPacket>::Iterator i;
|
||||
i = m_list.begin();
|
||||
for(; i != m_list.end(); i++)
|
||||
std::list<BufferedPacket>::iterator i = m_list.begin();
|
||||
for(; i != m_list.end(); ++i)
|
||||
{
|
||||
u16 s = readU16(&(i->data[BASE_HEADER_SIZE+1]));
|
||||
/*dout_con<<"findPacket(): finding seqnum="<<seqnum
|
||||
@@ -205,8 +219,8 @@ BufferedPacket ReliablePacketBuffer::popFirst()
|
||||
if(empty())
|
||||
throw NotFoundException("Buffer is empty");
|
||||
BufferedPacket p = *m_list.begin();
|
||||
core::list<BufferedPacket>::Iterator i = m_list.begin();
|
||||
m_list.erase(i);
|
||||
m_list.erase(m_list.begin());
|
||||
--m_list_size;
|
||||
return p;
|
||||
}
|
||||
BufferedPacket ReliablePacketBuffer::popSeqnum(u16 seqnum)
|
||||
@@ -218,6 +232,7 @@ BufferedPacket ReliablePacketBuffer::popSeqnum(u16 seqnum)
|
||||
}
|
||||
BufferedPacket p = *r;
|
||||
m_list.erase(r);
|
||||
--m_list_size;
|
||||
return p;
|
||||
}
|
||||
void ReliablePacketBuffer::insert(BufferedPacket &p)
|
||||
@@ -227,6 +242,7 @@ void ReliablePacketBuffer::insert(BufferedPacket &p)
|
||||
assert(type == TYPE_RELIABLE);
|
||||
u16 seqnum = readU16(&p.data[BASE_HEADER_SIZE+1]);
|
||||
|
||||
++m_list_size;
|
||||
// Find the right place for the packet and insert it there
|
||||
|
||||
// If list is empty, just add it
|
||||
@@ -237,12 +253,12 @@ void ReliablePacketBuffer::insert(BufferedPacket &p)
|
||||
return;
|
||||
}
|
||||
// Otherwise find the right place
|
||||
core::list<BufferedPacket>::Iterator i;
|
||||
i = m_list.begin();
|
||||
std::list<BufferedPacket>::iterator i = m_list.begin();
|
||||
// Find the first packet in the list which has a higher seqnum
|
||||
for(; i != m_list.end(); i++){
|
||||
for(; i != m_list.end(); ++i){
|
||||
u16 s = readU16(&(i->data[BASE_HEADER_SIZE+1]));
|
||||
if(s == seqnum){
|
||||
--m_list_size;
|
||||
throw AlreadyExistsException("Same seqnum in list");
|
||||
}
|
||||
if(seqnum_higher(s, seqnum)){
|
||||
@@ -258,14 +274,14 @@ void ReliablePacketBuffer::insert(BufferedPacket &p)
|
||||
return;
|
||||
}
|
||||
// Insert before i
|
||||
m_list.insert_before(i, p);
|
||||
m_list.insert(i, p);
|
||||
}
|
||||
|
||||
void ReliablePacketBuffer::incrementTimeouts(float dtime)
|
||||
{
|
||||
core::list<BufferedPacket>::Iterator i;
|
||||
i = m_list.begin();
|
||||
for(; i != m_list.end(); i++){
|
||||
for(std::list<BufferedPacket>::iterator i = m_list.begin();
|
||||
i != m_list.end(); ++i)
|
||||
{
|
||||
i->time += dtime;
|
||||
i->totaltime += dtime;
|
||||
}
|
||||
@@ -273,9 +289,9 @@ void ReliablePacketBuffer::incrementTimeouts(float dtime)
|
||||
|
||||
void ReliablePacketBuffer::resetTimedOuts(float timeout)
|
||||
{
|
||||
core::list<BufferedPacket>::Iterator i;
|
||||
i = m_list.begin();
|
||||
for(; i != m_list.end(); i++){
|
||||
for(std::list<BufferedPacket>::iterator i = m_list.begin();
|
||||
i != m_list.end(); ++i)
|
||||
{
|
||||
if(i->time >= timeout)
|
||||
i->time = 0.0;
|
||||
}
|
||||
@@ -283,21 +299,20 @@ void ReliablePacketBuffer::resetTimedOuts(float timeout)
|
||||
|
||||
bool ReliablePacketBuffer::anyTotaltimeReached(float timeout)
|
||||
{
|
||||
core::list<BufferedPacket>::Iterator i;
|
||||
i = m_list.begin();
|
||||
for(; i != m_list.end(); i++){
|
||||
for(std::list<BufferedPacket>::iterator i = m_list.begin();
|
||||
i != m_list.end(); ++i)
|
||||
{
|
||||
if(i->totaltime >= timeout)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
core::list<BufferedPacket> ReliablePacketBuffer::getTimedOuts(float timeout)
|
||||
std::list<BufferedPacket> ReliablePacketBuffer::getTimedOuts(float timeout)
|
||||
{
|
||||
core::list<BufferedPacket> timed_outs;
|
||||
core::list<BufferedPacket>::Iterator i;
|
||||
i = m_list.begin();
|
||||
for(; i != m_list.end(); i++)
|
||||
std::list<BufferedPacket> timed_outs;
|
||||
for(std::list<BufferedPacket>::iterator i = m_list.begin();
|
||||
i != m_list.end(); ++i)
|
||||
{
|
||||
if(i->time >= timeout)
|
||||
timed_outs.push_back(*i);
|
||||
@@ -311,11 +326,10 @@ core::list<BufferedPacket> ReliablePacketBuffer::getTimedOuts(float timeout)
|
||||
|
||||
IncomingSplitBuffer::~IncomingSplitBuffer()
|
||||
{
|
||||
core::map<u16, IncomingSplitPacket*>::Iterator i;
|
||||
i = m_buf.getIterator();
|
||||
for(; i.atEnd() == false; i++)
|
||||
for(std::map<u16, IncomingSplitPacket*>::iterator i = m_buf.begin();
|
||||
i != m_buf.end(); ++i)
|
||||
{
|
||||
delete i.getNode()->getValue();
|
||||
delete i->second;
|
||||
}
|
||||
}
|
||||
/*
|
||||
@@ -333,7 +347,7 @@ SharedBuffer<u8> IncomingSplitBuffer::insert(BufferedPacket &p, bool reliable)
|
||||
u16 chunk_num = readU16(&p.data[BASE_HEADER_SIZE+5]);
|
||||
|
||||
// Add if doesn't exist
|
||||
if(m_buf.find(seqnum) == NULL)
|
||||
if(m_buf.find(seqnum) == m_buf.end())
|
||||
{
|
||||
IncomingSplitPacket *sp = new IncomingSplitPacket();
|
||||
sp->chunk_count = chunk_count;
|
||||
@@ -353,9 +367,11 @@ SharedBuffer<u8> IncomingSplitBuffer::insert(BufferedPacket &p, bool reliable)
|
||||
<<" != sp->reliable="<<sp->reliable
|
||||
<<std::endl;
|
||||
|
||||
// If chunk already exists, cancel
|
||||
if(sp->chunks.find(chunk_num) != NULL)
|
||||
throw AlreadyExistsException("Chunk already in buffer");
|
||||
// If chunk already exists, ignore it.
|
||||
// Sometimes two identical packets may arrive when there is network
|
||||
// lag and the server re-sends stuff.
|
||||
if(sp->chunks.find(chunk_num) != sp->chunks.end())
|
||||
return SharedBuffer<u8>();
|
||||
|
||||
// Cut chunk data out of packet
|
||||
u32 chunkdatasize = p.data.getSize() - headersize;
|
||||
@@ -371,11 +387,10 @@ SharedBuffer<u8> IncomingSplitBuffer::insert(BufferedPacket &p, bool reliable)
|
||||
|
||||
// Calculate total size
|
||||
u32 totalsize = 0;
|
||||
core::map<u16, SharedBuffer<u8> >::Iterator i;
|
||||
i = sp->chunks.getIterator();
|
||||
for(; i.atEnd() == false; i++)
|
||||
for(std::map<u16, SharedBuffer<u8> >::iterator i = sp->chunks.begin();
|
||||
i != sp->chunks.end(); ++i)
|
||||
{
|
||||
totalsize += i.getNode()->getValue().getSize();
|
||||
totalsize += i->second.getSize();
|
||||
}
|
||||
|
||||
SharedBuffer<u8> fulldata(totalsize);
|
||||
@@ -392,34 +407,32 @@ SharedBuffer<u8> IncomingSplitBuffer::insert(BufferedPacket &p, bool reliable)
|
||||
}
|
||||
|
||||
// Remove sp from buffer
|
||||
m_buf.remove(seqnum);
|
||||
m_buf.erase(seqnum);
|
||||
delete sp;
|
||||
|
||||
return fulldata;
|
||||
}
|
||||
void IncomingSplitBuffer::removeUnreliableTimedOuts(float dtime, float timeout)
|
||||
{
|
||||
core::list<u16> remove_queue;
|
||||
core::map<u16, IncomingSplitPacket*>::Iterator i;
|
||||
i = m_buf.getIterator();
|
||||
for(; i.atEnd() == false; i++)
|
||||
std::list<u16> remove_queue;
|
||||
for(std::map<u16, IncomingSplitPacket*>::iterator i = m_buf.begin();
|
||||
i != m_buf.end(); ++i)
|
||||
{
|
||||
IncomingSplitPacket *p = i.getNode()->getValue();
|
||||
IncomingSplitPacket *p = i->second;
|
||||
// Reliable ones are not removed by timeout
|
||||
if(p->reliable == true)
|
||||
continue;
|
||||
p->time += dtime;
|
||||
if(p->time >= timeout)
|
||||
remove_queue.push_back(i.getNode()->getKey());
|
||||
remove_queue.push_back(i->first);
|
||||
}
|
||||
core::list<u16>::Iterator j;
|
||||
j = remove_queue.begin();
|
||||
for(; j != remove_queue.end(); j++)
|
||||
for(std::list<u16>::iterator j = remove_queue.begin();
|
||||
j != remove_queue.end(); ++j)
|
||||
{
|
||||
dout_con<<"NOTE: Removing timed out unreliable split packet"
|
||||
<<std::endl;
|
||||
delete m_buf[*j];
|
||||
m_buf.remove(*j);
|
||||
m_buf.erase(*j);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -452,7 +465,10 @@ Peer::Peer(u16 a_id, Address a_address):
|
||||
m_sendtime_accu(0),
|
||||
m_max_packets_per_second(10),
|
||||
m_num_sent(0),
|
||||
m_max_num_sent(0)
|
||||
m_max_num_sent(0),
|
||||
congestion_control_aim_rtt(0.2),
|
||||
congestion_control_max_rate(400),
|
||||
congestion_control_min_rate(10)
|
||||
{
|
||||
}
|
||||
Peer::~Peer()
|
||||
@@ -463,15 +479,15 @@ void Peer::reportRTT(float rtt)
|
||||
{
|
||||
if(rtt >= 0.0){
|
||||
if(rtt < 0.01){
|
||||
if(m_max_packets_per_second < 400)
|
||||
if(m_max_packets_per_second < congestion_control_max_rate)
|
||||
m_max_packets_per_second += 10;
|
||||
} else if(rtt < 0.2){
|
||||
if(m_max_packets_per_second < 100)
|
||||
} else if(rtt < congestion_control_aim_rtt){
|
||||
if(m_max_packets_per_second < congestion_control_max_rate)
|
||||
m_max_packets_per_second += 2;
|
||||
} else {
|
||||
m_max_packets_per_second *= 0.8;
|
||||
if(m_max_packets_per_second < 10)
|
||||
m_max_packets_per_second = 10;
|
||||
if(m_max_packets_per_second < congestion_control_min_rate)
|
||||
m_max_packets_per_second = congestion_control_min_rate;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -538,12 +554,11 @@ Connection::~Connection()
|
||||
{
|
||||
stop();
|
||||
// Delete peers
|
||||
for(core::map<u16, Peer*>::Iterator
|
||||
j = m_peers.getIterator();
|
||||
j.atEnd() == false; j++)
|
||||
for(std::map<u16, Peer*>::iterator
|
||||
j = m_peers.begin();
|
||||
j != m_peers.end(); ++j)
|
||||
{
|
||||
Peer *peer = j.getNode()->getValue();
|
||||
delete peer;
|
||||
delete j->second;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -573,7 +588,7 @@ void * Connection::Thread()
|
||||
|
||||
runTimeouts(dtime);
|
||||
|
||||
while(m_command_queue.size() != 0){
|
||||
while(!m_command_queue.empty()){
|
||||
ConnectionCommand c = m_command_queue.pop_front();
|
||||
processCommand(c);
|
||||
}
|
||||
@@ -630,18 +645,18 @@ void Connection::processCommand(ConnectionCommand &c)
|
||||
|
||||
void Connection::send(float dtime)
|
||||
{
|
||||
for(core::map<u16, Peer*>::Iterator
|
||||
j = m_peers.getIterator();
|
||||
j.atEnd() == false; j++)
|
||||
for(std::map<u16, Peer*>::iterator
|
||||
j = m_peers.begin();
|
||||
j != m_peers.end(); ++j)
|
||||
{
|
||||
Peer *peer = j.getNode()->getValue();
|
||||
Peer *peer = j->second;
|
||||
peer->m_sendtime_accu += dtime;
|
||||
peer->m_num_sent = 0;
|
||||
peer->m_max_num_sent = peer->m_sendtime_accu *
|
||||
peer->m_max_packets_per_second;
|
||||
}
|
||||
Queue<OutgoingPacket> postponed_packets;
|
||||
while(m_outgoing_queue.size() != 0){
|
||||
while(!m_outgoing_queue.empty()){
|
||||
OutgoingPacket packet = m_outgoing_queue.pop_front();
|
||||
Peer *peer = getPeerNoEx(packet.peer_id);
|
||||
if(!peer)
|
||||
@@ -656,14 +671,14 @@ void Connection::send(float dtime)
|
||||
postponed_packets.push_back(packet);
|
||||
}
|
||||
}
|
||||
while(postponed_packets.size() != 0){
|
||||
while(!postponed_packets.empty()){
|
||||
m_outgoing_queue.push_back(postponed_packets.pop_front());
|
||||
}
|
||||
for(core::map<u16, Peer*>::Iterator
|
||||
j = m_peers.getIterator();
|
||||
j.atEnd() == false; j++)
|
||||
for(std::map<u16, Peer*>::iterator
|
||||
j = m_peers.begin();
|
||||
j != m_peers.end(); ++j)
|
||||
{
|
||||
Peer *peer = j.getNode()->getValue();
|
||||
Peer *peer = j->second;
|
||||
peer->m_sendtime_accu -= (float)peer->m_num_sent /
|
||||
peer->m_max_packets_per_second;
|
||||
if(peer->m_sendtime_accu > 10. / peer->m_max_packets_per_second)
|
||||
@@ -733,11 +748,11 @@ void Connection::receive()
|
||||
Allow only entries that have has_sent_with_id==false.
|
||||
*/
|
||||
|
||||
core::map<u16, Peer*>::Iterator j;
|
||||
j = m_peers.getIterator();
|
||||
for(; j.atEnd() == false; j++)
|
||||
std::map<u16, Peer*>::iterator j;
|
||||
j = m_peers.begin();
|
||||
for(; j != m_peers.end(); ++j)
|
||||
{
|
||||
Peer *peer = j.getNode()->getValue();
|
||||
Peer *peer = j->second;
|
||||
if(peer->has_sent_with_id)
|
||||
continue;
|
||||
if(peer->address == sender)
|
||||
@@ -748,14 +763,14 @@ void Connection::receive()
|
||||
If no peer was found with the same address and port,
|
||||
we shall assume it is a new peer and create an entry.
|
||||
*/
|
||||
if(j.atEnd())
|
||||
if(j == m_peers.end())
|
||||
{
|
||||
// Pass on to adding the peer
|
||||
}
|
||||
// Else: A peer was found.
|
||||
else
|
||||
{
|
||||
Peer *peer = j.getNode()->getValue();
|
||||
Peer *peer = j->second;
|
||||
peer_id = peer->id;
|
||||
PrintInfo(derr_con);
|
||||
derr_con<<"WARNING: Assuming unknown peer to be "
|
||||
@@ -779,7 +794,7 @@ void Connection::receive()
|
||||
for(;;)
|
||||
{
|
||||
// Check if exists
|
||||
if(m_peers.find(peer_id_new) == NULL)
|
||||
if(m_peers.find(peer_id_new) == m_peers.end())
|
||||
break;
|
||||
// Check for overflow
|
||||
if(peer_id_new == 65535){
|
||||
@@ -799,7 +814,7 @@ void Connection::receive()
|
||||
|
||||
// Create a peer
|
||||
Peer *peer = new Peer(peer_id_new, sender);
|
||||
m_peers.insert(peer->id, peer);
|
||||
m_peers[peer->id] = peer;
|
||||
|
||||
// Create peer addition event
|
||||
ConnectionEvent e;
|
||||
@@ -819,9 +834,9 @@ void Connection::receive()
|
||||
// Go on and process whatever it sent
|
||||
}
|
||||
|
||||
core::map<u16, Peer*>::Node *node = m_peers.find(peer_id);
|
||||
std::map<u16, Peer*>::iterator node = m_peers.find(peer_id);
|
||||
|
||||
if(node == NULL)
|
||||
if(node == m_peers.end())
|
||||
{
|
||||
// Peer not found
|
||||
// This means that the peer id of the sender is not PEER_ID_INEXISTENT
|
||||
@@ -831,7 +846,7 @@ void Connection::receive()
|
||||
throw InvalidIncomingDataException("Peer not found (possible timeout)");
|
||||
}
|
||||
|
||||
Peer *peer = node->getValue();
|
||||
Peer *peer = node->second;
|
||||
|
||||
// Validate peer address
|
||||
if(peer->address != sender)
|
||||
@@ -877,12 +892,23 @@ void Connection::receive()
|
||||
|
||||
void Connection::runTimeouts(float dtime)
|
||||
{
|
||||
core::list<u16> timeouted_peers;
|
||||
core::map<u16, Peer*>::Iterator j;
|
||||
j = m_peers.getIterator();
|
||||
for(; j.atEnd() == false; j++)
|
||||
float congestion_control_aim_rtt
|
||||
= g_settings->getFloat("congestion_control_aim_rtt");
|
||||
float congestion_control_max_rate
|
||||
= g_settings->getFloat("congestion_control_max_rate");
|
||||
float congestion_control_min_rate
|
||||
= g_settings->getFloat("congestion_control_min_rate");
|
||||
|
||||
std::list<u16> timeouted_peers;
|
||||
for(std::map<u16, Peer*>::iterator j = m_peers.begin();
|
||||
j != m_peers.end(); ++j)
|
||||
{
|
||||
Peer *peer = j.getNode()->getValue();
|
||||
Peer *peer = j->second;
|
||||
|
||||
// Update congestion control values
|
||||
peer->congestion_control_aim_rtt = congestion_control_aim_rtt;
|
||||
peer->congestion_control_max_rate = congestion_control_max_rate;
|
||||
peer->congestion_control_min_rate = congestion_control_min_rate;
|
||||
|
||||
/*
|
||||
Check peer timeout
|
||||
@@ -904,8 +930,7 @@ void Connection::runTimeouts(float dtime)
|
||||
float resend_timeout = peer->resend_timeout;
|
||||
for(u16 i=0; i<CHANNEL_COUNT; i++)
|
||||
{
|
||||
core::list<BufferedPacket> timed_outs;
|
||||
core::list<BufferedPacket>::Iterator j;
|
||||
std::list<BufferedPacket> timed_outs;
|
||||
|
||||
Channel *channel = &peer->channels[i];
|
||||
|
||||
@@ -936,8 +961,8 @@ void Connection::runTimeouts(float dtime)
|
||||
|
||||
channel->outgoing_reliables.resetTimedOuts(resend_timeout);
|
||||
|
||||
j = timed_outs.begin();
|
||||
for(; j != timed_outs.end(); j++)
|
||||
for(std::list<BufferedPacket>::iterator j = timed_outs.begin();
|
||||
j != timed_outs.end(); ++j)
|
||||
{
|
||||
u16 peer_id = readPeerId(*(j->data));
|
||||
u8 channel = readChannel(*(j->data));
|
||||
@@ -982,8 +1007,8 @@ void Connection::runTimeouts(float dtime)
|
||||
}
|
||||
|
||||
// Remove timed out peers
|
||||
core::list<u16>::Iterator i = timeouted_peers.begin();
|
||||
for(; i != timeouted_peers.end(); i++)
|
||||
for(std::list<u16>::iterator i = timeouted_peers.begin();
|
||||
i != timeouted_peers.end(); ++i)
|
||||
{
|
||||
PrintInfo(derr_con);
|
||||
derr_con<<"RunTimeouts(): Removing peer "<<(*i)<<std::endl;
|
||||
@@ -1011,13 +1036,13 @@ void Connection::connect(Address address)
|
||||
dout_con<<getDesc()<<" connecting to "<<address.serializeString()
|
||||
<<":"<<address.getPort()<<std::endl;
|
||||
|
||||
core::map<u16, Peer*>::Node *node = m_peers.find(PEER_ID_SERVER);
|
||||
if(node != NULL){
|
||||
std::map<u16, Peer*>::iterator node = m_peers.find(PEER_ID_SERVER);
|
||||
if(node != m_peers.end()){
|
||||
throw ConnectionException("Already connected to a server");
|
||||
}
|
||||
|
||||
Peer *peer = new Peer(PEER_ID_SERVER, address);
|
||||
m_peers.insert(peer->id, peer);
|
||||
m_peers[peer->id] = peer;
|
||||
|
||||
// Create event
|
||||
ConnectionEvent e;
|
||||
@@ -1042,22 +1067,20 @@ void Connection::disconnect()
|
||||
writeU8(&data[1], CONTROLTYPE_DISCO);
|
||||
|
||||
// Send to all
|
||||
core::map<u16, Peer*>::Iterator j;
|
||||
j = m_peers.getIterator();
|
||||
for(; j.atEnd() == false; j++)
|
||||
for(std::map<u16, Peer*>::iterator j = m_peers.begin();
|
||||
j != m_peers.end(); ++j)
|
||||
{
|
||||
Peer *peer = j.getNode()->getValue();
|
||||
Peer *peer = j->second;
|
||||
rawSendAsPacket(peer->id, 0, data, false);
|
||||
}
|
||||
}
|
||||
|
||||
void Connection::sendToAll(u8 channelnum, SharedBuffer<u8> data, bool reliable)
|
||||
{
|
||||
core::map<u16, Peer*>::Iterator j;
|
||||
j = m_peers.getIterator();
|
||||
for(; j.atEnd() == false; j++)
|
||||
for(std::map<u16, Peer*>::iterator j = m_peers.begin();
|
||||
j != m_peers.end(); ++j)
|
||||
{
|
||||
Peer *peer = j.getNode()->getValue();
|
||||
Peer *peer = j->second;
|
||||
send(peer->id, channelnum, data, reliable);
|
||||
}
|
||||
}
|
||||
@@ -1078,13 +1101,12 @@ void Connection::send(u16 peer_id, u8 channelnum,
|
||||
if(reliable)
|
||||
chunksize_max -= RELIABLE_HEADER_SIZE;
|
||||
|
||||
core::list<SharedBuffer<u8> > originals;
|
||||
std::list<SharedBuffer<u8> > originals;
|
||||
originals = makeAutoSplitPacket(data, chunksize_max,
|
||||
channel->next_outgoing_split_seqnum);
|
||||
|
||||
core::list<SharedBuffer<u8> >::Iterator i;
|
||||
i = originals.begin();
|
||||
for(; i != originals.end(); i++)
|
||||
for(std::list<SharedBuffer<u8> >::iterator i = originals.begin();
|
||||
i != originals.end(); ++i)
|
||||
{
|
||||
SharedBuffer<u8> original = *i;
|
||||
|
||||
@@ -1157,40 +1179,39 @@ void Connection::rawSend(const BufferedPacket &packet)
|
||||
|
||||
Peer* Connection::getPeer(u16 peer_id)
|
||||
{
|
||||
core::map<u16, Peer*>::Node *node = m_peers.find(peer_id);
|
||||
std::map<u16, Peer*>::iterator node = m_peers.find(peer_id);
|
||||
|
||||
if(node == NULL){
|
||||
if(node == m_peers.end()){
|
||||
throw PeerNotFoundException("GetPeer: Peer not found (possible timeout)");
|
||||
}
|
||||
|
||||
// Error checking
|
||||
assert(node->getValue()->id == peer_id);
|
||||
assert(node->second->id == peer_id);
|
||||
|
||||
return node->getValue();
|
||||
return node->second;
|
||||
}
|
||||
|
||||
Peer* Connection::getPeerNoEx(u16 peer_id)
|
||||
{
|
||||
core::map<u16, Peer*>::Node *node = m_peers.find(peer_id);
|
||||
std::map<u16, Peer*>::iterator node = m_peers.find(peer_id);
|
||||
|
||||
if(node == NULL){
|
||||
if(node == m_peers.end()){
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Error checking
|
||||
assert(node->getValue()->id == peer_id);
|
||||
assert(node->second->id == peer_id);
|
||||
|
||||
return node->getValue();
|
||||
return node->second;
|
||||
}
|
||||
|
||||
core::list<Peer*> Connection::getPeers()
|
||||
std::list<Peer*> Connection::getPeers()
|
||||
{
|
||||
core::list<Peer*> list;
|
||||
core::map<u16, Peer*>::Iterator j;
|
||||
j = m_peers.getIterator();
|
||||
for(; j.atEnd() == false; j++)
|
||||
std::list<Peer*> list;
|
||||
for(std::map<u16, Peer*>::iterator j = m_peers.begin();
|
||||
j != m_peers.end(); ++j)
|
||||
{
|
||||
Peer *peer = j.getNode()->getValue();
|
||||
Peer *peer = j->second;
|
||||
list.push_back(peer);
|
||||
}
|
||||
return list;
|
||||
@@ -1198,11 +1219,10 @@ core::list<Peer*> Connection::getPeers()
|
||||
|
||||
bool Connection::getFromBuffers(u16 &peer_id, SharedBuffer<u8> &dst)
|
||||
{
|
||||
core::map<u16, Peer*>::Iterator j;
|
||||
j = m_peers.getIterator();
|
||||
for(; j.atEnd() == false; j++)
|
||||
for(std::map<u16, Peer*>::iterator j = m_peers.begin();
|
||||
j != m_peers.end(); ++j)
|
||||
{
|
||||
Peer *peer = j.getNode()->getValue();
|
||||
Peer *peer = j->second;
|
||||
for(u16 i=0; i<CHANNEL_COUNT; i++)
|
||||
{
|
||||
Channel *channel = &peer->channels[i];
|
||||
@@ -1508,7 +1528,7 @@ SharedBuffer<u8> Connection::processPacket(Channel *channel,
|
||||
|
||||
bool Connection::deletePeer(u16 peer_id, bool timeout)
|
||||
{
|
||||
if(m_peers.find(peer_id) == NULL)
|
||||
if(m_peers.find(peer_id) == m_peers.end())
|
||||
return false;
|
||||
|
||||
Peer *peer = m_peers[peer_id];
|
||||
@@ -1519,7 +1539,7 @@ bool Connection::deletePeer(u16 peer_id, bool timeout)
|
||||
putEvent(e);
|
||||
|
||||
delete m_peers[peer_id];
|
||||
m_peers.remove(peer_id);
|
||||
m_peers.erase(peer_id);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1527,7 +1547,7 @@ bool Connection::deletePeer(u16 peer_id, bool timeout)
|
||||
|
||||
ConnectionEvent Connection::getEvent()
|
||||
{
|
||||
if(m_event_queue.size() == 0){
|
||||
if(m_event_queue.empty()){
|
||||
ConnectionEvent e;
|
||||
e.type = CONNEVENT_NONE;
|
||||
return e;
|
||||
@@ -1572,8 +1592,8 @@ bool Connection::Connected()
|
||||
if(m_peers.size() != 1)
|
||||
return false;
|
||||
|
||||
core::map<u16, Peer*>::Node *node = m_peers.find(PEER_ID_SERVER);
|
||||
if(node == NULL)
|
||||
std::map<u16, Peer*>::iterator node = m_peers.find(PEER_ID_SERVER);
|
||||
if(node == m_peers.end())
|
||||
return false;
|
||||
|
||||
if(m_peer_id == PEER_ID_INEXISTENT)
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
Minetest-c55
|
||||
Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Minetest
|
||||
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
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 General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
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.
|
||||
*/
|
||||
@@ -20,14 +20,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#ifndef CONNECTION_HEADER
|
||||
#define CONNECTION_HEADER
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include "debug.h"
|
||||
#include "common_irrlicht.h"
|
||||
#include "irrlichttypes_bloated.h"
|
||||
#include "socket.h"
|
||||
#include "utility.h"
|
||||
#include "exceptions.h"
|
||||
#include "constants.h"
|
||||
#include "util/pointer.h"
|
||||
#include "util/container.h"
|
||||
#include "util/thread.h"
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <list>
|
||||
#include <map>
|
||||
|
||||
namespace con
|
||||
{
|
||||
@@ -107,15 +110,6 @@ class ProcessedSilentlyException : public BaseException
|
||||
{}
|
||||
};
|
||||
|
||||
inline u16 readPeerId(u8 *packetdata)
|
||||
{
|
||||
return readU16(&packetdata[4]);
|
||||
}
|
||||
inline u8 readChannel(u8 *packetdata)
|
||||
{
|
||||
return readU8(&packetdata[6]);
|
||||
}
|
||||
|
||||
#define SEQNUM_MAX 65535
|
||||
inline bool seqnum_higher(u16 higher, u16 lower)
|
||||
{
|
||||
@@ -150,14 +144,14 @@ SharedBuffer<u8> makeOriginalPacket(
|
||||
SharedBuffer<u8> data);
|
||||
|
||||
// Split data in chunks and add TYPE_SPLIT headers to them
|
||||
core::list<SharedBuffer<u8> > makeSplitPacket(
|
||||
std::list<SharedBuffer<u8> > makeSplitPacket(
|
||||
SharedBuffer<u8> data,
|
||||
u32 chunksize_max,
|
||||
u16 seqnum);
|
||||
|
||||
// Depending on size, make a TYPE_ORIGINAL or TYPE_SPLIT packet
|
||||
// Increments split_seqnum if a split packet is made
|
||||
core::list<SharedBuffer<u8> > makeAutoSplitPacket(
|
||||
std::list<SharedBuffer<u8> > makeAutoSplitPacket(
|
||||
SharedBuffer<u8> data,
|
||||
u32 chunksize_max,
|
||||
u16 &split_seqnum);
|
||||
@@ -175,7 +169,7 @@ struct IncomingSplitPacket
|
||||
reliable = false;
|
||||
}
|
||||
// Key is chunk number, value is data without headers
|
||||
core::map<u16, SharedBuffer<u8> > chunks;
|
||||
std::map<u16, SharedBuffer<u8> > chunks;
|
||||
u32 chunk_count;
|
||||
float time; // Seconds from adding
|
||||
bool reliable; // If true, isn't deleted on timeout
|
||||
@@ -276,12 +270,12 @@ with a buffer in the receiving and transmitting end.
|
||||
for fast access to the smallest one.
|
||||
*/
|
||||
|
||||
typedef core::list<BufferedPacket>::Iterator RPBSearchResult;
|
||||
typedef std::list<BufferedPacket>::iterator RPBSearchResult;
|
||||
|
||||
class ReliablePacketBuffer
|
||||
{
|
||||
public:
|
||||
|
||||
ReliablePacketBuffer();
|
||||
void print();
|
||||
bool empty();
|
||||
u32 size();
|
||||
@@ -294,10 +288,11 @@ class ReliablePacketBuffer
|
||||
void incrementTimeouts(float dtime);
|
||||
void resetTimedOuts(float timeout);
|
||||
bool anyTotaltimeReached(float timeout);
|
||||
core::list<BufferedPacket> getTimedOuts(float timeout);
|
||||
std::list<BufferedPacket> getTimedOuts(float timeout);
|
||||
|
||||
private:
|
||||
core::list<BufferedPacket> m_list;
|
||||
std::list<BufferedPacket> m_list;
|
||||
u16 m_list_size;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -318,7 +313,7 @@ class IncomingSplitBuffer
|
||||
|
||||
private:
|
||||
// Key is seqnum
|
||||
core::map<u16, IncomingSplitPacket*> m_buf;
|
||||
std::map<u16, IncomingSplitPacket*> m_buf;
|
||||
};
|
||||
|
||||
class Connection;
|
||||
@@ -402,7 +397,11 @@ class Peer
|
||||
float m_max_packets_per_second;
|
||||
int m_num_sent;
|
||||
int m_max_num_sent;
|
||||
|
||||
|
||||
// Updated from configuration by Connection
|
||||
float congestion_control_aim_rtt;
|
||||
float congestion_control_max_rate;
|
||||
float congestion_control_min_rate;
|
||||
private:
|
||||
};
|
||||
|
||||
@@ -593,7 +592,7 @@ class Connection: public SimpleThread
|
||||
void rawSend(const BufferedPacket &packet);
|
||||
Peer* getPeer(u16 peer_id);
|
||||
Peer* getPeerNoEx(u16 peer_id);
|
||||
core::list<Peer*> getPeers();
|
||||
std::list<Peer*> getPeers();
|
||||
bool getFromBuffers(u16 &peer_id, SharedBuffer<u8> &dst);
|
||||
// Returns next data from a buffer if possible
|
||||
// If found, returns true; if not, false.
|
||||
@@ -623,7 +622,7 @@ class Connection: public SimpleThread
|
||||
UDPSocket m_socket;
|
||||
u16 m_peer_id;
|
||||
|
||||
core::map<u16, Peer*> m_peers;
|
||||
std::map<u16, Peer*> m_peers;
|
||||
JMutex m_peers_mutex;
|
||||
|
||||
// Backwards compatibility
|
||||
|
||||