Compare commits

...

186 Commits

Author SHA1 Message Date
Nut.andor
1b660f482e ohne debug buttons, damit die saves produktiv sind 2022-10-02 02:28:17 +02:00
Nut.andor
639b17c582 Export/Import 2022-10-02 01:00:53 +02:00
Nut.andor
a6c39a578d version 66 v0.8.2 2022-10-02 01:00:53 +02:00
Nut.andor
79e6fe7b65 whatsnew
factionlist bug
2022-10-01 09:18:28 +02:00
Nut.andor
329acad741 authors 2022-09-28 00:44:23 +02:00
Nut.andor
41ad345a89 languages% 2022-09-28 00:10:39 +02:00
Nut.andor
f79633fb85 POTCPOTC incl. compile 2022-09-27 22:34:06 +02:00
Nut.andor
8071ebe28f fix https 2022-09-27 21:55:59 +02:00
Nut.andor
09ff14bd14 content sullengard 2022-09-27 21:54:13 +02:00
Nut.andor
fee94d4262 typo in authors 2022-09-27 21:50:45 +02:00
Nut.andor
ec14dbe917 compiled languages 2022-09-27 20:04:48 +02:00
Nut.andor
cc1d20aba6 Revert "Auxiliary commit to revert individual files from 4feebd058b2184486001bb77f9b2b4c48947f11d"
This reverts commit f8a9c8d2d40b69f5f4007320365d64127ef93fa4, reversing
changes made to 2dd9f8fcab.
2022-09-27 19:47:37 +02:00
Nut.andor
4feebd058b Merge remote-tracking branch 'hosted.weblate/master'
(an old state that must be reverted again, just to sync weblate)
2022-09-27 19:46:41 +02:00
Hosted Weblate
265469f88e Merge branch 'origin/master' into Weblate. 2022-09-26 23:19:16 +02:00
Nut.andor
2dd9f8fcab Merge commit '2705e1c20875e74aefdc5225e27c7cf8004edc15'
missing translations
2022-09-26 23:17:16 +02:00
Hosted Weblate
50c522c20a Merge branch 'origin/master' into Weblate. 2022-09-26 23:08:11 +02:00
Nut.andor
08dea48010 Revert "missing translations 20220821-2144 ... 20220924-2147"
This reverts commit 76127d9d85.
2022-09-26 23:07:49 +02:00
Hosted Weblate
781ddcf7a7 Merge branch 'origin/master' into Weblate. 2022-09-26 23:04:35 +02:00
Nut.andor
76127d9d85 missing translations 20220821-2144 ... 20220924-2147 2022-09-26 23:03:16 +02:00
Hosted Weblate
e826232611 Merge branch 'origin/master' into Weblate. 2022-09-26 22:42:24 +02:00
Nut.andor
d879629e4a Revert to next prod version 2022-09-26 22:41:03 +02:00
Nut.andor
2e7eb84f88 potc 2022-09-26 00:56:19 +02:00
Nut.andor
10ebaf925f content sullengard 2022-09-26 00:43:37 +02:00
Nut.andor
4c8302b11e compiled languages 2022-09-25 23:46:21 +02:00
Nut.andor
235f1c912d next prod version 0.8.1
authors
2022-09-25 23:46:02 +02:00
Nut.andor
a5721a4a25 gradle to gitignore 2022-09-25 23:15:32 +02:00
Nut.andor
5adbbd61b9 Next version 0.8.1
Burhczyd enhanced
Burhczyd typos
Some map changes,
beta icon
WhatsNew
map_tree_1+2.png changes
2022-09-25 19:46:17 +02:00
Nut.andor
196223bf73 - Large maps bugs
- Debug buttons
2022-09-25 15:36:10 +02:00
Nut.andor
d89a615990 Migration to actual AndroidStudio version - final touches for compile 2022-09-25 15:34:08 +02:00
Nut.andor
863cc1a0bb Preparation for Compile
- change  http://  to  https://
2022-09-25 14:34:23 +02:00
Nut.andor
1cec98249b Migration to actual AndroidStudio version
Copy  ...\AndorsTrailRelease\andors-trail\AndorsTrail  to  a temporary directory, then delete the content except the .git directory.   (C:\AT\AndorsTrailRelease_before_Mig_20220925)

Open Android Studio, any project
New >> Import project

> Import Project, select the AndorsTrail folder from the temporary location
	C:\AT\AndorsTrailRelease_before_Mig_20220925\andors-trail\AndorsTrail
  Destination: C:\AT\AndorsTrailRelease\andors-trail\AndorsTrail

Click next a few times.
It then shows some error about not finding build tools. Below it there should be the option to 'Add google Maven reposiroty and sync project'. Click that option and then 'Do Refactor' (Bottom Left).

In the newly created file 'app/build.gradle'
In line 4 change the compileSdkVersion to 30 (or higher?)
In line 9 change the minSdkVersion to 14 instead of 4
In line 22 change the version from '29.+' to '28.0.0' and the compile at the beginning to implementation
Then Click 'Sync Project with Gradle Files' (icon in top right) that should no longer give errors.
2022-09-25 13:16:57 +02:00
Nut.andor
15ba005062 Merge branch 'pulls/1829009049/37' 2022-09-25 11:56:03 +02:00
Nut.andor
86c1b7496d Merge branch 'pulls/1829009049/36' 2022-09-25 11:55:12 +02:00
Nut.andor
0a194f1e25 Merge branch 'pulls/1829009049/35' 2022-09-25 11:54:58 +02:00
Nut.andor
6ada4c9649 Merge remote-tracking branch 'Weblate_translations/master' 2022-09-25 11:44:21 +02:00
Daniel Stasiak
2705e1c208 Translated using Weblate (Polish)
Currently translated at 99.6% (13886 of 13929 strings)
2022-09-25 11:15:00 +02:00
Andrés Morgensen
3ec7a76ce2 Translated using Weblate (Spanish)
Currently translated at 90.8% (12659 of 13929 strings)
2022-09-17 01:23:39 +02:00
Wahyu Budi Laksono
5ec9a76c65 Translated using Weblate (Indonesian)
Currently translated at 18.4% (2573 of 13929 strings)
2022-09-09 17:23:41 +02:00
Budi
146f62b283 Translated using Weblate (Indonesian)
Currently translated at 18.0% (2520 of 13929 strings)
2022-09-07 21:05:11 +02:00
Neko Nekowazarashi
b9d4e52101 Translated using Weblate (Indonesian)
Currently translated at 17.9% (2507 of 13929 strings)
2022-09-05 16:23:44 +02:00
Kristoffer Grundström
934f578083 Translated using Weblate (Swedish)
Currently translated at 70.5% (410 of 581 strings)
2022-09-03 01:24:47 +02:00
Jiri Zizkin Zizka
0d604f6346 Translated using Weblate (Czech)
Currently translated at 100.0% (13929 of 13929 strings)
2022-09-03 01:24:46 +02:00
Daniel Stasiak
5a555d554c Translated using Weblate (Polish)
Currently translated at 99.6% (13886 of 13929 strings)
2022-08-31 13:26:13 +02:00
daudiffa
8ccaabfb0d Translated using Weblate (Indonesian)
Currently translated at 17.7% (2478 of 13929 strings)
2022-08-31 13:26:11 +02:00
Artem
fb887cc869 Translated using Weblate (Ukrainian)
Currently translated at 10.6% (1478 of 13929 strings)
2022-08-30 05:45:22 +02:00
Daniel Stasiak
368359af08 Translated using Weblate (Polish)
Currently translated at 99.6% (13886 of 13929 strings)
2022-08-30 05:45:20 +02:00
daudiffa
dc15a9ecde Translated using Weblate (Indonesian)
Currently translated at 17.3% (2412 of 13929 strings)
2022-08-30 05:45:18 +02:00
Artem
1f6db65a45 Translated using Weblate (Ukrainian)
Currently translated at 10.6% (1478 of 13929 strings)
2022-08-28 03:25:16 +02:00
Jiri Zizkin Zizka
0a70cdd852 Translated using Weblate (Czech)
Currently translated at 99.8% (13909 of 13929 strings)
2022-08-28 03:25:14 +02:00
Daniel Stasiak
493f3675dd Translated using Weblate (Polish)
Currently translated at 99.6% (13886 of 13929 strings)
2022-08-28 03:25:13 +02:00
Marco Santos
7b3b950982 Translated using Weblate (Filipino)
Currently translated at 46.8% (272 of 581 strings)
2022-08-24 06:18:40 +02:00
Jiri Zizkin Zizka
58cb83ee0c Translated using Weblate (Czech)
Currently translated at 99.8% (13903 of 13929 strings)
2022-08-24 06:18:40 +02:00
Daniel Stasiak
97d03a76c5 Translated using Weblate (Polish)
Currently translated at 99.6% (13886 of 13929 strings)
2022-08-24 06:18:39 +02:00
Jiri Zizkin Zizka
d42046dc30 Translated using Weblate (Czech)
Currently translated at 99.7% (13897 of 13929 strings)
2022-08-22 15:58:00 +02:00
Daniel Stasiak
fc6d11b096 Translated using Weblate (Polish)
Currently translated at 99.6% (13886 of 13929 strings)
2022-08-22 15:57:57 +02:00
Нядзьведзь Максім Аляксандравіч
716d0076cd Translated using Weblate (Belarusian)
Currently translated at 0.3% (55 of 13928 strings)
2022-08-13 00:23:04 +02:00
Нядзьведзь Максім Аляксандравіч
e19e73c6a1 Translated using Weblate (Belarusian)
Currently translated at 96.0% (558 of 581 strings)
2022-08-13 00:23:03 +02:00
Нядзьведзь Максім Аляксандравіч
779a2e81fd Added translation using Weblate (Belarusian) 2022-08-11 15:39:44 +02:00
Jiri Zizkin Zizka
cd1e764f92 Translated using Weblate (Czech)
Currently translated at 98.2% (13689 of 13929 strings)
2022-08-11 08:22:11 +02:00
Jiri Zizkin Zizka
71bd56fff4 Translated using Weblate (Czech)
Currently translated at 97.2% (13551 of 13929 strings)
2022-08-08 07:25:21 +02:00
Jiri Zizkin Zizka
0e48faa5b2 Translated using Weblate (Czech)
Currently translated at 96.9% (13500 of 13929 strings)
2022-08-05 06:23:54 +02:00
Andrés Morgensen
9d0f17d2a2 Translated using Weblate (Spanish)
Currently translated at 90.8% (12656 of 13929 strings)
2022-08-05 06:23:52 +02:00
Jiri Zizkin Zizka
67720592f4 Translated using Weblate (Czech)
Currently translated at 96.3% (13426 of 13929 strings)
2022-08-02 22:21:56 +02:00
Daniel Stasiak
ba97e71957 Translated using Weblate (Polish)
Currently translated at 99.6% (13886 of 13929 strings)
2022-07-30 17:21:11 +02:00
mitchell van den Hurk
ee5f525591 Translated using Weblate (Dutch)
Currently translated at 7.7% (1083 of 13929 strings)
2022-07-30 17:21:09 +02:00
Artem
bed80e48b0 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (581 of 581 strings)
2022-07-26 14:19:23 +02:00
Daniel Stasiak
90c8293fd2 Translated using Weblate (Polish)
Currently translated at 99.6% (13886 of 13929 strings)
2022-07-26 14:19:22 +02:00
Daniel Stasiak
6c390c6b39 Translated using Weblate (Polish)
Currently translated at 99.6% (13886 of 13929 strings)
2022-07-25 11:26:50 +02:00
Jiri Zizkin Zizka
9785a8ece9 Translated using Weblate (Czech)
Currently translated at 96.3% (13419 of 13929 strings)
2022-07-24 12:25:05 +02:00
Daniel Stasiak
362c3f8b74 Translated using Weblate (Polish)
Currently translated at 99.6% (13886 of 13929 strings)
2022-07-24 12:25:03 +02:00
Nut.andor
bb707047a0 gradle wrapper 2022-07-24 10:30:41 +02:00
Nut.andor
efe0691f74 gitignore 2022-07-24 10:25:17 +02:00
Daniel Stasiak
30906135e1 Translated using Weblate (Polish)
Currently translated at 99.6% (13886 of 13929 strings)
2022-07-15 01:41:33 +02:00
โกศัลย์ รําประโคน
0a8b598f04 Translated using Weblate (Thai)
Currently translated at 1.3% (195 of 13929 strings)
2022-07-11 11:18:26 +02:00
โกศัลย์ รําประโคน
b7ea7ccaab Translated using Weblate (Thai)
Currently translated at 8.6% (50 of 581 strings)
2022-07-08 18:18:47 +02:00
Anupam Malhotra
6a959f88d4 Translated using Weblate (Punjabi)
Currently translated at 0.1% (7 of 13929 strings)
2022-07-08 18:18:47 +02:00
โกศัลย์ รําประโคน
311c1cb1ae Translated using Weblate (Thai)
Currently translated at 1.2% (170 of 13929 strings)
2022-07-08 18:18:45 +02:00
Daniel Stasiak
7023401f1f Translated using Weblate (Polish)
Currently translated at 99.6% (13886 of 13929 strings)
2022-07-08 18:18:44 +02:00
ilya
f4e7995b8e Translated using Weblate (Russian)
Currently translated at 100.0% (581 of 581 strings)
2022-07-08 18:18:42 +02:00
Jiri Zizkin Zizka
0712dac81b Translated using Weblate (Czech)
Currently translated at 95.6% (13318 of 13929 strings)
2022-07-02 16:21:10 +02:00
Daniel Stasiak
40693d99b9 Translated using Weblate (Polish)
Currently translated at 99.6% (13886 of 13929 strings)
2022-07-02 16:21:08 +02:00
ilya
8aeb391239 Translated using Weblate (Russian)
Currently translated at 100.0% (581 of 581 strings)
2022-07-02 16:21:06 +02:00
Derik Douglas Jesus da Silva
fc6821ea94 Translated using Weblate (Punjabi)
Currently translated at 24.2% (141 of 581 strings)
2022-06-29 20:21:41 +02:00
Jiri Zizkin Zizka
92a77518ae Translated using Weblate (Czech)
Currently translated at 95.5% (13312 of 13929 strings)
2022-06-29 20:21:40 +02:00
Derik Douglas Jesus da Silva
a345b22116 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (13929 of 13929 strings)
2022-06-29 20:21:39 +02:00
Basan
3d4869bf29 Translated using Weblate (Kurdish (Central))
Currently translated at 0.1% (19 of 13928 strings)
2022-06-26 20:22:38 +02:00
Daniel Stasiak
fa19e69494 Translated using Weblate (Polish)
Currently translated at 99.6% (13886 of 13929 strings)
2022-06-23 10:20:38 +02:00
Jiri Zizkin Zizka
721123fbca Translated using Weblate (Czech)
Currently translated at 95.4% (13298 of 13929 strings)
2022-06-21 17:50:31 +02:00
Lucas Araujo
c0aae189c9 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (13929 of 13929 strings)
2022-06-21 17:50:29 +02:00
Daniel Stasiak
c9619ea6a6 Translated using Weblate (Polish)
Currently translated at 99.6% (13886 of 13929 strings)
2022-06-21 17:50:27 +02:00
Jiri Zizkin Zizka
7a72521cd2 Translated using Weblate (Czech)
Currently translated at 95.2% (13272 of 13929 strings)
2022-06-20 12:23:52 +02:00
Lacrom
e5d43460db Translated using Weblate (French)
Currently translated at 89.1% (12421 of 13929 strings)
2022-06-20 12:23:50 +02:00
Jiri Zizkin Zizka
7743cd803e Translated using Weblate (Czech)
Currently translated at 94.5% (13175 of 13929 strings)
2022-06-17 00:20:30 +02:00
Kevin Rojas Costa Rica
96df9670b3 Translated using Weblate (Spanish)
Currently translated at 90.6% (12625 of 13929 strings)
2022-06-17 00:20:28 +02:00
Nut.andor
e179d0cdf6 Monsterstatus killcount 2022-06-12 08:08:24 +02:00
Nut.andor
f330a48f51 kill count stats by monster name instead of ID 2022-06-12 08:07:11 +02:00
Nut.andor
e6268fbd14 minor typo 2022-06-12 07:10:05 +02:00
Jiri Zizkin Zizka
ef0ee63d6f Translated using Weblate (Czech)
Currently translated at 93.7% (13056 of 13929 strings)
2022-06-11 01:21:31 +02:00
Jiri Zizkin Zizka
ab0487a900 Translated using Weblate (Czech)
Currently translated at 93.0% (12959 of 13929 strings)
2022-06-07 23:06:53 +02:00
Jiri Zizkin Zizka
4eb9db2532 Translated using Weblate (Czech)
Currently translated at 92.9% (12944 of 13929 strings)
2022-06-06 17:13:45 +02:00
Jiri Zizkin Zizka
c81ee4768c Translated using Weblate (Czech)
Currently translated at 92.6% (12906 of 13929 strings)
2022-06-04 22:29:22 +02:00
عادل نصري
a034f3aced Translated using Weblate (Arabic)
Currently translated at 10.3% (1438 of 13928 strings)
2022-06-04 20:27:24 +02:00
Jiri Zizkin Zizka
d446548863 Translated using Weblate (Czech)
Currently translated at 92.6% (12906 of 13929 strings)
2022-06-04 20:27:22 +02:00
Lacrom
37e66e6bf4 Translated using Weblate (French)
Currently translated at 89.1% (12420 of 13929 strings)
2022-06-04 20:27:20 +02:00
Jiri Zizkin Zizka
a6a456882d Translated using Weblate (Czech)
Currently translated at 92.1% (12842 of 13929 strings)
2022-06-01 06:29:03 +02:00
Jiri Zizkin Zizka
590cb7ed42 Translated using Weblate (Czech)
Currently translated at 91.9% (12805 of 13929 strings)
2022-05-31 00:20:07 +02:00
Jiri Zizkin Zizka
378d8b3185 Translated using Weblate (Czech)
Currently translated at 91.8% (12794 of 13929 strings)
2022-05-29 08:19:55 +02:00
Jiri Zizkin Zizka
69bb657b76 Translated using Weblate (Czech)
Currently translated at 91.6% (12770 of 13929 strings)
2022-05-28 01:19:57 +02:00
Jiri Zizkin Zizka
e012c6473e Translated using Weblate (Czech)
Currently translated at 91.6% (12761 of 13929 strings)
2022-05-26 14:45:19 +02:00
Jiri Zizkin Zizka
1b10ce2796 Translated using Weblate (Czech)
Currently translated at 90.9% (12668 of 13929 strings)
2022-05-23 23:19:36 +02:00
forheinn
98a97ba9d4 Translated using Weblate (Indonesian)
Currently translated at 17.3% (2412 of 13929 strings)
2022-05-23 23:19:34 +02:00
Roman Leo
85e6f1d6ba Translated using Weblate (German)
Currently translated at 100.0% (13929 of 13929 strings)
2022-05-23 23:19:33 +02:00
Artem
c9d28f2023 Translated using Weblate (Ukrainian)
Currently translated at 10.6% (1478 of 13929 strings)
2022-05-19 21:31:44 +02:00
Jiri Zizkin Zizka
2b216ec152 Translated using Weblate (Czech)
Currently translated at 90.7% (12643 of 13929 strings)
2022-05-19 21:31:42 +02:00
Roman Leo
0d203f5962 Translated using Weblate (German)
Currently translated at 99.4% (13858 of 13929 strings)
2022-05-19 21:31:40 +02:00
Никита
2a3400baa9 Translated using Weblate (Ukrainian)
Currently translated at 10.6% (1477 of 13929 strings)
2022-05-19 10:50:35 +02:00
Artem
fadf1a91a0 Translated using Weblate (Ukrainian)
Currently translated at 10.6% (1477 of 13929 strings)
2022-05-19 10:50:34 +02:00
Никита
2c4280bb9c Translated using Weblate (Ukrainian)
Currently translated at 10.5% (1473 of 13929 strings)
2022-05-19 10:46:13 +02:00
Artem
7a3d9ee354 Translated using Weblate (Ukrainian)
Currently translated at 10.5% (1473 of 13929 strings)
2022-05-19 10:46:12 +02:00
Artem
223180f822 Translated using Weblate (Ukrainian)
Currently translated at 10.5% (1470 of 13929 strings)
2022-05-19 10:25:02 +02:00
Никита
27ae0979a0 Translated using Weblate (Ukrainian)
Currently translated at 10.5% (1470 of 13929 strings)
2022-05-19 10:25:01 +02:00
Никита
c8aab8d383 Translated using Weblate (Ukrainian)
Currently translated at 10.5% (1469 of 13929 strings)
2022-05-19 10:21:46 +02:00
Artem
dab311041c Translated using Weblate (Ukrainian)
Currently translated at 10.5% (1469 of 13929 strings)
2022-05-19 10:21:45 +02:00
Никита
2bbb56d2ca Translated using Weblate (Ukrainian)
Currently translated at 10.5% (1468 of 13929 strings)
2022-05-19 10:09:26 +02:00
Artem
4ed9a78b82 Translated using Weblate (Ukrainian)
Currently translated at 10.5% (1468 of 13929 strings)
2022-05-19 10:09:26 +02:00
Artem
b2f6e46959 Translated using Weblate (Ukrainian)
Currently translated at 10.5% (1467 of 13929 strings)
2022-05-19 10:08:33 +02:00
Никита
921c792135 Translated using Weblate (Ukrainian)
Currently translated at 10.5% (1467 of 13929 strings)
2022-05-19 10:08:32 +02:00
Artem
08aba800ca Translated using Weblate (Ukrainian)
Currently translated at 10.5% (1466 of 13929 strings)
2022-05-19 10:06:58 +02:00
Никита
c62c71e64e Translated using Weblate (Ukrainian)
Currently translated at 10.5% (1466 of 13929 strings)
2022-05-19 10:06:57 +02:00
Artem
a7ce535569 Translated using Weblate (Ukrainian)
Currently translated at 10.5% (1463 of 13929 strings)
2022-05-19 10:04:19 +02:00
Никита
55237a6d1b Translated using Weblate (Ukrainian)
Currently translated at 10.5% (1463 of 13929 strings)
2022-05-19 10:04:18 +02:00
Jiri Zizkin Zizka
edd475d765 Translated using Weblate (Czech)
Currently translated at 90.2% (12576 of 13929 strings)
2022-05-18 02:40:56 +02:00
Artem
23d476c51d Translated using Weblate (Ukrainian)
Currently translated at 100.0% (581 of 581 strings)
2022-05-17 22:18:32 +02:00
Никита
a825707748 Translated using Weblate (Ukrainian)
Currently translated at 10.4% (1461 of 13929 strings)
2022-05-17 22:18:32 +02:00
Artem
072e75e0fb Translated using Weblate (Ukrainian)
Currently translated at 10.4% (1461 of 13929 strings)
2022-05-17 22:18:31 +02:00
Jiri Zizkin Zizka
68c88c424e Translated using Weblate (Czech)
Currently translated at 90.1% (12555 of 13929 strings)
2022-05-17 22:18:30 +02:00
Artem
6ef7703cc9 Translated using Weblate (Ukrainian)
Currently translated at 10.4% (1459 of 13929 strings)
2022-05-16 23:07:37 +02:00
Никита
2047d2230f Translated using Weblate (Ukrainian)
Currently translated at 10.4% (1459 of 13929 strings)
2022-05-16 23:07:37 +02:00
Никита
0c938b1505 Translated using Weblate (Ukrainian)
Currently translated at 10.4% (1458 of 13929 strings)
2022-05-16 23:04:47 +02:00
Artem
559e01e6e9 Translated using Weblate (Ukrainian)
Currently translated at 10.4% (1458 of 13929 strings)
2022-05-16 23:04:46 +02:00
Никита
fa851fd05d Translated using Weblate (Ukrainian)
Currently translated at 10.4% (1457 of 13929 strings)
2022-05-16 23:04:26 +02:00
Artem
b812e7f3c2 Translated using Weblate (Ukrainian)
Currently translated at 10.4% (1457 of 13929 strings)
2022-05-16 23:04:25 +02:00
Jiri Zizkin Zizka
bd56757e7e Translated using Weblate (Czech)
Currently translated at 89.6% (12488 of 13929 strings)
2022-05-15 14:51:25 +02:00
Tanja Orme
ec8d851211 Translated using Weblate (Esperanto)
Currently translated at 0.7% (99 of 13928 strings)
2022-05-14 13:15:56 +02:00
Tanja Orme
81700155e6 Translated using Weblate (Esperanto)
Currently translated at 18.4% (107 of 581 strings)
2022-05-14 13:15:54 +02:00
Jiri Zizkin Zizka
6e12754d47 Translated using Weblate (Czech)
Currently translated at 89.3% (12446 of 13929 strings)
2022-05-08 18:34:57 +02:00
Lucas Araujo
0459c66b3d Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (13929 of 13929 strings)
2022-05-08 18:34:55 +02:00
Kerem Yavuz Kaya
daf4da54c4 Translated using Weblate (Turkish)
Currently translated at 38.6% (5381 of 13929 strings)
2022-05-07 05:12:13 +02:00
Juan Manuel Alcantar Ramirez
e809006eba Added translation using Weblate (Latin) 2022-05-05 13:44:35 +02:00
Jiri Zizkin Zizka
1775fa3ae1 Translated using Weblate (Czech)
Currently translated at 89.3% (12440 of 13929 strings)
2022-05-05 13:32:51 +02:00
Daniel Stasiak
bf49318d9b Translated using Weblate (Polish)
Currently translated at 99.6% (13886 of 13929 strings)
2022-05-05 13:32:48 +02:00
Aji
927fafd708 Translated using Weblate (Indonesian)
Currently translated at 17.2% (2404 of 13929 strings)
2022-05-05 13:32:45 +02:00
Jiri Zizkin Zizka
2afd109e4a Translated using Weblate (Czech)
Currently translated at 87.5% (12189 of 13929 strings)
2022-04-29 10:38:21 +02:00
Jiri Zizkin Zizka
765617ea52 Translated using Weblate (Czech)
Currently translated at 87.2% (12152 of 13929 strings)
2022-04-28 22:09:25 +02:00
Jiri Zizkin Zizka
35cf007569 Translated using Weblate (Czech)
Currently translated at 87.1% (12137 of 13929 strings)
2022-04-27 04:50:07 +02:00
Jiri Zizkin Zizka
54f358858b Translated using Weblate (Czech)
Currently translated at 87.1% (12136 of 13929 strings)
2022-04-25 13:10:54 +02:00
Jiri Zizkin Zizka
6cd22e3f63 Translated using Weblate (Czech)
Currently translated at 87.0% (12121 of 13929 strings)
2022-04-24 22:14:47 +02:00
Jiri Zizkin Zizka
a2cef1376d Translated using Weblate (Czech)
Currently translated at 86.0% (11984 of 13929 strings)
2022-04-23 16:33:23 +02:00
Jiri Zizkin Zizka
8d8ae8227b Translated using Weblate (Czech)
Currently translated at 85.4% (11908 of 13929 strings)
2022-04-23 00:41:20 +02:00
Lucas Araujo
cdefb95056 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (13929 of 13929 strings)
2022-04-23 00:41:18 +02:00
徐雪开
1f3a7e147f Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (581 of 581 strings)
2022-04-22 14:58:45 +02:00
徐雪开
062f2157c0 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (13929 of 13929 strings)
2022-04-22 14:58:44 +02:00
徐雪开
1a2087b2d3 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (13886 of 13929 strings)
2022-04-22 00:45:41 +02:00
Jiri Zizkin Zizka
f725349590 Translated using Weblate (Czech)
Currently translated at 85.4% (11905 of 13929 strings)
2022-04-21 21:47:00 +02:00
ilya
fc3c070a96 Translated using Weblate (Russian)
Currently translated at 100.0% (13929 of 13929 strings)
2022-04-21 21:46:58 +02:00
Jiri Zizkin Zizka
e06f10ca41 Translated using Weblate (Czech)
Currently translated at 84.7% (11811 of 13929 strings)
2022-04-19 18:12:13 +02:00
ilya
062469c955 Translated using Weblate (Russian)
Currently translated at 100.0% (13929 of 13929 strings)
2022-04-19 18:12:10 +02:00
Daniel Stasiak
c780518fc1 Translated using Weblate (Polish)
Currently translated at 99.6% (13884 of 13929 strings)
2022-04-19 18:12:08 +02:00
Meiru
a88d346325 Translated using Weblate (Japanese)
Currently translated at 100.0% (13929 of 13929 strings)
2022-04-19 18:12:06 +02:00
antonpaidoslalin
fb7af524e8 Translated using Weblate (Galician)
Currently translated at 9.8% (57 of 581 strings)
2022-04-18 01:11:55 +02:00
Jiri Zizkin Zizka
e6dfa8db68 Translated using Weblate (Czech)
Currently translated at 83.8% (11680 of 13929 strings)
2022-04-18 01:11:53 +02:00
Oleg
e491ab4abf Translated using Weblate (Russian)
Currently translated at 100.0% (13929 of 13929 strings)
2022-04-18 01:11:51 +02:00
ilya
a61038c74b Translated using Weblate (Russian)
Currently translated at 100.0% (13929 of 13929 strings)
2022-04-18 01:11:51 +02:00
Derik Douglas Jesus da Silva
bfc843f496 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (13929 of 13929 strings)
2022-04-18 01:11:49 +02:00
Daniel Stasiak
696d1f086e Translated using Weblate (Polish)
Currently translated at 99.5% (13861 of 13929 strings)
2022-04-18 01:11:47 +02:00
Meiru
7f0a9a1588 Translated using Weblate (Japanese)
Currently translated at 99.9% (13928 of 13929 strings)
2022-04-18 01:11:44 +02:00
Виталий
07568b15d0 Translated using Weblate (Russian)
Currently translated at 100.0% (13929 of 13929 strings)
2022-04-16 15:01:36 +02:00
ilya
17461da8f3 Translated using Weblate (Russian)
Currently translated at 100.0% (13929 of 13929 strings)
2022-04-16 15:01:35 +02:00
Виталий
964ec8a276 Translated using Weblate (Russian)
Currently translated at 100.0% (13929 of 13929 strings)
2022-04-16 15:00:21 +02:00
ilya
7d65ddf25d Translated using Weblate (Russian)
Currently translated at 100.0% (13929 of 13929 strings)
2022-04-16 15:00:20 +02:00
Виталий
2661badb73 Translated using Weblate (Russian)
Currently translated at 100.0% (13929 of 13929 strings)
2022-04-16 14:59:44 +02:00
ilya
9a3fbdf7d9 Translated using Weblate (Russian)
Currently translated at 100.0% (13929 of 13929 strings)
2022-04-16 14:59:44 +02:00
guru_meditation_no42
4f1dd93ba6 Add body count to monster info display 2021-04-08 18:19:24 -07:00
guru_meditation_no42
737736dca2 Track and report monster kills by name instead of id 2021-04-08 10:25:19 -07:00
guru_meditation_no42
0f32f09b0d Track and report monster kills by name instead of id 2021-04-08 09:32:50 -07:00
guru_meditation_no42
324be2768c Track and report monster kills by name instead of id 2021-04-07 22:30:08 -07:00
786 changed files with 325504 additions and 13657 deletions

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>

View File

@@ -1,8 +1,15 @@
# Android ignores
app/src/main/res
app/src/main/assets
gen/
bin/
target/
local.properties
app/build/intermediates/
build/
debug/
release/
.gradle/
#IntelliJ
.idea/
@@ -14,3 +21,35 @@ out/test/
# Other
.metadata
.svn/
#copied from https://github.com/github/gitignore/blob/main/Gradle.gitignore
.gradle
**/build/
!src/**/build/
# Ignore Gradle GUI config
gradle-app.setting
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
# Avoid ignore Gradle wrappper properties
!gradle-wrapper.properties
# Cache of project
.gradletasknamecache
# Eclipse Gradle plugin generated files
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath
#copied from https://github.com/github/gitignore/blob/main/Gradle.gitignore
/AndorsTrail/.gradle
/AndorsTrail/gradle/wrapper
/AndorsTrail/app/build/
/AndorsTrail/app/debug/
/AndorsTrail/app/release/

Binary file not shown.

View File

View File

6
AndorsTrail/.idea/compiler.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" />
</component>
</project>

20
AndorsTrail/.idea/gradle.xml generated Normal file
View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="1.8" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>

25
AndorsTrail/.idea/jarRepositories.xml generated Normal file
View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
<remote-repository>
<option name="id" value="Google" />
<option name="name" value="Google" />
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
</remote-repository>
</component>
</project>

10
AndorsTrail/.idea/misc.xml generated Normal file
View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>

6
AndorsTrail/.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>

166
AndorsTrail/.idea/workspace.xml generated Normal file
View File

@@ -0,0 +1,166 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="NONE" />
</component>
<component name="ChangeListManager">
<list default="true" id="fb7bf33b-30cf-40b9-a238-3e2f6f604a8f" name="Changes" comment="" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="device_and_snapshot_combo_box_target[C:\Users\chris\.android\avd\Nexus_5_API_30.avd]" />
<component name="ExternalProjectsData">
<projectState path="$PROJECT_DIR$">
<ProjectState />
</projectState>
</component>
<component name="ExternalProjectsManager">
<system id="GRADLE">
<state>
<projects_view>
<tree_state>
<expand>
<path>
<item name="" type="6a2764b6:ExternalProjectsStructure$RootNode" />
<item name="AndorsTrail" type="f1a62948:ProjectNode" />
</path>
</expand>
<select />
</tree_state>
</projects_view>
</state>
</system>
</component>
<component name="GenerateSignedApkSettings">
<option name="KEY_STORE_PATH" value="C:\AT\sec\AndorsTrail.keystore" />
<option name="KEY_ALIAS" value="andorstrail" />
<option name="REMEMBER_PASSWORDS" value="true" />
<option name="BUILD_TARGET_KEY" value="apk" />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
</component>
<component name="ProjectId" id="2FG0LqADbxm6Q1t3yQ9BlX5APzJ" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="ApkExportedModule" value="AndorsTrail.app" />
<property name="ExportApk.ApkPath" value="C:\AT\AndorsTrailRelease\andors-trail\AndorsTrail\app" />
<property name="ExportApk.BuildVariants" value="release" />
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="RunOnceActivity.cidr.known.project.marker" value="true" />
<property name="android.sdk.path" value="$USER_HOME$/AppData/Local/Android/Sdk" />
<property name="cidr.known.project.marker" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../../../sec/AndorsTrail.keystore" />
<property name="settings.editor.selected.configurable" value="device.file.explorer" />
<property name="show.inlinked.gradle.project.popup" value="false" />
</component>
<component name="RunManager">
<configuration name="&lt;template&gt;" type="Applet" default="true" selected="false">
<option name="MAIN_CLASS_NAME" />
<option name="HTML_FILE_NAME" />
<option name="HTML_USED" value="false" />
<option name="WIDTH" value="400" />
<option name="HEIGHT" value="300" />
<option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
<option name="VM_PARAMETERS" />
</configuration>
<configuration name="&lt;template&gt;" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" default="true" selected="false">
<option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
</configuration>
<configuration name="app" type="AndroidRunConfigurationType" factoryName="Android App">
<module name="AndorsTrail.app" />
<option name="DEPLOY" value="true" />
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
<option name="DEPLOY_AS_INSTANT" value="false" />
<option name="ARTIFACT_NAME" value="" />
<option name="PM_INSTALL_OPTIONS" value="" />
<option name="ALL_USERS" value="false" />
<option name="ALWAYS_INSTALL_WITH_PM" value="false" />
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="" />
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
<option name="MODE" value="default_activity" />
<option name="CLEAR_LOGCAT" value="false" />
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="false" />
<option name="INSPECTION_WITHOUT_ACTIVITY_RESTART" value="false" />
<option name="TARGET_SELECTION_MODE" value="DEVICE_AND_SNAPSHOT_COMBO_BOX" />
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
<option name="DEBUGGER_TYPE" value="Auto" />
<Auto>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Auto>
<Hybrid>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Hybrid>
<Java />
<Native>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Native>
<Profilers>
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
<option name="STARTUP_PROFILING_ENABLED" value="false" />
<option name="STARTUP_CPU_PROFILING_ENABLED" value="false" />
<option name="STARTUP_CPU_PROFILING_CONFIGURATION_NAME" value="Java/Kotlin Method Sample (legacy)" />
<option name="STARTUP_NATIVE_MEMORY_PROFILING_ENABLED" value="false" />
<option name="NATIVE_MEMORY_SAMPLE_RATE_BYTES" value="2048" />
</Profilers>
<option name="DEEP_LINK" value="" />
<option name="ACTIVITY_CLASS" value="" />
<option name="SEARCH_ACTIVITY_IN_GLOBAL_SCOPE" value="false" />
<option name="SKIP_ACTIVITY_VALIDATION" value="false" />
<method v="2" />
</configuration>
<configuration default="true" type="Application" factoryName="Application">
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration default="true" type="JUnit" factoryName="JUnit">
<option name="TEST_OBJECT" value="class" />
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration default="true" type="TestNG">
<option name="TEST_OBJECT" value="CLASS" />
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
<properties />
<listeners />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="fb7bf33b-30cf-40b9-a238-3e2f6f604a8f" name="Changes" comment="" />
<created>1664103080085</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1664103080085</updated>
</task>
<servers />
</component>
</project>

View File

@@ -1,33 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>AndorsTrail</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="EclipseModuleManager" forced_jdk="true">
<conelement value="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK" />
<conelement value="com.android.ide.eclipse.adt.LIBRARIES" />
<src_description expected_position="1">
<src_folder value="file://$MODULE_DIR$/src" expected_position="0" />
<src_folder value="file://$MODULE_DIR$/gen" expected_position="1" />
</src_description>
</component>
<component name="FacetManager">
<facet type="android" name="Android">
<configuration />
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/bin/classes" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/libs/android-support-v4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>

View File

@@ -1,79 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.gpl.rpg.AndorsTrail"
android:versionCode="64"
android:versionName="0.7.17"
android:installLocation="auto"
>
<uses-sdk
android:minSdkVersion="4"
android:targetSdkVersion="30"
/>
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"
/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
android:name="com.gpl.rpg.AndorsTrail.AndorsTrailApplication"
android:label="@string/app_name"
android:icon="@drawable/icon"
android:description="@string/app_description"
android:allowBackup="true"
android:theme="@style/AndorsTrailTheme_Blue"
android:requestLegacyExternalStorage="true"
android:hasFragileUserData="true"
android:preserveLegacyExternalStorage="true"
>
<activity
android:name="com.gpl.rpg.AndorsTrail.activity.StartScreenActivity"
android:clearTaskOnLaunch="true"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.gpl.rpg.AndorsTrail.activity.MainActivity"
android:label="@string/app_name"
android:theme="@style/AndorsTrailTheme_Blue.NoBackground"
/>
<activity android:name="com.gpl.rpg.AndorsTrail.activity.HeroinfoActivity" />
<activity android:name="com.gpl.rpg.AndorsTrail.activity.MonsterInfoActivity" android:theme="@style/AndorsTrailDialogTheme_Blue" />
<activity android:name="com.gpl.rpg.AndorsTrail.activity.ItemInfoActivity" android:theme="@style/AndorsTrailDialogTheme_Blue" />
<activity android:name="com.gpl.rpg.AndorsTrail.activity.LevelUpActivity" android:theme="@style/AndorsTrailDialogTheme_Blue" />
<activity android:name="com.gpl.rpg.AndorsTrail.activity.MonsterEncounterActivity" android:theme="@style/AndorsTrailDialogTheme_Blue" />
<activity android:name="com.gpl.rpg.AndorsTrail.activity.ConversationActivity" android:theme="@style/AndorsTrailDialogTheme_Blue" />
<activity android:name="com.gpl.rpg.AndorsTrail.activity.ShopActivity" />
<activity android:name="com.gpl.rpg.AndorsTrail.activity.AboutActivity" />
<activity android:name="com.gpl.rpg.AndorsTrail.activity.LoadingActivity" />
<activity android:name="com.gpl.rpg.AndorsTrail.activity.Preferences" />
<activity android:name="com.gpl.rpg.AndorsTrail.activity.LoadSaveActivity" android:theme="@style/AndorsTrailDialogTheme_Blue" />
<activity android:name="com.gpl.rpg.AndorsTrail.activity.ActorConditionInfoActivity" android:theme="@style/AndorsTrailDialogTheme_Blue" />
<activity android:name="com.gpl.rpg.AndorsTrail.activity.BulkSelectionInterface" android:theme="@style/AndorsTrailDialogTheme_Blue" />
<activity android:name="com.gpl.rpg.AndorsTrail.activity.SkillInfoActivity" android:theme="@style/AndorsTrailDialogTheme_Blue" />
<activity android:name="com.gpl.rpg.AndorsTrail.activity.DisplayWorldMapActivity" />
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.gpl.rpg.AndorsTrail.fileprovider"
android:grantUriPermissions="true"
android:exported="false">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/fileprovider" />
</provider>
</application>
</manifest>

View File

@@ -0,0 +1,23 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.gpl.rpg.AndorsTrail"
minSdkVersion 14
targetSdkVersion 30
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
implementation 'com.android.support:support-v4:28.0.0'
}

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="utf-8"?>
<lint>
<issue id="MissingTranslation" severity="ignore" />
<issue id="TypographyDashes" severity="ignore" />

View File

@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.gpl.rpg.AndorsTrail"
android:versionCode="66"
android:versionName="0.8.2"
android:installLocation="auto"
>
<uses-sdk
android:minSdkVersion="4"
android:targetSdkVersion="30"
/>
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"
/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
android:name=".AndorsTrailApplication"
android:label="@string/app_name"
android:icon="@drawable/icon"
android:description="@string/app_description"
android:allowBackup="true"
android:theme="@style/AndorsTrailTheme_Blue"
android:requestLegacyExternalStorage="true"
android:hasFragileUserData="true"
android:preserveLegacyExternalStorage="true"
>
<activity
android:name=".activity.StartScreenActivity"
android:clearTaskOnLaunch="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activity.MainActivity"
android:label="@string/app_name"
android:theme="@style/AndorsTrailTheme_Blue.NoBackground"
/>
<activity android:name=".activity.HeroinfoActivity" />
<activity android:name=".activity.MonsterInfoActivity" android:theme="@style/AndorsTrailDialogTheme_Blue" />
<activity android:name=".activity.ItemInfoActivity" android:theme="@style/AndorsTrailDialogTheme_Blue" />
<activity android:name=".activity.LevelUpActivity" android:theme="@style/AndorsTrailDialogTheme_Blue" />
<activity android:name=".activity.MonsterEncounterActivity" android:theme="@style/AndorsTrailDialogTheme_Blue" />
<activity android:name=".activity.ConversationActivity" android:theme="@style/AndorsTrailDialogTheme_Blue" />
<activity android:name=".activity.ShopActivity" />
<activity android:name=".activity.AboutActivity" />
<activity android:name=".activity.LoadingActivity" />
<activity android:name=".activity.Preferences" />
<activity android:name=".activity.LoadSaveActivity" android:theme="@style/AndorsTrailDialogTheme_Blue" />
<activity android:name=".activity.ActorConditionInfoActivity" android:theme="@style/AndorsTrailDialogTheme_Blue" />
<activity android:name=".activity.BulkSelectionInterface" android:theme="@style/AndorsTrailDialogTheme_Blue" />
<activity android:name=".activity.SkillInfoActivity" android:theme="@style/AndorsTrailDialogTheme_Blue" />
<activity android:name=".activity.DisplayWorldMapActivity" />
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.gpl.rpg.AndorsTrail.fileprovider"
android:grantUriPermissions="true"
android:exported="false">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/fileprovider" />
</provider>
</application>
</manifest>

View File

@@ -28,11 +28,11 @@ public final class AndorsTrailApplication extends Application {
public static final boolean DEVELOPMENT_FASTSPEED = false;
public static final boolean DEVELOPMENT_VALIDATEDATA = false;
public static final boolean DEVELOPMENT_DEBUGMESSAGES = false;
public static final String CURRENT_VERSION_DISPLAY = "0.7.17";
public static final String CURRENT_VERSION_DISPLAY = "0.8.2";
public static final boolean IS_RELEASE_VERSION = !CURRENT_VERSION_DISPLAY.matches(".*[a-d].*");
public static final boolean DEVELOPMENT_INCOMPATIBLE_SAVEGAMES = DEVELOPMENT_DEBUGRESOURCES || DEVELOPMENT_DEBUGBUTTONS || DEVELOPMENT_FASTSPEED || !IS_RELEASE_VERSION;
public static final int DEVELOPMENT_INCOMPATIBLE_SAVEGAME_VERSION = 999;
public static final int CURRENT_VERSION = DEVELOPMENT_INCOMPATIBLE_SAVEGAMES ? DEVELOPMENT_INCOMPATIBLE_SAVEGAME_VERSION : 64;
public static final int CURRENT_VERSION = DEVELOPMENT_INCOMPATIBLE_SAVEGAMES ? DEVELOPMENT_INCOMPATIBLE_SAVEGAME_VERSION : 66;
private final AndorsTrailPreferences preferences = new AndorsTrailPreferences();
private WorldContext world = new WorldContext();

View File

@@ -2,6 +2,7 @@ package com.gpl.rpg.AndorsTrail;
import android.content.Context;
import android.content.SharedPreferences;
import android.net.Uri;
import android.preference.PreferenceManager;
public final class AndorsTrailPreferences {
@@ -61,6 +62,8 @@ public final class AndorsTrailPreferences {
public boolean showQuickslotsWhenToolboxIsVisible = false;
public String language = "default";
public Uri exportImportFolderPath;
public int selectedTheme = 0;
public void read(final Context androidContext) {

View File

@@ -0,0 +1,341 @@
package com.gpl.rpg.AndorsTrail.activity;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
import com.gpl.rpg.AndorsTrail.R;
import com.gpl.rpg.AndorsTrail.context.ControllerContext;
import com.gpl.rpg.AndorsTrail.context.WorldContext;
import com.gpl.rpg.AndorsTrail.controller.Constants;
import com.gpl.rpg.AndorsTrail.model.item.ItemType;
import com.gpl.rpg.AndorsTrail.model.map.MapObject;
import com.gpl.rpg.AndorsTrail.model.map.PredefinedMap;
import com.gpl.rpg.AndorsTrail.view.MainView;
import android.content.Context;
import android.content.res.Resources;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.RelativeLayout;
import android.widget.Toast;
public final class DebugInterface {
private final ControllerContext controllerContext;
private final MainActivity mainActivity;
private final Resources res;
private final WorldContext world;
private DebugButton[] buttons;
private List<DebugButton> tpButtons = new ArrayList<DebugButton>();
private List<DebugButton> tpButtons2 = new ArrayList<DebugButton>();
public DebugInterface(ControllerContext controllers, WorldContext world, MainActivity mainActivity) {
this.controllerContext = controllers;
this.world = world;
this.res = mainActivity.getResources();
this.mainActivity = mainActivity;
}
public void addDebugButtons() {
if (!AndorsTrailApplication.DEVELOPMENT_DEBUGBUTTONS) return;
List<DebugButton> buttonList = new ArrayList<DebugButton>();
buttonList.addAll(Arrays.asList(new DebugButton[] {
new DebugButton("dbg", new OnClickListener() {
boolean hidden = false;
@Override
public void onClick(View arg0) {
hidden = !hidden;
for (int i = 1; i < buttons.length; i++) {
buttons[i].b.setVisibility(hidden ? View.GONE : View.VISIBLE);
}
for (DebugButton b : tpButtons) {
b.b.setVisibility(View.GONE);
}
for (DebugButton b : tpButtons2) {
b.b.setVisibility(View.GONE);
}
}
})
,new DebugButton("teleport", new OnClickListener() {
public void onClick(View arg0) {
for (int i = 0; i < buttons.length; i++) {
buttons[i].b.setVisibility(View.GONE);
}
for (DebugButton tpButton : tpButtons) {
tpButton.b.setVisibility(View.VISIBLE);
}
}
})
,new DebugButton("dmg", new OnClickListener() {
@Override
public void onClick(View arg0) {
world.model.player.damagePotential.set(500, 500);
world.model.player.attackChance = 500;
world.model.player.attackCost = 1;
showToast(mainActivity, "DEBUG: damagePotential=500, chance=500%, cost=1", Toast.LENGTH_SHORT);
}
})
/*,new DebugButton("dmg=1", new OnClickListener() {
@Override
public void onClick(View arg0) {
world.model.player.damagePotential.set(1, 1);
showToast(mainActivity, "DEBUG: damagePotential=1", Toast.LENGTH_SHORT);
}
})*/
,new DebugButton("itm", new OnClickListener() {
@Override
public void onClick(View arg0) {
for (ItemType item : world.itemTypes.UNITTEST_getAllItemTypes().values()) {
world.model.player.inventory.addItem(item, 10);
}
world.model.player.inventory.gold += 50000;
showToast(mainActivity, "DEBUG: added items", Toast.LENGTH_SHORT);
}
})
,new DebugButton("xp", new OnClickListener() {
@Override
public void onClick(View arg0) {
controllerContext.actorStatsController.addExperience(10000);
showToast(mainActivity, "DEBUG: given 10000 exp", Toast.LENGTH_SHORT);
}
})
,new DebugButton("rst", new OnClickListener() {
@Override
public void onClick(View arg0) {
for(PredefinedMap map : world.maps.getAllMaps()) {
map.resetTemporaryData();
}
showToast(mainActivity, "DEBUG: maps respawned", Toast.LENGTH_SHORT);
}
})
,new DebugButton("hp", new OnClickListener() {
@Override
public void onClick(View arg0) {
world.model.player.baseTraits.maxHP = 500;
world.model.player.health.max = world.model.player.baseTraits.maxHP;
controllerContext.actorStatsController.setActorMaxHealth(world.model.player);
world.model.player.conditions.clear();
showToast(mainActivity, "DEBUG: hp set to max", Toast.LENGTH_SHORT);
}
})
,new DebugButton("skl", new OnClickListener() {
@Override
public void onClick(View arg0) {
world.model.player.availableSkillIncreases += 10;
showToast(mainActivity, "DEBUG: 10 skill points", Toast.LENGTH_SHORT);
}
})
,new DebugButton("spd", new OnClickListener() {
boolean fast = Constants.MINIMUM_INPUT_INTERVAL == Constants.MINIMUM_INPUT_INTERVAL_FAST;
@Override
public void onClick(View arg0) {
fast = !fast;
if (fast) {
Constants.MINIMUM_INPUT_INTERVAL = Constants.MINIMUM_INPUT_INTERVAL_FAST;
} else {
Constants.MINIMUM_INPUT_INTERVAL = Constants.MINIMUM_INPUT_INTERVAL_STD;
}
MainView.SCROLL_DURATION = Constants.MINIMUM_INPUT_INTERVAL;
AndorsTrailApplication.getApplicationFromActivity(mainActivity).getControllerContext().movementController.resetMovementHandler();
}
})
,new DebugButton("map", new OnClickListener() {
@Override
public void onClick(View arg0) {
showToast(mainActivity, "DEBUG: map=" + world.model.currentMaps.map.name , Toast.LENGTH_SHORT);
}
})
}));
tpButtons.addAll(Arrays.asList(new DebugButton[] {
new DebugButton("teleport", new OnClickListener() {
@Override
public void onClick(View arg0) {
for (DebugButton tpButton : tpButtons2) {
tpButton.b.setVisibility(View.VISIBLE);
}
for (DebugButton tpButton : tpButtons) {
tpButton.b.setVisibility(View.GONE);
}
}
})
,new DebugButton("cg", new OnClickListener() {
@Override
public void onClick(View arg0) {
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "crossglen", "hall", 0, 0);
}
})
,new DebugButton("vg", new OnClickListener() {
@Override
public void onClick(View arg0) {
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "vilegard_s", "tavern", 0, 0);
}
})
,new DebugButton("cr", new OnClickListener() {
@Override
public void onClick(View arg0) {
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "houseatcrossroads4", "down", 0, 0);
}
})
,new DebugButton("lf", new OnClickListener() {
@Override
public void onClick(View arg0) {
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "loneford9", "south", 0, 0);
}
})
,new DebugButton("fh", new OnClickListener() {
@Override
public void onClick(View arg0) {
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "fallhaven_ne", "clothes", 0, 0);
}
})
,new DebugButton("prm", new OnClickListener() {
@Override
public void onClick(View arg0) {
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "blackwater_mountain29", "south", 0, 0);
}
})
,new DebugButton("bwm", new OnClickListener() {
@Override
public void onClick(View arg0) {
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "blackwater_mountain43", "south", 0, 0);
}
})
,new DebugButton("rmg", new OnClickListener() {
@Override
public void onClick(View arg0) {
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "remgard0", "east", 0, 0);
}
})
,new DebugButton("chr", new OnClickListener() {
@Override
public void onClick(View arg0) {
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "waytolostmine2", "minerhouse4", 0, 0);
}
})
,new DebugButton("ldr", new OnClickListener() {
@Override
public void onClick(View arg0) {
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "lodarhouse0", "lodarhouse", 0, 0);
}
})
,new DebugButton("sf", new OnClickListener() {
@Override
public void onClick(View arg0) {
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "wild20", "south2", 0, 0);
}
})
,new DebugButton("gm", new OnClickListener() {
@Override
public void onClick(View arg0) {
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "guynmart_wood_1", "farmhouse", 0, 0);
}
})
}));
buttonList.addAll(tpButtons);
tpButtons2.addAll(Arrays.asList(new DebugButton[] {
new DebugButton("teleport", new OnClickListener() {
@Override
public void onClick(View arg0) {
for (int i = 0; i < buttons.length; i++) {
buttons[i].b.setVisibility(View.VISIBLE);
}
for (DebugButton tpButton : tpButtons) {
tpButton.b.setVisibility(View.GONE);
}
for (DebugButton tpButton : tpButtons2) {
tpButton.b.setVisibility(View.GONE);
}
}
})
,new DebugButton("brv", new OnClickListener() {
@Override
public void onClick(View arg0) {
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "brimhaven4", "south2", 0, 0);
}
})
,new DebugButton("aru", new OnClickListener() {
@Override
public void onClick(View arg0) {
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "mountainlake5", "north", 0, 0);
}
})
,new DebugButton("ws", new OnClickListener() {
@Override
public void onClick(View arg0) {
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "woodsettlement0", "east", 0, 0);
}
})
,new DebugButton("sul", new OnClickListener() {
@Override
public void onClick(View arg0) {
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "sullengard2", "south", 0, 0);
}
})
}));
buttonList.addAll(tpButtons2);
buttons = buttonList.toArray(new DebugButton[buttonList.size()]);
addDebugButtons(buttons);
for (DebugButton b : tpButtons) {
b.b.setVisibility(View.GONE);
}
for (DebugButton b : tpButtons2) {
b.b.setVisibility(View.GONE);
}
}
private void showToast(Context context, String msg, int duration) {
Toast.makeText(context, msg, duration).show();
}
private static class DebugButton {
public final String text;
public final OnClickListener listener;
public Button b = null;
public DebugButton(String text, OnClickListener listener) {
this.text = text;
this.listener = listener;
}
public void makeButton(Context c, int id) {
b = new Button(c);
b.setText(text);
b.setTextSize(10);//res.getDimension(R.dimen.actionbar_text));
b.setId(id);
b.setOnClickListener(listener);
}
}
private void addDebugButton(DebugButton button, int id, RelativeLayout layout) {
if (!AndorsTrailApplication.DEVELOPMENT_DEBUGBUTTONS) return;
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, res.getDimensionPixelSize(R.dimen.smalltext_buttonheight));
if (id == 1)
lp.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
else
lp.addRule(RelativeLayout.RIGHT_OF, id - 1);
lp.addRule(RelativeLayout.ABOVE, R.id.main_statusview);
button.makeButton(mainActivity, id);
button.b.setLayoutParams(lp);
layout.addView(button.b);
}
private void addDebugButtons(DebugButton[] buttons) {
if (!AndorsTrailApplication.DEVELOPMENT_DEBUGBUTTONS) return;
if (buttons == null || buttons.length <= 0) return;
RelativeLayout layout = (RelativeLayout) mainActivity.findViewById(R.id.main_container);
int id = 1;
for (DebugButton b : buttons) {
addDebugButton(b, id, layout);
++id;
}
}
}

View File

@@ -0,0 +1,684 @@
package com.gpl.rpg.AndorsTrail.activity;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import android.Manifest;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.Dialog;
import android.content.ClipData;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.RequiresApi;
import android.support.v4.provider.DocumentFile;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
import com.gpl.rpg.AndorsTrail.AndorsTrailPreferences;
import com.gpl.rpg.AndorsTrail.R;
import com.gpl.rpg.AndorsTrail.controller.Constants;
import com.gpl.rpg.AndorsTrail.model.ModelContainer;
import com.gpl.rpg.AndorsTrail.resource.tiles.TileManager;
import com.gpl.rpg.AndorsTrail.savegames.Savegames;
import com.gpl.rpg.AndorsTrail.savegames.Savegames.FileHeader;
import com.gpl.rpg.AndorsTrail.util.AndroidStorage;
import com.gpl.rpg.AndorsTrail.util.ThemeHelper;
import com.gpl.rpg.AndorsTrail.view.CustomDialogFactory;
public final class LoadSaveActivity extends AndorsTrailBaseActivity implements OnClickListener {
private boolean isLoading = true;
//region special slot numbers
private static final int SLOT_NUMBER_CREATE_NEW_SLOT = -1;
public static final int SLOT_NUMBER_EXPORT_SAVEGAMES = -2;
public static final int SLOT_NUMBER_IMPORT_SAVEGAMES = -3;
public static final int SLOT_NUMBER_IMPORT_WORLDMAP = -4;
private static final int SLOT_NUMBER_FIRST_SLOT = 1;
//endregion
private ModelContainer model;
private TileManager tileManager;
private AndorsTrailPreferences preferences;
@Override
public void onCreate(Bundle savedInstanceState) {
setTheme(ThemeHelper.getDialogTheme());
super.onCreate(savedInstanceState);
final AndorsTrailApplication app = AndorsTrailApplication.getApplicationFromActivity(this);
app.setWindowParameters(this);
this.model = app.getWorld().model;
this.preferences = app.getPreferences();
this.tileManager = app.getWorld().tileManager;
String loadsave = getIntent().getData().getLastPathSegment();
isLoading = (loadsave.equalsIgnoreCase("load"));
setContentView(R.layout.loadsave);
TextView tv = (TextView) findViewById(R.id.loadsave_title);
if (isLoading) {
tv.setCompoundDrawablesWithIntrinsicBounds(android.R.drawable.ic_menu_search, 0, 0, 0);
tv.setText(R.string.loadsave_title_load);
} else {
tv.setCompoundDrawablesWithIntrinsicBounds(android.R.drawable.ic_menu_save, 0, 0, 0);
tv.setText(R.string.loadsave_title_save);
}
ViewGroup slotList = (ViewGroup) findViewById(R.id.loadsave_slot_list);
Button slotTemplateButton = (Button) findViewById(R.id.loadsave_slot_n);
LayoutParams params = slotTemplateButton.getLayoutParams();
slotList.removeView(slotTemplateButton);
ViewGroup newSlotContainer = (ViewGroup) findViewById(R.id.loadsave_save_to_new_slot_container);
Button createNewSlot = (Button) findViewById(R.id.loadsave_save_to_new_slot);
Button exportSaves = (Button) findViewById(R.id.loadsave_export_save);
Button importSaves = (Button) findViewById(R.id.loadsave_import_save);
Button importWorldmap = (Button) findViewById(R.id.loadsave_import_worldmap);
exportSaves.setTag(SLOT_NUMBER_EXPORT_SAVEGAMES);
importSaves.setTag(SLOT_NUMBER_IMPORT_SAVEGAMES);
importWorldmap.setTag(SLOT_NUMBER_IMPORT_WORLDMAP);
ViewGroup exportContainer = (ViewGroup) findViewById(R.id.loadsave_export_save_container);
ViewGroup importContainer = (ViewGroup) findViewById(R.id.loadsave_import_save_container);
ViewGroup importWorldmapContainer = (ViewGroup) findViewById(R.id.loadsave_import_worldmap_container);
addSavegameSlotButtons(slotList, params, Savegames.getUsedSavegameSlots(this));
checkAndRequestPermissions();
if (!isLoading) {
createNewSlot.setTag(SLOT_NUMBER_CREATE_NEW_SLOT);
createNewSlot.setOnClickListener(this);
newSlotContainer.setVisibility(View.VISIBLE);
exportContainer.setVisibility(View.GONE);
importContainer.setVisibility(View.GONE);
importWorldmapContainer.setVisibility(View.GONE);
} else {
newSlotContainer.setVisibility(View.GONE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
exportSaves.setOnClickListener(this);
importSaves.setOnClickListener(this);
importWorldmap.setOnClickListener(this);
exportContainer.setVisibility(View.VISIBLE);
importContainer.setVisibility(View.VISIBLE);
importWorldmapContainer.setVisibility(View.VISIBLE);
}
}
}
private static final int READ_EXTERNAL_STORAGE_REQUEST = 1;
private static final int WRITE_EXTERNAL_STORAGE_REQUEST = 2;
@TargetApi(23)
private void checkAndRequestPermissions() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q) {
if (getApplicationContext().checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
this.requestPermissions(new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, READ_EXTERNAL_STORAGE_REQUEST);
}
if (getApplicationContext().checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
this.requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, WRITE_EXTERNAL_STORAGE_REQUEST);
}
}
}
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
if (grantResults.length > 0 && grantResults[0] != PackageManager.PERMISSION_GRANTED) {
Toast.makeText(this, R.string.storage_permissions_mandatory, Toast.LENGTH_LONG).show();
((AndorsTrailApplication) getApplication()).discardWorld();
finish();
}
}
private void addSavegameSlotButtons(ViewGroup parent, LayoutParams params, List<Integer> usedSavegameSlots) {
int unused = 1;
for (int slot : usedSavegameSlots) {
final FileHeader header = Savegames.quickload(this, slot);
if (header == null) continue;
while (unused < slot) {
Button b = new Button(this);
b.setLayoutParams(params);
b.setTag(unused);
b.setOnClickListener(this);
b.setText(getString(R.string.loadsave_empty_slot, unused));
tileManager.setImageViewTileForPlayer(getResources(), b, header.iconID);
parent.addView(b, params);
unused++;
}
unused++;
Button b = new Button(this);
b.setLayoutParams(params);
b.setTag(slot);
b.setOnClickListener(this);
b.setText(slot + ". " + header.describe());
tileManager.setImageViewTileForPlayer(getResources(), b, header.iconID);
parent.addView(b, params);
}
}
private void completeLoadSaveActivity(int slot) {
Intent i = new Intent();
if (slot == SLOT_NUMBER_CREATE_NEW_SLOT) {
List<Integer> usedSlots = Savegames.getUsedSavegameSlots(this);
if (usedSlots.isEmpty())
slot = SLOT_NUMBER_FIRST_SLOT;
else slot = Collections.max(usedSlots) + 1;
} else if (slot == SLOT_NUMBER_EXPORT_SAVEGAMES
|| slot == SLOT_NUMBER_IMPORT_SAVEGAMES
|| slot == SLOT_NUMBER_IMPORT_WORLDMAP) {
i.putExtra("import_export", true);
} else if (slot < SLOT_NUMBER_FIRST_SLOT)
slot = SLOT_NUMBER_FIRST_SLOT;
i.putExtra("slot", slot);
setResult(Activity.RESULT_OK, i);
LoadSaveActivity.this.finish();
}
private String getConfirmOverwriteQuestion(int slot) {
if (isLoading)
return null;
return getConfirmOverwriteQuestionIgnoringLoading(slot);
}
private String getConfirmOverwriteQuestionIgnoringLoading(int slot) {
if (slot == SLOT_NUMBER_CREATE_NEW_SLOT)
return null;//creating a new savegame
if (!Savegames.getSlotFile(slot, this).exists())
return null;//nothing in slot to overwrite
if (preferences.displayOverwriteSavegame == AndorsTrailPreferences.CONFIRM_OVERWRITE_SAVEGAME_ALWAYS) {
return getString(R.string.loadsave_save_overwrite_confirmation_all);
}
if (preferences.displayOverwriteSavegame == AndorsTrailPreferences.CONFIRM_OVERWRITE_SAVEGAME_NEVER) {
return null;
}
final String currentPlayerName = model.player.getName();
final FileHeader header = Savegames.quickload(this, slot);
if (header == null) return null;
final String savedPlayerName = header.playerName;
if (currentPlayerName.equals(savedPlayerName)) return null; //if the names match
return getString(R.string.loadsave_save_overwrite_confirmation, savedPlayerName, currentPlayerName);
}
@Override
public void onClick(View view) {
final int slot = (Integer) view.getTag();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
switch (slot) {
case SLOT_NUMBER_IMPORT_WORLDMAP:
clickImportWorldmap();
return;
case SLOT_NUMBER_IMPORT_SAVEGAMES:
clickImportSaveGames();
return;
case SLOT_NUMBER_EXPORT_SAVEGAMES:
clickExportSaveGames();
return;
}
}
if (!isLoading
&& slot != SLOT_NUMBER_CREATE_NEW_SLOT
&& AndorsTrailApplication.CURRENT_VERSION == AndorsTrailApplication.DEVELOPMENT_INCOMPATIBLE_SAVEGAME_VERSION) {
if (!isOverwriteTargetInIncompatibleVersion(slot)) {
saveOrOverwriteSavegame(slot);
}
} else if (isLoading) {
loadSaveGame(slot);
} else {
saveOrOverwriteSavegame(slot);
}
}
private void saveOrOverwriteSavegame(int slot) {
final String message = getConfirmOverwriteQuestion(slot);
if (message != null) {
showConfirmoverwriteQuestion(slot, message);
} else {
completeLoadSaveActivity(slot);
}
}
private boolean isOverwriteTargetInIncompatibleVersion(int slot) {
final FileHeader header = Savegames.quickload(this, slot);
if (header != null && header.fileversion != AndorsTrailApplication.DEVELOPMENT_INCOMPATIBLE_SAVEGAME_VERSION) {
final Dialog d = CustomDialogFactory.createErrorDialog(this, "Overwriting not allowed", "You are currently using a development version of Andor's trail. Overwriting a regular savegame is not allowed in development mode.");
CustomDialogFactory.show(d);
return true;
}
return false;
}
//region Imports/Exports
private void exportSaveGames(Intent data) {
Uri uri = data.getData();
Context context = getApplicationContext();
ContentResolver resolver = AndorsTrailApplication.getApplicationFromActivity(this).getContentResolver();
File storageDir = AndroidStorage.getStorageDirectory(context, Constants.FILENAME_SAVEGAME_DIRECTORY);
DocumentFile source = DocumentFile.fromFile(storageDir);
DocumentFile target = DocumentFile.fromTreeUri(context, uri);
if (target == null) {
return;
}
DocumentFile[] files = source.listFiles();
boolean hasExistingFiles = false;
for (DocumentFile file :
files) {
String fileName = file.getName();
if (fileName == null)
continue;
DocumentFile existingFile = target.findFile(fileName);
if (existingFile != null) {
hasExistingFiles = true;
break;
}
}
if (hasExistingFiles) {
showConfirmOverwriteByExportQuestion(resolver, target, files);
} else {
exportSaveGamesFolderContentToFolder(resolver, target, files);
}
}
private void exportSaveGamesFolderContentToFolder(ContentResolver resolver, DocumentFile target, DocumentFile[] files) {
for (DocumentFile file : files) {
String fileName = file.getName();
DocumentFile existingFile = target.findFile(fileName);
boolean hasExistingFile = existingFile != null && existingFile.exists();
if (file.isFile()) {
try {
if (hasExistingFile)
existingFile.delete();
AndroidStorage.copyDocumentFileToNewOrExistingFile(file, resolver, target);
} catch (IOException e) {
e.printStackTrace();
}
} else if (file.isDirectory()) {
DocumentFile targetWorlmap = existingFile;
//if the folder exists already, put the files in the existing folder. (should not happen because of check earlier)
if (!hasExistingFile)
//create a new folder for the worldmap-files
targetWorlmap = target.createDirectory(Constants.FILENAME_WORLDMAP_DIRECTORY);
if (targetWorlmap == null)//Unable to create worldmap folder for some reason
continue;
DocumentFile[] worldmapFiles = file.listFiles();
for (DocumentFile f : worldmapFiles) {
try {
AndroidStorage.copyDocumentFileToNewOrExistingFile(f, resolver, targetWorlmap);
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
completeLoadSaveActivity(SLOT_NUMBER_EXPORT_SAVEGAMES);
}
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)
private void importSaveGames(Intent data) {
Uri uri = data.getData();
ClipData uris = data.getClipData();
if (uri == null && uris == null) {
//no file was selected
return;
}
Context context = getApplicationContext();
ContentResolver resolver = context.getContentResolver();
File storageDir = AndroidStorage.getStorageDirectory(context, Constants.FILENAME_SAVEGAME_DIRECTORY);
DocumentFile appSavegameFolder = DocumentFile.fromFile(storageDir);
List<Uri> uriList = new ArrayList<>();
if (uri != null) {
uriList.add(uri);
} else {
for (int i = 0; i < uris.getItemCount(); i++)
uriList.add(uris.getItemAt(i).getUri());
}
importSaveGamesFromUris(context, resolver, appSavegameFolder, uriList);
}
private void importSaveGamesFromUris(Context context, ContentResolver resolver, DocumentFile appSavegameFolder, List<Uri> uriList) {
int count = uriList.size();
ArrayList<DocumentFile> alreadyExistingFiles = new ArrayList<>();
ArrayList<DocumentFile> newFiles = new ArrayList<>();
for (int i = 0; i < count; i++) {
Uri item = uriList.get(i);
DocumentFile itemFile = DocumentFile.fromSingleUri(context, item);
boolean fileAlreadyExists = getExistsSavegameInOwnFiles(itemFile, appSavegameFolder);
if (fileAlreadyExists)
alreadyExistingFiles.add(itemFile);
else
newFiles.add(itemFile);
}
if (alreadyExistingFiles.size() > 0) {
showConfirmOverwriteByImportQuestion(resolver, appSavegameFolder, alreadyExistingFiles, newFiles);
} else {
importSaveGames(resolver, appSavegameFolder, newFiles);
}
}
private void importSaveGames(ContentResolver resolver, DocumentFile appSavegameFolder, List<DocumentFile> saveFiles) {
for (DocumentFile file : saveFiles) {
int slot = getSlotFromSavegameFileName(file.getName());
importSaveGameFile(resolver, appSavegameFolder, file, slot);
}
}
private void completeSavegameImportAndCheckIfDone(List<Integer> importsNeedingConfirmation, int slot) {
importsNeedingConfirmation.remove((Object) slot);
if (importsNeedingConfirmation.isEmpty()) {
completeLoadSaveActivity(SLOT_NUMBER_IMPORT_SAVEGAMES);
}
}
private boolean getExistsSavegameInOwnFiles(DocumentFile savegameFile, DocumentFile appSavegameFolder) {
if (savegameFile == null)
return false;
DocumentFile foundFile = appSavegameFolder.findFile(Objects.requireNonNull(savegameFile.getName()));
return foundFile != null && foundFile.exists();
}
private int getSlotFromSavegameFileName(String fileName) {
if (fileName == null || !fileName.startsWith(Constants.FILENAME_SAVEGAME_FILENAME_PREFIX)) {
//TODO: Maybe output a message that the file didn't have the right name?
return -1;
}
String slotStr = fileName.substring(Constants.FILENAME_SAVEGAME_FILENAME_PREFIX.length());
int slot;
try {
slot = Integer.parseInt(slotStr);
return slot;
} catch (NumberFormatException e) {
//TODO: Maybe output a message that the file didn't have the right name?
return -1;
}
}
private void importSaveGameFile(ContentResolver resolver, DocumentFile appSavegameFolder, DocumentFile itemFile, int slot) {
String targetName = Savegames.getSlotFileName(slot);
DocumentFile targetFile = getOrCreateDocumentFile(appSavegameFolder, targetName);
if (targetFile == null || !targetName.equals(targetFile.getName())) {
showErrorImportingSaveGameUnknown();//TODO: maybe replace with a more specific error message
return;
}
try {
AndroidStorage.copyDocumentFile(itemFile, resolver, targetFile);
} catch (IOException e) {
showErrorImportingSaveGameUnknown();
e.printStackTrace();
}
}
private DocumentFile getOrCreateDocumentFile(DocumentFile folder, String targetName) {
DocumentFile targetFile = folder.findFile(targetName);//try finding the file
if (targetFile == null)//no file found, creating new one
targetFile = folder.createFile(Constants.NO_FILE_EXTENSION_MIME_TYPE, targetName);
return targetFile;
}
private void importWorldmap(Intent data) {
Uri uri = data.getData();
Context context = getApplicationContext();
ContentResolver resolver = AndorsTrailApplication.getApplicationFromActivity(this).getContentResolver();
File storageDir = AndroidStorage.getStorageDirectory(context, Constants.FILENAME_SAVEGAME_DIRECTORY);
DocumentFile storageFolder = DocumentFile.fromFile(storageDir);
DocumentFile ownWorldmapFolder = storageFolder.findFile(Constants.FILENAME_WORLDMAP_DIRECTORY);
if (ownWorldmapFolder == null) {
ownWorldmapFolder = storageFolder.createDirectory(Constants.FILENAME_WORLDMAP_DIRECTORY);
}
DocumentFile chosenFolder = DocumentFile.fromTreeUri(context, uri);
if (chosenFolder == null || !chosenFolder.isDirectory()) {
showErrorImportingWorldmapWrongDirectory();
return;
}
if (!Constants.FILENAME_WORLDMAP_DIRECTORY.equals(chosenFolder.getName())) {
//user did not select the worldmap folder directly
DocumentFile file = chosenFolder.findFile(Constants.FILENAME_WORLDMAP_DIRECTORY);
if (file == null || !file.isDirectory() || !Constants.FILENAME_WORLDMAP_DIRECTORY.equals(file.getName())) {
//could not find a worldmap folder in the users selection
showErrorImportingWorldmapWrongDirectory();
return;
}
chosenFolder = file;
}
DocumentFile[] files = chosenFolder.listFiles();
for (DocumentFile file : files) {
if (file.isFile()) {
try {
AndroidStorage.copyDocumentFileToNewOrExistingFile(file, resolver, ownWorldmapFolder);
} catch (IOException e) {
e.printStackTrace();
}
}
}
completeLoadSaveActivity(SLOT_NUMBER_IMPORT_WORLDMAP);
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
private void clickExportSaveGames() {
startActivityForResult(AndroidStorage.getNewOpenDirectoryIntent(), -SLOT_NUMBER_EXPORT_SAVEGAMES);
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
private void clickImportSaveGames() {
startActivityForResult(AndroidStorage.getNewSelectMultipleSavegameFilesIntent(), -SLOT_NUMBER_IMPORT_SAVEGAMES);
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
private void clickImportWorldmap() {
startActivityForResult(AndroidStorage.getNewOpenDirectoryIntent(), -SLOT_NUMBER_IMPORT_WORLDMAP);
}
private void showConfirmOverwriteByExportQuestion(ContentResolver resolver, DocumentFile targetFolder, DocumentFile[] files) {
final Dialog d = CustomDialogFactory.createDialog(this,
getString(R.string.loadsave_export_overwrite_confirmation_title),
getResources().getDrawable(android.R.drawable.ic_dialog_alert),
getString(R.string.loadsave_export_overwrite_confirmation),
null,
true);
CustomDialogFactory.addButton(d, android.R.string.yes, v -> exportSaveGamesFolderContentToFolder(resolver, targetFolder, files));
CustomDialogFactory.addDismissButton(d, android.R.string.no);
CustomDialogFactory.show(d);
}
private void showConfirmOverwriteByImportQuestion(ContentResolver resolver,
DocumentFile appSavegameFolder,
List<DocumentFile> alreadyExistingFiles,
List<DocumentFile> newFiles) {
final String title = getString(R.string.loadsave_import_overwrite_confirmation_title);
String message = getString(R.string.loadsave_import_overwrite_confirmation);
StringBuilder sb = new StringBuilder();
sb.append('\n');
int amount = alreadyExistingFiles.size();
Context context = AndorsTrailApplication.getApplicationFromActivity(this).getApplicationContext();
for (int i = 0; i < amount && i < 3; i++) {
DocumentFile alreadyExistingFile = alreadyExistingFiles.get(i);
String alreadyExistingFileName = alreadyExistingFile.getName();
FileHeader fileHeader = Savegames.quickload(context, getSlotFromSavegameFileName(alreadyExistingFileName));
sb.append('\n');
String fileHeaderDesription = "";
if (fileHeader != null)
fileHeaderDesription = fileHeader.describe();
sb.append(getString(R.string.loadsave_import_overwrite_confirmation_file_pattern, alreadyExistingFileName, fileHeaderDesription));
// sb.append(alreadyExistingFile.getName());
}
if (amount > 3) {
sb.append("\n...");
}
message = message + sb;
final Dialog d = CustomDialogFactory.createDialog(this,
title,
getResources().getDrawable(android.R.drawable.ic_dialog_alert),
message,
null,
true);
CustomDialogFactory.addButton(d, android.R.string.yes, v -> newFiles.addAll(alreadyExistingFiles));
CustomDialogFactory.addDismissButton(d, android.R.string.no);
CustomDialogFactory.setDismissListener(d, dialog -> {
importSaveGames(resolver, appSavegameFolder, newFiles);
completeLoadSaveActivity(SLOT_NUMBER_IMPORT_SAVEGAMES);
});
CustomDialogFactory.show(d);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode != Activity.RESULT_OK)
return;
// Uri uri = data.getData();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
switch (-requestCode) {
case SLOT_NUMBER_EXPORT_SAVEGAMES:
exportSaveGames(data);
return;
case SLOT_NUMBER_IMPORT_SAVEGAMES:
importSaveGames(data);
return;
case SLOT_NUMBER_IMPORT_WORLDMAP:
importWorldmap(data);
return;
}
}
}
//endregion
private void loadSaveGame(int slot) {
if (!Savegames.getSlotFile(slot, this).exists()) {
showErrorLoadingEmptySlot();
} else {
final FileHeader header = Savegames.quickload(this, slot);
if (header != null && !header.hasUnlimitedSaves) {
showSlotGetsDeletedOnLoadWarning(slot);
} else {
completeLoadSaveActivity(slot);
}
}
}
//region show Dialogs
private void showErrorImportingWorldmapWrongDirectory() {
final Dialog d = CustomDialogFactory.createErrorDialog(this,
getString(R.string.loadsave_import_worldmap_unsuccessfull),
getString(R.string.loadsave_import_worldmap_unsuccessfull_wrong_directory));
CustomDialogFactory.show(d);
}
private void showErrorImportingSaveGameUnknown() {
final Dialog d = CustomDialogFactory.createErrorDialog(this,
getString(R.string.loadsave_import_save_unsuccessfull),
getString(R.string.loadsave_import_save_unsuccessfull_unknown));
CustomDialogFactory.show(d);
}
private void showErrorLoadingEmptySlot() {
final Dialog d = CustomDialogFactory.createErrorDialog(this,
getString(R.string.startscreen_error_loading_game),
getString(R.string.startscreen_error_loading_empty_slot));
CustomDialogFactory.show(d);
}
private void showSlotGetsDeletedOnLoadWarning(final int slot) {
final Dialog d = CustomDialogFactory.createDialog(this,
getString(R.string.startscreen_attention_slot_gets_delete_on_load),
getResources().getDrawable(android.R.drawable.ic_dialog_alert),
getString(R.string.startscreen_attention_message_slot_gets_delete_on_load),
null,
true);
CustomDialogFactory.addButton(d, android.R.string.ok, v -> completeLoadSaveActivity(slot));
CustomDialogFactory.show(d);
}
private void showConfirmoverwriteQuestion(final int slot, String message) {
final String title =
getString(R.string.loadsave_save_overwrite_confirmation_title) + ' '
+ getString(R.string.loadsave_save_overwrite_confirmation_slot, slot);
final Dialog d = CustomDialogFactory.createDialog(this,
title,
getResources().getDrawable(android.R.drawable.ic_dialog_alert),
message,
null,
true);
CustomDialogFactory.addButton(d, android.R.string.yes, v -> completeLoadSaveActivity(slot));
CustomDialogFactory.addDismissButton(d, android.R.string.no);
CustomDialogFactory.show(d);
}
//endregion
}

View File

@@ -30,6 +30,7 @@ public final class MonsterInfoActivity extends AndorsTrailBaseActivity {
private RangeBar hp;
private ViewGroup monsterinfo_container;
private TextView monsterinfo_max_ap;
private TextView monsterinfo_killcount;
@Override
@@ -47,6 +48,7 @@ public final class MonsterInfoActivity extends AndorsTrailBaseActivity {
monsterinfo_title = (TextView) findViewById(R.id.monsterinfo_title);
monsterinfo_difficulty = (TextView) findViewById(R.id.monsterinfo_difficulty);
monsterinfo_max_ap = (TextView) findViewById(R.id.monsterinfo_max_ap);
monsterinfo_killcount = (TextView) findViewById(R.id.monsterinfo_killcount);
Button b = (Button) findViewById(R.id.monsterinfo_close);
b.setOnClickListener(new OnClickListener() {
@@ -94,6 +96,7 @@ public final class MonsterInfoActivity extends AndorsTrailBaseActivity {
false);
hp.update(monster.getMaxHP(), monster.getCurrentHP());
monsterinfo_max_ap.setText(Integer.toString(monster.getMaxAP()));
monsterinfo_killcount.setText(Integer.toString(world.model.statistics.getNumberOfKillsForMonsterName(monster.getName()) ));
}
public static int getMonsterDifficultyResource(ControllerContext controllerContext, Monster monster) {

View File

@@ -1,7 +1,14 @@
package com.gpl.rpg.AndorsTrail.activity;
import android.content.Context;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
@@ -32,5 +39,7 @@ public final class Preferences extends PreferenceActivity {
AndorsTrailApplication app = AndorsTrailApplication.getApplicationFromActivity(this);
app.setLocale(this);
}
}

View File

@@ -0,0 +1,414 @@
package com.gpl.rpg.AndorsTrail.activity.fragment;
import android.Manifest;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
import com.gpl.rpg.AndorsTrail.AndorsTrailPreferences;
import com.gpl.rpg.AndorsTrail.Dialogs;
import com.gpl.rpg.AndorsTrail.R;
import com.gpl.rpg.AndorsTrail.WorldSetup;
import com.gpl.rpg.AndorsTrail.activity.AboutActivity;
import com.gpl.rpg.AndorsTrail.activity.LoadSaveActivity;
import com.gpl.rpg.AndorsTrail.activity.LoadingActivity;
import com.gpl.rpg.AndorsTrail.activity.Preferences;
import com.gpl.rpg.AndorsTrail.activity.StartScreenActivity;
import com.gpl.rpg.AndorsTrail.controller.Constants;
import com.gpl.rpg.AndorsTrail.resource.tiles.TileManager;
import com.gpl.rpg.AndorsTrail.savegames.Savegames;
import com.gpl.rpg.AndorsTrail.savegames.Savegames.FileHeader;
import com.gpl.rpg.AndorsTrail.util.AndroidStorage;
import com.gpl.rpg.AndorsTrail.util.L;
import com.gpl.rpg.AndorsTrail.util.ThemeHelper;
import com.gpl.rpg.AndorsTrail.view.CustomDialogFactory;
public class StartScreenActivity_MainMenu extends Fragment {
private static final int INTENTREQUEST_PREFERENCES = 7;
public static final int INTENTREQUEST_LOADGAME = 9;
public static final int INTENTREQUEST_EXPORT_SAVE = 11;
public static final int INTENTREQUEST_IMPORT_SAVE = 13;
private boolean hasExistingGame = false;
private Button startscreen_continue;
private Button startscreen_newgame;
private Button startscreen_load;
private Button startscreen_import;
private Button startscreen_export;
private ViewGroup save_preview_holder;
private ImageView save_preview_hero_icon;
private TextView save_preview_hero_desc;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
updatePreferences(false);
super.onCreateView(inflater, container, savedInstanceState);
if (container != null) {
container.removeAllViews();
}
View root = inflater.inflate(R.layout.startscreen_mainmenu, container, false);
save_preview_holder = (ViewGroup) root.findViewById(R.id.save_preview_holder);
save_preview_hero_icon = (ImageView) root.findViewById(R.id.save_preview_hero_icon);
save_preview_hero_desc = (TextView) root.findViewById(R.id.save_preview_hero_desc);
startscreen_continue = (Button) root.findViewById(R.id.startscreen_continue);
startscreen_continue.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
continueGame(false, Savegames.SLOT_QUICKSAVE, null);
}
});
startscreen_newgame = (Button) root.findViewById(R.id.startscreen_newgame);
startscreen_newgame.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
if (hasExistingGame) {
comfirmNewGame();
} else {
createNewGame();
}
}
});
Button b = (Button) root.findViewById(R.id.startscreen_about);
b.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
startActivity(new Intent(getActivity(), AboutActivity.class));
}
});
b = (Button) root.findViewById(R.id.startscreen_preferences);
b.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
Intent intent = new Intent(getActivity(), Preferences.class);
StartScreenActivity_MainMenu.this.startActivityForResult(intent, INTENTREQUEST_PREFERENCES);
}
});
startscreen_load = (Button) root.findViewById(R.id.startscreen_load);
startscreen_load.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
AndorsTrailApplication app = AndorsTrailApplication.getApplicationFromActivity(getActivity());
if (hasExistingGame && app != null && app.getWorld() != null && app.getWorld().model != null
&& app.getWorld().model.statistics != null && !app.getWorld().model.statistics.hasUnlimitedSaves()) {
final Dialog d = CustomDialogFactory.createDialog(getActivity(),
getString(R.string.startscreen_load_game),
getResources().getDrawable(android.R.drawable.ic_delete),
getString(R.string.startscreen_load_game_confirm),
null,
true);
CustomDialogFactory.addButton(d, android.R.string.ok, new View.OnClickListener() {
@Override
public void onClick(View v) {
Dialogs.showLoad(StartScreenActivity_MainMenu.this);
}
});
CustomDialogFactory.addDismissButton(d, android.R.string.cancel);
CustomDialogFactory.show(d);
} else {
Dialogs.showLoad(StartScreenActivity_MainMenu.this);
}
}
});
if (AndorsTrailApplication.DEVELOPMENT_FORCE_STARTNEWGAME) {
if (AndorsTrailApplication.DEVELOPMENT_DEBUGRESOURCES) {
continueGame(true, 0, "Debug player");
} else {
continueGame(true, 0, "Player");
}
} else if (AndorsTrailApplication.DEVELOPMENT_FORCE_CONTINUEGAME) {
continueGame(false, Savegames.SLOT_QUICKSAVE, null);
}
// if it is a new version we first fire a welcome screen in onResume
// and afterwards check the permissions
if (!isNewVersion()) {
checkAndRequestPermissions(getActivity());
migrateDataOnDemand(getActivity());
}
return root;
}
@Override
public void onResume() {
super.onResume();
String playerName;
String displayInfo = null;
int iconID = TileManager.CHAR_HERO;
boolean isDead = false;
FileHeader header = Savegames.quickload(getActivity(), Savegames.SLOT_QUICKSAVE);
if (header != null && header.playerName != null) {
playerName = header.playerName;
displayInfo = header.displayInfo;
iconID = header.iconID;
isDead = header.isDead;
} else {
// Before fileversion 14 (v0.6.7), quicksave was stored in Shared preferences
SharedPreferences p = getActivity().getSharedPreferences("quicksave", Activity.MODE_PRIVATE);
playerName = p.getString("playername", null);
if (playerName != null) {
displayInfo = "level " + p.getInt("level", -1);
}
}
hasExistingGame = (playerName != null);
setButtonState(playerName, displayInfo, iconID, isDead);
if (isNewVersion()) {
Dialogs.showNewVersion(getActivity(), new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface arg0) {
setCurrentVersionForVersionCheck();
checkAndRequestPermissions(getActivity());
migrateDataOnDemand(getActivity());
startscreen_load.setEnabled(true);
}
});
}
startscreen_load.setEnabled(true);
}
@TargetApi(29)
public void migrateDataOnDemand(final Activity activity) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
if (activity.getApplicationContext().checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) {
if (AndroidStorage.shouldMigrateToInternalStorage(activity.getApplicationContext())) {
final Dialog d = CustomDialogFactory.createDialog(activity,
getString(R.string.startscreen_migration_title),
activity.getResources().getDrawable(android.R.drawable.ic_dialog_alert),
getString(R.string.startscreen_migration_text),
null,
true);
CustomDialogFactory.addDismissButton(d, android.R.string.ok);
d.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface arg0) {
startscreen_load.setEnabled(true);
}
});
CustomDialogFactory.show(d);
if (!AndroidStorage.migrateToInternalStorage(activity.getApplicationContext())) {
final Dialog errorDlg = CustomDialogFactory.createDialog(activity,
getString(R.string.startscreen_migration_title),
activity.getResources().getDrawable(android.R.drawable.ic_dialog_alert),
getString(R.string.startscreen_migration_failure),
null,
true);
CustomDialogFactory.addDismissButton(errorDlg, android.R.string.ok);
d.cancel();
CustomDialogFactory.show(errorDlg);
}
} else {
L.log("INFO: No external files or destination folder ist not empty. No data migration.");
}
} else {
L.log("INFO: No read permission on external folder. No data migration.");
}
}
}
private static final int READ_EXTERNAL_STORAGE_REQUEST = 1;
private static final int WRITE_EXTERNAL_STORAGE_REQUEST = 2;
@TargetApi(23)
public static void checkAndRequestPermissions(final Activity activity) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q) {
if (activity.getApplicationContext().checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
activity.requestPermissions(new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, READ_EXTERNAL_STORAGE_REQUEST);
}
if (activity.getApplicationContext().checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
activity.requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, WRITE_EXTERNAL_STORAGE_REQUEST);
}
}
}
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
listener = (OnNewGameRequestedListener) activity;
}
@Override
public void onDetach() {
super.onDetach();
listener = null;
}
private void setButtonState(final String playerName, final String displayInfo, int iconID, boolean isDead) {
startscreen_continue.setEnabled(hasExistingGame && !isDead);
startscreen_newgame.setEnabled(true);
if (hasExistingGame) {
TileManager tm = AndorsTrailApplication.getApplicationFromActivity(getActivity()).getWorld().tileManager;
tm.setImageViewTileForPlayer(getResources(), save_preview_hero_icon, iconID);
save_preview_hero_desc.setText((isDead ? getString(R.string.rip_startscreen) : "") + playerName + ", " + displayInfo);
save_preview_holder.setVisibility(View.VISIBLE);
} else {
save_preview_holder.setVisibility(View.GONE);
}
}
private void continueGame(boolean createNewCharacter, int loadFromSlot, String name) {
final WorldSetup setup = AndorsTrailApplication.getApplicationFromActivity(getActivity()).getWorldSetup();
setup.createNewCharacter = createNewCharacter;
setup.loadFromSlot = loadFromSlot;
setup.newHeroName = name;
startActivity(new Intent(getActivity(), LoadingActivity.class));
}
private void comfirmNewGame() {
// new AlertDialog.Builder(new ContextThemeWrapper(getActivity(), R.style.AndorsTrailStyle_Dialog))
// .setTitle(R.string.startscreen_newgame)
// .setMessage(R.string.startscreen_newgame_confirm)
// .setIcon(android.R.drawable.ic_delete)
// .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
// @Override
// public void onClick(DialogInterface dialog, int which) {
// //continueGame(true);
//// hasExistingGame = false;
//// setButtonState(null, null, 0);
// createNewGame();
// }
// })
// .setNegativeButton(android.R.string.cancel, null)
// .create().show();
//
//
final Dialog d = CustomDialogFactory.createDialog(getActivity(),
getString(R.string.startscreen_newgame),
getResources().getDrawable(android.R.drawable.ic_delete),
getResources().getString(R.string.startscreen_newgame_confirm),
null,
true);
CustomDialogFactory.addButton(d, android.R.string.ok, new View.OnClickListener() {
@Override
public void onClick(View v) {
createNewGame();
}
});
CustomDialogFactory.addDismissButton(d, android.R.string.cancel);
CustomDialogFactory.show(d);
}
private static final String versionCheck = "lastversion";
private boolean isNewVersion() {
SharedPreferences s = getActivity().getSharedPreferences(Constants.PREFERENCE_MODEL_LASTRUNVERSION, Activity.MODE_PRIVATE);
int lastversion = s.getInt(versionCheck, 0);
if (lastversion >= AndorsTrailApplication.CURRENT_VERSION) return false;
return true;
}
private void setCurrentVersionForVersionCheck() {
SharedPreferences s = getActivity().getSharedPreferences(Constants.PREFERENCE_MODEL_LASTRUNVERSION, Activity.MODE_PRIVATE);
Editor e = s.edit();
e.putInt(versionCheck, AndorsTrailApplication.CURRENT_VERSION);
e.commit();
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (requestCode) {
case INTENTREQUEST_LOADGAME:
if (resultCode != Activity.RESULT_OK) break;
final boolean wasImportOrExport = data.getBooleanExtra("import_export", false);
final int slot = data.getIntExtra("slot", 1);
if (wasImportOrExport) {
if(slot == LoadSaveActivity.SLOT_NUMBER_EXPORT_SAVEGAMES)
Toast.makeText(getActivity(),R.string.loadsave_export_save_successfull, Toast.LENGTH_LONG).show();
else if(slot == LoadSaveActivity.SLOT_NUMBER_IMPORT_SAVEGAMES)
Toast.makeText(getActivity(),R.string.loadsave_import_save_successfull, Toast.LENGTH_LONG).show();
else if(slot == LoadSaveActivity.SLOT_NUMBER_IMPORT_WORLDMAP)
Toast.makeText(getActivity(),R.string.loadsave_import_worldmap_successfull, Toast.LENGTH_LONG).show();
break;
}
continueGame(false, slot, null);
break;
case INTENTREQUEST_PREFERENCES:
updatePreferences(true);
break;
}
}
private void updatePreferences(boolean alreadyStartedLoadingResources) {
AndorsTrailApplication app = AndorsTrailApplication.getApplicationFromActivity(getActivity());
AndorsTrailPreferences preferences = app.getPreferences();
preferences.read(getActivity());
if (app.setLocale(getActivity())) {
if (alreadyStartedLoadingResources) {
// Changing the locale after having loaded the game requires resources to
// be re-loaded. Therefore, we just exit here.
Toast.makeText(getActivity(), R.string.change_locale_requires_restart, Toast.LENGTH_LONG).show();
doFinish();
return;
}
}
if (ThemeHelper.changeTheme(preferences.selectedTheme)) {
// Changing the theme requires a restart to re-create all activities.
Toast.makeText(getActivity(), R.string.change_theme_requires_restart, Toast.LENGTH_LONG).show();
doFinish();
return;
}
app.getWorld().tileManager.updatePreferences(preferences);
}
@SuppressLint("NewApi")
private void doFinish() {
//For Lollipop and above
((AndorsTrailApplication) getActivity().getApplication()).discardWorld();
getActivity().finish();
}
public interface OnNewGameRequestedListener {
public void onNewGameRequested();
}
private OnNewGameRequestedListener listener = null;
private void createNewGame() {
if (listener != null) {
listener.onNewGameRequested();
}
}
}

View File

@@ -238,7 +238,7 @@ public final class CombatController implements VisualEffectCompletedCallback {
controllers.actorStatsController.addActorAP(player, player.getSkillLevel(SkillCollection.SkillID.cleave) * SkillCollection.PER_SKILLPOINT_INCREASE_CLEAVE_AP);
controllers.actorStatsController.addActorHealth(player, player.getSkillLevel(SkillCollection.SkillID.eater) * SkillCollection.PER_SKILLPOINT_INCREASE_EATER_HEALTH);
world.model.statistics.addMonsterKill(killedMonster.getMonsterTypeID());
world.model.statistics.addMonsterKill(killedMonster.monsterType);
controllers.actorStatsController.addExperience(loot.exp);
world.model.combatLog.append(controllers.getResources().getString(R.string.dialog_monsterloot_gainedexp, loot.exp));

View File

@@ -23,8 +23,8 @@ public final class Constants {
public static final long MINIMUM_INPUT_INTERVAL_STD = 200;
//TODO restore final modifier before release
public static long MINIMUM_INPUT_INTERVAL = AndorsTrailApplication.DEVELOPMENT_FASTSPEED ? MINIMUM_INPUT_INTERVAL_FAST : MINIMUM_INPUT_INTERVAL_STD;
public static final int MAX_MAP_WIDTH = 33;
public static final int MAX_MAP_HEIGHT = 33;
public static final int MAX_MAP_WIDTH = 46;
public static final int MAX_MAP_HEIGHT = 46;
public static final int MONSTER_MOVEMENT_TURN_DURATION_MS = 1200;
public static final int MONSTER_IMMOBILE_MOVE_COST = 999;
@@ -51,6 +51,10 @@ public final class Constants {
public static final String CHEAT_DETECTION_FOLDER = "dEAGyGE3YojqXjI3x4x7";
public static final String PASSIVE_ACHIEVEMENT_CHECK_PHRASE = "passive_achievement_check";
public static final String SAVEGAME_FILE_MIME_TYPE = "application/octet-stream";
public static final String WORLDMAP_FILE_MIME_TYPE = "image/png";
public static final String NO_FILE_EXTENSION_MIME_TYPE = "application/no_file_extension_mime_type";
public static final Random rnd = new Random();
public static int rollValue(final ConstRange r) { return rollValue(r.max, r.current); }
public static int rollValue(final ConstRange r, int bias) { return rollValue((r.max + 1) * 100 -1, r.current * 100 + bias)/100; }

View File

@@ -22,7 +22,8 @@ import com.gpl.rpg.AndorsTrail.model.quest.Quest;
public final class GameStatistics {
private int deaths = 0;
private final HashMap<String, Integer> killedMonsters = new HashMap<String, Integer>();
private final HashMap<String, Integer> killedMonstersByTypeID = new HashMap<String, Integer>();
private final HashMap<String, Integer> killedMonstersByName = new HashMap<String, Integer>();
private final HashMap<String, Integer> usedItems = new HashMap<String, Integer>();
private int spentGold = 0;
private boolean unlimitedSaves = true;
@@ -33,10 +34,14 @@ public final class GameStatistics {
this.startLives = startLives;
}
public void addMonsterKill(String monsterTypeID) {
if (!killedMonsters.containsKey(monsterTypeID)) killedMonsters.put(monsterTypeID, 1);
else killedMonsters.put(monsterTypeID, killedMonsters.get(monsterTypeID) + 1);
public void addMonsterKill(MonsterType monsterType) {
// Track monster kills by type ID, for savegame file
killedMonstersByTypeID.put(monsterType.id, killedMonstersByTypeID.getOrDefault((monsterType.id), 0) + 1);
// Also track by name, for statistics display (multiple IDs w/same name don't matter to player)
killedMonstersByName.put(monsterType.name, killedMonstersByName.getOrDefault(monsterType.name, 0) + 1);
}
public void addPlayerDeath(int lostExp) {
++deaths;
}
@@ -68,30 +73,34 @@ public final class GameStatistics {
public boolean isDead() { return !hasUnlimitedLives() && getLivesLeft() < 1; }
public int getNumberOfKillsForMonsterType(String monsterTypeID) {
Integer v = killedMonsters.get(monsterTypeID);
Integer v = killedMonstersByTypeID.get(monsterTypeID);
if (v == null) return 0;
return v;
}
public int getNumberOfKillsForMonsterName(String monsterName) {
Integer v = killedMonstersByName.get(monsterName);
if (v == null) return 0;
return v;
}
public String getTop5MostCommonlyKilledMonsters(WorldContext world, Resources res) {
if (killedMonsters.isEmpty()) return null;
List<Entry<String, Integer>> entries = new ArrayList<Entry<String, Integer>>(killedMonsters.entrySet());
if (killedMonstersByTypeID.isEmpty()) return null;
List<Entry<String, Integer>> entries = new ArrayList<Entry<String, Integer>>(killedMonstersByName.entrySet());
Collections.sort(entries, descendingValueComparator);
StringBuilder sb = new StringBuilder(100);
int i = 0;
for (Entry<String, Integer> e : entries) {
if (i++ >= 5) break;
MonsterType t = world.monsterTypes.getMonsterType(e.getKey());
if (t == null) continue;
sb.append(res.getString(R.string.heroinfo_gamestats_name_and_qty, t.name, e.getValue())).append('\n');
sb.append(res.getString(R.string.heroinfo_gamestats_name_and_qty, e.getKey(), e.getValue())).append('\n');
}
return sb.toString();
}
public String getMostPowerfulKilledMonster(WorldContext world) {
if (killedMonsters.isEmpty()) return null;
HashMap<String, Integer> expPerMonsterType = new HashMap<String, Integer>(killedMonsters.size());
for (String monsterTypeID : killedMonsters.keySet()) {
if (killedMonstersByTypeID.isEmpty()) return null;
HashMap<String, Integer> expPerMonsterType = new HashMap<String, Integer>(killedMonstersByTypeID.size());
for (String monsterTypeID : killedMonstersByTypeID.keySet()) {
MonsterType t = world.monsterTypes.getMonsterType(monsterTypeID);
expPerMonsterType.put(monsterTypeID, t != null ? t.exp : 0);
}
@@ -147,7 +156,7 @@ public final class GameStatistics {
public int getNumberOfKilledMonsters() {
int result = 0;
for (int v : killedMonsters.values()) result += v;
for (int v : killedMonstersByTypeID.values()) result += v;
return result;
}
@@ -172,8 +181,14 @@ public final class GameStatistics {
if (type == null) continue;
id = type.id;
}
this.killedMonsters.put(id, value);
this.killedMonstersByTypeID.put(id, value);
// Also track by name, for statistics display (multiple IDs w/same name don't matter to player)
MonsterType t = world.monsterTypes.getMonsterType(id);
if (t != null) killedMonstersByName.put(t.name, killedMonstersByName.getOrDefault(t.name, 0) + value);
}
if (fileversion <= 17) return;
final int numItems = src.readInt();
@@ -192,7 +207,7 @@ public final class GameStatistics {
public void writeToParcel(DataOutputStream dest) throws IOException {
dest.writeInt(deaths);
Set<Entry<String, Integer> > set = killedMonsters.entrySet();
Set<Entry<String, Integer> > set = killedMonstersByTypeID.entrySet();
dest.writeInt(set.size());
for (Entry<String, Integer> e : set) {
dest.writeUTF(e.getKey());

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