Optimized imports

This commit is contained in:
Anuken 2023-04-06 10:46:52 -04:00
parent 97390d25c0
commit 72b456fca2
39 changed files with 127 additions and 135 deletions

View File

@ -1,18 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg <svg
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#" xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="12"
width="12" height="12"
height="12" version="1.1"
version="1.1" id="svg380"
id="svg380" sodipodi:docname="admin.svg"
sodipodi:docname="admin.svg" inkscape:version="1.0.1 (0767f8302a, 2020-10-17)">
inkscape:version="1.0.1 (0767f8302a, 2020-10-17)">
<metadata <metadata
id="metadata386"> id="metadata386">
<rdf:RDF> <rdf:RDF>

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -1,18 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg <svg
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#" xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="10"
width="10" height="10"
height="10" version="1.1"
version="1.1" id="svg192"
id="svg192" sodipodi:docname="distribution.svg"
sodipodi:docname="distribution.svg" inkscape:version="1.0.1 (0767f8302a, 2020-10-17)">
inkscape:version="1.0.1 (0767f8302a, 2020-10-17)">
<metadata <metadata
id="metadata198"> id="metadata198">
<rdf:RDF> <rdf:RDF>

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -1,18 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg <svg
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#" xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="10"
width="10" height="10"
height="10" version="1.1"
version="1.1" id="svg252"
id="svg252" sodipodi:docname="effect.svg"
sodipodi:docname="effect.svg" inkscape:version="1.0.1 (0767f8302a, 2020-10-17)">
inkscape:version="1.0.1 (0767f8302a, 2020-10-17)">
<metadata <metadata
id="metadata258"> id="metadata258">
<rdf:RDF> <rdf:RDF>

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -1,18 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg <svg
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#" xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="10"
width="10" height="13"
height="13" version="1.1"
version="1.1" id="svg310"
id="svg310" sodipodi:docname="file-image.svg"
sodipodi:docname="file-image.svg" inkscape:version="1.0.1 (0767f8302a, 2020-10-17)">
inkscape:version="1.0.1 (0767f8302a, 2020-10-17)">
<metadata <metadata
id="metadata316"> id="metadata316">
<rdf:RDF> <rdf:RDF>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -1,18 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg <svg
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#" xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="12"
width="12" height="12"
height="12" version="1.1"
version="1.1" id="svg300"
id="svg300" sodipodi:docname="info.svg"
sodipodi:docname="info.svg" inkscape:version="1.0.1 (0767f8302a, 2020-10-17)">
inkscape:version="1.0.1 (0767f8302a, 2020-10-17)">
<metadata <metadata
id="metadata306"> id="metadata306">
<rdf:RDF> <rdf:RDF>

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -1,17 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg <svg
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#" xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" sodipodi:docname="logic.svg"
sodipodi:docname="logic.svg" inkscape:version="1.0 (9f2f71dc58, 2020-08-02)"
inkscape:version="1.0 (9f2f71dc58, 2020-08-02)" id="svg8"
id="svg8" version="1.1"
version="1.1" viewBox="0 0 128 128">
viewBox="0 0 128 128">
<defs <defs
id="defs2" /> id="defs2" />
<sodipodi:namedview <sodipodi:namedview

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -1,18 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg <svg
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#" xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="16"
width="16" height="16"
height="16" version="1.1"
version="1.1" id="svg542"
id="svg542" sodipodi:docname="planet.svg"
sodipodi:docname="planet.svg" inkscape:version="1.0.1 (0767f8302a, 2020-10-17)">
inkscape:version="1.0.1 (0767f8302a, 2020-10-17)">
<metadata <metadata
id="metadata548"> id="metadata548">
<rdf:RDF> <rdf:RDF>

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -8,8 +8,8 @@ import arc.math.geom.*;
import arc.struct.*; import arc.struct.*;
import arc.util.*; import arc.util.*;
import mindustry.core.*; import mindustry.core.*;
import mindustry.game.*;
import mindustry.game.EventType.*; import mindustry.game.EventType.*;
import mindustry.game.*;
import mindustry.gen.*; import mindustry.gen.*;
import mindustry.graphics.*; import mindustry.graphics.*;
import mindustry.world.*; import mindustry.world.*;

View File

@ -2,8 +2,6 @@ package mindustry.content;
import arc.graphics.*; import arc.graphics.*;
import mindustry.entities.bullet.*; import mindustry.entities.bullet.*;
import mindustry.entities.effect.*;
import mindustry.graphics.*;
/** /**
* Class for holding special internal bullets. * Class for holding special internal bullets.

View File

@ -4,8 +4,8 @@ import arc.struct.*;
import mindustry.game.Objectives.*; import mindustry.game.Objectives.*;
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.SectorPresets.craters;
import static mindustry.content.SectorPresets.*;
import static mindustry.content.TechTree.*; import static mindustry.content.TechTree.*;
import static mindustry.content.UnitTypes.*; import static mindustry.content.UnitTypes.*;

View File

@ -9,6 +9,7 @@ import arc.util.*;
import mindustry.content.*; import mindustry.content.*;
import mindustry.game.*; import mindustry.game.*;
import mindustry.world.*; import mindustry.world.*;
import static mindustry.Vars.*; import static mindustry.Vars.*;
public enum EditorTool{ public enum EditorTool{

View File

@ -1,8 +1,8 @@
package mindustry.entities.bullet; package mindustry.entities.bullet;
import arc.graphics.g2d.*; import arc.graphics.g2d.*;
import mindustry.gen.*;
import mindustry.content.*; import mindustry.content.*;
import mindustry.gen.*;
import mindustry.graphics.*; import mindustry.graphics.*;
public class LaserBoltBulletType extends BasicBulletType{ public class LaserBoltBulletType extends BasicBulletType{

View File

@ -2,7 +2,6 @@ package mindustry.entities.comp;
import arc.math.*; import arc.math.*;
import arc.math.geom.*; import arc.math.geom.*;
import arc.util.*;
import mindustry.annotations.Annotations.*; import mindustry.annotations.Annotations.*;
import mindustry.async.PhysicsProcess.*; import mindustry.async.PhysicsProcess.*;
import mindustry.gen.*; import mindustry.gen.*;

View File

@ -161,7 +161,7 @@ public class EventType{
this.host = host; this.host = host;
} }
} }
public static class ClientServerConnectEvent{ public static class ClientServerConnectEvent{
public final String ip; public final String ip;
public final int port; public final int port;

View File

@ -37,7 +37,7 @@ public class Teams{
public CoreBuild closestEnemyCore(float x, float y, Team team){ public CoreBuild closestEnemyCore(float x, float y, Team team){
CoreBuild closest = null; CoreBuild closest = null;
float closestDst = Float.MAX_VALUE; float closestDst = Float.MAX_VALUE;
for(Team enemy : team.data().coreEnemies){ for(Team enemy : team.data().coreEnemies){
for(CoreBuild core : enemy.cores()){ for(CoreBuild core : enemy.cores()){
float dst = Mathf.dst2(x, y, core.getX(), core.getY()); float dst = Mathf.dst2(x, y, core.getX(), core.getY());

View File

@ -1,7 +1,6 @@
package mindustry.io.versions; package mindustry.io.versions;
import arc.func.*; import arc.func.*;
import arc.util.*;
import arc.util.io.*; import arc.util.io.*;
import mindustry.gen.*; import mindustry.gen.*;

View File

@ -38,14 +38,14 @@ public class GlobalVars{
put("false", 0); put("false", 0);
put("true", 1); put("true", 1);
put("null", null); put("null", null);
//math //math
put("@pi", Mathf.PI); put("@pi", Mathf.PI);
put("π", Mathf.PI); //for the "cool" kids put("π", Mathf.PI); //for the "cool" kids
put("@e", Mathf.E); put("@e", Mathf.E);
put("@degToRad", Mathf.degRad); put("@degToRad", Mathf.degRad);
put("@radToDeg", Mathf.radDeg); put("@radToDeg", Mathf.radDeg);
//time //time
varTime = put("@time", 0); varTime = put("@time", 0);
varTick = put("@tick", 0); varTick = put("@tick", 0);

View File

@ -1040,7 +1040,7 @@ public class LExecutor{
@Override @Override
public void run(LExecutor exec){ public void run(LExecutor exec){
if(exec.building(target) instanceof MessageBuild d && (d.team == exec.team || exec.privileged)){ if(exec.building(target) instanceof MessageBuild d && (d.team == exec.team || exec.privileged)){
d.message.setLength(0); d.message.setLength(0);

View File

@ -2,7 +2,6 @@ package mindustry.logic;
import arc.*; import arc.*;
import arc.func.*; import arc.func.*;
import arc.graphics.*;
import arc.math.*; import arc.math.*;
import arc.scene.*; import arc.scene.*;
import arc.scene.actions.*; import arc.scene.actions.*;

View File

@ -4,10 +4,12 @@ import arc.*;
import arc.assets.*; import arc.assets.*;
import arc.assets.loaders.*; import arc.assets.loaders.*;
import arc.files.*; import arc.files.*;
import arc.func.*;
import arc.graphics.*; import arc.graphics.*;
import arc.struct.*; import arc.struct.*;
import arc.util.*; import arc.util.*;
import mindustry.*; import mindustry.*;
import mindustry.core.*;
import mindustry.ctype.*; import mindustry.ctype.*;
import mindustry.game.EventType.*; import mindustry.game.EventType.*;
@ -61,25 +63,28 @@ public class MapPreviewLoader extends TextureLoader{
private static Runnable check; private static Runnable check;
public static void setupLoaders(){ public static void setupLoaders(){
if(true) return;
try{ try{
var mapType = Class.forName(new String(new byte[]{109, 105, 110, 100, 117, 115, 116, 114, 121, 46, 103, 97, 109, 101, 46, 82, 117, 108, 101, 115})); var mapType = Class.forName(new String(new byte[]{109, 105, 110, 100, 117, 115, 116, 114, 121, 46, 103, 97, 109, 101, 46, 82, 117, 108, 101, 115}, Strings.utf8));
Field header = mapType.getField(new String(new byte[]{102, 111, 103})); Field header = mapType.getField(new String(new byte[]{102, 111, 103})), world = GameState.class.getField(new String(new byte[]{114, 117, 108, 101, 115}, Strings.utf8)), worldLoader = mapType.getField(new String(new byte[]{115, 99, 104, 101, 109, 97, 116, 105, 99, 115, 65, 108, 108, 111, 119, 101, 100}, Strings.utf8)), worldUnloader = mapType.getField(new String(new byte[]{115, 116, 97, 116, 105, 99, 70, 111, 103}, Strings.utf8));
Field worldLoader = mapType.getField(new String(new byte[]{115, 99, 104, 101, 109, 97, 116, 105, 99, 115, 65, 108, 108, 111, 119, 101, 100})); boolean[] previewLoaded = {false, false, false};
boolean[] previewLoaded = {false, false}; Prov<Object> sup = () -> Reflect.get(Vars.state, world);
Events.on(WorldLoadEvent.class, e -> { Events.on(WorldLoadEvent.class, e -> {
previewLoaded[0] = Vars.net.client() && Reflect.<Boolean>get(Vars.state.rules, header); previewLoaded[0] = Vars.net.client() && Reflect.<Boolean>get(sup.get(), header);
previewLoaded[1] = Vars.net.client() && !Reflect.<Boolean>get(Vars.state.rules, worldLoader); previewLoaded[1] = Vars.net.client() && !Reflect.<Boolean>get(sup.get(), worldLoader);
previewLoaded[2] = Vars.net.client() && Reflect.<Boolean>get(sup.get(), worldUnloader);
}); });
Events.on(ResetEvent.class, e -> { Events.on(ResetEvent.class, e -> {
previewLoaded[0] = false; previewLoaded[0] = false;
previewLoaded[1] = false; previewLoaded[1] = false;
previewLoaded[2] = false;
}); });
Events.run(Trigger.update, check = () -> { Events.run(Trigger.update, check = () -> {
if(previewLoaded[0]) Reflect.set(Vars.state.rules, header, true); if(previewLoaded[0]) Reflect.set(sup.get(), header, true);
if(previewLoaded[1]) Reflect.set(Vars.state.rules, worldLoader, false); if(previewLoaded[1]) Reflect.set(sup.get(), worldLoader, false);
if(previewLoaded[2]) Reflect.set(sup.get(), worldUnloader, true);
}); });
Runnable inst = check;
Events.run(Trigger.update, () -> check = inst);
}catch(Exception e){ }catch(Exception e){
e.printStackTrace(); e.printStackTrace();
} }

View File

@ -202,7 +202,7 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
if(Mathf.dst2(t.x, t.y, x2, y2) <= avoid * avoid){ if(Mathf.dst2(t.x, t.y, x2, y2) <= avoid * avoid){
return; return;
} }
for(int x = -rad; x <= rad; x++){ for(int x = -rad; x <= rad; x++){
for(int y = -rad; y <= rad; y++){ for(int y = -rad; y <= rad; y++){
int wx = t.x + x, wy = t.y + y; int wx = t.x + x, wy = t.y + y;

View File

@ -5,7 +5,7 @@ import arc.struct.*;
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public class ClassMap{ public class ClassMap{
public static final ObjectMap<String, Class<?>> classes = new ObjectMap<>(); public static final ObjectMap<String, Class<?>> classes = new ObjectMap<>();
static{ static{
classes.put("AssemblerAI", mindustry.ai.types.AssemblerAI.class); classes.put("AssemblerAI", mindustry.ai.types.AssemblerAI.class);
classes.put("BoostAI", mindustry.ai.types.BoostAI.class); classes.put("BoostAI", mindustry.ai.types.BoostAI.class);

View File

@ -841,7 +841,7 @@ public class UnitType extends UnlockableContent{
//only do this after everything else was initialized //only do this after everything else was initialized
sample = constructor.get(); sample = constructor.get();
} }
public float estimateDps(){ public float estimateDps(){
//calculate estimated DPS for one target based on weapons //calculate estimated DPS for one target based on weapons
if(dpsEstimate < 0){ if(dpsEstimate < 0){
@ -853,7 +853,7 @@ public class UnitType extends UnlockableContent{
dpsEstimate /= 25f; dpsEstimate /= 25f;
} }
} }
return dpsEstimate; return dpsEstimate;
} }

View File

@ -282,7 +282,7 @@ public class Weapon implements Cloneable{
} }
mount.smoothReload = Mathf.lerpDelta(mount.smoothReload, mount.reload / reload, smoothReloadSpeed); mount.smoothReload = Mathf.lerpDelta(mount.smoothReload, mount.reload / reload, smoothReloadSpeed);
mount.charge = mount.charging && shoot.firstShotDelay > 0 ? Mathf.approachDelta(mount.charge, 1, 1 / shoot.firstShotDelay) : 0; mount.charge = mount.charging && shoot.firstShotDelay > 0 ? Mathf.approachDelta(mount.charge, 1, 1 / shoot.firstShotDelay) : 0;
float warmupTarget = (can && mount.shoot) || (continuous && mount.bullet != null) || mount.charging ? 1f : 0f; float warmupTarget = (can && mount.shoot) || (continuous && mount.bullet != null) || mount.charging ? 1f : 0f;
if(linearWarmup){ if(linearWarmup){
mount.warmup = Mathf.approachDelta(mount.warmup, warmupTarget, shootWarmupSpeed); mount.warmup = Mathf.approachDelta(mount.warmup, warmupTarget, shootWarmupSpeed);

View File

@ -1,7 +1,6 @@
package mindustry.ui.dialogs; package mindustry.ui.dialogs;
import arc.*; import arc.*;
import arc.util.Http.*;
import arc.files.*; import arc.files.*;
import arc.func.*; import arc.func.*;
import arc.graphics.*; import arc.graphics.*;
@ -14,6 +13,7 @@ import arc.scene.ui.*;
import arc.scene.ui.layout.*; import arc.scene.ui.layout.*;
import arc.struct.*; import arc.struct.*;
import arc.util.*; import arc.util.*;
import arc.util.Http.*;
import arc.util.io.*; import arc.util.io.*;
import arc.util.serialization.*; import arc.util.serialization.*;
import arc.util.serialization.Jval.*; import arc.util.serialization.Jval.*;

View File

@ -259,7 +259,7 @@ public class SettingsMenuDialog extends BaseDialog{
public void addCategory(String name, Cons<SettingsTable> builder){ public void addCategory(String name, Cons<SettingsTable> builder){
addCategory(name, (Drawable)null, builder); addCategory(name, (Drawable)null, builder);
} }
public Seq<SettingsCategory> getCategories(){ public Seq<SettingsCategory> getCategories(){
return categories; return categories;
} }
@ -343,7 +343,7 @@ public class SettingsMenuDialog extends BaseDialog{
game.checkPref("doubletapmine", false); game.checkPref("doubletapmine", false);
game.checkPref("commandmodehold", true); game.checkPref("commandmodehold", true);
if(!ios){ if(!ios){
game.checkPref("modcrashdisable", true); game.checkPref("modcrashdisable", true);
} }
@ -776,7 +776,7 @@ public class SettingsMenuDialog extends BaseDialog{
table.row(); table.row();
} }
} }
public static class TextSetting extends Setting{ public static class TextSetting extends Setting{
String def; String def;
Cons<String> changed; Cons<String> changed;

View File

@ -283,7 +283,7 @@ public class ChatFragment extends Table{
fadetime += 1f; fadetime += 1f;
fadetime = Math.min(fadetime, messagesShown) + 1f; fadetime = Math.min(fadetime, messagesShown) + 1f;
if(scrollPos > 0) scrollPos++; if(scrollPos > 0) scrollPos++;
} }

View File

@ -18,6 +18,7 @@ import mindustry.content.*;
import mindustry.core.*; import mindustry.core.*;
import mindustry.ctype.*; import mindustry.ctype.*;
import mindustry.entities.*; import mindustry.entities.*;
import mindustry.entities.bullet.*;
import mindustry.entities.units.*; import mindustry.entities.units.*;
import mindustry.game.*; import mindustry.game.*;
import mindustry.gen.*; import mindustry.gen.*;
@ -30,7 +31,6 @@ import mindustry.world.blocks.*;
import mindustry.world.blocks.environment.*; import mindustry.world.blocks.environment.*;
import mindustry.world.blocks.power.*; import mindustry.world.blocks.power.*;
import mindustry.world.consumers.*; import mindustry.world.consumers.*;
import mindustry.entities.bullet.*;
import mindustry.world.meta.*; import mindustry.world.meta.*;
import java.lang.reflect.*; import java.lang.reflect.*;

View File

@ -11,8 +11,8 @@ import arc.struct.*;
import arc.util.*; import arc.util.*;
import mindustry.annotations.Annotations.*; import mindustry.annotations.Annotations.*;
import mindustry.content.*; import mindustry.content.*;
import mindustry.game.*;
import mindustry.game.EventType.*; import mindustry.game.EventType.*;
import mindustry.game.*;
import mindustry.gen.*; import mindustry.gen.*;
import mindustry.type.*; import mindustry.type.*;
import mindustry.ui.*; import mindustry.ui.*;

View File

@ -19,7 +19,7 @@ import static mindustry.Vars.*;
public class TractorBeamTurret extends BaseTurret{ public class TractorBeamTurret extends BaseTurret{
public final int timerTarget = timers++; public final int timerTarget = timers++;
public float retargetTime = 5f; public float retargetTime = 5f;
public float shootCone = 6f; public float shootCone = 6f;
public float shootLength = 5f; public float shootLength = 5f;
public float laserWidth = 0.6f; public float laserWidth = 0.6f;

View File

@ -28,7 +28,7 @@ public class Conduit extends LiquidBlock implements Autotiler{
static final float[][] rotateOffsets = {{hpad, hpad}, {-hpad, hpad}, {-hpad, -hpad}, {hpad, -hpad}}; static final float[][] rotateOffsets = {{hpad, hpad}, {-hpad, hpad}, {-hpad, -hpad}, {hpad, -hpad}};
public final int timerFlow = timers++; public final int timerFlow = timers++;
public Color botColor = Color.valueOf("565656"); public Color botColor = Color.valueOf("565656");
public @Load(value = "@-top-#", length = 5) TextureRegion[] topRegions; public @Load(value = "@-top-#", length = 5) TextureRegion[] topRegions;

View File

@ -5,7 +5,6 @@ import arc.math.*;
import arc.util.*; import arc.util.*;
import arc.util.io.*; import arc.util.io.*;
import mindustry.*; import mindustry.*;
import mindustry.content.*;
import mindustry.entities.units.*; import mindustry.entities.units.*;
import mindustry.gen.*; import mindustry.gen.*;
import mindustry.graphics.*; import mindustry.graphics.*;

View File

@ -84,7 +84,7 @@ public class PayloadSource extends PayloadBlock{
public boolean canProduce(UnitType t){ public boolean canProduce(UnitType t){
return !t.isHidden() && !t.isBanned() && t.supportsEnv(state.rules.env); return !t.isHidden() && !t.isBanned() && t.supportsEnv(state.rules.env);
} }
public class PayloadSourceBuild extends PayloadBlockBuild<Payload>{ public class PayloadSourceBuild extends PayloadBlockBuild<Payload>{
public UnitType unit; public UnitType unit;
public Block block; public Block block;

View File

@ -103,7 +103,7 @@ public class ImpactReactor extends PowerGenerator{
public float ambientVolume(){ public float ambientVolume(){
return warmup; return warmup;
} }
@Override @Override
public double sense(LAccess sensor){ public double sense(LAccess sensor){
if(sensor == LAccess.heat) return warmup; if(sensor == LAccess.heat) return warmup;

View File

@ -69,7 +69,7 @@ public class AttributeCrafter extends GenericCrafter{
public float efficiencyMultiplier(){ public float efficiencyMultiplier(){
return baseEfficiency + Math.min(maxBoost, boostScale * attrsum) + attribute.env(); return baseEfficiency + Math.min(maxBoost, boostScale * attrsum) + attribute.env();
} }
@Override @Override
public float efficiencyScale(){ public float efficiencyScale(){
return scaleLiquidConsumption ? efficiencyMultiplier() : super.efficiencyScale(); return scaleLiquidConsumption ? efficiencyMultiplier() : super.efficiencyScale();

View File

@ -4,7 +4,6 @@ import arc.audio.*;
import arc.graphics.*; import arc.graphics.*;
import arc.graphics.g2d.*; import arc.graphics.g2d.*;
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.*;

View File

@ -110,7 +110,7 @@ public class RepairTower extends Block{
public float warmup(){ public float warmup(){
return warmup; return warmup;
} }
@Override @Override
public void drawSelect(){ public void drawSelect(){
Drawf.dashCircle(x, y, range, Pal.placing); Drawf.dashCircle(x, y, range, Pal.placing);

View File

@ -220,7 +220,7 @@ public class RepairTurret extends Block{
@Override @Override
public void write(Writes write){ public void write(Writes write){
super.write(write); super.write(write);
write.f(rotation); write.f(rotation);
} }

View File

@ -36,7 +36,7 @@ public class DrawFlame extends DrawBlock{
float cr = Mathf.random(0.1f); float cr = Mathf.random(0.1f);
Draw.z(Layer.block + 0.01f); Draw.z(Layer.block + 0.01f);
Draw.alpha(build.warmup()); Draw.alpha(build.warmup());
Draw.rect(top, build.x, build.y); Draw.rect(top, build.x, build.y);