Compare commits
799 commits
VERSION_01
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fcd8330db0 | ||
|
|
98864f3802 | ||
|
|
0dff60f98e | ||
|
|
246d9ce288 | ||
|
|
31d417e31f | ||
|
|
60d20f593b | ||
|
|
f44e519104 | ||
|
|
70dc2ded31 | ||
|
|
542f4524db | ||
|
|
0d25beefa8 | ||
|
|
3a478f341d | ||
|
|
c9f865a894 | ||
|
|
afd5329fcc | ||
|
|
b8edcfb252 | ||
|
|
bebce66517 | ||
|
|
6f58eef4f5 | ||
|
|
4d2925aa4b | ||
|
|
fb2ae76fc5 | ||
|
|
aadec09b5d | ||
|
|
9fd4316d0f | ||
|
|
e1d01dea79 | ||
|
|
dd500a36e5 | ||
|
|
8b2727f392 | ||
|
|
d350c2b494 | ||
|
|
2022b28b76 | ||
|
|
1f9242ae6f | ||
|
|
03654e4459 | ||
|
|
fcadfcdbd3 | ||
|
|
581ffc886a | ||
|
|
e2146721d1 | ||
|
|
c6a51ffcf3 | ||
|
|
d846fa5818 | ||
|
|
13fc7f6b1a | ||
|
|
86cf9c0959 | ||
|
|
7c5cef1181 | ||
|
|
72f23a7bc1 | ||
|
|
404263a1ef | ||
|
|
b479ec3d52 | ||
|
|
b796ba36b0 | ||
|
|
07a41fddfe | ||
|
|
97ea5ab442 | ||
|
|
659c155a36 | ||
|
|
0f3ecbd3dd | ||
|
|
535e7f5727 | ||
|
|
1bf34316fb | ||
|
|
c7befd2fe1 | ||
|
|
230b25e5fa | ||
|
|
3b6d652aa8 | ||
|
|
41604ca00e | ||
|
|
7e0fbe0f16 | ||
|
|
2bd16f0307 | ||
|
|
afb06b8f97 | ||
|
|
95f373bd1c | ||
|
|
e58e6a54cb | ||
|
|
f109b551f5 | ||
|
|
5f4d9d9460 | ||
|
|
61f047a955 | ||
|
|
3534bf384f | ||
|
|
6b1296e059 | ||
|
|
c19e4b0627 | ||
|
|
72d569343a | ||
|
|
a6708ee0c2 | ||
|
|
e0dce1a242 | ||
|
|
55e802b988 | ||
|
|
d24e452f59 | ||
|
|
8fc173d923 | ||
|
|
1484f872da | ||
|
|
93a99c9c10 | ||
|
|
79ba39a030 | ||
|
|
1c50a2a454 | ||
|
|
4feb1e628a | ||
|
|
662aab6ded | ||
|
|
f9fc0230f5 | ||
|
|
ba6d507924 | ||
|
|
e121d44356 | ||
|
|
8b61de02e6 | ||
|
|
1ca1f0e47e | ||
|
|
3026afe931 | ||
|
|
f9a37f122e | ||
|
|
fd2cff8618 | ||
|
|
30494af57c | ||
|
|
2ed431fd6a | ||
|
|
cc4918a5ed | ||
|
|
6608eb2b02 | ||
|
|
79622ee9cf | ||
|
|
c6f2718aec | ||
|
|
1fd97009eb | ||
|
|
517b62c5b1 | ||
|
|
de36580350 | ||
|
|
3d971f37b5 | ||
|
|
4666911be6 | ||
|
|
c4723aba93 | ||
|
|
8c93122d1e | ||
|
|
2bec3a151b | ||
|
|
38f5c0124d | ||
|
|
2df3243f2d | ||
|
|
08873546ba | ||
|
|
26c4723749 | ||
|
|
6eeff4766d | ||
|
|
737cac9495 | ||
|
|
5ae5d33438 | ||
|
|
621a43579a | ||
|
|
45cd2ac30e | ||
|
|
b328b1aedf | ||
|
|
d633ebf947 | ||
|
|
f4935f4928 | ||
|
|
b71a29f883 | ||
|
|
3424b898b8 | ||
|
|
1f3abca39c | ||
|
|
d6ca574a20 | ||
|
|
612b4a6b88 | ||
|
|
a13ee36fe8 | ||
|
|
2abc8df666 | ||
|
|
14d7e046be | ||
|
|
6c64621496 | ||
|
|
6a4009c790 | ||
|
|
38934a8c09 | ||
|
|
738d3cd830 | ||
|
|
8cb1a7b050 | ||
|
|
d1fc6947b7 | ||
|
|
402bb84c43 | ||
|
|
819b80913f | ||
|
|
da4378d30c | ||
|
|
37d3e1c84d | ||
|
|
f1d98fff56 | ||
|
|
8f642ac446 | ||
|
|
6224a0638a | ||
|
|
c38740eaab | ||
|
|
cbf971e632 | ||
|
|
7546fbba80 | ||
|
|
face9f3a67 | ||
|
|
703fa61329 | ||
|
|
4dbe1f73fe | ||
|
|
09371bff47 | ||
|
|
6ff59a0040 | ||
|
|
063d03c45f | ||
|
|
d191c14232 | ||
|
|
d9b51f0d15 | ||
|
|
44f6a4a9fe | ||
|
|
d1d4eb5c49 | ||
|
|
0d56d2b63b | ||
|
|
a000e5f788 | ||
|
|
cc5414894f | ||
|
|
2e5dbc12c6 | ||
|
|
f756534846 | ||
|
|
7174c32521 | ||
|
|
049b91e98b | ||
|
|
a5db37305e | ||
|
|
179bc4d5e7 | ||
|
|
31c4f9cfb4 | ||
|
|
c4491004d2 | ||
|
|
e910892a16 | ||
|
|
7beb123117 | ||
|
|
a141cc187d | ||
|
|
c68f0a59d5 | ||
|
|
a3bd4b328a | ||
|
|
9e56945faf | ||
|
|
6f783d3ef6 | ||
|
|
ccee5a42b3 | ||
|
|
f2d519a29f | ||
|
|
d516c738bf | ||
|
|
ad92b7f2a9 | ||
|
|
2ee0aaa5e7 | ||
|
|
6592f5c245 | ||
|
|
8206631665 | ||
|
|
bdb34e8628 | ||
|
|
0fba46d89b | ||
|
|
4a55c4a706 | ||
|
|
4253e1e73b | ||
|
|
4e8fe0592e | ||
|
|
5709a85824 | ||
|
|
700e3ee730 | ||
|
|
0b2cb9df08 | ||
|
|
63d9667264 | ||
|
|
920ed5a3a2 | ||
|
|
f02fc6b04f | ||
|
|
807a8bb40a | ||
|
|
e6180e9ff5 | ||
|
|
3de1141898 | ||
|
|
3e31e6b788 | ||
|
|
ff9fb76ab3 | ||
|
|
ccb229efe9 | ||
|
|
5f3f86c6e7 | ||
|
|
42c30cdbda | ||
|
|
01dddc103f | ||
|
|
70bcbc3066 | ||
|
|
3c7b1a30ae | ||
|
|
e82524ec2f | ||
|
|
f224b79094 | ||
|
|
a7e66a4288 | ||
|
|
79e882fe5f | ||
|
|
8b63897d37 | ||
|
|
a24774cda9 | ||
|
|
2746ee1411 | ||
|
|
962bd11aec | ||
|
|
a9ae0db9a9 | ||
|
|
06f4e5eb78 | ||
|
|
ade5f226a9 | ||
|
|
d2f549394d | ||
|
|
4f9ffc1a48 | ||
|
|
178cd60429 | ||
|
|
f4f6fd6a2c | ||
|
|
23412db466 | ||
|
|
65d0e04af3 | ||
|
|
2cee409a77 | ||
|
|
aba72381ea | ||
|
|
14586c634c | ||
|
|
796a1e09cb | ||
|
|
706d485113 | ||
|
|
a10ec0272d | ||
|
|
d53d3f690e | ||
|
|
52b1df5f96 | ||
|
|
76feee77fd | ||
|
|
bf60fed1b8 | ||
|
|
c4aa1a9786 | ||
|
|
21d00772ad | ||
|
|
2d232b1646 | ||
|
|
0f2a5117f5 | ||
|
|
cb6db786f2 | ||
|
|
212eba66d5 | ||
|
|
cdadb33ca0 | ||
|
|
5e4d873a38 | ||
|
|
cb4d5b609f | ||
|
|
a6f3e22538 | ||
|
|
7c1b52bff6 | ||
|
|
8930612a49 | ||
|
|
b7c552cdf4 | ||
|
|
236bb8bd72 | ||
|
|
89ee706681 | ||
|
|
ef768a1ba6 | ||
|
|
c8f5d45eef | ||
|
|
98e0cf4222 | ||
|
|
b6f066508f | ||
|
|
2dc2318a3b | ||
|
|
bbe8c03b97 | ||
|
|
e06b6737c4 | ||
|
|
d6428edaf3 | ||
|
|
b71d3a7ccc | ||
|
|
42f98da03f | ||
|
|
418d9cde03 | ||
|
|
9e387d13ec | ||
|
|
cbf59d11b8 | ||
|
|
0de7b82913 | ||
|
|
228898fa15 | ||
|
|
21b6930a11 | ||
|
|
38c71e284e | ||
|
|
593d27f2c4 | ||
|
|
26b56245b9 | ||
|
|
e867756659 | ||
|
|
f33639737c | ||
|
|
a70721a98f | ||
|
|
96e8aa1a1f | ||
|
|
743eaf8384 | ||
|
|
e81ee6a33c | ||
|
|
585981f8c4 | ||
|
|
d5f3712ee7 | ||
|
|
68b99deaec | ||
|
|
1bc83e61c0 | ||
|
|
c76392f854 | ||
|
|
c2a79db036 | ||
|
|
4794564af9 | ||
|
|
254ebf2ee1 | ||
|
|
d5a889c58e | ||
|
|
5e7b1f9c73 | ||
|
|
ce872ef5d2 | ||
|
|
ed42b5a074 | ||
|
|
26883d7afa | ||
|
|
e166b717b3 | ||
|
|
24fbeee56b | ||
|
|
f520851d46 | ||
|
|
e76888cc51 | ||
|
|
5cf76c7f03 | ||
|
|
9bd676a3c3 | ||
|
|
81b46c3fa0 | ||
|
|
2edcfb1cf7 | ||
|
|
bf5a4e73bd | ||
|
|
485e626083 | ||
|
|
1f5d4be5ed | ||
|
|
423bd033e0 | ||
|
|
96acebae7d | ||
|
|
40db53c75d | ||
|
|
01a3d15134 | ||
|
|
345926808a | ||
|
|
637effbf69 | ||
|
|
e2cf347731 | ||
|
|
e681dc2fcc | ||
|
|
02ef1ed34f | ||
|
|
05ff7ffd66 | ||
|
|
336d83854f | ||
|
|
ac34c133ee | ||
|
|
e6b34706ac | ||
|
|
aad2005dc0 | ||
|
|
e6e0d60bf5 | ||
|
|
845df00bdd | ||
|
|
1af92af6af | ||
|
|
dcc390c30a | ||
|
|
d5adb7c5ae | ||
|
|
92752ac7fe | ||
|
|
e1f897fa30 | ||
|
|
3ba6448011 | ||
|
|
0d334d4a22 | ||
|
|
2848042ea7 | ||
|
|
fccda47c93 | ||
|
|
a4fc86c04a | ||
|
|
4dd4e8840c | ||
|
|
52a3809c35 | ||
|
|
757eb04038 | ||
|
|
6653634128 | ||
|
|
8d42afbf0d | ||
|
|
2d43a41541 | ||
|
|
858320c8e2 | ||
|
|
95bf1616ba | ||
|
|
0616ea3a8b | ||
|
|
246a5b47dc | ||
|
|
0f118cbe46 | ||
|
|
2f78691d05 | ||
|
|
28b7ae2a23 | ||
|
|
f8a09deb53 | ||
|
|
87c1111b63 | ||
|
|
d0d0330ea2 | ||
|
|
7412928f51 | ||
|
|
a2bcd77959 | ||
|
|
ee715a5fe5 | ||
|
|
b614dad186 | ||
|
|
179520b9df | ||
|
|
ba56253b84 | ||
|
|
e906f1f3df | ||
|
|
4d2d68907a | ||
|
|
8a75706607 | ||
|
|
d6f528f81a | ||
|
|
4db3ad4d67 | ||
|
|
fc644a9755 | ||
|
|
0c32227a7b | ||
|
|
a39f2e65db | ||
|
|
65fb1748a7 | ||
|
|
df48d0daac | ||
|
|
a26777d722 | ||
|
|
9f532e2bc3 | ||
|
|
1827a40eac | ||
|
|
091c6deb79 | ||
|
|
abcbc1dbae | ||
|
|
1d3a249d76 | ||
|
|
7929acb4d2 | ||
|
|
54d149a7bd | ||
|
|
c0f3e237c1 | ||
|
|
4c05093b01 | ||
|
|
c22e919f9c | ||
|
|
4d1251c906 | ||
|
|
f662040941 | ||
|
|
77972930a5 | ||
|
|
19346b3143 | ||
|
|
20b9335645 | ||
|
|
5a4904c96f | ||
|
|
d028bc624e | ||
|
|
ace5065bd3 | ||
|
|
f2055ab79e | ||
|
|
2e6bcc67ba | ||
|
|
fe5cde1145 | ||
|
|
5c883098c2 | ||
|
|
8f9aa9825b | ||
|
|
78a60745a5 | ||
|
|
d7703f3721 | ||
|
|
ba6e2848f0 | ||
|
|
6771560c91 | ||
|
|
a510097efb | ||
|
|
fbdc8e33cf | ||
|
|
4d5fc5cee2 | ||
|
|
d5153a72af | ||
|
|
fc81162673 | ||
|
|
c1078e197c | ||
|
|
c653a2b35c | ||
|
|
792ca5e414 | ||
|
|
b09aa4e2c2 | ||
|
|
45b271bd72 | ||
|
|
32a2ac6957 | ||
|
|
96df82c461 | ||
|
|
b936af9375 | ||
|
|
675913dcfa | ||
|
|
84d1b7aab4 | ||
|
|
062b4d1667 | ||
|
|
8a46d1e8ce | ||
|
|
958a36d2de | ||
|
|
873048f98b | ||
|
|
66d280f10c | ||
|
|
92089cbcaa | ||
|
|
0ce79fdad8 | ||
|
|
d60d216466 | ||
|
|
4746f125ed | ||
|
|
3e5d472bc3 | ||
|
|
3845fc69da | ||
|
|
97ff41869f | ||
|
|
a5251127dc | ||
|
|
46f63776cb | ||
|
|
d6aed77641 | ||
|
|
a6ddc99d8d | ||
|
|
46e399b30f | ||
|
|
22b57a3e5e | ||
|
|
8ce87348e1 | ||
|
|
a2747d3f80 | ||
|
|
b01060f667 | ||
|
|
8ede1b841a | ||
|
|
542fe5be1b | ||
|
|
e80ce98382 | ||
|
|
c3f81e5d31 | ||
|
|
2df0596cfc | ||
|
|
947fc79489 | ||
|
|
43353e1ef8 | ||
|
|
98e2f70218 | ||
|
|
30399d830d | ||
|
|
60026dde03 | ||
|
|
9a5e5b0223 | ||
|
|
356f36ad07 | ||
|
|
60cb09077f | ||
|
|
4d50010790 | ||
|
|
2b10df791f | ||
|
|
752626b3aa | ||
|
|
4b6319d910 | ||
|
|
29d53375c0 | ||
|
|
582748b551 | ||
|
|
6f5a275694 | ||
|
|
98d5349bb4 | ||
|
|
c1241a3e08 | ||
|
|
16a6731d24 | ||
|
|
d1c96181a5 | ||
|
|
7f06ef1346 | ||
|
|
4e4fa1aeca | ||
|
|
0c2ff23ed1 | ||
|
|
d1174e5fd6 | ||
|
|
7fa046294b | ||
|
|
01b6cf9dc7 | ||
|
|
fa0a522070 | ||
|
|
5a8add7e5d | ||
|
|
e3188b3986 | ||
|
|
5072211638 | ||
|
|
0bc610eb6c | ||
|
|
ee7faac1da | ||
|
|
9c0315793a | ||
|
|
a39087c1ab | ||
|
|
f9af9aa9df | ||
|
|
f7baa36ede | ||
|
|
1cef2c4f6a | ||
|
|
086cfbe00b | ||
|
|
59a0727dd1 | ||
|
|
7e1f493839 | ||
|
|
d9a045f2d5 | ||
|
|
3675593ae4 | ||
|
|
631fd7d932 | ||
|
|
b2447e8c7d | ||
|
|
07f367b9bc | ||
|
|
eca1a46448 | ||
|
|
9257fe4ee5 | ||
|
|
13f136adc8 | ||
|
|
9fb6a0d96e | ||
|
|
6356e1f23c | ||
|
|
8f6c3cacdf | ||
|
|
a08d9ae3e2 | ||
|
|
9f854e7ab7 | ||
|
|
6cb9be3b49 | ||
|
|
1e4bbaa84a | ||
|
|
033b302d9f | ||
|
|
0c722d8a12 | ||
|
|
2ae840aaf1 | ||
|
|
0f1e8927ea | ||
|
|
5f8d34f249 | ||
|
|
07346dd0eb | ||
|
|
7336fc1821 | ||
|
|
953b7b5b20 | ||
|
|
3927596105 | ||
|
|
fd39cda6e3 | ||
|
|
3ab51b17ea | ||
|
|
85d6cff21a | ||
|
|
c53a1ebef7 | ||
|
|
8873a242b2 | ||
|
|
38d0e8d715 | ||
|
|
347008b896 | ||
|
|
77f6e44abb | ||
|
|
8128bed44e | ||
|
|
3496eb9af4 | ||
|
|
c1b967d1b5 | ||
|
|
60173d582d | ||
|
|
7d2c2e128f | ||
|
|
68cf101189 | ||
|
|
a9baa4af19 | ||
|
|
7113c11d53 | ||
|
|
6723d7f5bf | ||
|
|
fb158dbc11 | ||
|
|
bcedecad50 | ||
|
|
057afa534a | ||
|
|
e61506126c | ||
|
|
212dc7623e | ||
|
|
dbc3de7055 | ||
|
|
a7bdde5331 | ||
|
|
9e4ef5146b | ||
|
|
bf275d84bf | ||
|
|
02cdffe0af | ||
|
|
45b94965e9 | ||
|
|
c9c06ad5a7 | ||
|
|
c302d2dcd6 | ||
|
|
c0288c5360 | ||
|
|
2277a276fb | ||
|
|
f376b0cb87 | ||
|
|
05eb315e41 | ||
|
|
6385ed51cb | ||
|
|
05d61c6bcb | ||
|
|
71ad4108fd | ||
|
|
4379d81a25 | ||
|
|
b9de8c3117 | ||
|
|
23332a7c8c | ||
|
|
477a0ed37d | ||
|
|
4276878a60 | ||
|
|
75895904e6 | ||
|
|
356937fe33 | ||
|
|
59abb15ba5 | ||
|
|
f7f01ecaa0 | ||
|
|
2049f2b4b7 | ||
|
|
02602f0bc5 | ||
|
|
07d34cf25b | ||
|
|
0bc6f28204 | ||
|
|
e02d87b8e6 | ||
|
|
0b056f3b81 | ||
|
|
31911288d7 | ||
|
|
0e4bca7399 | ||
|
|
0ccc0ecf71 | ||
|
|
e8ca6e4c6d | ||
|
|
3224e60189 | ||
|
|
43e45c29ff | ||
|
|
ad6d75617f | ||
|
|
511828cff1 | ||
|
|
f4202cb65d | ||
|
|
8fd4876f4f | ||
|
|
ff3debc55c | ||
|
|
a8bfff60a8 | ||
|
|
9575e933c0 | ||
|
|
d3b6ad1509 | ||
|
|
497c14aaac | ||
|
|
85d9a37189 | ||
|
|
92a215ea3b | ||
|
|
be6e05ac4c | ||
|
|
a1889565a5 | ||
|
|
16cbe8ee7b | ||
|
|
b04807320f | ||
|
|
ae99d29757 | ||
|
|
8af14b678f | ||
|
|
c7a4b5b915 | ||
|
|
582b0fdc33 | ||
|
|
1da8d96d76 | ||
|
|
93e7d4e6cc | ||
|
|
4a04d40354 | ||
|
|
a1fd258665 | ||
|
|
c607055942 | ||
|
|
28347f0089 | ||
|
|
28eb3e111a | ||
|
|
3c30c36642 | ||
|
|
04e0516af5 | ||
|
|
3cf04e90a4 | ||
|
|
c226c7529a | ||
|
|
fa071e486c | ||
|
|
c63d39c80d | ||
|
|
a899c8d0d4 | ||
|
|
52d1569418 | ||
|
|
2fa88a3fa2 | ||
|
|
cb2b22e062 | ||
|
|
4c25015baf | ||
|
|
7ff2b3213e | ||
|
|
5e92cca27b | ||
|
|
9695c3b169 | ||
|
|
f980165564 | ||
|
|
61bf897294 | ||
|
|
dd759e2d1d | ||
|
|
a47ccb6e2f | ||
|
|
af9f6c1335 | ||
|
|
32eba455c2 | ||
|
|
78df10f5e4 | ||
|
|
7e4be06914 | ||
|
|
1fef7ea24e | ||
|
|
5c3d00d1d7 | ||
|
|
6a79c25963 | ||
|
|
287bdc71be | ||
|
|
2f5480a1cf | ||
|
|
5b167c69fd | ||
|
|
3375a4b1da | ||
|
|
17ca660a86 | ||
|
|
58c07e1879 | ||
|
|
fea1e459e0 | ||
|
|
ef2725881b | ||
|
|
106ee5bac4 | ||
|
|
abce198c17 | ||
|
|
2c9bb43815 | ||
|
|
185f4d1317 | ||
|
|
677dbf791d | ||
|
|
657acc2a9c | ||
|
|
c0054efbf7 | ||
|
|
8bf15d9226 | ||
|
|
073c720bea | ||
|
|
6e05acb3a9 | ||
|
|
9046201324 | ||
|
|
11f53c059b | ||
|
|
c986b39065 | ||
|
|
5c57b1e2bf | ||
|
|
c31baea485 | ||
|
|
495ac0c564 | ||
|
|
92a29f8e83 | ||
|
|
ecd9ee8995 | ||
|
|
3101478f26 | ||
|
|
165243496b | ||
|
|
84331c9c28 | ||
|
|
ba18071fe0 | ||
|
|
693886254b | ||
|
|
315329d601 | ||
|
|
7f39b6498a | ||
|
|
ec0a24d710 | ||
|
|
4d3b231164 | ||
|
|
090bf94b45 | ||
|
|
a008d8737a | ||
|
|
dd340e8079 | ||
|
|
3d50f62a9a | ||
|
|
db59996152 | ||
|
|
d10b81197b | ||
|
|
5d01675294 | ||
|
|
b1508b1391 | ||
|
|
ca9af8f66f | ||
|
|
ea40a18c18 | ||
|
|
7355a3d934 | ||
|
|
f9de2abe7d | ||
|
|
7ebc0839ee | ||
|
|
d667689a04 | ||
|
|
77bb08ca0a | ||
|
|
076559bfe7 | ||
|
|
f6b55032e3 | ||
|
|
7139a82d52 | ||
|
|
c0553eba5e | ||
|
|
970296890d | ||
|
|
6828b22dfe | ||
|
|
6512a2bc0c | ||
|
|
51a0bf94f4 | ||
|
|
3e5871007a | ||
|
|
0280e8083a | ||
|
|
946ba0ab30 | ||
|
|
91fb13c933 | ||
|
|
fc67f54be6 | ||
|
|
54eb03c5e9 | ||
|
|
f71d98c8aa | ||
|
|
be279d48cc | ||
|
|
4b31550218 | ||
|
|
4bc4732d9a | ||
|
|
3d4a30c06e | ||
|
|
7a00021188 | ||
|
|
e8d9413d40 | ||
|
|
256d80226b | ||
|
|
c6bbd109e7 | ||
|
|
70456c41ad | ||
|
|
11edc7ed84 | ||
|
|
530d29fde3 | ||
|
|
490767249f | ||
|
|
860b9cbbfc | ||
|
|
5923af3576 | ||
|
|
8beac8192c | ||
|
|
3c2e41d05e | ||
|
|
7d92d1e28e | ||
|
|
0811ef4077 | ||
|
|
d2bc58dccd | ||
|
|
d06b044367 | ||
|
|
b75e11e846 | ||
|
|
3fe87fdee8 | ||
|
|
52b5cd4a61 | ||
|
|
dab41ffa97 | ||
|
|
7a328e22cc | ||
|
|
623c6ae35f | ||
|
|
96c3b54ee0 | ||
|
|
85dbe3330a | ||
|
|
5ab1003a8d | ||
|
|
000bbc05eb | ||
|
|
a28525fe23 | ||
|
|
e9b07fa02c | ||
|
|
c30ef6e91f | ||
|
|
417d0a41ef | ||
|
|
6195a0687f | ||
|
|
a45fc7b47d | ||
|
|
2cccd40b66 | ||
|
|
7d62bbb723 | ||
|
|
66bac0618f | ||
|
|
7289b9f9de | ||
|
|
087b5b4733 | ||
|
|
904f0a3c8d | ||
|
|
412bcb28bc | ||
|
|
86910286fa | ||
|
|
f41e13d519 | ||
|
|
725378d44a | ||
|
|
1f2642c29e | ||
|
|
ab93c838f2 | ||
|
|
4a24e4dde9 | ||
|
|
3230330097 | ||
|
|
db13a55826 | ||
|
|
1452578b46 | ||
|
|
691432302a | ||
|
|
1d57393ad5 | ||
|
|
5e99f8ab20 | ||
|
|
9409a68f7b | ||
|
|
d4597e578f | ||
|
|
6f2239da6f | ||
|
|
437c3ed967 | ||
|
|
814be97fe6 | ||
|
|
4c16c2549f | ||
|
|
29616e2133 | ||
|
|
eb155be8ea | ||
|
|
cc048d5c79 | ||
|
|
d2af9d48a9 | ||
|
|
4643200553 | ||
|
|
42a28c8956 | ||
|
|
e24382e9ff | ||
|
|
cb08241687 | ||
|
|
c97f7f84df | ||
|
|
ea210a0e23 | ||
|
|
662c6bd923 | ||
|
|
f5c22b9005 | ||
|
|
ce22d05396 | ||
|
|
36b73047a8 | ||
|
|
8a3c1738d6 | ||
|
|
31a900ecde | ||
|
|
0119e4b3a9 | ||
|
|
cda456080e | ||
|
|
4b415d238d | ||
|
|
d88ee79505 | ||
|
|
1c53e95726 | ||
|
|
2dd548262c | ||
|
|
d628936d89 | ||
|
|
e062d5407a | ||
|
|
fb85ccf246 | ||
|
|
1f74b65ba7 | ||
|
|
b0f94e366d | ||
|
|
b792bd871b | ||
|
|
c5a6942081 | ||
|
|
79f72864ef | ||
|
|
ed0bef6caf | ||
|
|
d1141799ec | ||
|
|
b47f6440a4 | ||
|
|
cbb6a019fb | ||
|
|
bb317ad4cc | ||
|
|
2bb9c12814 | ||
|
|
50a5a35d00 | ||
|
|
bd15e460c6 | ||
|
|
5945b940d3 | ||
|
|
21304c2c09 | ||
|
|
dfd81f03a7 | ||
|
|
454e100aea | ||
|
|
37448f470c | ||
|
|
e29228c2c4 | ||
|
|
7fdbe9111d | ||
|
|
797372adbb | ||
|
|
cd53f56e7a | ||
|
|
e9d88dcc90 | ||
|
|
66f5f93c9a | ||
|
|
977f5e6f35 | ||
|
|
d520815d89 | ||
|
|
837fb5646d | ||
|
|
24a1679c55 | ||
|
|
65fa0d8db6 | ||
|
|
010c8689ac | ||
|
|
ac72f383a5 | ||
|
|
f790e89bf7 | ||
|
|
647ca5d566 | ||
|
|
053b6331e0 | ||
|
|
589a8bba14 | ||
|
|
6a758f3ed0 | ||
|
|
bcd146b70b | ||
|
|
9a8d0e32b7 | ||
|
|
506122aea0 | ||
|
|
221e059542 | ||
|
|
19f419d064 | ||
|
|
593387a7a0 | ||
|
|
0db115207a | ||
|
|
764c63e093 | ||
|
|
2109090efe | ||
|
|
f69fec71d9 | ||
|
|
e5799a01ec | ||
|
|
0a072dd907 | ||
|
|
6ab2bd3a80 | ||
|
|
384c24de64 | ||
|
|
aaa08b702d | ||
|
|
c8f3838b42 | ||
|
|
904de865af | ||
|
|
4ca4709789 | ||
|
|
194713f7bb | ||
|
|
517f4924f1 | ||
|
|
ec3dafd39b | ||
|
|
e46bda70ac | ||
|
|
f00011f98e | ||
|
|
8d38a6e694 | ||
|
|
8964104538 | ||
|
|
7432652e66 | ||
|
|
144a0e8d1a | ||
|
|
5778cb85e9 | ||
|
|
bb79b9f419 | ||
|
|
5257669348 | ||
|
|
77ad5a24a0 | ||
|
|
79dd5ab89b | ||
|
|
7b2670bba8 | ||
|
|
5f566f8988 | ||
|
|
ee7233d0eb |
3956 changed files with 61339 additions and 51338 deletions
|
|
@ -25,5 +25,5 @@
|
|||
<classpathentry kind="lib" path="libs/jakarta.annotation-api-2.1.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="libs/tomcat-embed-core-10.1.13.jar"/>
|
||||
<classpathentry kind="lib" path="libs/tomcat-embed-websocket-10.1.13.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
<classpathentry kind="output" path="build/eclipse"/>
|
||||
</classpath>
|
||||
|
|
|
|||
50
.github/workflows/android-build.yml
vendored
50
.github/workflows/android-build.yml
vendored
|
|
@ -7,16 +7,56 @@ on:
|
|||
pull_request:
|
||||
paths:
|
||||
- 'app/android/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- id: job_info
|
||||
uses: daleyjem/gh-job-id@v1
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
job_name: 'build'
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build Android Packages
|
||||
run: cd app/android/client && gradle assemble
|
||||
- name: Set Up JDK
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'adopt'
|
||||
|
||||
- name: Validate Gradle Wrapper .jar
|
||||
run: |
|
||||
cd app/android/gradle/wrapper
|
||||
curl --location --output gradle-wrapper.jar.sha256 \
|
||||
https://services.gradle.org/distributions/gradle-7.5.1-wrapper.jar.sha256
|
||||
echo " gradle-wrapper.jar" >> gradle-wrapper.jar.sha256
|
||||
sha256sum --check gradle-wrapper.jar.sha256
|
||||
|
||||
- name: Build APKs with Ant
|
||||
uses: cedx/setup-ant@v6
|
||||
with:
|
||||
version: '1.10'
|
||||
- run: ant -noinput -buildfile build.xml android -Dgradle.params="assembleDebug assembleRelease"
|
||||
|
||||
- name: Failure Report
|
||||
uses: sarisia/actions-status-discord@v1
|
||||
if: failure()
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_DEVELOPMENT }}
|
||||
with:
|
||||
title: 'Android Build Failed'
|
||||
description: '${{ steps.job_info.outputs.html_url }}'
|
||||
nodetail: true
|
||||
- uses: sarisia/actions-status-discord@v1
|
||||
if: failure()
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_DEVLOG }}
|
||||
with:
|
||||
title: 'Android Build Failed'
|
||||
description: '${{ steps.job_info.outputs.html_url }}'
|
||||
nodetail: true
|
||||
|
|
|
|||
12
.github/workflows/codeql-analysis.yml
vendored
12
.github/workflows/codeql-analysis.yml
vendored
|
|
@ -29,15 +29,15 @@ jobs:
|
|||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
uses: github/codeql-action/init@v3
|
||||
# Override language selection by uncommenting this and choosing your languages
|
||||
# with:
|
||||
# languages: go, javascript, csharp, python, cpp, java
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
#- name: Autobuild
|
||||
# uses: github/codeql-action/autobuild@v3
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
|
@ -46,9 +46,7 @@ jobs:
|
|||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
- run: ant -noinput -f build.xml clean compile
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
uses: github/codeql-action/analyze@v3
|
||||
|
|
|
|||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -40,7 +40,6 @@ javadocs
|
|||
statserver_stats.xml
|
||||
/*.ks
|
||||
build_client_data
|
||||
/bin
|
||||
.byecycle
|
||||
build_server_xmlconf
|
||||
*.umlproject
|
||||
|
|
|
|||
11
.project
11
.project
|
|
@ -20,4 +20,15 @@
|
|||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
</natures>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>1771748271774</id>
|
||||
<name></name>
|
||||
<type>30</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
||||
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
</filteredResources>
|
||||
</projectDescription>
|
||||
|
|
|
|||
48
README.md
48
README.md
|
|
@ -20,19 +20,38 @@ So what are you waiting for?! A whole new world awaits...
|
|||
|
||||
## How to play
|
||||
|
||||
[](https://stendhalgame.org/account/mycharacters.html)
|
||||
### Web Browser
|
||||
|
||||
[](https://stendhalgame.org/account/mycharacters.html)
|
||||
|
||||
Play in any web browser for desktop or mobile with JavaScript support. Click on the "play now"
|
||||
button to create or log in to your account.
|
||||
|
||||
### Mobile
|
||||
|
||||
Play using the [progressive web app](https://en.wikipedia.org/wiki/Progressive_web_app). Just visit
|
||||
[stendhalgame.org](https://stendhalgame.org/) in your mobile browser and click "install" when prompted.
|
||||
|
||||
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" height="75">](https://f-droid.org/packages/org.stendhalgame.client/)
|
||||
|
||||
Play on your Android device using the dedicated app. You can get it from the
|
||||
[F-Droid App Store](https://f-droid.org/) or download it from [stendhalgame.org](https://stendhalgame.org/download.html).
|
||||
|
||||
### Classic Desktop
|
||||
|
||||
[](https://arianne-project.org/download/stendhal.zip)
|
||||
|
||||
You need Java which you can download from [https://www.java.com](https://www.java.com/en/download) on Microsoft Windows. Java is included in most Linux distributions. Both Oracle Java and OpenJDK are supported.
|
||||
Play using the classic desktop client. You will need Java which you can download from
|
||||
[java.com](https://www.java.com/en/download) on Microsoft Windows. Java is included in
|
||||
most Linux distributions. Both Oracle Java and OpenJDK are supported.
|
||||
|
||||
Please download Stendhal from [https://stendhalgame.org](https://stendhalgame.org)<br>
|
||||
You can double click on stendhal-starter.jar and the client will run.<br>
|
||||
If you prefer to run from command line, then just execute this command
|
||||
in the stendhal folder:
|
||||
Please download Stendhal from [stendhalgame.org](https://stendhalgame.org/download.html).<br>
|
||||
You can double click on `stendhal-starter.jar` and the client will run.<br>
|
||||
If you prefer to run from command line, then just execute this command in the stendhal folder:
|
||||
|
||||
`java -jar stendhal-starter.jar`
|
||||
|
||||
There is a [manual](https://stendhalgame.org/wiki/Stendhal_Manual), and there is Help from the client menu icons in the upper right hand side of the game screen.
|
||||
There is a [manual](https://stendhalgame.org/wiki/Stendhal_Manual), and there is Help from the client menu icons in the upper right hand side of the game screen.
|
||||
|
||||
|
||||
## Development environment
|
||||
|
|
@ -44,13 +63,18 @@ There is a [manual](https://stendhalgame.org/wiki/Stendhal_Manual), and there i
|
|||
|
||||
|
||||
## Legal
|
||||
The server and java client are free software; you can redistribute it and/or modify it under the terms of the **GNU General Public License** 2 or later as published by the Free Software Foundation.
|
||||
|
||||
The web client is free software; you can redistribute it and/or modify it under the terms of the **GNU Affero General Public License** 3 or later as published by the Free Software Foundation.
|
||||
Stendhal is free software. You can redistribute it and/or modify under the following terms:
|
||||
|
||||
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 [LICENSE.txt](LICENSE.txt) file for more details.
|
||||
- The **server**, **java client**, and **Android client**: *GNU General Public License* 2 or later as published by the Free Software Foundation
|
||||
- The **web client** and **native client**: *GNU Affero General Public License* 3 or later as published by the Free Software Foundation with the definition of "System libraries" being extended to include authentication providers and software distribution platforms.
|
||||
- The **nativehelper** extensions: *GNU Lesser General Public License* 3 or later as published by the Free Software Foundation
|
||||
|
||||
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
|
||||
[LICENSE.txt](LICENSE.txt) and [src/js/LICENSE.html](src/js/LICENSE.html) file for more details.
|
||||
|
||||
Stendhal(c) is copyright of Miguel Angel Blanch Lardin, 2005-2008, arianne_rpg at users dot sourceforge dot net and others<br>
|
||||
Stendhal(c) is copyright of the Arianne Project, 2006-2024, arianne-general at lists dot sourceforge dot net
|
||||
Stendhal(c) is copyright of the Arianne Project, 2006-2026, arianne-general at lists dot sourceforge dot net
|
||||
|
||||
Please have a look at the list of [contributors](https://github.com/arianne/stendhal/blob/master/doc/contributors.md#contributors).
|
||||
Please have a look at the list of [contributors](doc/contributors.md#contributors).
|
||||
|
|
|
|||
1
app/.gitignore
vendored
Normal file
1
app/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/godot/
|
||||
|
|
@ -10,15 +10,23 @@ android {
|
|||
applicationId namespace
|
||||
minSdk 21
|
||||
targetSdk 32
|
||||
versionCode 1045005
|
||||
versionName "1.45.5"
|
||||
versionCode 1049005
|
||||
versionName "1.49.5"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
targetSdkVersion 32
|
||||
minSdkVersion 21
|
||||
}
|
||||
|
||||
// F-Droid doesn't allow encrypted DependencyInfoBlock in APK
|
||||
dependenciesInfo {
|
||||
// disables dependency metadata when building APKs
|
||||
includeInApk = false
|
||||
// disables dependency metadata when building Android App Bundles
|
||||
includeInBundle = false
|
||||
}
|
||||
|
||||
// build output
|
||||
project.setProperty("archivesBaseName", "${namespace}-${defaultConfig.versionCode}")
|
||||
project.setProperty("archivesBaseName", "${namespace}-${defaultConfig.versionName}")
|
||||
project.setProperty("buildDir", "${projectDir}/../../../build/build_android_client")
|
||||
|
||||
/* A keystore.properties file can be placed in the root Android project directory and must
|
||||
|
|
|
|||
|
|
@ -28,12 +28,11 @@ import android.util.Log;
|
|||
*/
|
||||
public class Logger {
|
||||
|
||||
/** Attribute denoting state of initialization. */
|
||||
private static boolean initialized = false;
|
||||
/** Logs directory. */
|
||||
private static File logsDir;
|
||||
|
||||
/** Main activity instance. */
|
||||
private static MainActivity mainActivity;
|
||||
|
||||
/** Singleton instance. */
|
||||
private static Logger instance;
|
||||
|
||||
|
|
@ -58,10 +57,13 @@ public class Logger {
|
|||
/**
|
||||
* Initializes logs directory.
|
||||
*/
|
||||
public static void init(final File dir, final MainActivity activity) {
|
||||
public static void init(final File dir) {
|
||||
if (Logger.initialized) {
|
||||
Logger.warn(true, "tried to re-initialize logger");
|
||||
return;
|
||||
}
|
||||
Logger.initialized = true;
|
||||
logsDir = new File(dir.getPath() + "/logs");
|
||||
mainActivity = activity;
|
||||
|
||||
writeLine("\n // -- debugging initialized -- //", null);
|
||||
writeLine("logs directory: " + logsDir.getPath());
|
||||
}
|
||||
|
|
@ -240,16 +242,16 @@ public class Logger {
|
|||
* Logging verbosity level.
|
||||
*/
|
||||
public static void notify(final String text, LogLevel level) {
|
||||
if (mainActivity == null) {
|
||||
if (!Logger.initialized) {
|
||||
System.err.println("ERROR: Logger not initialized. Call Logger.init.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (level == null) {
|
||||
level = LogLevel.DEBUG;
|
||||
level = LogLevel.INFO;
|
||||
}
|
||||
|
||||
final AlertDialog.Builder builder = new AlertDialog.Builder(ClientView.get().getContext());
|
||||
final AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.get());
|
||||
builder.setTitle(level.label);
|
||||
builder.setMessage(text);
|
||||
|
||||
|
|
|
|||
|
|
@ -13,21 +13,19 @@ package org.stendhalgame.client;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import org.stendhalgame.client.sound.MusicPlayer;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Color;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.inputmethod.BaseInputConnection;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.InputConnection;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.webkit.DownloadListener;
|
||||
import android.webkit.WebChromeClient;
|
||||
|
|
@ -35,7 +33,6 @@ import android.webkit.WebResourceRequest;
|
|||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.ImageView;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -43,9 +40,6 @@ import android.widget.ImageView;
|
|||
*/
|
||||
public class ClientView extends WebView {
|
||||
|
||||
/** Image used as title page background. */
|
||||
private ImageView splash;
|
||||
|
||||
/** Client URL path. */
|
||||
private String clientUrlSuffix = "client";
|
||||
|
||||
|
|
@ -55,23 +49,13 @@ public class ClientView extends WebView {
|
|||
private boolean testServer = false;
|
||||
private Boolean debugging;
|
||||
/** ID of page currently loaded. */
|
||||
private static PageId currentPage;
|
||||
private PageId currentPage;
|
||||
/** ID of page previously loaded. */
|
||||
private PageId previousPage;
|
||||
|
||||
private String stateId = "";
|
||||
private String seed = "";
|
||||
|
||||
/** Singleton instance. */
|
||||
private static ClientView instance;
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the static instance.
|
||||
*/
|
||||
public static ClientView get() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new view.
|
||||
|
|
@ -117,10 +101,12 @@ public class ClientView extends WebView {
|
|||
* Initializes client WebView interface.
|
||||
*/
|
||||
private void onInit() {
|
||||
// FIXME: may be considered unsafe as this is not technically a singleton
|
||||
instance = this;
|
||||
setActive(false); // main activity manages initial visibility
|
||||
setBackgroundColor(Color.TRANSPARENT);
|
||||
|
||||
setBackgroundColor(android.graphics.Color.TRANSPARENT);
|
||||
// expand to size of parent constraints
|
||||
setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.MATCH_PARENT));
|
||||
|
||||
final WebSettings viewSettings = getSettings();
|
||||
viewSettings.setJavaScriptEnabled(true);
|
||||
|
|
@ -130,9 +116,9 @@ public class ClientView extends WebView {
|
|||
viewSettings.setLoadWithOverviewMode(true);
|
||||
viewSettings.setUseWideViewPort(true);
|
||||
|
||||
// disable zoom
|
||||
viewSettings.setSupportZoom(false);
|
||||
viewSettings.setBuiltInZoomControls(false);
|
||||
// zoom controls
|
||||
viewSettings.setSupportZoom(true);
|
||||
viewSettings.setBuiltInZoomControls(true);
|
||||
viewSettings.setDisplayZoomControls(false);
|
||||
|
||||
// allow autoplay of music
|
||||
|
|
@ -147,6 +133,30 @@ public class ClientView extends WebView {
|
|||
initDownloadHandler();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets active state of this client view.
|
||||
*
|
||||
* @param active
|
||||
* If `true` shows this client view, otherwise hides it.
|
||||
*/
|
||||
public void setActive(final boolean active) {
|
||||
if (active) {
|
||||
setVisibility(ClientView.VISIBLE);
|
||||
return;
|
||||
}
|
||||
setVisibility(ClientView.GONE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks active state of client view.
|
||||
*
|
||||
* @return
|
||||
* `true` is this view is visible.
|
||||
*/
|
||||
public boolean isActive() {
|
||||
return getVisibility() == ClientView.VISIBLE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes method overrides to handle page loading.
|
||||
*/
|
||||
|
|
@ -180,7 +190,11 @@ public class ClientView extends WebView {
|
|||
if (!UrlHelper.isInternalUri(uri)) {
|
||||
// open external links in default browser/app
|
||||
// FIXME: should we ask for confirmation?
|
||||
MainActivity.get().startActivity(new Intent(Intent.ACTION_VIEW, uri));
|
||||
try {
|
||||
MainActivity.get().startActivity(new Intent(Intent.ACTION_VIEW, uri));
|
||||
} catch (final ActivityNotFoundException e) {
|
||||
Notifier.toast("No app found to open this link");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
view.loadUrl(UrlHelper.checkClientUrl(uri.toString()));
|
||||
|
|
@ -219,7 +233,7 @@ public class ClientView extends WebView {
|
|||
} else if (url.equals("") || url.equals("about:blank")) {
|
||||
setPage(PageId.TITLE);
|
||||
if (PreferencesActivity.getBoolean("title_music", true)) {
|
||||
playTitleMusic();
|
||||
MusicPlayer.playTitleMusic();
|
||||
}
|
||||
} else {
|
||||
setPage(PageId.OTHER);
|
||||
|
|
@ -237,7 +251,7 @@ public class ClientView extends WebView {
|
|||
public boolean dispatchKeyEvent(final KeyEvent event) {
|
||||
final boolean ret = super.dispatchKeyEvent(event);
|
||||
// hide keyboard when "enter" pressed
|
||||
if (ClientView.isGameActive() && event.getAction() == KeyEvent.ACTION_UP
|
||||
if (isGameActive() && event.getAction() == KeyEvent.ACTION_UP
|
||||
&& event.getKeyCode() == KeyEvent.KEYCODE_ENTER) {
|
||||
((InputMethodManager) MainActivity.get()
|
||||
.getSystemService(Context.INPUT_METHOD_SERVICE))
|
||||
|
|
@ -254,6 +268,9 @@ public class ClientView extends WebView {
|
|||
/**
|
||||
* Handles downloading screenshot created by web client.
|
||||
*
|
||||
* TODO: get filename to pass to `DownloadHandler.download` from "download" property of
|
||||
* anchor
|
||||
*
|
||||
* @param url
|
||||
* Content URL to the screenshot image.
|
||||
* @param userAgent
|
||||
|
|
@ -329,7 +346,7 @@ public class ClientView extends WebView {
|
|||
* One of "main", "test", or "none".
|
||||
*/
|
||||
public String getSelectedClient() {
|
||||
if (ClientView.onTitleScreen()) {
|
||||
if (onTitleScreen()) {
|
||||
return "none";
|
||||
}
|
||||
return testClient ? "test" : "main";
|
||||
|
|
@ -342,7 +359,7 @@ public class ClientView extends WebView {
|
|||
* One of "main", "test", or "none".
|
||||
*/
|
||||
public String getSelectedServer() {
|
||||
if (ClientView.onTitleScreen()) {
|
||||
if (onTitleScreen()) {
|
||||
return "none";
|
||||
}
|
||||
return testServer ? "test" : "main";
|
||||
|
|
@ -412,7 +429,7 @@ public class ClientView extends WebView {
|
|||
public void loadTitleScreen() {
|
||||
reset();
|
||||
setPage(PageId.TITLE);
|
||||
setSplashResource(R.drawable.splash);
|
||||
SplashUtil.get().setVisible(true);
|
||||
loadUrl("about:blank");
|
||||
Menu.get().show();
|
||||
}
|
||||
|
|
@ -431,25 +448,11 @@ public class ClientView extends WebView {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the background image.
|
||||
*
|
||||
* @param resId
|
||||
* Resource ID.
|
||||
*/
|
||||
private void setSplashResource(final int resId) {
|
||||
if (splash == null) {
|
||||
splash = (ImageView) MainActivity.get().findViewById(R.id.splash);
|
||||
splash.setBackgroundColor(android.graphics.Color.TRANSPARENT);
|
||||
}
|
||||
splash.setImageResource(resId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens a message dialog for user to choose between main & test clients.
|
||||
*/
|
||||
private void selectClient() {
|
||||
final AlertDialog.Builder builder = new AlertDialog.Builder(ClientView.get().getContext());
|
||||
final AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
|
||||
builder.setMessage("Select client");
|
||||
|
||||
builder.setPositiveButton("Main", new DialogInterface.OnClickListener() {
|
||||
|
|
@ -480,7 +483,7 @@ public class ClientView extends WebView {
|
|||
* Opens a message dialog for user to choose between main & test servers.
|
||||
*/
|
||||
private void selectServer() {
|
||||
final AlertDialog.Builder builder = new AlertDialog.Builder(ClientView.get().getContext());
|
||||
final AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
|
||||
builder.setMessage("Select server");
|
||||
|
||||
builder.setPositiveButton("Main", new DialogInterface.OnClickListener() {
|
||||
|
|
@ -511,8 +514,8 @@ public class ClientView extends WebView {
|
|||
// create a unique state
|
||||
stateId = generateRandomString();
|
||||
seed = generateRandomString();
|
||||
// remove splash image
|
||||
setSplashResource(android.R.color.transparent);
|
||||
// hide splash image
|
||||
SplashUtil.get().setVisible(false);
|
||||
|
||||
final String initialPage = UrlHelper.getInitialPageUrl();
|
||||
Logger.debug("Loading initial page: " + initialPage);
|
||||
|
|
@ -542,7 +545,7 @@ public class ClientView extends WebView {
|
|||
* @return
|
||||
* `true` if current page matches `PageId.TITLE`.
|
||||
*/
|
||||
public static boolean onTitleScreen() {
|
||||
public boolean onTitleScreen() {
|
||||
return currentPage == PageId.TITLE;
|
||||
}
|
||||
|
||||
|
|
@ -552,7 +555,7 @@ public class ClientView extends WebView {
|
|||
* @return
|
||||
* `true` if current page matches `PageId.WEBCLIENT`.
|
||||
*/
|
||||
public static boolean isGameActive() {
|
||||
public boolean isGameActive() {
|
||||
return currentPage == PageId.WEBCLIENT;
|
||||
}
|
||||
|
||||
|
|
@ -562,46 +565,10 @@ public class ClientView extends WebView {
|
|||
* @return
|
||||
* Current `PageId`.
|
||||
*/
|
||||
public static PageId getCurrentPageId() {
|
||||
public PageId getCurrentPageId() {
|
||||
return currentPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Plays selected music.
|
||||
*
|
||||
* @param musicId
|
||||
* String identifier of music to play or `null` to play music configured in preferences.
|
||||
*/
|
||||
public static void playTitleMusic(String musicId) {
|
||||
if (musicId == null) {
|
||||
musicId = PreferencesActivity.getString("song_list");
|
||||
}
|
||||
int id = R.raw.title_01;
|
||||
switch (musicId) {
|
||||
case "title_02":
|
||||
id = R.raw.title_02;
|
||||
break;
|
||||
case "title_03":
|
||||
id = R.raw.title_03;
|
||||
break;
|
||||
case "title_04":
|
||||
id = R.raw.title_04;
|
||||
break;
|
||||
case "title_05":
|
||||
id = R.raw.title_05;
|
||||
break;
|
||||
}
|
||||
Logger.debug("playing music: " + musicId);
|
||||
MusicPlayer.playMusic(id, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Plays music configured in preferences.
|
||||
*/
|
||||
public static void playTitleMusic() {
|
||||
playTitleMusic(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets current page ID.
|
||||
*
|
||||
|
|
@ -609,10 +576,10 @@ public class ClientView extends WebView {
|
|||
* Page ID to be used.
|
||||
*/
|
||||
private void setPage(final PageId newPage) {
|
||||
previousPage = ClientView.currentPage;
|
||||
ClientView.currentPage = newPage;
|
||||
previousPage = currentPage;
|
||||
currentPage = newPage;
|
||||
if (previousPage == null) {
|
||||
previousPage = ClientView.currentPage;
|
||||
previousPage = currentPage;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ package org.stendhalgame.client;
|
|||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.net.URLDecoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
|
|
@ -26,61 +28,175 @@ import android.util.Base64;
|
|||
* created by the web client page.
|
||||
*/
|
||||
public class DownloadHandler {
|
||||
private boolean result = false;
|
||||
private String message = null;;
|
||||
|
||||
public void download(final String url, final String mimetype) {
|
||||
private static enum DownloadType {
|
||||
IMAGE_PNG("image/png"),
|
||||
TEXT_PLAIN("text/plain"),
|
||||
UNSUPPORTED(null);
|
||||
|
||||
private String value;
|
||||
|
||||
private DownloadType(final String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static DownloadType fromString(final String value) {
|
||||
for (final DownloadType v: DownloadType.values()) {
|
||||
if (v.value != null && v.value.equals(value)) {
|
||||
return v;
|
||||
}
|
||||
}
|
||||
return DownloadType.UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean result = false;
|
||||
private String message = null;
|
||||
|
||||
|
||||
/**
|
||||
* Checks for a supported MIME type.
|
||||
*
|
||||
* @param url
|
||||
* File or data URL.
|
||||
* @param mimetype
|
||||
* Detected MIME type.
|
||||
* @return
|
||||
* Download type or unsupported.
|
||||
*/
|
||||
private DownloadType checkMimeType(final String url, final String mimetype) {
|
||||
final DownloadType dtype = DownloadType.fromString(mimetype);
|
||||
if (DownloadType.UNSUPPORTED.equals(dtype) && url.startsWith("data:image/png;base64,")) {
|
||||
return DownloadType.IMAGE_PNG;
|
||||
}
|
||||
return dtype;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes file data to device storage.
|
||||
*
|
||||
* @param dir
|
||||
* Directory where new file is to be created.
|
||||
* @param basename
|
||||
* Filename of new file.
|
||||
* @param data
|
||||
* File contents to be written to storage.
|
||||
*/
|
||||
private void downloadInternal(final File dir, final String basename, final byte[] data) {
|
||||
String stacktrace = null;
|
||||
try {
|
||||
if (!dir.exists()) {
|
||||
dir.mkdirs();
|
||||
}
|
||||
final FileOutputStream fos = new FileOutputStream(new File(dir, basename));
|
||||
fos.write(data);
|
||||
fos.close();
|
||||
this.result = true;
|
||||
} catch (final java.lang.NoClassDefFoundError e) {
|
||||
this.message = "an error occurred while decoding data (see debug log for more info)";
|
||||
stacktrace = stackTraceToString(e);
|
||||
} catch (java.io.IOException e) {
|
||||
this.message = "an error occurred while attempting to write file (see debug log for more info)";
|
||||
stacktrace = stackTraceToString(e);
|
||||
}
|
||||
|
||||
if (stacktrace != null) {
|
||||
Logger.error(stacktrace.toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes file data to device storage.
|
||||
*
|
||||
* @param url
|
||||
* A data URL.
|
||||
* @param mimetype
|
||||
* Detected MIME type.
|
||||
* @param targetName
|
||||
* Filename for new file.
|
||||
*/
|
||||
public void download(final String url, final String mimetype, String targetName) {
|
||||
|
||||
final Uri uri = Uri.parse(url);
|
||||
final String scheme = uri.getScheme();
|
||||
final String storageState = Environment.getExternalStorageState();
|
||||
final DownloadType dtype = checkMimeType(url, mimetype);
|
||||
|
||||
if (!ClientView.isGameActive()) {
|
||||
if (!MainActivity.get().getActiveClientView().isGameActive()) {
|
||||
this.message = "downloading from this page not supported";
|
||||
} else if (!"data".equals(scheme)) {
|
||||
// only data URL supported
|
||||
this.message = "download type \"" + scheme + "\" not supported";
|
||||
} else if (!"image/png".equals(mimetype) || !url.startsWith("data:image/png;base64,")) {
|
||||
} else if (DownloadType.UNSUPPORTED.equals(dtype)) {
|
||||
this.message = "mimetype not supported: " + mimetype;
|
||||
} else if (!Environment.MEDIA_MOUNTED.equals(storageState)) {
|
||||
this.message = "storage not available for writing (state: " + storageState + ")";
|
||||
} else {
|
||||
} else if (DownloadType.IMAGE_PNG.equals(dtype)) {
|
||||
final File targetDir = new File(Environment.getExternalStorageDirectory()
|
||||
+ "/Pictures/Screenshots");
|
||||
final String targetName = "stendhal_"
|
||||
+ new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss").format(new Date()) + ".png";
|
||||
if (targetName == null) {
|
||||
// default filename
|
||||
targetName = "stendhal_" + new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss").format(new Date())
|
||||
+ ".png";
|
||||
}
|
||||
|
||||
Logger.debug("Saving screenshot: " + targetDir.getPath()
|
||||
+ "/" + targetName + " (" + mimetype + ")");
|
||||
|
||||
String msg;
|
||||
String stacktrace = null;
|
||||
try {
|
||||
if (!targetDir.exists()) {
|
||||
targetDir.mkdirs();
|
||||
final byte[] data = Base64.decode(url.split("base64,")[1], Base64.DEFAULT);
|
||||
downloadInternal(targetDir, targetName, data);
|
||||
if (this.result) {
|
||||
this.message = "saved screenshot to " + targetDir.getPath() + "/" + targetName;
|
||||
}
|
||||
} else if (DownloadType.TEXT_PLAIN.equals(dtype)) {
|
||||
// `Environment.DIRECTORY_DOWNLOADS` fails on newer Android versions
|
||||
//final File targetDir = new File(Environment.DIRECTORY_DOWNLOADS);
|
||||
final File targetDir = new File(Environment.getExternalStorageDirectory() + "/Download");
|
||||
if (targetName == null) {
|
||||
// default filename
|
||||
targetName = "stendhal_" + new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss").format(new Date())
|
||||
+ ".txt";
|
||||
}
|
||||
|
||||
Logger.debug("Saving file: " + targetDir.getPath()
|
||||
+ "/" + targetName + " (" + mimetype + ")");
|
||||
|
||||
final String[] parts = url.split(",");
|
||||
byte[] data;
|
||||
if (parts[0].endsWith(";base64")) {
|
||||
data = Base64.decode(parts[1], Base64.DEFAULT);
|
||||
} else {
|
||||
try {
|
||||
data = URLDecoder.decode(parts[1], StandardCharsets.UTF_8.name())
|
||||
.getBytes(StandardCharsets.UTF_8);
|
||||
} catch (final java.io.UnsupportedEncodingException e) {
|
||||
this.message = "an error occurred while attempting to decode data URL (see debug log for more info)";
|
||||
Logger.error(stackTraceToString(e));
|
||||
return;
|
||||
}
|
||||
|
||||
final byte[] data = Base64.decode(url.split("base64,")[1], Base64.DEFAULT);
|
||||
final FileOutputStream fos = new FileOutputStream(new File(targetDir, targetName));
|
||||
fos.write(data);
|
||||
fos.close();
|
||||
|
||||
this.result = true;
|
||||
msg = "saved screenshot to " + targetDir.getPath() + "/" + targetName;
|
||||
} catch (final java.lang.NoClassDefFoundError e) {
|
||||
msg = "an error occurred while decoding data (see debug log for more info)";
|
||||
stacktrace = stackTraceToString(e);
|
||||
} catch (java.io.IOException e) {
|
||||
msg = "an error occurred while attempting to write file (see debug log for more info)";
|
||||
stacktrace = stackTraceToString(e);
|
||||
}
|
||||
|
||||
this.message = msg;
|
||||
if (stacktrace != null) {
|
||||
Logger.error(stacktrace.toString());
|
||||
downloadInternal(targetDir, targetName, data);
|
||||
if (this.result) {
|
||||
this.message = "file saved to " + targetDir.getPath() + "/" + targetName;
|
||||
}
|
||||
} else {
|
||||
this.message = "an unknown error occurred";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes file data to device storage.
|
||||
*
|
||||
* @param url
|
||||
* A data URL.
|
||||
* @param mimetype
|
||||
* Detected MIME type.
|
||||
*/
|
||||
public void download(final String url, final String mimetype) {
|
||||
download(url, mimetype, null);
|
||||
}
|
||||
|
||||
public boolean getResult() {
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,13 +11,17 @@
|
|||
***************************************************************************/
|
||||
package org.stendhalgame.client;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Bundle;
|
||||
import android.view.ViewGroup;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -25,12 +29,10 @@ import androidx.constraintlayout.widget.ConstraintLayout;
|
|||
*/
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
|
||||
/** WebView layout. */
|
||||
private ConstraintLayout layout;
|
||||
/** WebView instance. */
|
||||
private ClientView client;
|
||||
/** Menu instance. */
|
||||
private Menu menu;
|
||||
/** Active clients. **/
|
||||
private ViewGroup clientList;
|
||||
|
||||
/** Static activity instance. */
|
||||
private static MainActivity instance;
|
||||
|
|
@ -42,7 +44,7 @@ public class MainActivity extends AppCompatActivity {
|
|||
* NOTE: This may not be necessary if Android has built-in methods to retrieve current activity.
|
||||
*/
|
||||
public static MainActivity get() {
|
||||
return instance;
|
||||
return MainActivity.instance;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -53,20 +55,17 @@ public class MainActivity extends AppCompatActivity {
|
|||
try {
|
||||
super.onCreate(savedInstanceState);
|
||||
// FIXME: may be considered unsafe as this is not technically a singleton
|
||||
instance = this;
|
||||
MainActivity.instance = this;
|
||||
|
||||
// initialize debug logging mechanism
|
||||
Logger.init(getExternalFilesDir(null), this);
|
||||
|
||||
updateOrientation();
|
||||
Logger.init(getExternalFilesDir(null));
|
||||
|
||||
setContentView(R.layout.activity_main);
|
||||
// FIXME: is this used?
|
||||
layout = (ConstraintLayout) findViewById(R.id.content);
|
||||
client = (ClientView) findViewById(R.id.clientWebView);
|
||||
menu = new Menu(client.getContext());
|
||||
|
||||
client.loadTitleScreen();
|
||||
clientList = findViewById(R.id.clientList);
|
||||
createClientView();
|
||||
// NOTE: client view instance must be created before initializing menu
|
||||
menu = Menu.get();
|
||||
updateOrientation();
|
||||
} catch (final Exception e) {
|
||||
// TODO: add option to save to file or copy to clipboard the error
|
||||
e.printStackTrace();
|
||||
|
|
@ -103,11 +102,92 @@ public class MainActivity extends AppCompatActivity {
|
|||
menu.toggleVisibility();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates view to host a client instance.
|
||||
*/
|
||||
private void createClientView() {
|
||||
final ClientView clientView = new ClientView(this);
|
||||
setActiveClientView(clientView);
|
||||
clientList.addView(clientView);
|
||||
clientView.loadTitleScreen();
|
||||
// show splash when a new view is created
|
||||
SplashUtil.get().setVisible(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets client view to be shown and hides all others.
|
||||
*
|
||||
* @param clientView
|
||||
* The `ClientView` instance to be visible.
|
||||
*/
|
||||
private void setActiveClientView(final ClientView clientView) {
|
||||
for (int idx = 0; idx < clientList.getChildCount(); idx++) {
|
||||
((ClientView) clientList.getChildAt(idx)).setActive(false);
|
||||
}
|
||||
clientView.setActive(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets client view to be shown and hides all others.
|
||||
*
|
||||
* @param clientIndex
|
||||
* The index of `ClientView` instance to be visible.
|
||||
*/
|
||||
private void setActiveClientView(final int clientIndex) {
|
||||
if (clientIndex < 0 || clientIndex >= clientList.getChildCount()) {
|
||||
Logger.error(true, "Tried to access invalid client index: " + clientIndex);
|
||||
return;
|
||||
}
|
||||
setActiveClientView((ClientView) clientList.getChildAt(clientIndex));
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves active client view.
|
||||
*
|
||||
* @return
|
||||
* `ClientView` instance that is visible.
|
||||
*/
|
||||
public ClientView getActiveClientView() {
|
||||
for (int idx = 0; idx < clientList.getChildCount(); idx++) {
|
||||
final ClientView clientView = (ClientView) clientList.getChildAt(idx);
|
||||
if (clientView.isActive()) {
|
||||
return clientView;
|
||||
}
|
||||
}
|
||||
// default to first client view
|
||||
return (ClientView) clientList.getChildAt(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves list of available client views.
|
||||
*
|
||||
* @return
|
||||
* List containing all created `ClientView` instances.
|
||||
*/
|
||||
public List<ClientView> getClientViewList() {
|
||||
final List<ClientView> available = new LinkedList<>();
|
||||
for (int idx = 0; idx < clientList.getChildCount(); idx++) {
|
||||
available.add((ClientView) clientList.getChildAt(idx));
|
||||
}
|
||||
return available;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to connect to client host.
|
||||
*/
|
||||
public void loadLogin() {
|
||||
client.loadLogin();
|
||||
getActiveClientView().loadLogin();
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves app orientation.
|
||||
*
|
||||
* @return
|
||||
* One of `Configuration.ORIENTATION_PORTRAIT` (1), `Configuration.ORIENTATION_LANDSCAPE` (2),
|
||||
* or `Configuration.ORIENTATION_UNDEFINED` (0).
|
||||
*/
|
||||
public int getOrientation() {
|
||||
return getResources().getConfiguration().orientation;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -136,7 +216,7 @@ public class MainActivity extends AppCompatActivity {
|
|||
* Opens a dialog to confirm exiting activity.
|
||||
*/
|
||||
public void onRequestQuit() {
|
||||
final AlertDialog.Builder builder = new AlertDialog.Builder(client.getContext());
|
||||
final AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setMessage("Quit Stendhal?");
|
||||
|
||||
builder.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
|
||||
|
|
@ -164,12 +244,16 @@ public class MainActivity extends AppCompatActivity {
|
|||
//~ }
|
||||
|
||||
/**
|
||||
* Updates direction pad position when screen orientation changes.
|
||||
* Listens for changes to orientation.
|
||||
*/
|
||||
//~ @Override
|
||||
//~ public void onConfigurationChanged(final Configuration config) {
|
||||
//~ super.onConfigurationChanged(config);
|
||||
//~ }
|
||||
@Override
|
||||
public void onConfigurationChanged(final Configuration config) {
|
||||
super.onConfigurationChanged(config);
|
||||
final ClientView clientView = getActiveClientView();
|
||||
if (clientView != null && PageId.TITLE.equals(clientView.getCurrentPageId())) {
|
||||
SplashUtil.get().update();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when main activity ends.
|
||||
|
|
@ -193,6 +277,6 @@ public class MainActivity extends AppCompatActivity {
|
|||
* Creates preferences activity.
|
||||
*/
|
||||
public void showSettings() {
|
||||
startActivity(new Intent(MainActivity.this, PreferencesActivity.class));
|
||||
startActivity(new Intent(this, PreferencesActivity.class));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,10 +11,6 @@
|
|||
***************************************************************************/
|
||||
package org.stendhalgame.client;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.view.View;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.widget.Button;
|
||||
|
|
@ -26,8 +22,6 @@ import android.widget.Toolbar;
|
|||
*/
|
||||
public class Menu {
|
||||
|
||||
/** Main activity context. */
|
||||
private final Context ctx;
|
||||
/** Toolbar representing menu. */
|
||||
private final Toolbar nav;
|
||||
|
||||
|
|
@ -35,23 +29,25 @@ public class Menu {
|
|||
private Button btn_title;
|
||||
private Button btn_reload;
|
||||
|
||||
/** Static menu instance. */
|
||||
/** Singleton instance. */
|
||||
private static Menu instance;
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves menu instance.
|
||||
* Retrieves menu singleton instance.
|
||||
*/
|
||||
public static Menu get() {
|
||||
if (Menu.instance == null) {
|
||||
Menu.instance = new Menu();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
public Menu(final Context ctx) {
|
||||
// FIXME: may be considered unsafe as this is not technically a singleton
|
||||
instance = this;
|
||||
this.ctx = ctx;
|
||||
|
||||
nav = (Toolbar) ((Activity) ctx).findViewById(R.id.menu_main);
|
||||
/**
|
||||
* Hidden singleton constructor.
|
||||
*/
|
||||
private Menu() {
|
||||
nav = (Toolbar) MainActivity.get().findViewById(R.id.menu_main);
|
||||
nav.setTag(nav.getVisibility());
|
||||
nav.getViewTreeObserver().addOnGlobalLayoutListener(
|
||||
new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||
|
|
@ -112,7 +108,7 @@ public class Menu {
|
|||
* Refreshes displayed menu buttons.
|
||||
*/
|
||||
public void updateButtons() {
|
||||
final PageId page = ClientView.getCurrentPageId();
|
||||
final PageId page = MainActivity.get().getActiveClientView().getCurrentPageId();
|
||||
|
||||
btn_connect.setVisibility(View.GONE);
|
||||
btn_title.setVisibility(View.GONE);
|
||||
|
|
@ -130,7 +126,7 @@ public class Menu {
|
|||
* Sets actions when buttons are pressed.
|
||||
*/
|
||||
private void initButtonHandlers() {
|
||||
final MainActivity activity = (MainActivity) ctx;
|
||||
final MainActivity activity = MainActivity.get();
|
||||
|
||||
btn_connect = (Button) activity.findViewById(R.id.btn_connect);
|
||||
btn_connect.setOnClickListener(new View.OnClickListener() {
|
||||
|
|
@ -150,7 +146,7 @@ public class Menu {
|
|||
new Notifier.Action() {
|
||||
@Override
|
||||
protected void onCall() {
|
||||
ClientView.get().loadTitleScreen();
|
||||
MainActivity.get().getActiveClientView().loadTitleScreen();
|
||||
updateButtons();
|
||||
}
|
||||
},
|
||||
|
|
@ -172,7 +168,7 @@ public class Menu {
|
|||
new Notifier.Action() {
|
||||
@Override
|
||||
protected void onCall() {
|
||||
ClientView.get().reload();
|
||||
MainActivity.get().getActiveClientView().reload();
|
||||
}
|
||||
},
|
||||
new Notifier.Action() {
|
||||
|
|
@ -190,10 +186,11 @@ public class Menu {
|
|||
public void onClick(final View v) {
|
||||
super.onClick(v);
|
||||
|
||||
((MainActivity) ctx).showSettings();
|
||||
activity.showSettings();
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
final Button btn_about = (Button) activity.findViewById(R.id.btn_about);
|
||||
btn_about.setOnClickListener(new ClickListener() {
|
||||
@Override
|
||||
|
|
@ -202,7 +199,7 @@ public class Menu {
|
|||
|
||||
// TODO: create proper about activity
|
||||
|
||||
final ClientView client = ClientView.get();
|
||||
final ClientView client = MainActivity.get().getCurrentView();
|
||||
final AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.get());
|
||||
final String buildType = AppInfo.getBuildType();
|
||||
String msg = "Android client version: " + AppInfo.getBuildVersion();
|
||||
|
|
@ -244,6 +241,7 @@ public class Menu {
|
|||
builder.create().show();
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
final Button btn_quit = (Button) activity.findViewById(R.id.btn_quit);
|
||||
btn_quit.setOnClickListener(new ClickListener() {
|
||||
|
|
@ -263,7 +261,7 @@ public class Menu {
|
|||
private class ClickListener implements View.OnClickListener {
|
||||
@Override
|
||||
public void onClick(final View v) {
|
||||
if (!ClientView.onTitleScreen()) {
|
||||
if (!MainActivity.get().getActiveClientView().onTitleScreen()) {
|
||||
nav.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,13 +9,10 @@
|
|||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
package org.stendhalgame.client.sound;
|
||||
package org.stendhalgame.client;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.stendhalgame.client.Logger;
|
||||
import org.stendhalgame.client.MainActivity;
|
||||
|
||||
import android.content.Context;
|
||||
import android.media.MediaPlayer;
|
||||
import android.net.Uri;
|
||||
|
|
@ -69,6 +66,42 @@ public class MusicPlayer {
|
|||
playMusic(MainActivity.get(), id, loop);
|
||||
}
|
||||
|
||||
/**
|
||||
* Plays selected music.
|
||||
*
|
||||
* @param musicId
|
||||
* String identifier of music to play or `null` to play music configured in preferences.
|
||||
*/
|
||||
public static void playTitleMusic(String musicId) {
|
||||
if (musicId == null) {
|
||||
musicId = PreferencesActivity.getString("song_list");
|
||||
}
|
||||
int id = R.raw.title_01;
|
||||
switch (musicId) {
|
||||
case "title_02":
|
||||
id = R.raw.title_02;
|
||||
break;
|
||||
case "title_03":
|
||||
id = R.raw.title_03;
|
||||
break;
|
||||
case "title_04":
|
||||
id = R.raw.title_04;
|
||||
break;
|
||||
case "title_05":
|
||||
id = R.raw.title_05;
|
||||
break;
|
||||
}
|
||||
Logger.debug("playing music: " + musicId);
|
||||
MusicPlayer.playMusic(id, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Plays music configured in preferences.
|
||||
*/
|
||||
public static void playTitleMusic() {
|
||||
playTitleMusic(null);
|
||||
}
|
||||
|
||||
public static void stopMusic() {
|
||||
if (mplayer != null) {
|
||||
if (mplayer.isPlaying()) {
|
||||
|
|
@ -25,7 +25,7 @@ public class OpenAppByUrl extends Activity {
|
|||
// String action = intent.getAction();
|
||||
Uri data = intent.getData();
|
||||
Logger.debug("URL: " + data);
|
||||
ClientView.get().checkLoginIntent(intent);
|
||||
MainActivity.get().getActiveClientView().checkLoginIntent(intent);
|
||||
finish();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
***************************************************************************/
|
||||
package org.stendhalgame.client;
|
||||
|
||||
import org.stendhalgame.client.sound.MusicPlayer;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
|
||||
import android.os.Bundle;
|
||||
|
|
@ -204,11 +202,11 @@ public class PreferencesActivity extends AppCompatActivity {
|
|||
@Override
|
||||
public boolean onPreferenceChange(final Preference pref, final Object obj) {
|
||||
// set music state as soon as preference is changed
|
||||
if (ClientView.onTitleScreen()) {
|
||||
if (MainActivity.get().getActiveClientView().onTitleScreen()) {
|
||||
if (!((Boolean) obj)) {
|
||||
MusicPlayer.stopMusic();
|
||||
} else if (!MusicPlayer.isPlaying()) {
|
||||
ClientView.playTitleMusic();
|
||||
MusicPlayer.playTitleMusic();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -231,11 +229,11 @@ public class PreferencesActivity extends AppCompatActivity {
|
|||
@Override
|
||||
public boolean onPreferenceChange(final Preference pref, final Object obj) {
|
||||
// set music state as soon as preference is changed
|
||||
if (ClientView.onTitleScreen()) {
|
||||
if (MainActivity.get().getActiveClientView().onTitleScreen()) {
|
||||
Logger.debug("changing title music preference: " + (String) obj);
|
||||
|
||||
if (title_music.isChecked()) {
|
||||
ClientView.playTitleMusic((String) obj);
|
||||
MusicPlayer.playTitleMusic((String) obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -254,8 +252,7 @@ public class PreferencesActivity extends AppCompatActivity {
|
|||
@Override
|
||||
protected void onCall() {
|
||||
Logger.debug("clearing cache");
|
||||
final ClientView clientView = ClientView.get();
|
||||
if (clientView != null) {
|
||||
for (final ClientView clientView: MainActivity.get().getClientViewList()) {
|
||||
clientView.clearCache(true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,90 @@
|
|||
/***************************************************************************
|
||||
* Copyright © 2024 - Faiumoni e. V. *
|
||||
***************************************************************************
|
||||
***************************************************************************
|
||||
* *
|
||||
* 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 *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
package org.stendhalgame.client;
|
||||
|
||||
import android.content.res.Configuration;
|
||||
import android.widget.ImageView;
|
||||
|
||||
|
||||
public class SplashUtil {
|
||||
|
||||
/** Image used as title page background. */
|
||||
private final ImageView splash;
|
||||
|
||||
/** Singleton instance. */
|
||||
private static SplashUtil instance;
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves singleton instance.
|
||||
*/
|
||||
public static SplashUtil get() {
|
||||
if (SplashUtil.instance == null) {
|
||||
SplashUtil.instance = new SplashUtil();
|
||||
}
|
||||
return SplashUtil.instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hidden singleton constructor.
|
||||
*/
|
||||
private SplashUtil() {
|
||||
splash = (ImageView) MainActivity.get().findViewById(R.id.splash);
|
||||
setVisible(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the background splash image.
|
||||
*
|
||||
* @param resId
|
||||
* Resource ID.
|
||||
* @param bgColor
|
||||
* Coloring to fill behind splash image.
|
||||
*/
|
||||
private void setImage(final int resId, final int bgColor) {
|
||||
splash.setBackgroundColor(bgColor);
|
||||
splash.setImageResource(resId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets splash image dependent on device orientation.
|
||||
*/
|
||||
public void update() {
|
||||
if (!isVisible()) {
|
||||
return;
|
||||
}
|
||||
int resId = R.drawable.splash;
|
||||
if (MainActivity.get().getOrientation() == Configuration.ORIENTATION_PORTRAIT) {
|
||||
resId = R.drawable.splash_portrait;
|
||||
}
|
||||
// light blue background color
|
||||
setImage(resId, 0xff6c9ed1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows or hides background splash image.
|
||||
*
|
||||
* @param visible
|
||||
* `true` if image should visible, `false` if not.
|
||||
*/
|
||||
public void setVisible(final boolean visible) {
|
||||
splash.setVisibility(visible ? ImageView.VISIBLE : ImageView.GONE);
|
||||
update();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if splash is visible.
|
||||
*/
|
||||
public boolean isVisible() {
|
||||
return ImageView.VISIBLE == splash.getVisibility();
|
||||
}
|
||||
}
|
||||
|
|
@ -129,7 +129,7 @@ class UrlHelper {
|
|||
final Uri uri = UrlHelper.toUri(url);
|
||||
final Uri.Builder builder = uri.buildUpon();
|
||||
if (UrlHelper.isClientUrl(url)) {
|
||||
final ClientView client = ClientView.get();
|
||||
final ClientView client = MainActivity.get().getActiveClientView();
|
||||
final boolean testClient = client.isTestClient();
|
||||
String replaceSuffix = "/testclient/";
|
||||
if (testClient) {
|
||||
|
|
@ -212,7 +212,7 @@ class UrlHelper {
|
|||
// allow pages from stendhalgame.org
|
||||
return true;
|
||||
}
|
||||
final String cs = ClientView.get().checkCustomServer();
|
||||
final String cs = MainActivity.get().getActiveClientView().checkCustomServer();
|
||||
if (cs != null) {
|
||||
return UrlHelper.stripHost(cs).equals(host);
|
||||
}
|
||||
|
|
|
|||
1
app/android/client/src/main/play/contact-email.txt
Normal file
1
app/android/client/src/main/play/contact-email.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
https://sourceforge.net/projects/arianne/support
|
||||
1
app/android/client/src/main/play/contact-website.txt
Normal file
1
app/android/client/src/main/play/contact-website.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
https://stendhalgame.org/
|
||||
1
app/android/client/src/main/play/default-language.txt
Normal file
1
app/android/client/src/main/play/default-language.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
en-US
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
Stendhal has a huge and rich world. You can explore cities, forest, mountains, plains and dungeons.
|
||||
You can fight monsters and become a hero.
|
||||
|
||||
You will meet a wide variety of characters. Many will give you tasks and quests for valuable
|
||||
experience. You may be asked to help protect land, feed the hungry, heal the sick, make someone
|
||||
happy, solve a puzzle or simply lend a hand.
|
||||
|
||||
So what are you waiting for? A whole new world awaits... And if you like, get the source code, and
|
||||
add your own ideas!
|
||||
|
|
@ -0,0 +1 @@
|
|||
Ein Multiplayer-Adventure mit klassischer 2D-Grafik
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
Stendhal has a huge and rich world. You can explore cities, forest, mountains, plains and dungeons.
|
||||
You can fight monsters and become a hero.
|
||||
|
||||
You will meet a wide variety of characters. Many will give you tasks and quests for valuable
|
||||
experience. You may be asked to help protect land, feed the hungry, heal the sick, make someone
|
||||
happy, solve a puzzle or simply lend a hand.
|
||||
|
||||
So what are you waiting for? A whole new world awaits... And if you like, get the source code, and
|
||||
add your own ideas!
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 51 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 505 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 335 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 647 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 597 KiB |
|
|
@ -0,0 +1 @@
|
|||
A multiplayer adventure with classic 2D graphics
|
||||
|
|
@ -0,0 +1 @@
|
|||
Stendhal Game
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
Stendhal tiene un mundo enorme y rico. Puedes explorar ciudades, bosques, montañas, llanos y
|
||||
mazmorras. Puedes combatir monstruos y llegar a ser un héroe.
|
||||
|
||||
Te encontrarás con una amplia variedad de personajes. Muchos te darán tareas y misiones para obtener
|
||||
experiencia valiosa. Es posible que se te pida proteger terrenos, alimentar a los hambrientos, curar
|
||||
a los enfermos, hacer feliz a alguien, resolver un rompecabezas, o simplemente echar una mano.
|
||||
|
||||
Entonces, ¿a qué estás esperando? Un mundo completamente nuevo te espera... ¡Y si deseas, consigue
|
||||
el código fuente y añade tus propias ideas!
|
||||
|
|
@ -0,0 +1 @@
|
|||
Una aventura multijugador con gráficos 2D clásicos
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
Stendhal a un monde immense et riche. Vous pouvez explorer des villes, des forêts, des montagnes,
|
||||
des plaines et des donjons. Vous pouvez combattre des monstres et devenir un héros.
|
||||
|
||||
Vous rencontrerez une grande variété de personnages. Beaucoup vous donneront des tâches et des
|
||||
quêtes pour l'expérience précieuse. On vous demandera peut-être d'aider à protéger des terres,
|
||||
nourrir les affamés, soigner les malades, rendre quelqu'un heureux, résoudre une énigme ou
|
||||
simplement donner un coup de main.
|
||||
|
||||
Alors, qu'attendez-tu? Un tout nouveau monde vous attend... Et si vous le souhaitez, récupérez le
|
||||
code source et ajoutez vos propres idées!
|
||||
|
|
@ -0,0 +1 @@
|
|||
Une aventure multijoueur avec des graphismes 2D classiques
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
Stendhal ha un mondo enorme e ricco. Puoi esplorare città, foreste, montagne, pianure e dungeon.
|
||||
Puoi combattere mostri e diventare un eroe.
|
||||
|
||||
Incontrerai una vasta varietà di personaggi. Molti ti daranno compiti e missioni per preziosa
|
||||
esperienza. Potresti essere chiesto di aiutare a proteggere terra, nutrire gli affamati, curare i
|
||||
malati, rendere felice qualcuno, risolvere un puzzle o semplicemente dare una mano.
|
||||
|
||||
Allora, cosa stai aspettando? Un mondo completamente nuovo aspetta... E se vuoi, ottieni il codice
|
||||
sorgente e aggiungi le tue idee!
|
||||
|
|
@ -0,0 +1 @@
|
|||
Un'avventura multiplayer con la classica grafica 2D
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
Stendhal to niezwykły, pełen możliwości świat. Odkryjesz w nim miasta, lasy, góry, równiny i lochy.
|
||||
Stawić możesz czoło potworom oraz stać się bohaterem.
|
||||
|
||||
W drodze napotkasz rozmaite postacie. Wielu z nich zleci ci misje, które zapewnią cenne
|
||||
doświadczenie. Zdarzy się, że będziesz musiał ochraniać ziemie, nakarmić głodnych, pomóc wyleczyć chorych,
|
||||
uprzyjemnić czyjeś życie, rozwiązać zagadki lub po prostu wesprzeć pomocną dłonią.
|
||||
|
||||
A więc na co jeszcze czekasz? Cały nowy świat wyczekuje ciebie... Jeśli chcesz, pobierz kod
|
||||
źródłowy oraz dodaj własne pomysły!
|
||||
|
|
@ -0,0 +1 @@
|
|||
Wieloosobowa gra przygodowa z klasyczną grafiką 2D
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
Stendhal tem um mundo enorme e rico. Podes explorar cidades, florestas, montanhas, planícies e
|
||||
masmorras. Podes lutar contra monstros e tornar-te um herói.
|
||||
|
||||
Vais encontrar uma grande variedade de personagens. Muitos vão dar-te tarefas e missões para
|
||||
experiência valiosa. Podes ser solicitado(a) a proteger a terra, alimentar os famintos, curar os
|
||||
doentes, fazer alguém feliz, resolver um quebra-cabeça, ou simplesmente dar uma mão.
|
||||
|
||||
Então, do que estás à espera? Um mundo completamente novo aguarda... E se quiseres, obtém o
|
||||
código-fonte e adiciona as tuas próprias ideias!
|
||||
|
|
@ -0,0 +1 @@
|
|||
Uma aventura multijogador com gráficos 2D clássicos
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
Stendhal are o lume imensă și bogată. Poți explora orașe, păduri, munți, câmpii și temnițe. Poți să
|
||||
lupți cu monștri și să devii erou.
|
||||
|
||||
Vei întâlni o gamă largă de personaje. Multe îți vor da sarcini și misiuni în schimbul valoroasei
|
||||
experiențe. Ți s-ar putea cere să protejezi pământuri, să-i hrănești pe cei flămânzi, să-i vindeci
|
||||
pe cei bolnavi, să faci pe cineva fericit, să dezlegi un puzzle sau doar să dai o mână de ajutor.
|
||||
|
||||
Ce mai aștepți? O întreagă nouă lume te așteaptă... Și dacă vrei, ia codul sursă și adaugă-ți
|
||||
propriile idei!
|
||||
|
|
@ -0,0 +1 @@
|
|||
O aventură multijucător cu grafică 2D clasică
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
PUT RELEASE ANNOUNCEMENT LINES HERE
|
||||
|
||||
Please see the complete change log for further details: https://arianne-project.org/game/stendhal.html#changes
|
||||
BIN
app/android/client/src/main/res/drawable/splash_portrait.jpg
Normal file
BIN
app/android/client/src/main/res/drawable/splash_portrait.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 49 KiB |
|
|
@ -13,20 +13,20 @@
|
|||
android:id="@+id/splash"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
|
||||
<org.stendhalgame.client.ClientView
|
||||
android:id="@+id/clientWebView"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clientList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<Toolbar
|
||||
android:id="@+id/menu_main"
|
||||
|
|
@ -75,6 +75,7 @@
|
|||
android:background="#00000000"
|
||||
/>
|
||||
|
||||
<!--
|
||||
<Button
|
||||
android:id="@+id/btn_about"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
@ -82,6 +83,7 @@
|
|||
android:text="About"
|
||||
android:background="#00000000"
|
||||
/>
|
||||
-->
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_quit"
|
||||
|
|
|
|||
|
|
@ -5,6 +5,6 @@
|
|||
<string name="app_name">Stendhal</string>
|
||||
<string name="intent_url_scheme">stendhalprod8gps5y99pu</string>
|
||||
<string name="build_type">prod</string>
|
||||
<string name="build_version">1.45.5</string>
|
||||
<string name="build_version">1.49.5</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -13,12 +13,19 @@ package org.stendhalgame.client;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
|
||||
|
||||
/**
|
||||
* Dummy class for release builds.
|
||||
* Semi-functional logger for release builds.
|
||||
*
|
||||
* Displays notification dialogs but does not write to logs directory.
|
||||
*/
|
||||
public class Logger {
|
||||
|
||||
/** Attribute denoting state of initialization. */
|
||||
private static boolean initialized = false;
|
||||
/** Logs directory. */
|
||||
private static File logsDir;
|
||||
|
||||
|
|
@ -33,7 +40,6 @@ public class Logger {
|
|||
if (Logger.instance == null) {
|
||||
Logger.instance = new Logger();
|
||||
}
|
||||
|
||||
return Logger.instance;
|
||||
}
|
||||
|
||||
|
|
@ -47,7 +53,12 @@ public class Logger {
|
|||
/**
|
||||
* Initializes logs directory.
|
||||
*/
|
||||
public static void init(final File dir, @SuppressWarnings("unused") final MainActivity activity) {
|
||||
public static void init(final File dir) {
|
||||
if (Logger.initialized) {
|
||||
Logger.warn("tried to re-initialize logger");
|
||||
return;
|
||||
}
|
||||
Logger.initialized = true;
|
||||
logsDir = new File(dir.getPath() + "/logs");
|
||||
}
|
||||
|
||||
|
|
@ -73,10 +84,17 @@ public class Logger {
|
|||
}
|
||||
|
||||
/**
|
||||
* Dummy method for release builds.
|
||||
* Shows an information dialog.
|
||||
*
|
||||
* @param notify
|
||||
* If `true` a toast notification is displayed to user.
|
||||
* @param text
|
||||
* Text to be displayed.
|
||||
*/
|
||||
public static void info(final boolean notify, final String text) {
|
||||
// do nothing
|
||||
if (notify) {
|
||||
Logger.notify(text, LogLevel.INFO);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -87,10 +105,17 @@ public class Logger {
|
|||
}
|
||||
|
||||
/**
|
||||
* Dummy method for release builds.
|
||||
* Shows a warning dialog.
|
||||
*
|
||||
* @param notify
|
||||
* If `true` a toast notification is displayed to user.
|
||||
* @param text
|
||||
* Text to be displayed.
|
||||
*/
|
||||
public static void warn(final boolean notify, final String text) {
|
||||
// do nothing
|
||||
if (notify) {
|
||||
Logger.notify(text, LogLevel.WARN);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -101,10 +126,17 @@ public class Logger {
|
|||
}
|
||||
|
||||
/**
|
||||
* Dummy method for release builds.
|
||||
* Shows an error message dialog.
|
||||
*
|
||||
* @param notify
|
||||
* If `true` a toast notification is displayed to user.
|
||||
* @param text
|
||||
* Text to be displayed.
|
||||
*/
|
||||
public static void error(final boolean notify, final String text) {
|
||||
// do nothing
|
||||
if (notify) {
|
||||
Logger.notify(text, LogLevel.ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -115,24 +147,59 @@ public class Logger {
|
|||
}
|
||||
|
||||
/**
|
||||
* Dummy method for release builds.
|
||||
* Shows a debug message dialog.
|
||||
*
|
||||
* @param notify
|
||||
* If `true` a toast notification is displayed to user.
|
||||
* @param text
|
||||
* Text to be displayed.
|
||||
*/
|
||||
public static void debug(final boolean notify, final String text) {
|
||||
// do nothing
|
||||
if (notify) {
|
||||
Logger.notify(text, LogLevel.DEBUG);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Dummy method for release builds.
|
||||
* Displays a toast notification to user.
|
||||
*
|
||||
* @param text
|
||||
* Text to display in notification.
|
||||
*/
|
||||
public static void notify(final String text) {
|
||||
// do nothing
|
||||
notify(text, LogLevel.INFO);
|
||||
}
|
||||
|
||||
/**
|
||||
* Dummy method for release builds.
|
||||
* Displays a toast notification to user.
|
||||
*
|
||||
* @param text
|
||||
* Text to display in notification.
|
||||
* @param level
|
||||
* Logging verbosity level.
|
||||
*/
|
||||
public static void notify(final String text, final LogLevel level) {
|
||||
// do nothing
|
||||
public static void notify(final String text, LogLevel level) {
|
||||
if (!Logger.initialized) {
|
||||
System.err.println("ERROR: Logger not initialized. Call Logger.init.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (level == null) {
|
||||
level = LogLevel.INFO;
|
||||
}
|
||||
|
||||
final AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.get());
|
||||
builder.setTitle(level.label);
|
||||
builder.setMessage(text);
|
||||
|
||||
builder.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(final DialogInterface dialog, final int id) {
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
|
||||
builder.create().show();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=f6b8596b10cce501591e92f229816aa4046424f3b24d771751b06779d58c8ec4
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ panic = 'abort'
|
|||
strip = true
|
||||
|
||||
[dependencies]
|
||||
lazy_static = "1.5.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
steamworks = "0.10.0"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
use lazy_static::lazy_static;
|
||||
use serde_json::Value;
|
||||
use std::io;
|
||||
use std::io::Read;
|
||||
use std::process;
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::AtomicBool;
|
||||
use std::sync::atomic::Ordering;
|
||||
use std::sync::Mutex;
|
||||
use std::sync::mpsc::Sender;
|
||||
use std::sync::mpsc::channel;
|
||||
use std::thread;
|
||||
|
|
@ -16,6 +19,10 @@ use websocket::client::ClientBuilder;
|
|||
use websocket::{Message, OwnedMessage};
|
||||
|
||||
|
||||
lazy_static! {
|
||||
static ref AUTHENTICATED: Mutex<bool> = Mutex::new(false);
|
||||
}
|
||||
|
||||
fn connect() -> (Sender<OwnedMessage>, JoinHandle<()>) {
|
||||
println!("Read connection parameters");
|
||||
let mut json = String::new();
|
||||
|
|
@ -112,58 +119,70 @@ fn connect() -> (Sender<OwnedMessage>, JoinHandle<()>) {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
return (tx, receive_loop);
|
||||
|
||||
return (tx, receive_loop);
|
||||
}
|
||||
|
||||
fn handle_message(nl_token: &String, tx: Sender<OwnedMessage>, message: String) {
|
||||
if message.contains("event\":\"request_authentication\"") {
|
||||
authenticate(tx, nl_token.clone());
|
||||
} else if message.contains("event\":\"clientDisconnect\"") {
|
||||
let authenticated = AUTHENTICATED.lock().unwrap();
|
||||
if *authenticated {
|
||||
println!("Authenticated, exiting extension ...");
|
||||
} else {
|
||||
println!("Unauthenticated, exiting extension ...");
|
||||
}
|
||||
process::exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
fn authenticate(tx: Sender<OwnedMessage>, nl_token: String) {
|
||||
match Client::init() {
|
||||
Ok((client, single)) => {
|
||||
match Client::init() {
|
||||
Ok((client, single)) => {
|
||||
let called = Arc::new(AtomicBool::new(false));
|
||||
let callback_called = called.clone();
|
||||
|
||||
let (_ticket_handle, session_ticket): (steamworks::AuthTicket, Vec<u8>) = client.user().authentication_session_ticket();
|
||||
let _callback =
|
||||
client.register_callback(move |session_ticket_response: AuthSessionTicketResponse| {
|
||||
//if session_ticket_response.ticket == ticket_handle {
|
||||
println!("Ticket Response Result: {:?}", session_ticket_response.result);
|
||||
callback_called.store(true, Ordering::Relaxed);
|
||||
// println!("Ticket : {:?}", session_ticket_response.ticket);
|
||||
// println!("Ticket Response: {:?}", session_ticket);
|
||||
let (_ticket_handle, session_ticket): (steamworks::AuthTicket, Vec<u8>) = client.user().authentication_session_ticket();
|
||||
let _callback =
|
||||
client.register_callback(move |session_ticket_response: AuthSessionTicketResponse| {
|
||||
//if session_ticket_response.ticket == ticket_handle {
|
||||
if session_ticket_response.result.is_ok() {
|
||||
let mut authenticated = AUTHENTICATED.lock().unwrap();
|
||||
*authenticated = true;
|
||||
}
|
||||
println!("Ticket Response Result: {:?}", session_ticket_response.result);
|
||||
callback_called.store(true, Ordering::Relaxed);
|
||||
// println!("Ticket : {:?}", session_ticket_response.ticket);
|
||||
// println!("Ticket Response: {:?}", session_ticket);
|
||||
|
||||
let message = OwnedMessage::Text(format!("\
|
||||
{{\
|
||||
\"id\": \"15fb0ffb-7b18-48d2-89a3-39b1ce4b2645\",\
|
||||
\"method\": \"app.broadcast\",\
|
||||
\"accessToken\": {:?},\
|
||||
\"data\": {{\
|
||||
\"event\": \"steamAuthToken\",\
|
||||
\"data\": {:?}\
|
||||
}}\
|
||||
}}", nl_token, &session_ticket));
|
||||
match tx.send(message) {
|
||||
Ok(()) => (),
|
||||
Err(e) => {
|
||||
println!("Websocket send error: {:?}", e);
|
||||
}
|
||||
}
|
||||
let message = OwnedMessage::Text(format!("\
|
||||
{{\
|
||||
\"id\": \"15fb0ffb-7b18-48d2-89a3-39b1ce4b2645\",\
|
||||
\"method\": \"app.broadcast\",\
|
||||
\"accessToken\": {:?},\
|
||||
\"data\": {{\
|
||||
\"event\": \"steamAuthToken\",\
|
||||
\"data\": {:?}\
|
||||
}}\
|
||||
}}", nl_token, &session_ticket));
|
||||
match tx.send(message) {
|
||||
Ok(()) => (),
|
||||
Err(e) => {
|
||||
println!("Websocket send error: {:?}", e);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
for _ in 0..100 {
|
||||
single.run_callbacks();
|
||||
if called.load(Ordering::Relaxed) {
|
||||
return;
|
||||
}
|
||||
::std::thread::sleep(::std::time::Duration::from_millis(50));
|
||||
}
|
||||
},
|
||||
Err(_) => {
|
||||
});
|
||||
for _ in 0..100 {
|
||||
single.run_callbacks();
|
||||
if called.load(Ordering::Relaxed) {
|
||||
return;
|
||||
}
|
||||
::std::thread::sleep(::std::time::Duration::from_millis(50));
|
||||
}
|
||||
},
|
||||
Err(_) => {
|
||||
println!("Steam not available");
|
||||
let message = OwnedMessage::Text(format!("\
|
||||
{{\
|
||||
|
|
@ -181,10 +200,10 @@ fn authenticate(tx: Sender<OwnedMessage>, nl_token: String) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let (_tx, receive_loop) = connect();
|
||||
let (_tx, receive_loop) = connect();
|
||||
let _ = receive_loop.join();
|
||||
}
|
||||
|
|
|
|||
1
app/neutralinojs/.gitignore
vendored
1
app/neutralinojs/.gitignore
vendored
|
|
@ -11,6 +11,7 @@ neutralino.js
|
|||
# Neutralinojs related files
|
||||
.storage
|
||||
*.log
|
||||
extensions/binary/steam_appid.txt
|
||||
extensions/binary/*.so
|
||||
extensions/binary/*.dll
|
||||
extensions/binary/nativehelper*
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
2267890
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"$schema": "https://raw.githubusercontent.com/neutralinojs/neutralinojs/main/schemas/neutralino.config.schema.json",
|
||||
"applicationId": "stendhal_client",
|
||||
"version": "0.4.0",
|
||||
"applicationId": "org.stendhalgame.client",
|
||||
"version": "1.49.5",
|
||||
"defaultMode": "window",
|
||||
"port": 0,
|
||||
"documentRoot": "/resources/",
|
||||
|
|
@ -11,9 +11,9 @@
|
|||
"enableExtensions": true,
|
||||
"extensions": [
|
||||
{
|
||||
"id": "nativehelper",
|
||||
"commandLinux": "${NL_PATH}/extensions/binary/nativehelper",
|
||||
"commandWindows": "${NL_PATH}/extensions/binary/nativehelper.exe"
|
||||
"id": "nativehelper",
|
||||
"commandLinux": "${NL_PATH}/extensions/binary/nativehelper",
|
||||
"commandWindows": "${NL_PATH}/extensions/binary/nativehelper.exe"
|
||||
}
|
||||
],
|
||||
"tokenSecurity": "one-time",
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
"resourcesPath": "/resources/",
|
||||
"extensionsPath": "/extensions/",
|
||||
"clientLibrary": "/resources/js/neutralino.js",
|
||||
"binaryVersion": "5.0.0",
|
||||
"clientVersion": "5.0.1"
|
||||
"binaryVersion": "6.2.0",
|
||||
"clientVersion": "6.2.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@ const SERVER_ORIGIN = "https://stendhalgame.org";
|
|||
// const SERVER_ORIGIN = "http://localhost";
|
||||
const SERVER_PATH = "/account/login.html";
|
||||
|
||||
const UPDATE_URL = "https://arianne-project.org/stendhal/updates/manifest.json";
|
||||
|
||||
|
||||
let authenticated = false;
|
||||
|
||||
const byteToHex = [];
|
||||
|
|
@ -28,8 +31,24 @@ function onSteamAuthToken(event) {
|
|||
document.querySelector("form").submit();
|
||||
}
|
||||
|
||||
async function update() {
|
||||
try {
|
||||
let manifest = await Neutralino.updater.checkForUpdates(UPDATE_URL);
|
||||
|
||||
if(manifest.version > NL_APPVERSION) {
|
||||
console.log("Updating...");
|
||||
await Neutralino.updater.install();
|
||||
} else {
|
||||
console.log('Stendhal is up to date.');
|
||||
}
|
||||
} catch (e) {
|
||||
console.log("Update check failed", e);
|
||||
}
|
||||
}
|
||||
|
||||
function onNoAuthToken(_event) {
|
||||
console.log("onNoAuthToken");
|
||||
update();
|
||||
window.location = SERVER_ORIGIN + SERVER_PATH + "?" + Date.now();
|
||||
}
|
||||
|
||||
|
|
@ -56,8 +75,14 @@ async function timeoutExtensionAuthentication() {
|
|||
}
|
||||
|
||||
Neutralino.init();
|
||||
|
||||
// https://github.com/neutralinojs/neutralinojs/issues/678
|
||||
Neutralino.events.on("windowClose", () => {
|
||||
Neutralino.app.exit();
|
||||
});
|
||||
|
||||
setTimeout(() => timeoutExtensionConnection(), 2000);
|
||||
|
||||
Neutralino.events.on("steamAuthToken", onSteamAuthToken);
|
||||
Neutralino.events.on("noAuthToken", onNoAuthToken);
|
||||
Neutralino.extensions.dispatch('nativehelper', 'request_authentication');
|
||||
Neutralino.extensions.dispatch("nativehelper", "request_authentication");
|
||||
|
|
|
|||
146
bin/check-boilerplates.sh
Executable file
146
bin/check-boilerplates.sh
Executable file
|
|
@ -0,0 +1,146 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# This script is licensed under Creative Commons Zero (CC0 / Public Domain).
|
||||
|
||||
# source root should be directory above script location
|
||||
cd "$(dirname $0)/../"
|
||||
root=$(pwd)
|
||||
|
||||
script="$(basename $0)";
|
||||
cur_year=$(date +"%Y")
|
||||
|
||||
args=("$@")
|
||||
write=0
|
||||
if [ "${args[0]}" == "-w" ] || [ "${args[0]}" == "--write" ]; then
|
||||
write=1
|
||||
unset args[0]
|
||||
# shift so args[0] isn't undefined
|
||||
args=("${args[@]}")
|
||||
fi
|
||||
|
||||
if [ ! -z ${args[0]} ]; then
|
||||
src_dirs=("${args[@]}")
|
||||
else
|
||||
src_dirs=(
|
||||
"src/games/stendhal/client"
|
||||
"src/games/stendhal/common"
|
||||
"src/games/stendhal/server"
|
||||
"src/games/stendhal/tools"
|
||||
"src/js/stendhal"
|
||||
"data/script"
|
||||
)
|
||||
fi
|
||||
|
||||
if [ ${write} -eq 0 ]; then
|
||||
echo -e "\nScan only mode, to update files use '${script} --write'"
|
||||
fi
|
||||
|
||||
warnings=0
|
||||
# logs a warning message
|
||||
warn() {
|
||||
w="WARNING: ${1}"
|
||||
if [[ ${warnings} -eq 0 ]]; then
|
||||
# no previous output from this so erase contents
|
||||
echo -e "Issues reported by ${script}:\n${w}" > "issues.txt"
|
||||
else
|
||||
# append
|
||||
echo -e "${w}" >> "issues.txt"
|
||||
fi
|
||||
echo "${w}"
|
||||
warnings=$(expr ${warnings} + 1)
|
||||
}
|
||||
|
||||
# logs an error message & exits
|
||||
err() {
|
||||
c=${1}
|
||||
e="ERROR: ${2} (error code: ${c}), exiting ..."
|
||||
if [[ ${warnings} -eq 0 ]]; then
|
||||
# no previous output from this run so erase contents
|
||||
echo -e "Issues reported by ${script}:\n${e}" > "issues.txt"
|
||||
else
|
||||
# append
|
||||
echo -e "${e}" >> "issues.txt"
|
||||
fi
|
||||
echo -e "${e}\nDetails saved to issues.txt"
|
||||
exit ${c}
|
||||
}
|
||||
|
||||
start_time=$(date +"%s")
|
||||
|
||||
file_types=(-name "*.java" -o -name "*.js" -o -name "*.ts" -o -name "*.lua")
|
||||
checked=0
|
||||
updated=0
|
||||
for rel_path in "${src_dirs[@]}"; do
|
||||
if [[ "${rel_path}" == /* ]]; then
|
||||
abs_path="${rel_path}"
|
||||
else
|
||||
abs_path="${root}/${rel_path}"
|
||||
fi
|
||||
if [ ! -d "${abs_path}" ]; then
|
||||
warn "Skipped missing directory: ${rel_path}"
|
||||
continue
|
||||
fi
|
||||
if [ ${write} -eq 0 ]; then
|
||||
echo -e "\nChecking copyrights in ${rel_path} ..."
|
||||
else
|
||||
echo -e "\nChecking and updating copyright year (${cur_year}) in ${rel_path} ..."
|
||||
fi
|
||||
|
||||
sources=$(find "${rel_path}" -type f \( "${file_types[@]}" \))
|
||||
for src in ${sources}; do
|
||||
pattern="Copyright\( ©\)\? "
|
||||
instances=$(grep "^ \*.*${pattern}" "${src}")
|
||||
icount=$(echo "${instances}" | wc -l)
|
||||
|
||||
if [ ${icount} -gt 1 ]; then
|
||||
warn "Multiple copyrights: ${src}"
|
||||
# use first instance
|
||||
instances=$(echo "${instances}" | head -n1)
|
||||
fi
|
||||
|
||||
year=$(echo "${instances}" | sed -e "s/^ \*.*${pattern}//" | cut -b1-4)
|
||||
if [ "${year}" == "" ]; then
|
||||
warn "Copyright not detected: ${src}"
|
||||
continue
|
||||
elif [ "${year}" == "${cur_year}" ]; then
|
||||
years="${cur_year}"
|
||||
else
|
||||
years="${year}-${cur_year}"
|
||||
fi
|
||||
|
||||
if [ ${#year} -lt 4 ]; then
|
||||
warn "Invalid year ${year}: ${src}"
|
||||
fi
|
||||
|
||||
if [ ${write} -gt 0 ]; then
|
||||
# add updated year(s) to file (replace only first instance)
|
||||
sed -i -e "0,/${pattern}${year}[^ ]* \([^*]*\)\*/s//Copyright\1 ${years} \2\*/" "${src}"
|
||||
# update pattern for perl regex
|
||||
#pattern=$(echo ${pattern} | perl -pe 's/\\//g')
|
||||
#perl -i -pe "!\${i} && s/${pattern} ${year}.*? (.*)\*/Copyright\$1 ${years} \$2\*/ && (\${i}=1)" "${src}"
|
||||
|
||||
ret=$?
|
||||
if [ ${ret} -ne 0 ]; then
|
||||
err ${ret} "An unhandled exception occurred"
|
||||
fi
|
||||
|
||||
updated=$(expr ${updated} + 1)
|
||||
fi
|
||||
|
||||
checked=$(expr ${checked} + 1)
|
||||
done
|
||||
done
|
||||
|
||||
s=$(expr $(date +"%s") - ${start_time})
|
||||
m=$(expr ${s} / 60)
|
||||
s=$(expr ${s} - ${m} \* 60)
|
||||
h=$(expr ${m} / 60)
|
||||
m=$(expr ${m} - ${h} \* 60)
|
||||
|
||||
echo -e "\nDone (elapsed time: ${h}h ${m}m ${s}s)"
|
||||
echo "Files checked: ${checked}"
|
||||
echo "Files updated: ${updated}"
|
||||
echo "Warnings: ${warnings}"
|
||||
if [ ${warnings} -gt 0 ]; then
|
||||
echo "Details saved to issues.txt"
|
||||
fi
|
||||
90
bin/check-file-size.py
Executable file
90
bin/check-file-size.py
Executable file
|
|
@ -0,0 +1,90 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
'''
|
||||
***************************************************************************
|
||||
* Copyright © 2025 - Faiumoni e. V. *
|
||||
***************************************************************************
|
||||
***************************************************************************
|
||||
* *
|
||||
* 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 *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************
|
||||
'''
|
||||
|
||||
import errno
|
||||
import os
|
||||
import sys
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
dir_root = Path(__file__).parent
|
||||
if "bin" == dir_root.name:
|
||||
dir_root = Path(dir_root.parent)
|
||||
dir_music = Path(dir_root, "data/music")
|
||||
dir_sounds = Path(dir_root, "data/sounds")
|
||||
|
||||
|
||||
## Checks if a file is larger than 2MB.
|
||||
#
|
||||
# On systems with low resources, the Java client struggles to load large audio files.
|
||||
#
|
||||
# @param path
|
||||
# File path.
|
||||
# @return
|
||||
# `EFBIG` if file is larger than 2MB, 0 otherwise.
|
||||
def checkAudioFileSize(path):
|
||||
if not path.is_file():
|
||||
# ignore if audio file doesn't exist
|
||||
print("WARNING: Ignoring file not found: {}".format(path))
|
||||
return 0
|
||||
|
||||
if path.stat().st_size > 1048576 * 2:
|
||||
# warn if file size > 2MB
|
||||
return errno.EFBIG
|
||||
return 0
|
||||
|
||||
## Checks directory for large audio files.
|
||||
#
|
||||
# @param path
|
||||
# Directory path to be walked.
|
||||
# @return
|
||||
# `EFBIG` if any file larger than 2MB found, 0 otherwise.
|
||||
def checkAudioDir(path):
|
||||
if not path.is_dir():
|
||||
# ignore if audio directory doesn't exist
|
||||
print("WARNING: Ignoring directory not found: {}".format(path))
|
||||
return 0
|
||||
|
||||
res = 0
|
||||
for ROOT, DIRS, FILES in path.walk():
|
||||
for filename in FILES:
|
||||
filepath = Path(ROOT, filename)
|
||||
if filepath.suffix.lower().lstrip(".") not in ("ogg", "oga", "mid", "midi"):
|
||||
# only check supported file types
|
||||
continue
|
||||
|
||||
code = checkAudioFileSize(filepath)
|
||||
if code == errno.EFBIG:
|
||||
res = code
|
||||
sys.stderr.write("WARNING: Audio file size larger than 2MB: {}\n".format(str(filepath)[len(str(dir_root)):].lstrip("/\\")))
|
||||
|
||||
return res
|
||||
|
||||
def main():
|
||||
res = 0
|
||||
for audio_dir in dir_music, dir_sounds:
|
||||
code = checkAudioDir(audio_dir)
|
||||
if code != 0:
|
||||
res = code
|
||||
if res == 0:
|
||||
print("No large audio data files detected")
|
||||
return res
|
||||
|
||||
if __name__ == "__main__":
|
||||
# work from source tree root
|
||||
os.chdir(dir_root)
|
||||
sys.exit(main())
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# ***************************************************************************
|
||||
# * Copyright © 2023 - Stendhal *
|
||||
# * Copyright © 2023-2024 - Stendhal *
|
||||
# ***************************************************************************
|
||||
# * *
|
||||
# * This program is free software; you can redistribute it and/or modify *
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
@echo off
|
||||
|
||||
set STENDHAL_VERSION=1.45.5
|
||||
set STENDHAL_VERSION=1.49.5
|
||||
set SERVER_JAR=stendhal-server-%STENDHAL_VERSION%.jar
|
||||
|
||||
:: change to server directory
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
STENDHAL_VERSION="1.45.5"
|
||||
STENDHAL_VERSION="1.49.5"
|
||||
SERVER_JAR="stendhal-server-${STENDHAL_VERSION}.jar"
|
||||
|
||||
# change to server directory
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env python3
|
||||
#Tue Sep 10 23:32:58 CEST 2019, slightly tweaked -- omero
|
||||
|
||||
"""
|
||||
This script is used to create the world map with labeled zone names.
|
||||
|
|
@ -10,20 +9,19 @@ To create the labeled world map:
|
|||
* Open a command line
|
||||
* Change to your stendhal directory
|
||||
* Run
|
||||
ant rendermaps
|
||||
ant rendermaps
|
||||
* Change to the tiled directory
|
||||
* Run
|
||||
python vampire_maplabel.py -world
|
||||
python vampire_maplabel.py -world
|
||||
* Open tiled/world/world.tmx in tiled
|
||||
* Set the floor layer to opaque (no transparency)
|
||||
* Set the zoom to 1:1 (CTRL-0)
|
||||
* From the file menu, select "Save as Image"
|
||||
* Crop the black border (e.g. use "Crop Automatically" in The GIMP)
|
||||
* Upload the image, e.g. at http://imageshack.us
|
||||
* Replace your labeled image files from the tiled/world directory with
|
||||
the clean (unlabeled) ones from CVS.
|
||||
* Edit http://stendhalgame.org/wiki/Template:SmallWorldMap
|
||||
and add a link to your uploaded image.
|
||||
* Replace your labeled image files from the tiled/world directory with the clean (unlabeled) ones
|
||||
from CVS.
|
||||
* Edit http://stendhalgame.org/wiki/Template:SmallWorldMap and add a link to your uploaded image.
|
||||
"""
|
||||
|
||||
import sys
|
||||
|
|
@ -33,29 +31,38 @@ import os
|
|||
|
||||
from PIL import Image, ImageFont, ImageDraw
|
||||
|
||||
# get absolute path where script is located
|
||||
dir_root = os.path.dirname(__file__)
|
||||
if dir_root:
|
||||
os.chdir(dir_root)
|
||||
dir_root = os.getcwd()
|
||||
dir_world = os.path.join(dir_root, 'world')
|
||||
|
||||
script_name = os.path.basename(__file__)
|
||||
|
||||
# directory from where script was executed
|
||||
dir_start = os.getcwd()
|
||||
# path to root directory
|
||||
os.chdir(os.path.join(os.path.dirname(__file__), '../'))
|
||||
dir_root = os.getcwd()
|
||||
# directory relative to root where images are located
|
||||
subdir_world = os.path.normpath('data/maps/world')
|
||||
# absolute path to directory where images are located
|
||||
dir_world = os.path.join(dir_root, subdir_world)
|
||||
|
||||
protected = ('world', 'logo', 'reserved', 'empty', 'empty-white')
|
||||
|
||||
def showUsage():
|
||||
print ('Usage: {} [image-filenames...]'.format(script_name))
|
||||
print (' This will label each PNG file passed as argument.')
|
||||
print (' E.g: ./world/int_*.png will label all interiors, etc. etc.')
|
||||
print
|
||||
print ('Alternatively, you can run: {} -world'.format(script_name))
|
||||
print (' This will label each PNG file in the world subdirectory.')
|
||||
print('Usage: {} [image-filenames...]'.format(script_name))
|
||||
print(' This will label each PNG file passed as argument.')
|
||||
print(' E.g: data/maps/world/int_*.png will label all\n interiors, etc.')
|
||||
print(' Note: If filename parameters aren\'t found they\n are assumed to be nested within the\n {} directory.'.format(subdir_world))
|
||||
print()
|
||||
print('Alternatively, you can run: {} -world'.format(script_name))
|
||||
print(' This will label each PNG file in the world subdirectory.')
|
||||
|
||||
processed = 0
|
||||
def do_label(fname):
|
||||
print ('Processing {}'.format(fname))
|
||||
global processed
|
||||
|
||||
print('Processing {}'.format(fname))
|
||||
# remove directory and file extension
|
||||
label = os.path.basename(fname).split('/')[-1].replace('.png', '')
|
||||
print ('Processing LABEL: {}'.format(label))
|
||||
print('Processing LABEL: {}'.format(label))
|
||||
|
||||
img = Image.open(fname)
|
||||
img = img.convert('RGBA')
|
||||
|
|
@ -64,7 +71,7 @@ def do_label(fname):
|
|||
# label
|
||||
draw = ImageDraw.Draw(img, 'RGBA')
|
||||
draw.fontmode = "0" # set to "1" to disable anti-aliasing (not documented in PIL module)
|
||||
font = ImageFont.truetype('../data/font/Carlito-Bold.ttf', 12)
|
||||
font = ImageFont.truetype('../font/Carlito-Bold.ttf', 12)
|
||||
draw.text((6, 6), label, ( 0, 0, 0, 255),font=font)
|
||||
draw.text((5, 5), label, (255, 255, 255, 255),font=font)
|
||||
|
||||
|
|
@ -75,12 +82,43 @@ def do_label(fname):
|
|||
img.paste(img2, img2)
|
||||
|
||||
img.save(fname)
|
||||
processed += 1
|
||||
|
||||
|
||||
## Checks file path & converts to absolute.
|
||||
#
|
||||
# @param imagepath
|
||||
# Path to image file.
|
||||
def checkAbsPath(imagepath):
|
||||
if not imagepath.lower().endswith('.png'):
|
||||
# only PNG images supported
|
||||
imagepath += '.png'
|
||||
imagepath = os.path.normpath(imagepath)
|
||||
|
||||
# check from root directory
|
||||
if os.path.isfile(imagepath):
|
||||
return os.path.abspath(imagepath)
|
||||
|
||||
# check from directory where script was executed
|
||||
os.chdir(dir_start)
|
||||
if os.path.isfile(imagepath):
|
||||
imagepath = os.path.abspath(imagepath)
|
||||
else:
|
||||
# assume file is nested in `subdir_world`
|
||||
imagepath = os.path.join(dir_world, imagepath)
|
||||
# change back to root dir remaining execution
|
||||
os.chdir(dir_root)
|
||||
|
||||
return imagepath
|
||||
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print('\nERROR: Not enough arguments\n')
|
||||
showUsage()
|
||||
sys.exit(1)
|
||||
elif len(sys.argv) == 2 and sys.argv[1] == '-world':
|
||||
|
||||
|
||||
if len(sys.argv) == 2 and sys.argv[1] == '-world':
|
||||
for fname in os.listdir(dir_world):
|
||||
if fname.endswith('.png'):
|
||||
absolute_fname = os.path.join(dir_world, fname)
|
||||
|
|
@ -89,14 +127,8 @@ elif len(sys.argv) == 2 and sys.argv[1] == '-world':
|
|||
continue
|
||||
do_label(absolute_fname)
|
||||
else:
|
||||
# This doesn't work for me. --mort
|
||||
#for fname in reduce(operator.add, map(glob.glob, sys.argv[1:])):
|
||||
|
||||
# This works for me. --omero
|
||||
for fname in list(sys.argv[1:]):
|
||||
if not fname.endswith('.png'):
|
||||
fname = '{}.png'.format(fname)
|
||||
absolute_fname = os.path.join(dir_world, fname)
|
||||
absolute_fname = checkAbsPath(fname)
|
||||
if fname.rstrip('.png') in protected:
|
||||
print('NOTE: skipping protected file: {}'.format(absolute_fname))
|
||||
continue
|
||||
|
|
@ -104,7 +136,10 @@ else:
|
|||
if not os.path.isfile(absolute_fname):
|
||||
print('\nERROR: Cannot process {}\n File does not exist.'.format(absolute_fname))
|
||||
sys.exit(1)
|
||||
print ( 'Labeling {}...'.format(fname ))
|
||||
print('Labeling {}...'.format(fname ))
|
||||
do_label(absolute_fname)
|
||||
|
||||
print ('All Done.')
|
||||
if processed == 0:
|
||||
print('\nWARNING: no images were processed')
|
||||
else:
|
||||
print('\nprocessed {} {}'.format(processed, 'image' if processed == 1 else 'images'))
|
||||
|
|
@ -91,10 +91,10 @@ updates_server_fallback = http://arianne.sourceforge.net/stendhal/updates
|
|||
version_server = http://arianne.sourceforge.net/stendhal.version
|
||||
|
||||
# current version of stendhal
|
||||
version.old = 1.45
|
||||
version = 1.45.5
|
||||
version.old = 1.49
|
||||
version = 1.49.5
|
||||
# FIXME: dynamic method to set this property?
|
||||
version.android = 1045005
|
||||
version.android = 1049005
|
||||
|
||||
# javac options
|
||||
javac.deprecation = true
|
||||
|
|
@ -102,18 +102,17 @@ javac.debug = true
|
|||
javac.debuglevel = source,lines
|
||||
|
||||
# change these only if you know what you are doing
|
||||
buildroot = build
|
||||
build = build
|
||||
buildroot = ${build}
|
||||
build-archive = build-archive
|
||||
src = src
|
||||
testsrc = tests
|
||||
srcjs = srcjs
|
||||
docu = data/docu
|
||||
maps = data/maps
|
||||
data = data/gui
|
||||
sprites = data/sprites
|
||||
layers = data/layers
|
||||
tiled = tiled
|
||||
build = build
|
||||
srcjs = ${src}/js
|
||||
docs = doc
|
||||
data = data
|
||||
gui = ${data}/gui
|
||||
maps = ${data}/maps
|
||||
sprites = ${data}/sprites
|
||||
lib = ${buildroot}/lib
|
||||
marauroa_root = ../marauroa
|
||||
marauroa_src = ${marauroa_root}/src
|
||||
|
|
|
|||
102
build.xml
102
build.xml
|
|
@ -1,103 +1,33 @@
|
|||
<?xml version='1.0'?>
|
||||
|
||||
<project name="stendhal" default="compile" basedir=".">
|
||||
<!--
|
||||
Sets a property (by name and value), or set of properties (from file or resource) in the project. Properties are case sensitive.
|
||||
Properties are immutable: whoever sets a property first freezes it for the rest of the build; they are most definitely not variables.
|
||||
-->
|
||||
<property environment="env"/>
|
||||
<project name="stendhal" default="help" basedir=".">
|
||||
<description>
|
||||
Project:
|
||||
Name: .......... ${game_name}
|
||||
Version: ....... ${version}
|
||||
Root: .......... ${basedir}
|
||||
|
||||
<condition property="os.win">
|
||||
<os family="windows"/>
|
||||
</condition>
|
||||
Build system:
|
||||
Ant version: ... ${ant.version.number}
|
||||
Ant home: ...... ${ant.location}
|
||||
Java version: .. ${java.version}
|
||||
Java home: ..... ${java.home}
|
||||
|
||||
<condition property="exe.ext" value=".exe" else="">
|
||||
<equals arg1="${os.win}" arg2="true"/>
|
||||
</condition>
|
||||
<condition property="executable.npm" value="npm.cmd" else="npm">
|
||||
<equals arg1="${os.win}" arg2="true"/>
|
||||
</condition>
|
||||
Execute `ant help` for more information.
|
||||
</description>
|
||||
|
||||
<!-- Windows fails to execute "ng" unless it is invoked as "ng.cmd" -->
|
||||
<condition property="executable.suffix" value=".cmd">
|
||||
<os family="windows"/>
|
||||
</condition>
|
||||
<property name="executable.suffix" value=""/>
|
||||
|
||||
<property file="build.ant-private.properties"/>
|
||||
<property file="build.ant.properties"/>
|
||||
|
||||
<property name="build_tests" value="${buildroot}/build_tests"/>
|
||||
<property name="build_tests_report" value="${buildroot}/build_test_report"/>
|
||||
|
||||
<property name="build_client" value="${buildroot}/build_client"/>
|
||||
<property name="build_client_data" value="${buildroot}/build_client_data"/>
|
||||
<property name="build_client_sound_data" value="${buildroot}/build_client_sound_data"/>
|
||||
<property name="build_client_music_data" value="${buildroot}/build_client_music_data"/>
|
||||
|
||||
<property name="build_webclient" value="${buildroot}/build_webclient"/>
|
||||
|
||||
<property name="build_docker" value="${buildroot}/build_docker"/>
|
||||
<property name="buildtools_docker" value="buildtools/docker"/>
|
||||
|
||||
<property name="build_postman" value="${buildroot}/buildbot/"/>
|
||||
|
||||
<property name="build_server" value="${buildroot}/build_server"/>
|
||||
<property name="build_server_maps" value="${buildroot}/build_server_maps"/>
|
||||
<property name="build_server_script" value="${buildroot}/build_server_script"/>
|
||||
<property name="build_server_mods" value="${buildroot}/build_server_mods"/>
|
||||
<property name="build_server_xmlconf" value="${buildroot}/build_server_xmlconf"/>
|
||||
|
||||
<property name="build_stendhaltools" value="${buildroot}/build_stendhaltools"/>
|
||||
<property name="build_stendhaltextclient" value="${buildroot}/build_stendhaltextclient"/>
|
||||
|
||||
<property name="client_data" value="stendhal-data-${version}.jar"/>
|
||||
<property name="client_jarname" value="stendhal-${version}.jar"/>
|
||||
<property name="client_sound_data" value="stendhal-sound-data-${version}.jar"/>
|
||||
<property name="client_music_data" value="stendhal-music-data-${version}.jar"/>
|
||||
<property name="client_starter_jarname" value="stendhal-starter-${version}.jar"/>
|
||||
|
||||
<property name="dist_server_binary" value="${buildroot}/stendhal-server-${version}.zip" />
|
||||
|
||||
<property name="maps_jarname" value="stendhal-maps-${version}.jar"/>
|
||||
|
||||
<property name="server_jarname" value="stendhal-server-${version}.jar"/>
|
||||
<property name="xmlconf_jarname" value="stendhal-xmlconf-${version}.jar"/>
|
||||
|
||||
<property name="config_dir" value="data/conf"/>
|
||||
|
||||
<property name="schema_location" value="${config_dir}"/>
|
||||
|
||||
<property name="cobertura.dir" value="${libdir}/cobertura"/>
|
||||
|
||||
<condition property="exclude.signing" value="true">
|
||||
<not>
|
||||
<available file="keystore.ks"/>
|
||||
</not>
|
||||
</condition>
|
||||
<condition property="exclude.jardiff" value="true">
|
||||
<not>
|
||||
<available file="${build-archive}/stendhal-${version.old}.zip"/>
|
||||
</not>
|
||||
</condition>
|
||||
|
||||
<!-- time & date -->
|
||||
<tstamp>
|
||||
<format property="year" pattern="yyyy"/>
|
||||
<format property="date" pattern="yyyy-MM-dd"/>
|
||||
<format property="time" pattern="HH:mm:ss"/>
|
||||
</tstamp>
|
||||
<property name="datetime" value="${date} ${time}"/>
|
||||
|
||||
<!-- check for some executables -->
|
||||
<available property="python.present" file="python${exe.ext}" filepath="${env.PATH}"/>
|
||||
<available property="python3.present" file="python3${exe.ext}" filepath="${env.PATH}"/>
|
||||
|
||||
|
||||
<!-- Ant sub-modules -->
|
||||
|
||||
<import file="build-private.xml" optional="true"/>
|
||||
|
||||
<import file="${ant_modules}/properties.xml"/>
|
||||
<import file="${ant_modules}/info.xml"/>
|
||||
<import file="${ant_modules}/system.xml"/>
|
||||
<import file="${ant_modules}/apps.xml"/>
|
||||
<import file="${ant_modules}/main.xml"/>
|
||||
<import file="${ant_modules}/clean.xml"/>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<!--
|
||||
To setup up the development environment on Linux:
|
||||
curl https://sh.rustup.rs -sSf | sh
|
||||
apt-get install mingw-w64
|
||||
apt-get install build-essential libssl-dev pkg-config mingw-w64
|
||||
cargo install cargo-license
|
||||
rustup target add x86_64-pc-windows-gnu
|
||||
-->
|
||||
|
|
@ -37,6 +37,7 @@
|
|||
<arg value="--target" />
|
||||
<arg value="x86_64-pc-windows-gnu" />
|
||||
</exec>
|
||||
<mkdir dir="app/neutralinojs/extensions/binary" />
|
||||
<exec executable="cargo" dir="app/nativehelper" failonerror="true" output="app/neutralinojs/extensions/binary/LICENSE.txt">
|
||||
<arg value="license" />
|
||||
<arg value="-ad" />
|
||||
|
|
@ -57,15 +58,17 @@
|
|||
</chmod>
|
||||
</target>
|
||||
|
||||
|
||||
<!--
|
||||
npm install -g @neutralinojs/neu
|
||||
-->
|
||||
<available file="app/neutralinojs/bin/neutralino-linux_x64" property="neutralinojs.present" />
|
||||
<target name="prepare-neutralinojs" unless="neutralinojs.present">
|
||||
<exec executable="neu" dir="app/neutralinojs" failonerror="true">
|
||||
<exec executable="${executable.neu}" dir="app/neutralinojs" failonerror="true">
|
||||
<arg value="update" />
|
||||
</exec>
|
||||
</target>
|
||||
<target name="neutralinojs" depends="prepare-neutralinojs">
|
||||
<exec executable="neu" dir="app/neutralinojs" failonerror="true">
|
||||
<exec executable="${executable.neu}" dir="app/neutralinojs" failonerror="true">
|
||||
<arg value="build" />
|
||||
</exec>
|
||||
<delete failonerror="false">
|
||||
|
|
@ -75,23 +78,33 @@
|
|||
<include name="*.log" />
|
||||
</fileset>
|
||||
</delete>
|
||||
<move
|
||||
file="app/neutralinojs/dist/stendhal-client/stendhal-client-linux_x64"
|
||||
tofile="app/neutralinojs/dist/stendhal-client/stendhal-client-linux" />
|
||||
<move
|
||||
file="app/neutralinojs/dist/stendhal-client/stendhal-client-win_x64.exe"
|
||||
tofile="app/neutralinojs/dist/stendhal-client/stendhal-client-windows.exe" />
|
||||
<chmod dir="app/neutralinojs/dist/stendhal-client/" type="file" perm="ugo+rx">
|
||||
<include name="stendhal*" />
|
||||
<include name="stendhal-client-linux" />
|
||||
<include name="**/nativehelper*" />
|
||||
</chmod>
|
||||
<!--
|
||||
<copy todir="dist/stendhal-client" flatten="true">
|
||||
<fileset dir="app/neutralinoks">
|
||||
<include name="LICENSE.txt" />
|
||||
</fileset>
|
||||
</copy>
|
||||
-->
|
||||
<copy file="app/neutralinojs/LICENSE.txt" tofile="app/neutralinojs/dist/stendhal-client/LICENSE.txt">
|
||||
<filterchain>
|
||||
<concatfilter append="app/neutralinojs/extensions/binary/LICENSE.txt" />
|
||||
</filterchain>
|
||||
</copy>
|
||||
|
||||
<echo file="app/neutralinojs/dist/stendhal-client/extensions/binary/steam_appid.txt">${steam-appid}</echo>
|
||||
<delete file="${buildroot}/stendhal-client-${version}.zip"/>
|
||||
<zip destfile="${buildroot}/stendhal-client-${version}.zip">
|
||||
<zipfileset dir="app/neutralinojs/dist/stendhal-client" prefix="stendhal-client" filemode="755">
|
||||
<include name="stendhal-client-linux" />
|
||||
<include name="**/nativehelper*" />
|
||||
</zipfileset>
|
||||
<zipfileset dir="app/neutralinojs/dist/stendhal-client" prefix="stendhal-client">
|
||||
<exclude name="stendhal-client-linux" />
|
||||
<exclude name="**/nativehelper*" />
|
||||
</zipfileset>
|
||||
</zip>
|
||||
</target>
|
||||
|
||||
|
||||
|
|
@ -148,7 +161,8 @@
|
|||
</target> <!-- client_android_build -->
|
||||
|
||||
|
||||
<target name="android" description="Create Android client package for release and distribution.">
|
||||
<!-- Create Android client package for release and distribution. -->
|
||||
<target name="android">
|
||||
<echo
|
||||
if:set="exclude.webview"
|
||||
message="ANDROID_SDK_ROOT environment variable not set. Skipping Android WebView client build."/>
|
||||
|
|
|
|||
|
|
@ -2,8 +2,11 @@
|
|||
|
||||
<project xmlns:if="ant:if" xmlns:unless="ant:unless">
|
||||
|
||||
<target name="clean" description="Delete all build files and directories.">
|
||||
<delete dir="${buildroot}"/>
|
||||
<!-- Delete all build files and directories. -->
|
||||
<target name="clean">
|
||||
<delete includeEmptyDirs="true" quiet="true">
|
||||
<fileset dir="${buildroot}" excludes="eclipse/" defaultExcludes="false"/>
|
||||
</delete>
|
||||
<delete dir="${build_cobertura}"/>
|
||||
<delete dir="${build_cobertura_report}"/>
|
||||
<delete file="cobertura.ser"/>
|
||||
|
|
@ -16,14 +19,16 @@
|
|||
</target>
|
||||
|
||||
|
||||
<target name="clean_client_data" description="Delete client data build files and directories.">
|
||||
<!-- Delete client data build files and directories. -->
|
||||
<target name="clean_client_data">
|
||||
<delete dir="${build_client_data}"/>
|
||||
<delete dir="${build_client_music_data}"/>
|
||||
<delete dir="${build_client_sound_data}"/>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="cleanjs" description="Delete web client build files and directories.">
|
||||
<!-- Delete web client build files and directories. -->
|
||||
<target name="cleanjs">
|
||||
<delete dir="${buildroot}/js"/>
|
||||
<delete dir="${buildroot}/ts"/>
|
||||
</target>
|
||||
|
|
|
|||
|
|
@ -19,13 +19,15 @@
|
|||
</condition>
|
||||
|
||||
|
||||
<target name="jar" depends="client_build,server_build" description="Build server and clients.">
|
||||
<!-- Build server and clients. -->
|
||||
<target name="jar" depends="client_build,server_build">
|
||||
<!-- XXX: client & server builds are not exclusive to NetBeans, remove this output? -->
|
||||
<echo>Built client and server for NetBeans.</echo>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="signjar" unless="exclude.signing" description="Sign client distribution.">
|
||||
<!-- Sign client distribution. -->
|
||||
<target name="signjar" unless="exclude.signing">
|
||||
<signjar
|
||||
alias="${keystore.alias}"
|
||||
keystore="keystore.ks"
|
||||
|
|
@ -34,24 +36,30 @@
|
|||
</target>
|
||||
|
||||
|
||||
<!-- Generate JAR files for both client and server. -->
|
||||
<!-- XXX: why does this depend on "server_build" twice? -->
|
||||
<target name="compile" depends="server_build,client_build,server_build" description="Generate JAR files for both client and server."/>
|
||||
<target name="compile" depends="server_build,client_build,server_build" />
|
||||
|
||||
|
||||
<target name="dist" depends="clean,dist_binary,dist_source,signupdates" description="Create all packages for Stendhal release."/>
|
||||
<!-- Create all packages for Stendhal release. -->
|
||||
<target name="dist" depends="clean,dist_binary,dist_source,signupdates" />
|
||||
|
||||
|
||||
<target name="dist_binary" depends="clean,dist_server_binary,dist_client_binary,dist_client_starter,dist_webclient_binary"
|
||||
description="Create all binary packages for Stendhal release."/>
|
||||
<!-- Create all binary packages for Stendhal release. -->
|
||||
<target name="dist_binary" depends="clean,dist_server_binary,dist_client_binary,dist_client_starter,dist_webclient_binary" />
|
||||
|
||||
|
||||
<!-- START: source -->
|
||||
|
||||
<target name="dist_source" description="Create all source packages for Stendhal release.">
|
||||
<!-- Create all source packages for Stendhal release. -->
|
||||
<target name="dist_source">
|
||||
<mkdir dir="${buildroot}/stendhal-${version}-src"/>
|
||||
|
||||
<copy todir="${buildroot}/stendhal-${version}-src/src">
|
||||
<fileset dir="src"/>
|
||||
<fileset dir="src">
|
||||
<exclude name="js/*compiled*"/>
|
||||
<exclude name="js/contributors.html"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<mkdir dir="${buildroot}/stendhal-${version}-src/libs"/>
|
||||
|
|
@ -65,12 +73,7 @@
|
|||
|
||||
<copy todir="${buildroot}/stendhal-${version}-src/data">
|
||||
<fileset dir="data">
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy todir="${buildroot}/stendhal-${version}-src/tiled">
|
||||
<fileset dir="${tiled}">
|
||||
<exclude name="world/**"/>
|
||||
<exclude name="maps/world/**"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
|
|
@ -79,16 +82,16 @@
|
|||
|
||||
<copy todir="${buildroot}/stendhal-${version}-src" file="README.md"/>
|
||||
<copy todir="${buildroot}/stendhal-${version}-src" file="LICENSE.txt"/>
|
||||
<copy todir="${buildroot}/stendhal-${version}-src/sbin" file="sbin/runserver.bat"/>
|
||||
<copy todir="${buildroot}/stendhal-${version}-src/sbin" file="sbin/runserver.sh"/>
|
||||
<copy todir="${buildroot}/stendhal-${version}-src/bin" file="bin/runserver.bat"/>
|
||||
<copy todir="${buildroot}/stendhal-${version}-src/bin" file="bin/runserver.sh"/>
|
||||
<copy todir="${buildroot}/stendhal-${version}-src/lib">
|
||||
<fileset dir="libs">
|
||||
<include name="*.txt"/>
|
||||
<include name="*.html"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${buildroot}/stendhal-${version}-src/doc">
|
||||
<fileset dir="doc"/>
|
||||
<copy todir="${buildroot}/stendhal-${version}-src/${docs}">
|
||||
<fileset dir="${docs}"/>
|
||||
<fileset dir="." includes="LICENSE.txt"/>
|
||||
</copy>
|
||||
|
||||
|
|
@ -106,7 +109,8 @@
|
|||
|
||||
<!-- START: client data -->
|
||||
|
||||
<target name="build_client_data" description="Build client data files.">
|
||||
<!-- Build client data files. -->
|
||||
<target name="build_client_data">
|
||||
<!-- base data -->
|
||||
<mkdir dir="${build_client_data}"/>
|
||||
<copy todir="${build_client_data}/data/sprites">
|
||||
|
|
@ -122,8 +126,8 @@
|
|||
<exclude name="items/meta/"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${build_client_data}/data/tileset">
|
||||
<fileset dir="${tiled}/tileset">
|
||||
<copy todir="${build_client_data}/data/maps/tileset">
|
||||
<fileset dir="${maps}/tileset">
|
||||
<exclude name="**/*.bz2"/>
|
||||
<exclude name="**/*.gz"/>
|
||||
<exclude name="**/*.psd"/>
|
||||
|
|
@ -134,11 +138,15 @@
|
|||
<exclude name="logic/layer/"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<mkdir dir="${maps}/parallax"/> <!-- in case no parallax images available -->
|
||||
<copy todir="${build_client_data}/data/maps/parallax">
|
||||
<fileset dir="${maps}/parallax" includes="**/*.png"/>
|
||||
</copy>
|
||||
<copy todir="${build_client_data}/data/font">
|
||||
<fileset dir="data/font"/>
|
||||
</copy>
|
||||
<copy todir="${build_client_data}/data/gui">
|
||||
<fileset dir="${data}">
|
||||
<fileset dir="${gui}">
|
||||
<exclude name="paneldrock009.jpg"/>
|
||||
<exclude name="panelmetal003.gif"/>
|
||||
<exclude name="panelrock016.jpg"/>
|
||||
|
|
@ -177,7 +185,8 @@
|
|||
|
||||
<!-- START: server -->
|
||||
|
||||
<target name="server_build" depends="init,checkxml" description="Compile JAR file for Stendhal server.">
|
||||
<!-- Compile JAR file for Stendhal server. -->
|
||||
<target name="server_build" depends="init,checkxml">
|
||||
<mkdir dir="${build_server}"/>
|
||||
|
||||
<copy todir="${build_server}/data/conf" file="data/conf/stendhalcreateaccount.properties"/>
|
||||
|
|
@ -264,7 +273,7 @@
|
|||
</javac>
|
||||
|
||||
<copy todir="${build_server_maps}/data/maps">
|
||||
<fileset dir="${tiled}">
|
||||
<fileset dir="${maps}">
|
||||
<include name="**/*.tmx"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
|
@ -338,7 +347,8 @@
|
|||
</target> <!-- server_build -->
|
||||
|
||||
|
||||
<target name="dist_server_binary" depends="server_build" description="Create server package for release and distribution.">
|
||||
<!-- Create server package for release and distribution. -->
|
||||
<target name="dist_server_binary" depends="server_build">
|
||||
<mkdir dir="${buildroot}/stendhal-server-${version}"/>
|
||||
|
||||
<copy todir="${buildroot}/stendhal-server-${version}/data/script">
|
||||
|
|
@ -359,13 +369,13 @@
|
|||
<copy todir="${buildroot}/stendhal-server-${version}" file="${lib}/${server_jarname}"/>
|
||||
<copy todir="${buildroot}/stendhal-server-${version}" file="${lib}/${maps_jarname}"/>
|
||||
<copy todir="${buildroot}/stendhal-server-${version}" file="${lib}/${xmlconf_jarname}"/>
|
||||
<copy todir="${buildroot}/stendhal-server-${version}" file="sbin/runserver.sh"/>
|
||||
<copy todir="${buildroot}/stendhal-server-${version}" file="sbin/runserver.bat"/>
|
||||
<copy todir="${buildroot}/stendhal-server-${version}" file="bin/runserver.sh"/>
|
||||
<copy todir="${buildroot}/stendhal-server-${version}" file="bin/runserver.bat"/>
|
||||
<copy todir="${buildroot}/stendhal-server-${version}/libs">
|
||||
<fileset dir="libs"/>
|
||||
</copy>
|
||||
<copy todir="${buildroot}/stendhal-server-${version}/doc">
|
||||
<fileset dir="doc"/>
|
||||
<copy todir="${buildroot}/stendhal-server-${version}/${docs}">
|
||||
<fileset dir="${docs}"/>
|
||||
<fileset dir="." includes="LICENSE.txt"/>
|
||||
</copy>
|
||||
|
||||
|
|
@ -390,10 +400,12 @@
|
|||
</target> <!-- dist_server_binary -->
|
||||
|
||||
|
||||
<target name="dist_docker" depends="docker_build,docker_push" description="Build and push container image."/>
|
||||
<!-- Build and push container image. -->
|
||||
<target name="dist_docker" depends="docker_build,docker_push" />
|
||||
|
||||
|
||||
<target name="docker_build_prepare" depends="dist_server_binary" description="Prepare container image build.">
|
||||
<!-- Prepare container image build. -->
|
||||
<target name="docker_build_prepare" depends="dist_server_binary">
|
||||
<mkdir dir="${build_docker}" />
|
||||
<copy file="${buildtools_docker}/Dockerfile" todir="${build_docker}" />
|
||||
<copy file="${buildtools_docker}/.dockerignore" todir="${build_docker}" />
|
||||
|
|
@ -402,7 +414,8 @@
|
|||
</target> <!-- docker_build_prepare -->
|
||||
|
||||
|
||||
<target name="docker_build" depends="docker_build_prepare" description="Build container image.">
|
||||
<!-- Build container image. -->
|
||||
<target name="docker_build" depends="docker_build_prepare">
|
||||
<exec dir="${build_docker}" executable="docker">
|
||||
<arg value="build" />
|
||||
<arg value="-t" />
|
||||
|
|
@ -412,28 +425,57 @@
|
|||
</target> <!-- docker_build -->
|
||||
|
||||
|
||||
<target name="docker_push" description="Push container image."/>
|
||||
<!-- Push container image. -->
|
||||
<target name="docker_push" />
|
||||
|
||||
|
||||
<target name="server_run" depends="server_build,compilejs" description="Run server.">
|
||||
<mkdir dir="run_srvr"/>
|
||||
<!-- Run server. -->
|
||||
<target name="server_run" depends="server_build,compilejs">
|
||||
<mkdir dir="run_srvr/libs"/>
|
||||
<mkdir dir="run_srvr/js"/>
|
||||
|
||||
<copy todir="run_srvr">
|
||||
<fileset file="build/lib/${server_jarname}"/>
|
||||
<fileset file="build/lib/${xmlconf_jarname}"/>
|
||||
<fileset file="build/lib/${maps_jarname}"/>
|
||||
<fileset file="libs/marauroa.jar"/>
|
||||
<fileset file="libs/groovy.jar"/>
|
||||
<fileset file="libs/guava.jar"/>
|
||||
<fileset file="libs/log4j.jar"/>
|
||||
<fileset file="libs/${mysqldriver_jarname}"/>
|
||||
</copy>
|
||||
|
||||
<copy todir="run_srvr/libs">
|
||||
<fileset file="${marauroa_jar}" />
|
||||
<fileset file="${groovy_jar}" />
|
||||
<fileset file="${guava_jar}" />
|
||||
<fileset file="${log4j_jar}" />
|
||||
<fileset file="${mysqldriver_jar}" />
|
||||
<fileset file="${h2_jar}" />
|
||||
<fileset file="${hamcrest_jar}" />
|
||||
<fileset file="${tomcatcore_jar}" />
|
||||
<fileset file="${tomcatwebsocket_jar}" />
|
||||
<fileset file="${jakartaannotation_jar}" />
|
||||
<fileset file="${luaj_jar}" />
|
||||
<fileset file="${jsonsimple_jar}" />
|
||||
</copy>
|
||||
|
||||
<copy todir="run_srvr/js">
|
||||
<fileset dir="${srcjs}">
|
||||
<exclude name="stendhal/" />
|
||||
<exclude name="stendhal-compiled.js.map" />
|
||||
<exclude name=".gitignore" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<chmod file="run_srvr/${server_jarname}" perm="+x"/>
|
||||
|
||||
<exec dir="." executable="java">
|
||||
<arg line="-Xmx256m -cp run_srvr -jar run_srvr/${server_jarname} -c server.ini -l"/>
|
||||
</exec>
|
||||
<java jar="run_srvr/${server_jarname}"
|
||||
fork="true"
|
||||
failonerror="true"
|
||||
maxmemory="256m">
|
||||
<arg value="-c" />
|
||||
<arg value="server.ini" />
|
||||
<arg value="-l" />
|
||||
<classpath>
|
||||
<pathelement location="${basedir}" />
|
||||
</classpath>
|
||||
</java>
|
||||
|
||||
<!-- we've run the program, so delete the jars -->
|
||||
<delete dir="run_srvr"/>
|
||||
|
|
@ -444,7 +486,8 @@
|
|||
|
||||
<!-- START: java client -->
|
||||
|
||||
<target name="client_build" depends="init,build_client_data" description="Compile client JAR file.">
|
||||
<!-- Compile client JAR file. -->
|
||||
<target name="client_build" depends="init,build_client_data">
|
||||
<mkdir dir="${build_client}"/>
|
||||
|
||||
<copy todir="${build_client}/games/stendhal/client">
|
||||
|
|
@ -492,7 +535,7 @@
|
|||
|
||||
<!-- compile Starter.java for Java 1.7. So we will be able to
|
||||
display a dialogbox if running on an old Java Version -->
|
||||
<javac srcdir="${src}" destdir="${build_client}" debug="${javac.debug}" debuglevel="${javac.debuglevel}" source="1.7" target="1.7" deprecation="${javac.deprecation}" includeantruntime="false">
|
||||
<javac srcdir="${src}" destdir="${build_client}" debug="${javac.debug}" debuglevel="${javac.debuglevel}" source="1.8" target="1.8" deprecation="${javac.deprecation}" includeantruntime="false">
|
||||
<include name="games/stendhal/client/update/Starter.java"/>
|
||||
|
||||
<compilerarg value="-encoding"/>
|
||||
|
|
@ -537,7 +580,8 @@
|
|||
</target> <!-- client_build -->
|
||||
|
||||
|
||||
<target name="compile_stendhaltextclient" description="Compile text client.">
|
||||
<!-- Compile text client. -->
|
||||
<target name="compile_textclient">
|
||||
<mkdir dir="${build_stendhaltextclient}"/>
|
||||
|
||||
<javac srcdir="${src}" destdir="${build_stendhaltextclient}" source="1.8" target="1.8" debug="${javac.debug}" debuglevel="${javac.debuglevel}" deprecation="${javac.deprecation}" includeantruntime="false">
|
||||
|
|
@ -558,8 +602,12 @@
|
|||
</javac>
|
||||
</target> <!-- compile_stendhaltextclient -->
|
||||
|
||||
<!-- Alias of `compile_textclient`. -->
|
||||
<target name="compile_stendhaltextclient" depends="compile_textclient" />
|
||||
|
||||
<target name="dist_client_binary" depends="clean_client_data,client_build" description="Create Java client package for release and distribution.">
|
||||
|
||||
<!-- Create Java client package for release and distribution. -->
|
||||
<target name="dist_client_binary" depends="clean_client_data,client_build">
|
||||
<mkdir dir="${buildroot}/stendhal-${version}"/>
|
||||
<mkdir dir="${buildroot}/stendhal-${version}/lib"/>
|
||||
<mkdir dir="${buildroot}/stendhal-${version}/log"/>
|
||||
|
|
@ -579,8 +627,8 @@
|
|||
<include name="*.html"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${buildroot}/stendhal-${version}/doc">
|
||||
<fileset dir="doc"/>
|
||||
<copy todir="${buildroot}/stendhal-${version}/${docs}">
|
||||
<fileset dir="${docs}"/>
|
||||
<fileset file="LICENSE.txt"/>
|
||||
</copy>
|
||||
<touch file="${buildroot}/stendhal-${version}/log/stendhal.txt"/>
|
||||
|
|
@ -595,8 +643,8 @@
|
|||
</target> <!-- dist_client_binary -->
|
||||
|
||||
|
||||
<!-- XXX: is this still used? -->
|
||||
<target name="dist_client_starter" depends="client_build" description="Create Java client starter package.">
|
||||
<!-- Create Java client starter package (obsolete). -->
|
||||
<target name="dist_client_starter" depends="client_build">
|
||||
<mkdir dir="${buildroot}/stendhal-${version}"/>
|
||||
<copy todir="${buildroot}/stendhal-${version}" file="${lib}/${client_starter_jarname}"/>
|
||||
<copy todir="${buildroot}/stendhal-${version}/lib">
|
||||
|
|
@ -605,10 +653,8 @@
|
|||
<include name="*.html"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${buildroot}/stendhal-${version}/doc">
|
||||
<fileset dir="doc">
|
||||
<exclude name="mkdocs/"/>
|
||||
</fileset>
|
||||
<copy todir="${buildroot}/stendhal-${version}/${docs}">
|
||||
<fileset dir="${docs}"/>
|
||||
<fileset file="LICENSE.txt"/>
|
||||
</copy>
|
||||
<copy todir="${buildroot}/stendhal-${version}" file="README.md"/>
|
||||
|
|
@ -620,7 +666,8 @@
|
|||
</target> <!-- dist_client_starter -->
|
||||
|
||||
|
||||
<target name="client_run" depends="client_build" description="Run Java client.">
|
||||
<!-- Run Java client. -->
|
||||
<target name="client_run" depends="client_build">
|
||||
<mkdir dir="run_clnt"/>
|
||||
<mkdir dir="run_clnt/lib"/>
|
||||
|
||||
|
|
@ -656,8 +703,9 @@
|
|||
</target> <!-- client_run -->
|
||||
|
||||
|
||||
<!-- Run client for NetBeans trick. -->
|
||||
<!-- Netbeans won't let you choose ant options, so this does it for us-->
|
||||
<target name="run" depends="client_run" description="Run client for NetBeans trick."/>
|
||||
<target name="run" depends="client_run" />
|
||||
|
||||
<!-- END: java client -->
|
||||
|
||||
|
|
@ -665,109 +713,87 @@
|
|||
<!-- START: web client -->
|
||||
|
||||
<target name="js-prepare-marauroa">
|
||||
<mkdir dir="build/js"/>
|
||||
<unzip dest="build" src="libs/marauroa.jar">
|
||||
<mkdir dir="node_modules/marauroa"/>
|
||||
<unzip dest="node_modules/marauroa" src="libs/marauroa.jar">
|
||||
<mapper type="flatten"/>
|
||||
<patternset>
|
||||
<include name="js/**"/>
|
||||
</patternset>
|
||||
</unzip>
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
<target name="js-prepare-build">
|
||||
<echo file="build/js/build.js">
|
||||
var stendhal = window.stendhal = window.stendhal || {};
|
||||
stendhal.data = stendhal.data || {};
|
||||
<mkdir dir="node_modules/marauroa"/>
|
||||
<echo file="node_modules/marauroa/build.js">
|
||||
export function version(marauroa, stendhal) {
|
||||
stendhal.data = stendhal.data || {};
|
||||
|
||||
stendhal.data.build = {
|
||||
version: "${version}",
|
||||
build: "${datetime}",
|
||||
dist: "webclient"
|
||||
}
|
||||
stendhal.data.build = {
|
||||
version: "${version}",
|
||||
build: "${datetime}",
|
||||
dist: "webclient"
|
||||
}
|
||||
|
||||
//CI
|
||||
}
|
||||
</echo>
|
||||
<antcall target="js-prepare-build-ci" />
|
||||
</target>
|
||||
|
||||
<target name="js-prepare-build-ci" if="ci.build.info">
|
||||
<loadfile property="cibuildinfo" srcFile="${ci.build.info}" failonerror="false" quiet="true"/>
|
||||
<replace file="node_modules/marauroa/build.js" token="//CI" value="${cibuildinfo}" />
|
||||
</target>
|
||||
|
||||
|
||||
<extension-point name="js-prepare" depends="js-prepare-marauroa,js-prepare-build,js-prepare-node"/>
|
||||
<extension-point name="js-prepare" depends="js-prepare-node,js-prepare-contribs,js-prepare-marauroa,js-prepare-build"/>
|
||||
|
||||
|
||||
<target name="js-prepare-node">
|
||||
<exec executable="npm${executable.suffix}" failonerror="true">
|
||||
<exec executable="${executable.npm}" failonerror="true">
|
||||
<arg value="install"/>
|
||||
<arg value="--no-save"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="js-prepare-contribs" depends="js-prepare-node">
|
||||
<exec executable="${executable.npx}" failonerror="true">
|
||||
<arg value="showdown"/>
|
||||
<arg value="makehtml"/>
|
||||
<arg value="--input"/>
|
||||
<arg value="${docs}/contributors.md"/>
|
||||
<arg value="--output"/>
|
||||
<arg value="${srcjs}/contributors.html"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- TODO: Do not write stendhal-compiled.js to the source directory tree but directly to the compiled directory tree -->
|
||||
<target name="js-invoke-compiler">
|
||||
<exec executable="npx${executable.suffix}" dir="srcjs/stendhal" failonerror="true">
|
||||
|
||||
<exec executable="${executable.npx}" dir="${srcjs}/stendhal" failonerror="true">
|
||||
<arg value="tsc"/>
|
||||
</exec>
|
||||
|
||||
<property name="js-debug" value="--debug --formatting=PRETTY_PRINT --create_source_map srcjs/stendhal-compiled.js.map --source_map_include_content"/>
|
||||
|
||||
<property name="js-files-license" value="srcjs/stendhal/license.js"/>
|
||||
<property name="js-files-marauroa" value="build/js/marauroa.js build/js/client-framework.js build/js/message-factory.js build/js/perception.js build/js/rpfactory.js build/js/inflate.js build/js/deserializer.js"/>
|
||||
<property name="js-files-config" value="build/js/build.js"/>
|
||||
<property name="js-files-lib1" value="srcjs/jsxgraph-util.js"/>
|
||||
<property name="js-files-lib2" value=""/>
|
||||
<property name="js-files-data1" value="srcjs/stendhal/data/sha3.js"/>
|
||||
<property name="js-files-data2" value=""/>
|
||||
<property name="js-files-entity5" value=""/>
|
||||
<property name="js-files-entity6" value=""/>
|
||||
<property name="js-files-ui1" value=""/>
|
||||
<property name="js-files-ui2" value=""/>
|
||||
<property name="js-files-ui3" value=""/>
|
||||
<property name="js-files-main1" value=""/>
|
||||
<property name="js-files-ui4" value=""/>
|
||||
<property name="js-files-main2" value="srcjs/stendhal/main.js"/>
|
||||
<property name="js-files-main3" value=""/>
|
||||
<property name="js-files-ts" value="build/ts/*.js build/ts/**/*.js"/>
|
||||
<property name="js-files-ts2" value=""/>
|
||||
|
||||
|
||||
<java jar="buildtools/closure-compiler/compiler.jar"
|
||||
fork="true"
|
||||
failonerror="true"
|
||||
maxmemory="128m">
|
||||
<arg value="--language_in=ECMASCRIPT_2020"/>
|
||||
<arg value="--language_out=STABLE"/>
|
||||
<arg value="--compilation_level"/>
|
||||
<arg value="ADVANCED"/>
|
||||
<arg line="${js-debug}"/>
|
||||
<arg value="--process_common_js_modules"/>
|
||||
<arg value="--module_resolution=node"/>
|
||||
<arg value="--jscomp_off=checkVars"/>
|
||||
<!-- DEBUG: -->
|
||||
<!--<arg value="-\-jscomp_off=globalThis"/>-->
|
||||
|
||||
<arg value="--js_output_file=srcjs/stendhal-compiled.js"/>
|
||||
|
||||
<arg line="${js-files-license}"/>
|
||||
<arg line="${js-files-marauroa}"/>
|
||||
<arg line="${js-files-config}"/>
|
||||
<arg line="${js-files-lib1}"/>
|
||||
<arg line="${js-files-lib2}"/>
|
||||
<arg line="${js-files-data1}"/>
|
||||
<arg line="${js-files-data2}"/>
|
||||
<arg line="${js-files-entity5}"/>
|
||||
<arg line="${js-files-entity6}"/>
|
||||
<arg line="${js-files-ui1}"/>
|
||||
<arg line="${js-files-ui2}"/>
|
||||
<arg line="${js-files-ui3}"/>
|
||||
<arg line="${js-files-main1}"/>
|
||||
<arg line="${js-files-ui4}"/>
|
||||
<arg line="${js-files-main2}"/>
|
||||
<arg line="${js-files-main3}"/>
|
||||
<arg line="${js-files-ts}"/>
|
||||
<arg line="${js-files-ts2}"/>
|
||||
</java>
|
||||
|
||||
<echo file="srcjs/stendhal-compiled.js" append="true">
|
||||
//# sourceMappingURL=stendhal-compiled.js.map
|
||||
</echo>
|
||||
<exec executable="${executable.npx}" dir="${srcjs}/stendhal" failonerror="true">
|
||||
<arg value="esbuild"/>
|
||||
<arg value="--bundle"/>
|
||||
<arg value="--outfile=../stendhal-compiled.js"/>
|
||||
<arg value="--platform=browser"/>
|
||||
<!-- <arg value="- -minify"/> -->
|
||||
<arg value="main.ts"/>
|
||||
</exec>
|
||||
|
||||
<antcall target="compilejs-hook" />
|
||||
|
||||
<copy todir="build/eclipse/js" preservelastmodified="true" failonerror="false" quiet="true">
|
||||
<fileset dir="${srcjs}">
|
||||
<include name="stendhal-compiled.js*" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target> <!-- js-invoke-compiler -->
|
||||
|
||||
|
||||
|
|
@ -776,7 +802,8 @@
|
|||
</target>
|
||||
|
||||
|
||||
<target name="compilejs" depends="cleanjs" description="Compile web client.">
|
||||
<!-- Compile web client. -->
|
||||
<target name="compilejs" depends="cleanjs">
|
||||
<antcall target="js-prepare" unless:set="exclude.webclient"/>
|
||||
<antcall target="js-invoke-compiler" unless:set="exclude.webclient"/>
|
||||
|
||||
|
|
@ -785,38 +812,39 @@
|
|||
</target> <!-- compilejs -->
|
||||
|
||||
|
||||
<target name="webclient_build" depends="compilejs,clean_client_data,build_client_data" description="Compile and stage web client files.">
|
||||
<!-- Compile and stage web client files. -->
|
||||
<target name="webclient_build" depends="compilejs,clean_client_data,build_client_data">
|
||||
<mkdir dir="${build_webclient}"/>
|
||||
|
||||
<copy todir="${build_webclient}">
|
||||
<fileset dir="${srcjs}">
|
||||
<include name="stendhal.html"/>
|
||||
<include name="stendhal.css"/>
|
||||
<include name="css/**/*.css"/>
|
||||
<include name="stendhal-compiled.js"/>
|
||||
<include name="LICENSE.html"/>
|
||||
<include name="favicon.ico"/>
|
||||
<include name="contributors.html"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<replaceregexp file="${build_webclient}/stendhal.html"
|
||||
match="data-tileset-path="/tileset""
|
||||
match="data-tileset-path="/data/maps/tileset""
|
||||
replace="data-tileset-path="/data/tileset""
|
||||
byline="false"/>
|
||||
|
||||
</target> <!-- webclient_build -->
|
||||
|
||||
|
||||
<target name="build_webclient" depends="webclient_build" description="Alias of webclient_build."/>
|
||||
|
||||
|
||||
<target name="dist_webclient_binary" depends="webclient_build" description="Create web client package for release and distribution.">
|
||||
<!-- Create web client package for release and distribution. -->
|
||||
<target name="dist_webclient_binary" depends="webclient_build">
|
||||
<zip destfile="${buildroot}/stendhal-webclient-${version}.zip">
|
||||
<zipfileset dir="${build_client_data}"/>
|
||||
<zipfileset dir="${build_client_music_data}"/>
|
||||
<zipfileset dir="${build_client_sound_data}"/>
|
||||
<zipfileset dir="${build_webclient}" prefix="js"/>
|
||||
<zipfileset dir="doc" prefix="doc">
|
||||
<zipfileset dir="${docs}" prefix="doc">
|
||||
<include name="contributors.md"/>
|
||||
<include name="ReleaseNotes.txt"/>
|
||||
<include name="Licenses/**"/>
|
||||
<include name="sources/**"/>
|
||||
</zipfileset>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@
|
|||
<delete dir="${buildroot}/build_docs"/>
|
||||
</target>
|
||||
|
||||
<target name="docs" description="Generate HTML documentation for Java, TypeScript, and Lua APIs." depends="luadocs,javadocs,tsdocs"/>
|
||||
<!-- Generate HTML documentation for Java, TypeScript, and Lua APIs. -->
|
||||
<target name="docs" depends="luadocs,javadocs,tsdocs"/>
|
||||
|
||||
|
||||
<!-- Java documentation -->
|
||||
|
|
@ -87,13 +88,8 @@
|
|||
</target>
|
||||
|
||||
|
||||
<target name="tsdocs" depends="clean_tsdocs">
|
||||
<exec executable="npm${executable.suffix}" failonerror="true">
|
||||
<arg value="install"/>
|
||||
<arg value="typedoc"/>
|
||||
<arg value="--no-save"/>
|
||||
</exec>
|
||||
<exec executable="npx${executable.suffix}" dir="srcjs/stendhal" failonerror="true">
|
||||
<target name="tsdocs" depends="clean_tsdocs,js-prepare-node">
|
||||
<exec executable="${executable.npx}" dir="${srcjs}/stendhal" failonerror="true">
|
||||
<arg value="typedoc"/>
|
||||
<arg value="--entryPointStrategy"/>
|
||||
<arg value="expand"/>
|
||||
|
|
@ -113,7 +109,7 @@
|
|||
message="Python unavailable, cannot run mkdocs"/>
|
||||
|
||||
<!-- NOTE: MkDocs create the top-level index.html -->
|
||||
<exec if:true="${python.present}" executable="python" failonerror="true"
|
||||
<exec executable="${executable.python}" if:true="${python.present}" failonerror="true"
|
||||
dir="./buildtools/mkdocs/">
|
||||
<arg value="-u"/>
|
||||
<arg value="build.py"/>
|
||||
|
|
|
|||
86
buildtools/ant_modules/info.xml
Normal file
86
buildtools/ant_modules/info.xml
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
<?xml version='1.0'?>
|
||||
|
||||
<project>
|
||||
|
||||
<target name="info" description="Print project build information.">
|
||||
<echo level="info" message="Project:" />
|
||||
<echo level="info" message=" Name: .......... ${game_name}" />
|
||||
<echo level="info" message=" Version: ....... ${version}" />
|
||||
<echo level="info" message=" Root: .......... ${basedir}" />
|
||||
<echo level="info" />
|
||||
<echo level="info" message="Build system:" />
|
||||
<echo level="info" message=" Ant version: ... ${ant.version.number}" />
|
||||
<echo level="info" message=" Ant home: ...... ${ant.location}" />
|
||||
<echo level="info" message=" Java version: .. ${java.version}" />
|
||||
<echo level="info" message=" Java home: ..... ${java.home}" />
|
||||
</target>
|
||||
|
||||
<target name="help" description="Print project build and help information." depends="info">
|
||||
<echo level="info" message="Usage:" />
|
||||
<echo level="info" message=" ant <target> [<target>...]" />
|
||||
<echo level="info" />
|
||||
<echo level="info" />
|
||||
<echo level="info" message="=== TARGETS ===" />
|
||||
<echo level="info" />
|
||||
<echo level="info" message="General:" />
|
||||
<echo level="info" message=" info: ........................ Print project build information." />
|
||||
<echo level="info" message=" help: ........................ Print project build and help information." />
|
||||
<echo level="info" message=" init: ........................ Update version and resource info." />
|
||||
<echo level="info" message=" checkxml: .................... Verify XML files are well-formed." />
|
||||
<echo level="info" />
|
||||
<echo level="info" message="Build:" />
|
||||
<echo level="info" message=" server_build: ................ Compile JAR file for Stendhal server." />
|
||||
<echo level="info" message=" client_build: ................ Compile client JAR file." />
|
||||
<echo level="info" message=" webclient_build: ............. Compile and stage web client files." />
|
||||
<echo level="info" message=" compile_textclient: .......... Compile text client." />
|
||||
<echo level="info" message=" compile: ..................... Generate JAR files for both client and server." />
|
||||
<echo level="info" message=" compilejs: ................... Compile web client." />
|
||||
<echo level="info" message=" compile_tools: ............... Compile Stendhal build tools." />
|
||||
<echo level="info" message=" server_run: .................. Run server." />
|
||||
<echo level="info" message=" client_run: .................. Run Java client." />
|
||||
<echo level="info" message=" postman: ..................... Build postman bot." />
|
||||
<echo level="info" />
|
||||
<echo level="info" message="Testing:" />
|
||||
<echo level="info" message=" compile_tests: ............... Compile all tests." />
|
||||
<echo level="info" message=" run_tests: ................... Run all tests." />
|
||||
<echo level="info" message=" test: ........................ Compile and run all tests." />
|
||||
<echo level="info" />
|
||||
<echo level="info" message="Build cleaning:" />
|
||||
<echo level="info" message=" clean: ....................... Delete all build files and directories." />
|
||||
<echo level="info" message=" clean_client_data: ........... Delete client data build files and directories." />
|
||||
<echo level="info" message=" cleanjs: ..................... Delete web client build files and directories." />
|
||||
<echo level="info" />
|
||||
<echo level="info" message="Source maintanence:" />
|
||||
<echo level="info" message=" clean_whitespace: ............ Clean whitespace in source and other specified file types." />
|
||||
<echo level="info" />
|
||||
<echo level="info" message="Distribution:" />
|
||||
<echo level="info" message=" dist_source: ................. Create all source packages for Stendhal release." />
|
||||
<echo level="info" message=" dist_binary: ................. Create all binary packages for Stendhal release." />
|
||||
<echo level="info" message=" dist_server_binary: .......... Create server package for release and distribution." />
|
||||
<echo level="info" message=" dist_client_binary: .......... Create Java client package for release and distribution." />
|
||||
<echo level="info" message=" dist_webclient_binary: ....... Create web client package for release and distribution." />
|
||||
<echo level="info" message=" dist_client_starter: ......... Create Java client starter package (obsolete)." />
|
||||
<echo level="info" message=" dist: ........................ Create all packages for Stendhal release." />
|
||||
<echo level="info" message=" android: ..................... Create Android client package for release and distribution." />
|
||||
<echo level="info" />
|
||||
<echo level="info" message="Resources:" />
|
||||
<echo level="info" message=" rendermaps: .................. Convert TMX maps to PNG images scaled 1:16." />
|
||||
<echo level="info" message=" renderatlas: ................. Generate files for the Stendhal Atlas." />
|
||||
<echo level="info" message=" renderworldmap: .............. Export world.tmx map to PNG image." />
|
||||
<echo level="info" message=" updatemaps: .................. Load and save TMX maps to fix tilesets changes." />
|
||||
<echo level="info" />
|
||||
<echo level="info" message="Documentation:" />
|
||||
<echo level="info" message=" docs: ........................ Generate HTML documentation for Java, TypeScript, and Lua APIs." />
|
||||
<echo level="info" />
|
||||
<echo level="info" message="Localization:" />
|
||||
<echo level="info" message=" locale_template: ............. Creates a template for translating." />
|
||||
<echo level="info" message=" locale_update: ............... Update translation files from template." />
|
||||
<echo level="info" />
|
||||
<echo level="info" message="Aliases:" />
|
||||
<echo level="info" message=" compile_stendhaltextclient: .. Alias of `compile_textclient`." />
|
||||
<echo level="info" message=" compile_stendhaltools: ....... Alias of `compile_tools`." />
|
||||
<echo level="info" />
|
||||
<echo level="info" message="Execute `ant -p -v` for a full list of build targets." />
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
|
@ -2,21 +2,23 @@
|
|||
|
||||
<project xmlns:if="ant:if" xmlns:unless="ant:unless">
|
||||
|
||||
<target name="locale_build_template" description="Creates a template for translating.">
|
||||
<!-- Creates a template for translating. -->
|
||||
<target name="locale_template">
|
||||
<echo unless:true="${python.present}" message="Python unavailable, cannot build locale template"/>
|
||||
|
||||
<exec if:true="${python.present}" executable="python" failonerror="true" dir="${buildtools}">
|
||||
<exec executable="${executable.python}" if:true="${python.present}" failonerror="true">
|
||||
<arg value="-u"/>
|
||||
<arg value="locale_template.py"/>
|
||||
<arg value="./bin/locale-template.py"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="locale_update" description="Update translation files from template.">
|
||||
<!-- Update translation files from template. -->
|
||||
<target name="locale_update">
|
||||
<echo unless:true="${python.present}" message="Python unavailable, cannot update translations"/>
|
||||
|
||||
<exec if:true="${python.present}" executable="python" failonerror="true" dir="${buildtools}">
|
||||
<exec executable="${executable.python}" if:true="${python.present}" failonerror="true">
|
||||
<arg value="-u"/>
|
||||
<arg value="locale_template.py"/>
|
||||
<arg value="./bin/locale-template.py"/>
|
||||
<arg value="--update"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
|
||||
<project xmlns:if="ant:if" xmlns:unless="ant:unless">
|
||||
|
||||
<target name="init" description="Update version and resource info.">
|
||||
<!-- Update version and resource info. -->
|
||||
<target name="init">
|
||||
<mkdir dir="${lib}"/>
|
||||
|
||||
<!-- update version -->
|
||||
|
|
@ -14,11 +15,11 @@
|
|||
match="out.println\("server_version=.*"\);"
|
||||
replace="out.println("server_version=${version}");"
|
||||
byline="true"/>
|
||||
<replaceregexp file="sbin/runserver.bat"
|
||||
<replaceregexp file="bin/runserver.bat"
|
||||
match="STENDHAL_VERSION=.*"
|
||||
replace="STENDHAL_VERSION=${version}"
|
||||
byline="true"/>
|
||||
<replaceregexp file="sbin/runserver.sh"
|
||||
<replaceregexp file="bin/runserver.sh"
|
||||
match="STENDHAL_VERSION ?= ?".*""
|
||||
replace="STENDHAL_VERSION="${version}""
|
||||
byline="true"/>
|
||||
|
|
@ -38,6 +39,14 @@
|
|||
match="<string name="build_version">.*?</string>"
|
||||
replace="<string name="build_version">${version}</string>"
|
||||
byline="true"/>
|
||||
<replaceregexp file="app/neutralinojs/neutralino.config.json"
|
||||
match=""version": ".*""
|
||||
replace=""version": "${version}""
|
||||
byline="true"/>
|
||||
<replaceregexp file="${src}/games/stendhal/client/update/HttpClient.java"
|
||||
match="StendhalClient/.* \("
|
||||
replace="StendhalClient/${version} \("
|
||||
byline="true"/>
|
||||
|
||||
<!-- update location of resources -->
|
||||
<replaceregexp file="${src}/games/stendhal/client/update/game-default.properties"
|
||||
|
|
@ -81,7 +90,8 @@
|
|||
</target> <!-- init -->
|
||||
|
||||
|
||||
<target name="checkxml" description="Verify XML files are well-formed.">
|
||||
<!-- Verify XML files are well-formed. -->
|
||||
<target name="checkxml">
|
||||
<schemavalidate failonerror="yes" lenient="yes" warn="yes">
|
||||
<schema namespace="stendhal" file="${config_dir}/zones.xsd"/>
|
||||
<fileset dir="${config_dir}/zones">
|
||||
|
|
@ -159,7 +169,8 @@
|
|||
</target> <!-- checkxml -->
|
||||
|
||||
|
||||
<target name="internalUpdatePrereleaseVersion" if="PRE_RELEASE" description="Add date to pre-release test client.">
|
||||
<!-- Add date to pre-release test client. -->
|
||||
<target name="internalUpdatePrereleaseVersion" if="PRE_RELEASE">
|
||||
<tstamp prefix="date">
|
||||
<format property="iso" pattern="yyyy-MM-dd"/>
|
||||
</tstamp>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
|
||||
<import file="tools.xml" />
|
||||
|
||||
<target name="rendermaps" description="Convert TMX maps to PNG images scaled 1:16." depends="compile_stendhaltools">
|
||||
<!-- Convert TMX maps to PNG images scaled 1:16. -->
|
||||
<target name="rendermaps" depends="compile_stendhaltools">
|
||||
<taskdef name="maprenderer" classname="games.stendhal.tools.MapRenderer">
|
||||
<classpath>
|
||||
<pathelement path="${build_stendhaltools}"/>
|
||||
|
|
@ -12,9 +13,9 @@
|
|||
</classpath>
|
||||
</taskdef>
|
||||
|
||||
<mkdir dir="tiled/world"/>
|
||||
<maprenderer imagePath="${tiled}/world/">
|
||||
<fileset dir="tiled">
|
||||
<mkdir dir="${maps}/world"/>
|
||||
<maprenderer imagePath="${maps}/world/">
|
||||
<fileset dir="${maps}">
|
||||
<include name="Level */**/*.tmx"/>
|
||||
<include name="interiors/**/*.tmx"/>
|
||||
<exclude name="**/memory/**"/>
|
||||
|
|
@ -23,7 +24,8 @@
|
|||
</target> <!-- rendermaps -->
|
||||
|
||||
|
||||
<target name="renderatlas" description="Generate files for the Stendhal Atlas." depends="compile_stendhaltools">
|
||||
<!-- Generate files for the Stendhal Atlas. -->
|
||||
<target name="renderatlas" depends="compile_stendhaltools">
|
||||
<taskdef name="maprenderer" classname="games.stendhal.tools.MapRenderer">
|
||||
<classpath>
|
||||
<pathelement path="${build_stendhaltools}"/>
|
||||
|
|
@ -41,16 +43,16 @@
|
|||
0 128 0.0078125
|
||||
-->
|
||||
|
||||
<mkdir dir="tiled/world"/>
|
||||
<maprenderer imagePath="${tiled}/world/" zoom="0.0625">
|
||||
<fileset dir="tiled">
|
||||
<mkdir dir="${maps}/world"/>
|
||||
<maprenderer imagePath="${maps}/world/" zoom="0.0625">
|
||||
<fileset dir="${maps}">
|
||||
<include name="Level 0/**/*.tmx"/>
|
||||
<exclude name="**/memory/**"/>
|
||||
</fileset>
|
||||
</maprenderer>
|
||||
<mkdir dir="tiled/world/large"/>
|
||||
<maprenderer imagePath="${tiled}/world/large" zoom="0.25">
|
||||
<fileset dir="tiled">
|
||||
<mkdir dir="${maps}/world/large"/>
|
||||
<maprenderer imagePath="${maps}/world/large" zoom="0.25">
|
||||
<fileset dir="${maps}">
|
||||
<include name="Level 0/**/*.tmx"/>
|
||||
<exclude name="**/memory/**"/>
|
||||
</fileset>
|
||||
|
|
@ -58,15 +60,13 @@
|
|||
</target> <!-- renderatlas -->
|
||||
|
||||
|
||||
<target name="renderworldmap" description="Export world.tmx map to PNG image." depends="rendermaps">
|
||||
<property name="pycmd" value="python3" if:true="${python3.present}"/>
|
||||
<property name="pycmd" value="python" unless:true="${python3.present}" if:true="${python.present}"/>
|
||||
|
||||
<!-- Export world.tmx map to PNG image. -->
|
||||
<target name="renderworldmap" depends="rendermaps">
|
||||
<!-- embed area images with area name -->
|
||||
<!-- FIXME: need to detect the Python "PIL" module to ensure script can run or
|
||||
write Java class that can do this -->
|
||||
<exec executable="${pycmd}" if:set="pycmd">
|
||||
<arg value="./tiled/vampire_maplabel.py"/>
|
||||
<exec executable="${executable.python}" if:true="${python.present}">
|
||||
<arg value="./bin/vampire_maplabel.py"/>
|
||||
<arg value="-world"/>
|
||||
</exec>
|
||||
|
||||
|
|
@ -78,8 +78,8 @@
|
|||
<pathelement path="${tiled_jar}"/>
|
||||
</classpath>
|
||||
</taskdef>
|
||||
<maprenderer imagePath="${tiled}/world/" zoom="1.0">
|
||||
<fileset dir="tiled/world">
|
||||
<maprenderer imagePath="${maps}/world/" zoom="1.0">
|
||||
<fileset dir="${maps}/world">
|
||||
<include name="world.tmx"/>
|
||||
</fileset>
|
||||
</maprenderer>
|
||||
|
|
@ -88,7 +88,8 @@
|
|||
</target> <!-- renderworldmap -->
|
||||
|
||||
|
||||
<target name="updatemaps" description="Load and save TMX maps to fix tilesets changes." depends="compile_stendhaltools">
|
||||
<!-- Load and save TMX maps to fix tilesets changes. -->
|
||||
<target name="updatemaps" depends="compile_stendhaltools">
|
||||
<taskdef name="mapupdater" classname="games.stendhal.tools.MapUpdater">
|
||||
<classpath>
|
||||
<pathelement path="${build_stendhaltools}"/>
|
||||
|
|
@ -97,7 +98,7 @@
|
|||
</taskdef>
|
||||
|
||||
<mapupdater>
|
||||
<fileset dir="tiled">
|
||||
<fileset dir="${maps}">
|
||||
<include name="Level */**/*.tmx"/>
|
||||
<include name="interiors/**/*.tmx"/>
|
||||
</fileset>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@
|
|||
<delete file="${build}/package/client/stendhal-starter.exe"/>
|
||||
</target>
|
||||
|
||||
<target name="msiPackage" description="Creates MSI installer package from current build" depends="stagePackage">
|
||||
<!-- Creates MSI installer package from current build. -->
|
||||
<target name="msiPackage" depends="stagePackage">
|
||||
<delete dir="${build}/package/msi-app-image"/>
|
||||
<exec executable="jpackage" dir="." failonerror="true">
|
||||
<arg line="--type app-image"/>
|
||||
|
|
@ -46,7 +47,8 @@
|
|||
</exec>
|
||||
</target> <!-- msiPackage -->
|
||||
|
||||
<target name="dmgPackage" description="Creates DMG package from current build" depends="stagePackage">
|
||||
<!-- Creates DMG package from current build. -->
|
||||
<target name="dmgPackage" depends="stagePackage">
|
||||
<delete dir="${build}/package/dmg-app-image"/>
|
||||
<exec executable="jpackage" dir="." failonerror="true">
|
||||
<arg line="--type app-image"/>
|
||||
|
|
@ -74,7 +76,8 @@
|
|||
</exec>
|
||||
</target> <!-- dmgPackage -->
|
||||
|
||||
<target name="rpmPackage" description="Creates RPM package from current build" depends="stagePackage">
|
||||
<!-- Creates RPM package from current build. -->
|
||||
<target name="rpmPackage" depends="stagePackage">
|
||||
<delete dir="${build}/package/rpm-app-image"/>
|
||||
<exec executable="jpackage" dir="." failonerror="true">
|
||||
<arg line="--type app-image"/>
|
||||
|
|
@ -107,7 +110,8 @@
|
|||
</exec>
|
||||
</target> <!-- rpmPackage -->
|
||||
|
||||
<target name="debPackage" description="Creates DEB package from current build" depends="stagePackage">
|
||||
<!-- Creates DEB package from current build. -->
|
||||
<target name="debPackage" depends="stagePackage">
|
||||
<delete dir="${build}/package/deb-app-image"/>
|
||||
<exec executable="jpackage" dir="." failonerror="true">
|
||||
<arg line="--type app-image"/>
|
||||
|
|
|
|||
77
buildtools/ant_modules/properties.xml
Normal file
77
buildtools/ant_modules/properties.xml
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
<?xml version='1.0'?>
|
||||
|
||||
<project>
|
||||
|
||||
<!--
|
||||
Sets a property (by name and value), or set of properties (from file or resource) in the project. Properties are case sensitive.
|
||||
Properties are immutable: whoever sets a property first freezes it for the rest of the build; they are most definitely not variables.
|
||||
-->
|
||||
|
||||
<!-- store ant version number without extra details -->
|
||||
<antversion property="ant.version.number" />
|
||||
<!-- store ant home directory with system delimiter -->
|
||||
<property name="ant.location" location="${ant.home}" />
|
||||
|
||||
<property name="build_tests" value="${buildroot}/build_tests"/>
|
||||
<property name="build_tests_report" value="${buildroot}/build_test_report"/>
|
||||
|
||||
<property name="build_client" value="${buildroot}/build_client"/>
|
||||
<property name="build_client_data" value="${buildroot}/build_client_data"/>
|
||||
<property name="build_client_sound_data" value="${buildroot}/build_client_sound_data"/>
|
||||
<property name="build_client_music_data" value="${buildroot}/build_client_music_data"/>
|
||||
|
||||
<property name="build_webclient" value="${buildroot}/build_webclient"/>
|
||||
|
||||
<property name="build_docker" value="${buildroot}/build_docker"/>
|
||||
<property name="buildtools_docker" value="buildtools/docker"/>
|
||||
|
||||
<property name="build_postman" value="${buildroot}/buildbot/"/>
|
||||
|
||||
<property name="build_server" value="${buildroot}/build_server"/>
|
||||
<property name="build_server_maps" value="${buildroot}/build_server_maps"/>
|
||||
<property name="build_server_script" value="${buildroot}/build_server_script"/>
|
||||
<property name="build_server_mods" value="${buildroot}/build_server_mods"/>
|
||||
<property name="build_server_xmlconf" value="${buildroot}/build_server_xmlconf"/>
|
||||
|
||||
<property name="build_stendhaltools" value="${buildroot}/build_stendhaltools"/>
|
||||
<property name="build_stendhaltextclient" value="${buildroot}/build_stendhaltextclient"/>
|
||||
|
||||
<property name="client_data" value="stendhal-data-${version}.jar"/>
|
||||
<property name="client_jarname" value="stendhal-${version}.jar"/>
|
||||
<property name="client_sound_data" value="stendhal-sound-data-${version}.jar"/>
|
||||
<property name="client_music_data" value="stendhal-music-data-${version}.jar"/>
|
||||
<property name="client_starter_jarname" value="stendhal-starter-${version}.jar"/>
|
||||
|
||||
<property name="dist_server_binary" value="${buildroot}/stendhal-server-${version}.zip" />
|
||||
|
||||
<property name="maps_jarname" value="stendhal-maps-${version}.jar"/>
|
||||
|
||||
<property name="server_jarname" value="stendhal-server-${version}.jar"/>
|
||||
<property name="xmlconf_jarname" value="stendhal-xmlconf-${version}.jar"/>
|
||||
|
||||
<property name="config_dir" value="data/conf"/>
|
||||
|
||||
<property name="schema_location" value="${config_dir}"/>
|
||||
|
||||
<property name="cobertura.dir" value="${libdir}/cobertura"/>
|
||||
|
||||
<condition property="exclude.signing" value="true">
|
||||
<not>
|
||||
<available file="keystore.ks"/>
|
||||
</not>
|
||||
</condition>
|
||||
<condition property="exclude.jardiff" value="true">
|
||||
<not>
|
||||
<available file="${build-archive}/stendhal-${version.old}.zip"/>
|
||||
</not>
|
||||
</condition>
|
||||
|
||||
<!-- time & date -->
|
||||
<tstamp>
|
||||
<format property="year" pattern="yyyy"/>
|
||||
<format property="date" pattern="yyyy-MM-dd"/>
|
||||
<format property="time" pattern="HH:mm:ss"/>
|
||||
</tstamp>
|
||||
<property name="datetime" value="${date} ${time}"/>
|
||||
|
||||
</project>
|
||||
29
buildtools/ant_modules/system.xml
Normal file
29
buildtools/ant_modules/system.xml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version='1.0'?>
|
||||
|
||||
<project>
|
||||
<!-- system dependent properties -->
|
||||
|
||||
<property environment="env"/>
|
||||
|
||||
<condition property="exe.ext" value=".exe" else="">
|
||||
<os family="windows"/>
|
||||
</condition>
|
||||
|
||||
<!-- Node modules -->
|
||||
<condition property="executable.npm" value="npm.cmd" else="npm">
|
||||
<os family="windows"/>
|
||||
</condition>
|
||||
<condition property="executable.npx" value="npx.cmd" else="npx">
|
||||
<os family="windows"/>
|
||||
</condition>
|
||||
<condition property="executable.neu" value="neu.cmd" else="neu">
|
||||
<os family="windows"/>
|
||||
</condition>
|
||||
|
||||
<!-- Python executables -->
|
||||
<condition property="executable.python" value="python3${exe.ext}" else="python${exe.ext}">
|
||||
<available file="python3${exe.ext}" filepath="${env.PATH}"/>
|
||||
</condition>
|
||||
<available property="python.present" file="${executable.python}" filepath="${env.PATH}"/>
|
||||
|
||||
</project>
|
||||
|
|
@ -7,7 +7,8 @@
|
|||
<import file="dist.xml" />
|
||||
<import file="tools.xml" />
|
||||
|
||||
<target name="test" description="Compile and run all tests." depends="compile_tests,prepare_serverini_for_tests,run_tests,report_test">
|
||||
<!-- Compile and run all tests. -->
|
||||
<target name="test" depends="compile_tests,prepare_serverini_for_tests,run_tests,report_test">
|
||||
<exec executable="curl">
|
||||
<arg value="-q"/>
|
||||
<arg value="-F"/>
|
||||
|
|
@ -21,7 +22,8 @@
|
|||
</target> <!-- test -->
|
||||
|
||||
|
||||
<target name="compile_tests" description="Compile all tests." depends="server_build,client_build,compile_stendhaltools,compile_stendhaltextclient,postman">
|
||||
<!-- Compile all tests. -->
|
||||
<target name="compile_tests" depends="server_build,client_build,compile_stendhaltools,compile_stendhaltextclient,postman">
|
||||
<mkdir dir="${build_tests}"/>
|
||||
|
||||
<copy todir="${build_tests}">
|
||||
|
|
@ -63,7 +65,8 @@
|
|||
</target> <!-- compile_tests -->
|
||||
|
||||
|
||||
<target name="prepare_serverini_for_tests" unless="server.ini" description="Generate server.ini for testing.">
|
||||
<!-- Generate server.ini for testing. -->
|
||||
<target name="prepare_serverini_for_tests" unless="server.ini">
|
||||
<echo file="server.ini">
|
||||
database_implementation=games.stendhal.server.core.engine.StendhalPlayerDatabase
|
||||
factory_implementation=games.stendhal.server.core.engine.StendhalRPObjectFactory
|
||||
|
|
@ -85,7 +88,8 @@ d = 9017093486007323270605414717455737376618092805104733236083857811315606869372
|
|||
</target> <!-- prepare_serverini_for_tests -->
|
||||
|
||||
|
||||
<target name="run_tests" description="Run all tests.">
|
||||
<!-- Run all tests. -->
|
||||
<target name="run_tests">
|
||||
<mkdir dir="${build_tests_report}"/>
|
||||
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml">
|
||||
<classpath path="buildtools/jacoco/jacocoant.jar"/>
|
||||
|
|
@ -147,7 +151,8 @@ d = 9017093486007323270605414717455737376618092805104733236083857811315606869372
|
|||
</target> <!-- run_tests -->
|
||||
|
||||
|
||||
<target name="report_test" description="Aggregate test results.">
|
||||
<!-- Aggregate test results. -->
|
||||
<target name="report_test">
|
||||
<mkdir dir="${build_tests_report}"/>
|
||||
<junitreport todir="${build_tests_report}" tofile="testresults.xml">
|
||||
<fileset dir="${build_tests_report}">
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
|
||||
<import file="dist.xml" />
|
||||
|
||||
<target name="compile_stendhaltools" description="Compile Stendhal build tools.">
|
||||
<!-- Compile Stendhal build tools. -->
|
||||
<target name="compile_tools">
|
||||
<mkdir dir="${build_stendhaltools}"/>
|
||||
|
||||
<javac srcdir="${src}" destdir="${build_stendhaltools}" source="1.8" target="1.8" debug="${javac.debug}" debuglevel="${javac.debuglevel}" deprecation="${javac.deprecation}" includeantruntime="true">
|
||||
|
|
@ -28,7 +29,11 @@
|
|||
</javac>
|
||||
</target> <!-- compile_stendhaltools -->
|
||||
|
||||
<target name="clean_whitespace" description="Clean whitespace in source and other specified file types." depends="compile_stendhaltools">
|
||||
<!-- Alias of `compile_tools`. -->
|
||||
<target name="compile_stendhaltools" depends="compile_tools" />
|
||||
|
||||
<!-- Clean whitespace in source and other specified file types. -->
|
||||
<target name="clean_whitespace" depends="compile_stendhaltools">
|
||||
<!-- process main Java source, config, & scripting files -->
|
||||
<java classname="games.stendhal.tools.CleanWhitespace">
|
||||
<classpath>
|
||||
|
|
@ -36,7 +41,7 @@
|
|||
</classpath>
|
||||
<arg value="src/"/>
|
||||
<arg value="tests/"/>
|
||||
<arg value="android/app/src/"/>
|
||||
<arg value="app/android/client/src"/>
|
||||
<arg value="java,xml,lua"/>
|
||||
</java>
|
||||
|
||||
|
|
@ -45,7 +50,7 @@
|
|||
<classpath>
|
||||
<pathelement path="${build_stendhaltools}"/>
|
||||
</classpath>
|
||||
<arg value="srcjs/"/>
|
||||
<arg value="${srcjs}/"/>
|
||||
<arg value="js,ts,css"/>
|
||||
</java>
|
||||
|
||||
|
|
@ -55,16 +60,22 @@
|
|||
<pathelement path="${build_stendhaltools}"/>
|
||||
</classpath>
|
||||
<arg value="data/"/>
|
||||
<arg value="tiled/"/>
|
||||
<arg value="xml,xsd,lua,py"/>
|
||||
</java>
|
||||
|
||||
<!-- process Ant build configuration files -->
|
||||
<java classname="games.stendhal.tools.CleanWhitespace">
|
||||
<classpath>
|
||||
<pathelement path="${build_stendhaltools}"/>
|
||||
</classpath>
|
||||
<arg value="${ant_modules}" />
|
||||
<arg value="xml" />
|
||||
</java>
|
||||
</target> <!-- clean_whitespace -->
|
||||
|
||||
|
||||
<target name="cleanwhitespace" depends="clean_whitespace" description="Alias of clean_whitespace."/>
|
||||
|
||||
|
||||
<target name="postman" description="Build postman bot.">
|
||||
<!-- Build postman bot. -->
|
||||
<target name="postman">
|
||||
<mkdir dir="${buildroot}/buildbot"/>
|
||||
<javac srcdir="${src}" destdir="${buildroot}/buildbot" debug="${javac.debug}" debuglevel="${javac.debuglevel}" source="1.8" target="1.8" deprecation="${javac.deprecation}" includeantruntime="false">
|
||||
<include name="games/stendhal/bot/postman/*.java"/>
|
||||
|
|
@ -100,7 +111,8 @@
|
|||
</target> <!-- postman -->
|
||||
|
||||
|
||||
<target name="signupdates" description="Sign updates." depends="compile_stendhaltools,jardiff" unless="exclude.signing">
|
||||
<!-- Sign updates. -->
|
||||
<target name="signupdates" depends="compile_stendhaltools,jardiff" unless="exclude.signing">
|
||||
<taskdef name="updatesigner" classname="games.stendhal.tools.updateprop.UpdateSigner">
|
||||
<classpath>
|
||||
<pathelement path="."/>
|
||||
|
|
@ -116,7 +128,8 @@
|
|||
</target> <!-- signupdates -->
|
||||
|
||||
|
||||
<target name="jardiff" depends="client_build" unless="exclude.jardiff" description="Generate release changes info.">
|
||||
<!-- Generate release changes info. -->
|
||||
<target name="jardiff" depends="client_build" unless="exclude.jardiff">
|
||||
<echo>Creating update from ${version.old} to ${version}</echo>
|
||||
<delete>
|
||||
<fileset dir="${build-archive}">
|
||||
|
|
@ -160,8 +173,9 @@
|
|||
</target> <!-- jardiff -->
|
||||
|
||||
|
||||
<!-- Run enemy balancer. -->
|
||||
<!-- USAGE: ant balance -Dcreature="<creature_name>" -->
|
||||
<target name="balance" description="Run enemy balancer." depends="compile_stendhaltools,server_build">
|
||||
<target name="balance" depends="compile_stendhaltools,server_build">
|
||||
<java classname="games.stendhal.tools.BalanceRPGame">
|
||||
<classpath>
|
||||
<pathelement path="${build_stendhaltools}"/>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
site_name: Stendhal 1.45.5 Reference Documentation
|
||||
site_name: Stendhal 1.49.5 Reference Documentation
|
||||
site_description: A fun, friendly, & free multiplayer online adventure game.
|
||||
copyright: Copyright © 2003-2024 Stendhal
|
||||
copyright: Copyright © 2003-2026 Stendhal
|
||||
site_url: https://stendhalgame.org/
|
||||
nav:
|
||||
- Index: /reference/
|
||||
|
|
|
|||
|
|
@ -153,6 +153,12 @@ npc:setOutfitColor("skin", SkinColor.DARK)
|
|||
```
|
||||
|
||||
|
||||
---
|
||||
# TimeUtil
|
||||
|
||||
The [TimeUtil] class.
|
||||
|
||||
|
||||
[java.awt.Color]: https://docs.oracle.com/javase/8/docs/api/java/awt/Color.html
|
||||
|
||||
[CloneManager]: /reference/java/games/stendhal/server/entity/npc/CloneManager.html
|
||||
|
|
@ -168,3 +174,4 @@ npc:setOutfitColor("skin", SkinColor.DARK)
|
|||
[ShopType]: /reference/java/games/stendhal/server/entity/npc/shop/ShopType.html
|
||||
[SingletonRepository]: /reference/java/games/stendhal/server/core/engine/SingletonRepository.html
|
||||
[SkinColor]: /reference/java/games/stendhal/common/constants/SkinColor.html
|
||||
[TimeUtil]: /reference/java/games/stendhal/server/util/TimeUtil.html
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
<profile name="animal"/>
|
||||
<profile name="offensive"/>
|
||||
<profile name="patrolling"/>
|
||||
<profile name="wander"/>
|
||||
</ai>
|
||||
</creature>
|
||||
|
||||
|
|
@ -205,7 +206,7 @@
|
|||
|
||||
<creature name="giant killer bat">
|
||||
<type class="animal" subclass="bat_giant_red" tileid="animal.png:6"/>
|
||||
<description></description>
|
||||
<description>You see a giant killer bat. As if small wasn't pesky enough, these giant ones are capable of taking down anyone who dares come before them.</description>
|
||||
<attributes>
|
||||
<atk value="752"/>
|
||||
<def value="161"/>
|
||||
|
|
@ -982,7 +983,7 @@
|
|||
|
||||
<creature name="polar bear">
|
||||
<type class="animal" subclass="polar_bear" tileid="animal.png:3"/>
|
||||
<description></description>
|
||||
<description>You see a polar bear which lives in the icy desert. Beware! It can take you down with its powerful claws!</description>
|
||||
<attributes>
|
||||
<atk value="225"/>
|
||||
<def value="51"/>
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
|
||||
<creature name="elder cannibal">
|
||||
<type class="human" subclass="elder_cannibal" tileid="human_cannibal.png:2"/>
|
||||
<description/>
|
||||
<description>You see an elder cannibal. For years it has eaten humans. It will not stop until its hunger is satisfied.</description>
|
||||
<attributes>
|
||||
<atk value="315"/>
|
||||
<def value="111"/>
|
||||
|
|
|
|||
|
|
@ -234,6 +234,7 @@
|
|||
<item value="unicorn shield" quantity="[1,1]" probability="80.0"/>
|
||||
<item value="lucky charm" quantity="[1,1]" probability="80.0"/>
|
||||
<item value="diamond" quantity="[1,1]" probability="20.0"/>
|
||||
<item value="ring of clarity" quantity="1" probability="5.0"/>
|
||||
</drops>
|
||||
<equips/>
|
||||
<ai>
|
||||
|
|
|
|||
|
|
@ -357,6 +357,7 @@
|
|||
<corpse name="humanoid"/>
|
||||
<drops>
|
||||
<item value="golden orc sword" quantity="[1,1]" probability="25.0"/>
|
||||
<item value="ring of clarity" quantity="1" probability="8.5"/>
|
||||
</drops>
|
||||
<equips>
|
||||
</equips>
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@
|
|||
</equips>
|
||||
<ai>
|
||||
<profile name="animal"/>
|
||||
<profile name="patrolling"/>
|
||||
<profile name="wander"/>
|
||||
</ai>
|
||||
</creature>
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
<element name="damagetype" type="Q1:attribute" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<element name="statusattack" type="Q1:attribute" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<element name="statusresist" type="Q1:statusresist" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<element name="accuracy_bonus" type="Q1:attribute" minOccurs="0" maxOccurs="1"/>
|
||||
</sequence>
|
||||
</extension>
|
||||
</complexContent>
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@
|
|||
|
||||
<item name="pelt">
|
||||
<type class="misc" subclass="pelt" tileid="-1"/>
|
||||
<description/>
|
||||
<description>You see a pelt of animal skin. It's used to make clothes and leather armor.</description>
|
||||
<implementation class-name="games.stendhal.server.entity.item.StackableItem"/>
|
||||
<attributes>
|
||||
<quantity value="1"/>
|
||||
|
|
|
|||
|
|
@ -230,4 +230,24 @@
|
|||
</equipable>
|
||||
</item>
|
||||
|
||||
<item name="ring of clarity">
|
||||
<type class="ring" subclass="clarity" tileid="-1"/>
|
||||
<description>You see a ring of clarity. You feel more aware while wearing it.</description>
|
||||
<implementation class-name="games.stendhal.server.entity.item.Item"/>
|
||||
<attributes>
|
||||
<min_level value="0"/>
|
||||
<accuracy_bonus value="25.0"/>
|
||||
</attributes>
|
||||
<weight value="0.1"/>
|
||||
<value value="1"/>
|
||||
<equipable>
|
||||
<slot name="ground"/>
|
||||
<slot name="content"/>
|
||||
<slot name="bag"/>
|
||||
<slot name="trade"/>
|
||||
<slot name="finger"/>
|
||||
<slot name="keyring"/>
|
||||
</equipable>
|
||||
</item>
|
||||
|
||||
</items>
|
||||
|
|
|
|||
|
|
@ -147,4 +147,25 @@
|
|||
</equipable>
|
||||
</item>
|
||||
|
||||
<item name="four-leaf clover">
|
||||
<type class="special" subclass="clover" tileid="-1"/>
|
||||
<description>You see a lucky four-leaf clover. What are the chances of finding one!?</description>
|
||||
<implementation class-name="games.stendhal.server.entity.item.StackableItem"/>
|
||||
<attributes>
|
||||
<quantity value="1"/>
|
||||
<max_quantity value="2147483647"/>
|
||||
</attributes>
|
||||
<weight value="0.01"/>
|
||||
<value value="250000"/>
|
||||
<equipable>
|
||||
<slot name="ground"/>
|
||||
<slot name="content"/>
|
||||
<slot name="lhand"/>
|
||||
<slot name="rhand"/>
|
||||
<slot name="keyring"/>
|
||||
<slot name="bag"/>
|
||||
<slot name="trade"/>
|
||||
</equipable>
|
||||
</item>
|
||||
|
||||
</items>
|
||||
|
|
|
|||
|
|
@ -16,18 +16,18 @@
|
|||
-->
|
||||
|
||||
<shop name="deniran_accessories" type="outfit">
|
||||
<outfit name="white balloon" layers="detail=2" price="50000"/>
|
||||
<outfit name="black balloon" layers="detail=3" price="50000"/>
|
||||
<outfit name="bone" layers="detail=4" price="100000"/>
|
||||
<outfit name="umbrella" layers="detail=7" price="50000"/>
|
||||
<outfit name="sword" layers="detail=8" price="250000"/>
|
||||
<outfit name="knife" layers="detail=9" price="125000"/>
|
||||
<outfit name="spear" layers="detail=10" price="150000"/>
|
||||
<outfit name="bow" layers="detail=11" price="175000"/>
|
||||
<outfit name="axe1" layers="detail=12" price="250000"/>
|
||||
<outfit name="axe2" layers="detail=13" price="250000"/>
|
||||
<outfit name="kite shield" layers="detail=14" price="225000"/>
|
||||
<outfit name="shield" layers="detail=15" price="225000"/>
|
||||
<outfit name="white balloon" layers="detail=2" price="25000"/>
|
||||
<outfit name="black balloon" layers="detail=3" price="25000"/>
|
||||
<outfit name="bone" layers="detail=4" price="50000"/>
|
||||
<outfit name="umbrella" layers="detail=7" price="25000"/>
|
||||
<outfit name="sword" layers="detail=8" price="125000"/>
|
||||
<outfit name="knife" layers="detail=9" price="62500"/>
|
||||
<outfit name="spear" layers="detail=10" price="75000"/>
|
||||
<outfit name="bow" layers="detail=11" price="87500"/>
|
||||
<outfit name="axe1" layers="detail=12" price="125000"/>
|
||||
<outfit name="axe2" layers="detail=13" price="125000"/>
|
||||
<outfit name="kite shield" layers="detail=14" price="112500"/>
|
||||
<outfit name="shield" layers="detail=15" price="112500"/>
|
||||
<merchant name="Gwen" flags="configure,noOffer,removeDetailColor,confirmTemp,confirmBalloon,resetBeforeChange"
|
||||
note="do not expire"/>
|
||||
</shop>
|
||||
|
|
|
|||
|
|
@ -89,6 +89,70 @@
|
|||
<attribute name="hidden"/>
|
||||
</portal>
|
||||
|
||||
<portal x="13" y="56" ref="ent11n">
|
||||
<destination zone="0_ados_mountain_n2_w" ref="ent11s"/>
|
||||
<attribute name="move.continuous"/>
|
||||
<attribute name="hidden"/>
|
||||
</portal>
|
||||
|
||||
<portal x="13" y="57" ref="ent11s">
|
||||
<destination zone="0_ados_mountain_n2_w" ref="ent11n"/>
|
||||
<implementation class-name="games.stendhal.server.entity.mapstuff.portal.LevelCheckingPortal">
|
||||
<parameter name="minimum-level">100</parameter>
|
||||
<parameter name="rejected">The entwives are NOT babysitters. Come back when you have some age on you.</parameter>
|
||||
</implementation>
|
||||
<attribute name="move.continuous"/>
|
||||
<attribute name="hidden"/>
|
||||
</portal>
|
||||
|
||||
<portal x="14" y="56" ref="ent12n">
|
||||
<destination zone="0_ados_mountain_n2_w" ref="ent12s"/>
|
||||
<attribute name="move.continuous"/>
|
||||
<attribute name="hidden"/>
|
||||
</portal>
|
||||
|
||||
<portal x="14" y="57" ref="ent12s">
|
||||
<destination zone="0_ados_mountain_n2_w" ref="ent12n"/>
|
||||
<implementation class-name="games.stendhal.server.entity.mapstuff.portal.LevelCheckingPortal">
|
||||
<parameter name="minimum-level">100</parameter>
|
||||
<parameter name="rejected">The entwives are NOT babysitters. Come back when you have some age on you.</parameter>
|
||||
</implementation>
|
||||
<attribute name="move.continuous"/>
|
||||
<attribute name="hidden"/>
|
||||
</portal>
|
||||
|
||||
<portal x="15" y="56" ref="ent13n">
|
||||
<destination zone="0_ados_mountain_n2_w" ref="ent13s"/>
|
||||
<attribute name="move.continuous"/>
|
||||
<attribute name="hidden"/>
|
||||
</portal>
|
||||
|
||||
<portal x="15" y="57" ref="ent13s">
|
||||
<destination zone="0_ados_mountain_n2_w" ref="ent13n"/>
|
||||
<implementation class-name="games.stendhal.server.entity.mapstuff.portal.LevelCheckingPortal">
|
||||
<parameter name="minimum-level">100</parameter>
|
||||
<parameter name="rejected">The entwives are NOT babysitters. Come back when you have some age on you.</parameter>
|
||||
</implementation>
|
||||
<attribute name="move.continuous"/>
|
||||
<attribute name="hidden"/>
|
||||
</portal>
|
||||
|
||||
<portal x="16" y="56" ref="ent14n">
|
||||
<destination zone="0_ados_mountain_n2_w" ref="ent14s"/>
|
||||
<attribute name="move.continuous"/>
|
||||
<attribute name="hidden"/>
|
||||
</portal>
|
||||
|
||||
<portal x="16" y="57" ref="ent14s">
|
||||
<destination zone="0_ados_mountain_n2_w" ref="ent14n"/>
|
||||
<implementation class-name="games.stendhal.server.entity.mapstuff.portal.LevelCheckingPortal">
|
||||
<parameter name="minimum-level">100</parameter>
|
||||
<parameter name="rejected">The entwives are NOT babysitters. Come back when you have some age on you.</parameter>
|
||||
</implementation>
|
||||
<attribute name="move.continuous"/>
|
||||
<attribute name="hidden"/>
|
||||
</portal>
|
||||
|
||||
<!-- wishing well-->
|
||||
<entity x="86" y="21">
|
||||
<implementation class-name="games.stendhal.server.entity.mapstuff.useable.WellSource"/>
|
||||
|
|
@ -2320,6 +2384,7 @@ You should never dive with a cold or severe allergy because, you may not be able
|
|||
|
||||
<portal x="4" y="4" ref="upstairs">
|
||||
<destination zone="int_ados_town_hall_1" ref="downstairs"/>
|
||||
<attribute name="move.continuous"/>
|
||||
</portal>
|
||||
|
||||
<!-- Signs -->
|
||||
|
|
@ -4273,7 +4338,6 @@ My fee:
|
|||
<!-- Portals -->
|
||||
<portal x="12" y="22" ref="in">
|
||||
<destination zone="0_ados_city" ref="house_70"/>
|
||||
<attribute name="resistance">0</attribute>
|
||||
</portal>
|
||||
|
||||
<!-- Clock -->
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@
|
|||
<attributes>
|
||||
<parameter name="color_method">time</parameter>
|
||||
<parameter name="weather">varying(rain=-2, temperature=+5)</parameter>
|
||||
<parameter name="music">jump_and_run_tropics</parameter>
|
||||
</attributes>
|
||||
|
||||
<entity x="90" y="45">
|
||||
|
|
@ -160,6 +161,7 @@
|
|||
<attributes>
|
||||
<parameter name="color_method">time</parameter>
|
||||
<parameter name="weather">varying(rain=-2, temperature=+5)</parameter>
|
||||
<parameter name="music">jump_and_run_tropics</parameter>
|
||||
</attributes>
|
||||
|
||||
<!-- NPCs -->
|
||||
|
|
@ -1082,6 +1084,7 @@
|
|||
<attributes>
|
||||
<parameter name="color_method">time</parameter>
|
||||
<parameter name="weather">varying(rain=-2, temperature=+5)</parameter>
|
||||
<!--<parameter name="music">island_mountain</parameter>-->
|
||||
</attributes>
|
||||
|
||||
<!-- Music/Ambiance -->
|
||||
|
|
|
|||
|
|
@ -277,14 +277,13 @@
|
|||
</zone>
|
||||
|
||||
|
||||
<zone name="0_deniran_city_se" level="0" x="499360" y="500128"
|
||||
file="Level 0/deniran/city_se.tmx">
|
||||
|
||||
<zone name="0_deniran_city_se" level="0" x="499360" y="500128" file="Level 0/deniran/city_se.tmx">
|
||||
<attributes>
|
||||
<parameter name="color_method">time</parameter>
|
||||
<parameter name="weather">varying</parameter>
|
||||
</attributes>
|
||||
|
||||
<configurator class-name="games.stendhal.server.maps.deniran.cityoutside.CloverHunterNPC"/>
|
||||
</zone>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,10 @@
|
|||
file="Level 7/kikareukin/clouds.tmx">
|
||||
<attributes>
|
||||
<parameter name="color_method">time</parameter>
|
||||
<parameter name="weather">clouds</parameter>
|
||||
<parameter name="parallax">semos_surrounds</parameter>
|
||||
<!-- prevent drawing specific tiles in web client while while keeping compatibility with Java client -->
|
||||
<parameter name="parallax_ignore_tiles">sky/cloud/clouds</parameter>
|
||||
</attributes>
|
||||
|
||||
<!--Don't allow teleporting in as we don't want marked scrolls made or
|
||||
|
|
@ -51,6 +55,7 @@
|
|||
<attributes>
|
||||
<parameter name="color_method">time</parameter>
|
||||
<parameter name="weather">varying(temperature=-2)</parameter>
|
||||
<parameter name="parallax">semos_surrounds</parameter>
|
||||
</attributes>
|
||||
|
||||
<configurator
|
||||
|
|
|
|||
|
|
@ -1027,7 +1027,7 @@ below average.
|
|||
class-name="games.stendhal.server.entity.mapstuff.area.MessagingArea">
|
||||
<parameter name="width">5</parameter>
|
||||
<parameter name="height">5</parameter>
|
||||
<parameter name="enterMessage">You hear faintly incantations of dark magic from below. The place reeks of danger.</parameter>
|
||||
<parameter name="enterMessage">You hear faint incantations of dark magic from below. The place reeks of danger.</parameter>
|
||||
<parameter name="warnPlayer">true</parameter>
|
||||
</implementation>
|
||||
</entity>
|
||||
|
|
@ -1345,6 +1345,7 @@ below average.
|
|||
<configurator class-name="games.stendhal.server.maps.nalwor.hell.Reaper2NPC"/>
|
||||
<configurator class-name="games.stendhal.server.maps.nalwor.hell.CaptiveNPC"/>
|
||||
<configurator class-name="games.stendhal.server.maps.nalwor.hell.HellTimer"/>
|
||||
<configurator class-name="games.stendhal.server.maps.nalwor.hell.HellFreezer" condition="!stendhal.nohellfreezer"/>
|
||||
<portal x="9" y="9" ref="start">
|
||||
<implementation
|
||||
class-name="games.stendhal.server.entity.mapstuff.portal.OneWayPortalDestination"/>
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue