Merge branch 'master' into port-field
8
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -13,11 +13,13 @@ assignees: ''
|
||||
|
||||
**Issue**: *Explain your issue in detail.*
|
||||
|
||||
**Steps to reproduce**: *How you happened across the issue, and what you were doing at the time.*
|
||||
**Steps to reproduce**: *How you happened across the issue, and what exactly you did to make the bug happen.*
|
||||
|
||||
**Link to mod(s) used, if applicable**: *The mod repositories or zip files that are related to the issue.*
|
||||
**Link(s) to mod(s) used**: *The mod repositories or zip files that are related to the issue, if applicable.*
|
||||
|
||||
**Crash report, if applicable**: *The contents of relevant crash report files.*
|
||||
**Save file**: *The save file you were playing on when the bug happened, if applicable.*
|
||||
|
||||
**Crash report**: *The contents of relevant crash report files. REQUIRED if you are reporting a crash.*
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -68,3 +68,6 @@ If something needs to be encapsulated in the future, IntelliJ can handle it with
|
||||
|
||||
#### 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.
|
||||
|
||||
## Other Notes
|
||||
If you would like your name to appear in the game's credits, add it to the [list of contributors](https://github.com/Anuken/Mindustry/blob/master/core/assets/contributors) as part of your PR.
|
||||
|
||||
@@ -15,7 +15,7 @@ See [CONTRIBUTING](CONTRIBUTING.md).
|
||||
|
||||
### Building
|
||||
|
||||
Bleeding-edge live builds are generated automatically for every commit. You can see them [here](https://github.com/Anuken/MindustryBuilds/releases). Old builds might still be on [jenkins](https://jenkins.hellomouse.net/job/mindustry/).
|
||||
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.
|
||||
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:
|
||||
@@ -39,9 +39,10 @@ Server builds are bundled with each released build (in Releases). If you'd rathe
|
||||
#### 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.
|
||||
2. Create a file named `local.properties` inside the Mindustry directory, with its contents looking like this: `sdk.dir=<Path to Android SDK you just downloaded, without these bracket>`. For example, if you're on Windows and installed the tools to C:\\tools, your local.properties would contain `sdk.dir=C:\\tools` (*note the double backslashes are required instead of single ones!*).
|
||||
2. Set the `ANDROID_HOME` environment variable to point to your unzipped Android SDK directory.
|
||||
3. Run `gradlew android:assembleDebug` (or `./gradlew` if on linux/mac). This will create an unsigned APK in `android/build/outputs/apk`.
|
||||
4. (Optional) To debug the application on a connected phone, do `gradlew android:installDebug android:run`. It is **highly recommended** to use IntelliJ for this instead.
|
||||
|
||||
To debug the application on a connected phone, run `gradlew android:installDebug android:run`.
|
||||
|
||||
##### Troubleshooting
|
||||
|
||||
|
||||
@@ -41,6 +41,11 @@ public class AndroidRhinoContext{
|
||||
public Object getDynamicSecurityDomain(Object o){
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object callWithDomain(Object o, Context context, Callable callable, Scriptable scriptable, Scriptable scriptable1, Object[] objects){
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
AndroidContextFactory factory;
|
||||
|
||||
@@ -147,6 +147,12 @@ public class EntityIO{
|
||||
|
||||
io(field.type, "");
|
||||
|
||||
//just assign the two values so jumping does not occur on de-possession
|
||||
if(sf){
|
||||
st(field.name + lastSuf + " = this." + field.name);
|
||||
st(field.name + targetSuf + " = this." + field.name);
|
||||
}
|
||||
|
||||
econt();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -468,6 +468,17 @@ public class EntityProcess extends BaseProcessor{
|
||||
mbuilder.addStatement("$L = $L", field.name(), field.name() + EntityIO.targetSuf);
|
||||
}
|
||||
}
|
||||
|
||||
//SPECIAL CASE: method to snap to current position so interpolation doesn't go wild
|
||||
if(first.name().equals("snapInterpolation")){
|
||||
mbuilder.addStatement("updateSpacing = 16");
|
||||
mbuilder.addStatement("lastUpdated = $T.millis()", Time.class);
|
||||
for(Svar field : syncedFields){
|
||||
//reset last+current state to target position
|
||||
mbuilder.addStatement("$L = $L", field.name() + EntityIO.lastSuf, field.name());
|
||||
mbuilder.addStatement("$L = $L", field.name() + EntityIO.targetSuf, field.name());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(Smethod elem : entry.value){
|
||||
@@ -631,10 +642,10 @@ public class EntityProcess extends BaseProcessor{
|
||||
|
||||
//build mapping class for sync IDs
|
||||
TypeSpec.Builder idBuilder = TypeSpec.classBuilder("EntityMapping").addModifiers(Modifier.PUBLIC)
|
||||
.addField(FieldSpec.builder(TypeName.get(Prov[].class), "idMap", Modifier.PRIVATE, Modifier.STATIC).initializer("new Prov[256]").build())
|
||||
.addField(FieldSpec.builder(TypeName.get(Prov[].class), "idMap", Modifier.PUBLIC, Modifier.STATIC).initializer("new Prov[256]").build())
|
||||
.addField(FieldSpec.builder(ParameterizedTypeName.get(ClassName.get(ObjectMap.class),
|
||||
tname(String.class), tname(Prov.class)),
|
||||
"nameMap", Modifier.PRIVATE, Modifier.STATIC).initializer("new ObjectMap<>()").build())
|
||||
"nameMap", Modifier.PUBLIC, Modifier.STATIC).initializer("new ObjectMap<>()").build())
|
||||
.addMethod(MethodSpec.methodBuilder("map").addModifiers(Modifier.PUBLIC, Modifier.STATIC)
|
||||
.returns(TypeName.get(Prov.class)).addParameter(int.class, "id").addStatement("return idMap[id]").build())
|
||||
.addMethod(MethodSpec.methodBuilder("map").addModifiers(Modifier.PUBLIC, Modifier.STATIC)
|
||||
|
||||
@@ -16,6 +16,7 @@ mindustry.entities.comp.PlayerComp=12
|
||||
mindustry.entities.comp.PuddleComp=13
|
||||
mindustry.type.Weather.WeatherStateComp=14
|
||||
mindustry.world.blocks.campaign.LaunchPad.LaunchPayloadComp=15
|
||||
mindustry.world.blocks.defense.ForceProjector.ForceDrawComp=22
|
||||
mono=16
|
||||
nova=17
|
||||
poly=18
|
||||
|
||||
@@ -1 +1 @@
|
||||
{fields:[{name:collided,type:arc.struct.IntSeq,size:-1},{name:damage,type:float,size:4},{name:data,type:java.lang.Object,size:-1},{name:lifetime,type:float,size:4},{name:owner,type:mindustry.gen.Entityc,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:time,type:float,size:4},{name:type,type:mindustry.entities.bullet.BulletType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
{fields:[{name:collided,type:arc.struct.IntSeq,size:-1},{name:damage,type:float,size:4},{name:data,type:java.lang.Object,size:-1},{name:fdata,type:float,size:4},{name:lifetime,type:float,size:4},{name:owner,type:mindustry.gen.Entityc,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:time,type:float,size:4},{name:type,type:mindustry.entities.bullet.BulletType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -1 +0,0 @@
|
||||
{version:1,fields:[{name:collided,type:arc.struct.IntSeq,size:-1},{name:damage,type:float,size:4},{name:data,type:java.lang.Object,size:-1},{name:lifetime,type:float,size:4},{name:owner,type:Entityc,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:time,type:float,size:4},{name:type,type:mindustry.entities.bullet.BulletType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -1 +0,0 @@
|
||||
{version:2,fields:[{name:collided,type:arc.struct.IntSeq,size:-1},{name:damage,type:float,size:4},{name:data,type:java.lang.Object,size:-1},{name:lifetime,type:float,size:4},{name:owner,type:mindustry.gen.Entityc,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:time,type:float,size:4},{name:type,type:mindustry.entities.bullet.BulletType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -1 +0,0 @@
|
||||
{version:3,fields:[{name:collided,type:arc.struct.IntSeq,size:-1},{name:damage,type:float,size:4},{name:data,type:java.lang.Object,size:-1},{name:lifetime,type:float,size:4},{name:owner,type:Entityc,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:time,type:float,size:4},{name:type,type:mindustry.entities.bullet.BulletType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -1 +0,0 @@
|
||||
{version:4,fields:[{name:collided,type:arc.struct.IntSeq,size:-1},{name:damage,type:float,size:4},{name:data,type:java.lang.Object,size:-1},{name:lifetime,type:float,size:4},{name:owner,type:Entityc,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:time,type:float,size:4},{name:type,type:mindustry.entities.bullet.BulletType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -1 +0,0 @@
|
||||
{version:5,fields:[{name:collided,type:arc.struct.IntSeq,size:-1},{name:damage,type:float,size:4},{name:data,type:java.lang.Object,size:-1},{name:lifetime,type:float,size:4},{name:owner,type:Entityc,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:time,type:float,size:4},{name:type,type:mindustry.entities.bullet.BulletType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -0,0 +1 @@
|
||||
{fields:[{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||
@@ -36,7 +36,7 @@ allprojects{
|
||||
if(!project.hasProperty("versionType")) versionType = 'official'
|
||||
appName = 'Mindustry'
|
||||
steamworksVersion = '891ed912791e01fe9ee6237a6497e5212b85c256'
|
||||
rhinoVersion = 'eeb327d141146663ff3924bd20d2a5da8a6439cc'
|
||||
rhinoVersion = 'bf4150f7add42d26c98e33c24acfd94fa87be2e1'
|
||||
|
||||
loadVersionProps = {
|
||||
return new Properties().with{p -> p.load(file('../core/assets/version.properties').newReader()); return p }
|
||||
|
||||
|
Before Width: | Height: | Size: 191 B After Width: | Height: | Size: 191 B |
|
Before Width: | Height: | Size: 186 B After Width: | Height: | Size: 186 B |
|
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 214 B |
BIN
core/assets-raw/sprites/blocks/environment/dacite-wall-large.png
Normal file
|
After Width: | Height: | Size: 742 B |
BIN
core/assets-raw/sprites/blocks/environment/dacite-wall1.png
Normal file
|
After Width: | Height: | Size: 349 B |
BIN
core/assets-raw/sprites/blocks/environment/dacite-wall2.png
Normal file
|
After Width: | Height: | Size: 354 B |
BIN
core/assets-raw/sprites/blocks/environment/dacite1.png
Normal file
|
After Width: | Height: | Size: 283 B |
BIN
core/assets-raw/sprites/blocks/environment/dacite2.png
Normal file
|
After Width: | Height: | Size: 236 B |
BIN
core/assets-raw/sprites/blocks/environment/dacite3.png
Normal file
|
After Width: | Height: | Size: 265 B |
BIN
core/assets-raw/sprites/blocks/environment/dirt-wall-large.png
Normal file
|
After Width: | Height: | Size: 696 B |
BIN
core/assets-raw/sprites/blocks/environment/dirt-wall1.png
Normal file
|
After Width: | Height: | Size: 343 B |
BIN
core/assets-raw/sprites/blocks/environment/dirt-wall2.png
Normal file
|
After Width: | Height: | Size: 339 B |
BIN
core/assets-raw/sprites/blocks/environment/dirt1.png
Normal file
|
After Width: | Height: | Size: 143 B |
BIN
core/assets-raw/sprites/blocks/environment/dirt2.png
Normal file
|
After Width: | Height: | Size: 155 B |
BIN
core/assets-raw/sprites/blocks/environment/dirt3.png
Normal file
|
After Width: | Height: | Size: 585 B |
|
Before Width: | Height: | Size: 631 B After Width: | Height: | Size: 631 B |
|
Before Width: | Height: | Size: 256 B After Width: | Height: | Size: 256 B |
|
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 239 B |
|
Before Width: | Height: | Size: 224 B |
|
Before Width: | Height: | Size: 228 B |
|
Before Width: | Height: | Size: 225 B |
|
Before Width: | Height: | Size: 526 B After Width: | Height: | Size: 526 B |
|
Before Width: | Height: | Size: 255 B After Width: | Height: | Size: 255 B |
|
Before Width: | Height: | Size: 268 B After Width: | Height: | Size: 268 B |
|
Before Width: | Height: | Size: 499 B After Width: | Height: | Size: 499 B |
|
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 260 B |
|
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 261 B |
|
Before Width: | Height: | Size: 671 B After Width: | Height: | Size: 671 B |
|
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 291 B |
|
Before Width: | Height: | Size: 268 B After Width: | Height: | Size: 268 B |
|
Before Width: | Height: | Size: 496 B After Width: | Height: | Size: 496 B |
|
Before Width: | Height: | Size: 252 B After Width: | Height: | Size: 252 B |
|
Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 238 B |
|
Before Width: | Height: | Size: 471 B After Width: | Height: | Size: 471 B |
|
Before Width: | Height: | Size: 264 B After Width: | Height: | Size: 264 B |
|
Before Width: | Height: | Size: 247 B After Width: | Height: | Size: 247 B |
|
Before Width: | Height: | Size: 489 B After Width: | Height: | Size: 489 B |
|
Before Width: | Height: | Size: 267 B After Width: | Height: | Size: 267 B |
|
Before Width: | Height: | Size: 213 B After Width: | Height: | Size: 213 B |
|
Before Width: | Height: | Size: 390 B After Width: | Height: | Size: 390 B |
|
Before Width: | Height: | Size: 215 B After Width: | Height: | Size: 215 B |
|
Before Width: | Height: | Size: 211 B After Width: | Height: | Size: 211 B |
|
Before Width: | Height: | Size: 558 B After Width: | Height: | Size: 558 B |
|
Before Width: | Height: | Size: 781 B After Width: | Height: | Size: 781 B |
|
Before Width: | Height: | Size: 227 B After Width: | Height: | Size: 227 B |
|
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 260 B |
|
Before Width: | Height: | Size: 206 B After Width: | Height: | Size: 206 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 414 B After Width: | Height: | Size: 414 B |
|
Before Width: | Height: | Size: 402 B After Width: | Height: | Size: 402 B |
BIN
core/assets-raw/sprites/blocks/props/dacite-boulder1.png
Normal file
|
After Width: | Height: | Size: 697 B |
BIN
core/assets-raw/sprites/blocks/props/dacite-boulder2.png
Normal file
|
After Width: | Height: | Size: 717 B |
|
Before Width: | Height: | Size: 411 B After Width: | Height: | Size: 411 B |
|
Before Width: | Height: | Size: 410 B After Width: | Height: | Size: 410 B |
|
Before Width: | Height: | Size: 517 B After Width: | Height: | Size: 783 B |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 570 B |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 704 B |
|
Before Width: | Height: | Size: 560 B |
|
Before Width: | Height: | Size: 652 B |
|
Before Width: | Height: | Size: 2.5 KiB |
BIN
core/assets-raw/sprites/units/reign-base.png
Normal file
|
After Width: | Height: | Size: 836 B |
BIN
core/assets-raw/sprites/units/reign-cell.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
core/assets-raw/sprites/units/reign-leg.png
Normal file
|
After Width: | Height: | Size: 747 B |
BIN
core/assets-raw/sprites/units/reign.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 600 B After Width: | Height: | Size: 600 B |
BIN
core/assets-raw/sprites/units/scepter-cell.png
Normal file
|
After Width: | Height: | Size: 720 B |
|
Before Width: | Height: | Size: 670 B After Width: | Height: | Size: 670 B |
BIN
core/assets-raw/sprites/units/scepter.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
core/assets-raw/sprites/units/toxopid-cannon.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
core/assets-raw/sprites/units/toxopid-cell.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
core/assets-raw/sprites/units/toxopid-foot.png
Normal file
|
After Width: | Height: | Size: 989 B |
BIN
core/assets-raw/sprites/units/toxopid-joint-base.png
Normal file
|
After Width: | Height: | Size: 617 B |
BIN
core/assets-raw/sprites/units/toxopid-leg-base.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
core/assets-raw/sprites/units/toxopid-leg.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
core/assets-raw/sprites/units/toxopid.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
BIN
core/assets-raw/sprites/units/weapons/reign-weapon.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
core/assets-raw/sprites/units/weapons/scepter-weapon.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
core/assets/baseparts/1599594352859.msch
Normal file
BIN
core/assets/baseparts/4125616123544.msch
Normal file
2
core/assets/baseparts/752911659508695080.msch
Normal file
@@ -0,0 +1,2 @@
|
||||
mschxœE’}r›@ŵ|Ã.0ÉôÜ%ôÄÞºLlp×<70>4éiz47Cß[eÚa˜Z==ieËé<>dóxñò°N>|ý¼ZÞð5†NúÃ2ž‡ƒŸ×0}ÛN^Úóôc›ŽÃmÙÂ!Ö¬ã<m—á°Ì¯þ} bòŽá}¸n—ë?yX¶Õi¯Ûùæ©=nÓ*ö3‹i®ì:ÌËÑKÿ¦ãÉÿ7íßFÔþçÆÃÊ.·å<†á:ÎþŒ`P¯4ÀH[xžf?œüìÃHqñÙ^dÄ+•ty&‰IÄH#VáDRIðò'9P#DeBIr àhšJ+&E‰0—!–¥˜‘Ò}<7D>¦Éþgÿ@e&®Zj{˜<ºFdŠ\Q+…U81Ð2*tÀ‚’
|
||||
på¾ï¿ðþž¶L–ô.<2E>¼ªb_#é~ß?ðÜ1ZiÃýY¢²’×Ë00FË…Þi
|
||||