mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-08 14:57:18 +07:00
Bugfixes
This commit is contained in:
@ -215,7 +215,7 @@ public class TODOPlanetGenerator extends PlanetGenerator{
|
|||||||
|
|
||||||
FloatArray frequencies = new FloatArray();
|
FloatArray frequencies = new FloatArray();
|
||||||
for(int i = 0; i < ores.size; i++){
|
for(int i = 0; i < ores.size; i++){
|
||||||
frequencies.add(rand.random(-0.09f, 0.01f));
|
frequencies.add(rand.random(-0.09f, 0.01f) - i * 0.01f);
|
||||||
}
|
}
|
||||||
|
|
||||||
pass((x, y) -> {
|
pass((x, y) -> {
|
||||||
|
@ -9,6 +9,7 @@ import arc.input.*;
|
|||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.math.geom.*;
|
import arc.math.geom.*;
|
||||||
import arc.scene.event.*;
|
import arc.scene.event.*;
|
||||||
|
import arc.scene.ui.TextButton.*;
|
||||||
import arc.scene.ui.layout.*;
|
import arc.scene.ui.layout.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import arc.util.ArcAnnotate.*;
|
import arc.util.ArcAnnotate.*;
|
||||||
@ -85,10 +86,20 @@ public class PlanetDialog extends FloatingDialog{
|
|||||||
makeBloom();
|
makeBloom();
|
||||||
});
|
});
|
||||||
|
|
||||||
cam.fov = 60f;
|
|
||||||
|
|
||||||
addCloseButton();
|
buttons.defaults().size(220f, 64f).pad(0f);
|
||||||
buttons.addImageTextButton("$techtree", Icon.tree, () -> ui.tech.show()).size(230f, 64f);
|
|
||||||
|
TextButtonStyle style = Styles.cleart;
|
||||||
|
float bmargin = 6f;
|
||||||
|
|
||||||
|
//TODO names
|
||||||
|
buttons.addImageTextButton("$back", Icon.left, style, this::hide).margin(bmargin);
|
||||||
|
buttons.addImageTextButton("Tech", Icon.tree, style, () -> ui.tech.show()).margin(bmargin);
|
||||||
|
buttons.addImageTextButton("Launch", Icon.upOpen, style, this::hide).margin(bmargin);
|
||||||
|
buttons.addImageTextButton("Database", Icon.book, style, () -> ui.database.show()).margin(bmargin);
|
||||||
|
buttons.addImageTextButton("Resources", Icon.file, style, this::hide).margin(bmargin);
|
||||||
|
|
||||||
|
cam.fov = 60f;
|
||||||
|
|
||||||
camRelative.set(0, 0f, camLength);
|
camRelative.set(0, 0f, camLength);
|
||||||
projector.setScaling(1f / 150f);
|
projector.setScaling(1f / 150f);
|
||||||
|
@ -39,7 +39,7 @@ public class ItemBridge extends Block{
|
|||||||
hasItems = true;
|
hasItems = true;
|
||||||
unloadable = false;
|
unloadable = false;
|
||||||
group = BlockGroup.transportation;
|
group = BlockGroup.transportation;
|
||||||
//point2 config is relative
|
//point2 config is relative
|
||||||
config(Point2.class, (tile, i) -> ((ItemBridgeEntity)tile).link = Point2.pack(i.x + tile.tileX(), i.y + tile.tileY()));
|
config(Point2.class, (tile, i) -> ((ItemBridgeEntity)tile).link = Point2.pack(i.x + tile.tileX(), i.y + tile.tileY()));
|
||||||
//integer is not
|
//integer is not
|
||||||
config(Integer.class, (tile, i) -> ((ItemBridgeEntity)tile).link = i);
|
config(Integer.class, (tile, i) -> ((ItemBridgeEntity)tile).link = i);
|
||||||
@ -117,7 +117,7 @@ public class ItemBridge extends Block{
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return other.block() == this && (!checkDouble || other.<ItemBridgeEntity>ent().link != tile.pos());
|
return other.block() == this && (other.team() == tile.team() || tile.block() != this) && (!checkDouble || other.<ItemBridgeEntity>ent().link != tile.pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Tile findLink(int x, int y){
|
public Tile findLink(int x, int y){
|
||||||
|
@ -64,7 +64,6 @@ public class Floor extends Block{
|
|||||||
public Block decoration = Blocks.air;
|
public Block decoration = Blocks.air;
|
||||||
|
|
||||||
protected TextureRegion[][] edges;
|
protected TextureRegion[][] edges;
|
||||||
protected byte eq = 0;
|
|
||||||
protected Array<Block> blenders = new Array<>();
|
protected Array<Block> blenders = new Array<>();
|
||||||
protected IntSet blended = new IntSet();
|
protected IntSet blended = new IntSet();
|
||||||
protected TextureRegion edgeRegion;
|
protected TextureRegion edgeRegion;
|
||||||
@ -183,7 +182,6 @@ public class Floor extends Block{
|
|||||||
protected void drawEdges(Tile tile, boolean sameLayer){
|
protected void drawEdges(Tile tile, boolean sameLayer){
|
||||||
blenders.clear();
|
blenders.clear();
|
||||||
blended.clear();
|
blended.clear();
|
||||||
eq = 0;
|
|
||||||
|
|
||||||
for(int i = 0; i < 8; i++){
|
for(int i = 0; i < 8; i++){
|
||||||
Point2 point = Geometry.d8[i];
|
Point2 point = Geometry.d8[i];
|
||||||
@ -192,11 +190,10 @@ public class Floor extends Block{
|
|||||||
if(blended.add(other.floor().id)){
|
if(blended.add(other.floor().id)){
|
||||||
blenders.add(other.floor());
|
blenders.add(other.floor());
|
||||||
}
|
}
|
||||||
eq |= (1 << i);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
blenders.sort((a, b) -> Integer.compare(a.id, b.id));
|
blenders.sort(a -> a.id);
|
||||||
|
|
||||||
for(Block block : blenders){
|
for(Block block : blenders){
|
||||||
for(int i = 0; i < 8; i++){
|
for(int i = 0; i < 8; i++){
|
||||||
|
@ -25,7 +25,7 @@ public class ArmoredConduit extends Conduit{
|
|||||||
return otherblock.outputsLiquid && blendsArmored(tile, rotation, otherx, othery, otherrot, otherblock);
|
return otherblock.outputsLiquid && blendsArmored(tile, rotation, otherx, othery, otherrot, otherblock);
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ArmoredConduitEntity extends TileEntity{
|
public class ArmoredConduitEntity extends ConduitEntity{
|
||||||
@Override
|
@Override
|
||||||
public void draw(){
|
public void draw(){
|
||||||
super.draw();
|
super.draw();
|
||||||
@ -39,7 +39,7 @@ public class ArmoredConduit extends Conduit{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean acceptLiquid(Tilec source, Liquid liquid, float amount){
|
public boolean acceptLiquid(Tilec source, Liquid liquid, float amount){
|
||||||
return super.acceptLiquid(source, liquid, amount) && (source.block() instanceof Conduit) || Edges.getFacingEdge(source.tile(), tile).relativeTo(tile) == tile.rotation();
|
return super.acceptLiquid(source, liquid, amount) && (source.block() instanceof Conduit) || Edges.getFacingEdge(source.tile(), tile).absoluteRelativeTo(tile.x, tile.y) == tile.rotation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ public class LiquidExtendingBridge extends ExtendingItemBridge{
|
|||||||
group = BlockGroup.liquids;
|
group = BlockGroup.liquids;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class LiquidExtendingBridgeEntity extends ItemBridgeEntity{
|
public class LiquidExtendingBridgeEntity extends ExtendingItemBridgeEntity{
|
||||||
@Override
|
@Override
|
||||||
public void updateTile(){
|
public void updateTile(){
|
||||||
time += cycleSpeed * delta();
|
time += cycleSpeed * delta();
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
if(JavaVersion.current() != JavaVersion.VERSION_1_8){
|
||||||
|
throw new GradleException("!!! YOU MUST USE JAVA 8 TO COMPILE AND RUN MINDUSTRY !!! Read the README. Your version: ${System.properties["java.version"]}")
|
||||||
|
}
|
||||||
|
|
||||||
include 'desktop', 'core', 'server', 'ios', 'annotations', 'tools', 'tests'
|
include 'desktop', 'core', 'server', 'ios', 'annotations', 'tools', 'tests'
|
||||||
|
|
||||||
def use = { ... names ->
|
def use = { ... names ->
|
||||||
|
Reference in New Issue
Block a user