Bugfixes
This commit is contained in:
@@ -797,6 +797,7 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{
|
|||||||
textFadeTime = 0f;
|
textFadeTime = 0f;
|
||||||
target = null;
|
target = null;
|
||||||
moveTarget = null;
|
moveTarget = null;
|
||||||
|
isShooting = isBoosting = isBuilding = isTransferring = isTyping = false;
|
||||||
spawner = lastSpawner = null;
|
spawner = lastSpawner = null;
|
||||||
health = maxHealth();
|
health = maxHealth();
|
||||||
mining = null;
|
mining = null;
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import io.anuke.arc.*;
|
|||||||
import io.anuke.arc.Graphics.*;
|
import io.anuke.arc.Graphics.*;
|
||||||
import io.anuke.arc.Graphics.Cursor.*;
|
import io.anuke.arc.Graphics.Cursor.*;
|
||||||
import io.anuke.arc.graphics.g2d.*;
|
import io.anuke.arc.graphics.g2d.*;
|
||||||
import io.anuke.arc.input.*;
|
|
||||||
import io.anuke.arc.math.*;
|
import io.anuke.arc.math.*;
|
||||||
import io.anuke.arc.scene.*;
|
import io.anuke.arc.scene.*;
|
||||||
import io.anuke.arc.scene.event.*;
|
import io.anuke.arc.scene.event.*;
|
||||||
import io.anuke.arc.scene.ui.*;
|
import io.anuke.arc.scene.ui.*;
|
||||||
|
import io.anuke.arc.scene.ui.layout.*;
|
||||||
import io.anuke.arc.util.ArcAnnotate.*;
|
import io.anuke.arc.util.ArcAnnotate.*;
|
||||||
import io.anuke.mindustry.*;
|
import io.anuke.mindustry.*;
|
||||||
import io.anuke.mindustry.core.GameState.*;
|
import io.anuke.mindustry.core.GameState.*;
|
||||||
@@ -252,6 +252,17 @@ public class DesktopInput extends InputHandler{
|
|||||||
return mode == breaking;
|
return mode == breaking;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void buildPlacementUI(Table table){
|
||||||
|
table.addImage().color(Pal.gray).height(4f).colspan(4).growX();
|
||||||
|
table.row();
|
||||||
|
table.left().margin(0f).defaults().size(48f).left();
|
||||||
|
|
||||||
|
table.addImageButton(Icon.wikiSmall, Styles.clearPartiali, () -> {
|
||||||
|
ui.schematics.show();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
void pollInput(){
|
void pollInput(){
|
||||||
Tile selected = tileAt(Core.input.mouseX(), Core.input.mouseY());
|
Tile selected = tileAt(Core.input.mouseX(), Core.input.mouseY());
|
||||||
int cursorX = tileX(Core.input.mouseX());
|
int cursorX = tileX(Core.input.mouseX());
|
||||||
@@ -306,11 +317,6 @@ public class DesktopInput extends InputHandler{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO remove
|
|
||||||
if(Core.input.keyTap(KeyCode.V)){
|
|
||||||
ui.schematics.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(sreq != null){
|
if(sreq != null){
|
||||||
float offset = ((sreq.block.size + 2) % 2) * tilesize / 2f;
|
float offset = ((sreq.block.size + 2) % 2) * tilesize / 2f;
|
||||||
float x = Core.input.mouseWorld().x + offset;
|
float x = Core.input.mouseWorld().x + offset;
|
||||||
|
|||||||
@@ -105,8 +105,18 @@ public class TechTreeDialog extends FloatingDialog{
|
|||||||
RadialTreeLayout layout = new RadialTreeLayout();
|
RadialTreeLayout layout = new RadialTreeLayout();
|
||||||
LayoutNode node = new LayoutNode(root, null);
|
LayoutNode node = new LayoutNode(root, null);
|
||||||
layout.layout(node);
|
layout.layout(node);
|
||||||
//bounds.y += nodeSize*1.5f;
|
float minx = 0f, miny = 0f, maxx = 0f, maxy = 0f;
|
||||||
copyInfo(node);
|
copyInfo(node);
|
||||||
|
|
||||||
|
for(TechTreeNode n : nodes){
|
||||||
|
minx = Math.min(n.x - n.width/2f, minx);
|
||||||
|
maxx = Math.max(n.x + n.width/2f, maxx);
|
||||||
|
miny = Math.min(n.y - n.height/2f, miny);
|
||||||
|
maxy = Math.max(n.y + n.height/2f, maxy);
|
||||||
|
}
|
||||||
|
bounds = new Rectangle(minx, miny, maxx - minx, maxy - miny);
|
||||||
|
bounds.y += nodeSize*1.5f;
|
||||||
|
Log.info(bounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
void copyInfo(LayoutNode node){
|
void copyInfo(LayoutNode node){
|
||||||
@@ -262,7 +272,7 @@ public class TechTreeDialog extends FloatingDialog{
|
|||||||
float rx = bounds.x + panX + ox, ry = panY + oy + bounds.y;
|
float rx = bounds.x + panX + ox, ry = panY + oy + bounds.y;
|
||||||
float rw = bounds.width, rh = bounds.height;
|
float rw = bounds.width, rh = bounds.height;
|
||||||
rx = Mathf.clamp(rx, -rw + pad, Core.graphics.getWidth() - pad);
|
rx = Mathf.clamp(rx, -rw + pad, Core.graphics.getWidth() - pad);
|
||||||
ry = Mathf.clamp(ry, pad, Core.graphics.getHeight() - rh - pad);
|
ry = Mathf.clamp(ry, -rh + pad, Core.graphics.getHeight() - pad);
|
||||||
panX = rx - bounds.x - ox;
|
panX = rx - bounds.x - ox;
|
||||||
panY = ry - bounds.y - oy;
|
panY = ry - bounds.y - oy;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,11 @@ public class Fracker extends SolidPump{
|
|||||||
topRegion = Core.atlas.find(name + "-top");
|
topRegion = Core.atlas.find(name + "-top");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean outputsItems(){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawCracks(Tile tile){}
|
public void drawCracks(Tile tile){}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user