Compare commits
117 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5523ea4752 | ||
|
|
c89d6f6b74 | ||
|
|
d3863a7550 | ||
|
|
a5b1239c2b | ||
|
|
95146e032f | ||
|
|
45e1700237 | ||
|
|
81ceec8d03 | ||
|
|
6a45a965c0 | ||
|
|
d55de18d09 | ||
|
|
231902aec5 | ||
|
|
aef09a18b7 | ||
|
|
332365adc6 | ||
|
|
2c3813c94b | ||
|
|
586d3adb0e | ||
|
|
f1d09053f3 | ||
|
|
078a68a07d | ||
|
|
482ec4b43c | ||
|
|
3bf01334c9 | ||
|
|
ff84d72e20 | ||
|
|
f46180298f | ||
|
|
ae46535365 | ||
|
|
0c7ce94b13 | ||
|
|
fea8a3c12b | ||
|
|
285f733b61 | ||
|
|
7b98628084 | ||
|
|
0a11482b55 | ||
|
|
f4b6600a6d | ||
|
|
b73cad5cd6 | ||
|
|
f785f97e87 | ||
|
|
9edd029764 | ||
|
|
55081785d0 | ||
|
|
79aaec80c3 | ||
|
|
a72b1463b4 | ||
|
|
2817573594 | ||
|
|
3a4318551e | ||
|
|
18604a397d | ||
|
|
0f420b625a | ||
|
|
d4d3b71d7d | ||
|
|
ccdd94a090 | ||
|
|
c49b3124d5 | ||
|
|
dc30993898 | ||
|
|
47d734873b | ||
|
|
1d52211f93 | ||
|
|
059b72b3e2 | ||
|
|
2cc93924f1 | ||
|
|
23fe204322 | ||
|
|
53d4124fc3 | ||
|
|
c912eb197b | ||
|
|
35e4f696aa | ||
|
|
85d32cd510 | ||
|
|
292793daf1 | ||
|
|
41b4cbbce2 | ||
|
|
6492ffd35d | ||
|
|
9f26979419 | ||
|
|
7b90f5a97d | ||
|
|
3a06cacf1d | ||
|
|
56515db614 | ||
|
|
2141e2ebab | ||
|
|
55e25cc509 | ||
|
|
bc705aa7a0 | ||
|
|
9e0b29b3dd | ||
|
|
504334999d | ||
|
|
8d8cedaa44 | ||
|
|
659da0a837 | ||
|
|
0dccbf8598 | ||
|
|
1682e3b996 | ||
|
|
a914bd77f6 | ||
|
|
da115e90bc | ||
|
|
0a07458186 | ||
|
|
1d530f531d | ||
|
|
244a587db8 | ||
|
|
b88302e604 | ||
|
|
d1980ef493 | ||
|
|
110c04e5e3 | ||
|
|
f3f33038e4 | ||
|
|
da66d93db9 | ||
|
|
d08c54d9a7 | ||
|
|
e23e8de62a | ||
|
|
11eb5f464f | ||
|
|
db94acdb83 | ||
|
|
68e708cf9a | ||
|
|
35460f0b5f | ||
|
|
90fe7d7e59 | ||
|
|
0288cb34fb | ||
|
|
75ebaab3a3 | ||
|
|
ada664a2ca | ||
|
|
f9b46fbf18 | ||
|
|
764b93154e | ||
|
|
e4d97d790f | ||
|
|
5fa31b5625 | ||
|
|
414d3eb3c4 | ||
|
|
abd8356385 | ||
|
|
d0c6f3274b | ||
|
|
1e10817708 | ||
|
|
28cd08bdd1 | ||
|
|
428c396968 | ||
|
|
890dfdeb06 | ||
|
|
a0913c67df | ||
|
|
ba4612ed96 | ||
|
|
4608697d0d | ||
|
|
89ea055a24 | ||
|
|
3a3367b510 | ||
|
|
393ca67291 | ||
|
|
f4003fd463 | ||
|
|
51065b57c4 | ||
|
|
9f5e96ff8a | ||
|
|
d4811a7d04 | ||
|
|
553bc1d1c8 | ||
|
|
fee15caf7a | ||
|
|
a418d7e59f | ||
|
|
0d425456be | ||
|
|
3753e8f54a | ||
|
|
4938aac731 | ||
|
|
4334a3c24b | ||
|
|
a95296eccc | ||
|
|
fe18222c6c | ||
|
|
337d5b0531 |
4
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -7,6 +7,8 @@ assignees: ''
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
**Note**: Do not report any new bugs directly relating to the v6 campaign. They will not be fixed or considered at this time.
|
||||||
|
|
||||||
**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.*
|
||||||
@@ -17,7 +19,7 @@ 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 save file you were playing on when the bug happened. REQUIRED for any issue that happens in-game.*
|
||||||
|
|
||||||
**Crash report**: *The contents of relevant crash report files. REQUIRED if you are reporting a crash.*
|
**Crash report**: *The contents of relevant crash report files. REQUIRED if you are reporting a crash.*
|
||||||
|
|
||||||
|
|||||||
@@ -40,10 +40,10 @@ deploy:
|
|||||||
repo: Anuken/Mindustry
|
repo: Anuken/Mindustry
|
||||||
tags: true
|
tags: true
|
||||||
#- provider: script
|
#- provider: script
|
||||||
#script: bash update_wiki.sh
|
# script: bash update_wiki.sh
|
||||||
# on:
|
# on:
|
||||||
# repo: Anuken/Mindustry
|
# repo: Anuken/Mindustry
|
||||||
# tags: true
|
# tags: true
|
||||||
env:
|
env:
|
||||||
global:
|
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: TqlUl/ojjkCMVOGbCTKz7Cnr4F08UyWzY/CiJ0vvUOGJGZ1qm7XavAlDf5XT0egU4mvr37THubFO8vojbqmrmy0oZnYh3njKFA8axgyZ8PyKkjGHOfd0i6qyEWsOr9H90/2X8r3LwEeLaDFyHpu3wljIGBjweg53g2qwmDwCFa9UR80FJZ+xDB+rD6B3cXT0DTEkCoLZXLqXm0Y3HvBdSuBL1LR/FNb2BSxNq+tNLGiz1kdQZV5erausbbZypBoGxzz63xAnyz2kkFz73A8xQYVTzGbFodTPz7HM13GVZ5s43I03Y+HYyHBgBaSLziO2hi2kzVJccOwzBp7wS4fs1MqsFY5+IeWJ9k+hm89NiYT7+6zlEgoUMlIniny1qLqWTzx7btUeuC/y/h5TVBNgaV+z0jmHycHfeSyq5I+vmX4J8qe3wmaN8TcdqYKU5nIznOTk3CM5Fzu0Bs9vkCkOxmormmcjMFW1RbdOLc/hpZWZggsBA88sNEAI8eq+r5QEeqzeCx8YKoZDjdrsqvgLMc3El3gS9oMGxkn0Y/TEcqs9Tc4BXtTkqIA68hD0DYzlAxYjVbbkAI9Hh9lHNvV3Dr/oCkGXQ/HflM143kj1L3tSBZpqeqQE2XhngB5nqpS3OZTmZbMTQ8qD2luU18yaTGMLF5tJS/fdKPRx0gQ1kL8=
|
||||||
|
|||||||
10
README.md
@@ -22,9 +22,9 @@ First, make sure you have [JDK 14](https://adoptopenjdk.net/) installed. Open a
|
|||||||
|
|
||||||
#### Windows
|
#### Windows
|
||||||
|
|
||||||
_Running:_ `gradlew.bat desktop:run`
|
_Running:_ `gradlew desktop:run`
|
||||||
_Building:_ `gradlew.bat desktop:dist`
|
_Building:_ `gradlew desktop:dist`
|
||||||
_Sprite Packing:_ `gradlew.bat tools:pack`
|
_Sprite Packing:_ `gradlew tools:pack`
|
||||||
|
|
||||||
#### Linux/Mac OS
|
#### Linux/Mac OS
|
||||||
|
|
||||||
@@ -70,3 +70,7 @@ Post feature requests and feedback [here](https://github.com/Anuken/Mindustry-Su
|
|||||||
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png"
|
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png"
|
||||||
alt="Get it on F-Droid"
|
alt="Get it on F-Droid"
|
||||||
height="80">](https://f-droid.org/packages/io.anuke.mindustry/)
|
height="80">](https://f-droid.org/packages/io.anuke.mindustry/)
|
||||||
|
|
||||||
|
[<img src="https://flathub.org/assets/badges/flathub-badge-en.svg"
|
||||||
|
alt="Download On Flathub"
|
||||||
|
height="60">](https://flathub.org/apps/details/com.github.Anuken.Mindustry)
|
||||||
|
|||||||
@@ -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,7 +22,6 @@ 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.*;
|
||||||
|
|
||||||
@@ -73,12 +71,25 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
public void shareFile(Fi file){
|
public void shareFile(Fi file){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
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
|
@Override
|
||||||
public void showFileChooser(boolean open, String extension, Cons<Fi> cons){
|
public void showFileChooser(boolean open, String extension, Cons<Fi> cons){
|
||||||
|
showFileChooser(open, cons, extension);
|
||||||
|
}
|
||||||
|
|
||||||
|
void showFileChooser(boolean open, 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 +119,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(open ? "@open" : "@save", 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,10 +136,19 @@ 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("@open", file -> Structs.contains(extensions, file.extension().toLowerCase()), true, cons).show();
|
||||||
|
}else{
|
||||||
|
super.showFileChooser(open, extension, cons);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void showMultiFileChooser(Cons<Fi> cons, String... extensions){
|
||||||
|
showFileChooser(true, cons, extensions);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void beginForceLandscape(){
|
public void beginForceLandscape(){
|
||||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
|
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
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.*;
|
||||||
@@ -520,7 +519,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 +586,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 +605,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){
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package mindustry.annotations.impl;
|
|||||||
import arc.files.*;
|
import arc.files.*;
|
||||||
import arc.scene.style.*;
|
import arc.scene.style.*;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
|
import arc.util.*;
|
||||||
|
import arc.util.io.*;
|
||||||
import arc.util.serialization.*;
|
import arc.util.serialization.*;
|
||||||
import com.squareup.javapoet.*;
|
import com.squareup.javapoet.*;
|
||||||
import mindustry.annotations.Annotations.*;
|
import mindustry.annotations.Annotations.*;
|
||||||
@@ -33,6 +35,17 @@ public class AssetsProcess extends BaseProcessor{
|
|||||||
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<>();
|
||||||
|
PropertiesUtils.load(texIcons, Fi.get(rootDirectory + "/core/assets/icons/icons.properties").reader());
|
||||||
|
|
||||||
|
texIcons.each((key, val) -> {
|
||||||
|
String[] split = val.split("\\|");
|
||||||
|
String name = Strings.kebabToCamel(split[1]).replace("Medium", "").replace("Icon", "");
|
||||||
|
if(SourceVersion.isKeyword(name) || name.equals("char")) name = name + "i";
|
||||||
|
|
||||||
|
ichtype.addField(FieldSpec.builder(char.class, name, Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL).initializer("(char)" + 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());
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,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(),
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import java.util.*;
|
|||||||
})
|
})
|
||||||
public class RemoteProcess extends BaseProcessor{
|
public class RemoteProcess extends BaseProcessor{
|
||||||
/** Maximum size of each event packet. */
|
/** Maximum size of each event packet. */
|
||||||
public static final int maxPacketSize = 4096;
|
public static final int maxPacketSize = 8192;
|
||||||
/** Warning on top of each autogenerated file. */
|
/** Warning on top of each autogenerated file. */
|
||||||
public static final String autogenWarning = "Autogenerated file. Do not modify!\n";
|
public static final String autogenWarning = "Autogenerated file. Do not modify!\n";
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ mindustry.world.blocks.campaign.LaunchPad.LaunchPayloadComp=15
|
|||||||
mindustry.world.blocks.defense.ForceProjector.ForceDrawComp=22
|
mindustry.world.blocks.defense.ForceProjector.ForceDrawComp=22
|
||||||
mono=16
|
mono=16
|
||||||
nova=17
|
nova=17
|
||||||
|
oct=26
|
||||||
poly=18
|
poly=18
|
||||||
pulsar=19
|
pulsar=19
|
||||||
quad=23
|
quad=23
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
{fields:[{name:ammo,type:float},{name:armor,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{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}]}
|
||||||
@@ -200,7 +200,6 @@ project(":desktop"){
|
|||||||
|
|
||||||
dependencies{
|
dependencies{
|
||||||
implementation project(":core")
|
implementation project(":core")
|
||||||
implementation arcModule("natives:natives-box2d-desktop")
|
|
||||||
implementation arcModule("natives:natives-desktop")
|
implementation arcModule("natives:natives-desktop")
|
||||||
implementation arcModule("natives:natives-freetype-desktop")
|
implementation arcModule("natives:natives-freetype-desktop")
|
||||||
implementation 'com.github.MinnDevelopment:java-discord-rpc:v2.0.1'
|
implementation 'com.github.MinnDevelopment:java-discord-rpc:v2.0.1'
|
||||||
@@ -239,7 +238,6 @@ project(":ios"){
|
|||||||
|
|
||||||
implementation arcModule("natives:natives-ios")
|
implementation arcModule("natives:natives-ios")
|
||||||
implementation arcModule("natives:natives-freetype-ios")
|
implementation arcModule("natives:natives-freetype-ios")
|
||||||
implementation arcModule("natives:natives-box2d-ios")
|
|
||||||
implementation arcModule("backends:backend-robovm")
|
implementation arcModule("backends:backend-robovm")
|
||||||
|
|
||||||
compileOnly project(":annotations")
|
compileOnly project(":annotations")
|
||||||
@@ -282,7 +280,6 @@ project(":core"){
|
|||||||
api "org.lz4:lz4-java:1.4.1"
|
api "org.lz4:lz4-java:1.4.1"
|
||||||
api arcModule("arc-core")
|
api arcModule("arc-core")
|
||||||
api arcModule("extensions:freetype")
|
api arcModule("extensions:freetype")
|
||||||
api arcModule("extensions:box2d")
|
|
||||||
api arcModule("extensions:g3d")
|
api arcModule("extensions:g3d")
|
||||||
api arcModule("extensions:fx")
|
api arcModule("extensions:fx")
|
||||||
api arcModule("extensions:arcnet")
|
api arcModule("extensions:arcnet")
|
||||||
@@ -299,7 +296,6 @@ project(":server"){
|
|||||||
|
|
||||||
dependencies{
|
dependencies{
|
||||||
implementation project(":core")
|
implementation project(":core")
|
||||||
implementation arcModule("natives:natives-box2d-desktop")
|
|
||||||
implementation arcModule("backends:backend-headless")
|
implementation arcModule("backends:backend-headless")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -312,7 +308,6 @@ project(":tests"){
|
|||||||
testImplementation "org.junit.jupiter:junit-jupiter-params:5.3.1"
|
testImplementation "org.junit.jupiter:junit-jupiter-params:5.3.1"
|
||||||
testImplementation "org.junit.jupiter:junit-jupiter-api:5.3.1"
|
testImplementation "org.junit.jupiter:junit-jupiter-api:5.3.1"
|
||||||
testImplementation arcModule("backends:backend-headless")
|
testImplementation arcModule("backends:backend-headless")
|
||||||
testImplementation arcModule("natives:natives-box2d-desktop")
|
|
||||||
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.3.1"
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.3.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -334,7 +329,6 @@ project(":tools"){
|
|||||||
|
|
||||||
implementation arcModule("natives:natives-desktop")
|
implementation arcModule("natives:natives-desktop")
|
||||||
implementation arcModule("natives:natives-freetype-desktop")
|
implementation arcModule("natives:natives-freetype-desktop")
|
||||||
implementation arcModule("natives:natives-box2d-desktop")
|
|
||||||
implementation arcModule("backends:backend-headless")
|
implementation arcModule("backends:backend-headless")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 230 B After Width: | Height: | Size: 277 B |
|
Before Width: | Height: | Size: 229 B After Width: | Height: | Size: 277 B |
|
Before Width: | Height: | Size: 231 B After Width: | Height: | Size: 283 B |
|
Before Width: | Height: | Size: 226 B After Width: | Height: | Size: 278 B |
|
Before Width: | Height: | Size: 298 B After Width: | Height: | Size: 491 B |
|
Before Width: | Height: | Size: 309 B After Width: | Height: | Size: 499 B |
|
Before Width: | Height: | Size: 321 B After Width: | Height: | Size: 522 B |
|
Before Width: | Height: | Size: 304 B After Width: | Height: | Size: 515 B |
|
Before Width: | Height: | Size: 268 B After Width: | Height: | Size: 300 B |
|
Before Width: | Height: | Size: 252 B After Width: | Height: | Size: 292 B |
|
Before Width: | Height: | Size: 250 B After Width: | Height: | Size: 294 B |
|
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 299 B |
|
Before Width: | Height: | Size: 247 B After Width: | Height: | Size: 296 B |
|
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 290 B |
|
Before Width: | Height: | Size: 234 B After Width: | Height: | Size: 289 B |
|
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 292 B |
|
Before Width: | Height: | Size: 228 B After Width: | Height: | Size: 375 B |
|
Before Width: | Height: | Size: 247 B After Width: | Height: | Size: 408 B |
|
Before Width: | Height: | Size: 257 B After Width: | Height: | Size: 419 B |
|
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 409 B |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 640 B |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 636 B |
|
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 410 B |
|
Before Width: | Height: | Size: 265 B After Width: | Height: | Size: 441 B |
|
Before Width: | Height: | Size: 280 B After Width: | Height: | Size: 454 B |
|
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 448 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 330 B After Width: | Height: | Size: 376 B |
|
Before Width: | Height: | Size: 289 B After Width: | Height: | Size: 490 B |
BIN
core/assets-raw/sprites/blocks/logic/memory-bank.png
Normal file
|
After Width: | Height: | Size: 751 B |
|
Before Width: | Height: | Size: 189 B After Width: | Height: | Size: 304 B |
|
Before Width: | Height: | Size: 763 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 812 B After Width: | Height: | Size: 1.1 KiB |
BIN
core/assets-raw/sprites/blocks/turrets/wave-top.png
Normal file
|
After Width: | Height: | Size: 285 B |
|
Before Width: | Height: | Size: 755 B After Width: | Height: | Size: 1.2 KiB |
BIN
core/assets-raw/sprites/blocks/units/command-center-team.png
Normal file
|
After Width: | Height: | Size: 511 B |
|
Before Width: | Height: | Size: 783 B After Width: | Height: | Size: 347 B |
|
Before Width: | Height: | Size: 427 B After Width: | Height: | Size: 660 B |
|
Before Width: | Height: | Size: 546 B After Width: | Height: | Size: 843 B |
|
Before Width: | Height: | Size: 244 B After Width: | Height: | Size: 323 B |
|
Before Width: | Height: | Size: 602 B After Width: | Height: | Size: 796 B |
|
Before Width: | Height: | Size: 226 B After Width: | Height: | Size: 323 B |
|
Before Width: | Height: | Size: 428 B After Width: | Height: | Size: 655 B |
|
Before Width: | Height: | Size: 890 B After Width: | Height: | Size: 908 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 589 B After Width: | Height: | Size: 586 B |
@@ -55,6 +55,7 @@ schematic.saved = Schematic saved.
|
|||||||
schematic.delete.confirm = This schematic will be utterly eradicated.
|
schematic.delete.confirm = This schematic will be utterly eradicated.
|
||||||
schematic.rename = Rename Schematic
|
schematic.rename = Rename Schematic
|
||||||
schematic.info = {0}x{1}, {2} blocks
|
schematic.info = {0}x{1}, {2} blocks
|
||||||
|
schematic.disabled = [scarlet]Schematics disabled[]\nYou are not allowed to use schematics on this [accent]map[] or [accent]server.
|
||||||
|
|
||||||
stat.wave = Waves Defeated:[accent] {0}
|
stat.wave = Waves Defeated:[accent] {0}
|
||||||
stat.enemiesDestroyed = Enemies Destroyed:[accent] {0}
|
stat.enemiesDestroyed = Enemies Destroyed:[accent] {0}
|
||||||
@@ -472,16 +473,9 @@ requirement.wave = Reach Wave {0} in {1}
|
|||||||
requirement.core = Destroy Enemy Core in {0}
|
requirement.core = Destroy Enemy Core in {0}
|
||||||
requirement.research = Research {0}
|
requirement.research = Research {0}
|
||||||
requirement.capture = Capture {0}
|
requirement.capture = Capture {0}
|
||||||
resume = Resume Zone:\n[lightgray]{0}
|
|
||||||
bestwave = [lightgray]Best Wave: {0}
|
bestwave = [lightgray]Best Wave: {0}
|
||||||
#TODO fix/remove this
|
|
||||||
launch = < LAUNCH >
|
|
||||||
launch.text = Launch
|
launch.text = Launch
|
||||||
launch.title = Launch Successful
|
campaign.multiplayer = While playing multiplayer in campaign, you can only research using items from [accent]your[] sectors, [scarlet]not[] the host's sector that you are on right now.\n\nTo get items to [accent]your[] sectors in multiplayer, use a [accent]launch pad[].
|
||||||
launch.next = [lightgray]next opportunity at wave {0}
|
|
||||||
launch.unable2 = [scarlet]Unable to LAUNCH.[]
|
|
||||||
launch.confirm = This will launch all resources in your core.\nYou will not be able to return to this base.
|
|
||||||
launch.skip.confirm = If you skip now, you will not be able to launch until later waves.
|
|
||||||
uncover = Uncover
|
uncover = Uncover
|
||||||
configure = Configure Loadout
|
configure = Configure Loadout
|
||||||
#TODO
|
#TODO
|
||||||
@@ -602,6 +596,7 @@ blocks.powerconnections = Max Connections
|
|||||||
blocks.poweruse = Power Use
|
blocks.poweruse = Power Use
|
||||||
blocks.powerdamage = Power/Damage
|
blocks.powerdamage = Power/Damage
|
||||||
blocks.itemcapacity = Item Capacity
|
blocks.itemcapacity = Item Capacity
|
||||||
|
blocks.memorycapacity = Memory Capacity
|
||||||
blocks.basepowergeneration = Base Power Generation
|
blocks.basepowergeneration = Base Power Generation
|
||||||
blocks.productiontime = Production Time
|
blocks.productiontime = Production Time
|
||||||
blocks.repairtime = Block Full Repair Time
|
blocks.repairtime = Block Full Repair Time
|
||||||
@@ -830,6 +825,7 @@ mode.custom = Custom Rules
|
|||||||
|
|
||||||
rules.infiniteresources = Infinite Resources
|
rules.infiniteresources = Infinite Resources
|
||||||
rules.reactorexplosions = Reactor Explosions
|
rules.reactorexplosions = Reactor Explosions
|
||||||
|
rules.schematic = Schematics Allowed
|
||||||
rules.wavetimer = Wave Timer
|
rules.wavetimer = Wave Timer
|
||||||
rules.waves = Waves
|
rules.waves = Waves
|
||||||
rules.attack = Attack Mode
|
rules.attack = Attack Mode
|
||||||
@@ -1147,6 +1143,7 @@ block.hyper-processor.name = Hyper Processor
|
|||||||
block.logic-display.name = Logic Display
|
block.logic-display.name = Logic Display
|
||||||
block.large-logic-display.name = Large Logic Display
|
block.large-logic-display.name = Large Logic Display
|
||||||
block.memory-cell.name = Memory Cell
|
block.memory-cell.name = Memory Cell
|
||||||
|
block.memory-bank.name = Memory Bank
|
||||||
|
|
||||||
team.blue.name = blue
|
team.blue.name = blue
|
||||||
team.crux.name = red
|
team.crux.name = red
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ schematic.saved = Схема сохранена.
|
|||||||
schematic.delete.confirm = Эта схема будет поджарена Испепелителем.
|
schematic.delete.confirm = Эта схема будет поджарена Испепелителем.
|
||||||
schematic.rename = Переименовать схему
|
schematic.rename = Переименовать схему
|
||||||
schematic.info = {0}x{1}, {2} блоков
|
schematic.info = {0}x{1}, {2} блоков
|
||||||
|
schematic.disabled = [scarlet]Схемы отключены[]\nНа этой [accent]карте[] или [accent]сервере запрещено использование схем.
|
||||||
|
|
||||||
stat.wave = Волн отражено:[accent] {0}
|
stat.wave = Волн отражено:[accent] {0}
|
||||||
stat.enemiesDestroyed = Врагов уничтожено:[accent] {0}
|
stat.enemiesDestroyed = Врагов уничтожено:[accent] {0}
|
||||||
@@ -489,6 +490,7 @@ loadout = Груз
|
|||||||
resources = Ресурсы
|
resources = Ресурсы
|
||||||
bannedblocks = Запрещённые блоки
|
bannedblocks = Запрещённые блоки
|
||||||
addall = Добавить всё
|
addall = Добавить всё
|
||||||
|
launch.destination = Место назначения: {0}
|
||||||
configure.invalid = Количество должно быть числом между 0 и {0}.
|
configure.invalid = Количество должно быть числом между 0 и {0}.
|
||||||
zone.unlocked = Зона «[lightgray]{0}» теперь разблокирована.
|
zone.unlocked = Зона «[lightgray]{0}» теперь разблокирована.
|
||||||
zone.requirement.complete = Условия для зоны «{0}» выполнены:[lightgray]\n{1}
|
zone.requirement.complete = Условия для зоны «{0}» выполнены:[lightgray]\n{1}
|
||||||
@@ -521,6 +523,8 @@ sectors.production = Производит:
|
|||||||
sectors.stored = Накоплено:
|
sectors.stored = Накоплено:
|
||||||
sectors.resume = Продолжить
|
sectors.resume = Продолжить
|
||||||
sectors.launch = Высадка
|
sectors.launch = Высадка
|
||||||
|
sectors.select = Выбор
|
||||||
|
sectors.nonelaunch = [lightgray]нет (солнце)
|
||||||
|
|
||||||
#NOTE TO TRANSLATORS: don't bother editing these, they'll be removed and/or rewritten anyway
|
#NOTE TO TRANSLATORS: don't bother editing these, they'll be removed and/or rewritten anyway
|
||||||
sector.groundZero.name = Отправная точка
|
sector.groundZero.name = Отправная точка
|
||||||
@@ -599,6 +603,7 @@ blocks.powerconnections = Количество соединений
|
|||||||
blocks.poweruse = Потребляет энергии
|
blocks.poweruse = Потребляет энергии
|
||||||
blocks.powerdamage = Энергия/урон
|
blocks.powerdamage = Энергия/урон
|
||||||
blocks.itemcapacity = Вместимость предметов
|
blocks.itemcapacity = Вместимость предметов
|
||||||
|
blocks.memorycapacity = Размер памяти
|
||||||
blocks.basepowergeneration = Базовая генерация энергии
|
blocks.basepowergeneration = Базовая генерация энергии
|
||||||
blocks.productiontime = Время производства
|
blocks.productiontime = Время производства
|
||||||
blocks.repairtime = Время полной регенерации
|
blocks.repairtime = Время полной регенерации
|
||||||
@@ -827,6 +832,7 @@ mode.custom = Пользовательские правила
|
|||||||
|
|
||||||
rules.infiniteresources = Бесконечные ресурсы (Игрок)
|
rules.infiniteresources = Бесконечные ресурсы (Игрок)
|
||||||
rules.reactorexplosions = Взрывы реакторов
|
rules.reactorexplosions = Взрывы реакторов
|
||||||
|
rules.schematic = Схемы разрешены
|
||||||
rules.wavetimer = Интервал волн
|
rules.wavetimer = Интервал волн
|
||||||
rules.waves = Волны
|
rules.waves = Волны
|
||||||
rules.attack = Режим атаки
|
rules.attack = Режим атаки
|
||||||
@@ -1143,7 +1149,8 @@ block.logic-processor.name = Логический процессор
|
|||||||
block.hyper-processor.name = Гипер процессор
|
block.hyper-processor.name = Гипер процессор
|
||||||
block.logic-display.name = Логический дисплей
|
block.logic-display.name = Логический дисплей
|
||||||
block.large-logic-display.name = Большой логический дисплей
|
block.large-logic-display.name = Большой логический дисплей
|
||||||
block.memory-cell.name = Запоминающее устройство
|
block.memory-cell.name = Ячейка памяти
|
||||||
|
block.memory-bank.name = Блок памяти
|
||||||
|
|
||||||
team.blue.name = Синяя
|
team.blue.name = Синяя
|
||||||
team.crux.name = Красная
|
team.crux.name = Красная
|
||||||
|
|||||||
@@ -21,15 +21,8 @@
|
|||||||
63723=ice|block-ice-medium
|
63723=ice|block-ice-medium
|
||||||
63722=ice-snow|block-ice-snow-medium
|
63722=ice-snow|block-ice-snow-medium
|
||||||
63721=cliffs|block-cliffs-medium
|
63721=cliffs|block-cliffs-medium
|
||||||
63720=rocks|block-rocks-medium
|
|
||||||
63719=sporerocks|block-sporerocks-medium
|
|
||||||
63718=rock|block-rock-medium
|
63718=rock|block-rock-medium
|
||||||
63717=snowrock|block-snowrock-medium
|
63717=snowrock|block-snowrock-medium
|
||||||
63716=icerocks|block-icerocks-medium
|
|
||||||
63715=snowrocks|block-snowrocks-medium
|
|
||||||
63714=dunerocks|block-dunerocks-medium
|
|
||||||
63713=sandrocks|block-sandrocks-medium
|
|
||||||
63712=saltrocks|block-saltrocks-medium
|
|
||||||
63711=spore-pine|block-spore-pine-medium
|
63711=spore-pine|block-spore-pine-medium
|
||||||
63710=snow-pine|block-snow-pine-medium
|
63710=snow-pine|block-snow-pine-medium
|
||||||
63709=pine|block-pine-medium
|
63709=pine|block-pine-medium
|
||||||
@@ -38,7 +31,6 @@
|
|||||||
63706=white-tree|block-white-tree-medium
|
63706=white-tree|block-white-tree-medium
|
||||||
63705=spore-cluster|block-spore-cluster-medium
|
63705=spore-cluster|block-spore-cluster-medium
|
||||||
63704=shale|block-shale-medium
|
63704=shale|block-shale-medium
|
||||||
63703=shalerocks|block-shalerocks-medium
|
|
||||||
63702=shale-boulder|block-shale-boulder-medium
|
63702=shale-boulder|block-shale-boulder-medium
|
||||||
63701=sand-boulder|block-sand-boulder-medium
|
63701=sand-boulder|block-sand-boulder-medium
|
||||||
63700=moss|block-moss-medium
|
63700=moss|block-moss-medium
|
||||||
@@ -318,3 +310,4 @@
|
|||||||
63426=oct|unit-oct-medium
|
63426=oct|unit-oct-medium
|
||||||
63425=vela|unit-vela-medium
|
63425=vela|unit-vela-medium
|
||||||
63424=corvus|unit-corvus-medium
|
63424=corvus|unit-corvus-medium
|
||||||
|
63423=memory-bank|block-memory-bank-medium
|
||||||
|
|||||||
@@ -154,7 +154,6 @@ const SaveLoadEvent = Packages.mindustry.game.EventType.SaveLoadEvent
|
|||||||
const MapPublishEvent = Packages.mindustry.game.EventType.MapPublishEvent
|
const MapPublishEvent = Packages.mindustry.game.EventType.MapPublishEvent
|
||||||
const MapMakeEvent = Packages.mindustry.game.EventType.MapMakeEvent
|
const MapMakeEvent = Packages.mindustry.game.EventType.MapMakeEvent
|
||||||
const ResizeEvent = Packages.mindustry.game.EventType.ResizeEvent
|
const ResizeEvent = Packages.mindustry.game.EventType.ResizeEvent
|
||||||
const LaunchEvent = Packages.mindustry.game.EventType.LaunchEvent
|
|
||||||
const LoseEvent = Packages.mindustry.game.EventType.LoseEvent
|
const LoseEvent = Packages.mindustry.game.EventType.LoseEvent
|
||||||
const WinEvent = Packages.mindustry.game.EventType.WinEvent
|
const WinEvent = Packages.mindustry.game.EventType.WinEvent
|
||||||
const Trigger = Packages.mindustry.game.EventType.Trigger
|
const Trigger = Packages.mindustry.game.EventType.Trigger
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 810 B After Width: | Height: | Size: 812 B |
|
Before Width: | Height: | Size: 553 KiB After Width: | Height: | Size: 563 KiB |
|
Before Width: | Height: | Size: 662 KiB After Width: | Height: | Size: 668 KiB |
|
Before Width: | Height: | Size: 950 KiB After Width: | Height: | Size: 968 KiB |
|
Before Width: | Height: | Size: 503 KiB After Width: | Height: | Size: 506 KiB |
|
Before Width: | Height: | Size: 184 KiB After Width: | Height: | Size: 189 KiB |
|
Before Width: | Height: | Size: 416 KiB After Width: | Height: | Size: 419 KiB |
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 2.8 MiB After Width: | Height: | Size: 2.9 MiB |
|
Before Width: | Height: | Size: 185 KiB After Width: | Height: | Size: 190 KiB |
|
Before Width: | Height: | Size: 420 KiB After Width: | Height: | Size: 419 KiB |
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
@@ -63,7 +63,7 @@ public class Vars implements Loadable{
|
|||||||
/** URL to the JSON file containing all the BE servers. Only queried in the V6 alpha (will be removed once it's out). */
|
/** URL to the JSON file containing all the BE servers. Only queried in the V6 alpha (will be removed once it's out). */
|
||||||
public static final String serverJsonV6URL = "https://raw.githubusercontent.com/Anuken/Mindustry/master/servers_v6.json";
|
public static final String serverJsonV6URL = "https://raw.githubusercontent.com/Anuken/Mindustry/master/servers_v6.json";
|
||||||
/** URL of the github issue report template.*/
|
/** URL of the github issue report template.*/
|
||||||
public static final String reportIssueURL = "https://github.com/Anuken/Mindustry/issues/new?template=bug_report.md";
|
public static final String reportIssueURL = "https://github.com/Anuken/Mindustry/issues/new?labels=bug&template=bug_report.md";
|
||||||
/** list of built-in servers.*/
|
/** list of built-in servers.*/
|
||||||
public static final Seq<String> defaultServers = Seq.with();
|
public static final Seq<String> defaultServers = Seq.with();
|
||||||
/** maximum distance between mine and core that supports automatic transferring */
|
/** maximum distance between mine and core that supports automatic transferring */
|
||||||
@@ -72,8 +72,6 @@ public class Vars implements Loadable{
|
|||||||
public static final int maxTextLength = 150;
|
public static final int maxTextLength = 150;
|
||||||
/** max player name length in bytes */
|
/** max player name length in bytes */
|
||||||
public static final int maxNameLength = 40;
|
public static final int maxNameLength = 40;
|
||||||
/** shadow color for turrets */
|
|
||||||
public static final float turretShadowColor = Color.toFloatBits(0, 0, 0, 0.22f);
|
|
||||||
/** displayed item size when ingame. */
|
/** displayed item size when ingame. */
|
||||||
public static final float itemSize = 5f;
|
public static final float itemSize = 5f;
|
||||||
/** units outside of this bound will die instantly */
|
/** units outside of this bound will die instantly */
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import arc.math.*;
|
|||||||
import arc.math.geom.*;
|
import arc.math.geom.*;
|
||||||
import arc.struct.EnumSet;
|
import arc.struct.EnumSet;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
|
import arc.util.ArcAnnotate.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
import mindustry.game.EventType.*;
|
import mindustry.game.EventType.*;
|
||||||
import mindustry.game.*;
|
import mindustry.game.*;
|
||||||
@@ -165,6 +166,11 @@ public class BlockIndexer{
|
|||||||
return flagMap[team.id][type.ordinal()];
|
return flagMap[team.id][type.ordinal()];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
public Tile findClosestFlag(float x, float y, Team team, BlockFlag flag){
|
||||||
|
return Geometry.findClosest(x, y, getAllied(team, flag));
|
||||||
|
}
|
||||||
|
|
||||||
public boolean eachBlock(Teamc team, float range, Boolf<Building> pred, Cons<Building> cons){
|
public boolean eachBlock(Teamc team, float range, Boolf<Building> pred, Cons<Building> cons){
|
||||||
return eachBlock(team.team(), team.getX(), team.getY(), range, pred, cons);
|
return eachBlock(team.team(), team.getX(), team.getY(), range, pred, cons);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class Pathfinder implements Runnable{
|
|||||||
PathTile.health(tile) * 5 +
|
PathTile.health(tile) * 5 +
|
||||||
(PathTile.nearSolid(tile) ? 2 : 0) +
|
(PathTile.nearSolid(tile) ? 2 : 0) +
|
||||||
(PathTile.nearLiquid(tile) ? 6 : 0) +
|
(PathTile.nearLiquid(tile) ? 6 : 0) +
|
||||||
(PathTile.deep(tile) ? 70 : 0) +
|
(PathTile.deep(tile) ? 6000 : 0) +
|
||||||
(PathTile.damages(tile) ? 30 : 0),
|
(PathTile.damages(tile) ? 30 : 0),
|
||||||
|
|
||||||
//legs
|
//legs
|
||||||
@@ -116,7 +116,7 @@ public class Pathfinder implements Runnable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
return PathTile.get(
|
return PathTile.get(
|
||||||
tile.build == null ? 0 : Math.min((int)(tile.build.health / 40), 127),
|
tile.build == null ? 0 : Math.min((int)(tile.build.health / 40), 80),
|
||||||
tile.getTeamID(),
|
tile.getTeamID(),
|
||||||
tile.solid(),
|
tile.solid(),
|
||||||
tile.floor().isLiquid,
|
tile.floor().isLiquid,
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public class FlyingAI extends AIController{
|
|||||||
moveTo(target, unit.range() * 0.8f);
|
moveTo(target, unit.range() * 0.8f);
|
||||||
unit.lookAt(target);
|
unit.lookAt(target);
|
||||||
}else{
|
}else{
|
||||||
attack(80f);
|
attack(100f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,13 +45,12 @@ public class GroundAI extends AIController{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(unit.type().canBoost && unit.canPassOn()){
|
if(unit.type().canBoost && unit.tileOn() != null && !unit.tileOn().solid()){
|
||||||
unit.elevation = Mathf.approachDelta(unit.elevation, 0f, 0.08f);
|
unit.elevation = Mathf.approachDelta(unit.elevation, 0f, 0.08f);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!Units.invalidateTarget(target, unit, unit.range()) && unit.type().rotateShooting){
|
if(!Units.invalidateTarget(target, unit, unit.range()) && unit.type().rotateShooting){
|
||||||
if(unit.type().hasWeapons()){
|
if(unit.type().hasWeapons()){
|
||||||
//TODO certain units should not look at the target, e.g. ships
|
|
||||||
unit.lookAt(Predict.intercept(unit, target, unit.type().weapons.first().bullet.speed));
|
unit.lookAt(Predict.intercept(unit, target, unit.type().weapons.first().bullet.speed));
|
||||||
}
|
}
|
||||||
}else if(unit.moving()){
|
}else if(unit.moving()){
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public class SuicideAI extends GroundAI{
|
|||||||
|
|
||||||
Building core = unit.closestEnemyCore();
|
Building core = unit.closestEnemyCore();
|
||||||
|
|
||||||
boolean rotate = false, shoot = false;
|
boolean rotate = false, shoot = false, moveToTarget = false;
|
||||||
|
|
||||||
if(!Units.invalidateTarget(target, unit, unit.range())){
|
if(!Units.invalidateTarget(target, unit, unit.range())){
|
||||||
rotate = true;
|
rotate = true;
|
||||||
@@ -55,11 +55,14 @@ public class SuicideAI extends GroundAI{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!blocked){
|
if(!blocked){
|
||||||
|
moveToTarget = true;
|
||||||
//move towards target directly
|
//move towards target directly
|
||||||
unit.moveAt(vec.set(target).sub(unit).limit(unit.type().speed));
|
unit.moveAt(vec.set(target).sub(unit).limit(unit.type().speed));
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}
|
||||||
|
|
||||||
|
if(!moveToTarget){
|
||||||
if(command() == UnitCommand.rally){
|
if(command() == UnitCommand.rally){
|
||||||
Teamc target = targetFlag(unit.x, unit.y, BlockFlag.rally, false);
|
Teamc target = targetFlag(unit.x, unit.y, BlockFlag.rally, false);
|
||||||
|
|
||||||
|
|||||||
@@ -1,31 +1,25 @@
|
|||||||
package mindustry.async;
|
package mindustry.async;
|
||||||
|
|
||||||
import arc.box2d.*;
|
import arc.math.*;
|
||||||
import arc.box2d.BodyDef.*;
|
|
||||||
import arc.math.geom.*;
|
import arc.math.geom.*;
|
||||||
|
import arc.math.geom.QuadTree.*;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
|
import mindustry.*;
|
||||||
import mindustry.entities.*;
|
import mindustry.entities.*;
|
||||||
|
import mindustry.async.PhysicsProcess.PhysicsWorld.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
|
|
||||||
public class PhysicsProcess implements AsyncProcess{
|
public class PhysicsProcess implements AsyncProcess{
|
||||||
private Physics physics;
|
private static final int
|
||||||
|
layers = 3,
|
||||||
|
layerGround = 0,
|
||||||
|
layerLegs = 1,
|
||||||
|
layerFlying = 2;
|
||||||
|
|
||||||
|
private PhysicsWorld physics;
|
||||||
private Seq<PhysicRef> refs = new Seq<>(false);
|
private Seq<PhysicRef> refs = new Seq<>(false);
|
||||||
private BodyDef def;
|
//currently only enabled for units
|
||||||
|
private EntityGroup<Unit> group = Groups.unit;
|
||||||
private EntityGroup<? extends Physicsc> group;
|
|
||||||
private Filter flying = new Filter(){{
|
|
||||||
maskBits = categoryBits = 2;
|
|
||||||
}}, ground = new Filter(){{
|
|
||||||
maskBits = categoryBits = 1;
|
|
||||||
}};
|
|
||||||
|
|
||||||
public PhysicsProcess(){
|
|
||||||
def = new BodyDef();
|
|
||||||
def.type = BodyType.dynamicBody;
|
|
||||||
|
|
||||||
//currently only enabled for units
|
|
||||||
group = Groups.unit;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void begin(){
|
public void begin(){
|
||||||
@@ -34,47 +28,39 @@ public class PhysicsProcess implements AsyncProcess{
|
|||||||
//remove stale entities
|
//remove stale entities
|
||||||
refs.removeAll(ref -> {
|
refs.removeAll(ref -> {
|
||||||
if(!ref.entity.isAdded()){
|
if(!ref.entity.isAdded()){
|
||||||
physics.destroyBody(ref.body);
|
physics.remove(ref.body);
|
||||||
ref.entity.physref(null);
|
ref.entity.physref(null);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
//find entities without bodies and assign them
|
//find Unit without bodies and assign them
|
||||||
for(Physicsc entity : group){
|
for(Unit entity : group){
|
||||||
boolean grounded = entity.isGrounded();
|
|
||||||
int bits = grounded ? ground.maskBits : flying.maskBits;
|
|
||||||
|
|
||||||
if(entity.physref() == null){
|
if(entity.physref() == null){
|
||||||
//add bodies to entities that have none
|
PhysicsBody body = new PhysicsBody();
|
||||||
FixtureDef fd = new FixtureDef();
|
body.x = entity.x();
|
||||||
fd.shape = new CircleShape(entity.hitSize() / 2f);
|
body.y = entity.y();
|
||||||
fd.density = 5f;
|
body.mass = entity.mass();
|
||||||
fd.restitution = 0.0f;
|
body.radius = entity.hitSize() / 2f;
|
||||||
fd.filter.maskBits = fd.filter.categoryBits = (grounded ? ground : flying).maskBits;
|
|
||||||
|
|
||||||
def.position.set(entity);
|
|
||||||
|
|
||||||
Body body = physics.createBody(def);
|
|
||||||
body.createFixture(fd);
|
|
||||||
|
|
||||||
PhysicRef ref = new PhysicRef(entity, body);
|
PhysicRef ref = new PhysicRef(entity, body);
|
||||||
refs.add(ref);
|
refs.add(ref);
|
||||||
|
|
||||||
entity.physref(ref);
|
entity.physref(ref);
|
||||||
|
|
||||||
|
physics.add(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
//save last position
|
//save last position
|
||||||
PhysicRef ref = entity.physref();
|
PhysicRef ref = entity.physref();
|
||||||
|
|
||||||
if(ref.body.getFixtureList().any() && ref.body.getFixtureList().first().getFilterData().categoryBits != bits){
|
ref.body.layer =
|
||||||
//set correct filter
|
entity.type().allowLegStep ? layerLegs :
|
||||||
ref.body.getFixtureList().first().setFilterData(grounded ? ground : flying);
|
entity.isGrounded() ? layerGround : layerFlying;
|
||||||
}
|
ref.x = entity.x();
|
||||||
|
ref.y = entity.y();
|
||||||
ref.velocity.set(entity.deltaX(), entity.deltaY());
|
|
||||||
ref.position.set(entity);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,26 +71,11 @@ public class PhysicsProcess implements AsyncProcess{
|
|||||||
//get last position vectors before step
|
//get last position vectors before step
|
||||||
for(PhysicRef ref : refs){
|
for(PhysicRef ref : refs){
|
||||||
//force set target position
|
//force set target position
|
||||||
ref.body.setPosition(ref.position.x, ref.position.y);
|
ref.body.x = ref.x;
|
||||||
|
ref.body.y = ref.y;
|
||||||
//save last position for delta
|
|
||||||
ref.lastPosition.set(ref.body.getPosition());
|
|
||||||
|
|
||||||
//write velocity
|
|
||||||
ref.body.setLinearVelocity(ref.velocity);
|
|
||||||
|
|
||||||
ref.lastVelocity.set(ref.velocity);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
physics.step(1f/45f, 5, 8);
|
physics.update();
|
||||||
|
|
||||||
//get delta vectors
|
|
||||||
for(PhysicRef ref : refs){
|
|
||||||
//get delta vector
|
|
||||||
ref.delta.set(ref.body.getPosition()).sub(ref.lastPosition);
|
|
||||||
|
|
||||||
ref.velocity.set(ref.body.getLinearVelocity());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -115,13 +86,8 @@ public class PhysicsProcess implements AsyncProcess{
|
|||||||
for(PhysicRef ref : refs){
|
for(PhysicRef ref : refs){
|
||||||
Physicsc entity = ref.entity;
|
Physicsc entity = ref.entity;
|
||||||
|
|
||||||
entity.move(ref.delta.x, ref.delta.y);
|
//move by delta
|
||||||
|
entity.move(ref.body.x - ref.x, ref.body.y - ref.y);
|
||||||
//save last position
|
|
||||||
ref.position.set(entity);
|
|
||||||
|
|
||||||
//add delta velocity - this doesn't work very well yet
|
|
||||||
//entity.vel().add(ref.velocity).sub(ref.lastVelocity);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,7 +95,6 @@ public class PhysicsProcess implements AsyncProcess{
|
|||||||
public void reset(){
|
public void reset(){
|
||||||
if(physics != null){
|
if(physics != null){
|
||||||
refs.clear();
|
refs.clear();
|
||||||
physics.dispose();
|
|
||||||
physics = null;
|
physics = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -138,17 +103,95 @@ public class PhysicsProcess implements AsyncProcess{
|
|||||||
public void init(){
|
public void init(){
|
||||||
reset();
|
reset();
|
||||||
|
|
||||||
physics = new Physics(new Vec2(), true);
|
physics = new PhysicsWorld(Vars.world.getQuadBounds(new Rect()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class PhysicRef{
|
public static class PhysicRef{
|
||||||
public Physicsc entity;
|
public Physicsc entity;
|
||||||
public Body body;
|
public PhysicsBody body;
|
||||||
public Vec2 lastPosition = new Vec2(), delta = new Vec2(), velocity = new Vec2(), lastVelocity = new Vec2(), position = new Vec2();
|
public float x, y;
|
||||||
|
|
||||||
public PhysicRef(Physicsc entity, Body body){
|
public PhysicRef(Physicsc entity, PhysicsBody body){
|
||||||
this.entity = entity;
|
this.entity = entity;
|
||||||
this.body = body;
|
this.body = body;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//world for simulating physics in a different thread
|
||||||
|
public static class PhysicsWorld{
|
||||||
|
//how much to soften movement by
|
||||||
|
private static final float scl = 1.25f;
|
||||||
|
|
||||||
|
private final QuadTree<PhysicsBody>[] trees = new QuadTree[layers];
|
||||||
|
private final Seq<PhysicsBody> bodies = new Seq<>(false, 16, PhysicsBody.class);
|
||||||
|
private final Seq<PhysicsBody> seq = new Seq<>(PhysicsBody.class);
|
||||||
|
private final Rect rect = new Rect();
|
||||||
|
private final Vec2 vec = new Vec2();
|
||||||
|
|
||||||
|
public PhysicsWorld(Rect bounds){
|
||||||
|
for(int i = 0; i < layers; i++){
|
||||||
|
trees[i] = new QuadTree<>(new Rect(bounds));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void add(PhysicsBody body){
|
||||||
|
bodies.add(body);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void remove(PhysicsBody body){
|
||||||
|
bodies.remove(body);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void update(){
|
||||||
|
for(int i = 0; i < layers; i++){
|
||||||
|
trees[i].clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int i = 0; i < bodies.size; i++){
|
||||||
|
PhysicsBody body = bodies.items[i];
|
||||||
|
body.collided = false;
|
||||||
|
trees[body.layer].insert(body);
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int i = 0; i < bodies.size; i++){
|
||||||
|
PhysicsBody body = bodies.items[i];
|
||||||
|
body.hitbox(rect);
|
||||||
|
|
||||||
|
seq.size = 0;
|
||||||
|
trees[body.layer].intersect(rect, seq);
|
||||||
|
|
||||||
|
for(int j = 0; j < seq.size; j++){
|
||||||
|
PhysicsBody other = seq.items[j];
|
||||||
|
|
||||||
|
if(other == body || other.collided) continue;
|
||||||
|
|
||||||
|
float rs = body.radius + other.radius;
|
||||||
|
float dst = Mathf.dst(body.x, body.y, other.x, other.y);
|
||||||
|
|
||||||
|
if(dst < rs){
|
||||||
|
vec.set(body.x - other.x, body.y - other.y).setLength(rs - dst);
|
||||||
|
float ms = body.mass + other.mass;
|
||||||
|
float m1 = other.mass / ms, m2 = body.mass / ms;
|
||||||
|
|
||||||
|
body.x += vec.x * m1 / scl;
|
||||||
|
body.y += vec.y * m1 / scl;
|
||||||
|
other.x -= vec.x * m2 / scl;
|
||||||
|
other.y -= vec.y * m2 / scl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
body.collided = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class PhysicsBody implements QuadTreeObject{
|
||||||
|
public float x, y, radius, mass;
|
||||||
|
public int layer = 0;
|
||||||
|
public boolean collided = false;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void hitbox(Rect out){
|
||||||
|
out.setCentered(x, y, radius * 2, radius * 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ public class Blocks implements ContentList{
|
|||||||
repairPoint, resupplyPoint,
|
repairPoint, resupplyPoint,
|
||||||
|
|
||||||
//logic
|
//logic
|
||||||
message, switchBlock, microProcessor, logicProcessor, hyperProcessor, largeLogicDisplay, logicDisplay, memoryCell,
|
message, switchBlock, microProcessor, logicProcessor, hyperProcessor, largeLogicDisplay, logicDisplay, memoryCell, memoryBank,
|
||||||
|
|
||||||
//campaign
|
//campaign
|
||||||
launchPad, launchPadLarge,
|
launchPad, launchPadLarge,
|
||||||
@@ -208,6 +208,11 @@ public class Blocks implements ContentList{
|
|||||||
liquidDrop = Liquids.slag;
|
liquidDrop = Liquids.slag;
|
||||||
isLiquid = true;
|
isLiquid = true;
|
||||||
cacheLayer = CacheLayer.slag;
|
cacheLayer = CacheLayer.slag;
|
||||||
|
attributes.set(Attribute.heat, 0.85f);
|
||||||
|
|
||||||
|
emitLight = true;
|
||||||
|
lightRadius = 40f;
|
||||||
|
lightColor = Color.orange.cpy().a(0.38f);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
stone = new Floor("stone");
|
stone = new Floor("stone");
|
||||||
@@ -242,7 +247,7 @@ public class Blocks implements ContentList{
|
|||||||
blendGroup = basalt;
|
blendGroup = basalt;
|
||||||
|
|
||||||
emitLight = true;
|
emitLight = true;
|
||||||
lightRadius = 60f;
|
lightRadius = 50f;
|
||||||
lightColor = Color.orange.cpy().a(0.3f);
|
lightColor = Color.orange.cpy().a(0.3f);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
@@ -265,7 +270,7 @@ public class Blocks implements ContentList{
|
|||||||
variants = 3;
|
variants = 3;
|
||||||
status = StatusEffects.muddy;
|
status = StatusEffects.muddy;
|
||||||
statusDuration = 30f;
|
statusDuration = 30f;
|
||||||
attributes.set(Attribute.water, 2f);
|
attributes.set(Attribute.water, 1f);
|
||||||
cacheLayer = CacheLayer.mud;
|
cacheLayer = CacheLayer.mud;
|
||||||
albedo = 0.35f;
|
albedo = 0.35f;
|
||||||
}};
|
}};
|
||||||
@@ -316,6 +321,7 @@ public class Blocks implements ContentList{
|
|||||||
|
|
||||||
snowBoulder = new Boulder("snow-boulder"){{
|
snowBoulder = new Boulder("snow-boulder"){{
|
||||||
variants = 2;
|
variants = 2;
|
||||||
|
snow.asFloor().decoration = ice.asFloor().decoration = iceSnow.asFloor().decoration = this;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
dirtWall = new StaticWall("dirt-wall"){{
|
dirtWall = new StaticWall("dirt-wall"){{
|
||||||
@@ -864,7 +870,8 @@ public class Blocks implements ContentList{
|
|||||||
size = 2;
|
size = 2;
|
||||||
reload = 250f;
|
reload = 250f;
|
||||||
range = 85f;
|
range = 85f;
|
||||||
healPercent = 14f;
|
healPercent = 11f;
|
||||||
|
phaseBoost = 15f;
|
||||||
health = 80 * size * size;
|
health = 80 * size * size;
|
||||||
consumes.item(Items.phasefabric).boost();
|
consumes.item(Items.phasefabric).boost();
|
||||||
}};
|
}};
|
||||||
@@ -1141,13 +1148,14 @@ public class Blocks implements ContentList{
|
|||||||
powerProduction = 1.8f;
|
powerProduction = 1.8f;
|
||||||
generateEffect = Fx.redgeneratespark;
|
generateEffect = Fx.redgeneratespark;
|
||||||
size = 2;
|
size = 2;
|
||||||
|
floating = true;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
steamGenerator = new BurnerGenerator("steam-generator"){{
|
steamGenerator = new BurnerGenerator("steam-generator"){{
|
||||||
requirements(Category.power, with(Items.copper, 35, Items.graphite, 25, Items.lead, 40, Items.silicon, 30));
|
requirements(Category.power, with(Items.copper, 35, Items.graphite, 25, Items.lead, 40, Items.silicon, 30));
|
||||||
powerProduction = 5.5f;
|
powerProduction = 5.5f;
|
||||||
itemDuration = 90f;
|
itemDuration = 90f;
|
||||||
consumes.liquid(Liquids.water, 0.07f);
|
consumes.liquid(Liquids.water, 0.1f);
|
||||||
hasLiquids = true;
|
hasLiquids = true;
|
||||||
size = 2;
|
size = 2;
|
||||||
}};
|
}};
|
||||||
@@ -1267,7 +1275,7 @@ public class Blocks implements ContentList{
|
|||||||
rotateSpeed = 1.4f;
|
rotateSpeed = 1.4f;
|
||||||
attribute = Attribute.water;
|
attribute = Attribute.water;
|
||||||
|
|
||||||
consumes.power(1.25f);
|
consumes.power(1.5f);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
cultivator = new Cultivator("cultivator"){{
|
cultivator = new Cultivator("cultivator"){{
|
||||||
@@ -1499,7 +1507,7 @@ public class Blocks implements ContentList{
|
|||||||
reloadTime = 35f;
|
reloadTime = 35f;
|
||||||
shootCone = 40f;
|
shootCone = 40f;
|
||||||
rotateSpeed = 8f;
|
rotateSpeed = 8f;
|
||||||
powerUse = 4f;
|
powerUse = 3f;
|
||||||
targetAir = false;
|
targetAir = false;
|
||||||
range = 90f;
|
range = 90f;
|
||||||
shootEffect = Fx.lightningShoot;
|
shootEffect = Fx.lightningShoot;
|
||||||
@@ -1694,7 +1702,7 @@ public class Blocks implements ContentList{
|
|||||||
reloadTime = 90f;
|
reloadTime = 90f;
|
||||||
firingMoveFract = 0.5f;
|
firingMoveFract = 0.5f;
|
||||||
shootDuration = 220f;
|
shootDuration = 220f;
|
||||||
powerUse = 14f;
|
powerUse = 17f;
|
||||||
shootSound = Sounds.laserbig;
|
shootSound = Sounds.laserbig;
|
||||||
activeSound = Sounds.beam;
|
activeSound = Sounds.beam;
|
||||||
activeSoundVolume = 2f;
|
activeSoundVolume = 2f;
|
||||||
@@ -1749,8 +1757,8 @@ public class Blocks implements ContentList{
|
|||||||
new UnitPlan(UnitTypes.risso, 60f * 45f, with(Items.silicon, 20, Items.metaglass, 35)),
|
new UnitPlan(UnitTypes.risso, 60f * 45f, with(Items.silicon, 20, Items.metaglass, 35)),
|
||||||
};
|
};
|
||||||
size = 3;
|
size = 3;
|
||||||
requiresWater = true;
|
|
||||||
consumes.power(1.2f);
|
consumes.power(1.2f);
|
||||||
|
floating = true;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
additiveReconstructor = new Reconstructor("additive-reconstructor"){{
|
additiveReconstructor = new Reconstructor("additive-reconstructor"){{
|
||||||
@@ -1963,11 +1971,18 @@ public class Blocks implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
memoryCell = new MemoryBlock("memory-cell"){{
|
memoryCell = new MemoryBlock("memory-cell"){{
|
||||||
requirements(Category.logic, with(Items.graphite, 40, Items.silicon, 40));
|
requirements(Category.logic, with(Items.graphite, 30, Items.silicon, 30));
|
||||||
|
|
||||||
memoryCapacity = 64;
|
memoryCapacity = 64;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
memoryBank = new MemoryBlock("memory-bank"){{
|
||||||
|
requirements(Category.logic, with(Items.graphite, 80, Items.silicon, 80, Items.phasefabric, 30));
|
||||||
|
|
||||||
|
memoryCapacity = 512;
|
||||||
|
size = 2;
|
||||||
|
}};
|
||||||
|
|
||||||
logicDisplay = new LogicDisplay("logic-display"){{
|
logicDisplay = new LogicDisplay("logic-display"){{
|
||||||
requirements(Category.logic, with(Items.lead, 100, Items.silicon, 50, Items.metaglass, 50));
|
requirements(Category.logic, with(Items.lead, 100, Items.silicon, 50, Items.metaglass, 50));
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class Bullets implements ContentList{
|
|||||||
@Override
|
@Override
|
||||||
public void load(){
|
public void load(){
|
||||||
|
|
||||||
artilleryDense = new ArtilleryBulletType(3f, 12, "shell"){{
|
artilleryDense = new ArtilleryBulletType(3f, 20, "shell"){{
|
||||||
hitEffect = Fx.flakExplosion;
|
hitEffect = Fx.flakExplosion;
|
||||||
knockback = 0.8f;
|
knockback = 0.8f;
|
||||||
lifetime = 80f;
|
lifetime = 80f;
|
||||||
@@ -63,7 +63,7 @@ public class Bullets implements ContentList{
|
|||||||
collidesAir = false;
|
collidesAir = false;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
artilleryPlastic = new ArtilleryBulletType(3.4f, 12, "shell"){{
|
artilleryPlastic = new ArtilleryBulletType(3.4f, 20, "shell"){{
|
||||||
hitEffect = Fx.plasticExplosion;
|
hitEffect = Fx.plasticExplosion;
|
||||||
knockback = 1f;
|
knockback = 1f;
|
||||||
lifetime = 80f;
|
lifetime = 80f;
|
||||||
@@ -77,7 +77,7 @@ public class Bullets implements ContentList{
|
|||||||
frontColor = Pal.plastaniumFront;
|
frontColor = Pal.plastaniumFront;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
artilleryHoming = new ArtilleryBulletType(3f, 12, "shell"){{
|
artilleryHoming = new ArtilleryBulletType(3f, 20, "shell"){{
|
||||||
hitEffect = Fx.flakExplosion;
|
hitEffect = Fx.flakExplosion;
|
||||||
knockback = 0.8f;
|
knockback = 0.8f;
|
||||||
lifetime = 80f;
|
lifetime = 80f;
|
||||||
@@ -91,7 +91,7 @@ public class Bullets implements ContentList{
|
|||||||
homingRange = 50f;
|
homingRange = 50f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
artilleryIncendiary = new ArtilleryBulletType(3f, 12, "shell"){{
|
artilleryIncendiary = new ArtilleryBulletType(3f, 20, "shell"){{
|
||||||
hitEffect = Fx.blastExplosion;
|
hitEffect = Fx.blastExplosion;
|
||||||
knockback = 0.8f;
|
knockback = 0.8f;
|
||||||
lifetime = 80f;
|
lifetime = 80f;
|
||||||
@@ -105,7 +105,7 @@ public class Bullets implements ContentList{
|
|||||||
trailEffect = Fx.incendTrail;
|
trailEffect = Fx.incendTrail;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
artilleryExplosive = new ArtilleryBulletType(2f, 12, "shell"){{
|
artilleryExplosive = new ArtilleryBulletType(2f, 20, "shell"){{
|
||||||
hitEffect = Fx.blastExplosion;
|
hitEffect = Fx.blastExplosion;
|
||||||
knockback = 0.8f;
|
knockback = 0.8f;
|
||||||
lifetime = 80f;
|
lifetime = 80f;
|
||||||
|
|||||||
@@ -211,7 +211,9 @@ public class TechTree implements ContentList{
|
|||||||
});
|
});
|
||||||
|
|
||||||
node(memoryCell, () -> {
|
node(memoryCell, () -> {
|
||||||
|
node(memoryBank, () -> {
|
||||||
|
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -376,7 +378,11 @@ public class TechTree implements ContentList{
|
|||||||
node(nova, () -> {
|
node(nova, () -> {
|
||||||
node(pulsar, () -> {
|
node(pulsar, () -> {
|
||||||
node(quasar, () -> {
|
node(quasar, () -> {
|
||||||
|
node(vela, () -> {
|
||||||
|
node(corvus, () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -46,8 +46,11 @@ public class UnitTypes implements ContentList{
|
|||||||
//air + building + mining + payload
|
//air + building + mining + payload
|
||||||
public static @EntityDef({Unitc.class, Builderc.class, Minerc.class, Payloadc.class}) UnitType mega;
|
public static @EntityDef({Unitc.class, Builderc.class, Minerc.class, Payloadc.class}) UnitType mega;
|
||||||
|
|
||||||
//air + building + payload TODO implement
|
//air + building + payload
|
||||||
public static @EntityDef({Unitc.class, Builderc.class, Payloadc.class}) UnitType quad, oct;
|
public static @EntityDef({Unitc.class, Builderc.class, Payloadc.class}) UnitType quad;
|
||||||
|
|
||||||
|
//air + building + payload + command
|
||||||
|
public static @EntityDef({Unitc.class, Builderc.class, Payloadc.class, Commanderc.class}) UnitType oct;
|
||||||
|
|
||||||
//air + building + mining
|
//air + building + mining
|
||||||
public static @EntityDef({Unitc.class, Builderc.class, Minerc.class}) UnitType alpha, beta, gamma;
|
public static @EntityDef({Unitc.class, Builderc.class, Minerc.class}) UnitType alpha, beta, gamma;
|
||||||
@@ -66,7 +69,7 @@ public class UnitTypes implements ContentList{
|
|||||||
|
|
||||||
dagger = new UnitType("dagger"){{
|
dagger = new UnitType("dagger"){{
|
||||||
speed = 0.5f;
|
speed = 0.5f;
|
||||||
hitsize = 8f;
|
hitSize = 8f;
|
||||||
health = 140;
|
health = 140;
|
||||||
weapons.add(new Weapon("large-weapon"){{
|
weapons.add(new Weapon("large-weapon"){{
|
||||||
reload = 14f;
|
reload = 14f;
|
||||||
@@ -80,7 +83,7 @@ public class UnitTypes implements ContentList{
|
|||||||
|
|
||||||
mace = new UnitType("mace"){{
|
mace = new UnitType("mace"){{
|
||||||
speed = 0.4f;
|
speed = 0.4f;
|
||||||
hitsize = 9f;
|
hitSize = 9f;
|
||||||
health = 500;
|
health = 500;
|
||||||
armor = 4f;
|
armor = 4f;
|
||||||
|
|
||||||
@@ -111,7 +114,7 @@ public class UnitTypes implements ContentList{
|
|||||||
|
|
||||||
fortress = new UnitType("fortress"){{
|
fortress = new UnitType("fortress"){{
|
||||||
speed = 0.38f;
|
speed = 0.38f;
|
||||||
hitsize = 13f;
|
hitSize = 13f;
|
||||||
rotateSpeed = 3f;
|
rotateSpeed = 3f;
|
||||||
targetAir = false;
|
targetAir = false;
|
||||||
health = 790;
|
health = 790;
|
||||||
@@ -144,7 +147,7 @@ public class UnitTypes implements ContentList{
|
|||||||
|
|
||||||
scepter = new UnitType("scepter"){{
|
scepter = new UnitType("scepter"){{
|
||||||
speed = 0.35f;
|
speed = 0.35f;
|
||||||
hitsize = 20f;
|
hitSize = 20f;
|
||||||
rotateSpeed = 2.1f;
|
rotateSpeed = 2.1f;
|
||||||
health = 9000;
|
health = 9000;
|
||||||
armor = 11f;
|
armor = 11f;
|
||||||
@@ -153,6 +156,7 @@ public class UnitTypes implements ContentList{
|
|||||||
|
|
||||||
mechStepParticles = true;
|
mechStepParticles = true;
|
||||||
mechStepShake = 0.15f;
|
mechStepShake = 0.15f;
|
||||||
|
singleTarget = true;
|
||||||
|
|
||||||
weapons.add(
|
weapons.add(
|
||||||
new Weapon("scepter-weapon"){{
|
new Weapon("scepter-weapon"){{
|
||||||
@@ -204,7 +208,7 @@ public class UnitTypes implements ContentList{
|
|||||||
|
|
||||||
reign = new UnitType("reign"){{
|
reign = new UnitType("reign"){{
|
||||||
speed = 0.35f;
|
speed = 0.35f;
|
||||||
hitsize = 26f;
|
hitSize = 26f;
|
||||||
rotateSpeed = 1.65f;
|
rotateSpeed = 1.65f;
|
||||||
health = 24000;
|
health = 24000;
|
||||||
armor = 14f;
|
armor = 14f;
|
||||||
@@ -266,13 +270,14 @@ public class UnitTypes implements ContentList{
|
|||||||
canBoost = true;
|
canBoost = true;
|
||||||
boostMultiplier = 1.5f;
|
boostMultiplier = 1.5f;
|
||||||
speed = 0.55f;
|
speed = 0.55f;
|
||||||
hitsize = 8f;
|
hitSize = 8f;
|
||||||
health = 110f;
|
health = 110f;
|
||||||
buildSpeed = 0.8f;
|
buildSpeed = 0.8f;
|
||||||
armor = 1f;
|
armor = 1f;
|
||||||
commandLimit = 8;
|
commandLimit = 8;
|
||||||
|
|
||||||
abilities.add(new HealFieldAbility(10f, 60f * 4, 60f));
|
abilities.add(new HealFieldAbility(10f, 60f * 4, 60f));
|
||||||
|
ammoType = AmmoTypes.power;
|
||||||
|
|
||||||
weapons.add(new Weapon("heal-weapon"){{
|
weapons.add(new Weapon("heal-weapon"){{
|
||||||
top = false;
|
top = false;
|
||||||
@@ -292,16 +297,17 @@ public class UnitTypes implements ContentList{
|
|||||||
canBoost = true;
|
canBoost = true;
|
||||||
boostMultiplier = 1.5f;
|
boostMultiplier = 1.5f;
|
||||||
speed = 0.65f;
|
speed = 0.65f;
|
||||||
hitsize = 10f;
|
hitSize = 10f;
|
||||||
health = 320f;
|
health = 320f;
|
||||||
buildSpeed = 0.9f;
|
buildSpeed = 0.9f;
|
||||||
armor = 4f;
|
armor = 4f;
|
||||||
|
|
||||||
mineTier = 2;
|
mineTier = 2;
|
||||||
mineSpeed = 5f;
|
mineSpeed = 5f;
|
||||||
commandLimit = 15;
|
commandLimit = 8;
|
||||||
|
|
||||||
abilities.add(new ShieldFieldAbility(20f, 40f, 60f * 5, 60f));
|
abilities.add(new ShieldFieldAbility(20f, 40f, 60f * 5, 60f));
|
||||||
|
ammoType = AmmoTypes.power;
|
||||||
|
|
||||||
weapons.add(new Weapon("heal-shotgun-weapon"){{
|
weapons.add(new Weapon("heal-shotgun-weapon"){{
|
||||||
top = false;
|
top = false;
|
||||||
@@ -332,7 +338,7 @@ public class UnitTypes implements ContentList{
|
|||||||
|
|
||||||
quasar = new UnitType("quasar"){{
|
quasar = new UnitType("quasar"){{
|
||||||
mineTier = 1;
|
mineTier = 1;
|
||||||
hitsize = 12f;
|
hitSize = 12f;
|
||||||
boostMultiplier = 2f;
|
boostMultiplier = 2f;
|
||||||
itemCapacity = 80;
|
itemCapacity = 80;
|
||||||
health = 650f;
|
health = 650f;
|
||||||
@@ -341,11 +347,12 @@ public class UnitTypes implements ContentList{
|
|||||||
armor = 9f;
|
armor = 9f;
|
||||||
landShake = 2f;
|
landShake = 2f;
|
||||||
|
|
||||||
commandLimit = 24;
|
commandLimit = 10;
|
||||||
mechFrontSway = 0.55f;
|
mechFrontSway = 0.55f;
|
||||||
|
ammoType = AmmoTypes.power;
|
||||||
|
|
||||||
speed = 0.4f;
|
speed = 0.4f;
|
||||||
hitsize = 10f;
|
hitSize = 10f;
|
||||||
|
|
||||||
mineTier = 2;
|
mineTier = 2;
|
||||||
mineSpeed = 7f;
|
mineSpeed = 7f;
|
||||||
@@ -374,7 +381,7 @@ public class UnitTypes implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
vela = new UnitType("vela"){{
|
vela = new UnitType("vela"){{
|
||||||
hitsize = 23f;
|
hitSize = 23f;
|
||||||
|
|
||||||
rotateSpeed = 1.6f;
|
rotateSpeed = 1.6f;
|
||||||
canDrown = false;
|
canDrown = false;
|
||||||
@@ -382,6 +389,7 @@ public class UnitTypes implements ContentList{
|
|||||||
|
|
||||||
mechStepParticles = true;
|
mechStepParticles = true;
|
||||||
mechStepShake = 0.15f;
|
mechStepShake = 0.15f;
|
||||||
|
ammoType = AmmoTypes.powerHigh;
|
||||||
|
|
||||||
speed = 0.35f;
|
speed = 0.35f;
|
||||||
boostMultiplier = 2.1f;
|
boostMultiplier = 2.1f;
|
||||||
@@ -389,12 +397,12 @@ public class UnitTypes implements ContentList{
|
|||||||
engineSize = 6f;
|
engineSize = 6f;
|
||||||
lowAltitude = true;
|
lowAltitude = true;
|
||||||
|
|
||||||
health = 6000f;
|
health = 6500f;
|
||||||
armor = 7f;
|
armor = 7f;
|
||||||
canBoost = true;
|
canBoost = true;
|
||||||
landShake = 4f;
|
landShake = 4f;
|
||||||
|
|
||||||
commandLimit = 32;
|
commandLimit = 8;
|
||||||
|
|
||||||
weapons.add(new Weapon("vela-weapon"){{
|
weapons.add(new Weapon("vela-weapon"){{
|
||||||
mirror = false;
|
mirror = false;
|
||||||
@@ -411,7 +419,7 @@ public class UnitTypes implements ContentList{
|
|||||||
continuous = true;
|
continuous = true;
|
||||||
cooldownTime = 200f;
|
cooldownTime = 200f;
|
||||||
|
|
||||||
bullet = new ContinuousLaserBulletType(16){{
|
bullet = new ContinuousLaserBulletType(20){{
|
||||||
length = 150f;
|
length = 150f;
|
||||||
hitEffect = Fx.hitMeltHeal;
|
hitEffect = Fx.hitMeltHeal;
|
||||||
drawSize = 420f;
|
drawSize = 420f;
|
||||||
@@ -422,7 +430,7 @@ public class UnitTypes implements ContentList{
|
|||||||
|
|
||||||
shootEffect = Fx.greenLaserChargeSmall;
|
shootEffect = Fx.greenLaserChargeSmall;
|
||||||
|
|
||||||
incendChance = 0.02f;
|
incendChance = 0.05f;
|
||||||
incendSpread = 5f;
|
incendSpread = 5f;
|
||||||
incendAmount = 1;
|
incendAmount = 1;
|
||||||
|
|
||||||
@@ -436,7 +444,7 @@ public class UnitTypes implements ContentList{
|
|||||||
|
|
||||||
corvus = new UnitType("corvus"){{
|
corvus = new UnitType("corvus"){{
|
||||||
mineTier = 1;
|
mineTier = 1;
|
||||||
hitsize = 29f;
|
hitSize = 29f;
|
||||||
itemCapacity = 80;
|
itemCapacity = 80;
|
||||||
health = 19000f;
|
health = 19000f;
|
||||||
buildSpeed = 1.7f;
|
buildSpeed = 1.7f;
|
||||||
@@ -444,7 +452,7 @@ public class UnitTypes implements ContentList{
|
|||||||
landShake = 1.5f;
|
landShake = 1.5f;
|
||||||
rotateSpeed = 1.5f;
|
rotateSpeed = 1.5f;
|
||||||
|
|
||||||
commandLimit = 24;
|
commandLimit = 8;
|
||||||
|
|
||||||
legCount = 4;
|
legCount = 4;
|
||||||
legLength = 14f;
|
legLength = 14f;
|
||||||
@@ -454,6 +462,8 @@ public class UnitTypes implements ContentList{
|
|||||||
hovering = true;
|
hovering = true;
|
||||||
visualElevation = 0.2f;
|
visualElevation = 0.2f;
|
||||||
allowLegStep = true;
|
allowLegStep = true;
|
||||||
|
ammoType = AmmoTypes.powerHigh;
|
||||||
|
groundLayer = Layer.legUnit;
|
||||||
|
|
||||||
speed = 0.3f;
|
speed = 0.3f;
|
||||||
|
|
||||||
@@ -479,7 +489,7 @@ public class UnitTypes implements ContentList{
|
|||||||
|
|
||||||
bullet = new LaserBulletType(){{
|
bullet = new LaserBulletType(){{
|
||||||
length = 500f;
|
length = 500f;
|
||||||
damage = 520f;
|
damage = 550f;
|
||||||
width = 75f;
|
width = 75f;
|
||||||
|
|
||||||
lifetime = 65f;
|
lifetime = 65f;
|
||||||
@@ -510,7 +520,7 @@ public class UnitTypes implements ContentList{
|
|||||||
defaultController = SuicideAI::new;
|
defaultController = SuicideAI::new;
|
||||||
|
|
||||||
speed = 0.85f;
|
speed = 0.85f;
|
||||||
hitsize = 8f;
|
hitSize = 8f;
|
||||||
health = 180;
|
health = 180;
|
||||||
mechSideSway = 0.25f;
|
mechSideSway = 0.25f;
|
||||||
range = 40f;
|
range = 40f;
|
||||||
@@ -538,7 +548,7 @@ public class UnitTypes implements ContentList{
|
|||||||
itemCapacity = 80;
|
itemCapacity = 80;
|
||||||
speed = 0.5f;
|
speed = 0.5f;
|
||||||
drag = 0.4f;
|
drag = 0.4f;
|
||||||
hitsize = 10f;
|
hitSize = 10f;
|
||||||
rotateSpeed = 3f;
|
rotateSpeed = 3f;
|
||||||
targetAir = false;
|
targetAir = false;
|
||||||
health = 600;
|
health = 600;
|
||||||
@@ -578,7 +588,7 @@ public class UnitTypes implements ContentList{
|
|||||||
spiroct = new UnitType("spiroct"){{
|
spiroct = new UnitType("spiroct"){{
|
||||||
speed = 0.4f;
|
speed = 0.4f;
|
||||||
drag = 0.4f;
|
drag = 0.4f;
|
||||||
hitsize = 12f;
|
hitSize = 12f;
|
||||||
rotateSpeed = 3f;
|
rotateSpeed = 3f;
|
||||||
health = 760;
|
health = 760;
|
||||||
immunities = ObjectSet.with(StatusEffects.burning, StatusEffects.melting);
|
immunities = ObjectSet.with(StatusEffects.burning, StatusEffects.melting);
|
||||||
@@ -589,6 +599,7 @@ public class UnitTypes implements ContentList{
|
|||||||
legBaseOffset = 2f;
|
legBaseOffset = 2f;
|
||||||
hovering = true;
|
hovering = true;
|
||||||
armor = 5f;
|
armor = 5f;
|
||||||
|
ammoType = AmmoTypes.power;
|
||||||
|
|
||||||
buildSpeed = 0.75f;
|
buildSpeed = 0.75f;
|
||||||
|
|
||||||
@@ -643,7 +654,7 @@ public class UnitTypes implements ContentList{
|
|||||||
arkyid = new UnitType("arkyid"){{
|
arkyid = new UnitType("arkyid"){{
|
||||||
drag = 0.1f;
|
drag = 0.1f;
|
||||||
speed = 0.5f;
|
speed = 0.5f;
|
||||||
hitsize = 21f;
|
hitSize = 21f;
|
||||||
health = 8000;
|
health = 8000;
|
||||||
armor = 6f;
|
armor = 6f;
|
||||||
|
|
||||||
@@ -660,6 +671,7 @@ public class UnitTypes implements ContentList{
|
|||||||
legLengthScl = 0.96f;
|
legLengthScl = 0.96f;
|
||||||
rippleScale = 2f;
|
rippleScale = 2f;
|
||||||
legSpeed = 0.2f;
|
legSpeed = 0.2f;
|
||||||
|
ammoType = AmmoTypes.power;
|
||||||
|
|
||||||
legSplashDamage = 32;
|
legSplashDamage = 32;
|
||||||
legSplashRange = 30;
|
legSplashRange = 30;
|
||||||
@@ -741,7 +753,7 @@ public class UnitTypes implements ContentList{
|
|||||||
toxopid = new UnitType("toxopid"){{
|
toxopid = new UnitType("toxopid"){{
|
||||||
drag = 0.1f;
|
drag = 0.1f;
|
||||||
speed = 0.5f;
|
speed = 0.5f;
|
||||||
hitsize = 21f;
|
hitSize = 21f;
|
||||||
health = 22000;
|
health = 22000;
|
||||||
armor = 13f;
|
armor = 13f;
|
||||||
|
|
||||||
@@ -758,6 +770,7 @@ public class UnitTypes implements ContentList{
|
|||||||
legLengthScl = 0.93f;
|
legLengthScl = 0.93f;
|
||||||
rippleScale = 3f;
|
rippleScale = 3f;
|
||||||
legSpeed = 0.19f;
|
legSpeed = 0.19f;
|
||||||
|
ammoType = AmmoTypes.powerHigh;
|
||||||
|
|
||||||
legSplashDamage = 80;
|
legSplashDamage = 80;
|
||||||
legSplashRange = 60;
|
legSplashRange = 60;
|
||||||
@@ -872,7 +885,7 @@ public class UnitTypes implements ContentList{
|
|||||||
weapons.add(new Weapon(){{
|
weapons.add(new Weapon(){{
|
||||||
y = 0f;
|
y = 0f;
|
||||||
x = 2f;
|
x = 2f;
|
||||||
reload = 15f;
|
reload = 13f;
|
||||||
ejectEffect = Fx.shellEjectSmall;
|
ejectEffect = Fx.shellEjectSmall;
|
||||||
bullet = Bullets.standardCopper;
|
bullet = Bullets.standardCopper;
|
||||||
shootSound = Sounds.shoot;
|
shootSound = Sounds.shoot;
|
||||||
@@ -885,7 +898,7 @@ public class UnitTypes implements ContentList{
|
|||||||
accel = 0.08f;
|
accel = 0.08f;
|
||||||
drag = 0.016f;
|
drag = 0.016f;
|
||||||
flying = true;
|
flying = true;
|
||||||
hitsize = 9f;
|
hitSize = 9f;
|
||||||
targetAir = false;
|
targetAir = false;
|
||||||
engineOffset = 7.8f;
|
engineOffset = 7.8f;
|
||||||
range = 140f;
|
range = 140f;
|
||||||
@@ -922,7 +935,7 @@ public class UnitTypes implements ContentList{
|
|||||||
drag = 0.016f;
|
drag = 0.016f;
|
||||||
flying = true;
|
flying = true;
|
||||||
range = 140f;
|
range = 140f;
|
||||||
hitsize = 18f;
|
hitSize = 20f;
|
||||||
lowAltitude = true;
|
lowAltitude = true;
|
||||||
armor = 5f;
|
armor = 5f;
|
||||||
|
|
||||||
@@ -960,9 +973,9 @@ public class UnitTypes implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
antumbra = new UnitType("antumbra"){{
|
antumbra = new UnitType("antumbra"){{
|
||||||
speed = 1.13f;
|
speed = 0.8f;
|
||||||
accel = 0.035f;
|
accel = 0.04f;
|
||||||
drag = 0.05f;
|
drag = 0.04f;
|
||||||
rotateSpeed = 1.9f;
|
rotateSpeed = 1.9f;
|
||||||
flying = true;
|
flying = true;
|
||||||
lowAltitude = true;
|
lowAltitude = true;
|
||||||
@@ -970,7 +983,7 @@ public class UnitTypes implements ContentList{
|
|||||||
armor = 9f;
|
armor = 9f;
|
||||||
engineOffset = 21;
|
engineOffset = 21;
|
||||||
engineSize = 5.3f;
|
engineSize = 5.3f;
|
||||||
hitsize = 56f;
|
hitSize = 56f;
|
||||||
|
|
||||||
BulletType missiles = new MissileBulletType(2.7f, 10){{
|
BulletType missiles = new MissileBulletType(2.7f, 10){{
|
||||||
width = 8f;
|
width = 8f;
|
||||||
@@ -1033,16 +1046,16 @@ public class UnitTypes implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
eclipse = new UnitType("eclipse"){{
|
eclipse = new UnitType("eclipse"){{
|
||||||
speed = 1.09f;
|
speed = 0.52f;
|
||||||
accel = 0.02f;
|
accel = 0.04f;
|
||||||
drag = 0.05f;
|
drag = 0.04f;
|
||||||
rotateSpeed = 1f;
|
rotateSpeed = 1f;
|
||||||
flying = true;
|
flying = true;
|
||||||
lowAltitude = true;
|
lowAltitude = true;
|
||||||
health = 20000;
|
health = 20000;
|
||||||
engineOffset = 38;
|
engineOffset = 38;
|
||||||
engineSize = 7.3f;
|
engineSize = 7.3f;
|
||||||
hitsize = 58f;
|
hitSize = 58f;
|
||||||
destructibleWreck = false;
|
destructibleWreck = false;
|
||||||
armor = 13f;
|
armor = 13f;
|
||||||
|
|
||||||
@@ -1125,6 +1138,8 @@ public class UnitTypes implements ContentList{
|
|||||||
range = 50f;
|
range = 50f;
|
||||||
isCounted = false;
|
isCounted = false;
|
||||||
|
|
||||||
|
ammoType = AmmoTypes.powerLow;
|
||||||
|
|
||||||
mineTier = 1;
|
mineTier = 1;
|
||||||
mineSpeed = 2.5f;
|
mineSpeed = 2.5f;
|
||||||
}};
|
}};
|
||||||
@@ -1142,10 +1157,12 @@ public class UnitTypes implements ContentList{
|
|||||||
health = 400;
|
health = 400;
|
||||||
buildSpeed = 0.5f;
|
buildSpeed = 0.5f;
|
||||||
engineOffset = 6.5f;
|
engineOffset = 6.5f;
|
||||||
hitsize = 8f;
|
hitSize = 8f;
|
||||||
lowAltitude = true;
|
lowAltitude = true;
|
||||||
isCounted = false;
|
isCounted = false;
|
||||||
|
|
||||||
|
ammoType = AmmoTypes.power;
|
||||||
|
|
||||||
mineTier = 2;
|
mineTier = 2;
|
||||||
mineSpeed = 3.5f;
|
mineSpeed = 3.5f;
|
||||||
|
|
||||||
@@ -1194,11 +1211,13 @@ public class UnitTypes implements ContentList{
|
|||||||
flying = true;
|
flying = true;
|
||||||
engineOffset = 10.5f;
|
engineOffset = 10.5f;
|
||||||
rotateShooting = false;
|
rotateShooting = false;
|
||||||
hitsize = 15f;
|
hitSize = 15f;
|
||||||
engineSize = 3f;
|
engineSize = 3f;
|
||||||
payloadCapacity = (2 * 2) * tilePayload;
|
payloadCapacity = (2 * 2) * tilePayload;
|
||||||
buildSpeed = 2.5f;
|
buildSpeed = 2.5f;
|
||||||
|
|
||||||
|
ammoType = AmmoTypes.power;
|
||||||
|
|
||||||
weapons.add(
|
weapons.add(
|
||||||
new Weapon("heal-weapon-mount"){{
|
new Weapon("heal-weapon-mount"){{
|
||||||
reload = 25f;
|
reload = 25f;
|
||||||
@@ -1228,12 +1247,14 @@ public class UnitTypes implements ContentList{
|
|||||||
engineOffset = 12f;
|
engineOffset = 12f;
|
||||||
engineSize = 6f;
|
engineSize = 6f;
|
||||||
rotateShooting = false;
|
rotateShooting = false;
|
||||||
hitsize = 32f;
|
hitSize = 32f;
|
||||||
payloadCapacity = (3 * 3) * tilePayload;
|
payloadCapacity = (3 * 3) * tilePayload;
|
||||||
buildSpeed = 2.5f;
|
buildSpeed = 2.5f;
|
||||||
range = 140f;
|
range = 140f;
|
||||||
targetAir = false;
|
targetAir = false;
|
||||||
|
|
||||||
|
ammoType = AmmoTypes.powerHigh;
|
||||||
|
|
||||||
weapons.add(
|
weapons.add(
|
||||||
new Weapon(){{
|
new Weapon(){{
|
||||||
x = y = 0f;
|
x = y = 0f;
|
||||||
@@ -1288,10 +1309,11 @@ public class UnitTypes implements ContentList{
|
|||||||
engineOffset = 46f;
|
engineOffset = 46f;
|
||||||
engineSize = 7.8f;
|
engineSize = 7.8f;
|
||||||
rotateShooting = false;
|
rotateShooting = false;
|
||||||
hitsize = 60f;
|
hitSize = 60f;
|
||||||
payloadCapacity = (5.3f * 5.3f) * tilePayload;
|
payloadCapacity = (5.3f * 5.3f) * tilePayload;
|
||||||
buildSpeed = 4f;
|
buildSpeed = 4f;
|
||||||
drawShields = false;
|
drawShields = false;
|
||||||
|
commandLimit = 6;
|
||||||
|
|
||||||
abilities.add(new ForceFieldAbility(140f, 4f, 7000f, 60f * 8), new HealFieldAbility(130f, 60f * 2, 140f));
|
abilities.add(new ForceFieldAbility(140f, 4f, 7000f, 60f * 8), new HealFieldAbility(130f, 60f * 2, 140f));
|
||||||
}};
|
}};
|
||||||
@@ -1302,7 +1324,7 @@ public class UnitTypes implements ContentList{
|
|||||||
risso = new UnitType("risso"){{
|
risso = new UnitType("risso"){{
|
||||||
speed = 1.1f;
|
speed = 1.1f;
|
||||||
drag = 0.13f;
|
drag = 0.13f;
|
||||||
hitsize = 9f;
|
hitSize = 9f;
|
||||||
health = 280;
|
health = 280;
|
||||||
accel = 0.4f;
|
accel = 0.4f;
|
||||||
rotateSpeed = 3.3f;
|
rotateSpeed = 3.3f;
|
||||||
@@ -1353,7 +1375,7 @@ public class UnitTypes implements ContentList{
|
|||||||
health = 600;
|
health = 600;
|
||||||
speed = 0.9f;
|
speed = 0.9f;
|
||||||
drag = 0.15f;
|
drag = 0.15f;
|
||||||
hitsize = 11f;
|
hitSize = 11f;
|
||||||
armor = 4f;
|
armor = 4f;
|
||||||
accel = 0.3f;
|
accel = 0.3f;
|
||||||
rotateSpeed = 2.6f;
|
rotateSpeed = 2.6f;
|
||||||
@@ -1396,7 +1418,7 @@ public class UnitTypes implements ContentList{
|
|||||||
accel = 0.2f;
|
accel = 0.2f;
|
||||||
rotateSpeed = 1.8f;
|
rotateSpeed = 1.8f;
|
||||||
drag = 0.17f;
|
drag = 0.17f;
|
||||||
hitsize = 16f;
|
hitSize = 16f;
|
||||||
armor = 7f;
|
armor = 7f;
|
||||||
rotateShooting = false;
|
rotateShooting = false;
|
||||||
|
|
||||||
@@ -1489,7 +1511,7 @@ public class UnitTypes implements ContentList{
|
|||||||
|
|
||||||
speed = 0.73f;
|
speed = 0.73f;
|
||||||
drag = 0.17f;
|
drag = 0.17f;
|
||||||
hitsize = 39f;
|
hitSize = 39f;
|
||||||
accel = 0.2f;
|
accel = 0.2f;
|
||||||
rotateSpeed = 1.3f;
|
rotateSpeed = 1.3f;
|
||||||
rotateShooting = false;
|
rotateShooting = false;
|
||||||
@@ -1572,7 +1594,7 @@ public class UnitTypes implements ContentList{
|
|||||||
health = 22000;
|
health = 22000;
|
||||||
speed = 0.62f;
|
speed = 0.62f;
|
||||||
drag = 0.18f;
|
drag = 0.18f;
|
||||||
hitsize = 50f;
|
hitSize = 50f;
|
||||||
armor = 16f;
|
armor = 16f;
|
||||||
accel = 0.19f;
|
accel = 0.19f;
|
||||||
rotateSpeed = 0.9f;
|
rotateSpeed = 0.9f;
|
||||||
@@ -1635,7 +1657,7 @@ public class UnitTypes implements ContentList{
|
|||||||
itemCapacity = 30;
|
itemCapacity = 30;
|
||||||
health = 120f;
|
health = 120f;
|
||||||
engineOffset = 6f;
|
engineOffset = 6f;
|
||||||
hitsize = 8f;
|
hitSize = 8f;
|
||||||
|
|
||||||
weapons.add(new Weapon("small-basic-weapon"){{
|
weapons.add(new Weapon("small-basic-weapon"){{
|
||||||
reload = 17f;
|
reload = 17f;
|
||||||
@@ -1669,7 +1691,7 @@ public class UnitTypes implements ContentList{
|
|||||||
itemCapacity = 50;
|
itemCapacity = 50;
|
||||||
health = 150f;
|
health = 150f;
|
||||||
engineOffset = 6f;
|
engineOffset = 6f;
|
||||||
hitsize = 9f;
|
hitSize = 9f;
|
||||||
rotateShooting = false;
|
rotateShooting = false;
|
||||||
lowAltitude = true;
|
lowAltitude = true;
|
||||||
|
|
||||||
@@ -1709,7 +1731,7 @@ public class UnitTypes implements ContentList{
|
|||||||
itemCapacity = 70;
|
itemCapacity = 70;
|
||||||
health = 190f;
|
health = 190f;
|
||||||
engineOffset = 6f;
|
engineOffset = 6f;
|
||||||
hitsize = 10f;
|
hitSize = 10f;
|
||||||
|
|
||||||
weapons.add(new Weapon("small-mount-weapon"){{
|
weapons.add(new Weapon("small-mount-weapon"){{
|
||||||
top = false;
|
top = false;
|
||||||
@@ -1739,7 +1761,7 @@ public class UnitTypes implements ContentList{
|
|||||||
block = new UnitType("block"){
|
block = new UnitType("block"){
|
||||||
{
|
{
|
||||||
speed = 0f;
|
speed = 0f;
|
||||||
hitsize = 0f;
|
hitSize = 0f;
|
||||||
health = 1;
|
health = 1;
|
||||||
rotateSpeed = 360f;
|
rotateSpeed = 360f;
|
||||||
itemCapacity = 0;
|
itemCapacity = 0;
|
||||||
|
|||||||
@@ -170,12 +170,13 @@ public class Weathers implements ContentList{
|
|||||||
sandstorm = new Weather("sandstorm"){
|
sandstorm = new Weather("sandstorm"){
|
||||||
TextureRegion region;
|
TextureRegion region;
|
||||||
float size = 140f, padding = size, invDensity = 1500f, baseSpeed = 6.1f;
|
float size = 140f, padding = size, invDensity = 1500f, baseSpeed = 6.1f;
|
||||||
float force = 0.45f;
|
float force = 0.4f * 0;
|
||||||
Color color = Color.valueOf("f7cba4");
|
Color color = Color.valueOf("f7cba4");
|
||||||
Texture noise;
|
Texture noise;
|
||||||
|
|
||||||
{
|
{
|
||||||
attrs.set(Attribute.light, -0.1f);
|
attrs.set(Attribute.light, -0.1f);
|
||||||
|
opacityMultiplier = 0.8f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -250,7 +251,7 @@ public class Weathers implements ContentList{
|
|||||||
|
|
||||||
sporestorm = new Weather("sporestorm"){
|
sporestorm = new Weather("sporestorm"){
|
||||||
TextureRegion region;
|
TextureRegion region;
|
||||||
float size = 5f, padding = size, invDensity = 2000f, baseSpeed = 4.3f, force = 0.28f;
|
float size = 5f, padding = size, invDensity = 2000f, baseSpeed = 4.3f, force = 0.28f * 0;
|
||||||
Color color = Color.valueOf("7457ce");
|
Color color = Color.valueOf("7457ce");
|
||||||
Texture noise;
|
Texture noise;
|
||||||
|
|
||||||
@@ -259,6 +260,7 @@ public class Weathers implements ContentList{
|
|||||||
attrs.set(Attribute.light, -0.15f);
|
attrs.set(Attribute.light, -0.15f);
|
||||||
status = StatusEffects.sporeSlowed;
|
status = StatusEffects.sporeSlowed;
|
||||||
statusGround = false;
|
statusGround = false;
|
||||||
|
opacityMultiplier = 0.85f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ public class ContentLoader{
|
|||||||
new StatusEffects(),
|
new StatusEffects(),
|
||||||
new Liquids(),
|
new Liquids(),
|
||||||
new Bullets(),
|
new Bullets(),
|
||||||
|
new AmmoTypes(),
|
||||||
new UnitTypes(),
|
new UnitTypes(),
|
||||||
new Blocks(),
|
new Blocks(),
|
||||||
new Loadouts(),
|
new Loadouts(),
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class GameState{
|
|||||||
/** Wave countdown in ticks. */
|
/** Wave countdown in ticks. */
|
||||||
public float wavetime;
|
public float wavetime;
|
||||||
/** Whether the game is in game over state. */
|
/** Whether the game is in game over state. */
|
||||||
public boolean gameOver = false, launched = false, serverPaused = false, wasTimeout;
|
public boolean gameOver = false, serverPaused = false, wasTimeout;
|
||||||
/** Map that is currently being played on. */
|
/** Map that is currently being played on. */
|
||||||
public @NonNull Map map = emptyMap;
|
public @NonNull Map map = emptyMap;
|
||||||
/** The current game rules. */
|
/** The current game rules. */
|
||||||
@@ -52,7 +52,7 @@ public class GameState{
|
|||||||
|
|
||||||
/** @return whether the player is in a campaign and they are out of sector time */
|
/** @return whether the player is in a campaign and they are out of sector time */
|
||||||
public boolean isOutOfTime(){
|
public boolean isOutOfTime(){
|
||||||
return isCampaign() && isGame() && getSector().getTimeSpent() >= turnDuration;
|
return isCampaign() && isGame() && getSector().getTimeSpent() >= turnDuration && !net.active();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasSector(){
|
public boolean hasSector(){
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import arc.*;
|
|||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import mindustry.annotations.Annotations.*;
|
import mindustry.annotations.Annotations.*;
|
||||||
import mindustry.content.*;
|
|
||||||
import mindustry.core.GameState.*;
|
import mindustry.core.GameState.*;
|
||||||
import mindustry.game.EventType.*;
|
import mindustry.game.EventType.*;
|
||||||
import mindustry.game.*;
|
import mindustry.game.*;
|
||||||
@@ -178,7 +177,7 @@ public class Logic implements ApplicationListener{
|
|||||||
public void runWave(){
|
public void runWave(){
|
||||||
spawner.spawnEnemies();
|
spawner.spawnEnemies();
|
||||||
state.wave++;
|
state.wave++;
|
||||||
state.wavetime = state.hasSector() && state.getSector().isLaunchWave(state.wave) ? state.rules.waveSpacing * state.rules.launchWaveMultiplier : state.rules.waveSpacing;
|
state.wavetime = state.rules.waveSpacing;
|
||||||
|
|
||||||
Events.fire(new WaveEvent());
|
Events.fire(new WaveEvent());
|
||||||
}
|
}
|
||||||
@@ -251,58 +250,6 @@ public class Logic implements ApplicationListener{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Remote(called = Loc.both)
|
|
||||||
public static void launchZone(){
|
|
||||||
if(!state.isCampaign()) return;
|
|
||||||
|
|
||||||
if(!headless){
|
|
||||||
ui.hudfrag.showLaunch();
|
|
||||||
}
|
|
||||||
|
|
||||||
//TODO better core launch effect
|
|
||||||
for(Building tile : state.teams.playerCores()){
|
|
||||||
Fx.launch.at(tile);
|
|
||||||
}
|
|
||||||
|
|
||||||
Sector sector = state.rules.sector;
|
|
||||||
|
|
||||||
//TODO containers must be launched too
|
|
||||||
Time.runTask(30f, () -> {
|
|
||||||
Sector origin = sector.save.meta.secinfo.origin;
|
|
||||||
if(origin != null){
|
|
||||||
ItemSeq stacks = origin.getExtraItems();
|
|
||||||
|
|
||||||
//add up all items into list
|
|
||||||
for(Building entity : state.teams.playerCores()){
|
|
||||||
entity.items.each(stacks::add);
|
|
||||||
}
|
|
||||||
|
|
||||||
//save received items
|
|
||||||
origin.setExtraItems(stacks);
|
|
||||||
}
|
|
||||||
|
|
||||||
//remove all the cores
|
|
||||||
state.teams.playerCores().each(b -> b.tile.remove());
|
|
||||||
|
|
||||||
state.launched = true;
|
|
||||||
state.gameOver = true;
|
|
||||||
|
|
||||||
//save over the data w/o the cores
|
|
||||||
sector.save.save();
|
|
||||||
|
|
||||||
//run a turn, since launching takes up a turn
|
|
||||||
universe.runTurn();
|
|
||||||
|
|
||||||
//TODO apply extra damage to sector
|
|
||||||
//sector.setTurnsPassed(sector.getTurnsPassed() + 3);
|
|
||||||
|
|
||||||
//TODO load the sector that was launched from
|
|
||||||
Events.fire(new LaunchEvent());
|
|
||||||
//manually fire game over event now
|
|
||||||
Events.fire(new GameOverEvent(state.rules.defaultTeam));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Remote(called = Loc.both)
|
@Remote(called = Loc.both)
|
||||||
public static void updateGameOver(Team winner){
|
public static void updateGameOver(Team winner){
|
||||||
state.gameOver = true;
|
state.gameOver = true;
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ public class NetServer implements ApplicationListener{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Time.millis() < info.lastKicked){
|
if(Time.millis() < admins.getKickTime(uuid, con.address)){
|
||||||
con.kick(KickReason.recentKick);
|
con.kick(KickReason.recentKick);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,10 +14,18 @@ import mindustry.type.*;
|
|||||||
import mindustry.ui.dialogs.*;
|
import mindustry.ui.dialogs.*;
|
||||||
import rhino.*;
|
import rhino.*;
|
||||||
|
|
||||||
|
import java.net.*;
|
||||||
|
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
public interface Platform{
|
public interface Platform{
|
||||||
|
|
||||||
|
/** Dynamically loads a jar file. */
|
||||||
|
default Class<?> loadJar(Fi jar, String mainClass) throws Exception{
|
||||||
|
URLClassLoader classLoader = new URLClassLoader(new URL[]{jar.file().toURI().toURL()}, ClassLoader.getSystemClassLoader());
|
||||||
|
return classLoader.loadClass(mainClass);
|
||||||
|
}
|
||||||
|
|
||||||
/** Steam: Update lobby visibility.*/
|
/** Steam: Update lobby visibility.*/
|
||||||
default void updateLobby(){}
|
default void updateLobby(){}
|
||||||
|
|
||||||
@@ -121,7 +129,7 @@ public interface Platform{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show a file chooser for multiple file types. Only supported on desktop.
|
* Show a file chooser for multiple file types.
|
||||||
* @param cons Selection listener
|
* @param cons Selection listener
|
||||||
* @param extensions File extensions to filter
|
* @param extensions File extensions to filter
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ public enum ContentType{
|
|||||||
loadout_UNUSED,
|
loadout_UNUSED,
|
||||||
typeid_UNUSED,
|
typeid_UNUSED,
|
||||||
error,
|
error,
|
||||||
planet;
|
planet,
|
||||||
|
ammo;
|
||||||
|
|
||||||
public static final ContentType[] all = values();
|
public static final ContentType[] all = values();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ public class EditorTile extends Tile{
|
|||||||
|
|
||||||
Block block = block();
|
Block block = block();
|
||||||
|
|
||||||
if(block.hasEntity()){
|
if(block.hasBuilding()){
|
||||||
build = entityprov.get().init(this, team, false, rotation);
|
build = entityprov.get().init(this, team, false, rotation);
|
||||||
build.cons = new ConsumeModule(build);
|
build.cons = new ConsumeModule(build);
|
||||||
if(block.hasItems) build.items = new ItemModule();
|
if(block.hasItems) build.items = new ItemModule();
|
||||||
|
|||||||
@@ -257,6 +257,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
player.set(world.width() * tilesize/2f, world.height() * tilesize/2f);
|
player.set(world.width() * tilesize/2f, world.height() * tilesize/2f);
|
||||||
player.clearUnit();
|
player.clearUnit();
|
||||||
Groups.unit.clear();
|
Groups.unit.clear();
|
||||||
|
Groups.build.clear();
|
||||||
logic.play();
|
logic.play();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,17 +24,17 @@ public class Lightning{
|
|||||||
|
|
||||||
/** Create a lighting branch at a location. Use Team.derelict to damage everyone. */
|
/** Create a lighting branch at a location. Use Team.derelict to damage everyone. */
|
||||||
public static void create(Team team, Color color, float damage, float x, float y, float targetAngle, int length){
|
public static void create(Team team, Color color, float damage, float x, float y, float targetAngle, int length){
|
||||||
createLightingInternal(null, lastSeed++, team, color, damage, x, y, targetAngle, length);
|
createLightningInternal(null, lastSeed++, team, color, damage, x, y, targetAngle, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Create a lighting branch at a location. Uses bullet parameters. */
|
/** Create a lighting branch at a location. Uses bullet parameters. */
|
||||||
public static void create(Bullet bullet, Color color, float damage, float x, float y, float targetAngle, int length){
|
public static void create(Bullet bullet, Color color, float damage, float x, float y, float targetAngle, int length){
|
||||||
createLightingInternal(bullet, lastSeed++, bullet.team, color, damage, x, y, targetAngle, length);
|
createLightningInternal(bullet, lastSeed++, bullet.team, color, damage, x, y, targetAngle, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO remote method
|
//TODO remote method
|
||||||
//@Remote(called = Loc.server, unreliable = true)
|
//@Remote(called = Loc.server, unreliable = true)
|
||||||
private static void createLightingInternal(Bullet hitter, int seed, Team team, Color color, float damage, float x, float y, float rotation, int length){
|
private static void createLightningInternal(Bullet hitter, int seed, Team team, Color color, float damage, float x, float y, float rotation, int length){
|
||||||
random.setSeed(seed);
|
random.setSeed(seed);
|
||||||
hit.clear();
|
hit.clear();
|
||||||
|
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ public abstract class BulletType extends Content{
|
|||||||
//additional effects
|
//additional effects
|
||||||
|
|
||||||
public float fragCone = 360f;
|
public float fragCone = 360f;
|
||||||
|
public float fragAngle = 0f;
|
||||||
public int fragBullets = 9;
|
public int fragBullets = 9;
|
||||||
public float fragVelocityMin = 0.2f, fragVelocityMax = 1f, fragLifeMin = 1f, fragLifeMax = 1f;
|
public float fragVelocityMin = 0.2f, fragVelocityMax = 1f, fragLifeMin = 1f, fragLifeMax = 1f;
|
||||||
public BulletType fragBullet = null;
|
public BulletType fragBullet = null;
|
||||||
@@ -101,6 +102,8 @@ public abstract class BulletType extends Content{
|
|||||||
public int lightningLength = 5, lightningLengthRand = 0;
|
public int lightningLength = 5, lightningLengthRand = 0;
|
||||||
/** Use a negative value to use default bullet damage. */
|
/** Use a negative value to use default bullet damage. */
|
||||||
public float lightningDamage = -1;
|
public float lightningDamage = -1;
|
||||||
|
public float lightningCone = 360f;
|
||||||
|
public float lightningAngle = 0f;
|
||||||
|
|
||||||
public float weaveScale = 1f;
|
public float weaveScale = 1f;
|
||||||
public float weaveMag = -1f;
|
public float weaveMag = -1f;
|
||||||
@@ -156,7 +159,7 @@ public abstract class BulletType extends Content{
|
|||||||
if(fragBullet != null){
|
if(fragBullet != null){
|
||||||
for(int i = 0; i < fragBullets; i++){
|
for(int i = 0; i < fragBullets; i++){
|
||||||
float len = Mathf.random(1f, 7f);
|
float len = Mathf.random(1f, 7f);
|
||||||
float a = b.rotation() + Mathf.range(fragCone/2);
|
float a = b.rotation() + Mathf.range(fragCone/2) + fragAngle;
|
||||||
fragBullet.create(b, x + Angles.trnsx(a, len), y + Angles.trnsy(a, len), a, Mathf.random(fragVelocityMin, fragVelocityMax), Mathf.random(fragLifeMin, fragLifeMax));
|
fragBullet.create(b, x + Angles.trnsx(a, len), y + Angles.trnsy(a, len), a, Mathf.random(fragVelocityMin, fragVelocityMax), Mathf.random(fragLifeMin, fragLifeMax));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -181,7 +184,7 @@ public abstract class BulletType extends Content{
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(int i = 0; i < lightning; i++){
|
for(int i = 0; i < lightning; i++){
|
||||||
Lightning.create(b, lightningColor, lightningDamage < 0 ? damage : lightningDamage, b.x, b.y, Mathf.random(360f), lightningLength + Mathf.random(lightningLengthRand));
|
Lightning.create(b, lightningColor, lightningDamage < 0 ? damage : lightningDamage, b.x, b.y, b.rotation() + Mathf.range(lightningCone/2) + lightningAngle, lightningLength + Mathf.random(lightningLengthRand));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ public class HealBulletType extends BulletType{
|
|||||||
despawnEffect = Fx.hitLaser;
|
despawnEffect = Fx.hitLaser;
|
||||||
collidesTeam = true;
|
collidesTeam = true;
|
||||||
hittable = false;
|
hittable = false;
|
||||||
|
reflectable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HealBulletType(){
|
public HealBulletType(){
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ abstract class BuilderComp implements Unitc{
|
|||||||
Tile tile = world.tile(current.x, current.y);
|
Tile tile = world.tile(current.x, current.y);
|
||||||
|
|
||||||
if(within(tile, finalPlaceDst)){
|
if(within(tile, finalPlaceDst)){
|
||||||
rotation = Mathf.slerpDelta(rotation, angleTo(tile), 0.4f);
|
lookAt(angleTo(tile));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!(tile.block() instanceof ConstructBlock)){
|
if(!(tile.block() instanceof ConstructBlock)){
|
||||||
|
|||||||