mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-12 19:09:34 +07:00
Better tunnel debugging, improved keybind dialog controller info
This commit is contained in:
parent
9ff9684a04
commit
07aab732b7
@ -25,7 +25,7 @@ allprojects {
|
||||
appName = 'Mindustry'
|
||||
gdxVersion = '1.9.8'
|
||||
aiVersion = '1.8.1'
|
||||
uCoreVersion = 'b4757b5'
|
||||
uCoreVersion = 'f484468'
|
||||
|
||||
getVersionString = {
|
||||
String buildVersion = getBuildVersion()
|
||||
|
@ -83,7 +83,7 @@ io.anuke.ucore.scene.ui.Window$WindowStyle: {
|
||||
dialog: {stageBackground: dialogDim, titleFont: default-font, background: window-empty, titleFontColor: accent }
|
||||
},
|
||||
io.anuke.ucore.scene.ui.KeybindDialog$KeybindDialogStyle: {
|
||||
default: {keyColor: accent, keyNameColor: white, paneStyle: clear},
|
||||
default: {keyColor: accent, keyNameColor: white, controllerColor: menuitem, paneStyle: clear},
|
||||
},
|
||||
io.anuke.ucore.scene.ui.Slider$SliderStyle: {
|
||||
default-horizontal: {background: slider, knob: slider-knob, knobOver: slider-knob-over, knobDown: slider-knob-down},
|
||||
|
@ -1,7 +1,7 @@
|
||||
#Autogenerated file. Do not modify.
|
||||
#Wed Feb 21 19:47:18 EST 2018
|
||||
#Fri Feb 23 13:58:57 EST 2018
|
||||
version=release
|
||||
androidBuildCode=262
|
||||
androidBuildCode=265
|
||||
name=Mindustry
|
||||
code=3.3
|
||||
build=custom build
|
||||
|
@ -59,6 +59,10 @@ public class DebugFragment implements Fragment {
|
||||
row();
|
||||
new button("wave", () -> state.wavetime = 0f);
|
||||
row();
|
||||
new button("time 0", () -> Timers.resetTime(0f));
|
||||
row();
|
||||
new button("time max", () -> Timers.resetTime(1080000 - 60*10));
|
||||
row();
|
||||
new button("clear", () -> {
|
||||
enemyGroup.clear();
|
||||
state.enemies = 0;
|
||||
|
@ -84,6 +84,7 @@ public class Junction extends Block{
|
||||
return new JunctionEntity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Array<Object> getDebugInfo(Tile tile){
|
||||
JunctionEntity entity = tile.entity();
|
||||
Array<Object> arr = super.getDebugInfo(tile);
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.anuke.mindustry.world.blocks.types.distribution;
|
||||
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.badlogic.gdx.utils.NumberUtils;
|
||||
import io.anuke.mindustry.entities.TileEntity;
|
||||
import io.anuke.mindustry.resource.Item;
|
||||
@ -90,6 +91,30 @@ public class TunnelConveyor extends Block{
|
||||
return new TunnelEntity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Array<Object> getDebugInfo(Tile tile){
|
||||
TunnelEntity entity = tile.entity();
|
||||
Array<Object> arr = super.getDebugInfo(tile);
|
||||
for(int i = 0; i < 4; i ++){
|
||||
arr.add("nearby." + i);
|
||||
arr.add(tile.getNearby(i));
|
||||
}
|
||||
|
||||
arr.add("buffer");
|
||||
arr.add(entity.index);
|
||||
|
||||
for(int i = 0; i < entity.index; i++){
|
||||
long l = entity.items[i];
|
||||
float time = NumberUtils.intBitsToFloat(Bits.getLeftInt(l));
|
||||
Item item = Item.getByID(Bits.getRightInt(l));
|
||||
Tile dest = getDestTunnel(tile, item);
|
||||
arr.add(" buffer.item");
|
||||
arr.add(time + " | " + item.name + " | " + dest.block() + ":" + dest.floor());
|
||||
}
|
||||
|
||||
return arr;
|
||||
}
|
||||
|
||||
Tile getDestTunnel(Tile tile, Item item){
|
||||
Tile dest = tile;
|
||||
int rel = (tile.getRotation() + 2)%4;
|
||||
|
Loading…
Reference in New Issue
Block a user