Name cleanup
This commit is contained in:
@@ -4,6 +4,7 @@ import arc.*;
|
||||
import arc.func.*;
|
||||
import arc.math.*;
|
||||
import arc.math.geom.*;
|
||||
import arc.math.geom.Geometry.*;
|
||||
import arc.struct.*;
|
||||
import arc.struct.ObjectIntMap.*;
|
||||
import arc.util.*;
|
||||
@@ -554,10 +555,6 @@ public class World{
|
||||
return dark;
|
||||
}
|
||||
|
||||
public interface Raycaster{
|
||||
boolean accept(int x, int y);
|
||||
}
|
||||
|
||||
private class Context implements WorldContext{
|
||||
|
||||
Context(){
|
||||
|
||||
@@ -54,7 +54,7 @@ public class LoadRenderer implements Disposable{
|
||||
bars = new Bar[]{
|
||||
new Bar("s_proc#", OS.cores / 16f, OS.cores < 4),
|
||||
new Bar("c_aprog", () -> assets != null, () -> assets.getProgress(), () -> false),
|
||||
new Bar("g_vtype", graphics.getGLVersion().type == Type.GLES ? 0.5f : 1f, graphics.getGLVersion().type == Type.GLES),
|
||||
new Bar("g_vtype", graphics.getGLVersion().type == GlType.GLES ? 0.5f : 1f, graphics.getGLVersion().type == GlType.GLES),
|
||||
new Bar("s_mem#", () -> true, () -> Core.app.getJavaHeap() / 1024f / 1024f / 200f, () -> Core.app.getJavaHeap() > 1024 * 1024 * 110),
|
||||
new Bar("v_ver#", () -> Version.build != 0, () -> Version.build == -1 ? 0.3f : (Version.build - 103f) / 10f, () -> !Version.modifier.equals("release")),
|
||||
new Bar("s_osv", OS.isWindows ? 0.35f : OS.isLinux ? 0.9f : OS.isMac ? 0.5f : 0.2f, OS.isMac),
|
||||
|
||||
@@ -15,10 +15,10 @@ import mindustry.type.*;
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
public class Shaders{
|
||||
public static BlockBuild blockbuild;
|
||||
public static BlockBuildShader blockbuild;
|
||||
public static @Nullable ShieldShader shield;
|
||||
public static BuildBeamShader buildBeam;
|
||||
public static UnitBuild build;
|
||||
public static UnitBuildShader build;
|
||||
public static DarknessShader darkness;
|
||||
public static LightShader light;
|
||||
public static SurfaceShader water, mud, tar, slag, space;
|
||||
@@ -31,7 +31,7 @@ public class Shaders{
|
||||
|
||||
public static void init(){
|
||||
mesh = new MeshShader();
|
||||
blockbuild = new BlockBuild();
|
||||
blockbuild = new BlockBuildShader();
|
||||
try{
|
||||
shield = new ShieldShader();
|
||||
}catch(Throwable t){
|
||||
@@ -40,7 +40,7 @@ public class Shaders{
|
||||
t.printStackTrace();
|
||||
}
|
||||
buildBeam = new BuildBeamShader();
|
||||
build = new UnitBuild();
|
||||
build = new UnitBuildShader();
|
||||
darkness = new DarknessShader();
|
||||
light = new LightShader();
|
||||
water = new SurfaceShader("water");
|
||||
@@ -142,12 +142,12 @@ public class Shaders{
|
||||
}
|
||||
}
|
||||
|
||||
public static class UnitBuild extends LoadShader{
|
||||
public static class UnitBuildShader extends LoadShader{
|
||||
public float progress, time;
|
||||
public Color color = new Color();
|
||||
public TextureRegion region;
|
||||
|
||||
public UnitBuild(){
|
||||
public UnitBuildShader(){
|
||||
super("unitbuild", "default");
|
||||
}
|
||||
|
||||
@@ -162,11 +162,11 @@ public class Shaders{
|
||||
}
|
||||
}
|
||||
|
||||
public static class BlockBuild extends LoadShader{
|
||||
public static class BlockBuildShader extends LoadShader{
|
||||
public float progress;
|
||||
public TextureRegion region = new TextureRegion();
|
||||
|
||||
public BlockBuild(){
|
||||
public BlockBuildShader(){
|
||||
super("blockbuild", "default");
|
||||
}
|
||||
|
||||
|
||||
@@ -153,6 +153,7 @@ public class Build{
|
||||
(type == check.block() && check.build != null && rotation == check.build.rotation && type.rotate) || //same block, same rotation
|
||||
!check.interactable(team) || //cannot interact
|
||||
!check.floor().placeableOn || //solid wall
|
||||
(!checkVisible && !check.block().alwaysReplace) || //replacing a block that should be replaced (e.g. payload placement)
|
||||
!((type.canReplace(check.block()) || //can replace type
|
||||
//controversial change: allow rebuilding damaged blocks
|
||||
//this could be buggy and abuse-able, so I'm not enabling it yet
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
package mindustry.world.meta;
|
||||
|
||||
import arc.struct.*;
|
||||
import mindustry.gen.*;
|
||||
|
||||
public class Producers{
|
||||
private Seq<Produce> producers = new Seq<>();
|
||||
|
||||
public void add(Produce prod){
|
||||
producers.add(prod);
|
||||
}
|
||||
|
||||
interface Produce{
|
||||
void add(Building entity);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user