@@ -41,7 +41,7 @@ Server builds are bundled with each released build (in Releases). If you'd rathe
|
|||||||
1. Install the Android SDK [here.](https://developer.android.com/studio#downloads) Make sure you're downloading the "Command line tools only", as Android Studio is not required.
|
1. Install the Android SDK [here.](https://developer.android.com/studio#downloads) Make sure you're downloading the "Command line tools only", as Android Studio is not required.
|
||||||
2. Create a file named `local.properties` inside the Mindustry directory, with its contents looking like this: `sdk.dir=<Path to Android SDK you just downloaded, without these bracket>`. For example, if you're on Windows and installed the tools to C:\\tools, your local.properties would contain `sdk.dir=C:\\tools` (*note the double backslashes are required instead of single ones!*).
|
2. Create a file named `local.properties` inside the Mindustry directory, with its contents looking like this: `sdk.dir=<Path to Android SDK you just downloaded, without these bracket>`. For example, if you're on Windows and installed the tools to C:\\tools, your local.properties would contain `sdk.dir=C:\\tools` (*note the double backslashes are required instead of single ones!*).
|
||||||
3. Run `gradlew android:assembleDebug` (or `./gradlew` if on linux/mac). This will create an unsigned APK in `android/build/outputs/apk`.
|
3. Run `gradlew android:assembleDebug` (or `./gradlew` if on linux/mac). This will create an unsigned APK in `android/build/outputs/apk`.
|
||||||
4. (Optional) To debug the application on a connected phone, do `gradlew android:installDebug android:run`. It is **highly recommended** to use IntelliJ for this instead, however.
|
4. (Optional) To debug the application on a connected phone, do `gradlew android:installDebug android:run`. It is **highly recommended** to use IntelliJ for this instead.
|
||||||
|
|
||||||
##### Troubleshooting
|
##### Troubleshooting
|
||||||
|
|
||||||
|
|||||||
@@ -64,24 +64,6 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
moveTaskToBack(true);
|
moveTaskToBack(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getUUID(){
|
|
||||||
try{
|
|
||||||
String s = Secure.getString(getContext().getContentResolver(), Secure.ANDROID_ID);
|
|
||||||
int len = s.length();
|
|
||||||
byte[] data = new byte[len / 2];
|
|
||||||
for(int i = 0; i < len; i += 2){
|
|
||||||
data[i / 2] = (byte)((Character.digit(s.charAt(i), 16) << 4)
|
|
||||||
+ Character.digit(s.charAt(i + 1), 16));
|
|
||||||
}
|
|
||||||
String result = new String(Base64Coder.encode(data));
|
|
||||||
if(result.equals("AAAAAAAAAOA=")) throw new RuntimeException("Bad UUID.");
|
|
||||||
return result;
|
|
||||||
}catch(Exception e){
|
|
||||||
return super.getUUID();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public rhino.Context getScriptContext(){
|
public rhino.Context getScriptContext(){
|
||||||
return AndroidRhinoContext.enter(getContext().getCacheDir());
|
return AndroidRhinoContext.enter(getContext().getCacheDir());
|
||||||
@@ -126,7 +108,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 -> file.extension().equalsIgnoreCase(extension), open, file -> {
|
||||||
if(!open){
|
if(!open){
|
||||||
cons.get(file.parent().child(file.nameWithoutExtension() + "." + extension));
|
cons.get(file.parent().child(file.nameWithoutExtension() + "." + extension));
|
||||||
}else{
|
}else{
|
||||||
@@ -234,10 +216,10 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
SaveSlot slot = control.saves.importSave(file);
|
SaveSlot slot = control.saves.importSave(file);
|
||||||
ui.load.runLoadSave(slot);
|
ui.load.runLoadSave(slot);
|
||||||
}catch(IOException e){
|
}catch(IOException e){
|
||||||
ui.showException("$save.import.fail", e);
|
ui.showException("@save.import.fail", e);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
ui.showErrorMessage("$save.import.invalid");
|
ui.showErrorMessage("@save.import.invalid");
|
||||||
}
|
}
|
||||||
}else if(map){ //open map
|
}else if(map){ //open map
|
||||||
Fi file = Core.files.local("temp-map." + mapExtension);
|
Fi file = Core.files.local("temp-map." + mapExtension);
|
||||||
|
|||||||
@@ -103,11 +103,11 @@ public class LoadRegionProcessor extends BaseProcessor{
|
|||||||
|
|
||||||
private String parse(String value){
|
private String parse(String value){
|
||||||
value = '"' + value + '"';
|
value = '"' + value + '"';
|
||||||
|
value = value.replace("@size", "\" + ((mindustry.world.Block)content).size + \"");
|
||||||
value = value.replace("@", "\" + content.name + \"");
|
value = value.replace("@", "\" + content.name + \"");
|
||||||
value = value.replace("#1", "\" + INDEX0 + \"");
|
value = value.replace("#1", "\" + INDEX0 + \"");
|
||||||
value = value.replace("#2", "\" + INDEX1 + \"");
|
value = value.replace("#2", "\" + INDEX1 + \"");
|
||||||
value = value.replace("#", "\" + INDEX0 + \"");
|
value = value.replace("#", "\" + INDEX0 + \"");
|
||||||
value = value.replace("$size", "\" + ((mindustry.world.Block)content).size + \"");
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,44 +1,24 @@
|
|||||||
#Maps entity names to IDs. Autogenerated.
|
#Maps entity names to IDs. Autogenerated.
|
||||||
|
|
||||||
alpha=0
|
alpha=0
|
||||||
arkyid=37
|
atrax=1
|
||||||
atrax=38
|
block=2
|
||||||
block=1
|
flare=3
|
||||||
bryde=40
|
|
||||||
cix=2
|
|
||||||
draug=3
|
|
||||||
flare=36
|
|
||||||
horizon=35
|
|
||||||
mace=4
|
mace=4
|
||||||
mega=28
|
mega=5
|
||||||
mindustry.entities.comp.BuildingComp=22
|
mindustry.entities.comp.BuildingComp=6
|
||||||
mindustry.entities.comp.Buildingomp=11
|
mindustry.entities.comp.BulletComp=7
|
||||||
mindustry.entities.comp.BulletComp=24
|
mindustry.entities.comp.DecalComp=8
|
||||||
mindustry.entities.comp.Bulletomp=5
|
mindustry.entities.comp.EffectStateComp=9
|
||||||
mindustry.entities.comp.DecalComp=6
|
mindustry.entities.comp.FireComp=10
|
||||||
mindustry.entities.comp.EffectComp=7
|
mindustry.entities.comp.LaunchCoreComp=11
|
||||||
mindustry.entities.comp.EffectInstanceComp=23
|
mindustry.entities.comp.PlayerComp=12
|
||||||
mindustry.entities.comp.EffectStateComp=25
|
mindustry.entities.comp.PuddleComp=13
|
||||||
mindustry.entities.comp.FireComp=8
|
mindustry.type.Weather.WeatherStateComp=14
|
||||||
mindustry.entities.comp.LaunchCoreComp=21
|
mindustry.world.blocks.campaign.LaunchPad.LaunchPayloadComp=15
|
||||||
mindustry.entities.comp.PlayerComp=9
|
mono=16
|
||||||
mindustry.entities.comp.PuddleComp=10
|
nova=17
|
||||||
mindustry.type.Weather.WeatherComp=12
|
poly=18
|
||||||
mindustry.type.Weather.WeatherStateComp=26
|
pulsar=19
|
||||||
mindustry.world.blocks.campaign.CoreLauncher.LaunchCoreComp=13
|
risso=20
|
||||||
mindustry.world.blocks.campaign.LaunchPad.LaunchPayloadComp=14
|
spiroct=21
|
||||||
mono=29
|
|
||||||
nova=30
|
|
||||||
oculon=15
|
|
||||||
phantom=16
|
|
||||||
poly=31
|
|
||||||
pulsar=34
|
|
||||||
quasar=32
|
|
||||||
risse=33
|
|
||||||
risso=41
|
|
||||||
spirit=27
|
|
||||||
spiroct=39
|
|
||||||
tau=17
|
|
||||||
trident=18
|
|
||||||
vanguard=19
|
|
||||||
wraith=20
|
|
||||||
@@ -1 +1 @@
|
|||||||
{fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
{fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:2,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +1 @@
|
|||||||
{fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
{fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:2,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +1 @@
|
|||||||
{fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
{fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:2,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +1 @@
|
|||||||
{fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
{fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:2,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +1 @@
|
|||||||
{fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>,size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
{fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>,size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>,size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:2,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>,size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +1 @@
|
|||||||
{fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
{fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:2,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +1 @@
|
|||||||
{fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
{fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:2,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +1 @@
|
|||||||
{fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
{fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:2,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +1 @@
|
|||||||
{fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
{fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:2,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +1 @@
|
|||||||
{fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
{fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:2,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:baseRotation,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +1 @@
|
|||||||
{fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
{fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:2,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mineTile,type:mindustry.world.Tile,size:-1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +1 @@
|
|||||||
{fields:[{name:ammo,type:int,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
{fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:1,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{version:2,fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}
|
|
||||||
@@ -324,8 +324,6 @@ project(":tools"){
|
|||||||
implementation arcModule("natives:natives-freetype-desktop")
|
implementation arcModule("natives:natives-freetype-desktop")
|
||||||
implementation arcModule("natives:natives-box2d-desktop")
|
implementation arcModule("natives:natives-box2d-desktop")
|
||||||
implementation arcModule("backends:backend-headless")
|
implementation arcModule("backends:backend-headless")
|
||||||
|
|
||||||
implementation "org.reflections:reflections:0.9.11"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 326 B After Width: | Height: | Size: 302 B |
|
Before Width: | Height: | Size: 434 B After Width: | Height: | Size: 405 B |
|
Before Width: | Height: | Size: 351 B After Width: | Height: | Size: 339 B |
|
Before Width: | Height: | Size: 465 B |
BIN
core/assets-raw/sprites/units/weapons/large-bullet-mount.png
Normal file
|
After Width: | Height: | Size: 724 B |
BIN
core/assets-raw/sprites/units/weapons/large-laser-mount.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 467 B After Width: | Height: | Size: 461 B |
@@ -466,6 +466,7 @@ complete = [lightgray]Complete:
|
|||||||
requirement.wave = Reach Wave {0} in {1}
|
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}
|
||||||
resume = Resume Zone:\n[lightgray]{0}
|
resume = Resume Zone:\n[lightgray]{0}
|
||||||
bestwave = [lightgray]Best Wave: {0}
|
bestwave = [lightgray]Best Wave: {0}
|
||||||
#TODO fix/remove this
|
#TODO fix/remove this
|
||||||
@@ -545,8 +546,8 @@ settings.graphics = Graphics
|
|||||||
settings.cleardata = Clear Game Data...
|
settings.cleardata = Clear Game Data...
|
||||||
settings.clear.confirm = Are you sure you want to clear this data?\nWhat is done cannot be undone!
|
settings.clear.confirm = Are you sure you want to clear this data?\nWhat is done cannot be undone!
|
||||||
settings.clearall.confirm = [scarlet]WARNING![]\nThis will clear all data, including saves, maps, unlocks and keybinds.\nOnce you press 'ok' the game will wipe all data and automatically exit.
|
settings.clearall.confirm = [scarlet]WARNING![]\nThis will clear all data, including saves, maps, unlocks and keybinds.\nOnce you press 'ok' the game will wipe all data and automatically exit.
|
||||||
settings.clearsaves.confirm = Are you sure you want to clear all saves?
|
settings.clearsaves.confirm = Are you sure you want to clear all your saves?
|
||||||
settings.clearsaves = Clear all saves
|
settings.clearsaves = Clear Saves
|
||||||
paused = [accent]< Paused >
|
paused = [accent]< Paused >
|
||||||
clear = Clear
|
clear = Clear
|
||||||
banned = [scarlet]Banned
|
banned = [scarlet]Banned
|
||||||
|
|||||||
@@ -496,29 +496,30 @@ error.io = Błąd sieciowy I/O.
|
|||||||
error.any = Nieznany błąd sieci.
|
error.any = Nieznany błąd sieci.
|
||||||
error.bloom = Nie udało się załadować bloom.\nTwoje urządzenie może nie wspierać tej funkcji.
|
error.bloom = Nie udało się załadować bloom.\nTwoje urządzenie może nie wspierać tej funkcji.
|
||||||
|
|
||||||
sector.groundZero.name = Ground Zero
|
sector.groundZero.name = Punkt Zerowy
|
||||||
sector.craters.name = The Craters
|
sector.craters.name = Kratery
|
||||||
sector.frozenForest.name = Frozen Forest
|
sector.frozenForest.name = Zamrożony Las
|
||||||
sector.ruinousShores.name = Ruinous Shores
|
sector.ruinousShores.name = Zniszczone Przybrzeża
|
||||||
sector.stainedMountains.name = Stained Mountains
|
sector.stainedMountains.name = Zabarwione Góry
|
||||||
sector.desolateRift.name = Desolate Rift
|
sector.desolateRift.name = Ponura Szczelina
|
||||||
sector.nuclearComplex.name = Nuclear Production Complex
|
sector.nuclearComplex.name = Centrum Wyrobu Jądrowego
|
||||||
sector.overgrowth.name = Overgrowth
|
sector.overgrowth.name = Przerośnięty Las
|
||||||
sector.tarFields.name = Tar Fields
|
sector.tarFields.name = Pola Smołowe
|
||||||
sector.saltFlats.name = Salt Flats
|
sector.saltFlats.name = Solne Równiny
|
||||||
sector.fungalPass.name = Fungal Pass
|
sector.fungalPass.name = Grzybowa Przełęcz
|
||||||
|
|
||||||
sector.groundZero.description = The optimal location to begin once more. Low enemy threat. Few resources.\nGather as much lead and copper as possible.\nMove on.
|
sector.groundZero.description = Optymalna lokalizacja, aby rozpocząć jeszcze raz. Niskie zagrożenie. Niewiele zasobów.\nZbierz jak najwięcej miedzi i ołowiu, tyle ile jest możliwe.\nPrzejdź do następnej strefy jak najszybciej.
|
||||||
sector.frozenForest.description = Even here, closer to mountains, the spores have spread. The frigid temperatures cannot contain them forever.\n\nBegin the venture into power. Build combustion generators. Learn to use menders.
|
sector.frozenForest.description = Nawet tutaj, bliżej gór, zarodniki rozprzestrzeniły się. Niskie temperatury nie mogą ich zatrzymać na zawsze.\n\nRozpocznij przedsięwzięcie od władzy. Buduj generatory spalinowe. Naucz się korzystać z naprawiaczy.
|
||||||
sector.saltFlats.description = On the outskirts of the desert lie the Salt Flats. Few resources can be found in this location.\n\nThe enemy has erected a resource storage complex here. Eradicate their core. Leave nothing standing.
|
sector.desertWastes.description = Te pustkowia są rozległe, nieprzewidywalne, i znajdują się na nich opuszczone struktury.\nWęgiel jest obecny w tym regionie. Użyj go do produkcji energii, lub do stworzenia grafitu.\n\n[lightgray]Miejsce lądowania nie jest pewne.
|
||||||
sector.craters.description = Water has accumulated in this crater, relic of the old wars. Reclaim the area. Collect sand. Smelt metaglass. Pump water to cool turrets and drills.
|
sector.saltFlats.description = Na obrzeżach pustyni spoczywają Solne Równiny. Można tu znaleźć niewiele surowców.\n\nWrogowie zbudowali tu bazę składującą surowce. Zniszcz ich rdżeń. Zniszcz wszystko co stanie ci na drodze.
|
||||||
sector.ruinousShores.description = Past the wastes, is the shoreline. Once, this location housed a coastal defense array. Not much of it remains. Only the most basic defense structures have remained unscathed, everything else reduced to scrap.\nContinue the expansion outwards. Rediscover the technology.
|
sector.craters.description = W tym kraterze zebrała się woda. Pozostałość dawnych wojen. Odzyskaj ten teren. Wykop piasek. Wytop metaszkło. Pompuj wodę do działek obronnych i wierteł by je schłodzić
|
||||||
sector.stainedMountains.description = Further inland lie the mountains, yet untainted by spores.\nExtract the abundant titanium in this area. Learn how to use it.\n\nThe enemy presence is greater here. Do not give them time to send their strongest units.
|
sector.ruinousShores.description = Za pustkowiami ciągnie się linia brzegowa. Kiedyś znajdowała się tu przybrzeżna linia obronna. Niewiele z niej zostało. Ostały się tylko podstawowe struktury obronne, z reszty został tylko złom.\nKontynuuj eksploracje. Odkryj pozostawioną tu technologię.
|
||||||
sector.overgrowth.description = This area is overgrown, closer to the source of the spores.\nThe enemy has established an outpost here. Build Titan units. Destroy it. Reclaim that which was lost.
|
sector.stainedMountains.description = W głębi lądu leżą góry, jeszcze nieskażone przez zarodniki.\nWydobądź obfity tytan w tym obszarze. Dowiedz się, jak z niego korzystać.\n\nObecność wroga jest tutaj większa. Nie daj im czasu na wysłanie swoich najsilniejszych jednostek.
|
||||||
sector.tarFields.description = The outskirts of an oil production zone, between the mountains and desert. One of the few areas with usable tar reserves.\nAlthough abandoned, this area has some dangerous enemy forces nearby. Do not underestimate them.\n\n[lightgray]Research oil processing technology if possible.
|
sector.overgrowth.description = Obszar ten jest zarośnięty, bliżej źródła zarodników.\nWróg założył tu placówkę. Zbuduj jednostki Nóż. Zniszcz to. Odzyskaj to, co nam odebrano.
|
||||||
sector.desolateRift.description = An extremely dangerous zone. Plentiful resources, but little space. High risk of destruction. Leave as soon as possible. Do not be fooled by the long spacing between enemy attacks.
|
sector.tarFields.description = Obrzeża strefy produkcji ropy, między górami a pustynią. Jeden z niewielu obszarów z rezerwami użytecznej smoły.\nMimo że ta strefa jest opuszczona, w pobliżu znajdują się niebezpieczne siły wroga. Nie lekceważ ich.\n\n[lightgray]Jeśli to możliwe, zbadaj technologię przetwarzania oleju.
|
||||||
sector.nuclearComplex.description = A former facility for the production and processing of thorium, reduced to ruins.\n[lightgray]Research the thorium and its many uses.\n\nThe enemy is present here in great numbers, constantly scouting for attackers.
|
sector.desolateRift.description = Strefa wyjątkowo niebezpieczna. Obfita w zasoby ale mało miejsca. Wysokie ryzyko zniszczenia. Opuść tę strefe jak najszybciej. Nie daj się zwieść długiemu odstępowi między atakami wroga.
|
||||||
sector.fungalPass.description = A transition area between high mountains and lower, spore-ridden lands. A small enemy reconnaissance base is located here.\nDestroy it.\nUse Dagger and Crawler units. Take out the two cores.
|
sector.nuclearComplex.description = Dawny zakład produkcji i przetwarzania toru, zredukowny do ruin.\n[lightgray]Zbadaj tor i jego zastosowania.\n\nWróg jest tutaj obecny w dużej ilości, nieustannie poszukuje napastników.
|
||||||
|
sector.fungalPass.description = Przejściowy obszar pomiędzy wysokimi górami a nisko znajdującymi się, ogarniętymi przez zarodniki równinami. Znajduje się tu mała postawiona przez wrogów baza zwiadowcza.\nZniszcz ją.\nUżyj jednostek Nóż i Pełzak. Zniszcz oba rdzenie.
|
||||||
|
|
||||||
settings.language = Język
|
settings.language = Język
|
||||||
settings.data = Dane Gry
|
settings.data = Dane Gry
|
||||||
@@ -856,11 +857,11 @@ unit.crawler.name = Pełzak
|
|||||||
unit.atrax.name = Atrax
|
unit.atrax.name = Atrax
|
||||||
unit.spiroct.name = Spiroct
|
unit.spiroct.name = Spiroct
|
||||||
unit.arkyid.name = Arkyid
|
unit.arkyid.name = Arkyid
|
||||||
unit.flare.name = Flare
|
unit.flare.name = Błysk
|
||||||
unit.horizon.name = Horizon
|
unit.horizon.name = Horyzont
|
||||||
unit.zenith.name = Zenith
|
unit.zenith.name = Zenit
|
||||||
unit.antumbra.name = Antumbra
|
unit.antumbra.name = Antumbra
|
||||||
unit.eclipse.name = Eclipse
|
unit.eclipse.name = Zaćmienie
|
||||||
unit.mono.name = Mono
|
unit.mono.name = Mono
|
||||||
unit.poly.name = Poly
|
unit.poly.name = Poly
|
||||||
unit.mega.name = Mega
|
unit.mega.name = Mega
|
||||||
@@ -1045,7 +1046,7 @@ block.surge-wall-large.name = Duża Ściana Elektrum
|
|||||||
block.cyclone.name = Cyklon
|
block.cyclone.name = Cyklon
|
||||||
block.fuse.name = Lont
|
block.fuse.name = Lont
|
||||||
block.shock-mine.name = Mina
|
block.shock-mine.name = Mina
|
||||||
block.overdrive-projector.name = Projektor Przyśpieszający
|
block.overdrive-projector.name = Projektor Pola Overdrive
|
||||||
block.force-projector.name = Projektor Pola Siłowego
|
block.force-projector.name = Projektor Pola Siłowego
|
||||||
block.arc.name = Piorun
|
block.arc.name = Piorun
|
||||||
block.rtg-generator.name = Generator RTG
|
block.rtg-generator.name = Generator RTG
|
||||||
@@ -1055,18 +1056,18 @@ block.container.name = Kontener
|
|||||||
block.launch-pad.name = Wyrzutnia
|
block.launch-pad.name = Wyrzutnia
|
||||||
block.launch-pad-large.name = Duża Wyrzutnia
|
block.launch-pad-large.name = Duża Wyrzutnia
|
||||||
block.segment.name = Segment
|
block.segment.name = Segment
|
||||||
block.ground-factory.name = Ground Factory
|
block.ground-factory.name = Fabryka Naziemna
|
||||||
block.air-factory.name = Air Factory
|
block.air-factory.name = Fabryka Powietrzna
|
||||||
block.naval-factory.name = Naval Factory
|
block.naval-factory.name = Fabryka Morska
|
||||||
block.additive-reconstructor.name = Additive Reconstructor
|
block.additive-reconstructor.name = Rekonstruktor Addytywny
|
||||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
block.multiplicative-reconstructor.name = Rekonstruktor Multiplikatywny
|
||||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
block.exponential-reconstructor.name = Rekonstruktor Wykładniczy
|
||||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||||
block.mass-conveyor.name = Mass Conveyor
|
block.mass-conveyor.name = Przenośnik Masowy
|
||||||
block.payload-router.name = Payload Router
|
block.payload-router.name = Rozdzielacz Ładunku
|
||||||
block.disassembler.name = Disassembler
|
block.disassembler.name = Dezasembler
|
||||||
block.silicon-crucible.name = Silicon Crucible
|
block.silicon-crucible.name = Silicon Crucible
|
||||||
block.large-overdrive-projector.name = Large Overdrive Projector
|
block.overdrive-dome.name = Kopuła Pola Overdrive
|
||||||
team.blue.name = niebieski
|
team.blue.name = niebieski
|
||||||
team.crux.name = czerwony
|
team.crux.name = czerwony
|
||||||
team.sharded.name = żółty
|
team.sharded.name = żółty
|
||||||
@@ -1162,7 +1163,7 @@ block.force-projector.description = Wytwarza pole siłowe w kształcie sześciok
|
|||||||
block.shock-mine.description = Zadaje obrażenia jednostkom wroga którzy na nią wejdą. Ledwo widoczne dla wrogów.
|
block.shock-mine.description = Zadaje obrażenia jednostkom wroga którzy na nią wejdą. Ledwo widoczne dla wrogów.
|
||||||
block.conveyor.description = Podstawowy blok transportowy dla przedmiotów. Automatycznie przesyła przedmioty naprzód do działek oraz maszyn. Można obrócić.
|
block.conveyor.description = Podstawowy blok transportowy dla przedmiotów. Automatycznie przesyła przedmioty naprzód do działek oraz maszyn. Można obrócić.
|
||||||
block.titanium-conveyor.description = Zaawansowany blok transportowy dla przedmiotów. Przesyła przedmioty szybciej od zwykłego przenośnika.
|
block.titanium-conveyor.description = Zaawansowany blok transportowy dla przedmiotów. Przesyła przedmioty szybciej od zwykłego przenośnika.
|
||||||
block.plastanium-conveyor.description = Moves items in batches.\nAccepts items at the back, and unloads them in three directions at the front.
|
block.plastanium-conveyor.description = Przenosi przedmity partiami. Przyjmuje przedmioty z tyłu i rozładowuje je w trzech kierunkach z przodu. Wymaga wielu punktów ładujących i rozładowujących w celu osiągnięcia maksymalnej przepustowości.
|
||||||
block.junction.description = Używany jako most dla dwóch krzyżujących się przenośników. Przydatne w sytuacjach kiedy dwa różne przenośniki transportują różne surowce do różnych miejsc.
|
block.junction.description = Używany jako most dla dwóch krzyżujących się przenośników. Przydatne w sytuacjach kiedy dwa różne przenośniki transportują różne surowce do różnych miejsc.
|
||||||
block.bridge-conveyor.description = Zaawansowany blok transportujący. Pozwala na przenoszenie przedmiotów nawet do 3 bloków na każdym terenie, przez każdy budynek.
|
block.bridge-conveyor.description = Zaawansowany blok transportujący. Pozwala na przenoszenie przedmiotów nawet do 3 bloków na każdym terenie, przez każdy budynek.
|
||||||
block.phase-conveyor.description = Zaawansowany blok transportowy dla przedmiotów. Używa energii do teleportacji przedmiotów do połączonego transportera fazowego na spore odległości.
|
block.phase-conveyor.description = Zaawansowany blok transportowy dla przedmiotów. Używa energii do teleportacji przedmiotów do połączonego transportera fazowego na spore odległości.
|
||||||
|
|||||||
BIN
core/assets/planets/serpulo.dat
Normal file
@@ -30,11 +30,73 @@ const extend = function(classType, params){
|
|||||||
const newEffect = (lifetime, renderer) => new Effects.Effect(lifetime, new Effects.EffectRenderer({render: renderer}))
|
const newEffect = (lifetime, renderer) => new Effects.Effect(lifetime, new Effects.EffectRenderer({render: renderer}))
|
||||||
Call = Packages.mindustry.gen.Call
|
Call = Packages.mindustry.gen.Call
|
||||||
|
|
||||||
importPackage(Packages.arc.graphics.g2d)
|
importPackage(Packages.mindustry.maps)
|
||||||
|
importPackage(Packages.mindustry.world.blocks.production)
|
||||||
|
importPackage(Packages.mindustry.graphics.g3d)
|
||||||
|
importPackage(Packages.mindustry.ai.types)
|
||||||
|
importPackage(Packages.mindustry.world.draw)
|
||||||
|
importPackage(Packages.mindustry.game)
|
||||||
|
importPackage(Packages.mindustry.logic)
|
||||||
|
importPackage(Packages.mindustry.entities.comp)
|
||||||
|
importPackage(Packages.mindustry.world.blocks.sandbox)
|
||||||
|
importPackage(Packages.mindustry.world.consumers)
|
||||||
|
importPackage(Packages.mindustry.type)
|
||||||
|
importPackage(Packages.mindustry.maps.filters)
|
||||||
|
importPackage(Packages.arc.struct)
|
||||||
|
importPackage(Packages.mindustry.world.meta.values)
|
||||||
|
importPackage(Packages.mindustry.world.blocks.distribution)
|
||||||
|
importPackage(Packages.mindustry.ui.dialogs)
|
||||||
importPackage(Packages.mindustry.gen)
|
importPackage(Packages.mindustry.gen)
|
||||||
|
importPackage(Packages.mindustry.graphics)
|
||||||
|
importPackage(Packages.arc.scene.ui)
|
||||||
|
importPackage(Packages.mindustry.ai)
|
||||||
|
importPackage(Packages.mindustry.content)
|
||||||
|
importPackage(Packages.mindustry.ctype)
|
||||||
|
importPackage(Packages.arc.scene.event)
|
||||||
|
importPackage(Packages.mindustry.entities.bullet)
|
||||||
|
importPackage(Packages.arc.math.geom)
|
||||||
|
importPackage(Packages.mindustry.ui)
|
||||||
|
importPackage(Packages.mindustry.ai.formations)
|
||||||
|
importPackage(Packages.arc.func)
|
||||||
|
importPackage(Packages.mindustry.ui.fragments)
|
||||||
|
importPackage(Packages.mindustry.world.blocks.units)
|
||||||
|
importPackage(Packages.mindustry.world.modules)
|
||||||
|
importPackage(Packages.mindustry.world.blocks.power)
|
||||||
|
importPackage(Packages.arc.scene.utils)
|
||||||
|
importPackage(Packages.mindustry.entities)
|
||||||
|
importPackage(Packages.mindustry.audio)
|
||||||
importPackage(Packages.arc.math)
|
importPackage(Packages.arc.math)
|
||||||
importPackage(Packages.arc.graphics)
|
importPackage(Packages.arc.scene.ui.layout)
|
||||||
|
importPackage(Packages.arc.scene.actions)
|
||||||
|
importPackage(Packages.arc.scene.style)
|
||||||
|
importPackage(Packages.mindustry.world.blocks.defense.turrets)
|
||||||
|
importPackage(Packages.mindustry.core)
|
||||||
|
importPackage(Packages.arc.scene)
|
||||||
|
importPackage(Packages.mindustry.entities.units)
|
||||||
|
importPackage(Packages.mindustry.world.blocks.defense)
|
||||||
|
importPackage(Packages.mindustry.world)
|
||||||
|
importPackage(Packages.mindustry.world.blocks)
|
||||||
|
importPackage(Packages.mindustry.editor)
|
||||||
|
importPackage(Packages.mindustry.world.blocks.storage)
|
||||||
|
importPackage(Packages.mindustry.world.blocks.environment)
|
||||||
|
importPackage(Packages.mindustry.async)
|
||||||
|
importPackage(Packages.mindustry.maps.planet)
|
||||||
|
importPackage(Packages.mindustry.world.blocks.liquid)
|
||||||
|
importPackage(Packages.mindustry.ai.formations.patterns)
|
||||||
|
importPackage(Packages.mindustry.ui.layout)
|
||||||
|
importPackage(Packages.mindustry.input)
|
||||||
|
importPackage(Packages.mindustry.world.blocks.legacy)
|
||||||
|
importPackage(Packages.mindustry.entities.abilities)
|
||||||
|
importPackage(Packages.mindustry)
|
||||||
|
importPackage(Packages.mindustry.world.meta)
|
||||||
|
importPackage(Packages.mindustry.world.blocks.experimental)
|
||||||
|
importPackage(Packages.mindustry.world.blocks.payloads)
|
||||||
|
importPackage(Packages.mindustry.maps.generators)
|
||||||
|
importPackage(Packages.arc.graphics.g2d)
|
||||||
importPackage(Packages.arc.util)
|
importPackage(Packages.arc.util)
|
||||||
|
importPackage(Packages.mindustry.world.blocks.campaign)
|
||||||
|
importPackage(Packages.arc.graphics)
|
||||||
|
importPackage(Packages.mindustry.world.producers)
|
||||||
importPackage(Packages.arc)
|
importPackage(Packages.arc)
|
||||||
const PlayerIpUnbanEvent = Packages.mindustry.game.EventType.PlayerIpUnbanEvent
|
const PlayerIpUnbanEvent = Packages.mindustry.game.EventType.PlayerIpUnbanEvent
|
||||||
const PlayerIpBanEvent = Packages.mindustry.game.EventType.PlayerIpBanEvent
|
const PlayerIpBanEvent = Packages.mindustry.game.EventType.PlayerIpBanEvent
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 777 B After Width: | Height: | Size: 777 B |
|
Before Width: | Height: | Size: 608 KiB After Width: | Height: | Size: 609 KiB |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 184 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
|
Before Width: | Height: | Size: 188 KiB After Width: | Height: | Size: 184 KiB |
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
@@ -1,54 +1,45 @@
|
|||||||
package mindustry.ai.types;
|
package mindustry.ai.types;
|
||||||
|
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.math.geom.*;
|
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import mindustry.entities.*;
|
|
||||||
import mindustry.entities.units.*;
|
import mindustry.entities.units.*;
|
||||||
|
import mindustry.gen.*;
|
||||||
import mindustry.world.meta.*;
|
import mindustry.world.meta.*;
|
||||||
|
|
||||||
public class FlyingAI extends AIController{
|
public class FlyingAI extends AIController{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateUnit(){
|
public void updateMovement(){
|
||||||
if(unit.moving()){
|
if(unit.moving()){
|
||||||
unit.rotation(unit.vel().angle());
|
unit.lookAt(unit.vel.angle());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(unit.isFlying()){
|
if(unit.isFlying()){
|
||||||
unit.wobble();
|
unit.wobble();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Units.invalidateTarget(target, unit.team(), unit.x(), unit.y())){
|
|
||||||
target = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(retarget()){
|
|
||||||
targetClosest();
|
|
||||||
|
|
||||||
if(target == null) targetClosestEnemyFlag(BlockFlag.producer);
|
|
||||||
if(target == null) targetClosestEnemyFlag(BlockFlag.turret);
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean shoot = false;
|
|
||||||
|
|
||||||
if(target != null && unit.hasWeapons()){
|
if(target != null && unit.hasWeapons()){
|
||||||
if(unit.type().weapons.first().rotate){
|
if(unit.type().weapons.first().rotate){
|
||||||
moveTo(unit.range() * 0.85f);
|
moveTo(unit.range() * 0.8f);
|
||||||
unit.lookAt(target);
|
unit.lookAt(target);
|
||||||
}else{
|
}else{
|
||||||
attack(80f);
|
attack(80f);
|
||||||
}
|
}
|
||||||
|
|
||||||
shoot = unit.inRange(target);
|
|
||||||
|
|
||||||
if(shoot && unit.type().hasWeapons()){
|
|
||||||
Vec2 to = Predict.intercept(unit, target, unit.type().weapons.first().bullet.speed);
|
|
||||||
unit.aim(to);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
unit.controlWeapons(shoot, shoot);
|
@Override
|
||||||
|
protected Teamc findTarget(float x, float y, float range, boolean air, boolean ground){
|
||||||
|
Teamc result = target(x, y, range, air, ground);
|
||||||
|
if(result != null) return result;
|
||||||
|
|
||||||
|
if(ground) result = targetFlag(x, y, BlockFlag.producer, true);
|
||||||
|
if(result != null) return result;
|
||||||
|
|
||||||
|
if(ground) result = targetFlag(x, y, BlockFlag.turret, true);
|
||||||
|
if(result != null) return result;
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO clean up
|
//TODO clean up
|
||||||
|
|||||||
@@ -12,15 +12,7 @@ import static mindustry.Vars.pathfinder;
|
|||||||
public class GroundAI extends AIController{
|
public class GroundAI extends AIController{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateUnit(){
|
public void updateMovement(){
|
||||||
|
|
||||||
if(Units.invalidateTarget(target, unit.team(), unit.x(), unit.y(), Float.MAX_VALUE)){
|
|
||||||
target = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(retarget()){
|
|
||||||
targetClosest();
|
|
||||||
}
|
|
||||||
|
|
||||||
Building core = unit.closestEnemyCore();
|
Building core = unit.closestEnemyCore();
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class SuicideAI extends GroundAI{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(retarget()){
|
if(retarget()){
|
||||||
targetClosest();
|
target = target(unit.x, unit.y, unit.range(), unit.type().targetAir, unit.type().targetGround);
|
||||||
}
|
}
|
||||||
|
|
||||||
Building core = unit.closestEnemyCore();
|
Building core = unit.closestEnemyCore();
|
||||||
|
|||||||
@@ -246,11 +246,13 @@ public class Blocks implements ContentList{
|
|||||||
sand = new Floor("sand"){{
|
sand = new Floor("sand"){{
|
||||||
itemDrop = Items.sand;
|
itemDrop = Items.sand;
|
||||||
playerUnmineable = true;
|
playerUnmineable = true;
|
||||||
|
attributes.set(Attribute.oil, 0.7f);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
darksand = new Floor("darksand"){{
|
darksand = new Floor("darksand"){{
|
||||||
itemDrop = Items.sand;
|
itemDrop = Items.sand;
|
||||||
playerUnmineable = true;
|
playerUnmineable = true;
|
||||||
|
attributes.set(Attribute.oil, 1.5f);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
((ShallowLiquid)darksandTaintedWater).set(Blocks.taintedWater, Blocks.darksand);
|
((ShallowLiquid)darksandTaintedWater).set(Blocks.taintedWater, Blocks.darksand);
|
||||||
@@ -267,7 +269,8 @@ public class Blocks implements ContentList{
|
|||||||
|
|
||||||
salt = new Floor("salt"){{
|
salt = new Floor("salt"){{
|
||||||
variants = 0;
|
variants = 0;
|
||||||
attributes.set(Attribute.water, -0.2f);
|
attributes.set(Attribute.water, -0.25f);
|
||||||
|
attributes.set(Attribute.oil, 0.3f);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
snow = new Floor("snow"){{
|
snow = new Floor("snow"){{
|
||||||
@@ -355,7 +358,7 @@ public class Blocks implements ContentList{
|
|||||||
|
|
||||||
shale = new Floor("shale"){{
|
shale = new Floor("shale"){{
|
||||||
variants = 3;
|
variants = 3;
|
||||||
attributes.set(Attribute.oil, 0.15f);
|
attributes.set(Attribute.oil, 1f);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
shaleRocks = new StaticWall("shalerocks"){{
|
shaleRocks = new StaticWall("shalerocks"){{
|
||||||
@@ -1270,6 +1273,8 @@ public class Blocks implements ContentList{
|
|||||||
size = 3;
|
size = 3;
|
||||||
liquidCapacity = 30f;
|
liquidCapacity = 30f;
|
||||||
attribute = Attribute.oil;
|
attribute = Attribute.oil;
|
||||||
|
baseEfficiency = 0f;
|
||||||
|
itemUseTime = 60f;
|
||||||
|
|
||||||
consumes.item(Items.sand);
|
consumes.item(Items.sand);
|
||||||
consumes.power(3f);
|
consumes.power(3f);
|
||||||
@@ -1460,6 +1465,7 @@ public class Blocks implements ContentList{
|
|||||||
hitSize = 4;
|
hitSize = 4;
|
||||||
lifetime = 16f;
|
lifetime = 16f;
|
||||||
drawSize = 400f;
|
drawSize = 400f;
|
||||||
|
collidesAir = false;
|
||||||
}};
|
}};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ public class Bullets implements ContentList{
|
|||||||
explodeRange = 20f;
|
explodeRange = 20f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
missileExplosive = new MissileBulletType(2.7f, 10, "missile"){{
|
missileExplosive = new MissileBulletType(2.7f, 10){{
|
||||||
width = 8f;
|
width = 8f;
|
||||||
height = 8f;
|
height = 8f;
|
||||||
shrinkY = 0f;
|
shrinkY = 0f;
|
||||||
@@ -247,7 +247,7 @@ public class Bullets implements ContentList{
|
|||||||
splashDamageRadius = 30f;
|
splashDamageRadius = 30f;
|
||||||
splashDamage = 30f;
|
splashDamage = 30f;
|
||||||
ammoMultiplier = 4f;
|
ammoMultiplier = 4f;
|
||||||
lifetime = 150f;
|
lifetime = 100f;
|
||||||
hitEffect = Fx.blastExplosion;
|
hitEffect = Fx.blastExplosion;
|
||||||
despawnEffect = Fx.blastExplosion;
|
despawnEffect = Fx.blastExplosion;
|
||||||
|
|
||||||
@@ -255,7 +255,7 @@ public class Bullets implements ContentList{
|
|||||||
statusDuration = 60f;
|
statusDuration = 60f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
missileIncendiary = new MissileBulletType(2.9f, 12, "missile"){{
|
missileIncendiary = new MissileBulletType(2.9f, 12){{
|
||||||
frontColor = Pal.lightishOrange;
|
frontColor = Pal.lightishOrange;
|
||||||
backColor = Pal.lightOrange;
|
backColor = Pal.lightOrange;
|
||||||
width = 7f;
|
width = 7f;
|
||||||
@@ -265,26 +265,26 @@ public class Bullets implements ContentList{
|
|||||||
homingPower = 0.08f;
|
homingPower = 0.08f;
|
||||||
splashDamageRadius = 20f;
|
splashDamageRadius = 20f;
|
||||||
splashDamage = 20f;
|
splashDamage = 20f;
|
||||||
lifetime = 160f;
|
lifetime = 100f;
|
||||||
hitEffect = Fx.blastExplosion;
|
hitEffect = Fx.blastExplosion;
|
||||||
status = StatusEffects.burning;
|
status = StatusEffects.burning;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
missileSurge = new MissileBulletType(4.4f, 20, "bullet"){{
|
missileSurge = new MissileBulletType(4.4f, 20){{
|
||||||
width = 8f;
|
width = 8f;
|
||||||
height = 8f;
|
height = 8f;
|
||||||
shrinkY = 0f;
|
shrinkY = 0f;
|
||||||
drag = -0.01f;
|
drag = -0.01f;
|
||||||
splashDamageRadius = 28f;
|
splashDamageRadius = 28f;
|
||||||
splashDamage = 40f;
|
splashDamage = 40f;
|
||||||
lifetime = 150f;
|
lifetime = 100f;
|
||||||
hitEffect = Fx.blastExplosion;
|
hitEffect = Fx.blastExplosion;
|
||||||
despawnEffect = Fx.blastExplosion;
|
despawnEffect = Fx.blastExplosion;
|
||||||
lightning = 2;
|
lightning = 2;
|
||||||
lightningLength = 14;
|
lightningLength = 14;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
standardCopper = new BasicBulletType(2.5f, 9, "bullet"){{
|
standardCopper = new BasicBulletType(2.5f, 9){{
|
||||||
width = 7f;
|
width = 7f;
|
||||||
height = 9f;
|
height = 9f;
|
||||||
lifetime = 60f;
|
lifetime = 60f;
|
||||||
@@ -293,7 +293,7 @@ public class Bullets implements ContentList{
|
|||||||
ammoMultiplier = 2;
|
ammoMultiplier = 2;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
standardDense = new BasicBulletType(3.5f, 18, "bullet"){{
|
standardDense = new BasicBulletType(3.5f, 18){{
|
||||||
width = 9f;
|
width = 9f;
|
||||||
height = 12f;
|
height = 12f;
|
||||||
reloadMultiplier = 0.6f;
|
reloadMultiplier = 0.6f;
|
||||||
@@ -430,34 +430,25 @@ public class Bullets implements ContentList{
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
basicFlame = new BulletType(3f, 15f){
|
basicFlame = new BulletType(3.35f, 15f){{
|
||||||
{
|
ammoMultiplier = 3f;
|
||||||
ammoMultiplier = 3f;
|
hitSize = 7f;
|
||||||
hitSize = 7f;
|
lifetime = 18f;
|
||||||
lifetime = 42f;
|
pierce = true;
|
||||||
pierce = true;
|
statusDuration = 60f * 4;
|
||||||
drag = 0.05f;
|
shootEffect = Fx.shootSmallFlame;
|
||||||
statusDuration = 60f * 4;
|
hitEffect = Fx.hitFlameSmall;
|
||||||
shootEffect = Fx.shootSmallFlame;
|
despawnEffect = Fx.none;
|
||||||
hitEffect = Fx.hitFlameSmall;
|
status = StatusEffects.burning;
|
||||||
despawnEffect = Fx.none;
|
keepVelocity = false;
|
||||||
status = StatusEffects.burning;
|
hittable = false;
|
||||||
keepVelocity = false;
|
}};
|
||||||
hittable = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
pyraFlame = new BulletType(3.35f, 22f){{
|
||||||
public float range(){
|
|
||||||
return 50f;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
pyraFlame = new BulletType(3.3f, 22f){{
|
|
||||||
ammoMultiplier = 4f;
|
ammoMultiplier = 4f;
|
||||||
hitSize = 7f;
|
hitSize = 7f;
|
||||||
lifetime = 42f;
|
lifetime = 18f;
|
||||||
pierce = true;
|
pierce = true;
|
||||||
drag = 0.05f;
|
|
||||||
statusDuration = 60f * 6;
|
statusDuration = 60f * 6;
|
||||||
shootEffect = Fx.shootPyraFlame;
|
shootEffect = Fx.shootPyraFlame;
|
||||||
hitEffect = Fx.hitFlameSmall;
|
hitEffect = Fx.hitFlameSmall;
|
||||||
|
|||||||
@@ -63,15 +63,15 @@ public class Fx{
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
unitDespawn = new Effect(100f, e -> {
|
unitDespawn = new Effect(100f, e -> {
|
||||||
if(!(e.data instanceof Unitc)) return;
|
if(!(e.data instanceof Unit) || e.<Unit>data().type() == null) return;
|
||||||
|
|
||||||
Unitc select = (Unitc)e.data;
|
Unit select = e.data();
|
||||||
float scl = e.fout(Interp.pow2Out);
|
float scl = e.fout(Interp.pow2Out);
|
||||||
float p = Draw.scl;
|
float p = Draw.scl;
|
||||||
Draw.scl *= scl;
|
Draw.scl *= scl;
|
||||||
|
|
||||||
mixcol(Pal.accent, 1f);
|
mixcol(Pal.accent, 1f);
|
||||||
rect(select.type().icon(Cicon.full), select.x(), select.y(), select.rotation() - 90f);
|
rect(select.type().icon(Cicon.full), select.x, select.y, select.rotation - 90f);
|
||||||
reset();
|
reset();
|
||||||
|
|
||||||
Draw.scl = p;
|
Draw.scl = p;
|
||||||
@@ -96,7 +96,7 @@ public class Fx{
|
|||||||
Fill.square(x, y, 1f * size, 45f);
|
Fill.square(x, y, 1f * size, 45f);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
itemTransfer = new Effect(10f, e -> {
|
itemTransfer = new Effect(12f, e -> {
|
||||||
if(!(e.data instanceof Position)) return;
|
if(!(e.data instanceof Position)) return;
|
||||||
Position to = e.data();
|
Position to = e.data();
|
||||||
Tmp.v1.set(e.x, e.y).interpolate(Tmp.v2.set(to), e.fin(), Interp.pow3)
|
Tmp.v1.set(e.x, e.y).interpolate(Tmp.v2.set(to), e.fin(), Interp.pow3)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import mindustry.type.*;
|
|||||||
public class Planets implements ContentList{
|
public class Planets implements ContentList{
|
||||||
public static Planet
|
public static Planet
|
||||||
sun,
|
sun,
|
||||||
starter; //TODO rename
|
serpulo;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void load(){
|
public void load(){
|
||||||
@@ -31,9 +31,8 @@ public class Planets implements ContentList{
|
|||||||
);
|
);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
//TODO rename
|
serpulo = new Planet("serpulo", sun, 3, 1){{
|
||||||
starter = new Planet("TODO", sun, 3, 1){{
|
generator = new SerpuloPlanetGenerator();
|
||||||
generator = new TODOPlanetGenerator();
|
|
||||||
meshLoader = () -> new HexMesh(this, 6);
|
meshLoader = () -> new HexMesh(this, 6);
|
||||||
atmosphereColor = Color.valueOf("3c1b8f");
|
atmosphereColor = Color.valueOf("3c1b8f");
|
||||||
startSector = 15;
|
startSector = 15;
|
||||||
|
|||||||
@@ -1,162 +1,64 @@
|
|||||||
package mindustry.content;
|
package mindustry.content;
|
||||||
|
|
||||||
import mindustry.ctype.*;
|
import mindustry.ctype.*;
|
||||||
import mindustry.game.Objectives.*;
|
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
|
|
||||||
import static arc.struct.Seq.*;
|
|
||||||
import static mindustry.content.Planets.*;
|
import static mindustry.content.Planets.*;
|
||||||
|
|
||||||
public class SectorPresets implements ContentList{
|
public class SectorPresets implements ContentList{
|
||||||
public static SectorPreset
|
public static SectorPreset
|
||||||
groundZero,
|
groundZero,
|
||||||
craters, frozenForest, ruinousShores, stainedMountains, tarFields, fungalPass,
|
craters, frozenForest, ruinousShores, stainedMountains, tarFields, fungalPass,
|
||||||
saltFlats, overgrowth, impact0078, crags,
|
saltFlats, overgrowth,
|
||||||
desolateRift, nuclearComplex;
|
desolateRift, nuclearComplex;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void load(){
|
public void load(){
|
||||||
|
|
||||||
groundZero = new SectorPreset("groundZero", starter, 15){{
|
groundZero = new SectorPreset("groundZero", serpulo, 15){{
|
||||||
alwaysUnlocked = true;
|
alwaysUnlocked = true;
|
||||||
conditionWave = 5;
|
captureWave = 10;
|
||||||
launchPeriod = 5;
|
|
||||||
rules = r -> {
|
|
||||||
r.winWave = 20;
|
|
||||||
};
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
saltFlats = new SectorPreset("saltFlats", starter, 101){{
|
saltFlats = new SectorPreset("saltFlats", serpulo, 101){{
|
||||||
conditionWave = 10;
|
|
||||||
launchPeriod = 5;
|
|
||||||
requirements = with(
|
|
||||||
new SectorWave(groundZero, 60),
|
|
||||||
//new Unlock(Blocks.daggerFactory),
|
|
||||||
//new Unlock(Blocks.draugFactory),
|
|
||||||
new Research(Blocks.door),
|
|
||||||
new Research(Blocks.waterExtractor)
|
|
||||||
);
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
frozenForest = new SectorPreset("frozenForest", starter, 86){{
|
frozenForest = new SectorPreset("frozenForest", serpulo, 86){{
|
||||||
conditionWave = 10;
|
captureWave = 40;
|
||||||
requirements = with(
|
|
||||||
new SectorWave(groundZero, 10),
|
|
||||||
new Research(Blocks.junction),
|
|
||||||
new Research(Blocks.router)
|
|
||||||
);
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
craters = new SectorPreset("craters", starter, 18){{
|
craters = new SectorPreset("craters", serpulo, 18){{
|
||||||
conditionWave = 10;
|
captureWave = 40;
|
||||||
requirements = with(
|
|
||||||
new SectorWave(frozenForest, 10),
|
|
||||||
new Research(Blocks.mender),
|
|
||||||
new Research(Blocks.combustionGenerator)
|
|
||||||
);
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
ruinousShores = new SectorPreset("ruinousShores", starter, 19){{
|
ruinousShores = new SectorPreset("ruinousShores", serpulo, 19){{
|
||||||
conditionWave = 20;
|
captureWave = 40;
|
||||||
launchPeriod = 20;
|
|
||||||
requirements = with(
|
|
||||||
new SectorWave(groundZero, 20),
|
|
||||||
new SectorWave(craters, 15),
|
|
||||||
new Research(Blocks.graphitePress),
|
|
||||||
new Research(Blocks.combustionGenerator),
|
|
||||||
new Research(Blocks.kiln),
|
|
||||||
new Research(Blocks.mechanicalPump)
|
|
||||||
);
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
stainedMountains = new SectorPreset("stainedMountains", starter, 20){{
|
stainedMountains = new SectorPreset("stainedMountains", serpulo, 20){{
|
||||||
conditionWave = 10;
|
captureWave = 30;
|
||||||
launchPeriod = 10;
|
|
||||||
requirements = with(
|
|
||||||
new SectorWave(frozenForest, 15),
|
|
||||||
new Research(Blocks.pneumaticDrill),
|
|
||||||
new Research(Blocks.powerNode),
|
|
||||||
new Research(Blocks.turbineGenerator)
|
|
||||||
);
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
fungalPass = new SectorPreset("fungalPass", starter, 21){{
|
fungalPass = new SectorPreset("fungalPass", serpulo, 21){{
|
||||||
requirements = with(
|
|
||||||
new SectorWave(stainedMountains, 15),
|
|
||||||
//new Unlock(Blocks.daggerFactory),
|
|
||||||
//new Unlock(Blocks.crawlerFactory),
|
|
||||||
new Research(Blocks.door),
|
|
||||||
new Research(Blocks.siliconSmelter)
|
|
||||||
);
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
overgrowth = new SectorPreset("overgrowth", starter, 22){{
|
overgrowth = new SectorPreset("overgrowth", serpulo, 22){{
|
||||||
conditionWave = 12;
|
|
||||||
launchPeriod = 4;
|
|
||||||
requirements = with(
|
|
||||||
new SectorWave(craters, 40),
|
|
||||||
new Launched(fungalPass),
|
|
||||||
new Research(Blocks.cultivator),
|
|
||||||
new Research(Blocks.sporePress)
|
|
||||||
//new Unlock(Blocks.titanFactory),
|
|
||||||
//new Unlock(Blocks.wraithFactory)
|
|
||||||
);
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
tarFields = new SectorPreset("tarFields", starter, 23){{
|
tarFields = new SectorPreset("tarFields", serpulo, 23){{
|
||||||
conditionWave = 15;
|
captureWave = 40;
|
||||||
launchPeriod = 10;
|
|
||||||
requirements = with(
|
|
||||||
new SectorWave(ruinousShores, 20),
|
|
||||||
new Research(Blocks.coalCentrifuge),
|
|
||||||
new Research(Blocks.conduit),
|
|
||||||
new Research(Blocks.wave)
|
|
||||||
);
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
desolateRift = new SectorPreset("desolateRift", starter, 123){{
|
desolateRift = new SectorPreset("desolateRift", serpulo, 123){{
|
||||||
conditionWave = 3;
|
captureWave = 40;
|
||||||
launchPeriod = 2;
|
|
||||||
requirements = with(
|
|
||||||
new SectorWave(tarFields, 20),
|
|
||||||
new Research(Blocks.thermalGenerator),
|
|
||||||
new Research(Blocks.thoriumReactor)
|
|
||||||
);
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|
||||||
nuclearComplex = new SectorPreset("nuclearComplex", starter, 130){{
|
nuclearComplex = new SectorPreset("nuclearComplex", serpulo, 130){{
|
||||||
conditionWave = 30;
|
captureWave = 60;
|
||||||
launchPeriod = 15;
|
|
||||||
requirements = with(
|
|
||||||
new Launched(fungalPass),
|
|
||||||
new Research(Blocks.thermalGenerator),
|
|
||||||
new Research(Blocks.laserDrill)
|
|
||||||
);
|
|
||||||
}};
|
}};
|
||||||
|
|
||||||
/*
|
|
||||||
crags = new Zone("crags", new MapGenerator("crags").dist(2f)){{
|
|
||||||
loadout = Loadouts.basicFoundation;
|
|
||||||
baseLaunchCost = ItemStack.with();
|
|
||||||
startingItems = ItemStack.list(Items.copper, 2000, Items.lead, 2000, Items.graphite, 500, Items.titanium, 500, Items.silicon, 500);
|
|
||||||
conditionWave = 3;
|
|
||||||
launchPeriod = 2;
|
|
||||||
requirements = with(stainedMountains, 40);
|
|
||||||
blockRequirements = new Block[]{Blocks.thermalGenerator};
|
|
||||||
resources = Array.with(Items.copper, Items.scrap, Items.lead, Items.coal, Items.sand};
|
|
||||||
}};
|
|
||||||
|
|
||||||
|
|
||||||
impact0078 = new SectorPreset("impact0078"){{
|
|
||||||
loadout = Loadouts.basicNucleus;
|
|
||||||
baseLaunchCost = ItemStack.list();
|
|
||||||
startingItems = ItemStack.list(Items.copper, 2000, Items.lead, 2000, Items.graphite, 500, Items.titanium, 500, Items.silicon, 500);
|
|
||||||
conditionWave = 3;
|
|
||||||
launchPeriod = 2;
|
|
||||||
//requirements = with(nuclearComplex, 40);
|
|
||||||
//blockRequirements = new Block[]{Blocks.thermalGenerator};
|
|
||||||
//resources = Array.with(Items.copper, Items.scrap, Items.lead, Items.coal, Items.titanium, Items.thorium};
|
|
||||||
}};*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ import mindustry.type.*;
|
|||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
|
|
||||||
import static mindustry.content.Blocks.*;
|
import static mindustry.content.Blocks.*;
|
||||||
|
import static mindustry.content.SectorPresets.*;
|
||||||
|
import static mindustry.content.SectorPresets.craters;
|
||||||
import static mindustry.content.UnitTypes.*;
|
import static mindustry.content.UnitTypes.*;
|
||||||
import static mindustry.type.ItemStack.*;
|
import static mindustry.type.ItemStack.*;
|
||||||
|
|
||||||
@@ -110,7 +112,7 @@ public class TechTree implements ContentList{
|
|||||||
});
|
});
|
||||||
|
|
||||||
node(Items.coal, with(Items.lead, 3000), () -> {
|
node(Items.coal, with(Items.lead, 3000), () -> {
|
||||||
node(Items.graphite, with(Items.coal, 3000), () -> {
|
node(Items.graphite, with(Items.coal, 1000), () -> {
|
||||||
node(graphitePress, () -> {
|
node(graphitePress, () -> {
|
||||||
node(Items.titanium, with(Items.graphite, 6000, Items.copper, 10000, Items.lead, 10000), () -> {
|
node(Items.titanium, with(Items.graphite, 6000, Items.copper, 10000, Items.lead, 10000), () -> {
|
||||||
node(pneumaticDrill, () -> {
|
node(pneumaticDrill, () -> {
|
||||||
@@ -405,17 +407,87 @@ public class TechTree implements ContentList{
|
|||||||
});
|
});
|
||||||
|
|
||||||
//TODO research sectors
|
//TODO research sectors
|
||||||
/*
|
|
||||||
node(SectorPresets.groundZero, () -> {
|
|
||||||
node(SectorPresets.nuclearComplex, () -> {
|
|
||||||
node(SectorPresets.craters, () -> {
|
|
||||||
node(SectorPresets.saltFlats, () -> {
|
|
||||||
|
|
||||||
|
node(groundZero, () -> {
|
||||||
|
node(frozenForest, Seq.with(
|
||||||
|
new SectorComplete(groundZero),
|
||||||
|
new Research(junction),
|
||||||
|
new Research(router)
|
||||||
|
), () -> {
|
||||||
|
node(craters, Seq.with(
|
||||||
|
new SectorComplete(frozenForest),
|
||||||
|
new Research(mender),
|
||||||
|
new Research(combustionGenerator)
|
||||||
|
), () -> {
|
||||||
|
node(ruinousShores, Seq.with(
|
||||||
|
new SectorComplete(craters),
|
||||||
|
new Research(graphitePress),
|
||||||
|
new Research(combustionGenerator),
|
||||||
|
new Research(kiln),
|
||||||
|
new Research(mechanicalPump)
|
||||||
|
), () -> {
|
||||||
|
|
||||||
|
node(tarFields, Seq.with(
|
||||||
|
new SectorComplete(ruinousShores),
|
||||||
|
new Research(coalCentrifuge),
|
||||||
|
new Research(conduit),
|
||||||
|
new Research(wave)
|
||||||
|
), () -> {
|
||||||
|
node(desolateRift, Seq.with(
|
||||||
|
new SectorComplete(tarFields),
|
||||||
|
new Research(thermalGenerator),
|
||||||
|
new Research(thoriumReactor)
|
||||||
|
), () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
node(saltFlats, Seq.with(
|
||||||
|
new SectorComplete(ruinousShores),
|
||||||
|
new Research(groundFactory),
|
||||||
|
new Research(airFactory),
|
||||||
|
new Research(door),
|
||||||
|
new Research(waterExtractor)
|
||||||
|
), () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
node(overgrowth, Seq.with(
|
||||||
|
new SectorComplete(craters),
|
||||||
|
new SectorComplete(fungalPass),
|
||||||
|
new Research(cultivator),
|
||||||
|
new Research(sporePress),
|
||||||
|
new Research(UnitTypes.mace),
|
||||||
|
new Research(UnitTypes.flare)
|
||||||
|
), () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
node(stainedMountains, Seq.with(
|
||||||
|
new SectorComplete(frozenForest),
|
||||||
|
new Research(pneumaticDrill),
|
||||||
|
new Research(powerNode),
|
||||||
|
new Research(turbineGenerator)
|
||||||
|
), () -> {
|
||||||
|
node(fungalPass, Seq.with(
|
||||||
|
new SectorComplete(stainedMountains),
|
||||||
|
new Research(groundFactory),
|
||||||
|
new Research(door),
|
||||||
|
new Research(siliconSmelter)
|
||||||
|
), () -> {
|
||||||
|
node(nuclearComplex, Seq.with(
|
||||||
|
new SectorComplete(fungalPass),
|
||||||
|
new Research(thermalGenerator),
|
||||||
|
new Research(laserDrill)
|
||||||
|
), () -> {
|
||||||
|
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -448,6 +520,12 @@ public class TechTree implements ContentList{
|
|||||||
return new TechNode(content, requirements, children);
|
return new TechNode(content, requirements, children);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static TechNode node(UnlockableContent content, Seq<Objective> objectives, Runnable children){
|
||||||
|
TechNode node = new TechNode(content, empty, children);
|
||||||
|
node.objectives = objectives;
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
private static TechNode node(UnlockableContent block){
|
private static TechNode node(UnlockableContent block){
|
||||||
return node(block, () -> {});
|
return node(block, () -> {});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -530,7 +530,7 @@ public class UnitTypes implements ContentList{
|
|||||||
speed = 1.25f;
|
speed = 1.25f;
|
||||||
accel = 0.035f;
|
accel = 0.035f;
|
||||||
drag = 0.05f;
|
drag = 0.05f;
|
||||||
rotateSpeed = 3.5f;
|
rotateSpeed = 1.9f;
|
||||||
flying = true;
|
flying = true;
|
||||||
lowAltitude = true;
|
lowAltitude = true;
|
||||||
health = 9000;
|
health = 9000;
|
||||||
@@ -539,20 +539,70 @@ public class UnitTypes implements ContentList{
|
|||||||
engineSize = 5.3f;
|
engineSize = 5.3f;
|
||||||
hitsize = 58f;
|
hitsize = 58f;
|
||||||
|
|
||||||
weapons.add(new Weapon(){{
|
BulletType missiles = new MissileBulletType(2.7f, 10){{
|
||||||
y = 1.5f;
|
width = 8f;
|
||||||
reload = 28f;
|
height = 8f;
|
||||||
|
shrinkY = 0f;
|
||||||
|
drag = -0.01f;
|
||||||
|
splashDamageRadius = 40f;
|
||||||
|
splashDamage = 40f;
|
||||||
|
ammoMultiplier = 4f;
|
||||||
|
lifetime = 80f;
|
||||||
|
hitEffect = Fx.blastExplosion;
|
||||||
|
despawnEffect = Fx.blastExplosion;
|
||||||
|
|
||||||
|
status = StatusEffects.blasted;
|
||||||
|
statusDuration = 60f;
|
||||||
|
}};
|
||||||
|
|
||||||
|
weapons.add(
|
||||||
|
new Weapon("missiles-mount"){{
|
||||||
|
y = 8f;
|
||||||
|
x = 17f;
|
||||||
|
reload = 20f;
|
||||||
ejectEffect = Fx.shellEjectSmall;
|
ejectEffect = Fx.shellEjectSmall;
|
||||||
bullet = Bullets.standardCopper;
|
rotateSpeed = 8f;
|
||||||
|
bullet = missiles;
|
||||||
shootSound = Sounds.shoot;
|
shootSound = Sounds.shoot;
|
||||||
}});
|
rotate = true;
|
||||||
|
occlusion = 6f;
|
||||||
|
}},
|
||||||
|
new Weapon("missiles-mount"){{
|
||||||
|
y = -8f;
|
||||||
|
x = 17f;
|
||||||
|
reload = 35;
|
||||||
|
rotateSpeed = 8f;
|
||||||
|
ejectEffect = Fx.shellEjectSmall;
|
||||||
|
bullet = missiles;
|
||||||
|
shootSound = Sounds.shoot;
|
||||||
|
rotate = true;
|
||||||
|
occlusion = 6f;
|
||||||
|
}},
|
||||||
|
new Weapon("large-bullet-mount"){{
|
||||||
|
y = 2f;
|
||||||
|
x = 10f;
|
||||||
|
shootY = 12f;
|
||||||
|
reload = 10;
|
||||||
|
shake = 1f;
|
||||||
|
rotateSpeed = 2f;
|
||||||
|
ejectEffect = Fx.shellEjectSmall;
|
||||||
|
shootSound = Sounds.shootBig;
|
||||||
|
rotate = true;
|
||||||
|
occlusion = 8f;
|
||||||
|
bullet = new BasicBulletType(7f, 60){{
|
||||||
|
width = 12f;
|
||||||
|
height = 18f;
|
||||||
|
shootEffect = Fx.shootBig;
|
||||||
|
}};
|
||||||
|
}}
|
||||||
|
);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
eclipse = new UnitType("eclipse"){{
|
eclipse = new UnitType("eclipse"){{
|
||||||
speed = 1.1f;
|
speed = 1.1f;
|
||||||
accel = 0.02f;
|
accel = 0.02f;
|
||||||
drag = 0.05f;
|
drag = 0.05f;
|
||||||
rotateSpeed = 2.5f;
|
rotateSpeed = 1f;
|
||||||
flying = true;
|
flying = true;
|
||||||
lowAltitude = true;
|
lowAltitude = true;
|
||||||
health = 18000;
|
health = 18000;
|
||||||
@@ -562,12 +612,74 @@ public class UnitTypes implements ContentList{
|
|||||||
destructibleWreck = false;
|
destructibleWreck = false;
|
||||||
armor = 13f;
|
armor = 13f;
|
||||||
|
|
||||||
weapons.add(new Weapon(){{
|
weapons.add(
|
||||||
y = 1.5f;
|
new Weapon("large-laser-mount"){{
|
||||||
reload = 28f;
|
shake = 4f;
|
||||||
|
shootY = 9f;
|
||||||
|
x = 18f;
|
||||||
|
y = 5f;
|
||||||
|
rotateSpeed = 2f;
|
||||||
|
reload = 50f;
|
||||||
|
recoil = 4f;
|
||||||
|
shootSound = Sounds.laser;
|
||||||
|
occlusion = 20f;
|
||||||
|
rotate = true;
|
||||||
|
|
||||||
|
bullet = new LaserBulletType(){{
|
||||||
|
damage = 75f;
|
||||||
|
sideAngle = 20f;
|
||||||
|
sideWidth = 1.5f;
|
||||||
|
sideLength = 80f;
|
||||||
|
width = 25f;
|
||||||
|
length = 200f;
|
||||||
|
shootEffect = Fx.shockwave;
|
||||||
|
colors = new Color[]{Color.valueOf("ec7458aa"), Color.valueOf("ff9c5a"), Color.white};
|
||||||
|
}};
|
||||||
|
}},
|
||||||
|
new Weapon("missiles-mount"){{
|
||||||
|
x = 11f;
|
||||||
|
y = 27f;
|
||||||
|
rotateSpeed = 2f;
|
||||||
|
reload = 4f;
|
||||||
|
shootSound = Sounds.flame;
|
||||||
|
occlusion = 7f;
|
||||||
|
rotate = true;
|
||||||
|
recoil = 0.5f;
|
||||||
|
|
||||||
|
bullet = Bullets.pyraFlame;
|
||||||
|
}},
|
||||||
|
new Weapon("large-artillery"){{
|
||||||
|
y = -13f;
|
||||||
|
x = 20f;
|
||||||
|
reload = 18f;
|
||||||
ejectEffect = Fx.shellEjectSmall;
|
ejectEffect = Fx.shellEjectSmall;
|
||||||
bullet = Bullets.standardCopper;
|
rotateSpeed = 7f;
|
||||||
|
shake = 1f;
|
||||||
shootSound = Sounds.shoot;
|
shootSound = Sounds.shoot;
|
||||||
|
rotate = true;
|
||||||
|
occlusion = 12f;
|
||||||
|
bullet = new ArtilleryBulletType(3.2f, 12){{
|
||||||
|
trailMult = 0.8f;
|
||||||
|
hitEffect = Fx.massiveExplosion;
|
||||||
|
knockback = 1.5f;
|
||||||
|
lifetime = 140f;
|
||||||
|
height = 12f;
|
||||||
|
width = 12f;
|
||||||
|
collidesTiles = false;
|
||||||
|
ammoMultiplier = 4f;
|
||||||
|
splashDamageRadius = 60f;
|
||||||
|
splashDamage = 60f;
|
||||||
|
backColor = Pal.missileYellowBack;
|
||||||
|
frontColor = Pal.missileYellow;
|
||||||
|
trailEffect = Fx.artilleryTrail;
|
||||||
|
trailSize = 6f;
|
||||||
|
hitShake = 4f;
|
||||||
|
|
||||||
|
shootEffect = Fx.shootBig2;
|
||||||
|
|
||||||
|
status = StatusEffects.blasted;
|
||||||
|
statusDuration = 60f;
|
||||||
|
}};
|
||||||
}});
|
}});
|
||||||
}};
|
}};
|
||||||
|
|
||||||
@@ -792,7 +904,6 @@ public class UnitTypes implements ContentList{
|
|||||||
|
|
||||||
shots = 1;
|
shots = 1;
|
||||||
inaccuracy = 3f;
|
inaccuracy = 3f;
|
||||||
|
|
||||||
ejectEffect = Fx.shellEjectBig;
|
ejectEffect = Fx.shellEjectBig;
|
||||||
|
|
||||||
bullet = new ArtilleryBulletType(3.2f, 12){{
|
bullet = new ArtilleryBulletType(3.2f, 12){{
|
||||||
@@ -859,7 +970,6 @@ public class UnitTypes implements ContentList{
|
|||||||
//region core
|
//region core
|
||||||
|
|
||||||
alpha = new UnitType("alpha"){{
|
alpha = new UnitType("alpha"){{
|
||||||
//TODO maybe these should be changed
|
|
||||||
defaultController = BuilderAI::new;
|
defaultController = BuilderAI::new;
|
||||||
isCounted = false;
|
isCounted = false;
|
||||||
|
|
||||||
@@ -872,12 +982,12 @@ public class UnitTypes implements ContentList{
|
|||||||
rotateSpeed = 15f;
|
rotateSpeed = 15f;
|
||||||
accel = 0.1f;
|
accel = 0.1f;
|
||||||
itemCapacity = 30;
|
itemCapacity = 30;
|
||||||
health = 80f;
|
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 = 20f;
|
reload = 17f;
|
||||||
x = 2.75f;
|
x = 2.75f;
|
||||||
y = 1f;
|
y = 1f;
|
||||||
|
|
||||||
@@ -887,13 +997,12 @@ public class UnitTypes implements ContentList{
|
|||||||
lifetime = 60f;
|
lifetime = 60f;
|
||||||
shootEffect = Fx.shootSmall;
|
shootEffect = Fx.shootSmall;
|
||||||
smokeEffect = Fx.shootSmallSmoke;
|
smokeEffect = Fx.shootSmallSmoke;
|
||||||
tileDamageMultiplier = 0.1f;
|
tileDamageMultiplier = 0.95f;
|
||||||
}};
|
}};
|
||||||
}});
|
}});
|
||||||
}};
|
}};
|
||||||
|
|
||||||
beta = new UnitType("beta"){{
|
beta = new UnitType("beta"){{
|
||||||
//TODO maybe these should be changed
|
|
||||||
defaultController = BuilderAI::new;
|
defaultController = BuilderAI::new;
|
||||||
isCounted = false;
|
isCounted = false;
|
||||||
|
|
||||||
@@ -906,7 +1015,7 @@ public class UnitTypes implements ContentList{
|
|||||||
rotateSpeed = 17f;
|
rotateSpeed = 17f;
|
||||||
accel = 0.1f;
|
accel = 0.1f;
|
||||||
itemCapacity = 50;
|
itemCapacity = 50;
|
||||||
health = 120f;
|
health = 150f;
|
||||||
engineOffset = 6f;
|
engineOffset = 6f;
|
||||||
hitsize = 9f;
|
hitsize = 9f;
|
||||||
rotateShooting = false;
|
rotateShooting = false;
|
||||||
@@ -933,7 +1042,6 @@ public class UnitTypes implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
gamma = new UnitType("gamma"){{
|
gamma = new UnitType("gamma"){{
|
||||||
//TODO maybe these should be changed
|
|
||||||
defaultController = BuilderAI::new;
|
defaultController = BuilderAI::new;
|
||||||
isCounted = false;
|
isCounted = false;
|
||||||
|
|
||||||
@@ -946,7 +1054,7 @@ public class UnitTypes implements ContentList{
|
|||||||
rotateSpeed = 19f;
|
rotateSpeed = 19f;
|
||||||
accel = 0.11f;
|
accel = 0.11f;
|
||||||
itemCapacity = 70;
|
itemCapacity = 70;
|
||||||
health = 160f;
|
health = 190f;
|
||||||
engineOffset = 6f;
|
engineOffset = 6f;
|
||||||
hitsize = 10f;
|
hitsize = 10f;
|
||||||
|
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ public class Control implements ApplicationListener, Loadable{
|
|||||||
net.host(port);
|
net.host(port);
|
||||||
player.admin(true);
|
player.admin(true);
|
||||||
}catch(IOException e){
|
}catch(IOException e){
|
||||||
ui.showException("$server.error", e);
|
ui.showException("@server.error", e);
|
||||||
state.set(State.menu);
|
state.set(State.menu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -312,7 +312,7 @@ public class Control implements ApplicationListener, Loadable{
|
|||||||
}catch(SaveException e){
|
}catch(SaveException e){
|
||||||
Log.err(e);
|
Log.err(e);
|
||||||
sector.save = null;
|
sector.save = null;
|
||||||
Time.runTask(10f, () -> ui.showErrorMessage("$save.corrupted"));
|
Time.runTask(10f, () -> ui.showErrorMessage("@save.corrupted"));
|
||||||
slot.delete();
|
slot.delete();
|
||||||
playSector(origin, sector);
|
playSector(origin, sector);
|
||||||
}
|
}
|
||||||
@@ -434,6 +434,7 @@ public class Control implements ApplicationListener, Loadable{
|
|||||||
ui.showStartupInfo("[accent]v6[] is currently in [accent]pre-alpha[].\n" +
|
ui.showStartupInfo("[accent]v6[] is currently in [accent]pre-alpha[].\n" +
|
||||||
"[lightgray]This means:[]\n" +
|
"[lightgray]This means:[]\n" +
|
||||||
"- Content is missing\n" +
|
"- Content is missing\n" +
|
||||||
|
"- [scarlet]Mobile[] is not supported.\n" +
|
||||||
"- Most [scarlet]Unit AI[] does not work\n" +
|
"- Most [scarlet]Unit AI[] does not work\n" +
|
||||||
"- Many units are [scarlet]missing[] or unfinished\n" +
|
"- Many units are [scarlet]missing[] or unfinished\n" +
|
||||||
"- The campaign is completely unfinished\n" +
|
"- The campaign is completely unfinished\n" +
|
||||||
@@ -450,7 +451,7 @@ public class Control implements ApplicationListener, Loadable{
|
|||||||
//display UI scale changed dialog
|
//display UI scale changed dialog
|
||||||
if(Core.settings.getBool("uiscalechanged", false)){
|
if(Core.settings.getBool("uiscalechanged", false)){
|
||||||
Core.app.post(() -> Core.app.post(() -> {
|
Core.app.post(() -> Core.app.post(() -> {
|
||||||
BaseDialog dialog = new BaseDialog("$confirm");
|
BaseDialog dialog = new BaseDialog("@confirm");
|
||||||
dialog.setFillParent(true);
|
dialog.setFillParent(true);
|
||||||
|
|
||||||
float[] countdown = {60 * 11};
|
float[] countdown = {60 * 11};
|
||||||
@@ -469,9 +470,9 @@ public class Control implements ApplicationListener, Loadable{
|
|||||||
}).pad(10f).expand().center();
|
}).pad(10f).expand().center();
|
||||||
|
|
||||||
dialog.buttons.defaults().size(200f, 60f);
|
dialog.buttons.defaults().size(200f, 60f);
|
||||||
dialog.buttons.button("$uiscale.cancel", exit);
|
dialog.buttons.button("@uiscale.cancel", exit);
|
||||||
|
|
||||||
dialog.buttons.button("$ok", () -> {
|
dialog.buttons.button("@ok", () -> {
|
||||||
Core.settings.put("uiscalechanged", false);
|
Core.settings.put("uiscalechanged", false);
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package mindustry.core;
|
|||||||
|
|
||||||
import arc.*;
|
import arc.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.struct.*;
|
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import mindustry.annotations.Annotations.*;
|
import mindustry.annotations.Annotations.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
@@ -88,27 +87,35 @@ public class Logic implements ApplicationListener{
|
|||||||
|
|
||||||
//when loading a 'damaged' sector, propagate the damage
|
//when loading a 'damaged' sector, propagate the damage
|
||||||
Events.on(WorldLoadEvent.class, e -> {
|
Events.on(WorldLoadEvent.class, e -> {
|
||||||
if(state.isCampaign() && state.rules.sector.getSecondsPassed() > 0 && state.rules.sector.hasBase()){
|
if(state.isCampaign()){
|
||||||
long seconds = state.rules.sector.getSecondsPassed();
|
long seconds = state.rules.sector.getSecondsPassed();
|
||||||
CoreEntity core = state.rules.defaultTeam.core();
|
CoreEntity core = state.rules.defaultTeam.core();
|
||||||
|
|
||||||
//update correct storage capacity
|
|
||||||
state.rules.sector.save.meta.secinfo.storageCapacity = core.storageCapacity;
|
|
||||||
|
|
||||||
//apply fractional damage based on how many turns have passed for this sector
|
//apply fractional damage based on how many turns have passed for this sector
|
||||||
float turnsPassed = seconds / (turnDuration / 60f);
|
float turnsPassed = seconds / (turnDuration / 60f);
|
||||||
|
|
||||||
if(state.rules.sector.hasWaves()){
|
if(state.rules.sector.hasWaves() && turnsPassed > 0 && state.rules.sector.hasBase()){
|
||||||
SectorDamage.apply(turnsPassed / sectorDestructionTurns);
|
SectorDamage.apply(turnsPassed / sectorDestructionTurns);
|
||||||
}
|
}
|
||||||
|
|
||||||
//add resources based on turns passed
|
//add resources based on turns passed
|
||||||
if(state.rules.sector.save != null && core != null){
|
if(state.rules.sector.save != null && core != null){
|
||||||
//add new items recieved
|
//update correct storage capacity
|
||||||
state.rules.sector.calculateRecievedItems().each((item, amount) -> core.items.add(item, amount));
|
state.rules.sector.save.meta.secinfo.storageCapacity = core.storageCapacity;
|
||||||
|
|
||||||
|
//add new items received
|
||||||
|
state.rules.sector.calculateReceivedItems().each((item, amount) -> core.items.add(item, amount));
|
||||||
|
|
||||||
//clear received items
|
//clear received items
|
||||||
state.rules.sector.setReceivedItems(new Seq<>());
|
state.rules.sector.setExtraItems(new ItemSeq());
|
||||||
|
|
||||||
|
//validation
|
||||||
|
for(Item item : content.items()){
|
||||||
|
//ensure positive items
|
||||||
|
if(core.items.get(item) < 0) core.items.set(item, 0);
|
||||||
|
//cap the items
|
||||||
|
if(core.items.get(item) > core.storageCapacity) core.items.set(item, core.storageCapacity);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
state.rules.sector.setSecondsPassed(0);
|
state.rules.sector.setSecondsPassed(0);
|
||||||
@@ -262,15 +269,15 @@ public class Logic implements ApplicationListener{
|
|||||||
Time.runTask(30f, () -> {
|
Time.runTask(30f, () -> {
|
||||||
Sector origin = sector.save.meta.secinfo.origin;
|
Sector origin = sector.save.meta.secinfo.origin;
|
||||||
if(origin != null){
|
if(origin != null){
|
||||||
Seq<ItemStack> stacks = origin.getReceivedItems();
|
ItemSeq stacks = origin.getExtraItems();
|
||||||
|
|
||||||
//add up all items into list
|
//add up all items into list
|
||||||
for(Building entity : state.teams.playerCores()){
|
for(Building entity : state.teams.playerCores()){
|
||||||
entity.items.each((item, amount) -> ItemStack.insert(stacks, item, amount));
|
entity.items.each(stacks::add);
|
||||||
}
|
}
|
||||||
|
|
||||||
//save received items
|
//save received items
|
||||||
origin.setReceivedItems(stacks);
|
origin.setExtraItems(stacks);
|
||||||
}
|
}
|
||||||
|
|
||||||
//remove all the cores
|
//remove all the cores
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class NetClient implements ApplicationListener{
|
|||||||
reset();
|
reset();
|
||||||
|
|
||||||
ui.loadfrag.hide();
|
ui.loadfrag.hide();
|
||||||
ui.loadfrag.show("$connecting.data");
|
ui.loadfrag.show("@connecting.data");
|
||||||
|
|
||||||
ui.loadfrag.setButton(() -> {
|
ui.loadfrag.setButton(() -> {
|
||||||
ui.loadfrag.hide();
|
ui.loadfrag.hide();
|
||||||
@@ -80,7 +80,7 @@ public class NetClient implements ApplicationListener{
|
|||||||
c.uuid = platform.getUUID();
|
c.uuid = platform.getUUID();
|
||||||
|
|
||||||
if(c.uuid == null){
|
if(c.uuid == null){
|
||||||
ui.showErrorMessage("$invalidid");
|
ui.showErrorMessage("@invalidid");
|
||||||
ui.loadfrag.hide();
|
ui.loadfrag.hide();
|
||||||
disconnectQuietly();
|
disconnectQuietly();
|
||||||
return;
|
return;
|
||||||
@@ -104,14 +104,14 @@ public class NetClient implements ApplicationListener{
|
|||||||
|
|
||||||
if(packet.reason != null){
|
if(packet.reason != null){
|
||||||
if(packet.reason.equals("closed")){
|
if(packet.reason.equals("closed")){
|
||||||
ui.showSmall("$disconnect", "$disconnect.closed");
|
ui.showSmall("@disconnect", "@disconnect.closed");
|
||||||
}else if(packet.reason.equals("timeout")){
|
}else if(packet.reason.equals("timeout")){
|
||||||
ui.showSmall("$disconnect", "$disconnect.timeout");
|
ui.showSmall("@disconnect", "@disconnect.timeout");
|
||||||
}else if(packet.reason.equals("error")){
|
}else if(packet.reason.equals("error")){
|
||||||
ui.showSmall("$disconnect", "$disconnect.error");
|
ui.showSmall("@disconnect", "@disconnect.error");
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
ui.showErrorMessage("$disconnect");
|
ui.showErrorMessage("@disconnect");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -261,7 +261,7 @@ public class NetClient implements ApplicationListener{
|
|||||||
if(reason.extraText() != null){
|
if(reason.extraText() != null){
|
||||||
ui.showText(reason.toString(), reason.extraText());
|
ui.showText(reason.toString(), reason.extraText());
|
||||||
}else{
|
}else{
|
||||||
ui.showText("$disconnect", reason.toString());
|
ui.showText("@disconnect", reason.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ui.loadfrag.hide();
|
ui.loadfrag.hide();
|
||||||
@@ -271,7 +271,7 @@ public class NetClient implements ApplicationListener{
|
|||||||
public static void kick(String reason){
|
public static void kick(String reason){
|
||||||
netClient.disconnectQuietly();
|
netClient.disconnectQuietly();
|
||||||
logic.reset();
|
logic.reset();
|
||||||
ui.showText("$disconnect", reason, Align.left);
|
ui.showText("@disconnect", reason, Align.left);
|
||||||
ui.loadfrag.hide();
|
ui.loadfrag.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -347,7 +347,7 @@ public class NetClient implements ApplicationListener{
|
|||||||
|
|
||||||
net.setClientLoaded(false);
|
net.setClientLoaded(false);
|
||||||
|
|
||||||
ui.loadfrag.show("$connecting.data");
|
ui.loadfrag.show("@connecting.data");
|
||||||
|
|
||||||
ui.loadfrag.setButton(() -> {
|
ui.loadfrag.setButton(() -> {
|
||||||
ui.loadfrag.hide();
|
ui.loadfrag.hide();
|
||||||
@@ -481,7 +481,7 @@ public class NetClient implements ApplicationListener{
|
|||||||
Log.err("Failed to load data!");
|
Log.err("Failed to load data!");
|
||||||
ui.loadfrag.hide();
|
ui.loadfrag.hide();
|
||||||
quiet = true;
|
quiet = true;
|
||||||
ui.showErrorMessage("$disconnect.data");
|
ui.showErrorMessage("@disconnect.data");
|
||||||
net.disconnect();
|
net.disconnect();
|
||||||
timeoutTime = 0f;
|
timeoutTime = 0f;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -687,6 +687,7 @@ public class NetServer implements ApplicationListener{
|
|||||||
logic.skipWave();
|
logic.skipWave();
|
||||||
}else if(action == AdminAction.ban){
|
}else if(action == AdminAction.ban){
|
||||||
netServer.admins.banPlayerIP(other.con.address);
|
netServer.admins.banPlayerIP(other.con.address);
|
||||||
|
netServer.admins.banPlayerID(other.con.uuid);
|
||||||
other.kick(KickReason.banned);
|
other.kick(KickReason.banned);
|
||||||
Log.info("&lc@ has banned @.", player.name, other.name);
|
Log.info("&lc@ has banned @.", player.name, other.name);
|
||||||
}else if(action == AdminAction.kick){
|
}else if(action == AdminAction.kick){
|
||||||
@@ -739,7 +740,7 @@ public class NetServer implements ApplicationListener{
|
|||||||
|
|
||||||
if(!headless && !closing && net.server() && state.isMenu()){
|
if(!headless && !closing && net.server() && state.isMenu()){
|
||||||
closing = true;
|
closing = true;
|
||||||
ui.loadfrag.show("$server.closing");
|
ui.loadfrag.show("@server.closing");
|
||||||
Time.runTask(5f, () -> {
|
Time.runTask(5f, () -> {
|
||||||
net.closeServer();
|
net.closeServer();
|
||||||
ui.loadfrag.hide();
|
ui.loadfrag.hide();
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ public interface Platform{
|
|||||||
* @param extension File extension to filter
|
* @param extension File extension to filter
|
||||||
*/
|
*/
|
||||||
default void showFileChooser(boolean open, String extension, Cons<Fi> cons){
|
default void showFileChooser(boolean open, String extension, Cons<Fi> cons){
|
||||||
new FileChooser(open ? "$open" : "$save", file -> file.extEquals(extension), open, file -> {
|
new FileChooser(open ? "@open" : "@save", file -> file.extEquals(extension), open, file -> {
|
||||||
if(!open){
|
if(!open){
|
||||||
cons.get(file.parent().child(file.nameWithoutExtension() + "." + extension));
|
cons.get(file.parent().child(file.nameWithoutExtension() + "." + extension));
|
||||||
}else{
|
}else{
|
||||||
@@ -129,7 +129,7 @@ public interface Platform{
|
|||||||
if(mobile){
|
if(mobile){
|
||||||
showFileChooser(true, extensions[0], cons);
|
showFileChooser(true, extensions[0], cons);
|
||||||
}else{
|
}else{
|
||||||
new FileChooser("$open", file -> Structs.contains(extensions, file.extension().toLowerCase()), true, cons).show();
|
new FileChooser("@open", file -> Structs.contains(extensions, file.extension().toLowerCase()), true, cons).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -87,6 +87,10 @@ public class Renderer implements ApplicationListener{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isLanding(){
|
||||||
|
return landTime > 0;
|
||||||
|
}
|
||||||
|
|
||||||
public float weatherAlpha(){
|
public float weatherAlpha(){
|
||||||
return weatherAlpha;
|
return weatherAlpha;
|
||||||
}
|
}
|
||||||
@@ -134,7 +138,7 @@ public class Renderer implements ApplicationListener{
|
|||||||
}catch(Throwable e){
|
}catch(Throwable e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
settings.put("bloom", false);
|
settings.put("bloom", false);
|
||||||
ui.showErrorMessage("$error.bloom");
|
ui.showErrorMessage("@error.bloom");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -314,7 +318,7 @@ public class Renderer implements ApplicationListener{
|
|||||||
int memory = w * h * 4 / 1024 / 1024;
|
int memory = w * h * 4 / 1024 / 1024;
|
||||||
|
|
||||||
if(memory >= 65){
|
if(memory >= 65){
|
||||||
ui.showInfo("$screenshot.invalid");
|
ui.showInfo("@screenshot.invalid");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
Fonts.def.getData().markupEnabled = true;
|
Fonts.def.getData().markupEnabled = true;
|
||||||
Fonts.def.setOwnsTexture(false);
|
Fonts.def.setOwnsTexture(false);
|
||||||
|
|
||||||
Core.assets.getAll(BitmapFont.class, new Seq<>()).each(font -> font.setUseIntegerPositions(true));
|
Core.assets.getAll(Font.class, new Seq<>()).each(font -> font.setUseIntegerPositions(true));
|
||||||
Core.scene = new Scene();
|
Core.scene = new Scene();
|
||||||
Core.input.addProcessor(Core.scene);
|
Core.input.addProcessor(Core.scene);
|
||||||
|
|
||||||
@@ -99,6 +99,7 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
Dialog.setHideAction(() -> sequence(fadeOut(0.1f)));
|
Dialog.setHideAction(() -> sequence(fadeOut(0.1f)));
|
||||||
|
|
||||||
Tooltips.getInstance().animations = false;
|
Tooltips.getInstance().animations = false;
|
||||||
|
Tooltips.getInstance().textProvider = text -> new Tooltip(t -> t.background(Styles.black5).margin(4f).add(text));
|
||||||
|
|
||||||
Core.settings.setErrorHandler(e -> {
|
Core.settings.setErrorHandler(e -> {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -118,7 +119,7 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Seq<AssetDescriptor> getDependencies(){
|
public Seq<AssetDescriptor> getDependencies(){
|
||||||
return Seq.with(new AssetDescriptor<>(Control.class), new AssetDescriptor<>("outline", BitmapFont.class), new AssetDescriptor<>("default", BitmapFont.class), new AssetDescriptor<>("chat", BitmapFont.class));
|
return Seq.with(new AssetDescriptor<>(Control.class), new AssetDescriptor<>("outline", Font.class), new AssetDescriptor<>("default", Font.class), new AssetDescriptor<>("chat", Font.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -224,7 +225,7 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void loadAnd(Runnable call){
|
public void loadAnd(Runnable call){
|
||||||
loadAnd("$loading", call);
|
loadAnd("@loading", call);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadAnd(String text, Runnable call){
|
public void loadAnd(String text, Runnable call){
|
||||||
@@ -238,7 +239,7 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
public void showTextInput(String titleText, String dtext, int textLength, String def, boolean inumeric, Cons<String> confirmed){
|
public void showTextInput(String titleText, String dtext, int textLength, String def, boolean inumeric, Cons<String> confirmed){
|
||||||
if(mobile){
|
if(mobile){
|
||||||
Core.input.getTextInput(new TextInput(){{
|
Core.input.getTextInput(new TextInput(){{
|
||||||
this.title = (titleText.startsWith("$") ? Core.bundle.get(titleText.substring(1)) : titleText);
|
this.title = (titleText.startsWith("@") ? Core.bundle.get(titleText.substring(1)) : titleText);
|
||||||
this.text = def;
|
this.text = def;
|
||||||
this.numeric = inumeric;
|
this.numeric = inumeric;
|
||||||
this.maxLength = textLength;
|
this.maxLength = textLength;
|
||||||
@@ -251,11 +252,11 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
TextField field = cont.field(def, t -> {}).size(330f, 50f).get();
|
TextField field = cont.field(def, t -> {}).size(330f, 50f).get();
|
||||||
field.setFilter((f, c) -> field.getText().length() < textLength && filter.acceptChar(f, c));
|
field.setFilter((f, c) -> field.getText().length() < textLength && filter.acceptChar(f, c));
|
||||||
buttons.defaults().size(120, 54).pad(4);
|
buttons.defaults().size(120, 54).pad(4);
|
||||||
buttons.button("$ok", () -> {
|
buttons.button("@ok", () -> {
|
||||||
confirmed.get(field.getText());
|
confirmed.get(field.getText());
|
||||||
hide();
|
hide();
|
||||||
}).disabled(b -> field.getText().isEmpty());
|
}).disabled(b -> field.getText().isEmpty());
|
||||||
buttons.button("$cancel", this::hide);
|
buttons.button("@cancel", this::hide);
|
||||||
keyDown(KeyCode.enter, () -> {
|
keyDown(KeyCode.enter, () -> {
|
||||||
String text = field.getText();
|
String text = field.getText();
|
||||||
if(!text.isEmpty()){
|
if(!text.isEmpty()){
|
||||||
@@ -340,7 +341,7 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
new Dialog(""){{
|
new Dialog(""){{
|
||||||
getCell(cont).growX();
|
getCell(cont).growX();
|
||||||
cont.margin(15).add(info).width(400f).wrap().get().setAlignment(Align.center, Align.center);
|
cont.margin(15).add(info).width(400f).wrap().get().setAlignment(Align.center, Align.center);
|
||||||
buttons.button("$ok", () -> {
|
buttons.button("@ok", () -> {
|
||||||
hide();
|
hide();
|
||||||
listener.run();
|
listener.run();
|
||||||
}).size(110, 50).pad(4);
|
}).size(110, 50).pad(4);
|
||||||
@@ -351,7 +352,7 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
new Dialog(""){{
|
new Dialog(""){{
|
||||||
getCell(cont).growX();
|
getCell(cont).growX();
|
||||||
cont.margin(15).add(info).width(400f).wrap().get().setAlignment(Align.left);
|
cont.margin(15).add(info).width(400f).wrap().get().setAlignment(Align.left);
|
||||||
buttons.button("$ok", this::hide).size(110, 50).pad(4);
|
buttons.button("@ok", this::hide).size(110, 50).pad(4);
|
||||||
}}.show();
|
}}.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -359,13 +360,13 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
new Dialog(""){{
|
new Dialog(""){{
|
||||||
setFillParent(true);
|
setFillParent(true);
|
||||||
cont.margin(15f);
|
cont.margin(15f);
|
||||||
cont.add("$error.title");
|
cont.add("@error.title");
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.image().width(300f).pad(2).height(4f).color(Color.scarlet);
|
cont.image().width(300f).pad(2).height(4f).color(Color.scarlet);
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.add(text).pad(2f).growX().wrap().get().setAlignment(Align.center);
|
cont.add(text).pad(2f).growX().wrap().get().setAlignment(Align.center);
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.button("$ok", this::hide).size(120, 50).pad(4);
|
cont.button("@ok", this::hide).size(120, 50).pad(4);
|
||||||
}}.show();
|
}}.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -380,17 +381,17 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
|
|
||||||
setFillParent(true);
|
setFillParent(true);
|
||||||
cont.margin(15);
|
cont.margin(15);
|
||||||
cont.add("$error.title").colspan(2);
|
cont.add("@error.title").colspan(2);
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.image().width(300f).pad(2).colspan(2).height(4f).color(Color.scarlet);
|
cont.image().width(300f).pad(2).colspan(2).height(4f).color(Color.scarlet);
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.add((text.startsWith("$") ? Core.bundle.get(text.substring(1)) : text) + (message == null ? "" : "\n[lightgray](" + message + ")")).colspan(2).wrap().growX().center().get().setAlignment(Align.center);
|
cont.add((text.startsWith("@") ? Core.bundle.get(text.substring(1)) : text) + (message == null ? "" : "\n[lightgray](" + message + ")")).colspan(2).wrap().growX().center().get().setAlignment(Align.center);
|
||||||
cont.row();
|
cont.row();
|
||||||
|
|
||||||
Collapser col = new Collapser(base -> base.pane(t -> t.margin(14f).add(Strings.neatError(exc)).color(Color.lightGray).left()), true);
|
Collapser col = new Collapser(base -> base.pane(t -> t.margin(14f).add(Strings.neatError(exc)).color(Color.lightGray).left()), true);
|
||||||
|
|
||||||
cont.button("$details", Styles.togglet, col::toggle).size(180f, 50f).checked(b -> !col.isCollapsed()).fillX().right();
|
cont.button("@details", Styles.togglet, col::toggle).size(180f, 50f).checked(b -> !col.isCollapsed()).fillX().right();
|
||||||
cont.button("$ok", this::hide).size(110, 50).fillX().left();
|
cont.button("@ok", this::hide).size(110, 50).fillX().left();
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.add(col).colspan(2).pad(2);
|
cont.add(col).colspan(2).pad(2);
|
||||||
}}.show();
|
}}.show();
|
||||||
@@ -407,14 +408,14 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
cont.row();
|
cont.row();
|
||||||
cont.add(text).width(400f).wrap().get().setAlignment(align, align);
|
cont.add(text).width(400f).wrap().get().setAlignment(align, align);
|
||||||
cont.row();
|
cont.row();
|
||||||
buttons.button("$ok", this::hide).size(110, 50).pad(4);
|
buttons.button("@ok", this::hide).size(110, 50).pad(4);
|
||||||
}}.show();
|
}}.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showInfoText(String titleText, String text){
|
public void showInfoText(String titleText, String text){
|
||||||
new Dialog(titleText){{
|
new Dialog(titleText){{
|
||||||
cont.margin(15).add(text).width(400f).wrap().left().get().setAlignment(Align.left, Align.left);
|
cont.margin(15).add(text).width(400f).wrap().left().get().setAlignment(Align.left, Align.left);
|
||||||
buttons.button("$ok", this::hide).size(110, 50).pad(4);
|
buttons.button("@ok", this::hide).size(110, 50).pad(4);
|
||||||
}}.show();
|
}}.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -423,7 +424,7 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
cont.margin(10).add(text);
|
cont.margin(10).add(text);
|
||||||
titleTable.row();
|
titleTable.row();
|
||||||
titleTable.image().color(Pal.accent).height(3f).growX().pad(2f);
|
titleTable.image().color(Pal.accent).height(3f).growX().pad(2f);
|
||||||
buttons.button("$ok", this::hide).size(110, 50).pad(4);
|
buttons.button("@ok", this::hide).size(110, 50).pad(4);
|
||||||
}}.show();
|
}}.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -436,8 +437,8 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
dialog.cont.add(text).width(mobile ? 400f : 500f).wrap().pad(4f).get().setAlignment(Align.center, Align.center);
|
dialog.cont.add(text).width(mobile ? 400f : 500f).wrap().pad(4f).get().setAlignment(Align.center, Align.center);
|
||||||
dialog.buttons.defaults().size(200f, 54f).pad(2f);
|
dialog.buttons.defaults().size(200f, 54f).pad(2f);
|
||||||
dialog.setFillParent(false);
|
dialog.setFillParent(false);
|
||||||
dialog.buttons.button("$cancel", dialog::hide);
|
dialog.buttons.button("@cancel", dialog::hide);
|
||||||
dialog.buttons.button("$ok", () -> {
|
dialog.buttons.button("@ok", () -> {
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
confirmed.run();
|
confirmed.run();
|
||||||
});
|
});
|
||||||
@@ -489,7 +490,7 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
dialog.cont.add(text).width(500f).wrap().pad(4f).get().setAlignment(Align.center, Align.center);
|
dialog.cont.add(text).width(500f).wrap().pad(4f).get().setAlignment(Align.center, Align.center);
|
||||||
dialog.buttons.defaults().size(200f, 54f).pad(2f);
|
dialog.buttons.defaults().size(200f, 54f).pad(2f);
|
||||||
dialog.setFillParent(false);
|
dialog.setFillParent(false);
|
||||||
dialog.buttons.button("$ok", () -> {
|
dialog.buttons.button("@ok", () -> {
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
confirmed.run();
|
confirmed.run();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ public class World{
|
|||||||
}catch(Throwable e){
|
}catch(Throwable e){
|
||||||
Log.err(e);
|
Log.err(e);
|
||||||
if(!headless){
|
if(!headless){
|
||||||
ui.showErrorMessage("$map.invalid");
|
ui.showErrorMessage("@map.invalid");
|
||||||
Core.app.post(() -> state.set(State.menu));
|
Core.app.post(() -> state.set(State.menu));
|
||||||
invalidMap = true;
|
invalidMap = true;
|
||||||
}
|
}
|
||||||
@@ -291,17 +291,17 @@ public class World{
|
|||||||
|
|
||||||
if(!headless){
|
if(!headless){
|
||||||
if(state.teams.playerCores().size == 0 && !checkRules.pvp){
|
if(state.teams.playerCores().size == 0 && !checkRules.pvp){
|
||||||
ui.showErrorMessage("$map.nospawn");
|
ui.showErrorMessage("@map.nospawn");
|
||||||
invalidMap = true;
|
invalidMap = true;
|
||||||
}else if(checkRules.pvp){ //pvp maps need two cores to be valid
|
}else if(checkRules.pvp){ //pvp maps need two cores to be valid
|
||||||
if(state.teams.getActive().count(TeamData::hasCore) < 2){
|
if(state.teams.getActive().count(TeamData::hasCore) < 2){
|
||||||
invalidMap = true;
|
invalidMap = true;
|
||||||
ui.showErrorMessage("$map.nospawn.pvp");
|
ui.showErrorMessage("@map.nospawn.pvp");
|
||||||
}
|
}
|
||||||
}else if(checkRules.attackMode){ //attack maps need two cores to be valid
|
}else if(checkRules.attackMode){ //attack maps need two cores to be valid
|
||||||
invalidMap = state.teams.get(state.rules.waveTeam).noCores();
|
invalidMap = state.teams.get(state.rules.waveTeam).noCores();
|
||||||
if(invalidMap){
|
if(invalidMap){
|
||||||
ui.showErrorMessage("$map.nospawn.attack");
|
ui.showErrorMessage("@map.nospawn.attack");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -137,14 +137,11 @@ public class MapEditor{
|
|||||||
if(isFloor){
|
if(isFloor){
|
||||||
tile.setFloor(drawBlock.asFloor());
|
tile.setFloor(drawBlock.asFloor());
|
||||||
}else{
|
}else{
|
||||||
tile.setBlock(drawBlock);
|
|
||||||
if(drawBlock.synthetic()){
|
|
||||||
tile.setTeam(drawTeam);
|
|
||||||
}
|
|
||||||
if(drawBlock.rotate && tile.build != null && tile.build.rotation != rotation){
|
if(drawBlock.rotate && tile.build != null && tile.build.rotation != rotation){
|
||||||
addTileOp(TileOp.get(tile.x, tile.y, (byte)OpType.rotation.ordinal(), (byte)rotation));
|
addTileOp(TileOp.get(tile.x, tile.y, (byte)OpType.rotation.ordinal(), (byte)rotation));
|
||||||
tile.build.rotation = (byte)rotation;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tile.setBlock(drawBlock, drawTeam, rotation);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
infoDialog = new MapInfoDialog(editor);
|
infoDialog = new MapInfoDialog(editor);
|
||||||
generateDialog = new MapGenerateDialog(editor, true);
|
generateDialog = new MapGenerateDialog(editor, true);
|
||||||
|
|
||||||
menu = new BaseDialog("$menu");
|
menu = new BaseDialog("@menu");
|
||||||
menu.addCloseButton();
|
menu.addCloseButton();
|
||||||
|
|
||||||
float swidth = 180f;
|
float swidth = 180f;
|
||||||
@@ -66,41 +66,41 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
menu.cont.table(t -> {
|
menu.cont.table(t -> {
|
||||||
t.defaults().size(swidth, 60f).padBottom(5).padRight(5).padLeft(5);
|
t.defaults().size(swidth, 60f).padBottom(5).padRight(5).padLeft(5);
|
||||||
|
|
||||||
t.button("$editor.savemap", Icon.save, this::save);
|
t.button("@editor.savemap", Icon.save, this::save);
|
||||||
|
|
||||||
t.button("$editor.mapinfo", Icon.pencil, () -> {
|
t.button("@editor.mapinfo", Icon.pencil, () -> {
|
||||||
infoDialog.show();
|
infoDialog.show();
|
||||||
menu.hide();
|
menu.hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
|
|
||||||
t.button("$editor.generate", Icon.terrain, () -> {
|
t.button("@editor.generate", Icon.terrain, () -> {
|
||||||
generateDialog.show(generateDialog::applyToEditor);
|
generateDialog.show(generateDialog::applyToEditor);
|
||||||
menu.hide();
|
menu.hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
t.button("$editor.resize", Icon.resize, () -> {
|
t.button("@editor.resize", Icon.resize, () -> {
|
||||||
resizeDialog.show();
|
resizeDialog.show();
|
||||||
menu.hide();
|
menu.hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
|
|
||||||
t.button("$editor.import", Icon.download, () -> createDialog("$editor.import",
|
t.button("@editor.import", Icon.download, () -> createDialog("@editor.import",
|
||||||
"$editor.importmap", "$editor.importmap.description", Icon.download, (Runnable)loadDialog::show,
|
"@editor.importmap", "@editor.importmap.description", Icon.download, (Runnable)loadDialog::show,
|
||||||
"$editor.importfile", "$editor.importfile.description", Icon.file, (Runnable)() ->
|
"@editor.importfile", "@editor.importfile.description", Icon.file, (Runnable)() ->
|
||||||
platform.showFileChooser(true, mapExtension, file -> ui.loadAnd(() -> {
|
platform.showFileChooser(true, mapExtension, file -> ui.loadAnd(() -> {
|
||||||
maps.tryCatchMapError(() -> {
|
maps.tryCatchMapError(() -> {
|
||||||
if(MapIO.isImage(file)){
|
if(MapIO.isImage(file)){
|
||||||
ui.showInfo("$editor.errorimage");
|
ui.showInfo("@editor.errorimage");
|
||||||
}else{
|
}else{
|
||||||
editor.beginEdit(MapIO.createMap(file, true));
|
editor.beginEdit(MapIO.createMap(file, true));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})),
|
})),
|
||||||
|
|
||||||
"$editor.importimage", "$editor.importimage.description", Icon.fileImage, (Runnable)() ->
|
"@editor.importimage", "@editor.importimage.description", Icon.fileImage, (Runnable)() ->
|
||||||
platform.showFileChooser(true, "png", file ->
|
platform.showFileChooser(true, "png", file ->
|
||||||
ui.loadAnd(() -> {
|
ui.loadAnd(() -> {
|
||||||
try{
|
try{
|
||||||
@@ -108,16 +108,16 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
editor.beginEdit(pixmap);
|
editor.beginEdit(pixmap);
|
||||||
pixmap.dispose();
|
pixmap.dispose();
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
ui.showException("$editor.errorload", e);
|
ui.showException("@editor.errorload", e);
|
||||||
Log.err(e);
|
Log.err(e);
|
||||||
}
|
}
|
||||||
})))
|
})))
|
||||||
);
|
);
|
||||||
|
|
||||||
t.button("$editor.export", Icon.upload, () -> createDialog("$editor.export",
|
t.button("@editor.export", Icon.upload, () -> createDialog("@editor.export",
|
||||||
"$editor.exportfile", "$editor.exportfile.description", Icon.file,
|
"@editor.exportfile", "@editor.exportfile.description", Icon.file,
|
||||||
(Runnable)() -> platform.export(editor.getTags().get("name", "unknown"), mapExtension, file -> MapIO.writeMap(file, editor.createMap(file))),
|
(Runnable)() -> platform.export(editor.getTags().get("name", "unknown"), mapExtension, file -> MapIO.writeMap(file, editor.createMap(file))),
|
||||||
"$editor.exportimage", "$editor.exportimage.description", Icon.fileImage,
|
"@editor.exportimage", "@editor.exportimage.description", Icon.fileImage,
|
||||||
(Runnable)() -> platform.export(editor.getTags().get("name", "unknown"), "png", file -> {
|
(Runnable)() -> platform.export(editor.getTags().get("name", "unknown"), "png", file -> {
|
||||||
Pixmap out = MapIO.writeImage(editor.tiles());
|
Pixmap out = MapIO.writeImage(editor.tiles());
|
||||||
file.writePNG(out);
|
file.writePNG(out);
|
||||||
@@ -128,7 +128,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
menu.cont.row();
|
menu.cont.row();
|
||||||
|
|
||||||
if(steam){
|
if(steam){
|
||||||
menu.cont.button("$editor.publish.workshop", Icon.link, () -> {
|
menu.cont.button("@editor.publish.workshop", Icon.link, () -> {
|
||||||
Map builtin = maps.all().find(m -> m.name().equals(editor.getTags().get("name", "").trim()));
|
Map builtin = maps.all().find(m -> m.name().equals(editor.getTags().get("name", "").trim()));
|
||||||
|
|
||||||
if(editor.getTags().containsKey("steamid") && builtin != null && !builtin.custom){
|
if(editor.getTags().containsKey("steamid") && builtin != null && !builtin.custom){
|
||||||
@@ -146,26 +146,26 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
if(map == null) return;
|
if(map == null) return;
|
||||||
|
|
||||||
if(map.tags.get("description", "").length() < 4){
|
if(map.tags.get("description", "").length() < 4){
|
||||||
ui.showErrorMessage("$editor.nodescription");
|
ui.showErrorMessage("@editor.nodescription");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!Structs.contains(Gamemode.all, g -> g.valid(map))){
|
if(!Structs.contains(Gamemode.all, g -> g.valid(map))){
|
||||||
ui.showErrorMessage("$map.nospawn");
|
ui.showErrorMessage("@map.nospawn");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
platform.publish(map);
|
platform.publish(map);
|
||||||
}).padTop(-3).size(swidth * 2f + 10, 60f).update(b -> b.setText(editor.getTags().containsKey("steamid") ? editor.getTags().get("author").equals(player.name) ? "$workshop.listing" : "$view.workshop" : "$editor.publish.workshop"));
|
}).padTop(-3).size(swidth * 2f + 10, 60f).update(b -> b.setText(editor.getTags().containsKey("steamid") ? editor.getTags().get("author").equals(player.name) ? "@workshop.listing" : "@view.workshop" : "@editor.publish.workshop"));
|
||||||
|
|
||||||
menu.cont.row();
|
menu.cont.row();
|
||||||
}
|
}
|
||||||
|
|
||||||
menu.cont.button("$editor.ingame", Icon.right, this::playtest).padTop(!steam ? -3 : 1).size(swidth * 2f + 10, 60f);
|
menu.cont.button("@editor.ingame", Icon.right, this::playtest).padTop(!steam ? -3 : 1).size(swidth * 2f + 10, 60f);
|
||||||
|
|
||||||
menu.cont.row();
|
menu.cont.row();
|
||||||
|
|
||||||
menu.cont.button("$quit", Icon.exit, () -> {
|
menu.cont.button("@quit", Icon.exit, () -> {
|
||||||
tryExit();
|
tryExit();
|
||||||
menu.hide();
|
menu.hide();
|
||||||
}).size(swidth * 2f + 10, 60f);
|
}).size(swidth * 2f + 10, 60f);
|
||||||
@@ -182,7 +182,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
try{
|
try{
|
||||||
editor.beginEdit(map);
|
editor.beginEdit(map);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
ui.showException("$editor.errorload", e);
|
ui.showException("@editor.errorload", e);
|
||||||
Log.err(e);
|
Log.err(e);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
@@ -280,14 +280,14 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
|
|
||||||
if(name.isEmpty()){
|
if(name.isEmpty()){
|
||||||
infoDialog.show();
|
infoDialog.show();
|
||||||
Core.app.post(() -> ui.showErrorMessage("$editor.save.noname"));
|
Core.app.post(() -> ui.showErrorMessage("@editor.save.noname"));
|
||||||
}else{
|
}else{
|
||||||
Map map = maps.all().find(m -> m.name().equals(name));
|
Map map = maps.all().find(m -> m.name().equals(name));
|
||||||
if(map != null && !map.custom){
|
if(map != null && !map.custom){
|
||||||
handleSaveBuiltin(map);
|
handleSaveBuiltin(map);
|
||||||
}else{
|
}else{
|
||||||
returned = maps.saveMap(editor.getTags());
|
returned = maps.saveMap(editor.getTags());
|
||||||
ui.showInfoFade("$editor.saved");
|
ui.showInfoFade("@editor.saved");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -299,7 +299,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
|
|
||||||
/** Called when a built-in map save is attempted.*/
|
/** Called when a built-in map save is attempted.*/
|
||||||
protected void handleSaveBuiltin(Map map){
|
protected void handleSaveBuiltin(Map map){
|
||||||
ui.showErrorMessage("$editor.save.overwrite");
|
ui.showErrorMessage("@editor.save.overwrite");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -368,7 +368,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
show();
|
show();
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
Log.err(e);
|
Log.err(e);
|
||||||
ui.showException("$editor.errorload", e);
|
ui.showException("@editor.errorload", e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -521,7 +521,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
|
|
||||||
tools.row();
|
tools.row();
|
||||||
|
|
||||||
tools.table(Tex.underline, t -> t.add("$editor.teams"))
|
tools.table(Tex.underline, t -> t.add("@editor.teams"))
|
||||||
.colspan(3).height(40).width(size * 3f + 3f).padBottom(3);
|
.colspan(3).height(40).width(size * 3f + 3f).padBottom(3);
|
||||||
|
|
||||||
tools.row();
|
tools.row();
|
||||||
@@ -557,7 +557,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
t.top();
|
t.top();
|
||||||
t.add("$editor.brush");
|
t.add("@editor.brush");
|
||||||
t.row();
|
t.row();
|
||||||
t.add(slider).width(size * 3f - 20).padTop(4f);
|
t.add(slider).width(size * 3f - 20).padTop(4f);
|
||||||
}).padTop(5).growX().top();
|
}).padTop(5).growX().top();
|
||||||
@@ -650,7 +650,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
|
|
||||||
private void tryExit(){
|
private void tryExit(){
|
||||||
if(!saved){
|
if(!saved){
|
||||||
ui.showConfirm("$confirm", "$editor.unsaved", this::hide);
|
ui.showConfirm("@confirm", "@editor.unsaved", this::hide);
|
||||||
}else{
|
}else{
|
||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,34 +58,34 @@ public class MapGenerateDialog extends BaseDialog{
|
|||||||
|
|
||||||
/** @param applied whether or not to use the applied in-game mode. */
|
/** @param applied whether or not to use the applied in-game mode. */
|
||||||
public MapGenerateDialog(MapEditor editor, boolean applied){
|
public MapGenerateDialog(MapEditor editor, boolean applied){
|
||||||
super("$editor.generate");
|
super("@editor.generate");
|
||||||
this.editor = editor;
|
this.editor = editor;
|
||||||
this.applied = applied;
|
this.applied = applied;
|
||||||
|
|
||||||
shown(this::setup);
|
shown(this::setup);
|
||||||
addCloseButton();
|
addCloseButton();
|
||||||
if(applied){
|
if(applied){
|
||||||
buttons.button("$editor.apply", () -> {
|
buttons.button("@editor.apply", () -> {
|
||||||
ui.loadAnd(() -> {
|
ui.loadAnd(() -> {
|
||||||
apply();
|
apply();
|
||||||
hide();
|
hide();
|
||||||
});
|
});
|
||||||
}).size(160f, 64f);
|
}).size(160f, 64f);
|
||||||
}else{
|
}else{
|
||||||
buttons.button("$settings.reset", () -> {
|
buttons.button("@settings.reset", () -> {
|
||||||
filters.set(maps.readFilters(""));
|
filters.set(maps.readFilters(""));
|
||||||
rebuildFilters();
|
rebuildFilters();
|
||||||
update();
|
update();
|
||||||
}).size(160f, 64f);
|
}).size(160f, 64f);
|
||||||
}
|
}
|
||||||
buttons.button("$editor.randomize", () -> {
|
buttons.button("@editor.randomize", () -> {
|
||||||
for(GenerateFilter filter : filters){
|
for(GenerateFilter filter : filters){
|
||||||
filter.randomize();
|
filter.randomize();
|
||||||
}
|
}
|
||||||
update();
|
update();
|
||||||
}).size(160f, 64f);
|
}).size(160f, 64f);
|
||||||
|
|
||||||
buttons.button("$add", Icon.add, this::showAdd).height(64f).width(140f);
|
buttons.button("@add", Icon.add, this::showAdd).height(64f).width(140f);
|
||||||
|
|
||||||
if(!applied){
|
if(!applied){
|
||||||
hidden(this::apply);
|
hidden(this::apply);
|
||||||
@@ -277,12 +277,12 @@ public class MapGenerateDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(filters.isEmpty()){
|
if(filters.isEmpty()){
|
||||||
filterTable.add("$filters.empty").wrap().width(200f);
|
filterTable.add("@filters.empty").wrap().width(200f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void showAdd(){
|
void showAdd(){
|
||||||
BaseDialog selection = new BaseDialog("$add");
|
BaseDialog selection = new BaseDialog("@add");
|
||||||
selection.setFillParent(false);
|
selection.setFillParent(false);
|
||||||
selection.cont.defaults().size(210f, 60f);
|
selection.cont.defaults().size(210f, 60f);
|
||||||
int i = 0;
|
int i = 0;
|
||||||
@@ -300,7 +300,7 @@ public class MapGenerateDialog extends BaseDialog{
|
|||||||
if(++i % 2 == 0) selection.cont.row();
|
if(++i % 2 == 0) selection.cont.row();
|
||||||
}
|
}
|
||||||
|
|
||||||
selection.cont.button("$filter.defaultores", () -> {
|
selection.cont.button("@filter.defaultores", () -> {
|
||||||
maps.addDefaultOres(filters);
|
maps.addDefaultOres(filters);
|
||||||
rebuildFilters();
|
rebuildFilters();
|
||||||
update();
|
update();
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public class MapInfoDialog extends BaseDialog{
|
|||||||
private final CustomRulesDialog ruleInfo = new CustomRulesDialog();
|
private final CustomRulesDialog ruleInfo = new CustomRulesDialog();
|
||||||
|
|
||||||
public MapInfoDialog(MapEditor editor){
|
public MapInfoDialog(MapEditor editor){
|
||||||
super("$editor.mapinfo");
|
super("@editor.mapinfo");
|
||||||
this.editor = editor;
|
this.editor = editor;
|
||||||
this.waveInfo = new WaveInfoDialog(editor);
|
this.waveInfo = new WaveInfoDialog(editor);
|
||||||
this.generate = new MapGenerateDialog(editor, false);
|
this.generate = new MapGenerateDialog(editor, false);
|
||||||
@@ -32,47 +32,47 @@ public class MapInfoDialog extends BaseDialog{
|
|||||||
ObjectMap<String, String> tags = editor.getTags();
|
ObjectMap<String, String> tags = editor.getTags();
|
||||||
|
|
||||||
cont.pane(t -> {
|
cont.pane(t -> {
|
||||||
t.add("$editor.mapname").padRight(8).left();
|
t.add("@editor.mapname").padRight(8).left();
|
||||||
t.defaults().padTop(15);
|
t.defaults().padTop(15);
|
||||||
|
|
||||||
TextField name = t.field(tags.get("name", ""), text -> {
|
TextField name = t.field(tags.get("name", ""), text -> {
|
||||||
tags.put("name", text);
|
tags.put("name", text);
|
||||||
}).size(400, 55f).addInputDialog(50).get();
|
}).size(400, 55f).addInputDialog(50).get();
|
||||||
name.setMessageText("$unknown");
|
name.setMessageText("@unknown");
|
||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
t.add("$editor.description").padRight(8).left();
|
t.add("@editor.description").padRight(8).left();
|
||||||
|
|
||||||
TextArea description = t.area(tags.get("description", ""), Styles.areaField, text -> {
|
TextArea description = t.area(tags.get("description", ""), Styles.areaField, text -> {
|
||||||
tags.put("description", text);
|
tags.put("description", text);
|
||||||
}).size(400f, 140f).addInputDialog(1000).get();
|
}).size(400f, 140f).addInputDialog(1000).get();
|
||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
t.add("$editor.author").padRight(8).left();
|
t.add("@editor.author").padRight(8).left();
|
||||||
|
|
||||||
TextField author = t.field(tags.get("author", Core.settings.getString("mapAuthor", "")), text -> {
|
TextField author = t.field(tags.get("author", Core.settings.getString("mapAuthor", "")), text -> {
|
||||||
tags.put("author", text);
|
tags.put("author", text);
|
||||||
Core.settings.put("mapAuthor", text);
|
Core.settings.put("mapAuthor", text);
|
||||||
}).size(400, 55f).addInputDialog(50).get();
|
}).size(400, 55f).addInputDialog(50).get();
|
||||||
author.setMessageText("$unknown");
|
author.setMessageText("@unknown");
|
||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
t.add("$editor.rules").padRight(8).left();
|
t.add("@editor.rules").padRight(8).left();
|
||||||
t.button("$edit", () -> {
|
t.button("@edit", () -> {
|
||||||
ruleInfo.show(Vars.state.rules, () -> Vars.state.rules = new Rules());
|
ruleInfo.show(Vars.state.rules, () -> Vars.state.rules = new Rules());
|
||||||
hide();
|
hide();
|
||||||
}).left().width(200f);
|
}).left().width(200f);
|
||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
t.add("$editor.waves").padRight(8).left();
|
t.add("@editor.waves").padRight(8).left();
|
||||||
t.button("$edit", () -> {
|
t.button("@edit", () -> {
|
||||||
waveInfo.show();
|
waveInfo.show();
|
||||||
hide();
|
hide();
|
||||||
}).left().width(200f);
|
}).left().width(200f);
|
||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
t.add("$editor.generation").padRight(8).left();
|
t.add("@editor.generation").padRight(8).left();
|
||||||
t.button("$edit", () -> {
|
t.button("@edit", () -> {
|
||||||
generate.show(Vars.maps.readFilters(editor.getTags().get("genfilters", "")),
|
generate.show(Vars.maps.readFilters(editor.getTags().get("genfilters", "")),
|
||||||
filters -> editor.getTags().put("genfilters", JsonIO.write(filters)));
|
filters -> editor.getTags().put("genfilters", JsonIO.write(filters)));
|
||||||
hide();
|
hide();
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ public class MapLoadDialog extends BaseDialog{
|
|||||||
private Map selected = null;
|
private Map selected = null;
|
||||||
|
|
||||||
public MapLoadDialog(Cons<Map> loader){
|
public MapLoadDialog(Cons<Map> loader){
|
||||||
super("$editor.loadmap");
|
super("@editor.loadmap");
|
||||||
|
|
||||||
shown(this::rebuild);
|
shown(this::rebuild);
|
||||||
|
|
||||||
TextButton button = new TextButton("$load");
|
TextButton button = new TextButton("@load");
|
||||||
button.setDisabled(() -> selected == null);
|
button.setDisabled(() -> selected == null);
|
||||||
button.clicked(() -> {
|
button.clicked(() -> {
|
||||||
if(selected != null){
|
if(selected != null){
|
||||||
@@ -28,7 +28,7 @@ public class MapLoadDialog extends BaseDialog{
|
|||||||
});
|
});
|
||||||
|
|
||||||
buttons.defaults().size(200f, 50f);
|
buttons.defaults().size(200f, 50f);
|
||||||
buttons.button("$cancel", this::hide);
|
buttons.button("@cancel", this::hide);
|
||||||
buttons.add(button);
|
buttons.add(button);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,9 +64,9 @@ public class MapLoadDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(maps.all().size == 0){
|
if(maps.all().size == 0){
|
||||||
table.add("$maps.none").center();
|
table.add("@maps.none").center();
|
||||||
}else{
|
}else{
|
||||||
cont.add("$editor.loadmap");
|
cont.add("@editor.loadmap");
|
||||||
}
|
}
|
||||||
|
|
||||||
cont.row();
|
cont.row();
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ public class MapResizeDialog extends BaseDialog{
|
|||||||
int width, height;
|
int width, height;
|
||||||
|
|
||||||
public MapResizeDialog(MapEditor editor, Intc2 cons){
|
public MapResizeDialog(MapEditor editor, Intc2 cons){
|
||||||
super("$editor.resizemap");
|
super("@editor.resizemap");
|
||||||
shown(() -> {
|
shown(() -> {
|
||||||
cont.clear();
|
cont.clear();
|
||||||
width = editor.width();
|
width = editor.width();
|
||||||
@@ -21,7 +21,7 @@ public class MapResizeDialog extends BaseDialog{
|
|||||||
Table table = new Table();
|
Table table = new Table();
|
||||||
|
|
||||||
for(boolean w : Mathf.booleans){
|
for(boolean w : Mathf.booleans){
|
||||||
table.add(w ? "$width" : "$height").padRight(8f);
|
table.add(w ? "@width" : "@height").padRight(8f);
|
||||||
table.defaults().height(60f).padTop(8);
|
table.defaults().height(60f).padTop(8);
|
||||||
|
|
||||||
table.field((w ? width : height) + "", TextFieldFilter.digitsOnly, value -> {
|
table.field((w ? width : height) + "", TextFieldFilter.digitsOnly, value -> {
|
||||||
@@ -37,8 +37,8 @@ public class MapResizeDialog extends BaseDialog{
|
|||||||
});
|
});
|
||||||
|
|
||||||
buttons.defaults().size(200f, 50f);
|
buttons.defaults().size(200f, 50f);
|
||||||
buttons.button("$cancel", this::hide);
|
buttons.button("@cancel", this::hide);
|
||||||
buttons.button("$ok", () -> {
|
buttons.button("@ok", () -> {
|
||||||
cons.get(width, height);
|
cons.get(width, height);
|
||||||
hide();
|
hide();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class WaveGraph extends Table{
|
|||||||
Lines.precise(true);
|
Lines.precise(true);
|
||||||
|
|
||||||
GlyphLayout lay = Pools.obtain(GlyphLayout.class, GlyphLayout::new);
|
GlyphLayout lay = Pools.obtain(GlyphLayout.class, GlyphLayout::new);
|
||||||
BitmapFont font = Fonts.outline;
|
Font font = Fonts.outline;
|
||||||
|
|
||||||
lay.setText(font, "1");
|
lay.setText(font, "1");
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@ public class WaveGraph extends Table{
|
|||||||
ButtonGroup<Button> group = new ButtonGroup<>();
|
ButtonGroup<Button> group = new ButtonGroup<>();
|
||||||
|
|
||||||
for(Mode m : Mode.all){
|
for(Mode m : Mode.all){
|
||||||
t.button("$wavemode." + m.name(), Styles.fullTogglet, () -> {
|
t.button("@wavemode." + m.name(), Styles.fullTogglet, () -> {
|
||||||
mode = m;
|
mode = m;
|
||||||
}).group(group).height(35f).update(b -> b.setChecked(m == mode)).width(130f);
|
}).group(group).height(35f).update(b -> b.setChecked(m == mode)).width(130f);
|
||||||
}
|
}
|
||||||
@@ -173,22 +173,25 @@ public class WaveGraph extends Table{
|
|||||||
|
|
||||||
colors.clear();
|
colors.clear();
|
||||||
colors.left();
|
colors.left();
|
||||||
for(UnitType type : used){
|
colors.pane(t -> {
|
||||||
colors.button(b -> {
|
t.left();
|
||||||
Color tcolor = color(type).cpy();
|
for(UnitType type : used){
|
||||||
b.image().size(32f).update(i -> i.setColor(b.isChecked() ? Tmp.c1.set(tcolor).mul(0.5f) : tcolor)).get().act(1);
|
t.button(b -> {
|
||||||
b.image(type.icon(Cicon.medium)).padRight(20).update(i -> i.setColor(b.isChecked() ? Color.gray : Color.white)).get().act(1);
|
Color tcolor = color(type).cpy();
|
||||||
b.margin(0f);
|
b.image().size(32f).update(i -> i.setColor(b.isChecked() ? Tmp.c1.set(tcolor).mul(0.5f) : tcolor)).get().act(1);
|
||||||
}, Styles.fullTogglet, () -> {
|
b.image(type.icon(Cicon.medium)).padRight(20).update(i -> i.setColor(b.isChecked() ? Color.gray : Color.white)).get().act(1);
|
||||||
if(!hidden.add(type)){
|
b.margin(0f);
|
||||||
hidden.remove(type);
|
}, Styles.fullTogglet, () -> {
|
||||||
}
|
if(!hidden.add(type)){
|
||||||
|
hidden.remove(type);
|
||||||
|
}
|
||||||
|
|
||||||
used.clear();
|
used.clear();
|
||||||
used.addAll(usedCopy);
|
used.addAll(usedCopy);
|
||||||
for(UnitType o : hidden) used.remove(o);
|
for(UnitType o : hidden) used.remove(o);
|
||||||
}).update(b -> b.setChecked(hidden.contains(type)));
|
}).update(b -> b.setChecked(hidden.contains(type)));
|
||||||
}
|
}
|
||||||
|
}).get().setScrollingDisabled(false, true);
|
||||||
|
|
||||||
for(UnitType type : hidden){
|
for(UnitType type : hidden){
|
||||||
used.remove(type);
|
used.remove(type);
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public class WaveInfoDialog extends BaseDialog{
|
|||||||
private WaveGraph graph = new WaveGraph();
|
private WaveGraph graph = new WaveGraph();
|
||||||
|
|
||||||
public WaveInfoDialog(MapEditor editor){
|
public WaveInfoDialog(MapEditor editor){
|
||||||
super("$waves.title");
|
super("@waves.title");
|
||||||
|
|
||||||
shown(this::setup);
|
shown(this::setup);
|
||||||
hidden(() -> {
|
hidden(() -> {
|
||||||
@@ -48,29 +48,29 @@ public class WaveInfoDialog extends BaseDialog{
|
|||||||
onResize(this::setup);
|
onResize(this::setup);
|
||||||
addCloseButton();
|
addCloseButton();
|
||||||
|
|
||||||
buttons.button("$waves.edit", () -> {
|
buttons.button("@waves.edit", () -> {
|
||||||
BaseDialog dialog = new BaseDialog("$waves.edit");
|
BaseDialog dialog = new BaseDialog("@waves.edit");
|
||||||
dialog.addCloseButton();
|
dialog.addCloseButton();
|
||||||
dialog.setFillParent(false);
|
dialog.setFillParent(false);
|
||||||
dialog.cont.defaults().size(210f, 64f);
|
dialog.cont.defaults().size(210f, 64f);
|
||||||
dialog.cont.button("$waves.copy", () -> {
|
dialog.cont.button("@waves.copy", () -> {
|
||||||
ui.showInfoFade("$waves.copied");
|
ui.showInfoFade("@waves.copied");
|
||||||
Core.app.setClipboardText(maps.writeWaves(groups));
|
Core.app.setClipboardText(maps.writeWaves(groups));
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
}).disabled(b -> groups == null);
|
}).disabled(b -> groups == null);
|
||||||
dialog.cont.row();
|
dialog.cont.row();
|
||||||
dialog.cont.button("$waves.load", () -> {
|
dialog.cont.button("@waves.load", () -> {
|
||||||
try{
|
try{
|
||||||
groups = maps.readWaves(Core.app.getClipboardText());
|
groups = maps.readWaves(Core.app.getClipboardText());
|
||||||
buildGroups();
|
buildGroups();
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
ui.showErrorMessage("$waves.invalid");
|
ui.showErrorMessage("@waves.invalid");
|
||||||
}
|
}
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
}).disabled(b -> Core.app.getClipboardText() == null || Core.app.getClipboardText().isEmpty());
|
}).disabled(b -> Core.app.getClipboardText() == null || Core.app.getClipboardText().isEmpty());
|
||||||
dialog.cont.row();
|
dialog.cont.row();
|
||||||
dialog.cont.button("$settings.reset", () -> ui.showConfirm("$confirm", "$settings.clear.confirm", () -> {
|
dialog.cont.button("@settings.reset", () -> ui.showConfirm("@confirm", "@settings.clear.confirm", () -> {
|
||||||
groups = JsonIO.copy(defaultWaves.get());
|
groups = JsonIO.copy(defaultWaves.get());
|
||||||
buildGroups();
|
buildGroups();
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
@@ -130,12 +130,12 @@ public class WaveInfoDialog extends BaseDialog{
|
|||||||
cont.stack(new Table(Tex.clear, main -> {
|
cont.stack(new Table(Tex.clear, main -> {
|
||||||
main.pane(t -> table = t).growX().growY().padRight(8f).get().setScrollingDisabled(true, false);
|
main.pane(t -> table = t).growX().growY().padRight(8f).get().setScrollingDisabled(true, false);
|
||||||
main.row();
|
main.row();
|
||||||
main.button("$add", () -> {
|
main.button("@add", () -> {
|
||||||
if(groups == null) groups = new Seq<>();
|
if(groups == null) groups = new Seq<>();
|
||||||
groups.add(new SpawnGroup(lastType));
|
groups.add(new SpawnGroup(lastType));
|
||||||
buildGroups();
|
buildGroups();
|
||||||
}).growX().height(70f);
|
}).growX().height(70f);
|
||||||
}), new Label("$waves.none"){{
|
}), new Label("@waves.none"){{
|
||||||
visible(() -> groups.isEmpty());
|
visible(() -> groups.isEmpty());
|
||||||
this.touchable = Touchable.disabled;
|
this.touchable = Touchable.disabled;
|
||||||
setWrap(true);
|
setWrap(true);
|
||||||
@@ -180,7 +180,7 @@ public class WaveInfoDialog extends BaseDialog{
|
|||||||
updateWaves();
|
updateWaves();
|
||||||
}
|
}
|
||||||
}).width(100f);
|
}).width(100f);
|
||||||
spawns.add("$waves.to").padLeft(4).padRight(4);
|
spawns.add("@waves.to").padLeft(4).padRight(4);
|
||||||
spawns.field(group.end == never ? "" : (group.end + 1) + "", TextFieldFilter.digitsOnly, text -> {
|
spawns.field(group.end == never ? "" : (group.end + 1) + "", TextFieldFilter.digitsOnly, text -> {
|
||||||
if(Strings.canParsePositiveInt(text)){
|
if(Strings.canParsePositiveInt(text)){
|
||||||
group.end = Strings.parseInt(text) - 1;
|
group.end = Strings.parseInt(text) - 1;
|
||||||
@@ -193,14 +193,14 @@ public class WaveInfoDialog extends BaseDialog{
|
|||||||
});
|
});
|
||||||
t.row();
|
t.row();
|
||||||
t.table(p -> {
|
t.table(p -> {
|
||||||
p.add("$waves.every").padRight(4);
|
p.add("@waves.every").padRight(4);
|
||||||
p.field(group.spacing + "", TextFieldFilter.digitsOnly, text -> {
|
p.field(group.spacing + "", TextFieldFilter.digitsOnly, text -> {
|
||||||
if(Strings.canParsePositiveInt(text) && Strings.parseInt(text) > 0){
|
if(Strings.canParsePositiveInt(text) && Strings.parseInt(text) > 0){
|
||||||
group.spacing = Strings.parseInt(text);
|
group.spacing = Strings.parseInt(text);
|
||||||
updateWaves();
|
updateWaves();
|
||||||
}
|
}
|
||||||
}).width(100f);
|
}).width(100f);
|
||||||
p.add("$waves.waves").padLeft(4);
|
p.add("@waves.waves").padLeft(4);
|
||||||
});
|
});
|
||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
@@ -219,7 +219,7 @@ public class WaveInfoDialog extends BaseDialog{
|
|||||||
updateWaves();
|
updateWaves();
|
||||||
}
|
}
|
||||||
}).width(80f);
|
}).width(80f);
|
||||||
a.add("$waves.perspawn").padLeft(4);
|
a.add("@waves.perspawn").padLeft(4);
|
||||||
});
|
});
|
||||||
t.row();
|
t.row();
|
||||||
t.table(a -> {
|
t.table(a -> {
|
||||||
@@ -237,17 +237,17 @@ public class WaveInfoDialog extends BaseDialog{
|
|||||||
updateWaves();
|
updateWaves();
|
||||||
}
|
}
|
||||||
}).width(80f);
|
}).width(80f);
|
||||||
a.add("$waves.shields").padLeft(4);
|
a.add("@waves.shields").padLeft(4);
|
||||||
});
|
});
|
||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
t.check("$waves.guardian", b -> group.effect = (b ? StatusEffects.boss : null)).padTop(4).update(b -> b.setChecked(group.effect == StatusEffects.boss)).padBottom(8f);
|
t.check("@waves.guardian", b -> group.effect = (b ? StatusEffects.boss : null)).padTop(4).update(b -> b.setChecked(group.effect == StatusEffects.boss)).padBottom(8f);
|
||||||
}).width(340f).pad(8);
|
}).width(340f).pad(8);
|
||||||
|
|
||||||
table.row();
|
table.row();
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
table.add("$editor.default");
|
table.add("@editor.default");
|
||||||
}
|
}
|
||||||
|
|
||||||
updateWaves();
|
updateWaves();
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package mindustry.entities.abilities;
|
package mindustry.entities.abilities;
|
||||||
|
|
||||||
|
import arc.*;
|
||||||
import arc.func.*;
|
import arc.func.*;
|
||||||
import arc.graphics.*;
|
import arc.graphics.*;
|
||||||
import arc.graphics.g2d.*;
|
import arc.graphics.g2d.*;
|
||||||
@@ -70,8 +71,18 @@ public class ForceFieldAbility implements Ability{
|
|||||||
|
|
||||||
if(unit.shield > 0){
|
if(unit.shield > 0){
|
||||||
Draw.z(Layer.shields);
|
Draw.z(Layer.shields);
|
||||||
|
|
||||||
Draw.color(unit.team.color, Color.white, Mathf.clamp(unit.shieldAlpha));
|
Draw.color(unit.team.color, Color.white, Mathf.clamp(unit.shieldAlpha));
|
||||||
Fill.poly(unit.x, unit.y, 6, realRad);
|
|
||||||
|
if(Core.settings.getBool("animatedshields")){
|
||||||
|
Fill.poly(unit.x, unit.y, 6, realRad);
|
||||||
|
}else{
|
||||||
|
Lines.stroke(1.5f);
|
||||||
|
Draw.alpha(0.09f);
|
||||||
|
Fill.poly(unit.x, unit.y, 6, radius);
|
||||||
|
Draw.alpha(1f);
|
||||||
|
Lines.poly(unit.x, unit.y, 6, radius);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,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);
|
rotation = Mathf.slerpDelta(rotation, angleTo(tile), 0.4f);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -200,6 +200,10 @@ abstract class BuilderComp implements Unitc{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean activelyBuilding(){
|
||||||
|
return isBuilding() && updateBuilding;
|
||||||
|
}
|
||||||
|
|
||||||
/** Return the build request currently active, or the one at the top of the queue.*/
|
/** Return the build request currently active, or the one at the top of the queue.*/
|
||||||
@Nullable
|
@Nullable
|
||||||
BuildPlan buildPlan(){
|
BuildPlan buildPlan(){
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import mindustry.gen.*;
|
|||||||
abstract class HitboxComp implements Posc, QuadTreeObject{
|
abstract class HitboxComp implements Posc, QuadTreeObject{
|
||||||
@Import float x, y;
|
@Import float x, y;
|
||||||
|
|
||||||
transient float lastX, lastY, hitSize;
|
transient float lastX, lastY, deltaX, deltaY, hitSize;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(){
|
public void update(){
|
||||||
@@ -33,6 +33,8 @@ abstract class HitboxComp implements Posc, QuadTreeObject{
|
|||||||
}
|
}
|
||||||
|
|
||||||
void updateLastPosition(){
|
void updateLastPosition(){
|
||||||
|
deltaX = x - lastX;
|
||||||
|
deltaY = y - lastY;
|
||||||
lastX = x;
|
lastX = x;
|
||||||
lastY = y;
|
lastY = y;
|
||||||
}
|
}
|
||||||
@@ -41,20 +43,12 @@ abstract class HitboxComp implements Posc, QuadTreeObject{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
float deltaX(){
|
|
||||||
return x - lastX;
|
|
||||||
}
|
|
||||||
|
|
||||||
float deltaY(){
|
|
||||||
return y - lastY;
|
|
||||||
}
|
|
||||||
|
|
||||||
float deltaLen(){
|
float deltaLen(){
|
||||||
return Mathf.len(deltaX(), deltaY());
|
return Mathf.len(deltaX, deltaY);
|
||||||
}
|
}
|
||||||
|
|
||||||
float deltaAngle(){
|
float deltaAngle(){
|
||||||
return Mathf.angle(deltaX(), deltaY());
|
return Mathf.angle(deltaX, deltaY);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean collides(Hitboxc other){
|
boolean collides(Hitboxc other){
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ abstract class MinerComp implements Itemsc, Posc, Teamc, Rotc, Drawc, Unitc{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(mineTile == null || core == null || mineTile.block() != Blocks.air || dst(mineTile.worldx(), mineTile.worldy()) > miningRange
|
if(mineTile == null || core == null || mineTile.block() != Blocks.air || dst(mineTile.worldx(), mineTile.worldy()) > miningRange
|
||||||
|| (((Object)this) instanceof Builderc && ((Builderc)(Object)this).isBuilding())
|
|| (((Object)this) instanceof Builderc && ((Builderc)(Object)this).activelyBuilding())
|
||||||
|| mineTile.drop() == null || !acceptsItem(mineTile.drop()) || !canMine(mineTile.drop())){
|
|| mineTile.drop() == null || !acceptsItem(mineTile.drop()) || !canMine(mineTile.drop())){
|
||||||
mineTile = null;
|
mineTile = null;
|
||||||
mineTimer = 0f;
|
mineTimer = 0f;
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
|
|||||||
//update some basic state to sync things
|
//update some basic state to sync things
|
||||||
if(unit.type().canBoost){
|
if(unit.type().canBoost){
|
||||||
Tile tile = unit.tileOn();
|
Tile tile = unit.tileOn();
|
||||||
unit.elevation(Mathf.approachDelta(unit.elevation, (tile != null && tile.solid()) || boosting ? 1f : 0f, 0.08f));
|
unit.elevation = Mathf.approachDelta(unit.elevation, (tile != null && tile.solid()) || boosting ? 1f : 0f, 0.08f);
|
||||||
}
|
}
|
||||||
}else if(core != null){
|
}else if(core != null){
|
||||||
//have a small delay before death to prevent the camera from jumping around too quickly
|
//have a small delay before death to prevent the camera from jumping around too quickly
|
||||||
@@ -205,7 +205,7 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
|
|||||||
Draw.z(Layer.playerName);
|
Draw.z(Layer.playerName);
|
||||||
float z = Drawf.text();
|
float z = Drawf.text();
|
||||||
|
|
||||||
BitmapFont font = Fonts.def;
|
Font font = Fonts.def;
|
||||||
GlyphLayout layout = Pools.obtain(GlyphLayout.class, GlyphLayout::new);
|
GlyphLayout layout = Pools.obtain(GlyphLayout.class, GlyphLayout::new);
|
||||||
final float nameHeight = 11;
|
final float nameHeight = 11;
|
||||||
final float textHeight = 15;
|
final float textHeight = 15;
|
||||||
|
|||||||
@@ -50,10 +50,18 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
|||||||
lookAt(x, y);
|
lookAt(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean inRange(Position other){
|
||||||
|
return within(other, type.range);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean hasWeapons(){
|
public boolean hasWeapons(){
|
||||||
return type.hasWeapons();
|
return type.hasWeapons();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public float range(){
|
||||||
|
return type.range;
|
||||||
|
}
|
||||||
|
|
||||||
@Replace
|
@Replace
|
||||||
public float clipSize(){
|
public float clipSize(){
|
||||||
return type.region.getWidth() * 2f;
|
return type.region.getWidth() * 2f;
|
||||||
@@ -130,7 +138,6 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
|||||||
this.type = type;
|
this.type = type;
|
||||||
this.maxHealth = type.health;
|
this.maxHealth = type.health;
|
||||||
this.drag = type.drag;
|
this.drag = type.drag;
|
||||||
this.elevation = type.flying ? 1f : 0;
|
|
||||||
this.armor = type.armor;
|
this.armor = type.armor;
|
||||||
this.hitSize = type.hitsize;
|
this.hitSize = type.hitsize;
|
||||||
this.hovering = type.hovering;
|
this.hovering = type.hovering;
|
||||||
|
|||||||