Compare commits

..

221 Commits
v72 ... v77

Author SHA1 Message Date
Anuken
cb3bbd169f Map temporarily removed 2019-06-07 08:57:51 -04:00
Anuken
ab107bfc0d Additional default wave tweaks 2019-06-07 08:49:41 -04:00
Anuken
d0b5b49bf8 Fixed many various bugs 2019-06-06 23:29:21 -04:00
Anuken
1b4b1d5c9f Maps updated / 100 starting copper in custom maps 2019-06-06 22:45:25 -04:00
Anuken
aee800ab7a Changed turret outlines / Wall block tweaks 2019-06-06 21:18:54 -04:00
Anuken
895b46307a Sprite tweaks 2019-06-06 18:47:53 -04:00
Anuken
d300d45f22 Fixed unit factory sprites 2019-06-06 15:38:19 -04:00
Anuken
1897008c72 Pump sprites 2019-06-06 10:27:11 -04:00
Anuken
3942c6cd55 Even more sprites cleaned up 2019-06-06 00:28:09 -04:00
Anuken
f0f7b5aaf7 Updated sprites 2019-06-05 21:29:34 -04:00
Anuken
80bdaa1edc Cleanup 2019-06-04 23:30:07 -04:00
Anuken
39acb224d1 Merged replacement sprites. Scaling is now disabled by default. 2019-06-04 22:54:01 -04:00
Anuken
f51d565db8 Darker decals / map tweaks 2019-06-04 22:06:17 -04:00
Anuken
d608cf6536 Fixed player respawning at editor location 2019-06-04 20:52:58 -04:00
Anuken
0b49bd1985 Pathfinding tweak / Doors now update pathfinding 2019-06-04 17:10:45 -04:00
Anuken
fce69005a9 Islands map 2019-06-03 22:09:43 -04:00
Anuken
b73420b156 Added map assets 2019-06-02 23:15:36 -04:00
Anuken
fb863cb39b Editor bugfixes / Median filter 2019-06-02 17:45:44 -04:00
Anuken
8247ff15ed Fixed invalid phase weaver shader 2019-06-02 10:42:44 -04:00
Anuken
af8db9062c Balance 2019-06-01 23:16:59 -04:00
Anuken
88d5e1cca8 Fixed low-FPS pad orbiting 2019-06-01 15:16:10 -04:00
Anuken
57544e615f Removed event inheritance 2019-06-01 14:24:52 -04:00
Anuken
61a92d55ae Balance / UUID logging in d/c messages 2019-05-31 19:55:09 -04:00
Anuken
940965f03d .mmap file importing / Better exception parsing 2019-05-31 10:24:51 -04:00
Anuken
30a254e9be decoupling editor/MapEditor from editor/OperationStack (#504) 2019-05-31 09:11:16 -04:00
Anuken
581782af28 Mass driver power fix / Bugfixes 2019-05-31 09:10:37 -04:00
Anuken
72cad1409f Bugfixes / Balance of fuse 2019-05-30 23:05:15 -04:00
Anuken
e7e4985761 Fixed maps converting improperly / Minor balancing 2019-05-30 20:47:47 -04:00
Anuken
a3454e50d7 Merge 2019-05-30 00:27:05 -04:00
Anuken
75b8f5e543 Properly rounded sprites for 'source/sorter' blocks 2019-05-29 23:42:03 -04:00
Anuken
1a0b22ef15 Overflow gate delay 2019-05-29 22:57:32 -04:00
Anuken
bc78d1a561 Balancing 2019-05-29 22:29:49 -04:00
Anuken
00b953a04e Spawnpoint repultion 2019-05-29 21:41:56 -04:00
Doyoung Gwak
aa0ef529f5 decoupling editor/MapEditor from editor/OperationStack 2019-05-29 00:04:42 +09:00
Anuken
bd134bf9c9 Cleanup 2019-05-28 09:24:13 -04:00
Anuken
752267c521 Fixed many various map bugs 2019-05-26 16:46:44 -04:00
Anuken
34635e3460 Fixed fire not syncing 2019-05-26 11:03:49 -04:00
Anuken
ba0b4513f1 New tile transitions 2019-05-25 23:56:21 -04:00
Anuken
4764808450 Merge remote-tracking branch 'origin/master' 2019-05-25 21:10:47 -04:00
Anuken
c66fd67510 Fixed #500 / Fixed units not appearing in edited maps 2019-05-25 21:10:42 -04:00
Fenr1r
3997ca6454 Minor fix - rename some variable on editor. (#495)
- editor/EditorTool.java
- editor/MapInfoDialog.java
- editor/MapRenderer.java
2019-05-25 12:08:00 -04:00
Anuken
4242100c53 More descriptive entity load errors 2019-05-25 12:01:55 -04:00
Anuken
32adcc3676 Merge remote-tracking branch 'origin/master' 2019-05-22 21:07:13 -04:00
Anuken
80c26606f0 Fixed unit duplication 2019-05-22 21:07:08 -04:00
Fenr1r
a7852098f1 Remove code duplication and rename set/get method on editor/DrawOperation.java (#496)
- remove code duplication in undo and redo method
- rename set/get method to setTile/getTile
2019-05-22 10:06:43 -04:00
Anuken
bdb7f522fb Balancing / Item tweaks 2019-05-19 17:50:11 -04:00
Anuken
2461331e32 Fixed wave turret being sporadic / Fixed unnecessary fluid usage 2019-05-19 09:09:22 -04:00
Anuken
3464f40da3 Fixed unit pads, rule selection, gameover state 2019-05-18 10:02:36 -04:00
Anuken
3b2b79d539 Buffed impact reactor 2019-05-17 18:10:03 -04:00
Anuken
8616fc6b05 Made invalid legacy maps be properly discarded 2019-05-16 17:15:22 -04:00
Anuken
9e9c001422 Cleanup 2019-05-16 15:16:17 -04:00
Anuken
93bbd34055 ...except overflow gates 2019-05-16 11:44:02 -04:00
Anuken
cac953e812 Buffers for everything 2019-05-16 11:43:02 -04:00
Anuken
aeb3662414 Bugfixes 2019-05-15 17:40:31 -04:00
Anuken
2888e87bb8 Map conversion fix 2019-05-14 16:38:49 -04:00
Anuken
094ebb8020 Removed some TODOs 2019-05-14 13:18:05 -04:00
Anuken
54ad52edc2 Merging of map saves 2019-05-14 11:54:22 -04:00
Anuken
0e869f3cb5 Fixed rules not saving / Memory usage reduction 2019-05-14 11:48:14 -04:00
Anuken
4d40af6ac0 More helpful in-game edit button 2019-05-13 11:47:38 -04:00
Anuken
79a2f31056 Fixed unit tests 2019-05-13 11:32:57 -04:00
Anuken
b2341bf75c Added map default rule editing 2019-05-13 11:31:25 -04:00
Anuken
c4c4b473e5 Server cleanup 2019-05-13 00:43:06 -04:00
Anuken
6e26ccf25d Removed unnecessary inheritance 2019-05-12 23:50:33 -04:00
Anuken
83bfad3546 Fixed server compilation 2019-05-12 20:01:59 -04:00
Anuken
90f6fff1ae Layout fixes 2019-05-12 19:55:26 -04:00
Anuken
52f2b52990 Somewhat functional rule selection 2019-05-12 19:43:23 -04:00
Anuken
48ed4b0e49 Fixed startup crash / Fixed editor rule issue 2019-05-12 12:51:25 -04:00
Anuken
c3c609e7b9 Fixed invisible enemies 2019-05-12 12:38:40 -04:00
Anuken
6cd8fa6b0c Removed unused support library dependency 2019-05-12 12:16:46 -04:00
Anuken
ffb6d398d7 Layout fixes 2019-05-12 12:00:19 -04:00
Anuken
52674b4668 Mobile diagonal toggle / Cancel button moved 2019-05-12 11:19:31 -04:00
Anuken
4ae2370137 New WIP custom map selection 2019-05-12 10:32:08 -04:00
Anuken
e5d19a9819 Entity placement/removal 2019-05-11 21:42:06 -04:00
Anuken
dd75d88d2f Unit creation, team switch 2019-05-11 12:32:13 -04:00
Anuken
65ea01218a Fixed core-less editor gameover, respawning 2019-05-11 00:58:13 -04:00
Anuken
7a2234cd25 Tweaks to improve in-game editing 2019-05-11 00:37:29 -04:00
Anuken
11ede2756e Functional in-game map edits and loading 2019-05-10 20:25:09 -04:00
Anuken
3e51fab387 In-game editing (broken) 2019-05-10 19:13:55 -04:00
Anuken
962f413421 Cleanup 2019-05-10 16:16:21 -04:00
Anuken
ae6c938abb Merge remote-tracking branch 'origin/master' 2019-05-10 16:02:15 -04:00
Anuken
68faae69c5 Fixed compilation errors / Re-added basic trace dialog 2019-05-10 16:02:05 -04:00
Anuken
d6be07f1b8 Fixed crash 2019-05-10 13:42:04 -04:00
Anuken
064a012b25 Map previews functional 2019-05-10 12:57:45 -04:00
Anuken
d26f533111 Basic non-in-game editor functionality 2019-05-10 00:01:48 -04:00
Anuken
69575dbab3 Fixed multiblocks not drawing 2019-05-09 18:10:12 -04:00
Anuken
9f4a430412 Fixed tests 2019-05-09 14:39:52 -04:00
Anuken
23843be981 More bugfix stuff 2019-05-09 12:57:00 -04:00
Anuken
486e3ffc0a Actual map conversion, loading of saves 2019-05-09 10:53:52 -04:00
Anuken
8127e5a66f Made save format actually functional, many things still broken 2019-05-08 23:16:08 -04:00
Anuken
53167a3b52 Map conversion code 2019-05-07 17:30:37 -04:00
Anuken
1b77247c40 wow it builds 2019-05-07 11:56:17 -04:00
Leone25
24374cf7e3 Update bundle_it.properties (#490)
please merge as soon as possible
2019-05-07 09:34:42 -04:00
Anuken
88de54ec90 Further unfinished map tweaks 2019-05-06 18:32:18 -04:00
Anuken
3035d569cc Editor<->world data merging 2019-05-06 17:03:53 -04:00
Anuken
51f9ad5a2c many things 2019-05-06 14:34:21 -04:00
Anuken
20fbe2fbbe even less broken 2019-05-05 22:09:02 -04:00
Anuken
bf073a84c8 a bit less broken but still broken 2019-05-05 19:05:46 -04:00
Anuken
35b158dba7 everything is borked 2019-05-05 14:16:34 -04:00
Anuken
eb4f6f2e9f Merge branch 'master' of https://github.com/Anuken/Mindustry into save-rewrite 2019-05-05 12:39:38 -04:00
Anuken
0ff56e3a68 Fixed meltdown not firing when cheating 2019-05-05 12:36:30 -04:00
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
af67690e75 WIP save refactoring 2019-05-05 11:36:38 -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
1113 changed files with 21796 additions and 18158 deletions

View File

@@ -1,11 +1,10 @@
jdk: jdk:
- openjdk8 - openjdk8
script: script:
- "git clone --depth=1 --branch=master https://github.com/Anuken/Arc ../Arc" - "git clone --depth=1 --branch=master https://github.com/Anuken/Arc ../Arc"
- "./gradlew test" - "./gradlew test"
- "./gradlew desktop:dist -Pbuildversion=${TRAVIS_TAG:1}" - "./gradlew desktop:dist -Pbuildversion=${TRAVIS_TAG:1}"
- "./gradlew server:dist -Pbuildversion=${TRAVIS_TAG:1}" - "./gradlew server:dist -Pbuildversion=${TRAVIS_TAG:1}"
deploy: deploy:
provider: releases provider: releases
@@ -14,8 +13,8 @@ deploy:
api_key: api_key:
secure: Cv5wFtWt62/A24EvSEQvMow7gKPbZ3oATEFPuSghhB2TQz1dA40Zee3Qvk4LFlpLrhYo4K0ZSczCZRGpR+hCd8+Dpww52bheYEvWuh3ZQfvu/fXtEx2j5PwP1qMpmIgSxETV/gkD7l9FImdh0VzktYiAvQfmi0bEocG9/D4QwjFpNat7iwBdcMiw1MvAygpdIWRsjiw0RKlB2mWarmoHhQ7Gu7qlU3j50uaEvcrtmU0pBUPggNQwQRv32i9NPvNFxrqqlUjDLIS8JFea99zCkp8BwYqbEvBIMzd+Qip1/stLJJA3+cDUClbsDtg8rAVetzpOrdLEEBmqShFe5MDl2yEHcsgpN9CFsyTaUfvB3P3rVjizvycMm42IsUkXQiarm5xTQ/TIA8Rd8AHiSKuweNCg1Fd5SFaRtKy8JVLXuxyfUccmyje6hhz2L4lS2Wfj3mAG7sqZUCXhWP79EKdGkiPOjKv4CwXEKmuH3BMVqPlNUZJr9Eg3sV1FG0h2l+MVOOnR635qdUbb49sYojYxVruMLX0BH1c4ZCu230m8CUoWA1Em1QNI75ya7+9Y5T6AsgWDVpBvdUo9fWNbdp+VQ0GskFQsJD5wtnxbcbHeFiERAgGBm7z6qt9u9LrQpBH+dsW52ADvYsu3L4nQEa+sdMHwTTwmGY+iUvsxu0DqxGg= secure: Cv5wFtWt62/A24EvSEQvMow7gKPbZ3oATEFPuSghhB2TQz1dA40Zee3Qvk4LFlpLrhYo4K0ZSczCZRGpR+hCd8+Dpww52bheYEvWuh3ZQfvu/fXtEx2j5PwP1qMpmIgSxETV/gkD7l9FImdh0VzktYiAvQfmi0bEocG9/D4QwjFpNat7iwBdcMiw1MvAygpdIWRsjiw0RKlB2mWarmoHhQ7Gu7qlU3j50uaEvcrtmU0pBUPggNQwQRv32i9NPvNFxrqqlUjDLIS8JFea99zCkp8BwYqbEvBIMzd+Qip1/stLJJA3+cDUClbsDtg8rAVetzpOrdLEEBmqShFe5MDl2yEHcsgpN9CFsyTaUfvB3P3rVjizvycMm42IsUkXQiarm5xTQ/TIA8Rd8AHiSKuweNCg1Fd5SFaRtKy8JVLXuxyfUccmyje6hhz2L4lS2Wfj3mAG7sqZUCXhWP79EKdGkiPOjKv4CwXEKmuH3BMVqPlNUZJr9Eg3sV1FG0h2l+MVOOnR635qdUbb49sYojYxVruMLX0BH1c4ZCu230m8CUoWA1Em1QNI75ya7+9Y5T6AsgWDVpBvdUo9fWNbdp+VQ0GskFQsJD5wtnxbcbHeFiERAgGBm7z6qt9u9LrQpBH+dsW52ADvYsu3L4nQEa+sdMHwTTwmGY+iUvsxu0DqxGg=
file: file:
- "desktop/build/libs/desktop-release.jar" - "desktop/build/libs/desktop-release.jar"
- "server/build/libs/server-release.jar" - "server/build/libs/server-release.jar"
on: on:
repo: Anuken/Mindustry repo: Anuken/Mindustry
tags: true tags: true

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
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="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"/>
<application <application
android:resizeableActivity="false" android:resizeableActivity="false"
@@ -16,16 +16,16 @@
android:appCategory="game" android:appCategory="game"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/GdxTheme" android:fullBackupContent="@xml/backup_rules"> android:theme="@style/GdxTheme" android:fullBackupContent="@xml/backup_rules">
<meta-data android:name="android.max_aspect" android:value="2.1" /> <meta-data android:name="android.max_aspect" android:value="2.1"/>
<activity <activity
android:name="io.anuke.mindustry.AndroidLauncher" android:name="io.anuke.mindustry.AndroidLauncher"
android:label="@string/app_name" android:label="@string/app_name"
android:screenOrientation="user" android:screenOrientation="user"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout"> android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>
@@ -33,7 +33,7 @@
<category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/> <category android:name="android.intent.category.BROWSABLE"/>
<data android:mimeType="application/octet-stream"/> <data android:mimeType="application/octet-stream"/>
<data android:scheme="file" android:host="*" android:pathPattern=".*\\.mmap" /> <data android:scheme="file" android:host="*" android:pathPattern=".*\\.mmap"/>
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>
@@ -41,29 +41,25 @@
<category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/> <category android:name="android.intent.category.BROWSABLE"/>
<data android:mimeType="application/octet-stream"/> <data android:mimeType="application/octet-stream"/>
<data android:scheme="file" android:host="*" android:pathPattern=".*\\.msav" /> <data android:scheme="file" android:host="*" android:pathPattern=".*\\.msav"/>
</intent-filter> </intent-filter>
<intent-filter android:icon="@mipmap/ic_launcher" <intent-filter android:icon="@mipmap/ic_launcher"
android:label="Mindustry Map" android:label="Mindustry Map"
android:priority="1"> android:priority="1">
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="file" android:host="*" android:pathPattern=".*\\.mmap" android:mimeType="*/*" /> <data android:scheme="file" android:host="*" android:pathPattern=".*\\.mmap" android:mimeType="*/*"/>
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="file" android:host="*" android:pathPattern=".*\\.msav" android:mimeType="*/*" /> <data android:scheme="file" android:host="*" android:pathPattern=".*\\.msav" android:mimeType="*/*"/>
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name=".DonationsActivity"
android:theme="@style/GdxTheme" />
</application> </application>
</manifest> </manifest>

View File

@@ -1,30 +1,30 @@
buildscript { buildscript{
repositories { repositories{
mavenLocal() mavenLocal()
mavenCentral() mavenCentral()
google() google()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } maven{ url "https://oss.sonatype.org/content/repositories/snapshots/" }
jcenter() jcenter()
} }
dependencies { dependencies{
classpath 'com.android.tools.build:gradle:3.3.2' classpath 'com.android.tools.build:gradle:3.4.1'
} }
} }
apply plugin: "com.android.application" apply plugin: "com.android.application"
configurations { natives } configurations{ natives }
repositories { repositories{
mavenCentral() mavenCentral()
jcenter() jcenter()
maven { maven{
url "https://maven.google.com" url "https://maven.google.com"
} }
} }
dependencies { dependencies{
implementation project(":core") implementation project(":core")
implementation project(":net") implementation project(":net")
@@ -46,14 +46,14 @@ task deploy(type: Copy){
from "build/outputs/apk/release/android-release.apk" from "build/outputs/apk/release/android-release.apk"
into "../deploy/" into "../deploy/"
rename ("android-release.apk", appName + "-android-" + getVersionString() + ".apk") rename("android-release.apk", appName + "-android-" + getVersionString() + ".apk")
} }
android { android{
buildToolsVersion '28.0.3' buildToolsVersion '28.0.3'
compileSdkVersion 28 compileSdkVersion 28
sourceSets { sourceSets{
main { main{
manifest.srcFile 'AndroidManifest.xml' manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src'] java.srcDirs = ['src']
aidl.srcDirs = ['src'] aidl.srcDirs = ['src']
@@ -65,11 +65,11 @@ android {
androidTest.setRoot('tests') androidTest.setRoot('tests')
} }
packagingOptions { packagingOptions{
exclude 'META-INF/robovm/ios/robovm.xml' exclude 'META-INF/robovm/ios/robovm.xml'
} }
defaultConfig { defaultConfig{
def vfile = file('../core/assets/version.properties') def vfile = file('../core/assets/version.properties')
def code = 0 def code = 0
@@ -93,16 +93,16 @@ android {
versionName versionNameResult versionName versionNameResult
} }
compileOptions { compileOptions{
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8
} }
flavorDimensions "google" flavorDimensions "google"
signingConfigs { signingConfigs{
release { release{
if(project.hasProperty("RELEASE_STORE_FILE")) { if(project.hasProperty("RELEASE_STORE_FILE")){
storeFile file(RELEASE_STORE_FILE) storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS keyAlias RELEASE_KEY_ALIAS
@@ -113,8 +113,8 @@ android {
} }
} }
buildTypes { buildTypes{
release { release{
signingConfig signingConfigs.release signingConfig signingConfigs.release
} }
} }
@@ -122,22 +122,22 @@ android {
// called every time gradle gets executed, takes the native dependencies of // called every time gradle gets executed, takes the native dependencies of
// the natives configuration, and extracts them to the proper libs/ folders // the natives configuration, and extracts them to the proper libs/ folders
// so they get packed with the APK. // so they get packed with the APK.
task copyAndroidNatives() { task copyAndroidNatives(){
file("libs/armeabi/").mkdirs() file("libs/armeabi/").mkdirs()
file("libs/armeabi-v7a/").mkdirs() file("libs/armeabi-v7a/").mkdirs()
file("libs/arm64-v8a/").mkdirs() file("libs/arm64-v8a/").mkdirs()
file("libs/x86_64/").mkdirs() file("libs/x86_64/").mkdirs()
file("libs/x86/").mkdirs() file("libs/x86/").mkdirs()
configurations.natives.files.each { jar -> configurations.natives.files.each{ jar ->
def outputDir = null def outputDir = null
if (jar.name.endsWith("natives-arm64-v8a.jar")) outputDir = file("libs/arm64-v8a") if(jar.name.endsWith("natives-arm64-v8a.jar")) outputDir = file("libs/arm64-v8a")
if (jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("libs/armeabi-v7a") if(jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("libs/armeabi-v7a")
if (jar.name.endsWith("natives-armeabi.jar")) outputDir = file("libs/armeabi") if(jar.name.endsWith("natives-armeabi.jar")) outputDir = file("libs/armeabi")
if (jar.name.endsWith("natives-x86_64.jar")) outputDir = file("libs/x86_64") if(jar.name.endsWith("natives-x86_64.jar")) outputDir = file("libs/x86_64")
if (jar.name.endsWith("natives-x86.jar")) outputDir = file("libs/x86") if(jar.name.endsWith("natives-x86.jar")) outputDir = file("libs/x86")
if (outputDir != null) { if(outputDir != null){
copy { copy{
from zipTree(jar) from zipTree(jar)
into outputDir into outputDir
include "*.so" include "*.so"
@@ -146,47 +146,24 @@ task copyAndroidNatives() {
} }
} }
task run(type: Exec) { task run(type: Exec){
def path def path
def localProperties = project.file("../local.properties") def localProperties = project.file("../local.properties")
if (localProperties.exists()) { if(localProperties.exists()){
Properties properties = new Properties() Properties properties = new Properties()
localProperties.withInputStream { instr -> localProperties.withInputStream{ instr ->
properties.load(instr) properties.load(instr)
} }
def sdkDir = properties.getProperty('sdk.dir') def sdkDir = properties.getProperty('sdk.dir')
if (sdkDir) { if(sdkDir){
path = sdkDir path = sdkDir
} else { }else{
path = "$System.env.ANDROID_HOME" path = "$System.env.ANDROID_HOME"
} }
} else { }else{
path = "$System.env.ANDROID_HOME" path = "$System.env.ANDROID_HOME"
} }
def adb = path + "/platform-tools/adb" def adb = path + "/platform-tools/adb"
commandLine "$adb", 'shell', 'am', 'start', '-n', 'io.anuke.mindustry/io.anuke.mindustry.AndroidLauncher' commandLine "$adb", 'shell', 'am', 'start', '-n', 'io.anuke.mindustry/io.anuke.mindustry.AndroidLauncher'
} }
// sets up the Android Idea project, using the old Ant based build.
idea {
module {
sourceDirs += file("src")
scopes = [COMPILE: [plus: [project.configurations.compile]]]
iml {
withXml {
def node = it.asNode()
def builder = NodeBuilder.newInstance()
builder.current = node
builder.component(name: "FacetManager") {
facet(type: "android", name: "Android") {
configuration {
option(name: "UPDATE_PROPERTY_FILES", value: "true")
}
}
}
}
}
}
}

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

View File

@@ -15,21 +15,17 @@ import io.anuke.arc.backends.android.surfaceview.AndroidApplication;
import io.anuke.arc.backends.android.surfaceview.AndroidApplicationConfiguration; import io.anuke.arc.backends.android.surfaceview.AndroidApplicationConfiguration;
import io.anuke.arc.files.FileHandle; import io.anuke.arc.files.FileHandle;
import io.anuke.arc.function.Consumer; import io.anuke.arc.function.Consumer;
import io.anuke.arc.function.Predicate;
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.*;
import io.anuke.mindustry.ui.dialogs.FileChooser; import io.anuke.mindustry.ui.dialogs.FileChooser;
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.*;
@@ -59,7 +55,7 @@ public class AndroidLauncher extends AndroidApplication{
int len = s.length(); int len = s.length();
byte[] data = new byte[len / 2]; byte[] data = new byte[len / 2];
for(int i = 0; i < len; i += 2){ for(int i = 0; i < len; i += 2){
data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4) data[i / 2] = (byte)((Character.digit(s.charAt(i), 16) << 4)
+ Character.digit(s.charAt(i + 1), 16)); + Character.digit(s.charAt(i + 1), 16));
} }
String result = new String(Base64Coder.encode(data)); String result = new String(Base64Coder.encode(data));
@@ -75,10 +71,10 @@ public class AndroidLauncher extends AndroidApplication{
} }
@Override @Override
public void showFileChooser(String text, String content, Consumer<FileHandle> cons, boolean open, String filetype){ public void showFileChooser(String text, String content, Consumer<FileHandle> cons, boolean open, Predicate<String> filetype){
chooser = new FileChooser(text, file -> file.extension().equalsIgnoreCase(filetype), open, cons); chooser = new FileChooser(text, file -> filetype.test(file.extension().toLowerCase()), open, cons);
if(Build.VERSION.SDK_INT < Build.VERSION_CODES.M || (checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED && if(Build.VERSION.SDK_INT < Build.VERSION_CODES.M || (checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED &&
checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED)){ checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED)){
chooser.show(); chooser.show();
chooser = null; chooser = null;
}else{ }else{
@@ -114,8 +110,8 @@ public class AndroidLauncher extends AndroidApplication{
} }
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());
} }
@@ -160,7 +156,7 @@ public class AndroidLauncher extends AndroidApplication{
SaveSlot slot = control.saves.importSave(file); SaveSlot slot = control.saves.importSave(file);
ui.load.runLoadSave(slot); ui.load.runLoadSave(slot);
}catch(IOException e){ }catch(IOException e){
ui.showError(Core.bundle.format("save.import.fail", Strings.parseException(e, false))); ui.showError(Core.bundle.format("save.import.fail", Strings.parseException(e, true)));
} }
}else{ }else{
ui.showError("$save.import.invalid"); ui.showError("$save.import.invalid");
@@ -184,7 +180,7 @@ public class AndroidLauncher extends AndroidApplication{
} }
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 != null && manager.getPhoneType() == TelephonyManager.PHONE_TYPE_NONE; return manager != null && manager.getPhoneType() == TelephonyManager.PHONE_TYPE_NONE;
} }
} }

View File

@@ -1,6 +1,6 @@
apply plugin: "java" apply plugin: "java"
sourceCompatibility = 1.8 sourceCompatibility = 1.8
sourceSets.main.java.srcDirs = [ "src/main/java/" ] sourceSets.main.java.srcDirs = ["src/main/java/"]
sourceSets.main.resources.srcDirs = [ "src/main/resources/" ] sourceSets.main.resources.srcDirs = ["src/main/resources/"]

View File

@@ -1,43 +1,55 @@
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{
@Target({ElementType.METHOD, ElementType.FIELD}) /** Indicates that a method should always call its super version. */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.SOURCE)
public @interface CallSuper{
}
/** Annotation that allows overriding CallSuper annotation. To be used on method that overrides method with CallSuper annotation from parent class.*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.SOURCE)
public @interface OverrideCallSuper {
}
/** Indicates that a method return or field can be null.*/
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE})
@Retention(RetentionPolicy.SOURCE) @Retention(RetentionPolicy.SOURCE)
public @interface Nullable{ public @interface Nullable{
} }
/** Indicates that a method return or field cannot be null.*/
@Target({ElementType.METHOD, ElementType.FIELD}) @Target({ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.SOURCE) @Retention(RetentionPolicy.SOURCE)
public @interface NonNull{ public @interface NonNull{
} }
/** Marks a class as serializable.*/ /** Marks a class as serializable. */
@Target(ElementType.TYPE) @Target(ElementType.TYPE)
@Retention(RetentionPolicy.SOURCE) @Retention(RetentionPolicy.SOURCE)
public @interface Serialize{ public @interface Serialize{
} }
/** Marks a class as a special value type struct. Class name must end in 'Struct'.*/ /** Marks a class as a special value type struct. Class name must end in 'Struct'. */
@Target(ElementType.TYPE) @Target(ElementType.TYPE)
@Retention(RetentionPolicy.SOURCE) @Retention(RetentionPolicy.SOURCE)
public @interface Struct{ public @interface Struct{
} }
/**Marks a field of a struct. Optional.*/ /** Marks a field of a struct. Optional. */
@Target(ElementType.FIELD) @Target(ElementType.FIELD)
@Retention(RetentionPolicy.SOURCE) @Retention(RetentionPolicy.SOURCE)
public @interface StructField{ public @interface StructField{
/**Size of a struct field in bits. Not valid on booleans or floating point numbers.*/ /** Size of a struct field in bits. Not valid on booleans or floating point numbers. */
int value(); int value();
} }

View File

@@ -0,0 +1,65 @@
package io.anuke.annotations;
import com.sun.source.util.TreePath;
import com.sun.source.util.Trees;
import com.sun.tools.javac.tree.JCTree;
import com.sun.tools.javac.tree.JCTree.JCExpressionStatement;
import io.anuke.annotations.Annotations.OverrideCallSuper;
import javax.annotation.processing.*;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.Element;
import javax.lang.model.element.TypeElement;
import javax.tools.Diagnostic.Kind;
import java.util.List;
import java.util.Set;
@SupportedAnnotationTypes("java.lang.Override")
public class CallSuperAnnotationProcessor extends AbstractProcessor{
private Trees trees;
@Override
public void init (ProcessingEnvironment pe) {
super.init(pe);
trees = Trees.instance(pe);
}
public boolean process (Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
for (Element e : roundEnv.getElementsAnnotatedWith(Override.class)) {
if (e.getAnnotation(OverrideCallSuper.class) != null) return false;
CodeAnalyzerTreeScanner codeScanner = new CodeAnalyzerTreeScanner();
codeScanner.setMethodName(e.getSimpleName().toString());
TreePath tp = trees.getPath(e.getEnclosingElement());
codeScanner.scan(tp, trees);
if (codeScanner.isCallSuperUsed()) {
List list = codeScanner.getMethod().getBody().getStatements();
if (!doesCallSuper(list, codeScanner.getMethodName())) {
processingEnv.getMessager().printMessage(Kind.ERROR, "Overriding method '" + codeScanner.getMethodName() + "' must explicitly call super method from its parent class.", e);
}
}
}
return false;
}
private boolean doesCallSuper (List list, String methodName) {
for (Object object : list) {
if (object instanceof JCTree.JCExpressionStatement) {
JCTree.JCExpressionStatement expr = (JCExpressionStatement) object;
String exprString = expr.toString();
if (exprString.startsWith("super." + methodName) && exprString.endsWith(");")) return true;
}
}
return false;
}
@Override
public SourceVersion getSupportedSourceVersion () {
return SourceVersion.RELEASE_8;
}
}

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

@@ -0,0 +1,98 @@
package io.anuke.annotations;
import com.sun.source.tree.*;
import com.sun.source.util.TreePathScanner;
import com.sun.source.util.Trees;
import com.sun.tools.javac.code.Scope;
import com.sun.tools.javac.code.Symbol;
import com.sun.tools.javac.code.Symbol.MethodSymbol;
import com.sun.tools.javac.code.Type.ClassType;
import com.sun.tools.javac.tree.JCTree.JCIdent;
import com.sun.tools.javac.tree.JCTree.JCTypeApply;
import io.anuke.annotations.Annotations.CallSuper;
import java.lang.annotation.Annotation;
class CodeAnalyzerTreeScanner extends TreePathScanner<Object, Trees> {
private String methodName;
private MethodTree method;
private boolean callSuperUsed;
@Override
public Object visitClass (ClassTree classTree, Trees trees) {
Tree extendTree = classTree.getExtendsClause();
if (extendTree instanceof JCTypeApply) { //generic classes case
JCTypeApply generic = (JCTypeApply) extendTree;
extendTree = generic.clazz;
}
if (extendTree instanceof JCIdent) {
JCIdent tree = (JCIdent) extendTree;
Scope members = tree.sym.members();
if (checkScope(members))
return super.visitClass(classTree, trees);
if (checkSuperTypes((ClassType) tree.type))
return super.visitClass(classTree, trees);
}
callSuperUsed = false;
return super.visitClass(classTree, trees);
}
public boolean checkSuperTypes (ClassType type) {
if (type.supertype_field != null && type.supertype_field.tsym != null) {
if (checkScope(type.supertype_field.tsym.members()))
return true;
else
return checkSuperTypes((ClassType) type.supertype_field);
}
return false;
}
public boolean checkScope (Scope members) {
for (Symbol s : members.getElements()) {
if (s instanceof MethodSymbol) {
MethodSymbol ms = (MethodSymbol) s;
if (ms.getSimpleName().toString().equals(methodName)) {
Annotation annotation = ms.getAnnotation(CallSuper.class);
if (annotation != null) {
callSuperUsed = true;
return true;
}
}
}
}
return false;
}
@Override
public Object visitMethod (MethodTree methodTree, Trees trees) {
if (methodTree.getName().toString().equals(methodName))
method = methodTree;
return super.visitMethod(methodTree, trees);
}
public void setMethodName (String methodName) {
this.methodName = methodName;
}
public String getMethodName () {
return methodName;
}
public MethodTree getMethod () {
return method;
}
public boolean isCallSuperUsed () {
return callSuperUsed;
}
}

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;
@@ -21,14 +16,14 @@ import java.util.stream.Collectors;
/** The annotation processor for generating remote method call code. */ /** The annotation processor for generating remote method call code. */
@SupportedSourceVersion(SourceVersion.RELEASE_8) @SupportedSourceVersion(SourceVersion.RELEASE_8)
@SupportedAnnotationTypes({ @SupportedAnnotationTypes({
"io.anuke.annotations.Annotations.Remote", "io.anuke.annotations.Annotations.Remote",
"io.anuke.annotations.Annotations.WriteClass", "io.anuke.annotations.Annotations.WriteClass",
"io.anuke.annotations.Annotations.ReadClass", "io.anuke.annotations.Annotations.ReadClass",
}) })
public class RemoteMethodAnnotationProcessor extends AbstractProcessor{ public class RemoteMethodAnnotationProcessor extends AbstractProcessor{
/** Maximum size of each event packet. */ /** Maximum size of each event packet. */
public static final int maxPacketSize = 4096; public static final int maxPacketSize = 4096;
/** Warning on top of each autogenerated file.*/ /** Warning on top of each autogenerated file. */
public static final String autogenWarning = "Autogenerated file. Do not modify!\n"; public static final String autogenWarning = "Autogenerated file. Do not modify!\n";
/** Name of the base package to put all the generated classes. */ /** Name of the base package to put all the generated classes. */
private static final String packageName = "io.anuke.mindustry.gen"; private static final String packageName = "io.anuke.mindustry.gen";
@@ -37,7 +32,7 @@ public class RemoteMethodAnnotationProcessor extends AbstractProcessor{
private static final String readServerName = "RemoteReadServer"; private static final String readServerName = "RemoteReadServer";
/** Name of class that handles reading and invoking packets on the client. */ /** Name of class that handles reading and invoking packets on the client. */
private static final String readClientName = "RemoteReadClient"; private static final String readClientName = "RemoteReadClient";
/**Simple class name of generated class name.*/ /** Simple class name of generated class name. */
private static final String callLocation = "Call"; private static final String callLocation = "Call";
/** Processing round number. */ /** Processing round number. */
@@ -115,7 +110,7 @@ public class RemoteMethodAnnotationProcessor extends AbstractProcessor{
//create and add entry //create and add entry
MethodEntry method = new MethodEntry(entry.name, Utils.getMethodName(element), annotation.targets(), annotation.variants(), MethodEntry method = new MethodEntry(entry.name, Utils.getMethodName(element), annotation.targets(), annotation.variants(),
annotation.called(), annotation.unreliable(), annotation.forward(), lastMethodID++, (ExecutableElement) element, annotation.priority()); annotation.called(), annotation.unreliable(), annotation.forward(), lastMethodID++, (ExecutableElement)element, annotation.priority());
entry.methods.add(method); entry.methods.add(method);
methods.add(method); methods.add(method);
@@ -140,7 +135,7 @@ public class RemoteMethodAnnotationProcessor extends AbstractProcessor{
TypeSpec.Builder hashBuilder = TypeSpec.classBuilder("MethodHash").addModifiers(Modifier.PUBLIC); TypeSpec.Builder hashBuilder = TypeSpec.classBuilder("MethodHash").addModifiers(Modifier.PUBLIC);
hashBuilder.addJavadoc(autogenWarning); hashBuilder.addJavadoc(autogenWarning);
hashBuilder.addField(FieldSpec.builder(int.class, "HASH", Modifier.STATIC, Modifier.PUBLIC, Modifier.FINAL) hashBuilder.addField(FieldSpec.builder(int.class, "HASH", Modifier.STATIC, Modifier.PUBLIC, Modifier.FINAL)
.initializer("$1L", Objects.hash(methods)).build()); .initializer("$1L", Objects.hash(methods)).build());
//build and write resulting hash class //build and write resulting hash class
TypeSpec spec = hashBuilder.build(); TypeSpec spec = hashBuilder.build();

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,24 +23,23 @@ 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.
* @param needsPlayer Whether this read method requires a reference to the player sender. * @param needsPlayer Whether this read method requires a reference to the player sender.
*/ */
public void generateFor(List<MethodEntry> entries, String className, String packageName, boolean needsPlayer) public void generateFor(List<MethodEntry> entries, String className, String packageName, boolean needsPlayer)
throws IllegalAccessException, InvocationTargetException, InstantiationException, NoSuchMethodException, IOException{ throws IllegalAccessException, InvocationTargetException, InstantiationException, NoSuchMethodException, IOException{
TypeSpec.Builder classBuilder = TypeSpec.classBuilder(className).addModifiers(Modifier.PUBLIC); TypeSpec.Builder classBuilder = TypeSpec.classBuilder(className).addModifiers(Modifier.PUBLIC);
classBuilder.addJavadoc(RemoteMethodAnnotationProcessor.autogenWarning); classBuilder.addJavadoc(RemoteMethodAnnotationProcessor.autogenWarning);
//create main method builder //create main method builder
MethodSpec.Builder readMethod = MethodSpec.methodBuilder("readPacket") MethodSpec.Builder readMethod = MethodSpec.methodBuilder("readPacket")
.addModifiers(Modifier.PUBLIC, Modifier.STATIC) .addModifiers(Modifier.PUBLIC, Modifier.STATIC)
.addParameter(ByteBuffer.class, "buffer") //buffer to read form .addParameter(ByteBuffer.class, "buffer") //buffer to read form
.addParameter(int.class, "id") //ID of method type to read .addParameter(int.class, "id") //ID of method type to read
.returns(void.class); .returns(void.class);
if(needsPlayer){ if(needsPlayer){
//since the player type isn't loaded yet, creating a type def is necessary //since the player type isn't loaded yet, creating a type def is necessary
@@ -115,13 +112,13 @@ public class RemoteReadGenerator{
//execute the relevant method before the forward //execute the relevant method before the forward
//if it throws a ValidateException, the method won't be forwarded //if it throws a ValidateException, the method won't be forwarded
readBlock.addStatement("$N." + entry.element.getSimpleName() + "(" + varResult.toString() + ")", ((TypeElement) entry.element.getEnclosingElement()).getQualifiedName().toString()); readBlock.addStatement("$N." + entry.element.getSimpleName() + "(" + varResult.toString() + ")", ((TypeElement)entry.element.getEnclosingElement()).getQualifiedName().toString());
//call forwarded method, don't forward on the client reader //call forwarded method, don't forward on the client reader
if(entry.forward && entry.where.isServer && needsPlayer){ if(entry.forward && entry.where.isServer && needsPlayer){
//call forwarded method //call forwarded method
readBlock.addStatement(packageName + "." + entry.className + "." + entry.element.getSimpleName() + readBlock.addStatement(packageName + "." + entry.className + "." + entry.element.getSimpleName() +
"__forward(player.con.id" + (varResult.length() == 0 ? "" : ", ") + varResult.toString() + ")"); "__forward(player.con.id" + (varResult.length() == 0 ? "" : ", ") + varResult.toString() + ")");
} }
readBlock.nextControlFlow("catch (java.lang.Exception e)"); readBlock.nextControlFlow("catch (java.lang.Exception e)");

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;
@@ -33,7 +30,7 @@ public class RemoteWriteGenerator{
//add temporary write buffer //add temporary write buffer
classBuilder.addField(FieldSpec.builder(ByteBuffer.class, "TEMP_BUFFER", Modifier.STATIC, Modifier.PRIVATE, Modifier.FINAL) classBuilder.addField(FieldSpec.builder(ByteBuffer.class, "TEMP_BUFFER", Modifier.STATIC, Modifier.PRIVATE, Modifier.FINAL)
.initializer("ByteBuffer.allocate($1L)", RemoteMethodAnnotationProcessor.maxPacketSize).build()); .initializer("ByteBuffer.allocate($1L)", RemoteMethodAnnotationProcessor.maxPacketSize).build());
//go through each method entry in this class //go through each method entry in this class
for(MethodEntry methodEntry : entry.methods){ for(MethodEntry methodEntry : entry.methods){
@@ -65,8 +62,8 @@ public class RemoteWriteGenerator{
//create builder //create builder
MethodSpec.Builder method = MethodSpec.methodBuilder(elem.getSimpleName().toString() + (forwarded ? "__forward" : "")) //add except suffix when forwarding MethodSpec.Builder method = MethodSpec.methodBuilder(elem.getSimpleName().toString() + (forwarded ? "__forward" : "")) //add except suffix when forwarding
.addModifiers(Modifier.STATIC, Modifier.SYNCHRONIZED) .addModifiers(Modifier.STATIC, Modifier.SYNCHRONIZED)
.returns(void.class); .returns(void.class);
//forwarded methods aren't intended for use, and are not public //forwarded methods aren't intended for use, and are not public
if(!forwarded){ if(!forwarded){
@@ -119,7 +116,7 @@ public class RemoteWriteGenerator{
//add the statement to call it //add the statement to call it
method.addStatement("$N." + elem.getSimpleName() + "(" + results.toString() + ")", method.addStatement("$N." + elem.getSimpleName() + "(" + results.toString() + ")",
((TypeElement) elem.getEnclosingElement()).getQualifiedName().toString()); ((TypeElement)elem.getEnclosingElement()).getQualifiedName().toString());
if(methodEntry.local != Loc.both){ if(methodEntry.local != Loc.both){
method.endControlFlow(); method.endControlFlow();
@@ -170,7 +167,7 @@ public class RemoteWriteGenerator{
method.addStatement("TEMP_BUFFER.put(" + varName + " ? (byte)1 : 0)"); method.addStatement("TEMP_BUFFER.put(" + varName + " ? (byte)1 : 0)");
}else{ }else{
method.addStatement("TEMP_BUFFER.put" + method.addStatement("TEMP_BUFFER.put" +
capName + "(" + varName + ")"); capName + "(" + varName + ")");
} }
}else{ }else{
//else, try and find a serializer //else, try and find a serializer
@@ -209,7 +206,7 @@ public class RemoteWriteGenerator{
//send the actual packet //send the actual packet
method.addStatement("io.anuke.mindustry.net.Net." + sendString + "packet, " + method.addStatement("io.anuke.mindustry.net.Net." + sendString + "packet, " +
(methodEntry.unreliable ? "io.anuke.mindustry.net.Net.SendMode.udp" : "io.anuke.mindustry.net.Net.SendMode.tcp") + ")"); (methodEntry.unreliable ? "io.anuke.mindustry.net.Net.SendMode.udp" : "io.anuke.mindustry.net.Net.SendMode.tcp") + ")");
//end check for server/client //end check for server/client
@@ -221,7 +218,7 @@ public class RemoteWriteGenerator{
private String getCheckString(Loc loc){ private String getCheckString(Loc loc){
return loc.isClient && loc.isServer ? "io.anuke.mindustry.net.Net.server() || io.anuke.mindustry.net.Net.client()" : return loc.isClient && loc.isServer ? "io.anuke.mindustry.net.Net.server() || io.anuke.mindustry.net.Net.client()" :
loc.isClient ? "io.anuke.mindustry.net.Net.client()" : loc.isClient ? "io.anuke.mindustry.net.Net.client()" :
loc.isServer ? "io.anuke.mindustry.net.Net.server()" : "false"; loc.isServer ? "io.anuke.mindustry.net.Net.server()" : "false";
} }
} }

View File

@@ -5,23 +5,17 @@ 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;
@SupportedSourceVersion(SourceVersion.RELEASE_8) @SupportedSourceVersion(SourceVersion.RELEASE_8)
@SupportedAnnotationTypes({ @SupportedAnnotationTypes("io.anuke.annotations.Annotations.Serialize")
"io.anuke.annotations.Annotations.Serialize"
})
public class SerializeAnnotationProcessor extends AbstractProcessor{ public class SerializeAnnotationProcessor extends AbstractProcessor{
/**Target class name.*/ /** Target class name. */
private static final String className = "Serialization"; private static final String className = "Serialization";
/** Name of the base package to put all the generated classes. */ /** Name of the base package to put all the generated classes. */
private static final String packageName = "io.anuke.mindustry.gen"; private static final String packageName = "io.anuke.mindustry.gen";
@@ -48,20 +42,10 @@ public class SerializeAnnotationProcessor extends AbstractProcessor{
TypeSpec.Builder classBuilder = TypeSpec.classBuilder(className).addModifiers(Modifier.PUBLIC); TypeSpec.Builder classBuilder = TypeSpec.classBuilder(className).addModifiers(Modifier.PUBLIC);
classBuilder.addAnnotation(AnnotationSpec.builder(SuppressWarnings.class).addMember("value", "\"unchecked\"").build()); classBuilder.addAnnotation(AnnotationSpec.builder(SuppressWarnings.class).addMember("value", "\"unchecked\"").build());
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); String simpleTypeName = type.toString().substring(type.toString().lastIndexOf('.') + 1);
@@ -83,23 +67,12 @@ 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('$', '.');
@@ -108,22 +81,18 @@ 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)");
} }
} }
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());
name(writeMethod, "write" + simpleTypeName); name(writeMethod, "write" + simpleTypeName);
name(readMethod, "read" + simpleTypeName); name(readMethod, "read" + simpleTypeName);
@@ -133,32 +102,6 @@ public class SerializeAnnotationProcessor extends AbstractProcessor{
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,28 +1,25 @@
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"
}) })
public class StructAnnotationProcessor extends AbstractProcessor{ public class StructAnnotationProcessor extends AbstractProcessor{
/** Name of the base package to put all the generated classes. */ /** Name of the base package to put all the generated classes. */
@@ -57,7 +54,7 @@ public class StructAnnotationProcessor extends AbstractProcessor{
String structParam = structName.toLowerCase(); String structParam = structName.toLowerCase();
TypeSpec.Builder classBuilder = TypeSpec.classBuilder(structName) TypeSpec.Builder classBuilder = TypeSpec.classBuilder(structName)
.addModifiers(Modifier.FINAL, Modifier.PUBLIC); .addModifiers(Modifier.FINAL, Modifier.PUBLIC);
try{ try{
List<VariableElement> variables = ElementFilter.fieldsIn(elem.getEnclosedElements()); List<VariableElement> variables = ElementFilter.fieldsIn(elem.getEnclosedElements());
@@ -92,14 +89,14 @@ public class StructAnnotationProcessor extends AbstractProcessor{
//[get] field(structType) : fieldType //[get] field(structType) : fieldType
MethodSpec.Builder getter = MethodSpec.methodBuilder(var.getSimpleName().toString()) MethodSpec.Builder getter = MethodSpec.methodBuilder(var.getSimpleName().toString())
.addModifiers(Modifier.STATIC, Modifier.PUBLIC) .addModifiers(Modifier.STATIC, Modifier.PUBLIC)
.returns(varType) .returns(varType)
.addParameter(structType, structParam); .addParameter(structType, structParam);
//[set] field(structType, fieldType) : structType //[set] field(structType, fieldType) : structType
MethodSpec.Builder setter = MethodSpec.methodBuilder(var.getSimpleName().toString()) MethodSpec.Builder setter = MethodSpec.methodBuilder(var.getSimpleName().toString())
.addModifiers(Modifier.STATIC, Modifier.PUBLIC) .addModifiers(Modifier.STATIC, Modifier.PUBLIC)
.returns(structType) .returns(structType)
.addParameter(structType, structParam).addParameter(varType, "value"); .addParameter(structType, structParam).addParameter(varType, "value");
//[getter] //[getter]
if(varType == TypeName.BOOLEAN){ if(varType == TypeName.BOOLEAN){
@@ -209,7 +206,7 @@ public class StructAnnotationProcessor extends AbstractProcessor{
throw new IllegalArgumentException("Too many fields, must fit in 64 bits. Curent size: " + size); throw new IllegalArgumentException("Too many fields, must fit in 64 bits. Curent size: " + size);
} }
/**returns a type's element size in bits.*/ /** returns a type's element size in bits. */
static int typeSize(TypeKind kind) throws IllegalArgumentException{ static int typeSize(TypeKind kind) throws IllegalArgumentException{
switch(kind){ switch(kind){
case BOOLEAN: case BOOLEAN:

View File

@@ -14,11 +14,11 @@ public class Utils{
public static Messager messager; public static Messager messager;
public static String getMethodName(Element element){ public static String getMethodName(Element element){
return ((TypeElement) element.getEnclosingElement()).getQualifiedName().toString() + "." + element.getSimpleName(); return ((TypeElement)element.getEnclosingElement()).getQualifiedName().toString() + "." + element.getSimpleName();
} }
public static boolean isPrimitive(String type){ public static boolean isPrimitive(String type){
return type.equals("boolean") || type.equals("byte") || type.equals("short") || type.equals("int") return type.equals("boolean") || type.equals("byte") || type.equals("short") || type.equals("int")
|| type.equals("long") || type.equals("float") || type.equals("double") || type.equals("char"); || type.equals("long") || type.equals("float") || type.equals("double") || type.equals("char");
} }
} }

View File

@@ -1,3 +1,4 @@
io.anuke.annotations.RemoteMethodAnnotationProcessor io.anuke.annotations.RemoteMethodAnnotationProcessor
io.anuke.annotations.SerializeAnnotationProcessor io.anuke.annotations.SerializeAnnotationProcessor
io.anuke.annotations.StructAnnotationProcessor io.anuke.annotations.StructAnnotationProcessor
io.anuke.annotations.CallSuperAnnotationProcessor

View File

@@ -15,8 +15,6 @@ buildscript{
} }
allprojects{ allprojects{
apply plugin: "idea"
version = 'release' version = 'release'
ext{ ext{
@@ -29,7 +27,7 @@ allprojects{
arcHash = null arcHash = null
debugged = { debugged = {
return new File(projectDir.parent, '../debug').exists() && !project.hasProperty("release") return new File(projectDir.parent, '../debug').exists() && !project.hasProperty("release") && project.hasProperty("args")
} }
localArc = { localArc = {
@@ -89,7 +87,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 +111,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 +128,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,33 +174,35 @@ 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) if(System.properties["user.name"] == "anuke"){
compileJava.finalizedBy(copyGen) task cleanGen{
doFirst{
delete{
delete "../core/src/io/anuke/mindustry/gen/"
}
}
}
task copyGen{
doLast{
copy{
from("../core/build/generated/sources/annotationProcessor/java/main/io/anuke/mindustry/gen"){
include "**/*.java"
}
into "../core/src/io/anuke/mindustry/gen"
}
}
}
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:postprocessing") compile arcModule("extensions:arcnet")
if(localArc() && debugged()) compile arcModule("extensions:recorder") if(localArc() && debugged()) compile arcModule("extensions:recorder")
compileOnly project(":annotations") compileOnly project(":annotations")
@@ -248,6 +250,7 @@ project(":annotations"){
dependencies{ dependencies{
compile 'com.squareup:javapoet:1.11.0' compile 'com.squareup:javapoet:1.11.0'
compile files("${System.getProperty('java.home')}/../lib/tools.jar")
} }
} }
@@ -257,7 +260,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.

Before

Width:  |  Height:  |  Size: 121 B

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 B

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 B

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1018 B

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 B

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 B

After

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 B

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 B

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 B

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 B

After

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 B

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 B

After

Width:  |  Height:  |  Size: 852 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 405 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 B

After

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 B

After

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 B

After

Width:  |  Height:  |  Size: 101 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 B

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 B

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 B

After

Width:  |  Height:  |  Size: 920 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 B

After

Width:  |  Height:  |  Size: 606 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 B

After

Width:  |  Height:  |  Size: 454 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 354 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 B

After

Width:  |  Height:  |  Size: 298 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 B

After

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

After

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 291 B

After

Width:  |  Height:  |  Size: 811 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 B

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 B

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 B

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 B

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 B

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 294 B

After

Width:  |  Height:  |  Size: 850 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 352 B

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