Merge branch 'master' into port-field
This commit is contained in:
9
.github/ISSUE_TEMPLATE/bug_report.md
vendored
9
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -9,7 +9,7 @@ assignees: ''
|
|||||||
|
|
||||||
**Platform**: *Android/iOS/Mac/Windows/Linux*
|
**Platform**: *Android/iOS/Mac/Windows/Linux*
|
||||||
|
|
||||||
**Build**: *The build number under the title in the main menu. Required.*
|
**Build**: *The build number under the title in the main menu. Required. "LATEST" IS NOT A VERSION, I NEED THE EXACT BUILD NUMBER OF YOUR GAME.*
|
||||||
|
|
||||||
**Issue**: *Explain your issue in detail.*
|
**Issue**: *Explain your issue in detail.*
|
||||||
|
|
||||||
@@ -17,11 +17,14 @@ assignees: ''
|
|||||||
|
|
||||||
**Link(s) to mod(s) used**: *The mod repositories or zip files that are related to the issue, if applicable.*
|
**Link(s) to mod(s) used**: *The mod repositories or zip files that are related to the issue, if applicable.*
|
||||||
|
|
||||||
**Save file**: *The save file you were playing on when the bug happened, if applicable.*
|
**Save file**: *The (zipped) save file you were playing on when the bug happened. THIS IS REQUIRED FOR ANY ISSUE HAPPENING IN-GAME OR IN MULTIPLAYER, REGARDLESS OF WHETHER YOU THINK IT HAPPENS EVERYWHERE. DO NOT DELETE OR OMIT THIS LINE UNLESS YOU ARE SURE THAT THE ISSUE DOES NOT HAPPEN IN-GAME.*
|
||||||
|
|
||||||
**Crash report**: *The contents of relevant crash report files. REQUIRED if you are reporting a crash.*
|
If you remove the line above without reading it properly and understanding what it means, I will reap your soul. Even if you're playing on someone's server, you can still save the game to a slot.
|
||||||
|
|
||||||
|
**(Crash) logs**: *Either crash reports from the crash folder, or the file you get when you go into Settings -> Game Data -> Export Crash logs. REQUIRED if you are reporting a crash.*
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
*Place an X (no spaces) between the brackets to confirm that you have read the line below.*
|
*Place an X (no spaces) between the brackets to confirm that you have read the line below.*
|
||||||
|
- [ ] **I have updated to the latest release (https://github.com/Anuken/Mindustry/releases) to make sure my issue has not been fixed.**
|
||||||
- [ ] **I have searched the closed and open issues to make sure that this problem has not already been reported.**
|
- [ ] **I have searched the closed and open issues to make sure that this problem has not already been reported.**
|
||||||
|
|||||||
63
.github/workflows/deployment.yml
vendored
Normal file
63
.github/workflows/deployment.yml
vendored
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
name: Deployment
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
buildJava14:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up JDK 14
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 14
|
||||||
|
- name: Set env
|
||||||
|
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||||
|
- name: Create artifacts
|
||||||
|
run: |
|
||||||
|
./gradlew desktop:dist server:dist core:javadoc -Pbuildversion=${RELEASE_VERSION:1}
|
||||||
|
- name: Update docs
|
||||||
|
run: |
|
||||||
|
cd ../
|
||||||
|
git config --global user.email "cli@github.com"
|
||||||
|
git config --global user.name "Github Actions"
|
||||||
|
git clone --depth=1 https://github.com/MindustryGame/docs.git
|
||||||
|
cp -a Mindustry/core/build/docs/javadoc/. docs/
|
||||||
|
cd docs
|
||||||
|
git add .
|
||||||
|
git commit -m "Update ${RELEASE_VERSION:1}"
|
||||||
|
git push https://Anuken:${{ secrets.API_TOKEN_GITHUB }}@github.com/MindustryGame/docs
|
||||||
|
cd ../Mindustry
|
||||||
|
- name: Add Arc release
|
||||||
|
run: |
|
||||||
|
git clone --depth=1 --branch=master https://github.com/Anuken/Arc ../Arc
|
||||||
|
cd ../Arc
|
||||||
|
git tag ${RELEASE_VERSION}
|
||||||
|
git push https://Anuken:${{ secrets.API_TOKEN_GITHUB }}@github.com/Anuken/Arc ${RELEASE_VERSION};
|
||||||
|
cd ../Mindustry
|
||||||
|
- name: Update F-Droid build string
|
||||||
|
run: |
|
||||||
|
git clone --depth=1 --branch=master https://github.com/Anuken/MindustryBuilds ../MindustryBuilds
|
||||||
|
cd ../MindustryBuilds
|
||||||
|
echo "Updating version to ${RELEASE_VERSION:1}"
|
||||||
|
echo versionName=6-fdroid-${RELEASE_VERSION:1}$'\n'versionCode=${RELEASE_VERSION:1} > version_fdroid.txt
|
||||||
|
git add .
|
||||||
|
git commit -m "Updating to build ${RELEASE_VERSION:1}"
|
||||||
|
cd ../Mindustry
|
||||||
|
- name: Upload client artifacts
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: desktop/build/libs/Mindustry.jar
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
- name: Upload server artifacts
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: server/build/libs/server-release.jar
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
|
||||||
28
.github/workflows/gradle.yml
vendored
28
.github/workflows/gradle.yml
vendored
@@ -1,28 +0,0 @@
|
|||||||
name: Java CI
|
|
||||||
|
|
||||||
on: [push]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
buildJava8:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v1
|
|
||||||
- name: Set up JDK 8
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: 8
|
|
||||||
- name: Run unit tests with gradle and Java 8
|
|
||||||
run: ./gradlew compileJava
|
|
||||||
|
|
||||||
buildJava14:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v1
|
|
||||||
- name: Set up JDK 14
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: 14
|
|
||||||
- name: Run unit tests with gradle and Java 14
|
|
||||||
run: ./gradlew compileJava
|
|
||||||
21
.github/workflows/pr.yml
vendored
Normal file
21
.github/workflows/pr.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
name: Pull Request Tests
|
||||||
|
|
||||||
|
on: [pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
buildJava14:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up JDK 14
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 14
|
||||||
|
- name: Run unit tests and build JAR
|
||||||
|
run: ./gradlew test desktop:dist
|
||||||
|
- name: Upload desktop JAR for testing
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Desktop JAR (zipped)
|
||||||
|
path: desktop/build/libs/Mindustry.jar
|
||||||
25
.github/workflows/push.yml
vendored
Normal file
25
.github/workflows/push.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
name: Tests
|
||||||
|
|
||||||
|
on: [push, workflow_dispatch]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
buildJava14:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up JDK 14
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 14
|
||||||
|
- name: Run unit tests
|
||||||
|
run: ./gradlew clean cleanTest test
|
||||||
|
- name: Trigger BE build
|
||||||
|
if: ${{ github.repository == 'Anuken/Mindustry' }}
|
||||||
|
run: |
|
||||||
|
git clone --depth=1 --branch=master https://github.com/Anuken/MindustryBuilds ../MindustryBuilds
|
||||||
|
cd ../MindustryBuilds
|
||||||
|
BNUM=$(($GITHUB_RUN_NUMBER + 20000))
|
||||||
|
git tag ${BNUM}
|
||||||
|
git config --global user.name "Build Uploader"
|
||||||
|
git push https://Anuken:${{ secrets.API_TOKEN_GITHUB }}@github.com/Anuken/MindustryBuilds ${BNUM}
|
||||||
17
.gitignore
vendored
17
.gitignore
vendored
@@ -19,12 +19,13 @@ logs/
|
|||||||
/annotations/out/
|
/annotations/out/
|
||||||
/net/build/
|
/net/build/
|
||||||
/tools/build/
|
/tools/build/
|
||||||
/core/build/
|
|
||||||
/tests/build/
|
/tests/build/
|
||||||
/server/build/
|
/server/build/
|
||||||
changelog
|
changelog
|
||||||
saves/
|
saves/
|
||||||
/core/assets-raw/fontgen/out/
|
/core/assets-raw/fontgen/out/
|
||||||
|
/core/assets-raw/fontgen/icons/
|
||||||
|
/core/assets-raw/fontgen/icon_parts/
|
||||||
core/assets/saves/
|
core/assets/saves/
|
||||||
/core/assets/saves/
|
/core/assets/saves/
|
||||||
steam_appid.txt
|
steam_appid.txt
|
||||||
@@ -35,6 +36,7 @@ steam_appid.txt
|
|||||||
/annotations/src/main/resources/META-INF/services
|
/annotations/src/main/resources/META-INF/services
|
||||||
/core/assets/version.properties
|
/core/assets/version.properties
|
||||||
/core/assets/locales
|
/core/assets/locales
|
||||||
|
/core/assets/cache/
|
||||||
/ios/src/mindustry/gen/
|
/ios/src/mindustry/gen/
|
||||||
/core/src/mindustry/gen/
|
/core/src/mindustry/gen/
|
||||||
ios/robovm.properties
|
ios/robovm.properties
|
||||||
@@ -45,6 +47,12 @@ config/
|
|||||||
/core/assets/basepartnames
|
/core/assets/basepartnames
|
||||||
version.properties
|
version.properties
|
||||||
|
|
||||||
|
#sprites
|
||||||
|
|
||||||
|
core/assets/sprites/sprites*
|
||||||
|
core/assets/sprites/fallback/
|
||||||
|
core/assets/sprites/block_colors.png
|
||||||
|
|
||||||
.attach_*
|
.attach_*
|
||||||
## Java
|
## Java
|
||||||
|
|
||||||
@@ -143,13 +151,6 @@ nb-configuration.xml
|
|||||||
/local.properties
|
/local.properties
|
||||||
.gradle/
|
.gradle/
|
||||||
gradle-app.setting
|
gradle-app.setting
|
||||||
/build/
|
|
||||||
/android/build/
|
|
||||||
/core/build/
|
|
||||||
/desktop/build/
|
|
||||||
/html/build/
|
|
||||||
/ios/build/
|
|
||||||
/ios-moe/build/
|
|
||||||
|
|
||||||
## OS Specific
|
## OS Specific
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|||||||
50
.travis.yml
50
.travis.yml
@@ -1,50 +0,0 @@
|
|||||||
jdk:
|
|
||||||
- openjdk14
|
|
||||||
dist: xenial
|
|
||||||
android:
|
|
||||||
components:
|
|
||||||
- android-29
|
|
||||||
- build-tools-29.0.3
|
|
||||||
|
|
||||||
script:
|
|
||||||
- git clone --depth=1 --branch=master https://github.com/Anuken/MindustryBuilds ../MindustryBuilds
|
|
||||||
- cd ../MindustryBuilds
|
|
||||||
- echo ${TRAVIS_TAG}
|
|
||||||
- if [ -n "$TRAVIS_TAG" ]; then echo versionName=5-fdroid-${TRAVIS_TAG:1}$'\n'versionCode=${TRAVIS_TAG:1} > version_fdroid.txt; git add .; git commit -m "Updating to build ${TRAVIS_TAG}"; fi
|
|
||||||
- git tag ${TRAVIS_BUILD_NUMBER}
|
|
||||||
- git config --global user.name "Build Uploader"
|
|
||||||
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git push https://Anuken:${GH_PUSH_TOKEN}@github.com/Anuken/MindustryBuilds ${TRAVIS_BUILD_NUMBER}; git push https://Anuken:${GH_PUSH_TOKEN}@github.com/Anuken/MindustryBuilds; fi
|
|
||||||
- cd ../Mindustry
|
|
||||||
- git clone --depth=1 --branch=master https://github.com/Anuken/Arc ../Arc
|
|
||||||
- if [ -n "$TRAVIS_TAG" ]; then cd ../Arc; git tag ${TRAVIS_TAG}; git push https://Anuken:${GH_PUSH_TOKEN}@github.com/Anuken/Arc ${TRAVIS_TAG}; cd ../Mindustry; fi
|
|
||||||
- "./gradlew test"
|
|
||||||
- "./gradlew desktop:dist -Pbuildversion=${TRAVIS_TAG:1}"
|
|
||||||
- "./gradlew server:dist -Pbuildversion=${TRAVIS_TAG:1}"
|
|
||||||
- "./gradlew core:javadoc"
|
|
||||||
- cd ../
|
|
||||||
- git clone --depth=1 https://github.com/MindustryGame/docs.git
|
|
||||||
- cp -a Mindustry/core/build/docs/javadoc/. docs/
|
|
||||||
- cd docs
|
|
||||||
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git add .; git commit -m "Update ${TRAVIS_BUILD_NUMBER}"; git push https://Anuken:${GH_PUSH_TOKEN}@github.com/MindustryGame/docs; fi
|
|
||||||
- cd ../Mindustry
|
|
||||||
deploy:
|
|
||||||
- provider: releases
|
|
||||||
skip_cleanup: true
|
|
||||||
draft: false
|
|
||||||
api_key:
|
|
||||||
secure: Cv5wFtWt62/A24EvSEQvMow7gKPbZ3oATEFPuSghhB2TQz1dA40Zee3Qvk4LFlpLrhYo4K0ZSczCZRGpR+hCd8+Dpww52bheYEvWuh3ZQfvu/fXtEx2j5PwP1qMpmIgSxETV/gkD7l9FImdh0VzktYiAvQfmi0bEocG9/D4QwjFpNat7iwBdcMiw1MvAygpdIWRsjiw0RKlB2mWarmoHhQ7Gu7qlU3j50uaEvcrtmU0pBUPggNQwQRv32i9NPvNFxrqqlUjDLIS8JFea99zCkp8BwYqbEvBIMzd+Qip1/stLJJA3+cDUClbsDtg8rAVetzpOrdLEEBmqShFe5MDl2yEHcsgpN9CFsyTaUfvB3P3rVjizvycMm42IsUkXQiarm5xTQ/TIA8Rd8AHiSKuweNCg1Fd5SFaRtKy8JVLXuxyfUccmyje6hhz2L4lS2Wfj3mAG7sqZUCXhWP79EKdGkiPOjKv4CwXEKmuH3BMVqPlNUZJr9Eg3sV1FG0h2l+MVOOnR635qdUbb49sYojYxVruMLX0BH1c4ZCu230m8CUoWA1Em1QNI75ya7+9Y5T6AsgWDVpBvdUo9fWNbdp+VQ0GskFQsJD5wtnxbcbHeFiERAgGBm7z6qt9u9LrQpBH+dsW52ADvYsu3L4nQEa+sdMHwTTwmGY+iUvsxu0DqxGg=
|
|
||||||
file:
|
|
||||||
- desktop/build/libs/Mindustry.jar
|
|
||||||
- server/build/libs/server-release.jar
|
|
||||||
on:
|
|
||||||
repo: Anuken/Mindustry
|
|
||||||
tags: true
|
|
||||||
#- provider: script
|
|
||||||
# script: bash update_wiki.sh
|
|
||||||
# on:
|
|
||||||
# repo: Anuken/Mindustry
|
|
||||||
# tags: true
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- secure: TqlUl/ojjkCMVOGbCTKz7Cnr4F08UyWzY/CiJ0vvUOGJGZ1qm7XavAlDf5XT0egU4mvr37THubFO8vojbqmrmy0oZnYh3njKFA8axgyZ8PyKkjGHOfd0i6qyEWsOr9H90/2X8r3LwEeLaDFyHpu3wljIGBjweg53g2qwmDwCFa9UR80FJZ+xDB+rD6B3cXT0DTEkCoLZXLqXm0Y3HvBdSuBL1LR/FNb2BSxNq+tNLGiz1kdQZV5erausbbZypBoGxzz63xAnyz2kkFz73A8xQYVTzGbFodTPz7HM13GVZ5s43I03Y+HYyHBgBaSLziO2hi2kzVJccOwzBp7wS4fs1MqsFY5+IeWJ9k+hm89NiYT7+6zlEgoUMlIniny1qLqWTzx7btUeuC/y/h5TVBNgaV+z0jmHycHfeSyq5I+vmX4J8qe3wmaN8TcdqYKU5nIznOTk3CM5Fzu0Bs9vkCkOxmormmcjMFW1RbdOLc/hpZWZggsBA88sNEAI8eq+r5QEeqzeCx8YKoZDjdrsqvgLMc3El3gS9oMGxkn0Y/TEcqs9Tc4BXtTkqIA68hD0DYzlAxYjVbbkAI9Hh9lHNvV3Dr/oCkGXQ/HflM143kj1L3tSBZpqeqQE2XhngB5nqpS3OZTmZbMTQ8qD2luU18yaTGMLF5tJS/fdKPRx0gQ1kL8=
|
|
||||||
- secure: VEskj/0TVX2o7iUVXuVPysj/VSWmPhDl57SrT7/nBNN/P/8N5jFAvx8PMzG7qT0S5FzKxuV20psE4WylUGRKdeRtK7/QNBV7T3YqYYM6BUB1VeRpxe5hLxTeuBK3izglFO8DkdDqjUtzQSjzkoYT75ilROjhBrBUPhVek7UlbBHbaklPWYFXHnJmYS1FpZTdzqIj+Y0Gd1PSL2MzK4X74aAHl0qaDgsTwYwtKs7IAz+kFaTZBRpi9VjQHAFhDlkDR3jo9wQjH8/F6x0lCgV/FulSc37Okdb40sLFG98xcEA6gWh1NPMkz8CulUdVE7mj7SJNxLbNvoMNrWOVRjmEsn59p/9LiNC1F9ncFz9vjQjAmi7rMFFGHGxe5nn8cIAkpTvHQQkZoWHAA9SNJTDMMf09m2pRy/vvzx+a6NVxyC9iNrhLlnBg4gxAqRh0S6NU0uL+fuygKixn7rqlnb7KMT7bAbfcuV+dng6c8V7hYKDCh7sJbH8iJump1xkwoM7ecnU8fxJF/oKOr/fbk0Bfxu+Q9qYLrV1+DEdm93Vl2Thq+DBKmI66jRGSva6HeCLFo81PEiEjP1nLv75+kvVfOqVqJrZD1BrvoG2eWT/3hVLrN2kEIWWlpvQVC7FL11yWmYtAuOBh/vfhI76zKr+YTS6ccG9rqW4XeYjJytshe8M=
|
|
||||||
@@ -4,33 +4,35 @@ This is for code contributions. For translations, see [TRANSLATING](TRANSLATING.
|
|||||||
|
|
||||||
## Basic Guidelines
|
## Basic Guidelines
|
||||||
|
|
||||||
#### Use an IDE.
|
### Use an IDE.
|
||||||
Specifically, IntelliJ IDEA. Download the (free) Community Edition of it [here](https://www.jetbrains.com/idea/download/). Some people use other tools, like VS Code, but I would personally not recommend them for Java development.
|
Specifically, IntelliJ IDEA. Download the (free) Community Edition of it [here](https://www.jetbrains.com/idea/download/). Some people use other tools, like VS Code, but I would personally not recommend them for Java development.
|
||||||
|
|
||||||
#### Always test your changes.
|
### Always test your changes.
|
||||||
Do not submit something without at least running the game to see if it compiles.
|
Do not submit something without at least running the game to see if it compiles.
|
||||||
If you are submitting a new block, make sure it has a name and description, and that it works correctly in-game. If you are changing existing block mechanics, test them out first.
|
If you are submitting a new block, make sure it has a name and description, and that it works correctly in-game. If you are changing existing block mechanics, test them out first.
|
||||||
|
|
||||||
|
### Do not make large changes before discussing them first.
|
||||||
#### Do not make large changes before discussing them first.
|
|
||||||
If you are interested in adding a large mechanic/feature or changing large amounts of code, first contact me (Anuken) via [Discord](https://discord.gg/mindustry) (preferred method) or via e-mail (*anukendev@gmail.com*).
|
If you are interested in adding a large mechanic/feature or changing large amounts of code, first contact me (Anuken) via [Discord](https://discord.gg/mindustry) (preferred method) or via e-mail (*anukendev@gmail.com*).
|
||||||
For most changes, this should not be necessary. I just want to know if you're doing something big so I can offer advice and/or make sure you're not wasting your time on it.
|
For most changes, this should not be necessary. I just want to know if you're doing something big so I can offer advice and/or make sure you're not wasting your time on it.
|
||||||
|
|
||||||
|
|
||||||
## Style Guidelines
|
## Style Guidelines
|
||||||
|
|
||||||
#### Follow the formatting guidelines.
|
### Follow the formatting guidelines.
|
||||||
This means:
|
This means:
|
||||||
- No spaces around parentheses: `if(condition){`, `SomeType s = (SomeType)object`
|
- No spaces around parentheses: `if(condition){`, `SomeType s = (SomeType)object`
|
||||||
- Same-line braces.
|
- Same-line braces.
|
||||||
- 4 spaces indentation
|
- 4 spaces indentation
|
||||||
- `camelCase`, **even for constants or enums**. Why? Because `SCREAMING_CASE` is ugly, annoying to type and does not achieve anything useful. Constants are *less* dangerous than variables, not more.
|
- `camelCase`, **even for constants or enums**. Why? Because `SCREAMING_CASE` is ugly, annoying to type and does not achieve anything useful. Constants are *less* dangerous than variables, not more. Any reasonable IDE should highlight them for you anyway.
|
||||||
- No underscores for anything. (Yes, I know `Bindings` violates this principle, but that's for legacy reasons and really should be cleaned up some day)
|
- No underscores for anything. (Yes, I know `Bindings` violates this principle, but that's for legacy reasons and really should be cleaned up some day)
|
||||||
- Do not use braceless `if/else` statements. `if(x) statement else statement2` should **never** be done. In very specific situations, having braceless if-statements on one line is allowed: `if(cond) return;` would be valid.
|
- Do not use braceless `if/else` statements. `if(x) statement else statement2` should **never** be done. In very specific situations, having braceless if-statements on one line is allowed: `if(cond) return;` would be valid.
|
||||||
|
- Prefer single-line javadoc `/** @return for example */` instead of multiline javadoc whenver possible
|
||||||
|
- Short method/variable names (multipleLongWords should be avoided if it's possible to do so reasonably, especially for variables)
|
||||||
|
- Use wildcard imports - `import some.package.*` - for everything. This makes incorrect class usage more obvious (*e.g. arc.util.Timer vs java.util.Timer*) and leads to cleaner-looking code.
|
||||||
|
|
||||||
Import [this style file](.github/Mindustry-CodeStyle-IJ.xml) into IntelliJ to get correct formatting when developing Mindustry.
|
Import [this style file](.github/Mindustry-CodeStyle-IJ.xml) into IntelliJ to get correct formatting when developing Mindustry.
|
||||||
|
|
||||||
#### Do not use incompatible Java features (java.util.function, java.awt).
|
### Do not use incompatible Java features (java.util.function, java.awt).
|
||||||
Android and RoboVM (iOS) do not support many of Java 8's features, such as the packages `java.util.function`, `java.util.stream` or `forEach` in collections. Do not use these in your code.
|
Android and RoboVM (iOS) do not support many of Java 8's features, such as the packages `java.util.function`, `java.util.stream` or `forEach` in collections. Do not use these in your code.
|
||||||
If you need to use functional interfaces, use the ones in `arc.func`, which are more or less the same with different naming schemes.
|
If you need to use functional interfaces, use the ones in `arc.func`, which are more or less the same with different naming schemes.
|
||||||
|
|
||||||
@@ -39,7 +41,7 @@ The same applies to any class *outside* of the standard `java.[n]io` / `java.net
|
|||||||
In general, if you are using IntelliJ, you should be warned about platform incompatiblities.
|
In general, if you are using IntelliJ, you should be warned about platform incompatiblities.
|
||||||
|
|
||||||
|
|
||||||
#### Use `arc` collections and classes when possible.
|
### Use `arc` collections and classes when possible.
|
||||||
Instead of using `java.util.List`, `java.util.HashMap`, and other standard Java collections, use `Seq`, `ObjectMap` and other equivalents from `arc.struct`.
|
Instead of using `java.util.List`, `java.util.HashMap`, and other standard Java collections, use `Seq`, `ObjectMap` and other equivalents from `arc.struct`.
|
||||||
Why? Because that's what the rest of the codebase uses, and the standard collections have a lot of cruft and usability issues associated with them.
|
Why? Because that's what the rest of the codebase uses, and the standard collections have a lot of cruft and usability issues associated with them.
|
||||||
In the rare case that concurrency is required, you may use the standard Java classes for that purpose (e.g. `CopyOnWriteArrayList`).
|
In the rare case that concurrency is required, you may use the standard Java classes for that purpose (e.g. `CopyOnWriteArrayList`).
|
||||||
@@ -52,21 +54,21 @@ What you'll usually need to change:
|
|||||||
- *Many others*
|
- *Many others*
|
||||||
|
|
||||||
|
|
||||||
#### Avoid boxed types (Integer, Boolean)
|
### Avoid boxed types (Integer, Boolean)
|
||||||
Never create variables or collections with boxed types `Seq<Integer>` or `ObjectMap<Integer, ...>`. Use the collections specialized for this task, e.g. `IntSeq` and `IntMap`.
|
Never create variables or collections with boxed types `Seq<Integer>` or `ObjectMap<Integer, ...>`. Use the collections specialized for this task, e.g. `IntSeq` and `IntMap`.
|
||||||
|
|
||||||
|
|
||||||
#### Do not allocate anything if possible.
|
### Do not allocate anything if possible.
|
||||||
Never allocate `new` objects in the main loop. If you absolutely require new objects, use `Pools` to obtain and free object instances.
|
Never allocate `new` objects in the main loop. If you absolutely require new objects, use `Pools` to obtain and free object instances.
|
||||||
Otherwise, use the `Tmp` variables for things like vector/shape operations, or create `static` variables for re-use.
|
Otherwise, use the `Tmp` variables for things like vector/shape operations, or create `static` variables for re-use.
|
||||||
If using a list, make it a static variable and clear it every time it is used. Re-use as much as possible.
|
If using a list, make it a static variable and clear it every time it is used. Re-use as much as possible.
|
||||||
|
|
||||||
#### Avoid bloated code and unnecessary getters/setters.
|
### Avoid bloated code and unnecessary getters/setters.
|
||||||
This is situational, but in essence what it means is to avoid using any sort of getters and setters unless absolutely necessary. Public or protected fields should suffice for most things.
|
This is situational, but in essence what it means is to avoid using any sort of getters and setters unless absolutely necessary. Public or protected fields should suffice for most things.
|
||||||
If something needs to be encapsulated in the future, IntelliJ can handle it with a few clicks.
|
If something needs to be encapsulated in the future, IntelliJ can handle it with a few clicks.
|
||||||
|
|
||||||
|
|
||||||
#### Do not create methods unless necessary.
|
### Do not create methods unless necessary.
|
||||||
Unless a block of code is very large or used in more than 1-2 places, don't split it up into a separate method. Making unnecessary methods only creates confusion, and may slightly decrease performance.
|
Unless a block of code is very large or used in more than 1-2 places, don't split it up into a separate method. Making unnecessary methods only creates confusion, and may slightly decrease performance.
|
||||||
|
|
||||||
## Other Notes
|
## Other Notes
|
||||||
|
|||||||
52
ISSUES.md
Normal file
52
ISSUES.md
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# Why was my issue closed?
|
||||||
|
|
||||||
|
This document goes over some common causes for issue closures.
|
||||||
|
|
||||||
|
## You did not fill in the template
|
||||||
|
|
||||||
|
I can't debug the problem unless you provide the information the template asks for.
|
||||||
|
If you cannot put in the effort to fill out a template, then don't expect me to put in the effort to fix it.
|
||||||
|
|
||||||
|
## Your issue was already reported
|
||||||
|
|
||||||
|
If the problem in your issue has already been encountered before, it will be closed - especially if your report doesn't provide any new information.
|
||||||
|
Make sure you search the *closed* issues before making an issue.
|
||||||
|
|
||||||
|
I do not link the specific issue(s) that report the same problem, because searching takes time - if you're interested in finding them, you should be able to do so without my help.
|
||||||
|
|
||||||
|
To be clear: I do **not** expect users to look at *all* previous issues, or do a comprehensive stack trace analysis to see if their crash was already reported.
|
||||||
|
|
||||||
|
## Your issue was already fixed
|
||||||
|
|
||||||
|
The problem you reported has been addressed. Note that this does **not** mean that the latest stable version of Mindustry has the fix!
|
||||||
|
It simply means that I have committed (or am about to commit) a patch that fixes it *on the current development branch*.
|
||||||
|
|
||||||
|
## Your issue is missing a crash report or log
|
||||||
|
|
||||||
|
If the game crashes without a specific cause, and you don't send me a log, I can't fix it. There is no way for me to know what went wrong.
|
||||||
|
|
||||||
|
During a normal crash, the game should tell you where the log is saved. If not, you should still be able to look in the game's crash folder on most operating systems, or export the logs in *Settings -> Game Data -> Export Crash Logs*.
|
||||||
|
|
||||||
|
## Your issue is missing saves or screenshots
|
||||||
|
|
||||||
|
Even if you think your problem happens everywhere and saves/screenshots are redundant, this is frequently not the case.
|
||||||
|
If I cannot reproduce the problem on my own saves and you have not linked any of your own, then the problem is likely to be save-specific. If you do not send me any, the problem cannot be investigated further.
|
||||||
|
|
||||||
|
## Your issue is related to an external program
|
||||||
|
|
||||||
|
If Mindustry causes something else to crash or misbehave, I am very unlikely to fix it. Unless the problem is serious, widespread and/or clearly a bug *in Mindustry*, it is not my responsibility.
|
||||||
|
|
||||||
|
Similarly, if you use another (invasive) program to change how Mindustry works, and something goes wrong, that is not my problem. Don't do it.
|
||||||
|
|
||||||
|
## Your issue is caused by mods
|
||||||
|
|
||||||
|
Crashes and bugs related to installed mods should be reported in the relevant mod repository, not here.
|
||||||
|
*Note that problems with the Mindustry modding API are a separate problem, and do not apply.*
|
||||||
|
|
||||||
|
## I cannot reproduce your issue
|
||||||
|
|
||||||
|
If I follow your instructions and am repeatedly unable to reproduce the problem you've reported, then it is very unlikely to be fixed.
|
||||||
|
Either the problem is device-specific, or there is not enough information given for me to be able to reproduce it.
|
||||||
|
|
||||||
|
I may attempt to change some code if I think it will make the issue less likely to occur, but without knowing for sure, the issue cannot be considered truly "fixed".
|
||||||
|
As I cannot make any further progress on the problem, there is no reason to keep it open. If it is a common bug/crash, other people will come along with information that may shed some light on the issue.
|
||||||
35
README.md
35
README.md
@@ -1,7 +1,7 @@
|
|||||||

|

|
||||||
|
|
||||||
[](https://travis-ci.org/Anuken/Mindustry)
|
[](https://travis-ci.org/Anuken/Mindustry)
|
||||||
[](https://discord.gg/mindustry)
|
[](https://discord.gg/mindustry)
|
||||||
|
|
||||||
A sandbox tower defense game written in Java.
|
A sandbox tower defense game written in Java.
|
||||||
|
|
||||||
@@ -9,34 +9,34 @@ _[Trello Board](https://trello.com/b/aE2tcUwF/mindustry-40-plans)_
|
|||||||
_[Wiki](https://mindustrygame.github.io/wiki)_
|
_[Wiki](https://mindustrygame.github.io/wiki)_
|
||||||
_[Javadoc](https://mindustrygame.github.io/docs/)_
|
_[Javadoc](https://mindustrygame.github.io/docs/)_
|
||||||
|
|
||||||
### Contributing
|
## Contributing
|
||||||
|
|
||||||
See [CONTRIBUTING](CONTRIBUTING.md).
|
See [CONTRIBUTING](CONTRIBUTING.md).
|
||||||
|
|
||||||
### Building
|
## Building
|
||||||
|
|
||||||
Bleeding-edge builds are generated automatically for every commit. You can see them [here](https://github.com/Anuken/MindustryBuilds/releases).
|
Bleeding-edge builds are generated automatically for every commit. You can see them [here](https://github.com/Anuken/MindustryBuilds/releases).
|
||||||
|
|
||||||
If you'd rather compile on your own, follow these instructions.
|
If you'd rather compile on your own, follow these instructions.
|
||||||
First, make sure you have [JDK 14](https://adoptopenjdk.net/) installed. Open a terminal in the root directory, `cd` to the Mindustry folder and run the following commands:
|
First, make sure you have [JDK 14](https://adoptopenjdk.net/) installed. Open a terminal in the root directory, `cd` to the Mindustry folder and run the following commands:
|
||||||
|
|
||||||
#### Windows
|
### Windows
|
||||||
|
|
||||||
_Running:_ `gradlew desktop:run`
|
_Running:_ `gradlew desktop:run`
|
||||||
_Building:_ `gradlew desktop:dist`
|
_Building:_ `gradlew desktop:dist`
|
||||||
_Sprite Packing:_ `gradlew tools:pack`
|
_Sprite Packing:_ `gradlew tools:pack`
|
||||||
|
|
||||||
#### Linux/Mac OS
|
### Linux/Mac OS
|
||||||
|
|
||||||
_Running:_ `./gradlew desktop:run`
|
_Running:_ `./gradlew desktop:run`
|
||||||
_Building:_ `./gradlew desktop:dist`
|
_Building:_ `./gradlew desktop:dist`
|
||||||
_Sprite Packing:_ `./gradlew tools:pack`
|
_Sprite Packing:_ `./gradlew tools:pack`
|
||||||
|
|
||||||
#### Server
|
### Server
|
||||||
|
|
||||||
Server builds are bundled with each released build (in Releases). If you'd rather compile on your own, replace 'desktop' with 'server', e.g. `gradlew server:dist`.
|
Server builds are bundled with each released build (in Releases). If you'd rather compile on your own, replace 'desktop' with 'server', e.g. `gradlew server:dist`.
|
||||||
|
|
||||||
#### Android
|
### Android
|
||||||
|
|
||||||
1. Install the Android SDK [here.](https://developer.android.com/studio#downloads) Make sure you're downloading the "Command line tools only", as Android Studio is not required.
|
1. Install the Android SDK [here.](https://developer.android.com/studio#downloads) Make sure you're downloading the "Command line tools only", as Android Studio is not required.
|
||||||
2. Set the `ANDROID_HOME` environment variable to point to your unzipped Android SDK directory.
|
2. Set the `ANDROID_HOME` environment variable to point to your unzipped Android SDK directory.
|
||||||
@@ -44,7 +44,9 @@ Server builds are bundled with each released build (in Releases). If you'd rathe
|
|||||||
|
|
||||||
To debug the application on a connected phone, run `gradlew android:installDebug android:run`.
|
To debug the application on a connected phone, run `gradlew android:installDebug android:run`.
|
||||||
|
|
||||||
##### Troubleshooting
|
### Troubleshooting
|
||||||
|
|
||||||
|
#### Permission Denied
|
||||||
|
|
||||||
If the terminal returns `Permission denied` or `Command not found` on Mac/Linux, run `chmod +x ./gradlew` before running `./gradlew`. *This is a one-time procedure.*
|
If the terminal returns `Permission denied` or `Command not found` on Mac/Linux, run `chmod +x ./gradlew` before running `./gradlew`. *This is a one-time procedure.*
|
||||||
|
|
||||||
@@ -53,20 +55,11 @@ If the terminal returns `Permission denied` or `Command not found` on Mac/Linux,
|
|||||||
Gradle may take up to several minutes to download files. Be patient. <br>
|
Gradle may take up to several minutes to download files. Be patient. <br>
|
||||||
After building, the output .JAR file should be in `/desktop/build/libs/Mindustry.jar` for desktop builds, and in `/server/build/libs/server-release.jar` for server builds.
|
After building, the output .JAR file should be in `/desktop/build/libs/Mindustry.jar` for desktop builds, and in `/server/build/libs/server-release.jar` for server builds.
|
||||||
|
|
||||||
### Feature Requests
|
## Feature Requests
|
||||||
|
|
||||||
Post feature requests and feedback [here](https://github.com/Anuken/Mindustry-Suggestions/issues/new/choose).
|
Post feature requests and feedback [here](https://github.com/Anuken/Mindustry-Suggestions/issues/new/choose).
|
||||||
|
|
||||||
### Downloads
|
## Downloads
|
||||||
|
|
||||||
[<img src="https://static.itch.io/images/badge.svg"
|
| [](https://anuke.itch.io/mindustry) | [](https://play.google.com/store/apps/details?id=io.anuke.mindustry) | [](https://f-droid.org/packages/io.anuke.mindustry) | [](https://flathub.org/apps/details/com.github.Anuken.Mindustry)
|
||||||
alt="Get it on Itch.io"
|
|--- |--- |--- |--- |
|
||||||
height="60">](https://anuke.itch.io/mindustry)
|
|
||||||
|
|
||||||
[<img src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png"
|
|
||||||
alt="Get it on Google Play"
|
|
||||||
height="80">](https://play.google.com/store/apps/details?id=io.anuke.mindustry)
|
|
||||||
|
|
||||||
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png"
|
|
||||||
alt="Get it on F-Droid"
|
|
||||||
height="80">](https://f-droid.org/packages/io.anuke.mindustry/)
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
### Adding a server to the list
|
### Adding a server to the list
|
||||||
|
|
||||||
Mindustry now has a public list of servers that everyone can see and connect to.
|
Mindustry now has a public list of servers that everyone can see and connect to.
|
||||||
This is done by letting clients `GET` a [JSON list of servers](https://github.com/Anuken/Mindustry/blob/master/servers.json) in this repository.
|
This is done by letting clients `GET` a [JSON list of servers](https://github.com/Anuken/Mindustry/blob/master/servers_v6.json) in this repository.
|
||||||
|
|
||||||
You may want to add your server to this list. The steps for getting this done are as follows:
|
You may want to add your server to this list. The steps for getting this done are as follows:
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ You'll need to either hire some moderators, or make use of (currently non-existe
|
|||||||
3. **Get some good maps.** *(optional, but highly recommended)*. Add some maps to your server and set the map rotation to custom-only. You can get maps from the Steam workshop by subscribing and exporting them; using the `#maps` channel on Discord is also an option.
|
3. **Get some good maps.** *(optional, but highly recommended)*. Add some maps to your server and set the map rotation to custom-only. You can get maps from the Steam workshop by subscribing and exporting them; using the `#maps` channel on Discord is also an option.
|
||||||
4. **Check your server configuration.** *(optional)* I would recommend adding a message rate limit of 1 second (`config messageRateLimit 1`), and disabling connect/disconnect messages to reduce spam (`config showConnectMessages false`).
|
4. **Check your server configuration.** *(optional)* I would recommend adding a message rate limit of 1 second (`config messageRateLimit 1`), and disabling connect/disconnect messages to reduce spam (`config showConnectMessages false`).
|
||||||
5. Finally, **submit a pull request** to add your server's IP to the list.
|
5. Finally, **submit a pull request** to add your server's IP to the list.
|
||||||
This should be fairly straightforward: Press the edit button on the [server file](https://github.com/Anuken/Mindustry/blob/master/servers.json), then add a JSON object with a single key, indicating your server address.
|
This should be fairly straightforward: Press the edit button on the [server file](https://github.com/Anuken/Mindustry/blob/master/servers_v6.json), then add a JSON object with a single key, indicating your server address.
|
||||||
For example, if your server address is `google.com`, you would add a comma after the last entry and insert:
|
For example, if your server address is `google.com`, you would add a comma after the last entry and insert:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,7 +35,8 @@ dependencies{
|
|||||||
natives "com.github.Anuken.Arc:natives-box2d-android:${getArcHash()}"
|
natives "com.github.Anuken.Arc:natives-box2d-android:${getArcHash()}"
|
||||||
|
|
||||||
//android dependencies magically disappear during compilation, thanks gradle!
|
//android dependencies magically disappear during compilation, thanks gradle!
|
||||||
if(new File(projectDir.parent, '../Arc').exists()) compileOnly fileTree(dir: '../../Arc/backends/backend-android/libs', include: ['*.jar'])
|
def sdkFile = new File((String)findSdkDir(), "/platforms/android-29/android.jar")
|
||||||
|
if(sdkFile.exists()) compileOnly files(sdkFile.absolutePath)
|
||||||
}
|
}
|
||||||
|
|
||||||
task deploy(type: Copy){
|
task deploy(type: Copy){
|
||||||
@@ -76,7 +77,7 @@ android{
|
|||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
|
|
||||||
versionName versionNameResult
|
versionName versionNameResult
|
||||||
versionCode vcode
|
versionCode = (System.getenv("TRAVIS_BUILD_ID") != null ? System.getenv("TRAVIS_BUILD_ID").toInteger() : vcode)
|
||||||
|
|
||||||
if(project.hasProperty("release")){
|
if(project.hasProperty("release")){
|
||||||
props['androidBuildCode'] = (vcode + 1).toString()
|
props['androidBuildCode'] = (vcode + 1).toString()
|
||||||
@@ -98,15 +99,20 @@ android{
|
|||||||
storePassword RELEASE_STORE_PASSWORD
|
storePassword RELEASE_STORE_PASSWORD
|
||||||
keyAlias RELEASE_KEY_ALIAS
|
keyAlias RELEASE_KEY_ALIAS
|
||||||
keyPassword RELEASE_KEY_PASSWORD
|
keyPassword RELEASE_KEY_PASSWORD
|
||||||
|
}else if(System.getenv("CI") == "true"){
|
||||||
|
storeFile = file("../../bekeystore.jks")
|
||||||
|
storePassword = System.getenv("keystore_password")
|
||||||
|
keyAlias = System.getenv("keystore_alias")
|
||||||
|
keyPassword = System.getenv("keystore_alias_password")
|
||||||
}else{
|
}else{
|
||||||
println("No keystore property found. Releases will be unsigned.")
|
println("No keystore property found. Releases will be unsigned.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(project.hasProperty("RELEASE_STORE_FILE")) {
|
if(project.hasProperty("RELEASE_STORE_FILE") || System.getenv("CI") == "true"){
|
||||||
buildTypes {
|
buildTypes{
|
||||||
release {
|
release{
|
||||||
signingConfig signingConfigs.release
|
signingConfig signingConfigs.release
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -146,3 +152,9 @@ task run(type: Exec){
|
|||||||
def adb = path + "/platform-tools/adb"
|
def adb = path + "/platform-tools/adb"
|
||||||
commandLine "$adb", 'shell', 'am', 'start', '-n', 'io.anuke.mindustry/mindustry.android.AndroidLauncher'
|
commandLine "$adb", 'shell', 'am', 'start', '-n', 'io.anuke.mindustry/mindustry.android.AndroidLauncher'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!project.ext.hasSprites()){
|
||||||
|
println "Scheduling sprite pack."
|
||||||
|
run.dependsOn ":tools:pack"
|
||||||
|
deploy.dependsOn ":tools:pack"
|
||||||
|
}
|
||||||
@@ -7,7 +7,6 @@ import android.content.pm.*;
|
|||||||
import android.net.*;
|
import android.net.*;
|
||||||
import android.os.Build.*;
|
import android.os.Build.*;
|
||||||
import android.os.*;
|
import android.os.*;
|
||||||
import android.provider.Settings.*;
|
|
||||||
import android.telephony.*;
|
import android.telephony.*;
|
||||||
import arc.*;
|
import arc.*;
|
||||||
import arc.backend.android.*;
|
import arc.backend.android.*;
|
||||||
@@ -15,7 +14,7 @@ import arc.files.*;
|
|||||||
import arc.func.*;
|
import arc.func.*;
|
||||||
import arc.scene.ui.layout.*;
|
import arc.scene.ui.layout.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import arc.util.serialization.*;
|
import dalvik.system.*;
|
||||||
import mindustry.*;
|
import mindustry.*;
|
||||||
import mindustry.game.Saves.*;
|
import mindustry.game.Saves.*;
|
||||||
import mindustry.io.*;
|
import mindustry.io.*;
|
||||||
@@ -23,13 +22,11 @@ import mindustry.net.*;
|
|||||||
import mindustry.ui.dialogs.*;
|
import mindustry.ui.dialogs.*;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.lang.System;
|
|
||||||
import java.lang.Thread.*;
|
import java.lang.Thread.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
|
|
||||||
public class AndroidLauncher extends AndroidApplication{
|
public class AndroidLauncher extends AndroidApplication{
|
||||||
public static final int PERMISSION_REQUEST_CODE = 1;
|
public static final int PERMISSION_REQUEST_CODE = 1;
|
||||||
boolean doubleScaleTablets = true;
|
boolean doubleScaleTablets = true;
|
||||||
@@ -74,11 +71,24 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void showFileChooser(boolean open, String extension, Cons<Fi> cons){
|
public Class<?> loadJar(Fi jar, String mainClass) throws Exception{
|
||||||
|
DexClassLoader loader = new DexClassLoader(jar.file().getPath(), getFilesDir().getPath(), null, getClassLoader());
|
||||||
|
return Class.forName(mainClass, true, loader);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void showFileChooser(boolean open, String title, String extension, Cons<Fi> cons){
|
||||||
|
showFileChooser(open, title, cons, extension);
|
||||||
|
}
|
||||||
|
|
||||||
|
void showFileChooser(boolean open, String title, Cons<Fi> cons, String... extensions){
|
||||||
|
String extension = extensions[0];
|
||||||
|
|
||||||
if(VERSION.SDK_INT >= VERSION_CODES.Q){
|
if(VERSION.SDK_INT >= VERSION_CODES.Q){
|
||||||
Intent intent = new Intent(open ? Intent.ACTION_OPEN_DOCUMENT : Intent.ACTION_CREATE_DOCUMENT);
|
Intent intent = new Intent(open ? Intent.ACTION_OPEN_DOCUMENT : Intent.ACTION_CREATE_DOCUMENT);
|
||||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||||
intent.setType(extension.equals("zip") && !open ? "application/zip" : "*/*");
|
intent.setType(extension.equals("zip") && !open && extensions.length == 1 ? "application/zip" : "*/*");
|
||||||
|
|
||||||
addResultListener(i -> startActivityForResult(intent, i), (code, in) -> {
|
addResultListener(i -> startActivityForResult(intent, i), (code, in) -> {
|
||||||
if(code == Activity.RESULT_OK && in != null && in.getData() != null){
|
if(code == Activity.RESULT_OK && in != null && in.getData() != null){
|
||||||
Uri uri = in.getData();
|
Uri uri = in.getData();
|
||||||
@@ -108,7 +118,7 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
});
|
});
|
||||||
}else if(VERSION.SDK_INT >= VERSION_CODES.M && !(checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED &&
|
}else if(VERSION.SDK_INT >= 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 = new FileChooser(open ? "@open" : "@save", file -> file.extension().equalsIgnoreCase(extension), open, file -> {
|
chooser = new FileChooser(title, file -> Structs.contains(extensions, file.extension().toLowerCase()), open, file -> {
|
||||||
if(!open){
|
if(!open){
|
||||||
cons.get(file.parent().child(file.nameWithoutExtension() + "." + extension));
|
cons.get(file.parent().child(file.nameWithoutExtension() + "." + extension));
|
||||||
}else{
|
}else{
|
||||||
@@ -125,9 +135,18 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
}
|
}
|
||||||
requestPermissions(perms.toArray(new String[0]), PERMISSION_REQUEST_CODE);
|
requestPermissions(perms.toArray(new String[0]), PERMISSION_REQUEST_CODE);
|
||||||
}else{
|
}else{
|
||||||
super.showFileChooser(open, extension, cons);
|
if(open){
|
||||||
|
new FileChooser(title, file -> Structs.contains(extensions, file.extension().toLowerCase()), true, cons).show();
|
||||||
|
}else{
|
||||||
|
super.showFileChooser(open, "@open", extension, cons);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void showMultiFileChooser(Cons<Fi> cons, String... extensions){
|
||||||
|
showFileChooser(true, "@open", cons, extensions);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void beginForceLandscape(){
|
public void beginForceLandscape(){
|
||||||
@@ -146,7 +165,7 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
}});
|
}});
|
||||||
checkFiles(getIntent());
|
checkFiles(getIntent());
|
||||||
|
|
||||||
|
try{
|
||||||
//new external folder
|
//new external folder
|
||||||
Fi data = Core.files.absolute(getContext().getExternalFilesDir(null).getAbsolutePath());
|
Fi data = Core.files.absolute(getContext().getExternalFilesDir(null).getAbsolutePath());
|
||||||
Core.settings.setDataDirectory(data);
|
Core.settings.setDataDirectory(data);
|
||||||
@@ -170,6 +189,10 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
t.printStackTrace();
|
t.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}catch(Exception e){
|
||||||
|
//print log but don't crash
|
||||||
|
Log.err(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -98,6 +98,8 @@ public class Annotations{
|
|||||||
boolean serialize() default true;
|
boolean serialize() default true;
|
||||||
/** Whether to generate IO code. This is for advanced usage only. */
|
/** Whether to generate IO code. This is for advanced usage only. */
|
||||||
boolean genio() default true;
|
boolean genio() default true;
|
||||||
|
/** Whether I made a massive mistake by merging two different class branches */
|
||||||
|
boolean legacy() default false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Indicates an internal interface for entity components. */
|
/** Indicates an internal interface for entity components. */
|
||||||
|
|||||||
@@ -115,12 +115,12 @@ public abstract class BaseProcessor extends AbstractProcessor{
|
|||||||
return ClassName.get(c).box();
|
return ClassName.get(c).box();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TypeVariableName getTVN(TypeParameterElement element) {
|
public static TypeVariableName getTVN(TypeParameterElement element){
|
||||||
String name = element.getSimpleName().toString();
|
String name = element.getSimpleName().toString();
|
||||||
List<? extends TypeMirror> boundsMirrors = element.getBounds();
|
List<? extends TypeMirror> boundsMirrors = element.getBounds();
|
||||||
|
|
||||||
List<TypeName> boundsTypeNames = new ArrayList<>();
|
List<TypeName> boundsTypeNames = new ArrayList<>();
|
||||||
for (TypeMirror typeMirror : boundsMirrors) {
|
for(TypeMirror typeMirror : boundsMirrors){
|
||||||
boundsTypeNames.add(TypeName.get(typeMirror));
|
boundsTypeNames.add(TypeName.get(typeMirror));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,11 +137,11 @@ public abstract class BaseProcessor extends AbstractProcessor{
|
|||||||
if(imports != null){
|
if(imports != null){
|
||||||
String rawSource = file.toString();
|
String rawSource = file.toString();
|
||||||
Seq<String> result = new Seq<>();
|
Seq<String> result = new Seq<>();
|
||||||
for (String s : rawSource.split("\n", -1)) {
|
for(String s : rawSource.split("\n", -1)){
|
||||||
result.add(s);
|
result.add(s);
|
||||||
if (s.startsWith("package ")) {
|
if (s.startsWith("package ")){
|
||||||
result.add("");
|
result.add("");
|
||||||
for (String i : imports) {
|
for (String i : imports){
|
||||||
result.add(i);
|
result.add(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -204,10 +204,10 @@ public abstract class BaseProcessor extends AbstractProcessor{
|
|||||||
context = ((JavacProcessingEnvironment)env).getContext();
|
context = ((JavacProcessingEnvironment)env).getContext();
|
||||||
maker = TreeMaker.instance(javacProcessingEnv.getContext());
|
maker = TreeMaker.instance(javacProcessingEnv.getContext());
|
||||||
|
|
||||||
Log.setLogLevel(LogLevel.info);
|
Log.level = LogLevel.info;
|
||||||
|
|
||||||
if(System.getProperty("debug") != null){
|
if(System.getProperty("debug") != null){
|
||||||
Log.setLogLevel(LogLevel.debug);
|
Log.level = LogLevel.debug;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -229,7 +229,7 @@ public abstract class BaseProcessor extends AbstractProcessor{
|
|||||||
try{
|
try{
|
||||||
process(roundEnv);
|
process(roundEnv);
|
||||||
}catch(Throwable e){
|
}catch(Throwable e){
|
||||||
e.printStackTrace();
|
Log.err(e);
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
package mindustry.annotations.entity;
|
package mindustry.annotations.entity;
|
||||||
|
|
||||||
import arc.*;
|
|
||||||
import arc.files.*;
|
import arc.files.*;
|
||||||
import arc.func.*;
|
import arc.func.*;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
import arc.util.ArcAnnotate.*;
|
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import arc.util.io.*;
|
import arc.util.io.*;
|
||||||
import arc.util.pooling.Pool.*;
|
import arc.util.pooling.Pool.*;
|
||||||
@@ -78,9 +76,10 @@ public class EntityProcess extends BaseProcessor{
|
|||||||
if(elem.is(Modifier.ABSTRACT) || elem.is(Modifier.NATIVE)) continue;
|
if(elem.is(Modifier.ABSTRACT) || elem.is(Modifier.NATIVE)) continue;
|
||||||
//get all statements in the method, store them
|
//get all statements in the method, store them
|
||||||
methodBlocks.put(elem.descString(), elem.tree().getBody().toString()
|
methodBlocks.put(elem.descString(), elem.tree().getBody().toString()
|
||||||
//replace all self() invocations with this
|
.replaceAll("this\\.<(.*)>self\\(\\)", "this") //fix parameterized self() calls
|
||||||
.replaceAll("this\\.<(.*)>self\\(\\)", "this")
|
.replaceAll("self\\(\\)", "this") //fix self() calls
|
||||||
.replaceAll("self\\(\\)", "this")
|
.replaceAll(" yield ", "") //fix enchanced switch
|
||||||
|
.replaceAll("\\/\\*missing\\*\\/", "var") //fix vars
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -241,7 +240,6 @@ public class EntityProcess extends BaseProcessor{
|
|||||||
//look at each definition
|
//look at each definition
|
||||||
for(Selement<?> type : allDefs){
|
for(Selement<?> type : allDefs){
|
||||||
EntityDef ann = type.annotation(EntityDef.class);
|
EntityDef ann = type.annotation(EntityDef.class);
|
||||||
boolean isFinal = ann.isFinal();
|
|
||||||
|
|
||||||
//all component classes (not interfaces)
|
//all component classes (not interfaces)
|
||||||
Seq<Stype> components = allComponents(type);
|
Seq<Stype> components = allComponents(type);
|
||||||
@@ -275,6 +273,10 @@ public class EntityProcess extends BaseProcessor{
|
|||||||
name += "Entity";
|
name += "Entity";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(ann.legacy()){
|
||||||
|
name += "Legacy" + Strings.capitalize(type.name());
|
||||||
|
}
|
||||||
|
|
||||||
//skip double classes
|
//skip double classes
|
||||||
if(usedNames.containsKey(name)){
|
if(usedNames.containsKey(name)){
|
||||||
extraNames.get(usedNames.get(name), ObjectSet::new).add(type.name());
|
extraNames.get(usedNames.get(name), ObjectSet::new).add(type.name());
|
||||||
@@ -379,7 +381,7 @@ public class EntityProcess extends BaseProcessor{
|
|||||||
.addModifiers(Modifier.PUBLIC)
|
.addModifiers(Modifier.PUBLIC)
|
||||||
.addStatement("return $S + $L", name + "#", "id").build());
|
.addStatement("return $S + $L", name + "#", "id").build());
|
||||||
|
|
||||||
EntityIO io = new EntityIO(type.name(), builder, allFieldSpecs, serializer, rootDirectory.child("annotations/src/main/resources/revisions").child(name));
|
EntityIO io = new EntityIO(type.name(), builder, allFieldSpecs, serializer, rootDirectory.child("annotations/src/main/resources/revisions").child(type.name()));
|
||||||
//entities with no sync comp and no serialization gen no code
|
//entities with no sync comp and no serialization gen no code
|
||||||
boolean hasIO = ann.genio() && (components.contains(s -> s.name().contains("Sync")) || ann.serialize());
|
boolean hasIO = ann.genio() && (components.contains(s -> s.name().contains("Sync")) || ann.serialize());
|
||||||
|
|
||||||
@@ -520,7 +522,7 @@ public class EntityProcess extends BaseProcessor{
|
|||||||
//add free code to remove methods - always at the end
|
//add free code to remove methods - always at the end
|
||||||
//this only gets called next frame.
|
//this only gets called next frame.
|
||||||
if(first.name().equals("remove") && ann.pooled()){
|
if(first.name().equals("remove") && ann.pooled()){
|
||||||
mbuilder.addStatement("$T.app.post(() -> $T.free(this))", Core.class, Pools.class);
|
mbuilder.addStatement("mindustry.gen.Groups.queueFree(($T)this)", Poolable.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
builder.addMethod(mbuilder.build());
|
builder.addMethod(mbuilder.build());
|
||||||
@@ -587,6 +589,17 @@ public class EntityProcess extends BaseProcessor{
|
|||||||
//write clear
|
//write clear
|
||||||
groupsBuilder.addMethod(groupClear.build());
|
groupsBuilder.addMethod(groupClear.build());
|
||||||
|
|
||||||
|
//add method for pool storage
|
||||||
|
groupsBuilder.addField(FieldSpec.builder(ParameterizedTypeName.get(Seq.class, Poolable.class), "freeQueue", Modifier.PRIVATE, Modifier.STATIC).initializer("new Seq<>()").build());
|
||||||
|
|
||||||
|
//method for freeing things
|
||||||
|
MethodSpec.Builder groupFreeQueue = MethodSpec.methodBuilder("queueFree")
|
||||||
|
.addModifiers(Modifier.PUBLIC, Modifier.STATIC)
|
||||||
|
.addParameter(Poolable.class, "obj")
|
||||||
|
.addStatement("freeQueue.add(obj)");
|
||||||
|
|
||||||
|
groupsBuilder.addMethod(groupFreeQueue.build());
|
||||||
|
|
||||||
//add method for resizing all necessary groups
|
//add method for resizing all necessary groups
|
||||||
MethodSpec.Builder groupResize = MethodSpec.methodBuilder("resize")
|
MethodSpec.Builder groupResize = MethodSpec.methodBuilder("resize")
|
||||||
.addParameter(TypeName.FLOAT, "x").addParameter(TypeName.FLOAT, "y").addParameter(TypeName.FLOAT, "w").addParameter(TypeName.FLOAT, "h")
|
.addParameter(TypeName.FLOAT, "x").addParameter(TypeName.FLOAT, "y").addParameter(TypeName.FLOAT, "w").addParameter(TypeName.FLOAT, "h")
|
||||||
@@ -595,6 +608,11 @@ public class EntityProcess extends BaseProcessor{
|
|||||||
MethodSpec.Builder groupUpdate = MethodSpec.methodBuilder("update")
|
MethodSpec.Builder groupUpdate = MethodSpec.methodBuilder("update")
|
||||||
.addModifiers(Modifier.PUBLIC, Modifier.STATIC);
|
.addModifiers(Modifier.PUBLIC, Modifier.STATIC);
|
||||||
|
|
||||||
|
//free everything pooled at the start of each updaet
|
||||||
|
groupUpdate
|
||||||
|
.addStatement("for($T p : freeQueue) $T.free(p)", Poolable.class, Pools.class)
|
||||||
|
.addStatement("freeQueue.clear()");
|
||||||
|
|
||||||
//method resize
|
//method resize
|
||||||
for(GroupDefinition group : groupDefs){
|
for(GroupDefinition group : groupDefs){
|
||||||
if(group.spatial){
|
if(group.spatial){
|
||||||
|
|||||||
@@ -32,27 +32,40 @@ public class AssetsProcess extends BaseProcessor{
|
|||||||
MethodSpec.Builder load = MethodSpec.methodBuilder("load").addModifiers(Modifier.PUBLIC, Modifier.STATIC);
|
MethodSpec.Builder load = MethodSpec.methodBuilder("load").addModifiers(Modifier.PUBLIC, Modifier.STATIC);
|
||||||
MethodSpec.Builder loadStyles = MethodSpec.methodBuilder("loadStyles").addModifiers(Modifier.PUBLIC, Modifier.STATIC);
|
MethodSpec.Builder loadStyles = MethodSpec.methodBuilder("loadStyles").addModifiers(Modifier.PUBLIC, Modifier.STATIC);
|
||||||
MethodSpec.Builder icload = MethodSpec.methodBuilder("load").addModifiers(Modifier.PUBLIC, Modifier.STATIC);
|
MethodSpec.Builder icload = MethodSpec.methodBuilder("load").addModifiers(Modifier.PUBLIC, Modifier.STATIC);
|
||||||
|
CodeBlock.Builder ichinit = CodeBlock.builder();
|
||||||
String resources = rootDirectory + "/core/assets-raw/sprites/ui";
|
String resources = rootDirectory + "/core/assets-raw/sprites/ui";
|
||||||
Jval icons = Jval.read(Fi.get(rootDirectory + "/core/assets-raw/fontgen/config.json").readString());
|
Jval icons = Jval.read(Fi.get(rootDirectory + "/core/assets-raw/fontgen/config.json").readString());
|
||||||
|
|
||||||
ObjectMap<String, String> texIcons = new OrderedMap<>();
|
ObjectMap<String, String> texIcons = new OrderedMap<>();
|
||||||
PropertiesUtils.load(texIcons, Fi.get(rootDirectory + "/core/assets/icons/icons.properties").reader());
|
PropertiesUtils.load(texIcons, Fi.get(rootDirectory + "/core/assets/icons/icons.properties").reader());
|
||||||
|
|
||||||
|
StringBuilder iconcAll = new StringBuilder();
|
||||||
|
|
||||||
texIcons.each((key, val) -> {
|
texIcons.each((key, val) -> {
|
||||||
String[] split = val.split("\\|");
|
String[] split = val.split("\\|");
|
||||||
String name = Strings.kebabToCamel(split[1]).replace("Medium", "").replace("Icon", "");
|
String name = Strings.kebabToCamel(split[1]).replace("Medium", "").replace("Icon", "");
|
||||||
if(SourceVersion.isKeyword(name) || name.equals("char")) name = name + "i";
|
if(SourceVersion.isKeyword(name) || name.equals("char")) name += "i";
|
||||||
|
|
||||||
ichtype.addField(FieldSpec.builder(char.class, name, Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL).initializer("(char)" + key).build());
|
ichtype.addField(FieldSpec.builder(char.class, name, Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL).addJavadoc(String.format("\\u%04x", Integer.parseInt(key))).initializer("'" + ((char)Integer.parseInt(key)) + "'").build());
|
||||||
});
|
});
|
||||||
|
|
||||||
ictype.addField(FieldSpec.builder(ParameterizedTypeName.get(ObjectMap.class, String.class, TextureRegionDrawable.class),
|
ictype.addField(FieldSpec.builder(ParameterizedTypeName.get(ObjectMap.class, String.class, TextureRegionDrawable.class),
|
||||||
"icons", Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL).initializer("new ObjectMap<>()").build());
|
"icons", Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL).initializer("new ObjectMap<>()").build());
|
||||||
|
|
||||||
|
ichtype.addField(FieldSpec.builder(ParameterizedTypeName.get(ObjectIntMap.class, String.class),
|
||||||
|
"codes", Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL).initializer("new ObjectIntMap<>()").build());
|
||||||
|
|
||||||
|
ObjectSet<String> used = new ObjectSet<>();
|
||||||
|
|
||||||
for(Jval val : icons.get("glyphs").asArray()){
|
for(Jval val : icons.get("glyphs").asArray()){
|
||||||
String name = capitalize(val.getString("css", ""));
|
String name = capitalize(val.getString("css", ""));
|
||||||
|
|
||||||
|
if(!val.getBool("selected", true) || !used.add(name)) continue;
|
||||||
|
|
||||||
int code = val.getInt("code", 0);
|
int code = val.getInt("code", 0);
|
||||||
ichtype.addField(FieldSpec.builder(char.class, name, Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL).initializer("(char)" + code).build());
|
iconcAll.append((char)code);
|
||||||
|
ichtype.addField(FieldSpec.builder(char.class, name, Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL).addJavadoc(String.format("\\u%04x", code)).initializer("'" + ((char)code) + "'").build());
|
||||||
|
ichinit.addStatement("codes.put($S, $L)", name, code);
|
||||||
|
|
||||||
ictype.addField(TextureRegionDrawable.class, name + "Small", Modifier.PUBLIC, Modifier.STATIC);
|
ictype.addField(TextureRegionDrawable.class, name + "Small", Modifier.PUBLIC, Modifier.STATIC);
|
||||||
icload.addStatement(name + "Small = mindustry.ui.Fonts.getGlyph(mindustry.ui.Fonts.def, (char)" + code + ")");
|
icload.addStatement(name + "Small = mindustry.ui.Fonts.getGlyph(mindustry.ui.Fonts.def, (char)" + code + ")");
|
||||||
@@ -64,6 +77,9 @@ public class AssetsProcess extends BaseProcessor{
|
|||||||
icload.addStatement("icons.put($S, " + name + "Small)", name + "Small");
|
icload.addStatement("icons.put($S, " + name + "Small)", name + "Small");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ichtype.addField(FieldSpec.builder(String.class, "all", Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL).initializer("$S", iconcAll.toString()).build());
|
||||||
|
ichtype.addStaticBlock(ichinit.build());
|
||||||
|
|
||||||
Fi.get(resources).walk(p -> {
|
Fi.get(resources).walk(p -> {
|
||||||
if(!p.extEquals("png")) return;
|
if(!p.extEquals("png")) return;
|
||||||
|
|
||||||
@@ -78,7 +94,7 @@ public class AssetsProcess extends BaseProcessor{
|
|||||||
if(SourceVersion.isKeyword(varname)) varname += "s";
|
if(SourceVersion.isKeyword(varname)) varname += "s";
|
||||||
|
|
||||||
type.addField(ClassName.bestGuess(dtype), varname, Modifier.STATIC, Modifier.PUBLIC);
|
type.addField(ClassName.bestGuess(dtype), varname, Modifier.STATIC, Modifier.PUBLIC);
|
||||||
load.addStatement(varname + " = ("+dtype+")arc.Core.atlas.drawable($S)", sfilen);
|
load.addStatement(varname + " = (" + dtype + ")arc.Core.atlas.drawable($S)", sfilen);
|
||||||
});
|
});
|
||||||
|
|
||||||
for(Element elem : elements){
|
for(Element elem : elements){
|
||||||
@@ -106,7 +122,6 @@ public class AssetsProcess extends BaseProcessor{
|
|||||||
|
|
||||||
HashSet<String> names = new HashSet<>();
|
HashSet<String> names = new HashSet<>();
|
||||||
Fi.get(path).walk(p -> {
|
Fi.get(path).walk(p -> {
|
||||||
String fname = p.name();
|
|
||||||
String name = p.nameWithoutExtension();
|
String name = p.nameWithoutExtension();
|
||||||
|
|
||||||
if(names.contains(name)){
|
if(names.contains(name)){
|
||||||
@@ -115,23 +130,20 @@ public class AssetsProcess extends BaseProcessor{
|
|||||||
names.add(name);
|
names.add(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SourceVersion.isKeyword(name)){
|
if(SourceVersion.isKeyword(name)) name += "s";
|
||||||
name = name + "s";
|
|
||||||
}
|
|
||||||
|
|
||||||
String filepath = path.substring(path.lastIndexOf("/") + 1) + "/" + fname;
|
String filepath = path.substring(path.lastIndexOf("/") + 1) + p.path().substring(p.path().lastIndexOf(path) + path.length());
|
||||||
|
|
||||||
String filename = "arc.Core.app.getType() != arc.Application.ApplicationType.iOS ? \"" + filepath + "\" : \"" + filepath.replace(".ogg", ".mp3")+"\"";
|
String filename = "\"" + filepath + "\"";
|
||||||
|
loadBegin.addStatement("arc.Core.assets.load(" + filename + ", " + rtype + ".class).loaded = a -> " + name + " = (" + rtype + ")a", filepath, filepath.replace(".ogg", ".mp3"));
|
||||||
loadBegin.addStatement("arc.Core.assets.load("+filename +", "+rtype+".class).loaded = a -> " + name + " = ("+rtype+")a", filepath, filepath.replace(".ogg", ".mp3"));
|
|
||||||
|
|
||||||
dispose.addStatement("arc.Core.assets.unload(" + filename + ")");
|
dispose.addStatement("arc.Core.assets.unload(" + filename + ")");
|
||||||
dispose.addStatement(name + " = null");
|
dispose.addStatement(name + " = null");
|
||||||
type.addField(FieldSpec.builder(ClassName.bestGuess(rtype), name, Modifier.STATIC, Modifier.PUBLIC).initializer("new arc.mock.Mock" + rtype.substring(rtype.lastIndexOf(".") + 1)+ "()").build());
|
type.addField(FieldSpec.builder(ClassName.bestGuess(rtype), name, Modifier.STATIC, Modifier.PUBLIC).initializer("new arc.audio." + rtype.substring(rtype.lastIndexOf(".") + 1) + "()").build());
|
||||||
});
|
});
|
||||||
|
|
||||||
if(classname.equals("Sounds")){
|
if(classname.equals("Sounds")){
|
||||||
type.addField(FieldSpec.builder(ClassName.bestGuess(rtype), "none", Modifier.STATIC, Modifier.PUBLIC).initializer("new arc.mock.Mock" + rtype.substring(rtype.lastIndexOf(".") + 1)+ "()").build());
|
type.addField(FieldSpec.builder(ClassName.bestGuess(rtype), "none", Modifier.STATIC, Modifier.PUBLIC).initializer("new arc.audio." + rtype.substring(rtype.lastIndexOf(".") + 1) + "()").build());
|
||||||
}
|
}
|
||||||
|
|
||||||
type.addMethod(loadBegin.build());
|
type.addMethod(loadBegin.build());
|
||||||
|
|||||||
@@ -43,9 +43,9 @@ public class LogicStatementProcessor extends BaseProcessor{
|
|||||||
String name = c.annotation(RegisterStatement.class).value();
|
String name = c.annotation(RegisterStatement.class).value();
|
||||||
|
|
||||||
if(beganWrite){
|
if(beganWrite){
|
||||||
writer.nextControlFlow("else if(obj instanceof $T)", c.mirror());
|
writer.nextControlFlow("else if(obj.getClass() == $T.class)", c.mirror());
|
||||||
}else{
|
}else{
|
||||||
writer.beginControlFlow("if(obj instanceof $T)", c.mirror());
|
writer.beginControlFlow("if(obj.getClass() == $T.class)", c.mirror());
|
||||||
beganWrite = true;
|
beganWrite = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,6 +53,7 @@ public class LogicStatementProcessor extends BaseProcessor{
|
|||||||
writer.addStatement("out.append($S)", name);
|
writer.addStatement("out.append($S)", name);
|
||||||
|
|
||||||
Seq<Svar> fields = c.fields();
|
Seq<Svar> fields = c.fields();
|
||||||
|
fields.addAll(c.superclass().fields());
|
||||||
|
|
||||||
String readSt = "if(tokens[0].equals($S))";
|
String readSt = "if(tokens[0].equals($S))";
|
||||||
if(beganRead){
|
if(beganRead){
|
||||||
@@ -67,7 +68,7 @@ public class LogicStatementProcessor extends BaseProcessor{
|
|||||||
int index = 0;
|
int index = 0;
|
||||||
|
|
||||||
for(Svar field : fields){
|
for(Svar field : fields){
|
||||||
if(field.is(Modifier.TRANSIENT)) continue;
|
if(field.isAny(Modifier.TRANSIENT, Modifier.STATIC)) continue;
|
||||||
|
|
||||||
writer.addStatement("out.append(\" \")");
|
writer.addStatement("out.append(\" \")");
|
||||||
writer.addStatement("out.append((($T)obj).$L$L)", c.mirror(), field.name(),
|
writer.addStatement("out.append((($T)obj).$L$L)", c.mirror(), field.name(),
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ public class RemoteReadGenerator{
|
|||||||
}
|
}
|
||||||
|
|
||||||
readBlock.nextControlFlow("catch (java.lang.Exception e)");
|
readBlock.nextControlFlow("catch (java.lang.Exception e)");
|
||||||
readBlock.addStatement("throw new java.lang.RuntimeException(\"Failed to to read remote method '" + entry.element.getSimpleName() + "'!\", e)");
|
readBlock.addStatement("throw new java.lang.RuntimeException(\"Failed to read remote method '" + entry.element.getSimpleName() + "'!\", e)");
|
||||||
readBlock.endControlFlow();
|
readBlock.endControlFlow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package mindustry.annotations.util;
|
package mindustry.annotations.util;
|
||||||
|
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
import arc.util.ArcAnnotate.*;
|
import arc.util.*;
|
||||||
import com.squareup.javapoet.*;
|
import com.squareup.javapoet.*;
|
||||||
import com.sun.tools.javac.code.Attribute.*;
|
import com.sun.tools.javac.code.Attribute.*;
|
||||||
import mindustry.annotations.*;
|
import mindustry.annotations.*;
|
||||||
@@ -19,7 +19,8 @@ public class Selement<T extends Element>{
|
|||||||
this.e = e;
|
this.e = e;
|
||||||
}
|
}
|
||||||
|
|
||||||
public @Nullable String doc(){
|
@Nullable
|
||||||
|
public String doc(){
|
||||||
return BaseProcessor.elementu.getDocComment(e);
|
return BaseProcessor.elementu.getDocComment(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
#Maps entity names to IDs. Autogenerated.
|
#Maps entity names to IDs. Autogenerated.
|
||||||
|
|
||||||
alpha=0
|
alpha=0
|
||||||
|
arkyid=29
|
||||||
atrax=1
|
atrax=1
|
||||||
|
beta=30
|
||||||
block=2
|
block=2
|
||||||
corvus=24
|
corvus=24
|
||||||
flare=3
|
flare=3
|
||||||
|
gamma=31
|
||||||
mace=4
|
mace=4
|
||||||
mega=5
|
mega=5
|
||||||
mindustry.entities.comp.BuildingComp=6
|
mindustry.entities.comp.BuildingComp=6
|
||||||
@@ -14,6 +17,8 @@ mindustry.entities.comp.EffectStateComp=9
|
|||||||
mindustry.entities.comp.FireComp=10
|
mindustry.entities.comp.FireComp=10
|
||||||
mindustry.entities.comp.LaunchCoreComp=11
|
mindustry.entities.comp.LaunchCoreComp=11
|
||||||
mindustry.entities.comp.PlayerComp=12
|
mindustry.entities.comp.PlayerComp=12
|
||||||
|
mindustry.entities.comp.PosTeam=27
|
||||||
|
mindustry.entities.comp.PosTeamDef=28
|
||||||
mindustry.entities.comp.PuddleComp=13
|
mindustry.entities.comp.PuddleComp=13
|
||||||
mindustry.type.Weather.WeatherStateComp=14
|
mindustry.type.Weather.WeatherStateComp=14
|
||||||
mindustry.world.blocks.campaign.LaunchPad.LaunchPayloadComp=15
|
mindustry.world.blocks.campaign.LaunchPad.LaunchPayloadComp=15
|
||||||
@@ -24,6 +29,8 @@ oct=26
|
|||||||
poly=18
|
poly=18
|
||||||
pulsar=19
|
pulsar=19
|
||||||
quad=23
|
quad=23
|
||||||
|
quasar=32
|
||||||
risso=20
|
risso=20
|
||||||
spiroct=21
|
spiroct=21
|
||||||
|
toxopid=33
|
||||||
vela=25
|
vela=25
|
||||||
@@ -1 +0,0 @@
|
|||||||
{fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{fields:[{name:team,type:mindustry.game.Team},{name:x,type:float},{name:y,type:float}]}
|
||||||
@@ -1 +0,0 @@
|
|||||||
{fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
1
annotations/src/main/resources/revisions/alpha/0.json
Normal file
1
annotations/src/main/resources/revisions/alpha/0.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/alpha/1.json
Normal file
1
annotations/src/main/resources/revisions/alpha/1.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:1,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/arkyid/0.json
Normal file
1
annotations/src/main/resources/revisions/arkyid/0.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/arkyid/1.json
Normal file
1
annotations/src/main/resources/revisions/arkyid/1.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:1,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/beta/0.json
Normal file
1
annotations/src/main/resources/revisions/beta/0.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/beta/1.json
Normal file
1
annotations/src/main/resources/revisions/beta/1.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:1,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/block/2.json
Normal file
1
annotations/src/main/resources/revisions/block/2.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:2,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/block/3.json
Normal file
1
annotations/src/main/resources/revisions/block/3.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:3,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/block/4.json
Normal file
1
annotations/src/main/resources/revisions/block/4.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:4,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/block/5.json
Normal file
1
annotations/src/main/resources/revisions/block/5.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:5,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/corvus/2.json
Normal file
1
annotations/src/main/resources/revisions/corvus/2.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:2,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/corvus/3.json
Normal file
1
annotations/src/main/resources/revisions/corvus/3.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:3,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/corvus/4.json
Normal file
1
annotations/src/main/resources/revisions/corvus/4.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:4,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/corvus/5.json
Normal file
1
annotations/src/main/resources/revisions/corvus/5.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:5,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/flare/2.json
Normal file
1
annotations/src/main/resources/revisions/flare/2.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:2,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/flare/3.json
Normal file
1
annotations/src/main/resources/revisions/flare/3.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:3,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/flare/4.json
Normal file
1
annotations/src/main/resources/revisions/flare/4.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:4,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/flare/5.json
Normal file
1
annotations/src/main/resources/revisions/flare/5.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:5,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/gamma/0.json
Normal file
1
annotations/src/main/resources/revisions/gamma/0.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/gamma/1.json
Normal file
1
annotations/src/main/resources/revisions/gamma/1.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:1,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/mace/2.json
Normal file
1
annotations/src/main/resources/revisions/mace/2.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:2,fields:[{name:ammo,type:float},{name:armor,type:float},{name:baseRotation,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/mace/3.json
Normal file
1
annotations/src/main/resources/revisions/mace/3.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:3,fields:[{name:ammo,type:float},{name:armor,type:float},{name:baseRotation,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/mace/4.json
Normal file
1
annotations/src/main/resources/revisions/mace/4.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:4,fields:[{name:ammo,type:float},{name:armor,type:float},{name:baseRotation,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/mace/5.json
Normal file
1
annotations/src/main/resources/revisions/mace/5.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:5,fields:[{name:ammo,type:float},{name:armor,type:float},{name:baseRotation,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/mega/2.json
Normal file
1
annotations/src/main/resources/revisions/mega/2.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:2,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/mega/3.json
Normal file
1
annotations/src/main/resources/revisions/mega/3.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:3,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/mono/2.json
Normal file
1
annotations/src/main/resources/revisions/mono/2.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:2,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/mono/3.json
Normal file
1
annotations/src/main/resources/revisions/mono/3.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:3,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/mono/4.json
Normal file
1
annotations/src/main/resources/revisions/mono/4.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:4,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/nova/2.json
Normal file
1
annotations/src/main/resources/revisions/nova/2.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:2,fields:[{name:ammo,type:float},{name:armor,type:float},{name:baseRotation,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/nova/3.json
Normal file
1
annotations/src/main/resources/revisions/nova/3.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:3,fields:[{name:ammo,type:float},{name:armor,type:float},{name:baseRotation,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/oct/1.json
Normal file
1
annotations/src/main/resources/revisions/oct/1.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:1,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/oct/2.json
Normal file
1
annotations/src/main/resources/revisions/oct/2.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:2,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/oct/3.json
Normal file
1
annotations/src/main/resources/revisions/oct/3.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:3,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/poly/2.json
Normal file
1
annotations/src/main/resources/revisions/poly/2.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:2,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:x,type:float},{name:y,type:float}]}
|
||||||
1
annotations/src/main/resources/revisions/poly/3.json
Normal file
1
annotations/src/main/resources/revisions/poly/3.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{version:3,fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:x,type:float},{name:y,type:float}]}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user