Compare commits

..

186 Commits
v68 ... v76

Author SHA1 Message Date
Anuken
4ddc59589c Error display 2019-05-05 12:19:32 -04:00
Anuken
1e15d7a33e Fixed some power/save/pathfinding bugs 2019-05-05 12:14:42 -04:00
Anuken
13969bdd29 Fixed shields not working / Fixed player text not fading 2019-05-04 22:33:08 -04:00
Anuken
a3f5583326 Fixed tar fields 2019-05-04 22:17:17 -04:00
Anuken
f137c11c6c Harder default waves 2019-05-04 17:14:47 -04:00
Anuken
8d6afbd80d Trim console output even more 2019-05-04 14:22:13 -04:00
Anuken
c46fa206f6 Removed unnecessary logging 2019-05-04 14:01:06 -04:00
Anuken
e8da206389 Enable heap dump on server crash 2019-05-04 13:17:31 -04:00
Anuken
b2b8cf2357 Server local command handling from sockets 2019-05-04 12:36:24 -04:00
Anuken
a4fd88a440 Bugfixes 2019-05-04 10:44:21 -04:00
Anuken
a1624f61ae Minor turret balancing 2019-05-03 22:58:06 -04:00
Anuken
5ee26fc3f4 Fixed power tests 2019-05-03 22:26:37 -04:00
Anuken
93ffb66e59 Fixed all known issues with power system 2019-05-03 21:19:41 -04:00
Anuken
4b9bcfb014 Crash fix 2019-05-03 10:26:56 -04:00
Anuken
a161c09441 Switched default mech to dart / Bugfixes 2019-05-03 09:21:45 -04:00
Anuken
0c396f76b2 Fixed impact reactor warming up without satisfied power 2019-05-03 00:13:37 -04:00
Anuken
b2408b1a7c New block stats / Junction bugfixes 2019-05-02 23:10:41 -04:00
Anuken
eaa2ad4f05 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	core/assets/bundles/bundle.properties
2019-05-02 08:57:09 -04:00
Anuken
88ce7837a6 Partial power usage / Drill ID priority / Liquid source deselect 2019-05-02 08:56:29 -04:00
L5474
4054c7d12d fix #481 + capitalization (#483)
hope you're happy based
2019-05-01 15:40:37 -04:00
Anuken
2d3fd513d8 1 2019-05-01 11:12:27 -04:00
Anuken
404b593ab8 Merge remote-tracking branch 'origin/master' 2019-04-30 23:58:51 -04:00
Anuken
b9f1dea914 Removed gen tweaks 2019-04-30 23:57:56 -04:00
Anuken
f3385e6453 Pruned bundles 2019-04-30 23:34:41 -04:00
Anuken
a2e55f7861 Removed creeptree for now 2019-04-30 13:09:40 -04:00
Anuken
761e0114a5 Apparent typo fix 2019-04-30 12:56:57 -04:00
laohuaji233
dcae128d06 Update bundle_zh_CN.properties (#475)
more translations
2019-04-30 12:49:39 -04:00
J-VdS
a891a8badc NL_BE bundle progress (Fishbuilder) (#474)
* Create bundle_nl_BE.properties

work in progress, just to save the file

* tot 148
2019-04-30 12:47:54 -04:00
Zachary
f3ec5b533e Update bundle_ja.properties (#473)
Translated like one name lmao
2019-04-30 12:47:42 -04:00
Zachary
d50397edf1 Update bundle_zh_CN.properties (#472)
Translated more block names.
2019-04-30 12:47:32 -04:00
Deyvid67
49986f22c8 Update bundle_pt_BR.properties (#469) 2019-04-30 12:47:26 -04:00
Predator127
70f279d978 Update bundle_pt_BR.properties (#467)
This is an updated version of the Brazillian translation, Made by Hanko
2019-04-30 12:46:01 -04:00
VizardAlpha
84c5a75b6c Updates bundle_fr_BE.properties (#462)
* Updates bundle_fr_BE.properties

* Update bundle_fr_BE.properties

* Update bundle_fr_BE.properties
2019-04-30 12:45:38 -04:00
Paul T
97663e87a6 Update bundle_de.properties (#452)
* Update bundle_de.properties

* Update bundle_de.properties
2019-04-30 12:45:06 -04:00
laohuaji233
5956edcb8e Update bundle_zh_CN.properties (#453)
More translations
2019-04-30 12:44:57 -04:00
Prosta4okua
7e975f2134 Update bundle_uk_UA.properties and bundle_ru.properties (#454)
* Update bundle_uk_UA.properties

Виправив помилку, переклав Slag.

* Update bundle_uk_UA.properties

Додав переклад дьогтю

* Update bundle_uk_UA.properties

* Update bundle_uk_UA.properties

* Update bundle_ru.properties

Commit from Github Desktop

* Update bundle_ru.properties

* New translations was added

Salt Rocks and Pebbles

* Update bundle_ru.properties

* Update bundle_ru.properties

* New text

* Fix error

* Update bundle_ru.properties

* Add new translations

* Add Solonchaki :D

* 1
2019-04-30 12:44:41 -04:00
키에르
40de13f9c7 Update bundle_ko.properties (#457)
* Update bundle_ko.properties

* Update bundle_ko.properties

* Update bundle_ko.properties

*  Apr 22, 2019

* fix typo

* Update bundle_ko.properties
2019-04-30 12:44:08 -04:00
Dominik
70946539e3 Update bundle_pl.properties (#458)
Translated: wave info, generate, ammo info, drill, power efficency
2019-04-30 12:43:20 -04:00
CinExPL
996c594dfc Update bundle_pl.properties (#460)
Improvements based on comparison with original bundle file.
2019-04-30 12:39:00 -04:00
Anuken
d8eeb79b63 Un-debugged content 2019-04-30 12:29:19 -04:00
Anuken
cf61dd0704 Removed antialiasing due to bugs / Improved default waves 2019-04-30 12:05:01 -04:00
Anuken
6fd5f1563a Fixed incorrect power source sprite 2019-04-30 00:07:38 -04:00
Anuken
3c643c917a Map bugfixes / Sprite tweak / Zone loadout moved to dialog 2019-04-29 23:58:16 -04:00
Anuken
378be0ef86 Better Discord presence 2019-04-29 13:34:27 -04:00
Anuken
29e90969eb Removed UIUtils 2019-04-29 11:50:49 -04:00
Anuken
fb724514f3 Fixed portrait custom game dialog 2019-04-29 11:27:15 -04:00
Anuken
1f11da75d2 Push test 2019-04-29 08:34:40 -04:00
Anuken
fcc433fe17 Zone balancing 2019-04-28 22:03:26 -04:00
Anuken
617bdf9910 New zone maps / Dark map border / Tweaks 2019-04-28 20:25:41 -04:00
Anuken
3b2aa92eb7 Visual server respawning fix 2019-04-28 10:51:14 -04:00
Anuken
4c17b56e28 Less messy respawning / Standard starter mech / Bugfixes 2019-04-28 10:34:53 -04:00
Anuken
ad13c83f93 Fixed gen copying for earlier versions of IntelliJ 2019-04-27 09:58:14 -04:00
Anuken
768d67a8ae Updated desolate rift / Spawning fixes 2019-04-26 23:23:45 -04:00
Anuken
d827cda395 Fixed dispose() causing crash 2019-04-26 11:32:38 -04:00
Anuken
106e6c98a3 Disabled liquid ore placement 2019-04-26 11:31:55 -04:00
Anuken
e7ad797d4e Fixed unit tests 2019-04-26 11:23:41 -04:00
Anuken
6e1fb71194 Bugfixes 2019-04-25 21:53:17 -04:00
Anuken
9f5dc7f091 Fixed obscure zone test bug 2019-04-25 12:25:45 -04:00
Anuken
57b273639c Entity cleanup 2019-04-25 12:01:14 -04:00
Anuken
278d690a6b Even better avoidance 2019-04-24 23:16:18 -04:00
Anuken
c91c0f7b47 "Fixed" unit collisions 2019-04-24 22:47:49 -04:00
Anuken
6a406f4d45 Removed SolidTrait#movable 2019-04-24 22:18:00 -04:00
Anuken
eecaa850e0 Fixed minimap zoom not resetting after map load 2019-04-24 09:12:33 -04:00
Anuken
f332332eaa Removed unused variables 2019-04-23 21:59:44 -04:00
Anuken
79b0e76be0 Bugfixes / Unit test fix 2019-04-23 11:59:07 -04:00
Anuken
30650efd98 Added unfinished zone map 2019-04-22 23:56:46 -04:00
Anuken
b7759c8151 Better shared crash handling 2019-04-22 12:00:47 -04:00
Anuken
0382c35ac0 Settings menu layout improved / Rule dialog improvements 2019-04-21 22:39:56 -04:00
Anuken
819262c93f Removed GameMode requirements 2019-04-21 16:34:02 -04:00
Anuken
db60f4bb1c Updated to Gradle 5.4 2019-04-20 23:09:28 -04:00
Anuken
7785ca55c2 New unstable mass driver code 2019-04-20 21:10:52 -04:00
Anuken
75dcceff43 Zone requirement changes / Bugfixes 2019-04-20 19:57:20 -04:00
Franciszek Zaranowicz
af91979d4c New custom games and custom rules screen (#464)
* New waves and limited respawning option.

Added ability to manipulate number of respawns per wave. Added option to hold counting for next wave until all enemies are destroyed

* Critical bug fixed

Fixed frozen wave timer when rules.waitForWaveToEnd was enabled

* Requested changes

* Missed Import

* New custom game and custom rules screen

RulePreset is now a Gamemode (because each of them has a different goal).
New button under Gamemode selection which opens a dialog to modify rules of gamemode.
Now without any mutually exclusive options

* Requested changes

* Applied some text sugestions

* Wrong waveInProgress message displaying fixed

* Unwanted text

* Text changes

* I broke git

* Fixed chrash

* More fixes

New rule : manyCores; needed for sanbox mode

* Visual fix

* Requested changes #1 : small oversights

* Moved respawning logic to Player

and another imports cleanup

* manyCores in now attackMode

* UI changes

* Given back waves to sandbox and integer input in custom rules

* Renamed functions in CustomRulesScreen

* SPACES... Actually one space...
2019-04-20 14:19:17 -04:00
Anuken
52cd4a77dd MechPad deselect / Flyer patrol tweak 2019-04-20 14:14:34 -04:00
Anuken
8a1da3c0ed Added mobile camera clamping / Mech pad tap power validation 2019-04-19 23:32:46 -04:00
Anuken
9d67c36c32 Cleanup, bugfixes 2019-04-19 23:07:21 -04:00
Anuken
f283709e62 Removed NumberUtils 2019-04-19 11:39:47 -04:00
Anuken
5035559b08 Net cleanup 2019-04-17 23:45:42 -04:00
Anuken
01e1438382 Switched to ArcNet networking extension 2019-04-17 21:59:26 -04:00
Anuken
4eee472043 Blend fix 2019-04-16 20:31:40 -04:00
Anuken
5f89a1b9ca Sprite updates 2019-04-16 20:30:47 -04:00
Anuken
b9db5ad662 Added block cracks 2019-04-16 12:15:06 -04:00
Anuken
5b8084e1fa Solid bush block 2019-04-16 00:49:14 -04:00
Anuken
ab67b67e4c Updated environmental sprites 2019-04-15 22:52:44 -04:00
Anuken
f825931f92 Consistent output timer 2019-04-15 18:53:31 -04:00
Anuken
6113edf2ce Made fortress mechs keep walking when attacking 2019-04-15 18:40:10 -04:00
Anuken
8413443c26 Tech tree usability improvements / Bugfixes 2019-04-15 18:32:32 -04:00
Anuken
f67fb31bc5 Updated craters map 2019-04-14 21:44:01 -04:00
Anuken
d321ec5ed1 Fixed impact reactor not requiring blast compound 2019-04-14 10:37:15 -04:00
Anuken
084ae184f9 Fixed core inventory persistence bug 2019-04-14 10:18:18 -04:00
Anuken
d1ec652f7b More blasting 2019-04-13 19:55:06 -04:00
Anuken
7a2a6586be Fixed nuclear reactor not exploding properly 2019-04-13 17:45:53 -04:00
Anuken
392dcf3092 Made frozen forest less constricted / Tree block fix / Server crash fix 2019-04-13 17:32:49 -04:00
Anuken
8a983c784d Added missing jcenter repository 2019-04-13 14:57:26 -04:00
Anuken
a443263439 Updated Discord RPC 2019-04-13 14:41:56 -04:00
Anuken
3e766b9f54 Merge branch 'remove-link-byte' of https://github.com/Anuken/Mindustry 2019-04-13 11:04:43 -04:00
Anuken
89b9501f35 Fixed tree color 2019-04-13 11:04:36 -04:00
Anuken
816ae84005 Overlay testing 2019-04-12 23:03:34 -04:00
Anuken
c0e425cf46 Fixed drones being useless 2019-04-12 16:05:30 -04:00
Anuken
9ebb4c7d12 Removed link byte, replaced with rotation 2019-04-12 15:30:34 -04:00
Anuken
46c3b35028 Generic overlay tiles 2019-04-12 15:10:10 -04:00
Anuken
ef2b8be726 Cleaned up some sprites 2019-04-11 22:52:29 -04:00
Anuken
df51078858 New generation 2019-04-11 16:41:46 -04:00
Anuken
5783b61631 Bugfixes 2019-04-10 17:47:22 -04:00
Anuken
98a53381fb Testing more procedural generation 2019-04-09 23:40:29 -04:00
Anuken
daccfa5fe3 Procedural zone generation 2019-04-09 22:52:38 -04:00
Anuken
d82c24616f Fixed tests 2019-04-09 13:45:38 -04:00
Anuken
905ca3dcfc Balance 2019-04-09 13:19:55 -04:00
Anuken
b4fb687c4f Coal centrifuge / In-game chat / Player health rule / Bugfixes 2019-04-09 12:44:07 -04:00
Anuken
39fb2ae5ab Net fixes 2019-04-08 18:33:22 -04:00
Anuken
b40beb0d1d Source reformat 2019-04-08 09:03:18 -04:00
Anuken
4a96b9bb00 Force projector allocation fix 2019-04-08 08:38:36 -04:00
Anuken
f83a178982 Removed useless net logging 2019-04-08 08:37:13 -04:00
Anuken
986b4276e1 Less snapshots per second 2019-04-07 18:19:38 -04:00
Anuken
6f6f418ec9 Fixed save/multiplayer sync bugs 2019-04-07 17:36:28 -04:00
Anuken
1463571cd7 Input fix 2019-04-07 16:58:22 -04:00
Anuken
7dfb0a81e3 Test fixes 2019-04-07 14:53:53 -04:00
Anuken
9699d9467a New tests / Bugfixes 2019-04-07 14:09:34 -04:00
Anuken
08a2872527 Bugfixes 2019-04-07 11:25:08 -04:00
Anuken
7c81a807ea Generator fixes 2019-04-06 10:04:00 -04:00
Anuken
3bf7031e6a Fixed cryofluid mixer 2019-04-05 20:48:13 -04:00
Anuken
503fc980f4 Bugfixes 2019-04-05 14:10:01 -04:00
Anuken
efed11eb97 stuff 2019-04-05 09:26:31 -04:00
Anuken
330820062f Fixed multiblock exploit 2019-04-04 23:53:51 -04:00
Anuken
45d157fe3f Minimap fixes 2019-04-04 23:34:09 -04:00
Anuken
812dea385c more bugfixes 2019-04-04 22:05:12 -04:00
키에르
c582bdea46 Update bundle_ko.properties (#439)
* Update bundle_ko.properties

* Update bundle_ko.properties

* Update bundle_ko.properties

* Update bundle_ko.properties

* Update bundle_ko.properties

* Update bundle_ko.properties

* Update bundle_ko.properties

* match orignal bundle

* Update bundle_ko.properties

* Update bundle_ko.properties
2019-04-04 19:59:09 -06:00
laohuaji233
e6c6a9381b Update bundle_zh_CN.properties (#440)
* Update bundle_zh_CN.properties

More translations and fixed some wrong words

* Update bundle_zh_CN.properties
2019-04-04 19:58:05 -06:00
VXF
4b4c0755c6 Update bundle_zh_CN.properties (#441) 2019-04-04 19:53:34 -06:00
Prosta4okua
aeb0539c91 Russian bundle (#443)
* Go build communism

* Update bundle_ru.properties

Last commit: minimap

* Update bundle_ru.properties

* Update bundle_ru.properties

* Update bundle_ru.properties

* Update bundle_ru.properties
2019-04-04 19:53:02 -06:00
Prosta4okua
9feafa45f5 Ukrainian bundle (#444)
* No. Routernism is better.

Last commit: bugfixes

* Update bundle_uk_UA.properties

Last commit: minimap

* Update bundle_uk_UA.properties

* Update bundle_uk_UA.properties

* Update bundle_uk_UA.properties
2019-04-04 19:52:09 -06:00
Math2128
927df391f3 Update bundle_fr.properties (#447)
* Update bundle_fr.properties

Haven't done much. If I have more time, I will work on it. If anyone else wants to contribute, make sure not to do the same as me ! :p

* Update bundle_fr.properties

* Update bundle_fr.properties

* Update bundle_fr.properties

Add a bit more. If anyone knows where to find all the filters in the game, please tell me. It'll help me get the word in context

* Update bundle_fr.properties

* Update bundle_fr.properties

* Update bundle_fr.properties

* Update bundle_fr.properties

* Update bundle_fr.properties
2019-04-04 19:50:59 -06:00
Anuken
cbef6adeb1 Crafter bugfixes 2019-04-04 21:49:45 -04:00
Anuken
2dee221861 Crash fix 2019-04-04 20:39:04 -04:00
Anuken
0b175cb25d Fixed release script using wrong folder 2019-04-04 19:36:15 -04:00
Anuken
0820338b55 Moved FPS counter once more / Pulverizer sprite fix 2019-04-04 19:31:17 -04:00
Anuken
a2b46eee6f Improved pixel zoom / Possible player duplicate glitch 2019-04-04 18:58:48 -04:00
Anuken
09a435320a Impact reactor display bugfix 2019-04-04 15:14:45 -04:00
Anuken
bf56200c06 Power amount message for buffered blocks 2019-04-04 15:06:27 -04:00
Anuken
2d18df2011 Multiplayer bugfixes / Balancing 2019-04-04 14:46:41 -04:00
Anuken
bab87c0da8 Default spawn limit bumped to 4 2019-04-04 00:05:59 -04:00
Anuken
148f272500 New rule modifiers 2019-04-04 00:03:19 -04:00
Anuken
6de4af727b JSON read/write generation 2019-04-03 22:24:14 -04:00
Anuken
75946b9d14 Explosion propagation 2019-04-03 09:39:11 -04:00
Anuken
1c63ee6743 Clean pixel zoom 2019-04-02 23:30:40 -04:00
Anuken
efdaf0d986 Balancing, tweaks and bugfixes 2019-04-02 22:43:20 -04:00
Anuken
3f6aeac33d Cleanup of new graphical options 2019-04-02 17:18:55 -04:00
Anuken
d9692004cc Shield optimization 2019-04-02 17:08:22 -04:00
Anuken
67a12eecad Bugfixes 2019-04-02 15:52:44 -04:00
Anuken
37999e0870 Risky building changes 2019-04-02 14:26:23 -04:00
Anuken
66dc1e94f5 Slight entity optimizations / Turret sprite fixes 2019-04-02 13:58:44 -04:00
Anuken
ebcce194a0 Turret coolant use balancing 2019-04-02 11:26:02 -04:00
Anuken
95eab94c80 Fixed liquid blocks not accepting liquids 2019-04-02 10:51:52 -04:00
Anuken
41a6dbe06c Basic minimap 2019-04-01 21:16:22 -04:00
Anuken
fa22b0ec12 Removed dead donations code 2019-04-01 18:51:49 -04:00
Anuken
be60a367e8 Removed donations library and Android support libraries 2019-04-01 18:46:11 -04:00
Anuken
608de34205 Updated bundles 2019-04-01 13:32:49 -04:00
Anuken
0a8f2edb05 Block update unit tests 2019-04-01 11:57:43 -04:00
Anuken
41b08f38c5 Fixed tests 2019-04-01 11:34:10 -04:00
Anuken
a83c0b2e9a "fixes" 2019-03-31 22:27:11 -04:00
Anuken
8f853c8f18 Back button cleanup 2019-03-31 18:26:52 -04:00
Anuken
b4071f6dcb Merge 2019-03-31 18:24:25 -04:00
Anuken
6b70418861 Cleanup 2019-03-31 18:20:38 -04:00
Anuken
de0235ad94 Sweeping rework 2019-03-31 17:49:15 -04:00
Anuken
c278c632b3 Back button quitting 2019-03-31 13:16:43 -04:00
Anuken
6392330e70 Optimizations / Very broken changes 2019-03-31 13:11:12 -04:00
Anuken
160ae4e244 Fixed startup crashing 2019-03-31 10:37:52 -04:00
Anuken
a6c9bd3182 Class cleanup 2019-03-30 23:23:57 -04:00
Anuken
801eadd8a8 Bugfixes 2019-03-30 19:10:06 -04:00
Anuken
211dab1297 Compilation cleanup 2019-03-30 18:48:54 -04:00
Anuken
0c3b39ffdc Merge branches 'avoidance-optimization' and 'master' of https://github.com/Anuken/Mindustry 2019-03-30 13:52:46 -04:00
Anuken
c31f88a318 Fixes 2019-03-30 13:01:55 -04:00
Anuken
e9eb981782 More optimization / Flying avoidance 2019-03-30 12:54:29 -04:00
Anuken
83bde8a781 Improved avoidance 2019-03-30 12:33:01 -04:00
Anuken
52f352bf94 Fixed nondeterministic drill item sorting 2019-03-30 10:16:48 -04:00
Anuken
b419a96d69 Mech balance / Re-added map screenshot 2019-03-30 00:17:29 -04:00
Anuken
eb3d5b62f5 Tweaks 2019-03-29 22:48:04 -04:00
Anuken
1c5f578d88 Initial implementation 2019-03-29 18:48:03 -04:00
Anuken
db3aae1388 Merge remote-tracking branch 'origin/master' 2019-03-29 18:15:31 -04:00
Anuken
0b08eb72a6 Bugfixes 2019-03-29 18:15:22 -04:00
Skybbles // L5474
cbc81376be pulverizer pulverises scrap not stone (#442) 2019-03-29 13:55:45 -06:00
Anuken
27e9901d05 Removed unused shadow methods; minor tweaks 2019-03-29 09:07:46 -04:00
Anuken
532c36677c Map preview block shadows 2019-03-28 22:23:59 -04:00
Anuken
0c20c6ecb7 Removed greek bundle temporarily, as font does not support it 2019-03-28 20:48:34 -04:00
Anuken
fbb3240ebb Hid 0-damage stat to prevent confusion 2019-03-28 19:20:09 -04:00
Anuken
855957b099 Broke all crafting 2019-03-27 23:24:07 -04:00
564 changed files with 19236 additions and 17405 deletions

View File

@@ -1,4 +1,3 @@
jdk: jdk:
- openjdk8 - openjdk8
script: script:

View File

@@ -3,7 +3,6 @@
package="io.anuke.mindustry"> package="io.anuke.mindustry">
<uses-feature android:glEsVersion="0x00020000" android:required="true"/> <uses-feature android:glEsVersion="0x00020000" android:required="true"/>
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
@@ -61,10 +60,6 @@
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name=".DonationsActivity"
android:theme="@style/GdxTheme" />
</application> </application>
</manifest> </manifest>

View File

@@ -8,7 +8,7 @@ buildscript {
} }
dependencies{ dependencies{
classpath 'com.android.tools.build:gradle:3.3.2' classpath 'com.android.tools.build:gradle:3.4.0'
} }
} }
@@ -27,9 +27,6 @@ repositories {
dependencies{ dependencies{
implementation project(":core") implementation project(":core")
implementation project(":net") implementation project(":net")
implementation 'com.android.support:support-v4:28.0.0'
implementation 'org.sufficientlysecure:donations:2.5'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation arcModule("backends:backend-android") implementation arcModule("backends:backend-android")
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi" natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
@@ -47,9 +44,9 @@ dependencies {
task deploy(type: Copy){ task deploy(type: Copy){
dependsOn "assembleRelease" dependsOn "assembleRelease"
from "build/outputs/apk/google/release/android-google-release.apk" from "build/outputs/apk/release/android-release.apk"
into "../deploy/" into "../deploy/"
rename ("android-google-release.apk", appName + "-android-" + getVersionString() + ".apk") rename("android-release.apk", appName + "-android-" + getVersionString() + ".apk")
} }
android{ android{
@@ -103,12 +100,6 @@ android {
flavorDimensions "google" flavorDimensions "google"
productFlavors {
google {
buildConfigField "boolean", "DONATIONS_GOOGLE", "true"
}
}
signingConfigs{ signingConfigs{
release{ release{
if(project.hasProperty("RELEASE_STORE_FILE")){ if(project.hasProperty("RELEASE_STORE_FILE")){

View File

@@ -9,6 +9,5 @@
# #
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target. # Project target.
target=android-19 target=android-19

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -1,32 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="#000">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="top"
android:adjustViewBounds="false"
android:contentDescription="background"
android:cropToPadding="false"
android:scaleType="centerCrop"
android:src="@drawable/background" />
<LinearLayout
android:id="@+id/donations_activity_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
</LinearLayout>
</RelativeLayout>
</LinearLayout>

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Mindustry</string>
<string-array name="donation_google_catalog_values">
<item>1 달러</item>
<item>2 달러</item>
<item>5 달러</item>
<item>10 달러</item>
<item>15 달러</item>
<item>25 달러</item>
<item>50 달러</item>
</string-array>
</resources>

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Mindustry</string>
<string-array name="donation_google_catalog_values">
<item>1 Доллар</item>
<item>2 Доллара</item>
<item>5 Долларов</item>
<item>10 Долларов</item>
<item>15 Долларов</item>
<item>25 Долларов</item>
<item>50 Долларов</item>
</string-array>
</resources>

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Mindustry</string>
<string-array name="donation_google_catalog_values">
<item>1 Доллар</item>
<item>2 Доллара</item>
<item>5 Долларів</item>
<item>10 Долларів</item>
<item>15 Долларів</item>
<item>25 Долларів</item>
<item>50 Долларів</item>
</string-array>
</resources>

View File

@@ -2,14 +2,5 @@
<resources> <resources>
<string name="app_name">Mindustry</string> <string name="app_name">Mindustry</string>
<string-array name="donation_google_catalog_values">
<item>1 Dollar</item>
<item>2 Dollars</item>
<item>5 Dollars</item>
<item>10 Dollars</item>
<item>15 Dollars</item>
<item>25 Dollars</item>
<item>50 Dollars</item>
</string-array>
</resources> </resources>

View File

@@ -10,11 +10,6 @@ import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.provider.Settings.Secure; import android.provider.Settings.Secure;
import android.telephony.TelephonyManager; import android.telephony.TelephonyManager;
import android.util.Log;
import com.google.android.gms.common.GoogleApiAvailability;
import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
import com.google.android.gms.common.GooglePlayServicesRepairableException;
import com.google.android.gms.security.ProviderInstaller;
import io.anuke.arc.Core; import io.anuke.arc.Core;
import io.anuke.arc.backends.android.surfaceview.AndroidApplication; import io.anuke.arc.backends.android.surfaceview.AndroidApplication;
import io.anuke.arc.backends.android.surfaceview.AndroidApplicationConfiguration; import io.anuke.arc.backends.android.surfaceview.AndroidApplicationConfiguration;
@@ -23,18 +18,15 @@ import io.anuke.arc.function.Consumer;
import io.anuke.arc.scene.ui.layout.Unit; import io.anuke.arc.scene.ui.layout.Unit;
import io.anuke.arc.util.Strings; import io.anuke.arc.util.Strings;
import io.anuke.arc.util.serialization.Base64Coder; import io.anuke.arc.util.serialization.Base64Coder;
import io.anuke.net.KryoClient;
import io.anuke.net.KryoServer;
import io.anuke.mindustry.core.Platform; import io.anuke.mindustry.core.Platform;
import io.anuke.mindustry.game.Saves.SaveSlot; import io.anuke.mindustry.game.Saves.SaveSlot;
import io.anuke.mindustry.io.SaveIO; import io.anuke.mindustry.io.SaveIO;
import io.anuke.mindustry.net.Net; import io.anuke.mindustry.net.Net;
import io.anuke.mindustry.ui.dialogs.FileChooser; import io.anuke.mindustry.ui.dialogs.FileChooser;
import io.anuke.mindustry.net.ArcNetClient;
import io.anuke.mindustry.net.ArcNetServer;
import java.io.File; import java.io.*;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList; import java.util.ArrayList;
import static io.anuke.mindustry.Vars.*; import static io.anuke.mindustry.Vars.*;
@@ -53,8 +45,8 @@ public class AndroidLauncher extends AndroidApplication{
Platform.instance = new Platform(){ Platform.instance = new Platform(){
@Override @Override
public void openDonations(){ public void hide(){
showDonations(); moveTaskToBack(true);
} }
@Override @Override
@@ -94,7 +86,7 @@ public class AndroidLauncher extends AndroidApplication{
if(checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED){ if(checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED){
perms.add(Manifest.permission.READ_EXTERNAL_STORAGE); perms.add(Manifest.permission.READ_EXTERNAL_STORAGE);
} }
requestPermissions(perms.toArray(new String[perms.size()]), PERMISSION_REQUEST_CODE); requestPermissions(perms.toArray(new String[0]), PERMISSION_REQUEST_CODE);
} }
} }
@@ -114,20 +106,13 @@ public class AndroidLauncher extends AndroidApplication{
} }
}; };
try{
ProviderInstaller.installIfNeeded(this);
}catch(GooglePlayServicesRepairableException e){
GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();
apiAvailability.getErrorDialog(this, e.getConnectionStatusCode(), 0).show();
}catch(GooglePlayServicesNotAvailableException e){
Log.e("SecurityException", "Google Play Services not available.");
}
if(doubleScaleTablets && isTablet(this.getContext())){ if(doubleScaleTablets && isTablet(this.getContext())){
Unit.dp.addition = 0.5f; Unit.dp.addition = 0.5f;
} }
config.hideStatusBar = true; config.hideStatusBar = true;
Net.setClientProvider(new KryoClient()); Net.setClientProvider(new ArcNetClient());
Net.setServerProvider(new KryoServer()); Net.setServerProvider(new ArcNetServer());
initialize(new Mindustry(), config); initialize(new Mindustry(), config);
checkFiles(getIntent()); checkFiles(getIntent());
} }
@@ -195,22 +180,8 @@ public class AndroidLauncher extends AndroidApplication{
} }
} }
private boolean isPackageInstalled(String packagename){
try{
getPackageManager().getPackageInfo(packagename, 0);
return true;
}catch(Exception e){
return false;
}
}
private boolean isTablet(Context context){ private boolean isTablet(Context context){
TelephonyManager manager = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE); TelephonyManager manager = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
return manager.getPhoneType() == TelephonyManager.PHONE_TYPE_NONE; return manager != null && manager.getPhoneType() == TelephonyManager.PHONE_TYPE_NONE;
}
private void showDonations(){
Intent intent = new Intent(this, DonationsActivity.class);
startActivity(intent);
} }
} }

View File

@@ -1,73 +0,0 @@
package io.anuke.mindustry;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.View;
import android.widget.Button;
import org.sufficientlysecure.donations.DonationsFragment;
public class DonationsActivity extends FragmentActivity{
/**
* Google
*/
private static final String GOOGLE_PUBKEY = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzG93KhpfBPKTo2jF0yxbWkkmMKwsPNM4SsMj1aDq7vv6n3R+mqJVfprOJxFfJh7JchXTflLIgiaKXFAiU70gJbMTniEWnEaFSxAeF09a7U0RjOwN+7rFwjCG91c2CpYxPanBTQP4zasc1ODPVzq4q6/4ByjhenN71V4WmR08NFIAodcfFPrOkDPil7i8y7cgcd1Ky53U0TS+LLYJttAK3XdTK4s7VE3I5IKoeNa4uwCmIM59R67q2k3cXjLk/nP6MP+y++EzHN/PTiR1sVg4dMP8K31RPw/1QNLPQwJz6Wc872oWwb7xo5gkoXbDc5WPPydsi8F3SyKNaYwzN6CDFQIDAQAB";
private static final String[] GOOGLE_CATALOG = new String[]{
"mindustry.donation.1", "mindustry.donation.2", "mindustry.donation.5",
"mindustry.donation.10", "mindustry.donation.15",
"mindustry.donation.25", "mindustry.donation.50"};
DonationsFragment donationsFragment;
/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setTheme(R.style.GdxTheme);
setContentView(R.layout.donations_activity);
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
if(BuildConfig.DONATIONS_GOOGLE){
donationsFragment = DonationsFragment.newInstance(BuildConfig.DEBUG, true, GOOGLE_PUBKEY, GOOGLE_CATALOG,
getResources().getStringArray(R.array.donation_google_catalog_values), false, null, null,
null, false, null, null, false, null);
}
ft.replace(R.id.donations_activity_container, donationsFragment, "donationsFragment");
ft.commit();
}
public void onStart(){
super.onStart();
Button b = findViewById(org.sufficientlysecure.donations.R.id.donations__google_android_market_donate_button);
b.setOnClickListener(view -> {
donationsFragment.donateGoogleOnClick(donationsFragment.getView());
b.setEnabled(false);
});
}
/**
* Needed for Google Play In-app Billing. It uses startIntentSenderForResult(). The result is not propagated to
* the Fragment like in startActivityForResult(). Thus we need to propagate manually to our Fragment.
*/
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data){
super.onActivityResult(requestCode, resultCode, data);
Button b = findViewById(org.sufficientlysecure.donations.R.id.donations__google_android_market_donate_button);
b.setEnabled(true);
FragmentManager fragmentManager = getSupportFragmentManager();
Fragment fragment = fragmentManager.findFragmentByTag("donationsFragment");
if(fragment != null){
fragment.onActivityResult(requestCode, resultCode, data);
}
}
}

View File

@@ -1,9 +1,6 @@
package io.anuke.annotations; package io.anuke.annotations;
import java.lang.annotation.ElementType; import java.lang.annotation.*;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
public class Annotations{ public class Annotations{

View File

@@ -1,7 +1,5 @@
package io.anuke.annotations; package io.anuke.annotations;
import io.anuke.annotations.MethodEntry;
import java.util.ArrayList; import java.util.ArrayList;
/** Represents a class witha list method entries to include in it. */ /** Represents a class witha list method entries to include in it. */

View File

@@ -1,8 +1,6 @@
package io.anuke.annotations; package io.anuke.annotations;
import io.anuke.annotations.Annotations.Loc; import io.anuke.annotations.Annotations.*;
import io.anuke.annotations.Annotations.PacketPriority;
import io.anuke.annotations.Annotations.Variant;
import javax.lang.model.element.ExecutableElement; import javax.lang.model.element.ExecutableElement;

View File

@@ -1,18 +1,13 @@
package io.anuke.annotations; package io.anuke.annotations;
import com.squareup.javapoet.FieldSpec; import com.squareup.javapoet.*;
import com.squareup.javapoet.JavaFile;
import com.squareup.javapoet.TypeSpec;
import io.anuke.annotations.Annotations.Loc; import io.anuke.annotations.Annotations.Loc;
import io.anuke.annotations.Annotations.Remote; import io.anuke.annotations.Annotations.Remote;
import io.anuke.annotations.IOFinder.ClassSerializer; import io.anuke.annotations.IOFinder.ClassSerializer;
import javax.annotation.processing.*; import javax.annotation.processing.*;
import javax.lang.model.SourceVersion; import javax.lang.model.SourceVersion;
import javax.lang.model.element.Element; import javax.lang.model.element.*;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.Modifier;
import javax.lang.model.element.TypeElement;
import javax.tools.Diagnostic.Kind; import javax.tools.Diagnostic.Kind;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;

View File

@@ -3,9 +3,7 @@ package io.anuke.annotations;
import com.squareup.javapoet.*; import com.squareup.javapoet.*;
import io.anuke.annotations.IOFinder.ClassSerializer; import io.anuke.annotations.IOFinder.ClassSerializer;
import javax.lang.model.element.Modifier; import javax.lang.model.element.*;
import javax.lang.model.element.TypeElement;
import javax.lang.model.element.VariableElement;
import javax.tools.Diagnostic.Kind; import javax.tools.Diagnostic.Kind;
import java.io.IOException; import java.io.IOException;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
@@ -25,7 +23,6 @@ public class RemoteReadGenerator{
/** /**
* Generates a class for reading remote invoke packets. * Generates a class for reading remote invoke packets.
*
* @param entries List of methods to use. * @param entries List of methods to use.
* @param className Simple target class name. * @param className Simple target class name.
* @param packageName Full target package name. * @param packageName Full target package name.

View File

@@ -4,10 +4,7 @@ import com.squareup.javapoet.*;
import io.anuke.annotations.Annotations.Loc; import io.anuke.annotations.Annotations.Loc;
import io.anuke.annotations.IOFinder.ClassSerializer; import io.anuke.annotations.IOFinder.ClassSerializer;
import javax.lang.model.element.ExecutableElement; import javax.lang.model.element.*;
import javax.lang.model.element.Modifier;
import javax.lang.model.element.TypeElement;
import javax.lang.model.element.VariableElement;
import javax.tools.Diagnostic.Kind; import javax.tools.Diagnostic.Kind;
import java.io.IOException; import java.io.IOException;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;

View File

@@ -5,13 +5,9 @@ import io.anuke.annotations.Annotations.Serialize;
import javax.annotation.processing.*; import javax.annotation.processing.*;
import javax.lang.model.SourceVersion; import javax.lang.model.SourceVersion;
import javax.lang.model.element.Modifier; import javax.lang.model.element.*;
import javax.lang.model.element.TypeElement;
import javax.lang.model.element.VariableElement;
import javax.lang.model.util.ElementFilter; import javax.lang.model.util.ElementFilter;
import java.io.DataInput; import java.io.*;
import java.io.DataOutput;
import java.io.IOException;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
@@ -50,8 +46,21 @@ public class SerializeAnnotationProcessor extends AbstractProcessor{
classBuilder.addJavadoc(RemoteMethodAnnotationProcessor.autogenWarning); classBuilder.addJavadoc(RemoteMethodAnnotationProcessor.autogenWarning);
MethodSpec.Builder method = MethodSpec.methodBuilder("init").addModifiers(Modifier.PUBLIC, Modifier.STATIC); MethodSpec.Builder method = MethodSpec.methodBuilder("init").addModifiers(Modifier.PUBLIC, Modifier.STATIC);
TypeName jsonType = ClassName.bestGuess("io.anuke.arc.util.serialization.Json");
TypeName jsonValueType = ClassName.bestGuess("io.anuke.arc.util.serialization.JsonValue");
TypeName ubJsonWriterType = ClassName.bestGuess("io.anuke.arc.util.serialization.UBJsonWriter");
TypeName ubJsonReaderType = ClassName.bestGuess("io.anuke.arc.util.serialization.UBJsonReader");
classBuilder.addField(jsonType, "bjson", Modifier.STATIC, Modifier.PRIVATE);
classBuilder.addField(ubJsonReaderType, "bjsonReader", Modifier.STATIC, Modifier.PRIVATE);
classBuilder.addStaticBlock(CodeBlock.builder()
.addStatement("bjson = new " + jsonType + "()")
.addStatement("bjsonReader = new " + ubJsonReaderType + "()")
.build());
for(TypeElement elem : elements){ for(TypeElement elem : elements){
TypeName type = TypeName.get(elem.asType()); TypeName type = TypeName.get(elem.asType());
String simpleTypeName = type.toString().substring(type.toString().lastIndexOf('.') + 1);
TypeSpec.Builder serializer = TypeSpec.anonymousClassBuilder("") TypeSpec.Builder serializer = TypeSpec.anonymousClassBuilder("")
.addSuperinterface(ParameterizedTypeName.get( .addSuperinterface(ParameterizedTypeName.get(
@@ -70,11 +79,24 @@ public class SerializeAnnotationProcessor extends AbstractProcessor{
.addException(IOException.class) .addException(IOException.class)
.addModifiers(Modifier.PUBLIC); .addModifiers(Modifier.PUBLIC);
MethodSpec.Builder jsonWriteMethod = MethodSpec.methodBuilder("write" + simpleTypeName + "Json")
.returns(void.class)
.addParameter(jsonType, "json")
.addParameter(type, "object")
.addModifiers(Modifier.PUBLIC, Modifier.STATIC);
MethodSpec.Builder jsonReadMethod = MethodSpec.methodBuilder("read" + simpleTypeName + "Json")
.returns(type)
.addParameter(jsonValueType, "value")
.addModifiers(Modifier.PUBLIC, Modifier.STATIC);
readMethod.addStatement("$L object = new $L()", type, type); readMethod.addStatement("$L object = new $L()", type, type);
jsonReadMethod.addStatement("$L object = new $L()", type, type);
List<VariableElement> fields = ElementFilter.fieldsIn(Utils.elementUtils.getAllMembers(elem)); List<VariableElement> fields = ElementFilter.fieldsIn(Utils.elementUtils.getAllMembers(elem));
for(VariableElement field : fields){ for(VariableElement field : fields){
if(field.getModifiers().contains(Modifier.STATIC) || field.getModifiers().contains(Modifier.TRANSIENT) || field.getModifiers().contains(Modifier.PRIVATE)) continue; if(field.getModifiers().contains(Modifier.STATIC) || field.getModifiers().contains(Modifier.TRANSIENT) || field.getModifiers().contains(Modifier.PRIVATE))
continue;
String name = field.getSimpleName().toString(); String name = field.getSimpleName().toString();
String typeName = Utils.typeUtils.erasure(field.asType()).toString().replace('$', '.'); String typeName = Utils.typeUtils.erasure(field.asType()).toString().replace('$', '.');
@@ -83,6 +105,9 @@ public class SerializeAnnotationProcessor extends AbstractProcessor{
if(field.asType().getKind().isPrimitive()){ if(field.asType().getKind().isPrimitive()){
writeMethod.addStatement("stream.write" + capName + "(object." + name + ")"); writeMethod.addStatement("stream.write" + capName + "(object." + name + ")");
readMethod.addStatement("object." + name + "= stream.read" + capName + "()"); readMethod.addStatement("object." + name + "= stream.read" + capName + "()");
jsonWriteMethod.addStatement("json.writeValue(\"" + name + "\", object." + name + ")");
jsonReadMethod.addStatement("if(value.has(\"" + name + "\")) object." + name + "= value.get" + capName + "(\"" + name + "\")");
}else{ }else{
writeMethod.addStatement("io.anuke.arc.Core.settings.getSerializer(" + typeName + ".class).write(stream, object." + name + ")"); writeMethod.addStatement("io.anuke.arc.Core.settings.getSerializer(" + typeName + ".class).write(stream, object." + name + ")");
readMethod.addStatement("object." + name + " = (" + typeName + ")io.anuke.arc.Core.settings.getSerializer(" + typeName + ".class).read(stream)"); readMethod.addStatement("object." + name + " = (" + typeName + ")io.anuke.arc.Core.settings.getSerializer(" + typeName + ".class).read(stream)");
@@ -90,22 +115,47 @@ public class SerializeAnnotationProcessor extends AbstractProcessor{
} }
readMethod.addStatement("return object"); readMethod.addStatement("return object");
jsonReadMethod.addStatement("return object");
serializer.addMethod(writeMethod.build()); serializer.addMethod(writeMethod.build());
serializer.addMethod(readMethod.build()); serializer.addMethod(readMethod.build());
method.addStatement("io.anuke.arc.Core.settings.setSerializer($N, $L)", Utils.elementUtils.getBinaryName(elem).toString().replace('$', '.') + ".class", serializer.build()); method.addStatement("io.anuke.arc.Core.settings.setSerializer($N, $L)", Utils.elementUtils.getBinaryName(elem).toString().replace('$', '.') + ".class", serializer.build());
String sname = type.toString().substring(type.toString().lastIndexOf('.') + 1); name(writeMethod, "write" + simpleTypeName);
name(readMethod, "read" + simpleTypeName);
name(writeMethod, "write" + sname);
name(readMethod, "read" + sname);
writeMethod.addModifiers(Modifier.STATIC); writeMethod.addModifiers(Modifier.STATIC);
readMethod.addModifiers(Modifier.STATIC); readMethod.addModifiers(Modifier.STATIC);
classBuilder.addMethod(writeMethod.build()); classBuilder.addMethod(writeMethod.build());
classBuilder.addMethod(readMethod.build()); classBuilder.addMethod(readMethod.build());
classBuilder.addMethod(jsonWriteMethod.build());
classBuilder.addMethod(jsonReadMethod.build());
MethodSpec.Builder binaryJsonWriteMethod = MethodSpec.methodBuilder("write" + simpleTypeName + "StreamJson")
.returns(void.class)
.addParameter(DataOutput.class, "stream")
.addParameter(type, "object")
.addException(IOException.class)
.addModifiers(Modifier.PUBLIC, Modifier.STATIC)
.addStatement("java.io.StringWriter output = new java.io.StringWriter()")
.addStatement("bjson.setWriter(output)")
.addStatement("bjson.writeObjectStart(" + type + ".class, " + type + ".class)")
.addStatement("write" + simpleTypeName + "Json(bjson, object)")
.addStatement("bjson.writeObjectEnd()")
.addStatement("stream.writeUTF(output.toString())");
MethodSpec.Builder binaryJsonReadMethod = MethodSpec.methodBuilder("read" + simpleTypeName + "StreamJson")
.returns(type)
.addParameter(DataInput.class, "stream")
.addException(IOException.class)
.addModifiers(Modifier.PUBLIC, Modifier.STATIC)
.addStatement("return read" + simpleTypeName + "Json(bjson.fromJson(null, stream.readUTF()))");
classBuilder.addMethod(binaryJsonWriteMethod.build());
classBuilder.addMethod(binaryJsonReadMethod.build());
} }
classBuilder.addMethod(method.build()); classBuilder.addMethod(method.build());

View File

@@ -1,25 +1,22 @@
package io.anuke.annotations; package io.anuke.annotations;
import com.squareup.javapoet.JavaFile; import com.squareup.javapoet.*;
import com.squareup.javapoet.MethodSpec;
import com.squareup.javapoet.TypeName;
import com.squareup.javapoet.TypeSpec;
import io.anuke.annotations.Annotations.Struct; import io.anuke.annotations.Annotations.Struct;
import io.anuke.annotations.Annotations.StructField; import io.anuke.annotations.Annotations.StructField;
import javax.annotation.processing.*; import javax.annotation.processing.*;
import javax.lang.model.SourceVersion; import javax.lang.model.SourceVersion;
import javax.lang.model.element.Modifier; import javax.lang.model.element.*;
import javax.lang.model.element.TypeElement;
import javax.lang.model.element.VariableElement;
import javax.lang.model.type.TypeKind; import javax.lang.model.type.TypeKind;
import javax.lang.model.util.ElementFilter; import javax.lang.model.util.ElementFilter;
import javax.tools.Diagnostic.Kind; import javax.tools.Diagnostic.Kind;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
/**Generates ""value types"" classes that are packed into integer primitives of the most aproppriate size. /**
* It would be nice if Java didn't make crazy hacks like this necessary.*/ * Generates ""value types"" classes that are packed into integer primitives of the most aproppriate size.
* It would be nice if Java didn't make crazy hacks like this necessary.
*/
@SupportedSourceVersion(SourceVersion.RELEASE_8) @SupportedSourceVersion(SourceVersion.RELEASE_8)
@SupportedAnnotationTypes({ @SupportedAnnotationTypes({
"io.anuke.annotations.Annotations.Struct" "io.anuke.annotations.Annotations.Struct"

View File

@@ -89,7 +89,8 @@ allprojects{
try{ try{
pfile.createNewFile() pfile.createNewFile()
}catch(Exception ignored){} }catch(Exception ignored){
}
if(pfile.exists()){ if(pfile.exists()){
props.load(new FileInputStream(pfile)) props.load(new FileInputStream(pfile))
@@ -112,6 +113,7 @@ allprojects{
maven{ url "https://oss.sonatype.org/content/repositories/snapshots/" } maven{ url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven{ url "https://oss.sonatype.org/content/repositories/releases/" } maven{ url "https://oss.sonatype.org/content/repositories/releases/" }
maven{ url 'https://jitpack.io' } maven{ url 'https://jitpack.io' }
jcenter()
} }
} }
@@ -128,7 +130,7 @@ project(":desktop"){
compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop" compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
compile arcModule("backends:backend-lwjgl3") compile arcModule("backends:backend-lwjgl3")
compile 'com.github.MinnDevelopment:java-discord-rpc:v2.0.0' compile 'com.github.MinnDevelopment:java-discord-rpc:v2.0.2'
} }
} }
@@ -174,32 +176,10 @@ project(":core"){
generateLocales() generateLocales()
} }
task cleanGen{
doFirst{
delete{
delete "../core/src/io/anuke/mindustry/gen/"
}
}
}
task copyGen{
doLast{
copy{
from("../core/build/classes/java/main/io/anuke/mindustry/gen/"){
include "**/*.java"
}
into "../core/src/io/anuke/mindustry/gen"
}
}
}
dependencies{ dependencies{
compileJava.dependsOn(cleanGen)
compileJava.finalizedBy(copyGen)
compile arcModule("arc-core") compile arcModule("arc-core")
compile arcModule("extensions:freetype") compile arcModule("extensions:freetype")
compile arcModule("extensions:arcnet")
if(localArc() && debugged()) compile arcModule("extensions:recorder") if(localArc() && debugged()) compile arcModule("extensions:recorder")
compileOnly project(":annotations") compileOnly project(":annotations")
@@ -256,7 +236,6 @@ project(":net"){
dependencies{ dependencies{
compile project(":core") compile project(":core")
compile "org.lz4:lz4-java:1.4.1" compile "org.lz4:lz4-java:1.4.1"
compile 'com.github.Anuken:kryonet:a64d2280880e80566ca1bdaffa55de43e51cad38'
compile 'com.github.Anuken:WaifUPnP:05eb46bc577fd7674596946ba288c96c0cedd893' compile 'com.github.Anuken:WaifUPnP:05eb46bc577fd7674596946ba288c96c0cedd893'
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 B

View File

@@ -4,5 +4,5 @@
flattenPaths: true, flattenPaths: true,
maxWidth: 2048, maxWidth: 2048,
maxHeight: 2048, maxHeight: 2048,
fast: true, fast: true
} }

View File

@@ -4,5 +4,5 @@
flattenPaths: true, flattenPaths: true,
maxWidth: 1024, maxWidth: 1024,
maxHeight: 1024, maxHeight: 1024,
fast: true, fast: true
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 B

View File

@@ -4,5 +4,5 @@
flattenPaths: true, flattenPaths: true,
maxWidth: 2048, maxWidth: 2048,
maxHeight: 2048, maxHeight: 2048,
fast: true, fast: true
} }

View File

@@ -4,5 +4,5 @@
flattenPaths: true, flattenPaths: true,
maxWidth: 1024, maxWidth: 1024,
maxHeight: 1024, maxHeight: 1024,
fast: true, fast: true
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

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